aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.cpp321
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.h22
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AFTTS_Sel.h54
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_ExpT.h704
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_Sel.h54
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASCalls.h522
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExpT.h3985
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraCalls.h401
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraExpT.h457
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraProcs.h2461
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraVers.h26
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileE.h20
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileEASF.h70
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenEASF.h44
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASKey.h128
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASProcs.h2841
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASRaiseAware.h360
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCalls.h1628
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.cpp916
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.h111
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpT.h10293
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete1.h183
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete2.h396
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVPrefsD.h232
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVProcs.h9925
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVVers.h21
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorCalls.h300
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorExpT.h1609
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorHFT.h78
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorProcs.h1038
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorVers.h15
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroErr.h3096
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CAVAlert.h181
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsExpT.h370
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFT.h103
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFTProcs.h361
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsObTp.h541
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorCalls.h759
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorProcs.h299
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CoreExpT.h407
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosCalls.h494
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosExpT.h349
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenEASF.h132
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosProcs.h2408
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynEASF.h122
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFT.h2021
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFTProcs.h981
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DirectoryHFT.h393
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h61
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EncConvE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Environ.h78
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrEASF.h38
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFT.h153
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFTProcs.h848
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/HFTLibrary.h39
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Library.h29
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacCalls.h272
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacPlatform.h66
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacProcs.h127
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/NSelExpT.h75
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBasicExpT.h160
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesCalls.h129
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesExpT.h107
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesProcs.h27
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDCalls.h1742
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClassDefs.h55
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClasses.h34
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocEASF.h268
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDExpT.h6798
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFErrorCodes.h290
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXEASF.h28
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataCalls.h217
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataError.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataErrorASF.h26
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataExpT.h108
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataHFTVers.h26
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataProcs.h568
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModEASF.h48
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageEASF.h30
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDProcs.h12436
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSError.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSErrorASF.h30
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSExpT.h312
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadCalls.h257
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadHFTVers.h26
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadProcs.h1064
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteCalls.h286
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteHFTVers.h26
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteProcs.h991
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFT.h37
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFont.h479
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFontExpT.h164
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEError.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEErrorASF.h64
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEExpT.h2231
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERCalls.h389
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERProcs.h3467
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PETypes.h57
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEVers.h34
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWCalls.h416
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWProcs.h3701
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICommon.h106
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICrypt.h27
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIExcept.h105
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.c35
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.pch30
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.c621
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.h174
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPokes.h2879
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPrefix.h36
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIRequir.h303
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIVersn.h128
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFCalls.h192
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFProcs.h467
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageEASF.h160
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PagePDECntCalls.h200
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PgCntProcs.h352
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Plugin.h26
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFT.h2154
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFTProcs.h577
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterEASF.h28
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.cpp520
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.h126
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SmartPDPage.h373
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFT.h554
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFTProcs.h82
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Speller_Sel.h380
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchClls.h53
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchHFT.h56
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchPrcs.h344
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchType.h270
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/StAcroResourceContext.h8
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitEASF.h20
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFT.h108
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFTProcs.h234
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixCalls.h434
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixPlatform.h171
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixProcs.h229
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFT.h430
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFTProcs.h169
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinCalls.h298
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinExpT.h57
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinPltfm.h179
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrE.h19
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrEASF.h48
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h67
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/cathft.h105
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/catprocs.h66
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/winprocs.h153
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDataStream.h112
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDebug.h105
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASFunctionLogger.h67
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASHelp.h212
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASLib.h78
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASNameSpace.h117
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASTypes.h277
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASZStringSuite.h153
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/AVCmdDefs.h736
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/DebugWindowHFT.h46
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASPoint.hpp2
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASRect.hpp2
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASTypes.hpp2
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASfixed.hpp2
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/MacPIHeaders.h30
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders++.pch54
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders.h109
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/SimpleUnicode.h71
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/StAcroResourceContext.h25
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnicodeAPI.h171
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnixPIHeaders.h30
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/WinPIHeaders.h27
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.cpp52
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.h39
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/AcroDspOptions.rsp13
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/Debug/BuildLog.htmbin0 -> 17230 bytes
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln17
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln.no16
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.suobin0 -> 54784 bytes
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj161
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj.E-NNOVATION.dferbas.user37
191 files changed, 108347 insertions, 0 deletions
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.cpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.cpp
new file mode 100644
index 0000000..b0e7b81
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.cpp
@@ -0,0 +1,321 @@
+/*********************************************************************
+
+ PDF-AS.SigHandler.cpp
+
+*********************************************************************/
+
+#include "PDF-AS.SigHandler.h"
+#include "FormsHFT.h"
+#include <string>
+#include <ctime>
+
+
+using namespace std;
+
+HFT gDigSigHFT = NULL;
+HFT gAcroFormHFT = NULL;
+HFT gPubSecHFT = NULL;
+
+boolean gSigHandlerInitialized = false;
+clock_t openStamp = 0;
+clock_t validatedStamp = 0;
+
+#define OPEN_INTERVAL 2000 // ms. no validation after document was opened
+#define VALID_INTERVAL 5000 // ms. no multi signature validation
+
+/*-------------------------------------------------------
+ Custom validation Callbacks
+-------------------------------------------------------*/
+
+// on document open
+static ACCBPROTO1 void ACCBPROTO2 DSDocOpen(PDDoc pdDoc) {
+ // do nothing, no auto validation
+ openStamp = clock();
+}
+
+// not called
+static ACCBPROTO1 ASBool ACCBPROTO2 DSCanValidate(PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASAtom filter ) {
+ return true;
+}
+
+// validate signature
+static ACCBPROTO1 DSValidState ACCBPROTO2 DSValidateSig(PDDoc pdDoc, CosObj sigField, CosObj sigAnnot) {
+ int i = 9;
+
+ long startDif = clock() - openStamp;
+ if (startDif < OPEN_INTERVAL) {
+ return DSSigValid;
+ }
+
+ long validateDif = clock() - validatedStamp;
+ if (validateDif < VALID_INTERVAL) {
+ return DSSigValid;
+ }
+
+ CosObj sigEntry = CosDictGet(sigAnnot, ASAtomFromString("V"));
+ CosObj urlObj = CosDictGet(sigEntry, ASAtomFromString("ContactInfo"));
+ char *urlStr = "https://www.buergerkarte.at/signature-verification"; // default url
+ if (CosObjGetType(urlObj) == CosString) {
+ ASTCount len;
+ urlStr = CosStringValue(urlObj, &len );
+ }
+
+ char msg[1024];
+ sprintf(msg, "Dieses Dokument enthält PDF-AS Signaturen. Wollen Sie diese unter %s verifizieren?", urlStr);
+
+
+ ASInt32 choice = AVAlert(ALERT_NOTE, msg, "Ja", "Nein", NULL, false);
+ validatedStamp = clock();
+ if(choice==2) {
+ return DSSigUnknown;
+ }
+ //AVAlertNote("Diese PDF-AS Signatur kann unter www.buergerkarte.at verifiziert werden");
+ //string url = "https://www.buergerkarte.at/signature-verification"; // get this from document
+ char script[2048];
+ sprintf(script, "app.launchURL('%s', true)", urlStr);
+ AFExecuteThisScript (pdDoc, script, NULL);
+
+ return DSSigValid;
+}
+
+
+
+/*-------------------------------------------------------
+ Core Handshake Callbacks
+-------------------------------------------------------*/
+
+/* DocSignExportHFTs
+** ------------------------------------------------------
+**
+** Create and register the HFT's.
+**
+** Return true to continue loading plug-in.
+** Return false to cause plug-in loading to stop.
+*/
+ACCB1 ASBool ACCB2 DocSignExportHFTs(void)
+{
+ return true;
+}
+
+/* DocSignImportReplaceAndRegister
+** ------------------------------------------------------
+**
+** This routine is where you can:
+** 1) Import plug-in supplied HFTs.
+** 2) Replace functions in the HFTs you're using (where allowed).
+** 3) Register to receive notification events.
+**
+** Return true to continue loading plug-in.
+** Return false to cause plug-in loading to stop.
+*/
+ACCB1 ASBool ACCB2 DocSignImportReplaceAndRegister(void)
+{
+
+ gDigSigHFT = ASExtensionMgrGetHFT(ASAtomFromString("DigSigHFT"), 1);
+ if (!gDigSigHFT)
+ return false;
+
+ gAcroFormHFT = Init_AcroFormHFT;
+ if(!gAcroFormHFT)
+ return false;
+
+ /* PubSec HFT */
+ gPubSecHFT = ASExtensionMgrGetHFT(ASAtomFromString("PubSecHFT"), 1);
+ if (!gPubSecHFT)
+ return false;
+
+
+ return true;
+}
+
+/* DocSignInit
+** ------------------------------------------------------
+**
+** The main initialization routine.
+**
+** Return true to continue loading plug-in.
+** Return false to cause plug-in loading to stop.
+*/
+ACCB1 ASBool ACCB2 DocSignInit(void)
+{
+
+
+ DSRegisterSignatureHandler();
+
+
+ return true;
+}
+
+
+
+void DSRegisterSignatureHandler()
+{
+ DigSigHandlerRec gSigHandlerRec;
+ if( gDigSigHFT == NULL ) return;
+ if (!gSigHandlerInitialized)
+ {
+ memset( &gSigHandlerRec, 0, sizeof(DigSigHandlerRec) );
+ gSigHandlerRec.size = sizeof (DigSigHandlerRec);
+ gSigHandlerRec.uiName = PDFAS_HANDLER_NAME;
+ gSigHandlerRec.filterKey = ASAtomFromString(PDFAS_HANDLER_NAME);
+ gSigHandlerRec.canBlindSign = true;
+ gSigHandlerRec.canEncrypt = true;
+ gSigHandlerRec.dsDocOpen = ASCallbackCreateProto(DSDocOpenProc, DSDocOpen );
+ //gSigHandlerRec.dsGetBoolProperty = ASCallbackCreateProto(DSGetBoolPropertyProc, DSGetBoolProperty );
+ gSigHandlerRec.dsCanValidate = ASCallbackCreateProto(DSCanValidateProc, DSCanValidate );
+ //gSigHandlerRec.dsDocClose = ASCallbackCreateProto(DSDocCloseProc, DSDocClose );
+ //gSigHandlerRec.dsDefaultValue = ASCallbackCreateProto(DSDefaultValueProc, DSDefaultValue );
+
+ //gSigHandlerRec.dsNewSigData =
+ // ASCallbackCreateProto(DSNewSigDataProc, DSNewSigData );
+ //gSigHandlerRec.dsCommitSign =
+ // ASCallbackCreateProto(DSCommitSignProc, DSCommitSign );
+ //gSigHandlerRec.dsFinishSign =
+ // ASCallbackCreateProto(DSFinishSignProc, DSFinishSign );
+ //gSigHandlerRec.dsFreeSigData =
+ // ASCallbackCreateProto(DSFreeSigDataProc, DSFreeSigData );
+ gSigHandlerRec.dsValidateSig = ASCallbackCreateProto(DSValidateSigProc, DSValidateSig );
+ //gSigHandlerRec.dsGetValidState =
+ // ASCallbackCreateProto(DSGetValidStateProc, DSGetValidState );
+ //gSigHandlerRec.dsProperties = (void (__cdecl*)(PDDoc ,CosObj, CosObj))NULL;
+ //ASCallbackCreateProto(DSPropertiesProc, DSProperties );
+ //gSigHandlerRec.dsUnValidateSig =
+ // ASCallbackCreateProto(DSUnValidateSigProc, DSUnValidateSig );
+ //gSigHandlerRec.dsReValidateSig =
+ // ASCallbackCreateProto(DSUnValidateSigProc, DSReValidateSig );
+ gSigHandlerInitialized = true;
+ }
+
+ DigSigRegisterFilter( gExtensionID, &gSigHandlerRec );
+
+}
+
+/** not used, left as example **/
+void RegisterFHandler() {
+ PubSecHandlerRec fHandlerRec;
+ if( true ) {
+
+ memset( &fHandlerRec, 0, sizeof(fHandlerRec) );
+
+
+ fHandlerRec.size = sizeof(PubSecHandlerRec);
+
+ //fHandlerRec.getBoolProperty = ASCallbackCreateProto(PSGetBoolPropertyProc, GetBoolProperty );
+ //fHandlerRec.getAtomProperty = ASCallbackCreateProto(PSGetAtomPropertyProc, GetAtomProperty );
+ //fHandlerRec.getTextProperty = ASCallbackCreateProto(PSGetTextPropertyProc, GetTextProperty );
+ //fHandlerRec.getInt32Property = ASCallbackCreateProto(PSGetInt32PropertyProc, GetInt32Property );
+
+ //fHandlerRec.newEngine = ASCallbackCreateProto(PSNewEngineProc, DSHandler::NewEngine );
+ //fHandlerRec.destroyEngine = ASCallbackCreateProto(PSDestroyEngineProc, DSHandler::DestroyEngine );
+
+ //fHandlerRec.sessionAcquire = ASCallbackCreateProto(PSSessionAcquireProc, DSHandler::SessionAcquire );
+ //fHandlerRec.sessionRelease = ASCallbackCreateProto(PSSessionReleaseProc, DSHandler::SessionRelease );
+ //fHandlerRec.sessionReady = ASCallbackCreateProto(PSSessionReadyProc, DSHandler::SessionReady );
+ //fHandlerRec.performOperation = ASCallbackCreateProto(PSPerformOperationProc, DSHandler::PerformOperation );
+
+
+ //fHandlerRec.sigGetSigProperties = ASCallbackCreateProto(PSSigGetSigPropertiesProc, DSHandler::SigGetSigProperties );
+ //fHandlerRec.sigAuthenticate = ASCallbackCreateProto(PSSigAuthenticateProc, DSHandler::SigAuthenticate );
+ //fHandlerRec.sigGetSigValue = ASCallbackCreateProto(PSSigGetSigValueProc, DSHandler::SigGetSigValue );
+
+ //// Set up this callback if you want to have custom appearance
+ //fHandlerRec.sigCreateAPNXObj = ASCallbackCreateProto(PSSigCreateAPNXObjProc, DSHandler::SigCreateAPNXObj );
+ //fHandlerRec.sigValidate = ASCallbackCreateProto(PSSigValidateProc, DSHandler::SigValidate );
+ //fHandlerRec.sigValidateDialog = NULL;
+ //fHandlerRec.sigPropDialog = NULL;
+
+ //fHandlerRec.getLogo = ASCallbackCreateProto(PSGetLogoProc, DSHandler::GetLogo );
+
+ //// SigVal methods
+ //fHandlerRec.sigValGetText = ASCallbackCreateProto(PSSigValGetTextProc, DSSigVal::GetText );
+ //// Once you set up the PSSigCreateAPNXObjProc callback, you must set up this callback
+ //// in order to have the PSGetLogoProc callback invoked
+ //fHandlerRec.sigValGetAPLabel = ASCallbackCreateProto(PSSigValGetAPLabelProc, DSSigVal::GetAPLabel );
+
+ //// Cert exchange methods
+ //fHandlerRec.exportData = ASCallbackCreateProto(PSExportDataProc, DSHandler::ExportData );
+ //fHandlerRec.importData = NULL;
+ //
+ //// Encryption methods
+ //fHandlerRec.cryptOpenCMSEnvelope = ASCallbackCreateProto(PSOpenCMSEnvelopeProc, DSHandler::openCMSEnvelope);
+ //fHandlerRec.cryptGetImplicitRecipients = ASCallbackCreateProto(PSGetImplicitRecipientsProc, DSHandler::getImplicitRecipients);
+
+ //fbHandlerIsInit = true;
+ }
+
+ /* Register security handler.
+ Note that ownership of this struct is retained by this plug-in */
+
+ ASBool bOk = PSRegisterHandler( gExtensionID, &fHandlerRec );
+
+}
+
+/* DocSignUnload
+** ------------------------------------------------------
+**
+** The unload routine.
+**
+** Called when your plug-in is being unloaded when the application quits.
+** Use this routine to release any system resources you may have
+** allocated.
+**
+** Returning false will cause an alert to display that unloading failed.
+*/
+ACCB1 ASBool ACCB2 DocSignUnload(void)
+{
+
+ return true;
+}
+
+/* GetExtensionName
+** ------------------------------------------------------
+**
+** Get the extension name associated with this plugin
+*/
+ASAtom GetExtensionName()
+{
+ return ASAtomFromString("PDF-AS.SigHandler"); /* Change to your extension's name */
+}
+
+
+/*
+** PIHandshake
+** Required Plug-in handshaking routine: Do not change it's name! PIMain.c expects
+** this function to be named and typed as shown.
+*/
+ACCB1 ASBool ACCB2 PIHandshake(Uns32 handshakeVersion, void *handshakeData)
+{
+ if (handshakeVersion == HANDSHAKE_V0200) {
+ /* Cast handshakeData to the appropriate type */
+ PIHandshakeData_V0200 *hsData = (PIHandshakeData_V0200 *)handshakeData;
+
+ /* Set the name we want to go by */
+ hsData->extensionName = GetExtensionName();
+
+ /* If you export your own HFT, do so in here */
+ hsData->exportHFTsCallback = ASCallbackCreate(&DocSignExportHFTs);
+
+ /*
+ ** If you import plug-in HFTs, replace functionality, and/or want to register for notifications before
+ ** the user has a chance to do anything, do so in here.
+ */
+ hsData->importReplaceAndRegisterCallback = ASCallbackCreate(
+ &DocSignImportReplaceAndRegister);
+
+ /* Perform your plug-in's initialization in here */
+ hsData->initCallback = ASCallbackCreate(&DocSignInit);
+
+ /* Perform any memory freeing or state saving on "quit" in here */
+ hsData->unloadCallback = ASCallbackCreate(&DocSignUnload);
+
+ /* All done */
+ return true;
+
+ } /* Each time the handshake version changes, add a new "else if" branch */
+
+ /*
+ ** If we reach here, then we were passed a handshake version number we don't know about.
+ ** This shouldn't ever happen since our main() routine chose the version number.
+ */
+ return false;
+} \ No newline at end of file
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.h
new file mode 100644
index 0000000..8902caa
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/PDF-AS.SigHandler.h
@@ -0,0 +1,22 @@
+/*********************************************************************
+
+ PDF-AS.SigHandler.h
+
+*********************************************************************/
+
+#ifndef PDFAS_HANDLER_H
+#define PDFAS_HANDLER_H
+
+#include "PIHeaders.h"
+
+#define PDFAS_HANDLER_CURRENT_VERSION 1
+#define PDFAS_HANDLER_NAME "Adobe.PDF-AS"
+
+void RegisterFHandler();
+void DSRegisterSignatureHandler();
+
+static ACCBPROTO1 void ACCBPROTO2 DSDocOpen(PDDoc pdDoc);
+static ACCBPROTO1 DSValidState ACCBPROTO2 DSValidateSig(PDDoc pdDoc, CosObj sigField, CosObj sigAnnot);
+static ACCBPROTO1 ASBool ACCBPROTO2 DSCanValidate(PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASAtom filter );
+
+#endif // PDFAS_HANDLER_H
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AFTTS_Sel.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AFTTS_Sel.h
new file mode 100644
index 0000000..ace7043
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AFTTS_Sel.h
@@ -0,0 +1,54 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2008 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AFTTS_Sel.h
+
+ - Selectors for all AcroTTS HFT functions.
+
+*********************************************************************/
+
+#ifndef _H_AFTTS_SEL
+#define _H_AFTTS_SEL
+
+
+/** Notification callback for TTS routines.
+ @see AFTTSSetNotify
+*/
+typedef ACCB1 void (ACCB2 AFTTSNotifyProc)();
+
+
+/* For creating selector (index to HFT)
+*/
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+
+enum
+{
+ AcroTTSFirst_SEL = 0,
+#include "TtsHFTProcs.h"
+ AcroTTSLast_SEL
+};
+#undef PIPROC
+
+#define AcroTTSNum_SEL AcroTTSLast_SEL - 1
+#define AcroTTSHFT_NAME "TTS"
+#define AcroTTSHFT_LATEST_VERSION (0x00010012)
+
+/* Define API/Function prototypes
+*/
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+
+#include "TtsHFTProcs.h"
+#undef PIPROC
+
+#endif /* _H_AFTTS_SEL } */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_ExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_ExpT.h
new file mode 100644
index 0000000..1ae30be
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_ExpT.h
@@ -0,0 +1,704 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AF_ExpT.h
+
+ - Public data types and structures to handle Acrobat Forms objects.
+
+*********************************************************************/
+
+#ifndef _H_AF_ExpT /* { */
+#define _H_AF_ExpT
+
+#include "CoreExpT.h"
+#include "CosExpT.h"
+#include "ASExpT.h"
+#ifndef HEADLESS_PDFDRIVER
+#include "AVExpT.h"
+#endif
+#include "PDExpT.h"
+#include "ASExtraExpT.h"
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+/*****************************************************************************
+ Callback names
+*****************************************************************************/
+#ifndef AcroCallback /* { */
+#define AcroCallback(type) ACCB1 type ACCB2
+#endif /* } */
+
+#ifdef __cplusplus
+typedef class CPDField* CPDField_P;
+typedef class CWidget* CWidget_P;
+typedef class CAgg* CAgg_P;
+#else
+typedef struct CPDField* CPDField_P;
+typedef struct CWidget* CWidget_P;
+typedef struct CAgg* CAgg_P;
+#endif
+
+/*****************************************************************************
+ Return Values from procedures
+*****************************************************************************/
+typedef enum {Good = 0, Bad, Failed, GoodKeepFDF } RetCode;
+#define CB_RetCode AcroCallback(RetCode)
+
+/*****************************************************************************
+ This is the character used to separate segments of a composed name.
+ For example, "xx.yy" is the name of the field yy in the xx hierarchy.
+*****************************************************************************/
+#define NameSeparator '.'
+#define NameSeparatorStr "."
+
+/*****************************************************************************
+ Acrobat Form handler (opaque) definition
+*****************************************************************************/
+typedef OPAQUE_64_BITS AcroForm;
+#define CB_AcroForm AcroCallback(AcroForm)
+
+/*****************************************************************************
+ Acrobat Forms Field handler (opaque) definition.
+*****************************************************************************/
+/** A PDField is an opaque object representing a field in an Acrobat form.
+ The three most important properties of a field are its type, name, and value. Other
+ properties specify the appearance of a field. Fields can be organized into a hierarchy,
+ and other field properties associate it with its parent and children.
+
+ <p>There is a field dictionary for every PDField. Acrobat uses annotations to represent a
+ field's appearance and to manage user interactions. A PDField dictionary may also
+ be an annotation, in which case its subtype is Widget. There is no ambiguity, because
+ the keys of annotations and PDField objects do not overlap.</p>
+
+ <p>PDField objects are not created until needed. This saves memory and enhances
+ performance.</p>
+
+ <p>Suppose, for example, a PDF file represents a 100-page catalog, where a purchase
+ order is on the last page. PDField objects are not created for all the elements in the
+ purchase order when the document is opened. When the user displays the purchase
+ order, the annotation handler draws the field announcements and creates the
+ PDField objects for form fields.</p>
+
+ <p>When the annotation handler creates a PDField, it typically displays a page that
+ contains the field.</p>
+*/
+#define PDField CPDField_P
+#define CB_PDField AcroCallback(PDField)
+
+/*****************************************************************************
+ Types of FormField Flags
+ Flags_Annot are flags defined in the /F key of the annotation
+ Flags_Field are defined in the /Ff key of the FormField and apply to any FormField
+*****************************************************************************/
+/** The type of flag to be set in AFPDFieldSetFlags(). If Flags_Annot,
+ SetFlagsAnnot, or ClrFlagsAnnot is specified and the PDField is not an
+ annotation, no flags are changed.
+
+ <p>See the <i>PDF Reference</i> for more information on flags used for annotations.</p>
+
+ @see AFPDFieldSetFlags
+*/
+typedef enum {
+ /** Sets the flags defined in the F key of the annotation to the
+ values specified in the <code>flags</code> parameter of AFPDFieldSetFlags().
+ */
+ Flags_Annot = 0,
+ /** Sets the flags defined in the Ff key of the form field to the
+ values specified in the <code>flags</code> parameter of AFPDFieldSetFlags().
+ */
+ Flags_Field,
+ /** Sets the bits in the flags to those that are <code>1</code>s in the <code>flags</code>
+ parameter of AFPDFieldSetFlags().
+ */
+ SetFlagsAnnot,
+ /** Clears the bits in the flags to those that are <code>1</code>s in the <code>flags</code>
+ parameter of AFPDFieldSetFlags().
+ */
+ ClrFlagsAnnot,
+ /** Sets the bits in the flags to those that are <code>1</code>s in the <code>flags</code>
+ parameter of AFPDFieldSetFlags().
+ */
+ SetFlagsField,
+ /** Clears the bits in the flags to those that are <code>1</code>s in the <code>flags</code>
+ parameter of AFPDFieldSetFlags().
+ */
+ ClrFlagsField,
+ /** Does not change any flags for the field or annot.
+ */
+ Flags_Ignore
+} AF_Flags_t;
+
+/*****************************************************************************
+ FormField Flags Definition
+*****************************************************************************/
+/** Used for the value of <code>flags</code> set by AFPDFieldSetFlags. */
+typedef ASUns32 AFPDFieldFlags_t;
+#define CB_AFPDFieldFlags_t AcroCallback(AFPDFieldFlags_t)
+
+#define Clear_F ((AFPDFieldFlags_t)0x00000000)
+
+/*****************************************************************************
+ FormField Flags Definition that apply to all FormField types
+ The following flags are stored in the /Ff object of the FormField dictionary.
+*****************************************************************************/
+#define AllFieldMask_F ((AFPDFieldFlags_t)0x00000FFF)
+
+#define AFAVignore_F ((AFPDFieldFlags_t)0x00000001)
+#define Required_F ((AFPDFieldFlags_t)0x00000002)
+#define NoExport_F ((AFPDFieldFlags_t)0x00000004) /* won't export its value */
+
+/*****************************************************************************
+ FormField Flags Definition that apply to a single field type
+ The following flags are stored in the /Ff object of the FormField dictionary.
+*****************************************************************************/
+
+/* Text FormFields */
+#define MultiLine_F ((AFPDFieldFlags_t)0x00001000)
+#define Password_F ((AFPDFieldFlags_t)0x00002000) /* Single line text fields only */
+#define FileSelect_F ((AFPDFieldFlags_t)0x00100000) /* Single line text fields only */
+#define DoNotSpellCheck_F ((AFPDFieldFlags_t)0x00400000) /* Applicable to editable combo boxes too */
+#define DoNotScroll_F ((AFPDFieldFlags_t)0x00800000)
+#define Comb_F ((AFPDFieldFlags_t)0x01000000)
+#define RichText_F ((AFPDFieldFlags_t)0x02000000) /* Note: the PDF 1.5 spec says this is bit 28, it is really bit 26 and overlaps with
+ RadiosInUnison_F */
+
+/* Button FormFields */
+#define StayPushed_F ((AFPDFieldFlags_t)0x00004000)
+#define Radio_F ((AFPDFieldFlags_t)0x00008000)
+#define Push_F ((AFPDFieldFlags_t)0x00010000)
+
+/* If on, this bit makes radio buttons work like in Acrobat 4, where multiple radio buttons (belonging to the
+** same field) will turn on and off in unison if they have the same export value. By contrast, with Acrobat 5,
+** radio buttons are always mutually exclusive, like in HTML */
+#define RadiosInUnison_F ((AFPDFieldFlags_t)0x02000000)
+
+/* Choice FormFields */
+#define PopUp_F ((AFPDFieldFlags_t)0x00020000)
+#define Editable_F ((AFPDFieldFlags_t)0x00040000)
+#define OptionsSorted_F ((AFPDFieldFlags_t)0x00080000)
+#define MultipleSelection_F ((AFPDFieldFlags_t)0x00200000)
+#define CommitOnSelChange_F ((AFPDFieldFlags_t)0x04000000) /* http://hypermail.corp.adobe.com/mail-archive/acrobat6/msg00124.html */
+
+/* Text FormFields - additions */
+
+#define ParDirectionRTL_F ((AFPDFieldFlags_t)0x10000000) /* If set the Paragraph direction is right to left, otherwise it is left to right */
+
+
+/*****************************************************************************
+ FormField General Appearance definitions
+*****************************************************************************/
+/** Form field appearance definitions for the outside border of an annotation.
+ @see AFLayoutBorder
+*/
+typedef enum {
+ /** Strokes the entire perimeter of the widget with a solid line. */
+ AFPDWBSolid = 0,
+ /** Strokes the entire perimeter of the widget with a dashed line. */
+ AFPDWBDashed,
+ /** Equivalent to the AFPDWBSolid style with an additional beveled
+ (pushed-out appearance) border applied inside the solid border.
+ */
+ AFPDWBBeveled,
+ /** Equivalent to the AFPDWBBeveled style with an additional beveled
+ (pushed-in appearance) border applied inside the solid border.
+ */
+ AFPDWBInset,
+ /** Strokes the bottom portion of the widget with a underline styled line. */
+ AFPDWBUnderline,
+ /** Do not change the border. */
+ AFPDWBInvalid
+} AFPDWidgetBorderStyle;
+
+/** Form field appearance definitions for the outside border of an annotation.
+ @see AFLayoutBorder
+ @see AFLayoutText
+ @see AFPDWidgetGetBorder
+ @see AFPDWidgetSetBorder
+*/
+typedef struct _AFPDWidgetBorderRec
+{
+ /** The style of the border. The possible types are solid, dashed, beveled,
+ inset, and underline.
+ @see AFPDWidgetBorderStyle.
+ */
+ AFPDWidgetBorderStyle nStyle;
+ /** The width of the border. */
+ ASInt32 nWidth;
+} AFPDWidgetBorderRec, *AFPDWidgetBorder;
+
+/** Field border data type.
+ @see AFLayoutBorder
+ @see AFLayoutText
+ @see AFPDWidgetGetBorder
+ @see AFPDWidgetSetBorder
+*/
+typedef AFPDWidgetBorderRec AFPDFieldBorder;
+
+typedef enum {
+ AFPDWPTextOnly = 0,
+ AFPDWPIconOnly,
+ AFPDWPIconOverText,
+ AFPDWPTextOverIcon,
+ AFPDWPIconText,
+ AFPDWPTextIcon,
+ AFPDWPTextInIcon,
+ AFPDWPInvalid
+} AFPDWidgetPosition;
+
+/*****************************************************************************
+ Text Appearance and Quadding definitions
+*****************************************************************************/
+#define LeftQ (ASUns16)0 /* Default quadding value */
+#define CenterQ (ASUns16)1
+#define RightQ (ASUns16)2
+
+enum { Fill_text=0, Stroke_text=1, FnS_text=2, Invisible_text=3 } ;
+
+/* Options for Middle Eastern scripts */
+/** The default paragraph direction is right to left. */
+#define kAFOptionsR2LDirection ((ASUns32)0x0001)
+
+
+enum
+{
+ kAFAlign_Left,
+ kAFAlign_Center,
+ kAFAlign_Right,
+ kAFAlign_Justify,
+ kAFAlign_JustifyAll
+};
+typedef ASEnum8 AFHorizontalAlign;
+
+enum
+{
+ kAFAlign_Top,
+ kAFAlign_Middle,
+ kAFAlign_Bottom
+};
+typedef ASEnum8 AFVerticalAlign;
+
+typedef struct {
+ /** The size of the structure. Clients must initialize with the size of the structure. */
+ size_t size;
+
+ /** The default font name. */
+ ASText fontName;
+
+ /** The point size of the text. When it is <code>fixedZero</code>, it enables text autosizing. */
+ ASReal textSize;
+
+ /** The text justification. */
+ AFHorizontalAlign horizontalAlignment;
+
+ /** The vertical Alignment */
+ AFVerticalAlign verticalAlignment;
+
+ /** The text color. */
+ PDColorValueRec fillColor;
+
+ /** Options.
+ @see kAFOptionsR2LDirection
+ */
+ ASUns32 options;
+
+ /** Native Zero digit. */
+ ASUnicodeChar nativeZeroDigit;
+
+} AFTextAttributesRec, *AFTextAttributesP;
+
+/** A structure containing information about the text appearance of a field.
+
+ @see Init_TextAppearanceP
+
+*/
+
+/* ADD new entries at the end */
+typedef struct {
+ /** The spacing between characters. */
+ ASFixed charSpacing;
+ /** The spacing between words. */
+ ASFixed wordSpacing;
+ /** The horizontal scale. */
+ ASFixed horizontalScale;
+ /** The leading. */
+ ASFixed leading;
+ /** The text rise. */
+ ASFixed textRise;
+ /** The point size of the text. When it is <code>fixedZero</code>, it enables text autosizing. */
+ ASFixed textSize;
+ /** The font matrix. */
+ ASFixedMatrix textMatrix;
+ /** The pen color. */
+ PDColorValueRec strokeColor;
+ /** The fill color. */
+ PDColorValueRec fillColor;
+ /** The mode. */
+ ASUns16 renderMode;
+ /** The text justification. */
+ ASUns16 quadding;
+ /** The default font name. */
+ ASAtom baseFont;
+ /** The current font name. */
+ ASAtom nameFont;
+ /** Options.
+ @see kAFOptionsR2LDirection
+ @note New in Acrobat 7.0.
+ */
+ ASUns32 options;
+ /** Native Zero digit.
+ @note New in Acrobat 7.0.
+ */
+ ASUnicodeChar nativeZeroDigit;
+
+}TextAppearance_t, *TextAppearanceP;
+
+#define AutoSize fixedZero
+
+/** Macro for setting text appearance.*/
+#define Init_TextAppearanceP(aP) {\
+ memset(aP, 0, sizeof(TextAppearance_t));\
+ (aP)->baseFont = ASAtomNull;\
+ (aP)->nameFont = ASAtomNull;\
+}
+
+/** Macro for setting text appearance. This macro uses Helvetica as the default font. */
+#define SetDefault_TextAppearanceP(aP) {\
+ memset(aP, 0, sizeof(TextAppearance_t)); \
+ (aP)->baseFont = ASAtomFromString("Helvetica");\
+ (aP)->nameFont = ASAtomNull;\
+ (aP)->textSize = AutoSize;\
+ (aP)->horizontalScale = fixedHundred;\
+ (aP)->renderMode = Fill_text;\
+ (aP)->fillColor.space = PDDeviceGray;\
+ (aP)->textMatrix.a = fixedOne;\
+ (aP)->textMatrix.d = fixedOne;\
+ (aP)->quadding = LeftQ;\
+ (aP)->nativeZeroDigit = 0x0030;\
+}
+
+/** Macro for checking whether a text appearance is valid. */
+#define TextApperanceIsValid(aP) (\
+ (aP)->quadding <= RightQ && \
+ (aP)->renderMode <= Invisible_text && \
+ (aP)->baseFont != ASAtomNull && \
+ (aP)->textSize >= AutoSize)
+
+
+/*****************************************************************************
+ Listbox and Combobox Choices
+*****************************************************************************/
+/* _ESTRREC
+** Use define to stop "Warning : identifier 'EStr' redeclared" for strict compilers.
+** This same typedef in also in "miEStr.h".
+*/
+#ifndef _ESTRREC
+#define _ESTRREC
+typedef struct _EStrRec *EStr;
+typedef const struct _EStrRec *EConstStr;
+#endif
+
+/*****************************************************************************
+ AcroForms Notification Server
+*****************************************************************************/
+/** Deprecated as of Acrobat 8.0. */
+typedef ACCBPROTO1 void (ACCBPROTO2 *AF_NotificationProc)(void *info, void *clientData);
+/** Deprecated as of Acrobat 8.0. */
+typedef ACCBPROTO1 void (ACCBPROTO2 *AF_NotificationFailureProc)(ASInt32 error, void *info, void *clientData);
+
+/*****************************************************************************
+ AcroForms Notification server index definition and arguments
+
+ These are the arguments in AF_NtfyParams_t which are applicable:
+
+ FieldValueWillChange : pdd, pCPDFld, esValue, rc
+ FieldValueDidChange : pdd, pCPDFld, esValue
+ AcroFormWasCreated : pdd
+
+ Note that renaming a field results in FieldWillBeRemoved followed by FieldWasAdded
+ FieldWasAdded : pdd, pCPDFld, pCWidget and pdAnnot (for the specific annot that was added)
+ FieldWillBeRemoved : pdd, pCPDFld, pCWidget and pdAnnot (for the specific annot that will be removed)
+ FieldChangedType : pdd, pCPDFld, asaFieldType (the previous type)
+ FieldValidateChange : pdd, pCPDFld, esValue, esChange, nSelStart, nSelEnd, rc, style, fieldFull, esChangeEx
+ FieldWillGenerateDisplay : pdd, pCPDFld, esValue
+ FDFWillImport : cd, rc. Set rc to 0 if you handled the FDF, and Forms doesn't need to. If you
+ return rc equal to 0, you can additionally OR it with KeepFDF_F if you don't
+ want Forms to delete the FDF.
+ FDFWillImportHaveDoc : pdd, cd, rc. Set rc to 0 if you handled the FDF, and Forms doesn't need to.
+ Regardless of whether you set rc to 0 or 1, OR it with KeepFDF_F if you
+ *did* handle the FDF, but still want Forms to keep the FDF around for
+ re-import, which is important in the scenario that we are running in
+ the browser, and the user leaves the web page containing the PDF, in
+ case the user later should return to that same page).
+
+ FDFWillExport : pdd, cd, nSubmitFlags. When Forms sends this notification, cd will be NULL.
+ The first listener who gets the notification and acts on it will need to
+ create the FDF and set cd. If the FDF that is about to be created
+ will be used simply as an intermediate step for XML export, then this
+ notification will include the argument "cos2XMLEngine", else that
+ field in params will be NULL.
+
+ XFDFWillImport : cd (CosDoc for the FDF being created from the XFDF), cos2XMLEngine
+
+ TextFieldSelectionDidChange : pCPDField, pCWidget, nSelStart, nSelEnd, nCursorPos,
+ cValue (Unicode (Host Endian) bytes of field value),
+ len (length of cValue in bytes),
+ avPageView (pageView containing the AVTE),
+ pdAnnot
+ FieldAttributeDidChange : pdd, pCPDFld, pCWidget, pdAnnot,
+ asaFieldType (this is the ASAtom of the attribute that changed)
+ TextFieldValueDidChange : pCPDField, pCWidget, nSelStart, nSelEnd, nCursorPos,
+ cValue (Unicode (Host Endian) bytes of field value),
+ len (length of cValue in bytes),
+ avPageView (pageView containing the AVTE),
+ pdAnnot
+ DynamicDocWillRender : pdd
+ DynamicDocDidRender : pdd
+ ContextSelectionDidChange : pdd
+
+ Note: In all cases, the sender of the notification is responsible for deleting any EStrs
+
+*****************************************************************************/
+
+/** Deprecated as of Acrobat 8.0. */
+typedef enum {
+ /** */
+ FieldValueWillChange = (ASInt32)0,
+ /** */
+ FieldValueDidChange,
+ /** */
+ AcroFormWasCreated,
+ /** */
+ FieldWasAdded,
+ /** */
+ FieldWillBeRemoved,
+ /** */
+ FieldChangedType,
+ /** */
+ FieldValidateChange,
+ /** */
+ FieldWillGenerateDisplay,
+ FDFWillImport,
+ /** */
+ FDFWillImportHaveDoc,
+ /** */
+ FDFWillExport,
+ /** */
+ XFDFWillImport,
+ /** */
+ TextFieldSelectionDidChange,
+ /** */
+ FieldAttributeDidChange,
+ /** */
+ TextFieldValueDidChange,
+ /** */
+ DynamicDocWillRender,
+ /** */
+ DynamicDocDidRender,
+ /** */
+ ContextSelectionDidChange,
+ /** */
+ AcroFormNumNotifications /* Always last */
+} AF_NotificationSelector_t;
+
+/** Deprecated as of Acrobat 8.0. */
+typedef struct {
+ /** */
+ PDDoc pdd;
+ /** */
+ CPDField_P pCPDFld;
+ /** */
+ CWidget_P pCWidget;
+ /** */
+ struct _EStrRec* esValue;
+ /** */
+ struct _EStrRec* esChange;
+ /** */
+ struct _EStrRec* esChangeEx;
+ /** */
+ ASBool fieldFull;
+ union
+ {
+ /** */
+ ASInt32 nSelStart;
+ /** */
+ ASUns32 nSubmitFlags;
+ };
+ /** */
+ ASInt32 nSelEnd;
+ /** */
+ RetCode rc;
+ /** */
+ CosDoc cd;
+ /** */
+ ASAtom asaFieldType;
+ /** */
+ void* cos2XMLEngine;
+ /** */
+ const char* cValue;
+ /** */
+ ASInt32 len;
+ /** */
+ ASInt32 nCursorPos;
+#ifndef HEADLESS_PDFDRIVER
+ /** */
+ AVPageView avPageView;
+#endif
+ /** */
+ PDAnnot pdAnnot;
+
+ /** */
+ CAgg_P richChange;
+ /** */
+ CAgg_P richChangeEx;
+ /** */
+ CAgg_P richValue;
+ /** */
+ ASBool bModified;
+} AF_NtfyParams_t;
+
+
+/*****************************************************************************
+ Type for the callback procedures
+*****************************************************************************/
+/** Callback used by AFPDDocEnumPDFields(). It is called once for each PDField in a form.
+ @return <code>true</code> to continue the enumeration, <code>false</code> to halt the enumeration.
+ @param fldP IN The PDField currently being enumerated.
+ @param clientData IN/OUT User-supplied data passed in the call to AFPDDocEnumPDFields().
+ @see AFPDDocEnumPDFields
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AFPDFieldEnumProc)(PDField fldP, void *clientData);
+
+/*****************************************************************************
+ Flags for the Submit Form action
+*****************************************************************************/
+typedef ASUns32 ActionFlags_t;
+#define InclOrExcl_F ((ActionFlags_t)0x0001)
+#define InclEmpty_F ((ActionFlags_t)0x0002)
+#define UrlEnc_F ((ActionFlags_t)0x0004)
+#define GetMethod_F ((ActionFlags_t)0x0008)
+#define SubmitCoords_F ((ActionFlags_t)0x0010)
+#define XFDF_Enc_F ((ActionFlags_t)0x0020)
+#define InclAppendSaves_F ((ActionFlags_t)0x0040)
+#define InclAnnotations_F ((ActionFlags_t)0x0080)
+#define SubmitPDF_F ((ActionFlags_t)0x0100)
+#define CanonicalFormat_F ((ActionFlags_t)0x0200)
+#define ExclNonUserAnnots_F ((ActionFlags_t)0x0400)
+#define ExclFKey_F ((ActionFlags_t)0x0800)
+#define XDP_Enc_F ((ActionFlags_t)0x1000)
+#define EmbedForm_F ((ActionFlags_t)0x2000)
+#define InclNMKey_F ((ActionFlags_t)0x4000)
+#define XML_Enc_F ((ActionFlags_t)0x8000)
+#define XFD_Enc_F ((ActionFlags_t)0x10000)
+#define URL_Enc_F ((ActionFlags_t)0x20000)
+
+/*****************************************************************************
+ ExportAsFDFParams
+ Used in the call to ExportAsFDFWithParams
+*****************************************************************************/
+#ifndef HEADLESS_PDFDRIVER
+/** A parameter block used in the call to ExportAsFDFWithParams(). */
+typedef struct _t_ExportAsFDFParams {
+ /** The size of the data structure. It must be set to <code>sizeof(ExportAsFDFParamsRec)</code>.
+ */
+ ASSize_t size;
+ /** The AVDoc for the form from which you want to export the data.
+ You can pass <code>NULL</code> if the document does not have an AVDoc
+ (that is, it is open only at the PD level).
+ */
+ AVDoc avForm;
+ /** The PDDoc for the form from which you want to export the data. */
+ PDDoc pdForm;
+ /** If <code>rgIncExcFlds</code> is CosNewNull(), then all fields are exported, and
+ <code>bIncl</code> is ignored. If it is a CosArray, then the array elements may be:
+
+ <ul>
+ <li> Names of fields (the names may be of non-terminal fields, which is a
+ fast and easy way to cause all their children to be included in the FDF). </li>
+ <li> Arrays whose first element is a field name whose remaining elements are
+ field dictionary key names whose values should be
+ exported in the FDF. For example: <code>[ (My listbox) /AP /Opt ]</code> </li>
+ <li> If rgIncExcFlds contains a single element, which is itself
+ an array as described above, and its first element, which
+ corresponds to the field name, is <code>NULL</code>, then the FDF will
+ include the requested field properties of all fields.
+ For example, <code>[ null /F /Ff ]</code> </li>
+ </ul>
+
+ <p>This variety of <code>rgIncExcFlds</code> array element can only be used if
+ <code>bIncl</code> is <code>true</code>. </p>
+ */
+ CosObj rgIncExcFlds;
+ /** If <code>true</code>, then <code>rgIncExcFlds</code> is an array of the fields to export. Otherwise,
+ <code>rgIncExcFlds</code> is an array of the fields to exclude from exporting.
+ */
+ ASBool bIncl;
+ /** If <code>true</code>, then all fields selected per the criteria above are exported.
+ Otherwise those that have no value are excluded.
+ */
+ ASBool bEmpty;
+ /** If <code>true</code>, the FDF text fields that have the
+ <code>"password"</code> flag set will not be included.
+ */
+ ASBool bExcludePasswd;
+ /** If <code>true</code>, an alert pops up if any required field is empty. */
+ ASBool bCheckReqd;
+ /** Encoding to use in the produced FDF file for the value of the V
+ entry when it is a string. If ASAtomNull is passed, then
+ ExportAsFDF() will determine which encoding to use. If
+ PDFDocEncoding is passed, then do not perform any encoding
+ conversions and simply send V as is (which means as
+ PDFDocEncoding or Unicode).
+
+ <p>Other allowed values are Shift_JIS, BigFive, GBK, and
+ UHC.</p>
+ */
+ ASAtom asaEncoding;
+ /** The path where the FDF file will be saved (by the client) after it is
+ produced (by ExportAsFDFWithParams()). You need this in
+ order to create an FDF file with an /F key that gives the relative
+ path to the form from the location where the FDF file will be
+ saved. Pass <code>NULL</code> if you want an absolute pathname.
+ */
+ ASPathName fdfPath;
+ /** Corresponding file system for <code>fdfPath</code>.
+ */
+ ASFileSys fdfFilesys;
+ /** A <code>NULL</code>-terminated string containing the name of the button
+ used to submit. If the value passed is not <code>NULL</code>, then the FDF file
+ will include a field dictionary corresponding to the submit
+ button, which will only contain one key, namely /T. This
+ dictionary is no different than the one you get when an
+ AcroForm has an empty text field (that is, no Value), and
+ <code>bEmpty</code> is <code>true</code>.
+ */
+ char* submitBtnName;
+} ExportAsFDFParamsRec, *ExportAsFDFParams;
+#endif // ndef HEADLESS_PDFDRIVER
+
+typedef void* ScriptingData; // Deprecated
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_AF_ExpT } */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_Sel.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_Sel.h
new file mode 100644
index 0000000..ee2da5e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AF_Sel.h
@@ -0,0 +1,54 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AF_Sel.h
+
+ - Selectors for all AcroForm HFT functions.
+
+*********************************************************************/
+
+#ifndef _H_AF_SEL
+#define _H_AF_SEL
+
+#include "AF_ExpT.h"
+
+/* For creating selector (index to HFT)
+*/
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+#define NOPROC(name) name##_SEL,
+
+enum
+{
+ AcroFormFirst_SEL = 0,
+#include "FormsHFTProcs.h"
+ AcroFormLast_SEL
+};
+#undef PIPROC
+#undef NOPROC
+
+
+#define AcroFormNum_SEL AcroFormLast_SEL - 1
+#define AcroFormHFT_NAME "Forms"
+#define AcroFormHFT_LATEST_VERSION (0x00010002)
+
+/* Define API/Function prototypes
+*/
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+#define NOPROC(name)
+#include "FormsHFTProcs.h"
+#undef PIPROC
+#undef NOPROC
+
+
+#endif /* _H_AF_SEL } */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASCalls.h
new file mode 100644
index 0000000..35d2f08
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASCalls.h
@@ -0,0 +1,522 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_ASCalls
+#define _H_ASCalls
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _ASCallsHFT_LATEST_VERSION 0x00090000
+#define _ASCallsHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _ASCallsHFT_IS_BETA 0
+
+/* for public use */
+#define ASCallsHFT_LATEST_VERSION (_ASCallsHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _ASCallsHFT_LATEST_VERSION) : _ASCallsHFT_LATEST_VERSION)
+
+#define ASCallsHFT_VERSION_2 0x00020000
+#define ASCallsHFT_VERSION_2_2 0x00020002
+#define ASCallsHFT_VERSION_4 0x00040000
+#define ASCallsHFT_VERSION_5 0x00050000
+#define ASCallsHFT_VERSION_6 0x00060000
+#define ASCallsHFT_VERSION_7 0x00070000
+#define ASCallsHFT_VERSION_8 0x00080000
+#define ASCallsHFT_VERSION_9 ASCallsHFT_LATEST_VERSION
+
+#include "ASExpT.h"
+#include "CorCalls.h" /* For ASCallbackCreateProto */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NPROC /* may be already defined */
+#undef NPROC
+#endif
+
+#if !PLUGIN
+ /* Static link */
+
+ /* These functions are exported with different names */
+ #define ASFileSysCopyPath ASFileSysCopyPathName
+ #define ASFileSysReleasePath ASFileSysReleasePathName
+ #define ASFileSysRemoveFile ASFileSysRemove
+ #define ASGetSecs ASSecs
+
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define SPROC(returnType, name, params, stubProc) \
+ extern ACEX1 returnType ACEX2 name params;
+
+ #include "ASProcs.h"
+
+ #undef NPROC
+ #undef SPROC
+
+#endif /* !PLUGIN */
+
+#if PLUGIN
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define SPROC(returnType, name, params, stubProc) \
+ name##SEL,
+
+ enum {
+ ASBAD_SELECTOR,
+ #include "ASProcs.h"
+ ASNUMSELECTORSplusOne
+ };
+
+ #define ASNUMSELECTORS (ASNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef SPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define SPROC(returnType, name, params, stubProc) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+
+ #include "ASProcs.h"
+ #undef NPROC
+ #undef SPROC
+
+#if PI_ACROSUPPORT_VERSION != 0
+#ifdef THREAD_SAFE_PDFL
+ #define gAcroSupportHFT (GetHFTLocations()->acroSupportHFT)
+ #define gAcroSupportVersion (GetHFTLocations()->acroSupportVersion)
+#else
+ extern HFT gAcroSupportHFT;
+ extern ASVersion gAcroSupportVersion;
+#endif
+
+#if !STATIC_HFT
+#define ASSERT_AS_VER(X) (ACROASSERT(gAcroSupportHFT),ACROASSERT(gAcroSupportVersion>=X))
+
+/* ASmalloc */
+#define ASmalloc (ASSERT_AS_VER(0),*((ASmallocSELPROTO)(gAcroSupportHFT[ASmallocSEL])))
+
+/* ASrealloc*/
+#define ASrealloc (ASSERT_AS_VER(0),*((ASreallocSELPROTO)(gAcroSupportHFT[ASreallocSEL])))
+
+/* ASfree */
+#define ASfree (ASSERT_AS_VER(0),*((ASfreeSELPROTO)(gAcroSupportHFT[ASfreeSEL])))
+
+
+/* ASGetErrorString */
+#define ASGetErrorString (ASSERT_AS_VER(0),*((ASGetErrorStringSELPROTO)(gAcroSupportHFT[ASGetErrorStringSEL])))
+
+/* ASRegisterErrorString */
+#define ASRegisterErrorString (ASSERT_AS_VER(0),*((ASRegisterErrorStringSELPROTO)(gAcroSupportHFT[ASRegisterErrorStringSEL])))
+
+
+/* HFTServerNew */
+#define HFTServerNew (ASSERT_AS_VER(0),*((HFTServerNewSELPROTO)(gAcroSupportHFT[HFTServerNewSEL])))
+
+/* HFTServerDestroy */
+#define HFTServerDestroy (ASSERT_AS_VER(0),*((HFTServerDestroySELPROTO)(gAcroSupportHFT[ HFTServerDestroySEL])))
+
+
+/* HFTNew */
+#define HFTNew (ASSERT_AS_VER(0),*((HFTNewSELPROTO)(gAcroSupportHFT[ HFTNewSEL])))
+
+/* HFTDestroy */
+#define HFTDestroy (ASSERT_AS_VER(0),*((HFTDestroySELPROTO)(gAcroSupportHFT[HFTDestroySEL])))
+
+/* HFTReplaceEntry
+** Replace the entry in the given HFTEntry for the given selector with the newEntry.
+** Use ASCallbackCreateReplacement to create newEntry. Currently, only the lowest
+** bit of "flags" is meaningful: it is HFTEntryReplaceable if the new entry is to
+** be, like the old one, replaceable, or 0 if you want this replacement to be
+** unreplaceable. Usually you should use HFTEntryReplaceable.
+*/
+#define HFTReplaceEntry (ASSERT_AS_VER(0),*((HFTReplaceEntrySELPROTO)(gAcroSupportHFT[HFTReplaceEntrySEL])))
+
+/* HFTGetReplacedEntry
+** Retrieves the HFTEntry that newEntry replaced. Make sure newEntry is the value
+** that you passed into HFTReplaceEntry as "newEntry"--in other words, the ASCallback
+** you created, not a pointer to a function you passed into ASCallbackCreate().
+*/
+#define HFTGetReplacedEntry (*((HFTGetReplacedEntrySELPROTO)(gAcroSupportHFT[HFTGetReplacedEntrySEL])))
+
+/* ASFixedMul */
+#define ASFixedMul (ASSERT_AS_VER(0),*((ASFixedMulSELPROTO)(gAcroSupportHFT[ASFixedMulSEL])))
+
+/* ASFixedDiv */
+#define ASFixedDiv (ASSERT_AS_VER(0),*((ASFixedDivSELPROTO)(gAcroSupportHFT[ASFixedDivSEL])))
+
+/* ASFixedToCString */
+#define ASFixedToCString (ASSERT_AS_VER(0),*((ASFixedToCStringSELPROTO)(gAcroSupportHFT[ASFixedToCStringSEL])))
+
+/* ASCStringToFixed */
+#define ASCStringToFixed (ASSERT_AS_VER(0),*((ASCStringToFixedSELPROTO)(gAcroSupportHFT[ASCStringToFixedSEL])))
+
+
+/* ASFixedMatrixConcat */
+#define ASFixedMatrixConcat (ASSERT_AS_VER(0),*((ASFixedMatrixConcatSELPROTO)(gAcroSupportHFT[ASFixedMatrixConcatSEL])))
+
+/* ASFixedMatrixInvert */
+#define ASFixedMatrixInvert (ASSERT_AS_VER(0),*((ASFixedMatrixInvertSELPROTO)(gAcroSupportHFT[ASFixedMatrixInvertSEL])))
+
+/* ASFixedMatrixTransform */
+#define ASFixedMatrixTransform (ASSERT_AS_VER(0),*((ASFixedMatrixTransformSELPROTO)(gAcroSupportHFT[ASFixedMatrixTransformSEL])))
+
+/* ASFixedMatrixTransformRect */
+#define ASFixedMatrixTransformRect (ASSERT_AS_VER(0),*((ASFixedMatrixTransformRectSELPROTO)(gAcroSupportHFT[ASFixedMatrixTransformRectSEL])))
+
+
+/* ASPathFromPlatformPath */
+#define ASPathFromPlatformPath (ASSERT_AS_VER(0),*((ASPathFromPlatformPathSELPROTO)(gAcroSupportHFT[ASPathFromPlatformPathSEL])))
+
+
+/* ASGetDefaultFileSys */
+#define ASGetDefaultFileSys (ASSERT_AS_VER(0),*((ASGetDefaultFileSysSELPROTO)(gAcroSupportHFT[ASGetDefaultFileSysSEL])))
+
+/* ASGetTempFileSys */
+#define ASGetTempFileSys (*((ASGetTempFileSysSELPROTO)(gAcroSupportHFT[ASGetTempFileSysSEL])))
+
+/* ASSetTempFileSys */
+#define ASSetTempFileSys (*((ASSetTempFileSysSELPROTO)(gAcroSupportHFT[ASSetTempFileSysSEL])))
+
+/* ASGetRamFileSys */
+#define ASGetRamFileSys (*((ASGetRamFileSysSELPROTO)(gAcroSupportHFT[ASGetRamFileSysSEL])))
+
+/* ASRamFileSysSetLimitKB */
+#define ASRamFileSysSetLimitKB (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASRamFileSysSetLimitKBSELPROTO)(gAcroSupportHFT[ASRamFileSysSetLimitKBSEL])))
+
+/* ASFileSysDIPathFromPath */
+#define ASFileSysDIPathFromPath (ASSERT_AS_VER(0),*((ASFileSysDIPathFromPathSELPROTO)(gAcroSupportHFT[ASFileSysDIPathFromPathSEL])))
+
+/* ASFileSysPathFromDIPath */
+#define ASFileSysPathFromDIPath (ASSERT_AS_VER(0),*((ASFileSysPathFromDIPathSELPROTO)(gAcroSupportHFT[ASFileSysPathFromDIPathSEL])))
+
+/* ASFileSysCopyPath */
+#define ASFileSysCopyPath (ASSERT_AS_VER(0),*((ASFileSysCopyPathSELPROTO)(gAcroSupportHFT[ASFileSysCopyPathSEL])))
+
+/* ASFileSysReleasePath */
+#define ASFileSysReleasePath (ASSERT_AS_VER(0),*((ASFileSysReleasePathSELPROTO)(gAcroSupportHFT[ASFileSysReleasePathSEL])))
+
+/* ASFileSysOpenFile */
+#define ASFileSysOpenFile (ASSERT_AS_VER(0),*((ASFileSysOpenFileSELPROTO)(gAcroSupportHFT[ASFileSysOpenFileSEL])))
+
+/* ASFileSysRemoveFile */
+#define ASFileSysRemoveFile (ASSERT_AS_VER(0),*((ASFileSysRemoveFileSELPROTO)(gAcroSupportHFT[ASFileSysRemoveFileSEL])))
+
+/* ASFileReopen */
+#define ASFileReopen (ASSERT_AS_VER(0),*((ASFileReopenSELPROTO)(gAcroSupportHFT[ASFileReopenSEL])))
+
+/* ASFileClose */
+#define ASFileClose (ASSERT_AS_VER(0),*((ASFileCloseSELPROTO)(gAcroSupportHFT[ASFileCloseSEL])))
+
+/* ASFileSetPos */
+#define ASFileSetPos (ASSERT_AS_VER(0),*((ASFileSetPosSELPROTO)(gAcroSupportHFT[ASFileSetPosSEL])))
+
+/* ASFileGetPos */
+#define ASFileGetPos (ASSERT_AS_VER(0),*((ASFileGetPosSELPROTO)(gAcroSupportHFT[ASFileGetPosSEL])))
+
+/* ASFileSetEOF */
+#define ASFileSetEOF (ASSERT_AS_VER(0),*((ASFileSetEOFSELPROTO)(gAcroSupportHFT[ASFileSetEOFSEL])))
+
+/* ASFileGetEOF */
+#define ASFileGetEOF (ASSERT_AS_VER(0),*((ASFileGetEOFSELPROTO)(gAcroSupportHFT[ASFileGetEOFSEL])))
+
+/* ASFileRead */
+#define ASFileRead (ASSERT_AS_VER(0),*((ASFileReadSELPROTO)(gAcroSupportHFT[ASFileReadSEL])))
+
+/* ASFileWrite */
+#define ASFileWrite (ASSERT_AS_VER(0),*((ASFileWriteSELPROTO)(gAcroSupportHFT[ASFileWriteSEL])))
+
+/* ASFileFlush */
+#define ASFileFlush (ASSERT_AS_VER(0),*((ASFileFlushSELPROTO)(gAcroSupportHFT[ASFileFlushSEL])))
+
+/* ASFileAcquirePathName */
+#define ASFileAcquirePathName (ASSERT_AS_VER(0),*((ASFileAcquirePathNameSELPROTO)(gAcroSupportHFT[ASFileAcquirePathNameSEL])))
+
+/* ASFileGetFileSys */
+#define ASFileGetFileSys (ASSERT_AS_VER(0),*((ASFileGetFileSysSELPROTO)(gAcroSupportHFT[ASFileGetFileSysSEL])))
+
+/* ASFileStmRdOpen */
+#define ASFileStmRdOpen (ASSERT_AS_VER(0),*((ASFileStmRdOpenSELPROTO)(gAcroSupportHFT[ASFileStmRdOpenSEL])))
+
+/* ASMemStmRdOpen */
+#define ASMemStmRdOpen (ASSERT_AS_VER(0),*((ASMemStmRdOpenSELPROTO)(gAcroSupportHFT[ASMemStmRdOpenSEL])))
+
+/* ASProcStmRdOpen */
+#define ASProcStmRdOpen (ASSERT_AS_VER(0),*((ASProcStmRdOpenSELPROTO)(gAcroSupportHFT[ASProcStmRdOpenSEL])))
+
+/* ASStmRead */
+#define ASStmRead (ASSERT_AS_VER(0),*((ASStmReadSELPROTO)(gAcroSupportHFT[ASStmReadSEL])))
+
+/* ASStmWrite */
+#define ASStmWrite (ASSERT_AS_VER(0),*((ASStmWriteSELPROTO)(gAcroSupportHFT[ASStmWriteSEL])))
+
+/* ASStmClose */
+#define ASStmClose (ASSERT_AS_VER(0),*((ASStmCloseSELPROTO)(gAcroSupportHFT[ ASStmCloseSEL])))
+
+/* PI_ACROSUPPORT_VERSION >= 0x00020002 */
+
+/* ASFileUnregisterFileSys */
+#define ASFileUnregisterFileSys (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileUnregisterFileSysSELPROTO)(gAcroSupportHFT[ASFileUnregisterFileSysSEL])))
+
+/* ASFilePushData */
+#define ASFilePushData (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFilePushDataSELPROTO)(gAcroSupportHFT[ASFilePushDataSEL])))
+
+/* ASFileRegisterFileSys */
+#define ASFileRegisterFileSys (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileRegisterFileSysSELPROTO)(gAcroSupportHFT[ASFileRegisterFileSysSEL])))
+
+/* ASFileGetFileSysByName */
+#define ASFileGetFileSysByName (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileGetFileSysByNameSELPROTO)(gAcroSupportHFT[ASFileGetFileSysByNameSEL])))
+
+/* ASFileFromMDFile */
+#define ASFileFromMDFile (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileFromMDFileSELPROTO)(gAcroSupportHFT[ASFileFromMDFileSEL])))
+
+/* ASFileGetMDFile */
+#define ASFileGetMDFile (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileGetMDFileSELPROTO)(gAcroSupportHFT[ASFileGetMDFileSEL])))
+
+/* ASFileSysCreatePathName */
+#define ASFileSysCreatePathName (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileSysCreatePathNameSELPROTO)(gAcroSupportHFT[ASFileSysCreatePathNameSEL])))
+
+/* ASFileSysAcquireFileSysPath */
+#define ASFileSysAcquireFileSysPath (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileSysAcquireFileSysPathSELPROTO)(gAcroSupportHFT[ASFileSysAcquireFileSysPathSEL])))
+
+/* ASFileSetMode */
+#define ASFileSetMode (ASSERT_AS_VER(ASCallsHFT_VERSION_2_2),*((ASFileSetModeSELPROTO)(gAcroSupportHFT[ASFileSetModeSEL])))
+
+/* end PI_ACROSUPPORT_VERSION >= 0x00020002 */
+
+/* begin PI_ACROSUPPORT_VERSION >= 0x00040000 */
+
+/* ASFileStmWrOpen */
+#define ASFileStmWrOpen (ASSERT_AS_VER(ASCallsHFT_VERSION_4),*((ASFileStmWrOpenSELPROTO)(gAcroSupportHFT[ASFileStmWrOpenSEL])))
+
+/* ASProcStmWrOpen */
+#define ASProcStmWrOpen (ASSERT_AS_VER(ASCallsHFT_VERSION_4),*((ASProcStmWrOpenSELPROTO)(gAcroSupportHFT[ASProcStmWrOpenSEL])))
+
+/* HFTIsValid */
+#define HFTIsValid (ASSERT_AS_VER(ASCallsHFT_VERSION_4),*((HFTIsValidSELPROTO)(gAcroSupportHFT[HFTIsValidSEL])))
+
+
+/* end PI_ACROSUPPORT_VERSION >= 0x00040000 */
+
+/* begin PI_ACROSUPPORT_VERSION >= 0x00050000 */
+
+#define ASFileSysGetItemProps (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysGetItemPropsSELPROTO)(gAcroSupportHFT[ASFileSysGetItemPropsSEL])))
+
+#define ASFileSysFirstFolderItem (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysFirstFolderItemSELPROTO)(gAcroSupportHFT[ASFileSysFirstFolderItemSEL])))
+
+#define ASFileSysNextFolderItem (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysNextFolderItemSELPROTO)(gAcroSupportHFT[ASFileSysNextFolderItemSEL])))
+
+#define ASFileSysDestroyFolderIterator (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysDestroyFolderIteratorSELPROTO)(gAcroSupportHFT[ASFileSysDestroyFolderIteratorSEL])))
+
+#define ASFileSysAcquireParent (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysAcquireParentSELPROTO)(gAcroSupportHFT[ASFileSysAcquireParentSEL])))
+
+#define ASFileIsSame (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileIsSameSELPROTO)(gAcroSupportHFT[ASFileIsSameSEL])))
+
+#define ASFileSysGetNameFromPath (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysGetNameFromPathSELPROTO)(gAcroSupportHFT[ASFileSysGetNameFromPathSEL])))
+
+#define ASFileSysGetTempPathName (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysGetTempPathNameSELPROTO)(gAcroSupportHFT[ASFileSysGetTempPathNameSEL])))
+
+#define ASFileSysGetStorageFreeSpace (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysGetStorageFreeSpaceSELPROTO)(gAcroSupportHFT[ASFileSysGetStorageFreeSpaceSEL])))
+
+#define ASFileSysFlushVolume (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysFlushVolumeSELPROTO)(gAcroSupportHFT[ASFileSysFlushVolumeSEL])))
+
+#define ASFileMReadRequest (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileMReadRequestSELPROTO)(gAcroSupportHFT[ASFileMReadRequestSEL])))
+
+#define ASFileClearOutstandingMReads (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileClearOutstandingMReadsSELPROTO)(gAcroSupportHFT[ASFileClearOutstandingMReadsSEL])))
+
+#define ASFileSysURLFromPath (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysURLFromPathSELPROTO)(gAcroSupportHFT[ASFileSysURLFromPathSEL])))
+
+#define ASFileGetURL (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileGetURLSELPROTO)(gAcroSupportHFT[ASFileGetURLSEL])))
+
+#define ASFileSysCreateFolder (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysCreateFolderSELPROTO)(gAcroSupportHFT[ASFileSysCreateFolderSEL])))
+
+#define ASFileSysRemoveFolder (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysRemoveFolderSELPROTO)(gAcroSupportHFT[ASFileSysRemoveFolderSEL])))
+
+#define ASFileGetOpenMode (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileGetOpenModeSELPROTO)(gAcroSupportHFT[ASFileGetOpenModeSEL])))
+
+#define ASFileSysDisplayStringFromPath (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysDisplayStringFromPathSELPROTO)(gAcroSupportHFT[ASFileSysDisplayStringFromPathSEL])))
+
+#define ASGetSecs (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASGetSecsSELPROTO)(gAcroSupportHFT[ASGetSecsSEL])))
+
+#define ASFileSysSetTypeAndCreator (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysSetTypeAndCreatorSELPROTO)(gAcroSupportHFT[ASFileSysSetTypeAndCreatorSEL])))
+#define ASFileSysGetTypeAndCreator (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileSysGetTypeAndCreatorSELPROTO)(gAcroSupportHFT[ASFileSysGetTypeAndCreatorSEL])))
+
+#define ASHostMBLen (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASHostMBLenSELPROTO)(gAcroSupportHFT[ASHostMBLenSEL])))
+
+#define ASFileHardFlush (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((ASFileHardFlushSELPROTO)(gAcroSupportHFT[ASFileHardFlushSEL])))
+
+#define HFTReplaceEntryEx (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((HFTReplaceEntryExSELPROTO)(gAcroSupportHFT[HFTReplaceEntryExSEL])))
+
+#define HFTUnreplaceEntry (ASSERT_AS_VER(ASCallsHFT_VERSION_5),*((HFTUnreplaceEntrySELPROTO)(gAcroSupportHFT[HFTUnreplaceEntrySEL])))
+
+/* end PI_ACROSUPPORT_VERSION >= 0x00050000 */
+
+/* begin PI_ACROSUPPORT_VERSION >= 0x00060000 */
+
+#define ASProcStmRdOpenEx (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASProcStmRdOpenExSELPROTO)(gAcroSupportHFT[ASProcStmRdOpenExSEL])))
+#define ASUUIDGenUnique (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASUUIDGenUniqueSELPROTO)(gAcroSupportHFT[ASUUIDGenUniqueSEL])))
+#define ASUUIDGenFromName (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASUUIDGenFromNameSELPROTO)(gAcroSupportHFT[ASUUIDGenFromNameSEL])))
+#define ASUUIDGenFromHash (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASUUIDGenFromHashSELPROTO)(gAcroSupportHFT[ASUUIDGenFromHashSEL])))
+#define ASUUIDFromCString (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASUUIDFromCStringSELPROTO)(gAcroSupportHFT[ASUUIDFromCStringSEL])))
+#define ASUUIDToCString (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASUUIDToCStringSELPROTO)(gAcroSupportHFT[ASUUIDToCStringSEL])))
+#define ASFileSysGetPlatformThing (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileSysGetPlatformThingSELPROTO)(gAcroSupportHFT[ASFileSysGetPlatformThingSEL])))
+#define ASFileSysAcquirePlatformPath (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileSysAcquirePlatformPathSELPROTO)(gAcroSupportHFT[ASFileSysAcquirePlatformPathSEL])))
+#define ASFileSysReleasePlatformPath (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileSysReleasePlatformPathSELPROTO)(gAcroSupportHFT[ASFileSysReleasePlatformPathSEL])))
+#define ASPlatformPathGetCstringPtr (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASPlatformPathGetCstringPtrSELPROTO)(gAcroSupportHFT[ASPlatformPathGetCstringPtrSEL])))
+#define ASPlatformPathGetFSSpecPtr (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASPlatformPathGetFSSpecPtrSELPROTO)(gAcroSupportHFT[ASPlatformPathGetFSSpecPtrSEL])))
+#define ASPlatformPathGetFSRefPtr (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASPlatformPathGetFSRefPtrSELPROTO)(gAcroSupportHFT[ASPlatformPathGetFSRefPtrSEL])))
+#define ASPlatformPathGetFSRefWithCFStringRefRecPtr (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASPlatformPathGetFSRefWithCFStringRefRecPtrSELPROTO)(gAcroSupportHFT[ASPlatformPathGetFSRefWithCFStringRefRecPtrSEL])))
+#define ASPlatformPathGetCFURLRefRecPtr (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASPlatformPathGetCFURLRefRecPtrSELPROTO)(gAcroSupportHFT[ASPlatformPathGetCFURLRefRecPtrSEL])))
+#define ASPlatformPathGetPOSIXPathPtr (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASPlatformPathGetPOSIXPathPtrSELPROTO)(gAcroSupportHFT[ASPlatformPathGetPOSIXPathPtrSEL])))
+#define ASFileSysGetNameFromPathAsASText (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileSysGetNameFromPathAsASTextSELPROTO)(gAcroSupportHFT[ASFileSysGetNameFromPathAsASTextSEL])))
+#define ASFileSysDisplayASTextFromPath (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileSysDisplayASTextFromPathSELPROTO)(gAcroSupportHFT[ASFileSysDisplayASTextFromPathSEL])))
+
+#define ASStmFlush (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASStmFlushSELPROTO)(gAcroSupportHFT[ASStmFlushSEL])))
+#define ASFileHasOutstandingMReads (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileHasOutstandingMReadsSELPROTO)(gAcroSupportHFT[ASFileHasOutstandingMReadsSEL])))
+#define ASFileCanSetEOF (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileCanSetEOFSELPROTO)(gAcroSupportHFT[ASFileCanSetEOFSEL])))
+#define HFTGetVersion (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((HFTGetVersionSELPROTO)(gAcroSupportHFT[HFTGetVersionSEL])))
+#define HFTNewEx (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((HFTNewExSELPROTO)(gAcroSupportHFT[HFTNewExSEL])))
+#define ASFileSysDIPathFromPathEx (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileSysDIPathFromPathExSELPROTO)(gAcroSupportHFT[ASFileSysDIPathFromPathExSEL])))
+#define ASFileSysPathFromDIPathEx (ASSERT_AS_VER(ASCallsHFT_VERSION_6),*((ASFileSysPathFromDIPathExSELPROTO)(gAcroSupportHFT[ASFileSysPathFromDIPathExSEL])))
+/* end PI_ACROSUPPORT_VERSION >= 0x00060000 */
+
+/* begin PI_ACROSUPPORT_VERSION >= 0x00070000 */
+#if PI_ACROSUPPORT_VERSION >= 0x00070000
+#define ASFixedToFloat (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFixedToFloatSELPROTO)(gAcroSupportHFT[ASFixedToFloatSEL])))
+#define FloatToASFixed (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((FloatToASFixedSELPROTO)(gAcroSupportHFT[FloatToASFixedSEL])))
+#else
+/* Obsolete macros. Switch to HFT instead */
+#define FloatToASFixed(d) ((ASFixed) ((d) * fixedOne + 0.5))
+#define ASFixedToFloat(f) ((float) ((f) / (double) fixedOne))
+#endif
+
+#define ASFileSysOpenFile64 (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFileSysOpenFile64SELPROTO)(gAcroSupportHFT[ASFileSysOpenFile64SEL])))
+#define ASFileSysGetFilePosLimit (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFileSysGetFilePosLimitSELPROTO)(gAcroSupportHFT[ASFileSysGetFilePosLimitSEL])))
+#define ASFileSetPos64 (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFileSetPos64SELPROTO)(gAcroSupportHFT[ASFileSetPos64SEL])))
+#define ASFileGetPos64 (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFileGetPos64SELPROTO)(gAcroSupportHFT[ASFileGetPos64SEL])))
+#define ASFileSetEOF64 (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFileSetEOF64SELPROTO)(gAcroSupportHFT[ASFileSetEOF64SEL])))
+#define ASFileGetEOF64 (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFileGetEOF64SELPROTO)(gAcroSupportHFT[ASFileGetEOF64SEL])))
+
+#define ASFileSysGetNameFromPathForDisplay (ASSERT_AS_VER(ASCallsHFT_VERSION_7),*((ASFileSysGetNameFromPathForDisplaySELPROTO)(gAcroSupportHFT[ASFileSysGetNameFromPathForDisplaySEL])))
+
+/* end PI_ACROSUPPORT_VERSION >= 0x00070000 */
+
+/* begin PI_ACROSUPPORT_VERSION >= 0x00080000 */
+#define ASGetDefaultUnicodeFileSys (ASSERT_AS_VER(ASCallsHFT_VERSION_8),*((ASGetDefaultUnicodeFileSysSELPROTO)(gAcroSupportHFT[ASGetDefaultUnicodeFileSysSEL])))
+#define ASGetErrorStringASText (ASSERT_AS_VER(ASCallsHFT_VERSION_8),*((ASGetErrorStringASTextSELPROTO)(gAcroSupportHFT[ASGetErrorStringASTextSEL])))
+#define ASRegisterErrorStringASText (ASSERT_AS_VER(ASCallsHFT_VERSION_8),*((ASRegisterErrorStringASTextSELPROTO)(gAcroSupportHFT[ASRegisterErrorStringASTextSEL])))
+#define ASGetDefaultFileSysForPath (ASSERT_AS_VER(ASCallsHFT_VERSION_8),*((ASGetDefaultFileSysForPathSELPROTO)(gAcroSupportHFT[ASGetDefaultFileSysForPathSEL])))
+#define ASFileSysIsLocal (ASSERT_AS_VER(ASCallsHFT_VERSION_8),*((ASFileSysIsLocalSELPROTO)(gAcroSupportHFT[ASFileSysIsLocalSEL])))
+#define ASFileSysGetStorageFreeSpace64 (ASSERT_AS_VER(ASCallsHFT_VERSION_8),*((ASFileSysGetStorageFreeSpace64SELPROTO)(gAcroSupportHFT[ASFileSysGetStorageFreeSpace64SEL])))
+/* end PI_ACROSUPPORT_VERSION >= 0x00080000 */
+
+#endif /* !STATIC_HFT */
+
+
+/* ASCallbackCreateReplacement
+** Type-checking replacement callback creation. Will cause a compiler
+** error if the proc is not of the same type as the proc it's replacing.
+** sel is a Selector, not a selector name, so be sure to use the SEL suffix!
+*/
+#define ASCallbackCreateReplacement(sel, proc) ASCallbackCreateProto(sel##PROTO, proc)
+
+#define ASFloatToFixed FloatToASFixed /* For compatibility with older name */
+
+/*
+** HFTCallReplacedEntry
+** Convenience macro for calling a replaced entry in the HFT.
+** sel is a Selector, not a selector name, so be sure to use the SEL suffix!
+*/
+#define HFTCallReplacedEntry(hft, sel, oldProc) (*((sel##PROTO)(HFTGetReplacedEntry((hft), sel, (oldProc)))))
+#endif /* PI_ACROSUPPORT_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(_H_ASCalls) */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExpT.h
new file mode 100644
index 0000000..9b1d04c
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExpT.h
@@ -0,0 +1,3985 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASExpT.h
+
+ - Types, macros, structures, etc. required to use the AcroSupport HFT.
+
+*********************************************************************/
+
+#ifndef _H_ASExpT
+#define _H_ASExpT
+
+#include "CoreExpT.h"
+#include "acroassert.h"
+
+#if MAC_PLATFORM
+#if defined(__MWERKS__)
+#include <QD/Quickdraw.h>
+#include <HIToolbox/MacWindows.h>
+#else
+#include <Carbon/Carbon.h>
+#include <ApplicationServices/ApplicationServices.h>
+#endif
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* define types based on SDK_LEVEL */
+
+/** File access modes used to specify how a file can be used when it is open. Not all modes can
+ be specified individually: ASFILE_CREATE can be used only in conjunction with
+ ASFILE_READ or ASFILE_WRITE. In addition, it is acceptable to specify
+ ASFILE_READ and ASFILE_WRITE together by <code>OR</code>-ing the two constants.
+ ASFILE_SERIAL and ASFILE_LOCAL (present only in version 3.0 or later) are hints that
+ help the Acrobat viewer optimize access to the file; they must be <code>OR</code>-ed with one or more
+ of the other constants:
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>ASFILE_READ</TD><TD>Open the file for reading.</TD></TR>
+ <TR><TD>ASFILE_WRITE</TD><TD>Open the file for writing.</TD></TR>
+ <TR><TD>ASFILE_CREATE</TD><TD>Create the file if it does not exist.</TD></TR>
+ <TR><TD>ASFILE_SERIAL</TD><TD>A hint indicating that the file will be accessed sequentially.</TD></TR>
+ <TR><TD>ASFILE_LOCAL</TD><TD>A hint indicating that a local copy of the file will be needed.</TD></TR>
+ </TABLE>
+ @see ASFileSysOpenFile
+ @see ASFileReopen
+*/
+typedef ASUns16 ASFileMode;
+
+/**
+ A file position value for use in callback procedures. This value cannot exceed 2 GB.
+ @see CosObjOffsetProc
+*/
+typedef ASUns32 ASFilePos;
+
+/**
+ A file offset value for use in callback procedures.
+ @see CosDocEnumEOFsProc
+*/
+typedef ASInt32 ASFileOffset;
+
+/** The absolute position within a file. This value can exceed 2 GB. */
+typedef ASUns64 ASFilePos64;
+
+/**
+ An error code value for use in <code>ASFile</code> and <code>ASFileSys</code> methods
+ and callbacks. Introduced in Acrobat 6.0.
+*/
+typedef ASInt32 ASErrorCode;
+
+/**
+ A byte count value for use in ASProcStmRdExHandler and ASFileSysItemProps.
+ @see ASUUIDGenFromName
+*/
+typedef ASUns32 ASByteCount;
+
+/**
+ An array size value for use in callback procedures.
+ @see AVDocSelectionAcquireQuadsProc
+ @see CosObjOffsetProc
+*/
+typedef ASUns32 ASArraySize;
+
+/**
+ A flag-bits value.
+ @see ASFileSetMode
+ @see CosDocCreate
+ @see CosDocSaveToFile
+ @see CosDocSaveWithParams
+ @see HFTReplaceEntry
+ @see HFTReplaceEntryEx
+ @see PDAnnotInfo
+ @see ASFileSysGetFileFlags
+ @see ASFileSysGetStatusProc
+ @see PDAnnotHandlerGetAnnotInfoFlagsProc
+*/
+typedef ASUns32 ASFlagBits;
+
+/** Can only contain values up to 4 GB. */
+typedef ASUns32 ASDiskSpace;
+
+/** */
+typedef ASUns64 ASDiskSpace64;
+
+/** */
+typedef ASUns32 ASlFileMode;
+
+/** */
+typedef ASUns32 ASMaskBits;
+
+/** */
+typedef ASInt32 ASDuration;
+
+/**
+ An HFT version number.
+ @see ASExtensionMgrGetHFT
+ @see HFTServerProvideHFTProc
+ @see HFTGetVersion
+*/
+typedef ASUns32 ASVersion;
+
+/** May not be larger than <code>int16</code>. */
+typedef ASUns16 ASSmallBufferSize;
+
+/**
+ A numeric count value.
+ @see ASGetSecs
+ @see ASIsValidUTF8
+ @see AVAppCreateIconBundle6
+ @see AVDocGetNthPageView
+ @see AVDocGetNumPageViews
+*/
+typedef ASUns32 ASCount;
+
+/** */
+typedef ASUns8 ASByte;
+
+/* types that may transition to unsigned types */
+
+/** A signed <code>int</code> value. Negative values are never used. */
+typedef ASInt16 ASSmallCount;
+
+/**
+ A numeric count value for use in I/O methods and data structures.
+
+ @see ASFileGetEOF
+ @see ASFileGetPos
+ @see ASFilePushData
+ @see ASFileSetPos
+ @see ASFileCompletionProc
+ @see ASFileSysMReadRequestProc
+*/
+typedef ASInt32 ASTFilePos;
+
+/**
+ A numeric array size value for use in AS and Cos-level I/O
+ methods and data structures.
+ @see numerous
+ @see ASFileCompletionProc
+ @see ASFileSysGetNameProc
+ @see ASFileSysMReadRequestProc
+ @see ASStmProc
+*/
+typedef ASInt32 ASTArraySize;
+
+/**
+ A cryptographic version number.
+ @see CosCryptGetVersion
+ @see CosDecryptGetMaxKeyBytes
+ @see CosEncryptGetMaxKeyBytes
+*/
+typedef ASInt32 ASTVersion;
+
+/**
+ A numeric count value for use in stream methods.
+ @see ASIsValidUTF8
+ @see ASStmFlush
+ @see ASStmRead
+ @see ASStmWrite
+ @see CosCopyStringValue
+ @see CosDocGetID
+ @see CosStreamPos
+ @see CosStringValue
+ @see CosStringValueSafe
+ @see HFTNew
+ @see ASStmProc
+*/
+typedef ASInt32 ASTCount;
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00090000)
+#pragma message("Warning: Using older Acrobat SDK. Define ACRO_SDK_LEVEL to 0x00090000")
+#endif
+
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 2)
+/**
+ A coordinate for a point in device space, for use in mouse click
+ callbacks. Values are conditionally compiled as 16-bit or
+ 32-bit integers, depending on the Acrobat version.
+
+ @see ASGetSecs
+ @see ASIsValidUTF8
+ @see AVAppCreateIconBundle6
+ @see AVDocGetNthPageView
+ @see AVDocGetNumPageViews
+*/
+typedef ASInt16 ASCoord;
+#else
+
+/**
+ A coordinate for a point in device space, for use in mouse click
+ callbacks. Values are conditionally compiled as 16-bit or
+ 32-bit integers, depending on the Acrobat version.
+
+ @see ASGetSecs
+ @see ASIsValidUTF8
+ @see AVAppCreateIconBundle6
+ @see AVDocGetNthPageView
+ @see AVDocGetNumPageViews
+*/
+typedef ASInt32 ASCoord;
+
+
+#if 0
+ /* potential future transitions */
+typedef ASUns16 ASSmallCount;
+typedef ASUns32 ASTFilePos;
+typedef ASUns32 ASTArraySize; /*elements in array */
+typedef ASUns32 ASTVersion;
+typedef ASUns32 ASTCount;
+#endif
+
+#endif /* ...ACRO_SDK_LEVEL < 2 */
+
+
+/** */
+typedef ASEnum8 ASErrSeverity;
+
+
+/** A stream object definition (see ASStream.h).
+ It is a data stream that may be a buffer in memory, a file, or an arbitrary user-written
+ procedure. It is typically used to extract data from a PDF file. When writing or extracting
+ data streams, the ASStm must be connected to a Cos stream.
+ @see ASFileStmRdOpen
+ @see ASFileStmWrOpen
+ @see ASMemStmRdOpen
+ @see ASProcStmRdOpen
+ @see CosStreamOpenStm
+ @see ASStmClose
+*/
+typedef struct _t_ASStmRec ASStmRec, *ASStm;
+#define ASCRYPTSTM_EOF (-1)
+
+/* ASCryptStm is essentially ASStm object for security handler plug-in.
+** ASCryptStm callbacks are trapped by PD layer and converted into ASStm.
+** See PDRegisterCryptFilter() definition on how ASCryptStm is used.
+**
+** These #define are used for setting modeFlag in ASCryptStmRec structure. For decryption, read flag,
+** for encryption, write flag should be set. EOF and error flag should also be set as appropriate.
+*/
+#define ASCryptStmModeRead 0x0001
+#define ASCryptStmModeWrite 0x0002
+#define ASCryptStmModeEOF 0x0004
+#define ASCryptStmModeError 0x0008
+
+/**
+ An ASStm object cover used for a cryptographic filter's
+ stream callbacks.
+ @see PDCryptFilterStreamProc
+*/
+typedef struct _t_ASCryptStmRec *ASCryptStm;
+
+/* Prototypes for ASCryptStm callback routines */
+
+/**
+ A callback for ASCryptStm. This is called by <code>getc</code> when the buffer is empty.
+ It is called only during decryption (when reading from the stream, not when writing).
+ @param pistm The security stream to fill.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see ASCryptStmFCloseProc
+ @see ASCryptStmFFlushProc
+ @see ASCryptStmFlsBufProc
+ @see ASCryptStmFPutEOFProc
+ @see ASCryptStmFResetProc
+ @see ASCryptStmUnGetcProc
+*/
+typedef ASInt32 (*ASCryptStmFilBufProc)(ASCryptStm pistm);
+
+/**
+ A callback for ASCryptStm. This is called by <code>putc</code> when the buffer is full.
+ It is called only during encryption (when writing to the stream, not when reading).
+ @param ch The character being written to the full stream.
+
+ @param stm The security stream that is full.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see ASCryptStmFCloseProc
+ @see ASCryptStmFFlushProc
+ @see ASCryptStmFilBufProc
+ @see ASCryptStmFPutEOFProc
+ @see ASCryptStmFResetProc
+ @see ASCryptStmUnGetcProc
+*/
+typedef ASInt32 (*ASCryptStmFlsBufProc)(ASInt32 ch, ASCryptStm stm);
+
+/**
+ A callback for ASCryptStm. It goes back one character in the
+ input stream, undoing a character <code>get</code> operation. It is called
+ only during decryption (when reading from the stream, not when writing).
+ @param ch The character being written to the stream.
+ @param stm The security stream to which the character
+ is written.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see ASCryptStmFCloseProc
+ @see ASCryptStmFFlushProc
+ @see ASCryptStmFilBufProc
+ @see ASCryptStmFlsBufProc
+ @see ASCryptStmFPutEOFProc
+ @see ASCryptStmFResetProc
+*/
+typedef ASInt32 (*ASCryptStmUnGetcProc)(ASInt32 ch, ASCryptStm stm);
+
+/**
+ A callback for ASCryptStm. This flushes a dirty buffer if necessary.
+
+ @param stm The security stream to be flushed.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see ASCryptStmFCloseProc
+ @see ASCryptStmFilBufProc
+ @see ASCryptStmFlsBufProc
+ @see ASCryptStmFPutEOFProc
+ @see ASCryptStmFResetProc
+ @see ASCryptStmUnGetcProc
+*/
+typedef ASInt32 (*ASCryptStmFFlushProc)(ASCryptStm stm);
+
+/**
+ A callback for ASCryptStm. This closes a security stream.
+ @param stm The security stream to be closed.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see ASCryptStmFFlushProc
+ @see ASCryptStmFilBufProc
+ @see ASCryptStmFlsBufProc
+ @see ASCryptStmFPutEOFProc
+ @see ASCryptStmFResetProc
+ @see ASCryptStmUnGetcProc
+*/
+typedef ASInt32 (*ASCryptStmFCloseProc)(ASCryptStm stm);
+
+/**
+ A callback for ASCryptStm. This resets a security stream, discarding
+ any buffered data. It is called only during encryption (when writing to the stream, not when reading).
+ @param stm The security stream to be reset.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see ASCryptStmFCloseProc
+ @see ASCryptStmFFlushProc
+ @see ASCryptStmFilBufProc
+ @see ASCryptStmFlsBufProc
+ @see ASCryptStmFPutEOFProc
+ @see ASCryptStmUnGetcProc
+*/
+typedef ASInt32 (*ASCryptStmFResetProc)(ASCryptStm stm);
+
+/**
+ A callback for ASCryptStm. This puts an end-of-file (EOF) marker to a
+ security stream.
+ @param stm The security stream to receive the EOF.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see ASCryptStmFCloseProc
+ @see ASCryptStmFFlushProc
+ @see ASCryptStmFilBufProc
+ @see ASCryptStmFlsBufProc
+ @see ASCryptStmFResetProc
+ @see ASCryptStmUnGetcProc
+*/
+typedef ASInt32 (*ASCryptStmFPutEOFProc)(ASCryptStm stm);
+
+/** Callback procs for ASCryptStm */
+typedef struct {
+ /** Called by <code>getc</code> when the buffer is empty. */
+ ASCryptStmFilBufProc EmptyBuff;
+ /** Called by <code>putc</code> when the buffer is full. */
+ ASCryptStmFlsBufProc FullBuff;
+ /** Backs up an input stream. */
+ ASCryptStmUnGetcProc UnGetCh;
+ /** Flushes a dirty buffer if necessary. */
+ ASCryptStmFFlushProc FlushBuff;
+ /** Closes a stream. */
+ ASCryptStmFCloseProc Close;
+ /** Discards any buffered data. */
+ ASCryptStmFResetProc Reset;
+ /** Puts an EOF marker. */
+ ASCryptStmFPutEOFProc PutEOF;
+} ASCryptStmProcs;
+
+/**
+ An ASStm object cover used for a cryptographic filter's
+ stream callbacks.
+ @see PDCryptFilterStreamProc
+*/
+typedef struct _t_ASCryptStmRec {
+
+ /** The number of characters remaining in the buffer. */
+ ASInt32 count;
+
+ /** The next character to get or put. */
+ char *currentPointer;
+
+ /** The base of the buffer, if any. */
+ char *basePointer;
+
+ /** Flag to indicate mode:
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Flag</TH><TH>Value</TH></TR>
+ <TR><TD>ASCryptStmModeRead</TD><TD><code>0x0001</code> (decryption)</TD></TR>
+ <TR><TD>ASCryptStmModeWrite</TD><TD><code>0x0002</code> (encryption)</TD></TR>
+ <TR><TD>ASCryptStmModeEOF</TD><TD><code>0x0004</code></TD></TR>
+ <TR><TD>ASCryptStmModeError</TD><TD><code>0x0008</code></TD></TR>
+ </TABLE>
+ */
+ ASUns32 modeFlag;
+
+ /** Handlers for security stream access. */
+ ASCryptStmProcs *procs;
+
+ /** The base ASStm object. */
+ ASStm baseStm;
+
+ /** The number of bytes requested for decryption. */
+ ASInt32 nBytesWanted;
+
+ /** A pointer to arbitrary user-defined data.*/
+ void *clientData;
+} ASCryptStmRec;
+
+/**
+ A callback for use by ASProcStmRdOpenEx() and ASProcStmWrOpen().
+ This should place data in the buffer specified by the
+ parameter data.
+
+ <p>If your procedure reads data from a file, it is generally
+ quite inefficient to open the file, read the bytes, and
+ close the file each time bytes are requested. Instead, consider
+ opening the file the first time bytes are requested from
+ it, reading the entire file into a secondary buffer, and
+ closing the file. When subsequent requests for data from
+ the file are received, simply copy data from the secondary
+ buffer, rather than reopening the file.</p>
+
+ @param data (Filled by the callback) The buffer into which
+ your procedure must place the number of bytes specified
+ by <code>nData</code>.
+ @param nData The number of bytes to read from the stream and
+ place into <code>data</code>.
+ @param clientData User-supplied data that was passed in
+ the call to ASProcStmRdOpenEx() or ASProcStmWrOpen().
+ @return The number of bytes actually read or written. This should be
+ equal to the <code>nData</code> parameter unless the end of file marker (EOF) has been reached, an error
+ has occurred, or this is short block of data just before EOF. If
+ EOF has been reached, a zero should be returned. If an error has
+ occurred, a negative value should be returned.
+ @see ASProcStmDestroyProc
+ @see ASProcStmRdOpenEx
+ @see ASProcStmWrOpen
+*/
+typedef ACCBPROTO1 ASTCount (ACCBPROTO2 *ASStmProc)(char *data,
+ ASTArraySize nData, void *clientData);
+
+
+/**
+ A callback for use by ASProcStmWrOpen() and ASProcStmRdOpenEx().
+
+ <p>This is called at the end of the stream so you can do clean up and free
+ allocated memory.</p>
+
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to ASProcStmWrOpen() or ASProcStmRdOpenEx().
+ @see ASStmProc
+ @see ASProcStmWrOpen
+ @see ASProcStmRdOpenEx
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASProcStmDestroyProc)(void *clientData);
+
+/**
+ A callback for use by ASProcStmRdOpenEx().
+
+ <p>This is called to set the stream position to a new location, which may be <code>NULL</code> if the stream
+ cannot be set to a new position. ASProcStmSeekProc() and ASProcStmGetLength() must
+ be provided together. If either is <code>NULL</code>, the stream will not be set to a new
+ position.</p>
+
+ @param newPos IN
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to ASProcStmRdOpenEx().
+ @see ASStmProc
+ @see ASProcStmRdOpenEx
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASProcStmSeekProc)(ASFilePos64 newPos, void *clientData);
+
+/**
+ A callback for use by ASProcStmRdOpenEx().
+
+ <p>This is called to get the length of the stream, which may be <code>NULL</code> if the stream cannot be
+ set to a new position. ASProcStmSeekProc() and ASProcStmGetLength() must be
+ provided together. If either is <code>NULL</code>, the stream will not be set to a new
+ position.</p>
+
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to ASProcStmRdOpenEx().
+ @return The length of the stream in bytes.
+ @see ASStmProc
+ @see ASProcStmRdOpenEx
+*/
+typedef ACCBPROTO1 ASFilePos64 (ACCBPROTO2 *ASProcStmGetLength)(void *clientData);
+
+/** For use by ASProcStmRdOpenEx(). */
+typedef struct _s_ASProcStmRdExHandler
+{
+ /** Set to <code>sizeof(ASProcStmRdExHandlerRec)</code>. */
+ ASByteCount size;
+ /** */
+ ASStmProc readProc;
+ /** */
+ ASProcStmDestroyProc destroyProc;
+ /** */
+ ASProcStmSeekProc seekProc;
+ /** */
+ ASProcStmGetLength getLengthProc;
+ /** The size of the buffer to use for the stream. If this field
+ is missing, the default is <code>65535</code>. If this field is present and
+ has a value of <code>0</code>, then the default is implementation-specific.
+ */
+ ASByteCount bufSize;
+} ASProcStmRdExHandlerRec, *ASProcStmRdExHandler;
+
+/** */
+#define HFT_ERROR_NO_VERSION (0xFFFFFFFF)
+
+/**
+ A data structure to pass to an HFT server to create a new
+ HFT. New in Acrobat 6.0.
+ @see HFTNewEx
+*/
+typedef struct _t_HFTData
+{
+ /** Set to <code>sizeof(HFTDataRec)</code> */
+ ASUns32 size;
+ /** The number of entries in the new HFT. This determines
+ the number of methods that the HFT can contain;
+ each method occupies one entry.
+ */
+ ASCount numSelectors;
+ /** The version number. */
+ ASVersion version;
+
+ /** Optional. This should point to an HFT array of function pointers. */
+ const void *hftProcs;
+} HFTDataRec;
+typedef const HFTDataRec *HFTData;
+
+/** Each HFT is serviced by an HFT server. The HFT server is responsible for handling
+ requests to obtain or destroy its HFT. An <code>HFTServer</code> is an object that manages several versions of an
+ HFT for different clients which may have been compiled with different versions of the HFT's API.
+ @see HFTServerNew
+ @see HFTServerDestroy
+*/
+typedef struct _t_HFTServer *HFTServer;
+
+/**
+ A callback for an HFT server. This returns an HFT with the specified
+ version number. If the HFT has not yet been created, create
+ and return it. If the HFT already exists, do not create
+ a new copy of it; simply return the existing copy.
+
+ @param hftServer The HFT server associated with this proc.
+ @param version The HFT version being requested.
+ @param rock User-supplied data passed in the call
+ to HFTServerNew().
+ @return The requested version of the HFT.
+ @see HFTServerNew
+
+ @note The version numeric type has changed in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 HFT (ACCBPROTO2 *HFTServerProvideHFTProc)(HFTServer hftServer, ASVersion version, void *rock);
+
+
+/**
+ A callback for an HFT server. This destroys the specified HFT (for example, by calling HFTServerDestroy()).
+ @param hftServer IN/OUT The HFT server associated with this destroy proc.
+ @param rock IN/OUT User-supplied data that was passed in the call to HFTServerNew().
+ @see HFTServerNew
+ @see HFTDestroy
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *HFTServerDestroyProc)(HFTServer hftServer, void *rock);
+
+/**
+ The ASFixed type is a 32-bit quantity representing a rational
+ number with the high (low on little-endian machines) 16
+ bits representing the number's mantissa and the low (high on little-endian machines)
+ 16 bits representing the fractional part. The definition
+ is platform-dependent.
+
+ <p>ASFixedP is a pointer to an ASFixed object. </p>
+
+ <p>Addition, subtraction, and negation with ASFixed types can
+ be done with <code>+</code> and <code>-</code> operators, unless you are concerned with overflow. Overflow
+ in ASFixed-value operations is indicated by the values <code>fixedPositiveInfinity</code>
+ and <code>fixedNegativeInfinity</code>.</p>
+
+ @see ASFixedDiv
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixInvert
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixTransformRect
+ @see ASFixedMul
+ @see ASFixedToCString
+*/
+typedef ASInt32 ASFixed, *ASFixedP;
+
+/*
+** CONVERSION to/from standard C types and ASFixed
+*/
+
+/** */
+#define ASFixedPosInf ASMAXInt32
+
+/** */
+#define ASFixedNegInf ASMINInt32
+
+/*#define ASInt32ToFixed(i) ((ASFixed)(i) << 16)
+ note that an expression argument get evaluated several times and this should be avoided */
+/**
+ Converts an ASInt32 to a fixed point number.
+ @param i The ASInt32 to convert.
+
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedToFloat
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFloatToFixed
+ @see ASFixedToFloat
+ @see ASInt16ToFixed
+*/
+#define ASInt32ToFixed(i) (((i) < (-32767)) ? ASFixedNegInf : ((i) > 32767) ? ASFixedPosInf : ((ASFixed)(i) << 16))
+
+/**
+ Converts a fixed point number to an ASInt32, rounding the
+ result.
+ @param f The fixed point number to convert.
+
+ @see ASFixedRoundToInt16
+ @see ASFixedToFloat
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+*/
+#define ASFixedRoundToInt32(f) ((ASInt32) (((f) + fixedHalf) >> 16))
+
+/**
+ Converts a fixed point number to an ASInt32, truncating
+ the result.
+ @param f The fixed point number to convert.
+
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedToFloat
+ @see ASFixedTruncToInt16
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+*/
+#define ASFixedTruncToInt32(f) ((ASInt32) ((f) >> 16))
+
+/**
+ Converts an ASInt16 to a fixed point number.
+ @param i The ASInt16 to convert.
+
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedToFloat
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFloatToFixed
+ @see ASInt32ToFixed
+*/
+#define ASInt16ToFixed(i) ((ASFixed)(i) << 16)
+#define ASUns16ToFixed(i) (((i) > 32767) ? ASFixedPosInf : ((ASFixed)(i) << 16))
+
+/**
+ Converts a fixed point number to an ASInt16, rounding the
+ result.
+ @param f The fixed point number to convert.
+
+ @see ASFixedRoundToInt32
+ @see ASFixedToFloat
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+*/
+#define ASFixedRoundToInt16(f) ((ASInt16) (((f) + fixedHalf) >> 16))
+
+/**
+ Converts a fixed point number to an ASInt16, truncating
+ the result.
+ @param f The fixed point number to convert.
+
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedToFloat
+ @see ASFixedTruncToInt32
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+*/
+#define ASFixedTruncToInt16(f) ((ASInt16) ((f) >> 16))
+
+/* Float <-> ASFixed */
+#ifdef __cplusplus
+
+/**
+ The ASFixed type is a 32 bit quantity representing a rational
+ number with the high (low on little-endian machines) 16
+ bits representing the number's mantissa and the low (high on little-endian machines)
+ 16 bits representing the fractional part. The definition
+ is platform-dependent.
+
+ <p>ASFixedP is a pointer to an ASFixed object. </p>
+
+ <p>Addition, subtraction, and negation with ASFixed types can
+ be done with <code>+</code> and <code>-</code> operators, unless you are concerned with overflow. Overflow
+ in ASFixed-value operations is indicated by the values <code>fixedPositiveInfinity</code>
+ and <code>fixedNegativeInfinity</code>. </p>
+
+ @see ASFixedDiv
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixInvert
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixTransformRect
+ @see ASFixedMul
+ @see ASFixedToCString
+*/
+inline ASFixed FloatNToFixed(const double& x) {return (ACROASSERT(x>=0),((x)>32767)?ASFixedPosInf:(ASFixed)(((x)*65536.0f +0.5f))); }
+/**
+ The ASFixed type is a 32 bit quantity representing a rational
+ number with the high (low on little-endian machines) 16
+ bits representing the number's mantissa and the low (high on little-endian machines)
+ 16 bits representing the fractional part. The definition
+ is platform-dependent.
+
+ <p>ASFixedP is a pointer to an ASFixed object. </p>
+
+ <p>Addition, subtraction, and negation with ASFixed types can
+ be done with <code>+</code> and <code>-</code> operators, unless you are concerned with overflow. Overflow
+ in ASFixed-value operations is indicated by the values <code>fixedPositiveInfinity</code>
+ and <code>fixedNegativeInfinity</code>. </p>
+
+ @see ASFixedDiv
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixInvert
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixTransformRect
+ @see ASFixedMul
+ @see ASFixedToCString
+*/
+inline ASFixed FloatIToFixed(const double& x) {return (ACROASSERT((x)*65536.0f==(double)(((ASFixed)x)<<16)),((x)<(-32767))?ASFixedNegInf:((x)>32767)?ASFixedPosInf:((ASFixed)x)<<16); }
+#else
+
+/** FloatN to ASFixed (for use when you know that <code>float</code> numbers are non-negative). */
+#define FloatNToFixed(x) ((x)<(-32767))?ASFixedNegInf:((x)>32767)?ASFixedPosInf:(((ASFixed)(((x)*65536.0f +0.5f)))
+
+/** FloatI to ASFixed (for use when you know that <code>float</code> numbers are integer values). */
+#define FloatIToFixed(x) ((x)>32767)?ASFixedPosInf:(((ASFixed)x)<<16)
+
+
+#endif /* __cplusplus */
+
+/* Backward compatibility #defines. DO NOT use these in new code */
+#define Int32ToFixed ASInt32ToFixed
+#define FixedRoundToInt32 ASFixedRoundToInt32
+#define FixedTruncToInt32 ASFixedTruncToInt32
+#define Int16ToFixed ASInt16ToFixed
+#define FixedRoundToInt16 ASFixedRoundToInt16
+#define FixedTruncToInt16 ASFixedTruncToInt16
+
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedZero ((ASFixed) 0x00000000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedHundredth ((ASFixed) 0x0000028FL)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedSixteenth ((ASFixed) 0x00001000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTwelfth ((ASFixed) 0x00001555L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTenth ((ASFixed) 0x00001999L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedEighth ((ASFixed) 0x00002000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedQuarter ((ASFixed) 0x00004000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedThird ((ASFixed) 0x00005555L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedHalf ((ASFixed) 0x00008000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTwoThirds ((ASFixed) 0x0000AAAAL)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedThreeQuarters ((ASFixed) 0x0000C000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedPi4 ((ASFixed) 0x0000c910L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedSevenEighths ((ASFixed) 0x0000E000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedOne1 ((ASFixed) 0x0000ffffL)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedOne ((ASFixed) 0x00010000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedOneAndQuarter ((ASFixed) 0x00014000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedFourThirds ((ASFixed) 0x00015555L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedSqrtTwo ((ASFixed) 0x00016A0AL)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedThreeHalves ((ASFixed) 0x00018000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedOneAnd3Qtr ((ASFixed) 0x0001C000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedPi2 ((ASFixed) 0x00019220L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedGolden ((ASFixed) 0x00019e37L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTwo ((ASFixed) 0x00020000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedThree ((ASFixed) 0x00030000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedFour ((ASFixed) 0x00040000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedFive ((ASFixed) 0x00050000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedSix ((ASFixed) 0x00060000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedSeven ((ASFixed) 0x00070000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedEight ((ASFixed) 0x00080000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedNine ((ASFixed) 0x00090000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTen ((ASFixed) 0x000A0000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedEleven ((ASFixed) 0x000B0000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTwelve ((ASFixed) 0x000C0000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedSixteen ((ASFixed) 0x00100000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedThirtyTwo ((ASFixed) 0x00200000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedFifty ((ASFixed) 0x00320000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedSeventyTwo ((ASFixed) 0x00480000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedNinety ((ASFixed) 0x005a0000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedHundred ((ASFixed) 0x00640000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedHundredFifty ((ASFixed) 0x00960000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedOneEighty ((ASFixed) 0x00b40000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTwoSeventy ((ASFixed) 0x010e0000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedFiveHundred ((ASFixed) 0x01F40000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedThousand ((ASFixed) 0x03E80000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedTenThousand ((ASFixed) 0x27100000L)
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedNegativeInfinity ASFixedNegInf
+
+/**
+ @ingroup ASFixedConstants
+*/
+#define fixedPositiveInfinity ASFixedPosInf
+
+
+#ifndef __ASTypes__ /* Newer ASTypes.h defines these types */
+/**
+ Matrix containing fixed numbers.
+*/
+typedef struct _t_ASFixedMatrix
+{
+
+ /** */
+ ASFixed a;
+
+ /** */
+ ASFixed b;
+
+ /** */
+ ASFixed c;
+
+ /** */
+ ASFixed d;
+
+ /** */
+ ASFixed h;
+
+ /** */
+ ASFixed v;
+}
+ASFixedMatrix, *ASFixedMatrixP;
+
+
+/**
+ A point (in two-dimensional space) represented by two fixed
+ numbers.
+*/
+typedef struct _t_ASFixedPoint
+{
+
+ /** */
+ ASFixed h;
+
+ /** */
+ ASFixed v;
+}
+ASFixedPoint, *ASFixedPointP;
+
+
+/**
+ A rectangle represented by the coordinates of its four sides.
+ In the Acrobat viewer, a rectangle differs from a quadrilateral
+ in that a rectangle must always have horizontal and vertical
+ sides, and opposite sides must be parallel.
+*/
+typedef struct _t_ASFixedRect
+{
+
+ /** */
+ ASFixed left;
+
+ /** */
+ ASFixed top;
+
+ /** */
+ ASFixed right;
+
+ /** */
+ ASFixed bottom;
+}
+ASFixedRect, *ASFixedRectP;
+#endif /* ndef __ASTypes */
+
+/**
+ A structure that represents a quadrilateral defined by four
+ corner points.
+
+ @see AVPageViewInvertQuad
+
+ @note The coordinate numeric types changed in Acrobat 6.
+*/
+typedef struct _t_Quad {
+ /** */
+ ASCoord tlh, tlv;
+ /** */
+ ASCoord trh, trv;
+ /** */
+ ASCoord blh, blv;
+ /** */
+ ASCoord brh, brv;
+} Quad, *QuadP;
+
+
+/**
+ A quadrilateral represented by four fixed points (one at each
+ corner). In the Acrobat viewer, a quadrilateral differs
+ from a rectangle in that a rectangle must always have horizontal
+ and vertical sides, and opposite sides must be parallel.
+*/
+typedef struct _t_ASFixedQuad {
+ /** */
+ ASFixedPoint tl, tr, bl, br;
+} ASFixedQuad, *ASFixedQuadP;
+
+
+/** Definition of ASFract. */
+typedef long ASFract;
+
+/** Definition of ASReal. */
+typedef float ASReal;
+
+#ifndef __ASTypes__ /* Newer ASTypes.h defines these types */
+/** */
+typedef struct _t_ASRealPoint {
+ /** */
+ ASReal h, v;
+} ASRealPoint;
+
+/** */
+typedef struct _t_ASRealRect {
+ /** */
+ ASReal left, top, right, bottom;
+} ASRealRect;
+
+/** */
+typedef struct _t_ASRealMatrix {
+ /** */
+ ASReal a, b, c, d, tx, ty;
+} ASRealMatrix;
+#endif /* ndef __ASTypes.h__ */
+
+/**
+ A time/date structure.
+
+ <p>The millisecond field is currently unused. </p>
+ @see ASDateGetLocalTime
+ @see ASDateGetUTCTime
+ @see ASDateSetTimeFromRec
+ @see PDAnnotGetDate
+ @see PDAnnotSetDate
+*/
+typedef struct _t_ASTimeRec
+{
+
+ /** Only common era years are displayed appropriately.
+ */
+ ASInt16 year;
+
+ /** Jan = <code>1</code>, ..., Dec = <code>12</code>.
+ */
+ ASInt16 month;
+
+ /** <code>1..31</code>
+ */
+ ASInt16 date;
+
+ /** <code>0..23 </code>
+ */
+ ASInt16 hour;
+
+ /** <code>0..59</code>
+ */
+ ASInt16 minute;
+
+ /** <code>0..59</code>
+ */
+ ASInt16 second;
+
+ /** <code>0..999</code>
+ */
+ ASInt16 millisecond;
+
+ /** Sun = <code>0</code>, ... Sat = <code>6</code>.
+ */
+ ASInt16 day;
+
+ /** GMT offset in half hours east of Greenwich.
+ <code>-48</code> signifies an unknown value.
+ */
+ ASInt16 gmtOffset;
+}
+ASTimeRec, *ASTimeRecP;
+
+/* ASCab
+**
+** An opaque type.
+*/
+
+/** ASCab objects (<i>cabinets</i>) can be used to store arbitrary key/value pairs. The keys
+ are always <code>NULL</code>-terminated strings containing only low ASCII alphanumeric characters
+ and spaces (ASCII character <code>32</code>). Key names cannot begin or end with a space.
+
+ <p>Every time you place a non-scalar value inside a cabinet, you are handing that value to
+ the ASCab implementation to manage. Putting a value in a cabinet is always a
+ handoff operation. For example, if you create an ASText object and add it as a value
+ in an ASCab, the ASText object is no longer managed by you; it is managed by the
+ ASCab. The ASCab will destroy the ASText object when its associated key is
+ removed or the key's value is overwritten. Pointer values are a special case
+ discussed in more detail below.</p>
+
+ <p>The routine naming convention is as follows:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Name</TH><TH>Description</TH></TR>
+ <TR><TD>Get</TD><TD><code>Get</code> routines return a value. These objects are owned by the ASCab and should
+ not be destroyed by the caller of <code>Get</code>.</TD></TR>
+ <TR><TD>GetCopy</TD><TD><code>GetCopy</code> routines make a copy of the data; the <code>GetCopy</code> client owns the
+ resulting information and can modify it at will; it is also responsible for destroying
+ it.</TD></TR>
+ <TR><TD>Detach</TD><TD><code>Detach</code> routines work the same way as <code>Get</code> routines, but the key is removed from
+ the ASCab without destroying the associated value that is passed back to the client
+ of <code>Detach</code>. The client is responsible for destroying the returned object.</TD></TR>
+ </TABLE>
+
+
+ <p>Normally, pointers are treated the same way as scalars; the ASCab passes the pointer
+ value back and forth but does not manage the data to which it points. This all changes
+ if the pointer has an associated <code>destroyProc</code>. If the <code>destroyProc</code> is set, the ASCab
+ will reference count the pointer to track how many times the pointer is referenced from
+ any ASCab. For example, the reference count will be bumped up whenever the pointer is
+ copied via ASCabCopy() or added to another ASCab via ASCabPutPointer(), and will
+ destroy the data associated with the pointer when the reference count goes to <code>0</code>. The data is
+ destroyed by calling the <code>destroyProc</code>. Detaching a pointer removes one reference to
+ the pointer without ever destroying the information to which it points.
+ ASCabDetachPointer() returns a separate value indicating whether the pointer can
+ safely be destroyed by the client or is still referred to by other key/value pairs inside
+ any ASCab objects (for example, whether the reference count went to zero when the pointer was
+ detached from the ASCab).</p>
+
+ <p>Any of the ASCab API's can take a compound name: a string consisting of multiple
+ keys separated by the colon (:) character. For example, <code>"Grandparent:Parent:Child:Key"</code> can be such a compound name. The
+ implementation will burrow down through such a compound string until it reaches the
+ most deeply nested cabinet. Also, any of the <code>Put</code> routines can take a <code>NULL</code> key
+ name. If the key name is <code>NULL</code>, the routine creates a new numeric key name. If the
+ cabinet is empty, the first generated key name will be <code>"0"</code> and subsequent names will
+ increase in ascending order. This is useful when treating an ASCab as a bag of
+ unnamed items, or when adding an ordered list of items to an empty ASCab.</p>
+ @see ASCabNew
+ @see ASCabDestroy
+ */
+typedef struct _t_ASCabinet *ASCab;
+typedef const struct _t_ASCabinet *ASConstCab;
+
+/*------------------------------------------------------------------------
+ typedefs for ASText
+------------------------------------------------------------------------*/
+
+/** An opaque object holding encoded text.
+
+ <p>An ASText object represents a Unicode string. ASText objects can also be used to
+ convert between Unicode and various platform-specific text encodings, as well as
+ conversions between various Unicode formats such as UTF-16 or UTF-8. Since it is
+ common for a Unicode string to be repeatedly converted to or from the same
+ platform-specific text encoding, ASText objects are optimized for this operation.
+ For example, they can cache both the Unicode and platform-specific text strings.</p>
+
+ <p>There are several ways of creating an ASText object depending on the type and
+ format of the original text data. The following terminology is used throughout this API
+ to describe the various text formats:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Text Format</TH><TH>Description</TH></TR>
+ <TR><TD>Encoded</TD><TD>A multi-byte string terminated with a single <code>0</code> character and coupled
+ with a specific host encoding indicator. On Mac OS, the text encoding is
+ specified using a script code. On Windows, the text encoding is specified
+ using a <code>CHARSET</code> code. On UNIX the only valid host encoding indicator is <code>0</code>, which
+ specifies text in the platform's default Roman encoding. On all platforms, Asian text
+ is typically specified using multi-byte strings.</TD></TR>
+ <TR><TD>ScriptText</TD><TD>A multi-byte string terminated with a single <code>0</code> character and coupled
+ with an ASScript code. This is merely another way of specifying the Encoded
+ case; the ASScript code is converted to a host encoding using ASScriptToHostEncoding().</TD></TR>
+ <TR><TD>Unicode</TD><TD>Text specified using UTF-16 or UTF-8. In the UTF-16 case, the bytes can
+ be in either big-endian format or the endian-ness that matches the platform, and
+ are always terminated with a single ASUns16 <code>0</code> value. In the UTF-8 case, the text is
+ always terminated with a trailing <code>0</code> byte. Unicode usage in this case is straight Unicode without
+ the <code>0xFE 0xFF</code> prefix or language and country codes that can be encoded inside a
+ PDF document.</TD></TR>
+ <TR><TD>PDText</TD><TD>A string of text pulled out of a PDF document. This will either be a big-endian
+ Unicode string pre-appended with the bytes <code>0xFE 0xFF</code>, or a string in
+ PDFDocEncoding. In this case, the Unicode string may have embedded language
+ and country identifiers. ASText objects strip language and country information out
+ of the PDText string and track them separately. See below for more details.</TD></TR>
+ </TABLE>
+
+
+ <p>ASText objects can also be used to accomplish encoding and format conversions; you can
+ request a string in any of the formats specified above.
+ In all cases the ASText code attempts to preserve all characters. For example, if you
+ attempt to concatenate two strings in separate host encodings, the implementation may
+ convert both to Unicode and perform the concatenation in Unicode space.</p>
+
+ <p>When creating a new ASText object or putting new data into an existing object, the
+ implementation will always copy the supplied data into the ASText object. The
+ original data is yours to do with as you wish (and release if necessary).</p>
+
+ <p>The size of ASText data is always specified in bytes. For example, the <code>len</code> argument to
+ ASTextFromSizedUnicode() specifies the number of bytes in the string, not the
+ number of Unicode characters.</p>
+
+ <p>Host encoding and Unicode strings are always terminated with a <code>NULL</code> character
+ (which consists of one <code>NULL</code> byte for host encoded strings and two <code>NULL</code> bytes for
+ Unicode strings). You cannot create a string with an embedded <code>NULL</code> character, even
+ using the calls which take an explicit length parameter.</p>
+
+ <p>The <code>Getxxx</code> calls return pointers to data held by the ASText object. You cannot free
+ or manipulate this data directly. The <code>GetxxxCopy</code> calls return data you can
+ manipulate and that you are responsible for freeing.</p>
+
+ <p>An ASText object can have language and country codes associated with it. A
+ language code is a 2-character ISO 639 language code. A country code is a 2-
+ character ISO 3166 country code. In both cases the 2-character codes are packed
+ into an ASUns16 value: the first character is packed in bits 8-15, and the second character is packed in
+ bits 0-7. These language and country codes can be encoded into a UTF-16 variant of
+ PDText encoding using an escape sequence; see Section 3.8 in the <i>PDF Reference</i>.
+ The ASText calls will automatically parse the language and country codes
+ embedded inside a UTF-16 PDText object, and will also author appropriate escape
+ sequences to embed the language and country codes (if present) when generating a
+ UTF-16 PDText object.</p>
+
+ @see ASTextNew
+ @see ASTextFromEncoded
+ @see ASTextFromInt32
+ @see ASTextFromPDText
+*/
+typedef struct _t_ASTextRec *ASText;
+
+/**
+ An opaque object holding constant encoded text.
+ @see ASText
+*/
+typedef const struct _t_ASTextRec *ASConstText;
+
+/*------------------------------------------------------------------------
+ typedefs for ASFile.h
+------------------------------------------------------------------------*/
+
+
+/** Open the file for reading.
+ @ingroup ASFileOpenModes
+*/
+#define ASFILE_READ 1
+
+/** Open the file for writing.
+ @ingroup ASFileOpenModes
+*/
+#define ASFILE_WRITE 2
+
+/** Create the file if it does not exist.
+ @ingroup ASFileOpenModes
+*/
+#define ASFILE_CREATE 4
+
+
+/** A hint indicating that the file will be primarily accessed sequentially.
+ @ingroup ASFileOpenModes
+*/
+#define ASFILE_SERIAL 8
+
+/** A hint indicating that a local copy of the file will be needed.
+ @ingroup ASFileOpenModes
+*/
+#define ASFILE_LOCAL 16
+
+/** A hint indicating that the file will be primarily accessed randomly.
+@ingroup ASFileOpenModes
+*/
+#define ASFILE_RANDOMACCESS 32
+
+
+/** Set if the file's data transfer rate
+ is generally slow. For example, the file is on a floppy
+ disk or is being accessed via modem.
+
+ @ingroup ASFileFlags
+*/
+#define kASFileSlowTransfer 0x00000001L
+
+/** Set if initiating each access to the file is slow. For example,
+ access may be slow because the file is served by an HTTP server that spawns
+ a new process for each request.
+
+ @ingroup ASFileFlags
+*/
+#define kASFileSlowConnect 0x00000002L
+
+/** Use multi-read commands to access the file.
+ @ingroup ASFileFlags
+*/
+#define kASFileUseMRead 0x00000004L
+
+/** Set if the file is to be cached (requires kASFileUseMRead to be set as well).
+ @ingroup ASFileFlags
+*/
+#define kASFileDoCaching 0x00000008L
+
+/** (Acrobat 5.0 and later) Set if media/access is a dial up connection.
+ This flag is only fully implemented on Windows. On Mac OS,
+ this flag is always conservatively set to <code>true</code>.
+ @ingroup ASFileFlags
+*/
+#define kASFileDialUp 0x00000010L
+
+/** Set if the file is still being loaded.
+ @ingroup ASFileFlags
+*/
+#define kASFileStillFetching 0x00000020L
+
+/** <code>true</code> if the file has outstanding MReads.
+ @ingroup ASFileFlags
+*/
+#define kASFileHasOutstandingMReads 0x00000040L
+
+
+/* ASFileMode flags */
+
+/** If set, ASFileRead does not yield if bytes
+ are not ready (which raises the fileErrBytesNotReady exception).
+ @ingroup ASFileModeFlags
+*/
+#define kASFileModeDoNotYieldIfBytesNotReady 0x0001
+
+/** If set, the file will be read all at once regardless of
+ multiple read requests.
+
+ @ingroup ASFileModeFlags
+*/
+#define kASFileModeDisableExplicitMReadRequests 0x0002
+
+/** If set, ASFileRead will raise the fileErrBytesNotReady exception when
+ trying to read from a file with a cache for which the requested
+ bytes are not yet present.
+ @ingroup ASFileModeFlags
+*/
+#define kASFileRaiseIfBytesNotReady 0x0004
+
+/** If set, no read requests are issued if bytes are not ready
+ (that is, the bytes are not in the cache).
+ @ingroup ASFileModeFlags
+*/
+#define kASFileNoRequestIfBytesNotReady 0x0008
+
+/** If set, <code>ASFileRead</code> will suspend the current thread when
+ trying to read from a file with a cache for which the requested
+ bytes are not yet present. Note that if <code>kASFileSuspendIfBytesNotReady</code>
+ is set, the <code>kASFileRaiseIfBytesNotReady</code> is ignored.
+ @ingroup ASFileModeFlags
+*/
+
+
+#define kASFileSuspendIfBytesNotReady 0x0010
+
+/* Type/Creator codes for ASFileSysSetTypeAndCreator */
+#if MAC_PLATFORM
+#define ASFourCharCode(x) (x)
+#else
+#define ASFourCharCode(x) (0U)
+#endif
+
+
+
+/** Acrobat creator code.
+ @ingroup Creators
+*/
+#define kAcrobatCreatorCode ASFourCharCode('CARO')
+
+/** Adobe Photoshop creator code.
+ @ingroup Creators
+*/
+#define kPhotoshopCreatorCode ASFourCharCode('8BIM')
+
+/** Adobe ImageReady creator code.
+ @ingroup Creators
+*/
+#define kImageReadyCreatorCode ASFourCharCode('MeSa')
+
+/** Adobe Illustrator creator code.
+ @ingroup Creators
+*/
+#define kIllustratorCreatorCode ASFourCharCode('ART5')
+
+
+
+/** Portable document format (PDF).
+ @ingroup AcrobatTypes
+*/
+#define kPDFTypeCode ASFourCharCode('PDF ')
+
+/** Forms data format.
+ @ingroup AcrobatTypes
+*/
+#define kFDFTypeCode ASFourCharCode('FDF ')
+
+/** XML forms data format.
+ @ingroup AcrobatTypes
+*/
+#define kXFDFTypeCode ASFourCharCode('XFDF')
+
+/** XML data package.
+ @ingroup AcrobatTypes
+*/
+#define kXDPTypeCode ASFourCharCode('XDP ')
+
+/** XML PDF.
+ @ingroup AcrobatTypes
+*/
+#define kPXDFTypeCode ASFourCharCode('MARS')
+
+/** Preferences file.
+ @ingroup AcrobatTypes
+*/
+#define kPrefsTypeCode ASFourCharCode('PREF')
+
+/** Acrobat catalog index file.
+ @ingroup AcrobatTypes
+*/
+#define kPDXTypeCode ASFourCharCode('PDX ')
+
+/** Adobe Web Buy rights management file.
+ @ingroup AcrobatTypes
+*/
+#define kRMFTypeCode ASFourCharCode('RMF ')
+
+/** Acrobat profile format (PPKLite).
+ @ingroup AcrobatTypes
+*/
+#define kAPFTypeCode ASFourCharCode('APF ')
+
+/** Acrobat sequence file.
+ @ingroup AcrobatTypes
+*/
+#define kSequenceTypeCode ASFourCharCode('SEQU')
+
+/** Spelling dictionary file.
+ @ingroup AcrobatTypes
+*/
+#define kDictionaryTypeCode ASFourCharCode('DICT')
+
+/** Web-hosted applications file.
+ @ingroup AcrobatTypes
+*/
+#define kWHATypeCode ASFourCharCode('WHA ')
+
+/** Locale file.
+ @ingroup AcrobatTypes
+*/
+#define kLocaleTypeCode ASFourCharCode('LANG')
+
+/** Plug-in file.
+ @ingroup AcrobatTypes
+*/
+#define kPluginTypeCode ASFourCharCode('XTND')
+
+/** Plug-in file (preferred, supported by 5.0.5 and later).
+ Using this file type will allows shipping
+ a Carbonized plug-in without worrying that it will try to load
+ and show an error when installed under Acrobat 4 or earlier.
+ @ingroup AcrobatTypes
+*/
+#define kPluginNewTypeCode ASFourCharCode('XTNc')
+
+/** eBook Exchange Transfer Data (ETD) file.
+ @ingroup AcrobatTypes
+*/
+#define kETDTypeCode ASFourCharCode('fETD')
+
+/** eBook EDN activation file.
+ @ingroup AcrobatTypes
+*/
+#define kEDNTypeCode ASFourCharCode('fEDN')
+
+
+
+/** Adobe Photoshop PSD file.
+ @ingroup PhotoshopTypes
+*/
+#define kPSDTypeCode ASFourCharCode('8BIM')
+
+/** Mac OS PICT file.
+ @ingroup PhotoshopTypes
+*/
+#define kPICTTypeCode ASFourCharCode('PICT')
+
+/** TIFF file.
+ @ingroup PhotoshopTypes
+*/
+#define kTIFFTypeCode ASFourCharCode('TIFF')
+
+/** GIF file.
+ @ingroup PhotoshopTypes
+*/
+#define kGIFTypeCode ASFourCharCode('GIFf')
+
+/** JPEG file.
+ @ingroup PhotoshopTypes
+*/
+#define kJPEGTypeCode ASFourCharCode('JPEG')
+
+/** PNG file.
+ @ingroup PhotoshopTypes
+*/
+#define kPNGTypeCode ASFourCharCode('PNGf')
+
+
+
+/** Adobe Illustrator AI file.
+ @ingroup IllustratorTypes
+*/
+#define KAITypeCode ASFourCharCode('TEXT')
+
+/** EPS file.
+ @ingroup IllustratorTypes
+*/
+#define kEPSTypeCode ASFourCharCode('EPSF')
+
+
+/** Text file.
+ @ingroup MiscCreatorTypes
+*/
+#define kTextTypeCode ASFourCharCode('TEXT')
+
+/** Text file.
+ @ingroup MiscCreatorTypes
+*/
+#define kRTFTypeCode ASFourCharCode('RTF ')
+
+/** SimpleText.
+ @ingroup MiscCreatorTypes
+*/
+#define kTextCreatorCode ASFourCharCode('ttxt')
+
+/** QuickTime file.
+ @ingroup MiscCreatorTypes
+*/
+#define kQuickTimeTypeCode ASFourCharCode('MooV')
+
+/** QuickTime player.
+ @ingroup MiscCreatorTypes
+*/
+#define kQuickTimeCreatorCode ASFourCharCode('TVOD')
+
+/** HTML file.
+ @ingroup MiscCreatorTypes
+*/
+#define kHTMLTypeCode ASFourCharCode('TEXT')
+
+/** Microsoft Internet Explorer.
+ @ingroup MiscCreatorTypes
+*/
+#define kHTMLCreatorCode ASFourCharCode('MSIE')
+
+/** XML file.
+ @ingroup MiscCreatorTypes
+*/
+#define kXMLTypeCode ASFourCharCode('TEXT')
+
+/** Microsoft Excel.
+ @ingroup MiscCreatorTypes
+*/
+#define kExcelCreatorCode ASFourCharCode('XCEL')
+
+/** Microsoft Word.
+ @ingroup MiscCreatorTypes
+*/
+#define kWordCreatorCode ASFourCharCode('W8BN')
+
+/** Microsoft PowerPoint.
+ @ingroup MiscCreatorTypes
+*/
+#define kPowerPointCreatorCode ASFourCharCode('SLD8')
+
+/** Unknown file.
+ @ingroup MiscCreatorTypes
+*/
+#define kUnknownTypeCode 0x3f3f3f3f
+
+/** Unknown application.
+ @ingroup MiscCreatorTypes
+*/
+#define kUnknownCreatorCode 0x3f3f3f3f
+
+
+/**
+ A data structure containing callbacks that implement a file
+ system.
+ @see ASFileSys
+*/
+typedef struct _t_ASFileSysRec *ASFileSys;
+
+
+/**
+ @see ASFileAcquirePathName
+ @see ASFileSysAcquireParent
+ @see ASFileSysCreatePathName
+ @see ASFileSysPathFromDIPath
+ @see ASPathFromPlatformPath
+ @see PDFileSpecAcquireASPath
+ @see ASFileSysReleasePath
+ @see ASFileSysDIPathFromPath
+*/
+typedef struct _t_ASPathNameRec *ASPathName;
+
+/**
+ An opaque representation of a particular open
+ file. Each open file has a unique ASFile. The ASFile value
+ has meaning only to the common ASFile implementation and bears
+ no relationship to platform-specific file objects.
+ @see PDDocGetFile
+ @see ASFileSysOpenFile
+ @see ASFileFromMDFile
+*/
+typedef struct _t_ASFile *ASFile;
+
+/**
+ Called when an asynchronous read or write request has completed.
+
+ @param aFile IN/OUT The ASFile for which data is read or written.
+
+ @param p IN/OUT A pointer to the buffer provided by the client.
+ It contains <code>nBytesRead</code> bytes of data if <code>error</code> is zero.
+ @param fileOffsetRequested IN/OUT The file offset requested by the
+ client.
+ @param countRequested IN/OUT The number of bytes requested by the
+ client.
+ @param nBytesRead IN/OUT The number of bytes actually read or written.
+
+ @param error IN/OUT The error condition if it is non-zero; see AcroErr.h.
+
+ @param compProcClientData IN/OUT The client data parameter provided
+ by client.
+ @see ASFileSysAsyncAbortProc
+ @see ASFileSysAsyncReadProc
+ @see ASFileSysAsyncWriteProc
+ @see ASFileSysYieldProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileCompletionProc)(ASFile aFile, const char *p,
+ ASTFilePos fileOffsetRequested, ASTArraySize countRequested,
+ ASTArraySize nBytesRead, ASErrorCode error, void *compProcClientData);
+
+/*------------------------------------------------------------------------
+ typedefs: see ASTypes.h for definitions of ASFileSys, ASPathName, and ASFileNum
+ as well as flags for ASFileSysOpenFile mode.
+------------------------------------------------------------------------*/
+
+
+/**
+ ASMDFile replaces MDFile. MDFile is an obsolete
+ name for this data type for backward compatibility.
+
+ <p>An MDFile is an opaque representation of a file instance
+ for a particular file system. File system implementors may
+ choose any convenient representation for an MDFile. In particular,
+ file systems need not worry about MDFile space conflicts;
+ the ASFile object exported by the common implementation
+ is guaranteed to be unique across all open files, and the
+ common implementation maps calls of ASFile methods to calls
+ of ASFileSystem callbacks with the corresponding MDFile. </p>
+
+ @see ASFileFromMDFile
+ @see ASFileGetMDFile
+ @see ASFileSysAsyncAbortProc
+ @see ASFileSysGetFileFlags
+ @see ASFileSysYieldProc
+ @see ASFileSysMReadRequestProc
+ @see ASFileSysClearOutstandingMReadsProc
+ @see ASFileSysGetStatusProc
+ @see ASFileSysOpenProc
+ @see ASFileSysCloseProc
+ @see ASFileSysFlushProc
+ @see ASFileSysSetPosProc
+ @see ASFileSysGetPosProc
+ @see ASFileSysSetEofProc
+ @see ASFileSysGetEofProc
+ @see ASFileSysReadProc
+ @see ASFileSysWriteProc
+ @see ASFileSysRenameProc
+ @see ASFileSysIsSameFileProc
+*/
+typedef void *ASMDFile;
+/* Obsolete name for this data type, for backward compatibility */
+#define MDFile ASMDFile
+
+
+/**
+ A data structure representing an I/O request.
+ @see ASFileSysAsyncReadProc
+ @see ASFileSysAsyncWriteProc
+ @see ASIODoneProc
+*/
+typedef struct _t_ASIORequestRec *ASIORequest;
+
+
+/**
+ Values returned by ASFileSysGetStatusProc().
+ @see ASFileRead
+ @see ASFileSysGetStatusProc
+*/
+typedef enum {
+
+ /** The MDFile is in a valid state.
+ */
+ kASFileOkay = 0x0000,
+
+ /** The MDFile is being closed (for example,
+ because the file is being displayed in a web browser's window
+ and the user cancelled downloading).
+ */
+ kASFileIsTerminating = 0x0001
+ } ASFileStatusFlags;
+
+
+/**
+ A callback in ASIORequest used by the asynchronous read/write
+ ASFileSys implementation and provided by the ASFile implementation
+ to the ASFileSys. The ASFileSys must call this method when
+ an asynchronous request is completed:
+
+ <ul>
+ <li>
+ When an I/O request has some or all of its data.
+ </li>
+ <li>
+ If the request is successfully queued but an error prevents
+ it from completing.
+ </li>
+ <li>
+ If the request is aborted by calling ASFileSysAsyncAbortProc().
+ In this case, <code>totalBytesCompleted = 0</code> and <code>pError = -1</code>.
+ </li>
+ </ul>
+
+ <p>If the request fails, this method must still be called,
+ with the error. It is not called, however, if there is an error queueing
+ the read or write request. </p>
+
+ @param req The I/O request for which data has been read/written.
+ @see ASFileSysAsyncAbortProc
+ @see ASFileSysAsyncReadProc
+ @see ASFileSysAsyncWriteProc
+ @see ASFileSysYieldProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASIODoneProc)(ASIORequest req);
+
+/**
+ The first five items in the ASIORequestSingleRec structure exactly
+ match the parameters of an ASFileSys read or write call.
+
+ <p><code>totalBytesRead</code> is filled in before the <code>IODoneProc</code> is called.
+ If <code>totalBytesRead</code> is <code>0</code> or if <code>pError</code> is non-zero, the read was
+ either terminated or did not complete.</p>
+
+ <p>If <code>IODoneProc</code> is non-zero, it points to a procedure that must be
+ called either when the request has terminated due to an error or other
+ condition, or when all of the bytes have been received for this
+ request.</p>
+*/
+typedef struct _t_ASIORequestRec
+{
+
+ /** The MDFile corresponding to the ASFile for which this request is intended.
+ */
+ ASMDFile mdFile;
+
+ /** A pointer to data to write to or read from <code>mdFile</code>.
+ */
+ void* ptr;
+
+ /** An offset (specified in bytes) into <code>mdFile</code> of the first byte to read or write.
+ */
+ ASTFilePos offset;
+
+ /** The number of bytes to read or write. It must be filled
+ in before <code>IODoneProc</code> is called. If is value is <code>0</code>, the read was either
+ terminated or did not complete.
+ */
+ ASTArraySize count;
+
+
+ /** The number of bytes actually read or written.
+ */
+ ASTArraySize totalBytesCompleted;
+
+ /** An error code. This code is filled by the ASFileSys before <code>IODoneProc</code> is called.
+ If its value is non-zero, the read was either terminated or did not complete.
+ */
+ ASErrorCode pError;
+
+ /** User-supplied data that the ASFileSys can use for any purpose.
+ */
+ void* clientData;
+
+
+ /** A user-supplied callback for use by the ASFileSys when the operation has completed. If it is non-<code>NULL</code>,
+ it points to a procedure that must be called either when the request has terminated due to an
+ error or other condition, or when all of the bytes have been received for this request.
+ @note This callback may be called at interrupt time.
+ */
+ ASIODoneProc IODoneProc;
+
+ /** User-supplied data that is available for <code>IODoneProc</code> to use.
+ */
+ void* IODoneProcData;
+} ASIORequestRec;
+
+/**
+ An enumerated data type used to categorize an object associated
+ with an ASPathName.
+ @see ASFileSysGetItemPropsProc
+ @see ASFileSysFirstFolderItemProc
+ @see ASFileSysNextFolderItemProc
+ @see ASFileSysGetItemProps
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+*/
+enum {
+
+ /** The object is associated with a file.
+ */
+ kASFileSysFile,
+
+ /** The object is associated with a folder.
+ */
+ kASFileSysFolder,
+
+ /** The object type is unknown.
+ */
+ kASFileSysUnknown = -1
+};
+typedef ASEnum16 ASFileSysItemType;
+
+
+/**
+ A list of properties for the object referenced by an ASPathName.
+ It is used in ASFileSysGetItemProps() and the folder enumeration
+ routines.
+ @see ASFileSysGetItemProps
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+*/
+typedef struct _t_ASFileSysItemProps {
+
+ /** The size of the data structure. It must be set to <code>sizeof(ASFileSysItemPropsRec)</code>.
+ */
+ ASSize_t size;
+
+ /** <code>true</code> if the object exists. If it is <code>false</code>, none of the following fields are valid.
+ */
+ ASBool isThere;
+
+ /** One of the ASFileSysItemType objects.
+ */
+ ASFileSysItemType type;
+
+ /** <code>true</code> if the object's hidden bit is set.
+ */
+ ASBool isHidden;
+
+ /** <code>true</code> if the object is read-only.
+ */
+ ASBool isReadOnly;
+
+ /** <code>true</code> if the file system could determine the creation date of the object.
+ */
+ ASBool creationDateKnown;
+
+ /** The creation date of the object. It is valid only if <code>creationDateKnown</code> is <code>true</code>.
+ */
+ ASTimeRec creationDate;
+
+ /** <code>true</code> if the file system could determine the last modification date of the object.
+ */
+ ASBool modDateKnown;
+
+ /** The modification date of the object. It is valid only if <code>modDateKnown</code> is <code>true</code>.
+ */
+ ASTimeRec modDate;
+
+ /** If the type is kASFileSysFile, this field holds the lower 32 bits of the size of the file (the upper 32
+ bits are maintained by <code>fileSizeHigh</code>.
+ */
+ ASByteCount fileSize;
+
+ /** If the type is kASFileSysFile, this field holds the upper 32 bits of the size of the file (the lower 32
+ bits are maintained by <code>fileSize</code>.
+ */
+ ASByteCount fileSizeHigh;
+
+ /** If the type is kASFileSysFolder, this field specifies how many items are in the folder. If this value
+ is <code>-1</code>, the file system was unable to easily determine the number of objects. You will need to explicitly
+ enumerate the objects to determine how many are in the folder.
+ */
+ ASTCount folderSize;
+
+ /** The Mac OS creator code for the file.
+ For other file systems, this will be zero.
+ */
+ ASUns32 creatorCode;
+
+ /** The Mac OS type code for the file.
+ For other file systems, this will be zero.
+ */
+ ASUns32 typeCode;
+} ASFileSysItemPropsRec, *ASFileSysItemProps;
+
+
+/**
+ An opaque object used to iterate through the contents of
+ a folder. ASFileSysFirstFolderItem() returns the first item
+ in the folder along with an ASFolderIterator object for
+ iterating through the rest of the items in the folder. Call
+ ASFileSysNextFolderItem() with this object to return the next
+ object in the folder until the method returns <code>false</code>. To
+ discard the ASFolderIterator object, call ASFileSysDestroyFolderIterator().
+
+ @see ASFileSysFirstFolderItemProc
+ @see ASFileSysNextFolderItemProc
+ @see ASFileSysDestroyFolderIteratorProc
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+ @see ASFileSysDestroyFolderIterator
+*/
+typedef struct _t_ASFolderIterator *ASFolderIterator;
+
+
+/** An ASPlatformPath and associated platform path types.
+ This is an opaque object used to retrieve a platform path object.
+ ASFileSysAcquirePlatformPath() allocates and initializes this
+ object. <code>ASPlatformPath*</code> calls are used to access its contents.
+ To discard this object, call ASFileSysReleasePlatformPath().
+*/
+typedef struct _t_ASPlatformPath *ASPlatformPath;
+
+/** A UNIX or Windows platform-specific path value.
+ @see ASPlatformPathGetCstringPtr
+*/
+typedef char* Cstring_Ptr; /* generally for Win_K, Unix */
+/**
+ A C string containing a POSIX path (UTF-8 encoding).
+ @see ASPlatformPathGetPOSIXPathPtr
+*/
+typedef char* POSIXPath_Ptr;
+
+#if MAC_PLATFORM
+
+/**
+ A pointer to a Mac OS platform-specific FSSpec.
+ @see ASPlatformPathGetFSSpecPtr
+*/
+typedef struct FSSpec *FSSpec_Ptr; /* for Mac_K (here on down) */
+
+/**
+ A pointer to a Mac OS platform-specific FSRef.
+ @see ASPlatformPathGetFSRefPtr
+*/
+typedef struct FSRef *FSRef_Ptr;
+
+/**
+ A structure containing the equivalent of two Mac OS platform-specific types: a pointer to
+ an FSRef and a CFStringRef.
+
+ @see ASPlatformPathGetFSRefWithCFStringRefRecPtr
+*/
+typedef struct _t_FSRefWithCFStringRefRec {
+ /** */
+ struct FSRef *ref;
+ /** Definition of a CFStringRef. */
+ const struct __CFString *str;
+} FSRefWithCFStringRefRec;
+
+/** */
+typedef FSRefWithCFStringRefRec *FSRefWithCFStringRefRec_Ptr;
+
+/**
+ A structure containing the equivalent of a Mac OS platform-specific CFURLRef.
+
+ @see ASPlatformPathGetCFURLRefRecPtr
+*/
+typedef struct _t_CFURLRefRec {
+ /** */
+ const struct __CFURL *url; /* definition of a CFURLRef */
+} CFURLRefRec;
+
+/** */
+typedef CFURLRefRec *CFURLRefRec_Ptr;
+
+#else /* this is to prevent type redefinitions, e.g. with PhotoshopSDK which defines FSSpec for Win */
+
+typedef struct FSSpecPlacebo *FSSpec_Ptr;
+typedef struct FSRefPlacebo *FSRef_Ptr;
+typedef struct _t_FSRefWithCFStringRefRecPlacebo {
+ struct FSRefPlacebo *ref;
+ const struct __CFStringPlacebo *str;
+} FSRefWithCFStringRefRecPlacebo;
+typedef FSRefWithCFStringRefRecPlacebo *FSRefWithCFStringRefRec_Ptr;
+typedef struct _t_CFURLRefRecPlacebo {
+ const struct __CFURLPlacebo *url;
+} CFURLRefRecPlacebo;
+typedef CFURLRefRecPlacebo *CFURLRefRec_Ptr;
+
+#endif /* #if MAC_PLATFORM */
+
+
+/**
+ A callback for ASFileSysRec that gets the flags for the specified
+ file.
+ @param f IN/OUT The file whose flags are obtained.
+ @return A bit field using ASFile flags.
+*/
+typedef ACCBPROTO1 ASFlagBits (ACCBPROTO2 *ASFileSysGetFileFlags)(ASMDFile f);
+
+/**
+ A callback for ASFileSysRec that asynchronously reads the specified
+ data, returning immediately after the request has been queued.
+ The ASFileSys must call the ASIODoneProc() (if one was provided)
+ when the specified data has been read.
+
+ <p>This callback is similar to the ASFileSysMReadRequestProc(),
+ except that this callback contains a caller-provided ASIODoneProc()
+ and can only be used for a single byte range.</p>
+ @param req A data structure specifying the data to read.
+ It contains information about the request including the ASMDFile,
+ the file offset, the buffer for the request, the number
+ of bytes in the request, an ASIODoneProc(), and client data
+ for the ASIODoneProc(). If the ASIODoneProc() in <code>req</code> is non-<code>NULL</code>
+ and there is an error queueing the read request, the ASIODoneProc()
+ must not be called.
+ @return <code>0</code> if the request was successfully queued,
+ a non-zero platform-dependent error code otherwise.
+ @see ASFileSysAsyncAbortProc
+ @see ASFileSysAsyncWriteProc
+ @see ASFileSysYieldProc
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysAsyncReadProc)(ASIORequest req);
+
+/**
+ A callback for ASFileSysRec that asynchronously writes the specified
+ data, returning immediately after the request has been queued.
+ The ASFileSys must call the ASIODoneProc() (if one was provided)
+ when the specified data has been written.
+ @param req A data structure specifying the data to write.
+ It contains information about the request including the ASMDFile,
+ the file offset, the buffer for the request, the number
+ of bytes in the request, an ASIODoneProc(), and client data
+ for the ASIODoneProc(). If the ASIODoneProc() in <code>req</code> is non-<code>NULL</code>
+ and there is an error queueing the write request, the ASIODoneProc()
+ must not be called.
+ @return <code>0</code> if the request was successfully queued,
+ a non-zero platform-dependent error code otherwise.
+ @see ASFileSysAsyncAbortProc
+ @see ASFileSysAsyncReadProc
+ @see ASFileSysYieldProc
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysAsyncWriteProc)(ASIORequest req);
+
+/**
+ A callback for ASFileSysRec that aborts all uncompleted asynchronous
+ I/O requests for the specified file. This callback can
+ be called at any time.
+
+ <p>This callback calls each outstanding ASIORequest object's ASIODoneProc()
+ to be called with <code>totalBytes = 0</code> and <code>error = -1</code>. </p>
+
+ @param f IN/OUT The file for which all uncompleted asynchronous
+ read and write requests are aborted.
+ @see ASFileSysAsyncReadProc
+ @see ASFileSysAsyncWriteProc
+ @see ASFileSysYieldProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysAsyncAbortProc)(ASMDFile f);
+
+
+/**
+ A callback for ASFileSysRec that yields the asynchronous I/O requests
+ for the specified file. This allows other processes
+ to process events that may be required for a file
+ read to complete. An ASFileSys should implement a yield
+ mechanism to complement asynchronous read and write requests.
+
+ <p>On Windows, this could be a normal PeekMessage-based yield.</p>
+
+ <p>In UNIX, it could mean using <code>select</code> on a file descriptor.</p>
+
+ @param f IN/OUT The file whose asynchronous I/O requests are yielded.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysAsyncAbortProc
+ @see ASFileSysAsyncReadProc
+ @see ASFileSysAsyncWriteProc
+ @see ASFileRead
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysYieldProc)(ASMDFile f);
+
+
+/**
+ A callback for ASFileSysRec that queues asynchronous requests
+ for one or more byte ranges that the caller (usually the
+ Acrobat viewer or library) will need in the near future.
+ This callback is important for slow file systems, such as
+ the web, to improve overall performance. It allows the
+ file system to begin retrieving bytes before they are actually
+ needed, while the Acrobat software continues processing
+ as much as it can with the data that has already been downloaded.
+
+ <p>This callback does not actually read the data, but merely
+ queues the requests, starts the asynchronous code that reads
+ the data, and returns. The asynchronous code that reads
+ the data must use ASFilePushData() to push the data from each
+ byte range to the Acrobat software as soon as the data is
+ ready.</p>
+
+ <p>This callback is similar to the ASFileSysAsyncReadProc(),
+ except that this callback contains a caller-provided ASIODoneProc()
+ and can only be used for a single byte range.</p>
+
+ @param f The file whose data is read.
+ @param aFile The corresponding ASFile, for use with ASFilePushData().
+
+ @param blockPairs An array of file offsets and byte lengths.
+
+ @param nBlockPairs The number of block pairs in <code>blockPairs</code>.
+ @return <code>0</code> if the request was successfully queued,
+ a non-zero platform-dependent error code otherwise.
+ @see ASFileSysAsyncReadProc
+ @see ASFileSysClearOutstandingMReadsProc
+ @see ASFileRead
+ @see ASFileHasOutstandingMReads
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysMReadRequestProc)
+ (ASMDFile f, ASFile aFile, ASTFilePos *blockPairs, ASTArraySize nBlockPairs);
+
+
+/**
+ A callback for ASFileSysRec that is used to advise a file system
+ that the previous range of bytes requested to read are not
+ needed, so that it may drop the read requests. The file
+ system can continue pushing the bytes if it cannot stop
+ the reads.
+ @param f The file that was being read.
+ @see ASFileSysMReadRequestProc
+ @see ASFileRead
+ @see ASFileHasOutstandingMReads
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysClearOutstandingMReadsProc)(ASMDFile f);
+
+/**
+ A callback for ASFileSysRec that gets the status of the specified
+ file. This callback is used for asynchronous I/O. For example,
+ it can indicate that an underlying file connection has been
+ closed.
+ @param f IN/OUT The file whose status is obtained.
+ @return The file's status, which must be one of the ASFileStatusFlags
+ values.
+ @see ASFileRead
+*/
+typedef ACCBPROTO1 ASFlagBits (ACCBPROTO2 *ASFileSysGetStatusProc)(ASMDFile f);
+
+/**
+ A callback for ASFileSysRec that is used for non-local file systems.
+ It returns an ASPathName on the new ASFileSys that refers to
+ an image (which may be cached) of the remote file. Because of
+ the possibility of cache flushing, you must hold a copy
+ of the remote file's ASPathName for the duration of use
+ of the local file.
+
+ @param pathName IN/OUT The ASPathName for which an equivalent
+ in <code>newFileSys</code> is obtained.
+ @param newFileSys IN/OUT The file system in which an equivalent
+ of <code>pathName</code> is obtained.
+ @return The ASPathName (in <code>newFileSys</code>) for the specified file. It returns
+ <code>NULL</code> if one can not be made.
+ @see ASFileSysCreatePathNameProc
+ @note Do not remove the local file copy, since the default
+ file system does not know about the linkage to the remote
+ file. The removal of this temporary file should be left to the file system.
+
+ @note The ASPathName returned should be released with the
+ ASFileSysReleasePath() method when it is no longer needed.
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *ASFileSysAcquireFileSysPathProc)
+ (ASPathName pathName, ASFileSys newFileSys);
+
+/**
+ A callback for ASFileSysRec that opens the specified file. It
+ is called by ASFileSysOpenFile() and ASFileReopen(). This callback
+ returns an error if the file is over 2 GB in length.
+
+ @param pathName IN/OUT The path name for the file to open.
+ @param mode IN/OUT The mode in which the file is opened, which must
+ be an OR of the ASFile Open Modes.
+ @param fP IN/OUT (Filled by the callback) The newly opened file.
+
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysCloseProc
+ @see ASFileSysOpenFile
+ @see ASFileReopen
+ @see ASFileClose
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysOpenProc)(ASPathName pathName, ASFileMode mode, ASMDFile *fP);
+
+/**
+ A callback for ASFileSysRec. This callback is responsible
+ for closing the specified file. It is called by ASFileClose().
+
+ @param f IN/OUT The file to close.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysOpenProc
+ @see ASFileClose
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysCloseProc)(ASMDFile f);
+
+/**
+ A callback for ASFileSysRec that flushes data for the specified
+ file. It is called by ASFileFlush().
+ @param f IN/OUT The file to flush.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysFlushVolumeProc
+ @see ASFileFlush
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysFlushProc)(ASMDFile f);
+
+/**
+ A callback for ASFileSysRec that sets the current position in
+ a file (the point from which data will next be
+ read). It is called by ASFileSetPos().
+ @param f IN/OUT The file in which the position is set.
+ @param pos IN/OUT The desired new position (specified in bytes
+ from the beginning of the file).
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileGetPos
+ @see ASFileSetPos
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysSetPosProc)(ASMDFile f, ASFilePos pos);
+
+/**
+ A callback for ASFileSysRec that gets the current position for
+ the specified file. It is called by ASFileGetPos(), and is not capable of handling file positions over 2 GB.
+ @param f The file whose current position is obtained.
+ @param pos (Must by filled by the callback) The current
+ position.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysSetPosProc
+ @see ASFileGetPos
+ @see ASFileSetPos
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetPosProc)(ASMDFile f, ASFilePos *pos);
+
+/**
+ A callback for ASFileSysRec that increases or decreases the logical
+ size of a file. It is called by ASFileSetEOF(). It returns an error
+ if the current file position is over 2 GB.
+ @param f The file to expand or shrink.
+ @param pos The desired size in bytes.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysCanSetEofProc
+ @see ASFileGetEOF
+ @see ASFileSetEOF
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysSetEofProc)(ASMDFile f, ASFilePos pos);
+
+/**
+ A callback for ASFileSysRec that gets a file's current logical
+ size. It is called by ASFileGetEOF(), and is not capable of handling file sizes over
+ 2 GB.
+ @param f IN/OUT The file whose logical size is obtained.
+ @param pos IN/OUT (Filled by the callback) The file's logical
+ size in bytes.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileGetEOF
+ @see ASFileSetEOF
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetEofProc)(ASMDFile f, ASFilePos *pos);
+
+/**
+ A callback for ASFileSysRec that reads data from the specified
+ file. It is called by ASFileRead() and returns an error if the file size
+ is over 2 GB.
+ @param ptr IN/OUT (Filled by the callback) The data read from
+ the file.
+ @param size IN/OUT The size of each item to read.
+ @param count IN/OUT The number of items to read.
+ @param f IN/OUT The file from which data is read.
+ @param pError IN/OUT (Filled by the callback) An error code. This
+ value is filled only if an error occurs. In that case,
+ it should contain an error code.
+ @return The number of bytes read, or <code>0</code> if there was an error.
+ @see ASFileSysWriteProc
+ @see ASFileRead
+*/
+typedef ACCBPROTO1 ASSize_t (ACCBPROTO2 *ASFileSysReadProc)(void *ptr, ASSize_t size, ASSize_t count, ASMDFile f, ASErrorCode *pError);
+
+/**
+ A callback for ASFileSysRec that writes data to the specified
+ file.
+ @param ptr IN/OUT A buffer containing data to write.
+ @param size IN/OUT The size of each item to write.
+ @param count IN/OUT The number of items to write.
+ @param f IN/OUT The file into which data is written.
+ @param pError IN/OUT (Filled by the callback) Error.
+ @return The number of bytes written, or <code>0</code> if there was an error.
+
+ @see ASFileSysReadProc
+ @see ASFileWrite
+*/
+typedef ACCBPROTO1 ASSize_t (ACCBPROTO2 *ASFileSysWriteProc)(void *ptr, ASSize_t size, ASSize_t count, ASMDFile f, ASErrorCode *pError);
+
+/**
+ A callback for ASFileSysRec that deletes a file. It is called
+ by ASFileSysRemoveFile().
+ @param pathName IN/OUT The file to delete.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysRemoveFile
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysRemoveProc)(ASPathName pathName);
+
+/**
+ A callback for ASFileSysRec that renames a file. It is not called
+ directly by any method in the client API, but is used internally
+ by the Acrobat viewer.
+ @param f The file to rename.
+ @param oldPath The file's old path name.
+ @param newPath The file's new path name.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysGetNameProc
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysRenameProc)(ASMDFile* f, ASPathName oldPath, ASPathName newPath);
+
+/**
+ A callback for ASFileSysRec that tests whether two files are the
+ same.
+ @param f IN/OUT The ASFile of the first file to compare. In many implementations
+ it may be unnecessary to use this information: <code>pathName</code>
+ and <code>newPathName</code> may provide sufficient information.
+ @param pathName IN/OUT The ASPathName of the first file to compare.
+
+ @param newPathName IN/OUT The ASPathName of the second file to compare.
+
+ @return <code>0</code> if the files are different, a non-zero value if they are the same.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASFileSysIsSameFileProc)(ASMDFile f, ASPathName pathName, ASPathName newPathName);
+
+/**
+ A callback for ASFileSysRec that returns a character string containing
+ the file name for the specified ASPathName. The character
+ string contains only the file name; it is not a complete
+ path name.
+
+ <p>This callback is not called directly from any plug-in API
+ method. It is used internally by the Acrobat viewer.</p>
+
+ @param pathName IN/OUT The ASPathName for which the file name is
+ returned.
+ @param name IN/OUT (Filled by the callback) A character string containing
+ the file name for <code>pathName</code>.
+ @param maxLength IN/OUT The maximum number of characters that <code>name</code>
+ can hold.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysGetFileSysNameProc
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetNameProc)(ASPathName pathName, char *name, ASTArraySize maxLength);
+
+/**
+ A callback for ASFileSysRec that returns a unique path name suitable
+ for use in creating temporary files.
+
+ @param pathName IN/OUT If <code>pathName</code> is non-<code>NULL</code>, the temporary
+ file must be stored such that a renaming of <code>pathName</code> will
+ succeed. For example, the file is stored on the same volume if renaming across different
+ volumes is illegal on the file system.
+ @return The path name for a temporary file.
+ @see ASFileSysCopyPathNameProc
+
+ @note The ASPathName returned should be released by the
+ ASFileSysReleasePath() method when it is no longer needed.
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *ASFileSysGetTempPathNameProc)(ASPathName pathName);
+
+/**
+ A callback for ASFileSysRec that copies a path name (not the underlying
+ file). It is called by ASFileSysCopyPath().
+
+ <p>Copying a path name does not result in any file-level operations,
+ and does not depend on the existence of an open
+ file for the path name. </p>
+
+ @param pathName IN/OUT The path name to copy.
+ @return A new copy of the path name.
+ @see ASFileSysCopyPath
+
+ @note The ASPathName returned should be released by the
+ ASFileSysReleasePath() method when it is no longer needed.
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *ASFileSysCopyPathNameProc)(ASPathName pathName);
+
+/**
+ A callback for ASFileSysRec that converts a path name to a device-
+ independent path name. It is called by ASFileSysDIPathFromPath().
+
+ @param path IN/OUT The pathname to convert to a device-independent
+ path name.
+ @param relativeToThisPath IN/OUT The path relative to which the
+ device-independent path name is specified. Pass <code>NULL</code> if the
+ device-independent path name is an absolute path name (for example, <code>c:\\dir1\\dir2\\...dir3\\myfile.pdf </code>)
+ instead of a relative path name (for example, <code>../../dir3/myfile.pdf</code>).
+
+ @return The device-independent path name.
+ @see ASFileSysDIPathFromPath
+
+ @note The memory for the <code>char*</code> returned should be freed
+ with the ASfree() method when it is no longer needed.
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *ASFileSysDiPathFromPathProc)(
+ ASPathName path,
+ ASPathName relativeToThisPath
+ );
+
+/**
+ A callback for ASFileSysRec that converts a device-independent
+ path name to an ASPathName. It is called by ASFileSysPathFromDIPath().
+
+
+ @param diPath IN/OUT A device-independent path name to convert to
+ an ASPathName.
+ @param relativeToThisPath IN/OUT If <code>diPath</code> is an absolute path name,
+ the value of this parameter is <code>NULL</code>. If <code>diPath</code> is a relative path name,
+ the parameter is the path name relative to which it is specified.
+ @return The ASPathName corresponding to the specified device-independent
+ path name.
+ @see ASFileSysPathFromDIPath
+ @see ASFileSysDIPathFromPath
+
+ @note The ASPathName returned should be released by the
+ ASFileSysReleasePath() method when it is no longer needed.
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *ASFileSysPathFromDIPathProc)(
+ const char * diPath,
+ ASPathName relativeToThisPath
+
+ );
+/**
+ A callback for ASFileSysRec that is called by ASFileSysReleasePath().
+
+ <p>This callback frees any memory occupied by <code>pathname</code>. It
+ does not result in any file-level operations. </p>
+
+ @param pathName The path name to release.
+ @see ASFileSysReleasePath
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysDisposePathNameProc)(ASPathName pathName);
+
+/**
+ A callback for ASFileSysRec that gets this file system's name.
+
+ <p>This callback is not called directly by any method in the
+ client API, but is used internally by the Acrobat viewer. </p>
+
+ @return The ASAtom containing the name of this file system.
+ @see ASFileRegisterFileSys
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *ASFileSysGetFileSysNameProc)(void);
+
+/**
+ A callback for ASFileSysRec that gets the amount of free space
+ on the volume containing the specified ASPathName.
+ @param pathName The ASPathName for a file on the volume
+ whose free space is obtained.
+ @return The free space in bytes. Because the free space is returned
+ as an ASInt32 object, it is limited to 4 GB.
+*/
+typedef ACCBPROTO1 ASDiskSpace (ACCBPROTO2 *ASFileSysGetStorageFreeSpaceProc)(ASPathName pathName);
+
+/**
+ A callback for ASFileSysRec that flushes the volume on which the
+ specified file resides. This ensures that any data written
+ to the system for the volume containing <code>pathName</code> is flushed
+ out to the physical volume (equivalent to the Mac OS
+ FlushVol, or to the UNIX sync). Call this after you are finished
+ writing a complete transaction to force a commit.
+
+ <p>This callback is not called directly from any client API
+ method, but is used internally by the Acrobat viewer. </p>
+
+ @param pathName The path name for the file whose volume
+ is flushed.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysFlushProc
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysFlushVolumeProc)(ASPathName pathName);
+
+/**
+ A callback for ASFileSysRec that creates an ASPathName based on
+ the input type and PDFileSpec. Each ASFileSys implementation
+ must publish the input types that it accepts. For example,
+ the Mac OS ASFileSys may accept the type FSSpecPtr, and
+ the MS-DOS ASFileSys may only accept types of <code>CString</code>.
+
+ @param pathSpecType The type of the input PDFileSpec.
+ @param pathSpec The file specification from which to create
+ an ASPathName.
+ @param mustBeZero Reserved for future use.
+ @return The newly created path name.
+ @see ASFileSysCreatePathName
+
+ @note The ASPathName returned should be released by the
+ ASFileSysReleasePath() method when it is no longer needed.
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *ASFileSysCreatePathNameProc)(ASAtom pathSpecType, const void *pathSpec,
+ const void *mustBeZero);
+
+
+/**
+ A callback for ASFileSysRec used to retrieve a full description
+ of the file system object associated with the path.
+ @param pathName The ASPathName associated with the object.
+
+ @param props (Filled by the callback) A properties structure
+ describing the object.
+ @return <code>0</code> to denote success, an error code otherwise.
+ @see ASFileSysGetItemProps
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetItemPropsProc)
+ (ASPathName pathName, ASFileSysItemProps props);
+
+
+/**
+ A callback for ASFileSysRec that begins the process of iterating
+ through the contents of a folder.
+ @param folderPath The path to the folder through which to iterate.
+
+ @param props (Filled by the callback) A properties structure
+ describing the object.
+ @param itemPath (Filled by the callback) A newly allocated
+ ASPathName associated with the object (which the client
+ must free). It contains an absolute path.
+ @return An ASFolderIterator object used for iterating through subsequent
+ items. If there are no items in the folder, this callback
+ returns <code>NULL</code>.
+ @see ASFileSysNextFolderItemProc
+ @see ASFileSysDestroyFolderIteratorProc
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+ @see ASFileSysDestroyFolderIterator
+*/
+typedef ACCBPROTO1 ASFolderIterator (ACCBPROTO2 *ASFileSysFirstFolderItemProc)
+ (ASPathName folderPath, ASFileSysItemProps props, ASPathName *itemPath);
+
+
+/**
+ A callback for ASFileSysRec used to continue the iteration
+ process associated with the ASFolderIterator object. Both
+ <code>itemPath</code> and <code>props</code> are optional and can be <code>NULL</code> if the caller
+ is not interested in that information.
+ @param folderIter An ASFolderIterator object returned
+ from a previous call to ASFileSysFirstFolderItemProc().
+ @param props (Filled by the callback) A properties structure
+ describing the object.
+ @param itemPath (Filled by the callback) A newly allocated
+ ASPathName associated with the object (which the client
+ must free). It contains an absolute path.
+ @return <code>false</code> if no other objects were found, <code>true</code> otherwise.
+ @see ASFileSysFirstFolderItemProc
+ @see ASFileSysDestroyFolderIteratorProc
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+ @see ASFileSysDestroyFolderIterator
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASFileSysNextFolderItemProc)
+ (ASFolderIterator folderIter, ASFileSysItemProps props, ASPathName *itemPath);
+
+
+/**
+ A callback for ASFileSysRec used to release the resources
+ associated with <code>folderIter</code>.
+ @param folderIter An ASFolderIterator object returned
+ from a previous call to ASFileSysFirstFolderItem().
+ @see ASFileSysFirstFolderItemProc
+ @see ASFileSysNextFolderItemProc
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+ @see ASFileSysDestroyFolderIterator
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysDestroyFolderIteratorProc)
+ (ASFolderIterator folderIter);
+
+
+/**
+ A callback for ASFileSysRec used to obtain the URL associated
+ with the given ASPathName.
+ @param path The ASPathName in question.
+ @return The URL or <code>NULL</code> if it cannot be determined. It must be possible to release
+ the allocated memory with ASfree().
+ @see ASFileSysURLFromPath
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *ASFileSysURLFromPathProc)
+ (ASPathName path);
+
+/**
+ ASFileSysSetMode() sets and gets parameters for the specified file.
+
+ <p><b>Mode operations:</b></p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operation</TH><TH>Code</TH></TR>
+ <TR><TD>Get the current mode</TD><TD><code>ASFileSetMode(aFile, 0, 0);</code></TD></TR>
+ <TR><TD>Set the mode</TD><TD><code>ASFileSetMode( aFile, kASFileModeDoNotYieldIfBytesNotReady, kASFileModeDoNotYieldIfBytesNotReady );</code></TD></TR>
+ <TR><TD>Clear the mode</TD><TD><code>ASFileSetMode( aFile, 0, kASFileModeDoNotYieldIfBytesNotReady );</code></TD></TR>
+ </TABLE>
+
+ <p><b>Setting parameters:</b></p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Parameter</TH><TH>Effect</TH></TR>
+ <TR><TD>kASFileModeDoNotYieldIfBytesNotReady</TD><TD>If set, then ASFileRead() will not perform a
+ <code>fileSys->yield()</code> if <code>RaiseIfBytesNotReady</code> is <code>true</code>.
+ Otherwise, it may call <code>yield</code> before raising the
+ exception <code>fileErrBytesNotReady</code>.</TD></TR>
+ <TR><TD>kASFileModeDisableExplicitMReadRequests</TD><TD>If set, <code>mread()</code> requests made via ASFileMReadRequest()
+ become NOPs.</TD></TR>
+ <TR><TD>kASFileRaiseIfBytesNotReady</TD><TD>If set, ASFileRead() will raise <code>fileErrBytesNotReady</code>
+ when trying to read from a file with a cache for
+ which the requested bytes are not yet present.</TD></TR>
+ </TABLE>
+
+ @param asFile The file handle.
+ @param modeValue The value of bits to be set or cleared.
+ @param modeMask A mask indicating which bits are to be set or cleared.
+
+*/
+typedef ACCBPROTO1 ASlFileMode (ACCBPROTO2 *ASFileSysSetModeProc)
+ (ASMDFile f, ASlFileMode modeValue, ASMaskBits modeMask);
+
+/**
+ A callback for ASFileSysRec used to obtain the parent of
+ the input path.
+ @param path The ASPathName in question.
+ @return The parent path, or <code>NULL</code> if path is a root directory. It
+ is the client's responsibility to free the returned ASPathName.
+
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *ASFileSysGetParentProc)
+ (ASPathName path);
+
+/**
+ A callback for ASFileSysRec used to create an empty folder
+ at the specified path.
+ @param path The path of the folder to create.
+ @return <code>0</code> to denote success, an error code otherwise.
+ @see ASFileSysRemoveFolderProc
+ @see ASFileSysCreateFolder
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysCreateFolderProc)
+ (ASPathName path);
+
+/**
+ A callback for ASFileSysRec used to delete the folder at
+ the specified path.
+ @param path The path of the folder to remove.
+ @return <code>0</code> to denote success, an error code otherwise.
+ @see ASFileSysCreateFolderProc
+ @see ASFileSysRemoveFolder
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysRemoveFolderProc)
+ (ASPathName path);
+
+/**
+ A callback for ASFileSysRec used to obtain a representation
+ of a path that can be displayed by the user.
+ @param path The ASPathName in question.
+ @return The display string, or <code>NULL</code> if some error occurred. It must be possible to release
+ its memory with ASfree().
+ @see ASFileSysDisplayStringFromPath
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *ASFileSysDisplayStringFromPathProc)
+ (ASPathName path);
+
+/**
+ A callback for ASFileSysRec that sets the file type and creator
+ for the file. This callback is currently only implemented on Mac OS. It does
+ not raise an error.
+ @param path Path to the file.
+ @param type File type.
+ @param creator File creator.
+ @see ASFileSysGetTypeAndCreatorProc
+ @see ASFileSysGetTypeAndCreator
+ @see ASFileSysSetTypeAndCreator
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysSetTypeAndCreatorProc)
+ (ASPathName path, ASlFileMode type, ASlFileMode creator);
+
+/**
+ A callback for ASFileSysRec that gets the file type and creator
+ for the file. This callback is currently only implemented on Mac OS. It does
+ not raise an error.
+ @param path The path to the file.
+ @param type (Filled by the callback) The file type.
+ @param creator (Filled by the callback) The file creator.
+ @see ASFileSysSetTypeAndCreatorProc
+ @see ASFileSysGetTypeAndCreator
+ @see ASFileSysSetTypeAndCreator
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysGetTypeAndCreatorProc)
+ (ASPathName path, ASlFileMode *type, ASlFileMode *creator);
+
+/**
+ A callback for ASFileSysRec that reopens a file in the specified
+ mode. ASFileReopen() calls this method if it is present. If
+ this method is not present, or if it returns <code>NULL</code> and <code>error</code>
+ is <code>0</code>, ASFileReopen() does a close followed by an open. If
+ <code>error</code> is non-zero, ASFileReopen() ignores the return value
+ and fails with that error.
+
+ <p>On success, the old file should not need to be closed. On
+ failure, the old file should remain unchanged. </p>
+
+ @param f The file to reopen.
+ @param newMode The mode for the new session.
+ @param error The error code for the operation. <code>0</code> if the
+ operation was successful, a non-zero error code otherwise. The error is platform and file-system specific.
+ @return The newly reopened file or <code>NULL</code>.
+ @see ASFileReopen
+ @see ASFileSysOpenFile
+*/
+typedef ACCBPROTO1 ASMDFile (ACCBPROTO2 *ASFileSysReopenProc)
+ (ASMDFile f, ASFileMode newMode, ASErrorCode *error);
+
+/**
+ Does a hard flush on the file. A hard flush makes sure
+ the data is flushed even if the file is remote. This
+ proc should succeed and do nothing if it is not supported.
+
+ <p>This does not raise an error.</p>
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysHardFlushProc)
+ (ASMDFile f);
+
+/**
+ Returns a platform file system representation of the ASPathName
+ passed according to the atom selector. It allocates memory for the
+ returned structure, which the caller must release with ASfree().
+
+ <p>This does not raise an error.</p>
+*/
+typedef ACCBPROTO1 void * (ACCBPROTO2 *ASFileSysGetPlatformThingProc)
+ (ASPathName path, ASAtom thing);
+
+/**
+ A callback for ASFileSysRec that gets a full description of the
+ file system object associated with <code>pathName</code>, returning the
+ item properties in the ASCab format.
+
+ <p>If the ASCab has no keys on entry, every known property
+ is filled in. If it is not empty, only properties corresponding
+ to keys in the ASCab are filled in. Keys that do not map
+ to a property of the object are removed. The ASCab has the
+ following potential entries: </p>
+
+ <code>
+ <p>ASBool isThere; </p>
+ <p>ASInt32 type; </p>
+ <p>ASBool isHidden; </p>
+ <p>ASBool isReadOnly; </p>
+ <p>char * creationDate; // PDF style date </p>
+ <p>string char * modDate; // PDF style date string </p>
+ <p>ASUns32 fileSizeHigh; </p>
+ <p>ASUns32 fileSizeLow; </p>
+ <p>ASInt32 folderSize; </p>
+ <p>ASUns32 creatorCode; </p>
+ <p>ASUns32 typeCode; </p>
+ <p>ASUns32 versionMajor; </p>
+ <p>ASUns32 versionMinor; </p>
+ <p>ASBool isCheckedOut; </p>
+ <p>ASBool isPublished; </p>
+ </code>
+
+ @param pathName The ASPathName associated with the object.
+
+ @param theCab (Filled by the method) Properties describing
+ the object, in cabinet format.
+ @return <code>0</code> if no error was encountered; otherwise an error code is
+ returned. If an error code is returned, <code>theCab</code> is not filled
+ with valid values. If the path name does not point to an
+ object on the file system, <code>asFileErrFNF</code> is returned and a valid
+ ASCab with <code>isThere</code> is set to <code>false</code>.
+ @see ASFileSysGetItemPropsAsCab
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *ASFileSysGetItemPropsAsCabProc)(ASPathName pathName, ASCab theCab);
+
+/**
+ A callback for ASFileSysRec that tests whether a specified operation
+ can be performed on the file, which means that it tests whether a handler
+ is defined for that operation in <code>ASFileSysPerformOpOnItemProc</code>.
+
+ @param pathName The ASPathName of the file.
+ @param op The name of the operation to test.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysPerformOpOnItemProc
+ @see ASFileSysCanPerformOpOnItem
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *ASFileSysCanPerformOpOnItemProc)(ASPathName pathName, const char *op);
+
+/**
+ A callback for ASFileSysRec that performs the specified operation
+ on a particular file.
+ @param pathName The ASPathName of the file.
+ @param op The name of the operation to perform (a file system-defined
+ string).
+ @param params An ASCab object containing parameters to
+ pass to the operation.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysCanPerformOpOnItemProc
+ @see ASFileSysPerformOpOnItem
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *ASFileSysPerformOpOnItemProc)(ASPathName pathName, const char *op, ASCab params);
+
+/**
+ A callback for ASFileSysRec that acquires a platform-specific
+ file system representation of the specified path, according
+ to the specified type, wrapped in an allocated ASPlatformPath
+ object. Use the <code>ASPlatformPath*</code> calls to get the actual
+ platform object.
+ @param path The ASPathName in the current file system.
+
+ @param platformPathType The platform path type, which is one of
+ the following constants:
+ <ul>
+ <li>FSSpec</li>
+ <li>FSRef</li>
+ <li>FSRefWithCFStringRefRec</li>
+ <li>CFURLRefRec</li>
+ </ul>
+ @param platformPath (Filled by the method) The new platform path object.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysAcquireFileSysPathProc
+ @see ASFileSysAcquirePlatformPath
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *ASFileSysAcquirePlatformPathProc)
+ (ASPathName path, ASAtom platformPathType, ASPlatformPath *platformPath);
+
+/**
+ A callback for ASFileSysRec that releases the specified platform
+ path object when the client is done with it.
+ @param platformPath The ASPathName of the file.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysAcquirePlatformPathProc
+ @see ASFileSysReleasePlatformPath
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysReleasePlatformPathProc)
+ (ASPlatformPath platformPath);
+
+/**
+ A callback for ASFileSysRec that gets the file name for the specified
+ ASPathName as an ASText object.
+
+ @param pathName The ASPathName for which the file name
+ is returned.
+ @param name (Filled by the callback) An ASText object for
+ the file name for <code>pathName</code>.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysGetFileSysNameProc
+ @see ASFileSysGetNameProc
+ @note This supersedes ASFileSysGetNameProc() for Acrobat 6.0.
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetNameAsASTextProc)
+ (ASPathName pathName, ASText name);
+/**
+ <p>Places a representation that can be displayed to users of a path into <code>displayText</code>.</p>
+
+ <p>This does not raise an error.</p>
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysDisplayASTextFromPathProc)
+ (ASPathName path, ASText displayText);
+
+/**
+ A callback for ASFileSysRec used when a byte range has
+ arrived during a file load operation.
+ @param start The offset from the beginning of the file
+ to the start of the byte range.
+ @param length The number of bytes in the byte range.
+ @param clientData A pointer to the data to pass to the callback.
+*/
+ typedef ACCBPROTO1 void (ACCBPROTO2 *ASFileSysRangeArrivedProc)
+ (ASInt32 start, ASInt32 length, void* clientData);
+
+/**
+ A callback for ASFileSysRec that determines whether ASFileSys
+ can set the end of file marker (EOF) to a new offset for the specified file.
+ @param f The file.
+ @param pos The new EOF offset.
+ @return <code>true</code> if the EOF can be set for the file.
+ @see ASFileSysSetEofProc
+ @see ASFileGetEOF
+ @see ASFileSetEOF
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASFileSysCanSetEofProc)
+ (ASMDFile f, ASFilePos pos);
+
+/**
+ A callback for ASFileSysRec that converts a path name to a device-independent
+ path name, returned as an ASText object. It is called by
+ ASFileSysDIPathFromPathEx().
+ @param path The path name to convert to a device-independent
+ path name.
+ @param relativeToThisPath The path relative to which the
+ device-independent path name is specified. Pass <code>NULL</code> if the
+ device-independent path name
+ is an absolute path name (for example, <code>c:\\dir1\\dir2\\dir3\\myfile.pdf</code>)
+ instead of a relative pathname (for example, <code>../../dir3/myfile.pdf</code>).
+ @param diPathText (Filled by the method) The ASText object
+ to contain the device-independent path. Must be allocated
+ and freed by the client.
+ @return <code>0</code> if the operation was successful, a non-zero platform-independent error code otherwise.
+ @see ASFileSysPathFromDIPathExProc
+ @see ASFileSysDIPathFromPathEx
+ @see ASFileSysPathFromDIPathEx
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysDIPathFromPathExProc)(
+ ASPathName path,
+ ASPathName relativeToThisPath,
+ ASText diPathText
+ );
+
+/**
+ A callback for ASFileSysRec that converts a device-independent
+ path name from an ASText object to an ASPathName. It is called
+ by ASFileSysPathFromDIPathEx().
+
+ @param diPathText A device-independent path name to convert to
+ an ASPathName, as an ASText object.
+ @param relativeToThisPath If <code>diPath</code> is an absolute path name,
+ this parameter's value is <code>NULL</code>. If <code>diPath</code> is a relative path name,
+ its value is the path name relative to which it is specified.
+ @return The ASPathName corresponding to the specified device-independent
+ path name.
+ @see ASFileSysDIPathFromPathExProc
+ @see ASFileSysPathFromDIPathEx
+ @see ASFileSysDIPathFromPathEx
+
+ @note The ASPathName returned should be released by the
+ ASFileSysReleasePath() method when it is no longer needed.
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *ASFileSysPathFromDIPathExProc)(
+ ASConstText diPathText,
+ ASPathName relativeToThisPath
+ );
+
+/**
+ A callback for ASFileSysRec that opens the specified file. It
+ is called by ASFileSysOpen64(). This callback must be used if the file
+ is over 2 GB in length.
+ @param pathName IN/OUT The path name for the file to open.
+ @param mode IN/OUT The mode in which the file is opened. It must
+ be an OR of the ASFile Open Modes.
+ @param fP IN/OUT (Filled by the callback) The newly opened file.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysCloseProc
+ @see ASFileSysOpenFile
+ @see ASFileReopen
+ @see ASFileClose
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysOpen64Proc)(ASPathName pathName, ASFileMode mode, ASMDFile *fP);
+
+/**
+ A callback for ASFileSysRec that returns the maximum file position that
+ can be processed by this file system. This is not the maximum size file
+ that can be created, but the maximum file position that can be handled
+ by the arithmetic in the file system implementation. This will typically
+ be <code>(2 ^ 31) - 1</code> or <code>(2 ^ 63) - 1</code>. If this entry is not present, a value of
+ <code>(2 ^ 31) - 1</code> should be assumed.
+ @param pos IN/OUT The maximum file position that can be handled.
+
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysGetFilePosLimit
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetFilePositionLimitProc)(ASFilePos64 *pos);
+
+/**
+ A callback for ASFileSysRec that sets the current position in
+ a file, which is the point from which data will next be
+ read. It is called by ASFileSetPos() and is capable of handling file postions
+ over 2 GB.
+ @param f IN/OUT The file in which the position is set.
+ @param pos IN/OUT The desired new position, specified in bytes
+ from the beginning of the file.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileGetPos
+ @see ASFileSetPos
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysSetPos64Proc)(ASMDFile f, ASFilePos64 pos);
+
+/**
+ A callback that gets the current position for the specified file. It is called
+ by ASFileGetPos(), and is capable of handling file postions over 2 GB.
+ @param f IN/OUT The file whose current position is obtained.
+ @param pos IN/OUT (Must by filled by the callback) The current
+ position.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysSetPosProc
+ @see ASFileGetPos
+ @see ASFileSetPos
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetPos64Proc)(ASMDFile f, ASFilePos64 *pos);
+
+/**
+ A callback for ASFileSysRec that increases or decreases the logical
+ size of a file. It is called by ASFileSetEOF() and is capable of handling
+ file sizes over 2 GB.
+ @param f IN/OUT The file to expand or shrink.
+ @param pos IN/OUT The desired size in bytes.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileGetEOF
+ @see ASFileSetEOF
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysSetEof64Proc)(ASMDFile f, ASFilePos64 pos);
+
+/**
+ A callback for ASFileSysRec that gets a file's current logical
+ size. It is called by ASFileGetEOF() and is capable of handling file sizes over
+ 2 GB.
+ @param f IN/OUT The file whose logical size is obtained.
+ @param pos IN/OUT (Filled by the callback) The file's logical
+ size in bytes.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileGetEOF
+ @see ASFileSetEOF
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetEof64Proc)(ASMDFile f, ASFilePos64 *pos);
+
+/**
+ A callback for ASFileSysRec that gets the Windows Explorer/Mac Finder
+ representation for the specified ASPathName as an ASText object. This
+ may be a localized and extension-stripped version of the filename.
+
+ @param pathName The ASPathName for which the name
+ is returned.
+ @param nameForDisplay (Filled by the callback) An ASText object for
+ the name for <code>pathName</code>.
+ @return <code>0</code> if the request was successful, a non-zero
+ platform-dependent error code otherwise.
+*/
+typedef ACCBPROTO1 ASErrorCode (ACCBPROTO2 *ASFileSysGetNameForDisplayProc)
+ (ASPathName pathName, ASText nameForDisplay);
+
+/**
+ A callback for ASFileSysRec that gets the amount of free space
+ on the volume containing the specified ASPathName.
+ It is similar to ASFileSysGetStorageFreeSpace(), except that the return
+ value is not limited to 4 GB (with a 64-bit return value).
+ @param pathName The ASPathName for a file on the volume
+ whose free space is obtained.
+ @return The free space in bytes.
+*/
+typedef ACCBPROTO1 ASDiskSpace64 (ACCBPROTO2 *ASFileSysGetStorageFreeSpace64Proc)(ASPathName pathName);
+
+/**
+ A callback for <code>ASFileSysRec</code> that tests whether a file is in use by
+ another process.
+ @param pathName IN The ASPathName of the file to be tested.
+
+ @return <code>0</code> if the file is not in use, a non-zero value if the file is in use.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASFileSysIsInUseProc)(ASPathName pathName);
+
+/**
+ A data structure containing callbacks that implement a file
+ system.
+ @see ASFileSys
+*/
+typedef struct _t_ASFileSysRec {
+
+ /** The size of the data structure. It must be set to <code>sizeof( ASFileSysRec)</code>. */
+ ASSize_t size;
+
+ /** Open file callback. */
+ ASFileSysOpenProc open;
+
+ /** Close file callback. */
+ ASFileSysCloseProc close;
+
+ /** Flush callback. */
+ ASFileSysFlushProc flush;
+
+ /** Set position callback. */
+ ASFileSysSetPosProc setpos;
+
+ /** Get position callback. */
+ ASFileSysGetPosProc getpos;
+
+ /** Set a file's current logical size. */
+ ASFileSysSetEofProc seteof;
+
+ /** Get a file's current logical size. */
+ ASFileSysGetEofProc geteof;
+
+ /** Read file callback. */
+ ASFileSysReadProc read;
+
+ /** Write file callback. */
+ ASFileSysWriteProc write;
+
+ /** Remove file callback. */
+ ASFileSysRemoveProc remove;
+
+ /** Rename file callback. */
+ ASFileSysRenameProc rename;
+
+ /** Is the same file. */
+ ASFileSysIsSameFileProc isSameFile;
+
+ /** Get the file name. */
+ ASFileSysGetNameProc getName;
+
+ /** Get the temporary path name. */
+ ASFileSysGetTempPathNameProc getTempPathName;
+
+ /** Copy the path name. */
+ ASFileSysCopyPathNameProc copyPathName;
+
+ /** Get the device-independent path from the path. */
+ ASFileSysDiPathFromPathProc diPathFromPath;
+
+ /** Get the path from the device-independent path. */
+ ASFileSysPathFromDIPathProc pathFromDIPath;
+
+ /** Dispose the path name. */
+ ASFileSysDisposePathNameProc disposePathName;
+
+ /** Get the file system name.*/
+ ASFileSysGetFileSysNameProc getFileSysName;
+
+ /** Get the amount of free space on the volume. */
+ ASFileSysGetStorageFreeSpaceProc getStorageFreeSpace;
+
+ /** Flush the volume. */
+ ASFileSysFlushVolumeProc flushVolume;
+ /* Added for Acrobat 3.0) */
+
+ /** Get the file flags. */
+ ASFileSysGetFileFlags getFileFlags;
+ /*
+ ** These functions return zero on successful queue, and a non-zero
+ ** platform dependent error code on failure to queue. If IODoneProc is
+ ** non-zero (meaning try to operate async), and Read or Write returns
+ ** non-zero (meaning failure to queue), IODoneProc MUST NOT BE CALLED.
+ */
+
+ /** Asynchronous read. */
+ ASFileSysAsyncReadProc readAsync;
+
+ /** Asynchronous write. */
+ ASFileSysAsyncWriteProc writeAsync;
+
+ /** Asynchronous abort. */
+ ASFileSysAsyncAbortProc abortAsync;
+
+ /** Yield callback. */
+ ASFileSysYieldProc yield;
+
+ /** Asynchronous request for a byte range. */
+ ASFileSysMReadRequestProc mreadRequest;
+
+ /** Retrieve the status. */
+ ASFileSysGetStatusProc getStatus;
+
+
+ /** Create the path name. */
+ ASFileSysCreatePathNameProc createPathName;
+
+ /** Acquire the path. */
+ ASFileSysAcquireFileSysPathProc acquireFileSysPath;
+
+ /** Drop read request. */
+ ASFileSysClearOutstandingMReadsProc clearOutstandingMReads;
+ /* END of Acrobat 3.0 ASFileSys definition */
+
+ /* Added for Acrobat 5.0 */
+
+ /** Get the file description. */
+ ASFileSysGetItemPropsProc getItemProps;
+
+ /** Begin iterating through the folder. */
+ ASFileSysFirstFolderItemProc firstFolderItem;
+
+ /** Get the next folder item. */
+ ASFileSysNextFolderItemProc nextFolderItem;
+
+ /** Destroy the folder iterator. */
+ ASFileSysDestroyFolderIteratorProc destroyFolderIterator;
+
+ /** Set the file mode. */
+ ASFileSysSetModeProc setFileMode;
+
+ /** Get the URL from the path. */
+ ASFileSysURLFromPathProc urlFromPath;
+
+ /** Get the parent of the input path. */
+ ASFileSysGetParentProc getParent;
+
+ /** Create a folder. */
+ ASFileSysCreateFolderProc createFolder;
+
+ /** Remove a folder. */
+ ASFileSysRemoveFolderProc removeFolder;
+
+ /** Get a display string representing the path. */
+ ASFileSysDisplayStringFromPathProc displayStringFromPath;
+
+ /** Set the type and creator. */
+ ASFileSysSetTypeAndCreatorProc setTypeAndCreator;
+
+ /** Get the type and creator. */
+ ASFileSysGetTypeAndCreatorProc getTypeAndCreator;
+
+ /** Reopen the file. */
+ ASFileSysReopenProc reopen;
+
+ /** Perform a hard flush on the file. */
+ ASFileSysHardFlushProc hardFlush;
+
+ /* Added for Acrobat 6.0 */
+
+ /** Deprecated. Get the platform file system representation. */
+ ASFileSysGetPlatformThingProc getPlatformThing; /* deprecated */
+
+ /** Get the file item properties in <code>ASCab</code> format. */
+ ASFileSysGetItemPropsAsCabProc getItemPropsAsCab;
+
+ /** Test whether an operation can be performed. */
+ ASFileSysCanPerformOpOnItemProc canPerformOpOnItem;
+
+ /** Perform the operation. */
+ ASFileSysPerformOpOnItemProc performOpOnItem;
+
+ /** Acquire the platform path. */
+ ASFileSysAcquirePlatformPathProc acquirePlatformPath;
+
+ /** Release the platform path. */
+ ASFileSysReleasePlatformPathProc releasePlatformPath;
+
+ /** Get the file name as an <code>ASText</code> object. */
+ ASFileSysGetNameAsASTextProc getNameAsASText;
+
+ /** Get the path for display. */
+ ASFileSysDisplayASTextFromPathProc displayASTextFromPath;
+
+ /** The byte range has arrived. */
+ ASFileSysRangeArrivedProc rangeArrived;
+
+ /** Determine whether the <code>ASFileSys</code> can set the end of file marker (EOF) to a new offset for the specified file. */
+ ASFileSysCanSetEofProc canSetEof;
+
+ /** Convert a path to a device-independent path. */
+ ASFileSysDIPathFromPathExProc diPathFromPathEx;
+
+ /** Convert a device-independent path to a path. */
+ ASFileSysPathFromDIPathExProc pathFromDIPathEx;
+
+ /** Get the maximum file position that can be processed by this file system. */
+ ASFileSysGetFilePositionLimitProc getfileposlimit;
+
+ /** Open a file over 2 GB in length. */
+ ASFileSysOpen64Proc open64;
+
+ /** Set the current position in a file over 2 GB in length. */
+ ASFileSysSetPos64Proc setpos64;
+
+ /** Get the current position in a file over 2 GB in length. */
+ ASFileSysGetPos64Proc getpos64;
+
+ /** Increase or decrease the logical size for a file over 2 GB in length. */
+ ASFileSysSetEof64Proc seteof64;
+
+ /** Get a file's current logical size for a file over 2 GB in length. */
+ ASFileSysGetEof64Proc geteof64;
+
+ /** Gets the Windows Explorer or Mac Finder representation of the specified <code>ASPathName</code> as an <code>ASText</code> object. */
+ ASFileSysGetNameForDisplayProc getNameForDisplay;
+
+ /* Added for Acrobat 8.0 */
+
+ /** Get the amount of free space on the volume. */
+ ASFileSysGetStorageFreeSpace64Proc getStorageFreeSpace64;
+
+
+ /* Added for Acrobat 9.0 */
+
+ /** Determine whether the file is in use by another process. */
+ ASFileSysIsInUseProc isInUse;
+
+} ASFileSysRec;
+
+/*------------------------------------------------------------------------
+ Generic monitor typedefs
+-------------------------------------------------------------------------*/
+
+
+/**
+ A callback used in ASProgressMonitor that initializes the progress
+ monitor and displays it with a current value of zero. This
+ method must be called first when the progress monitor is
+ used.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to whatever API method required the progress monitor.
+
+ @see PMEndOperationProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PMBeginOperationProc)(void *clientData);
+
+/**
+ A callback used in ASProgressMonitor that draws the progress monitor
+ with its current value set to the progress monitor's duration
+ (a full progress monitor), then removes the progress monitor
+ from the display.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to whatever API method required the progress monitor.
+
+ @see PMBeginOperationProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PMEndOperationProc)(void *clientData);
+
+/**
+ A callback used in ASProgressMonitor that sets the value that corresponds
+ to a full progress monitor display. The progress monitor
+ is subsequently filled in by setting its current value.
+ This method must be called before you can set the progress
+ monitor's current value.
+ @param duration IN/OUT The maximum value the progress monitor
+ will be allowed to have.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to whatever API method required the progress monitor.
+
+ @see PMGetDurationProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PMSetDurationProc)(ASDuration duration, void *clientData);
+
+/**
+ A callback used in ASProgressMonitor that sets the current value
+ of the progress monitor and updates the display. The allowed
+ value ranges from <code>0</code> (empty) to the value passed to <code>setDuration</code>.
+ For example, if the progress monitor's duration is <code>10</code>, the
+ current value must be between <code>0</code> and <code>10</code>, inclusive.
+ @param currValue IN/OUT The progress monitor's current value.
+
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to whatever API method required the progress monitor.
+
+ @see PMGetCurrValueProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PMSetCurrValueProc)(ASDuration currValue, void *clientData);
+
+/**
+ A callback used in ASProgressMonitor that gets the progress monitor's
+ duration, set by the most recent call to the progress monitor's
+ PMSetDurationProc().
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to whatever API method required the progress monitor.
+
+ @return The progress monitor's maximum value.
+ @see PMSetDurationProc
+*/
+typedef ACCBPROTO1 ASDuration (ACCBPROTO2 *PMGetDurationProc)(void *clientData);
+
+/**
+ A callback used in ASProgressMonitor that gets the progress monitor's
+ duration, set by the most recent call to the progress monitor's
+ PMSetCurrValueProc().
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to whatever API method required the progress monitor.
+
+ @see PMSetCurrValueProc
+*/
+typedef ACCBPROTO1 ASDuration (ACCBPROTO2 *PMGetCurrValueProc)(void *clientData);
+
+/**
+ A callback within ASProgressMonitorRec that sets the text
+ string that is displayed by the progress monitor.
+
+ <p>The built-in document progress monitor (see AVAppGetDocProgressMonitor())
+ makes a copy of the text. As such, it is the client's responsibility
+ to destroy it. </p>
+
+ @param text IN/OUT The string to display.
+ @param clientData IN/OUT A pointer to the data associated with
+ the progress monitor (which should be passed in with
+ the progress monitor).
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PMSetTextProc)(ASText text, void *clientData);
+
+/**
+ <p>Replaced by ASProgressMonitor in Acrobat 5.0.</p>
+
+ <p>A data structure containing callbacks that implement a progress
+ monitor. The callbacks implement the progress monitor functions.
+ A progress monitor is used to display progress during potentially
+ time-consuming operations. Progress monitors are included
+ as parameters in many API calls. Acrobat's built-in progress
+ monitor can be obtained by calling AVAppGetDocProgressMonitor().</p>
+
+ @see AVAppGetDocProgressMonitor
+ @see PDDocCreateThumbs
+ @see PDDocSave
+*/
+typedef struct _t_ProgressMonitor
+{
+
+ /** The size of the data structure. It must be set to <code>sizeof(ProgressMonitorRec)</code>.
+ */
+ ASSize_t size;
+
+ /** Initialize the progress monitor and display it with a current value of zero. */
+ PMBeginOperationProc beginOperation;
+
+ /** Draw the progress monitor with its current value set to the progress monitor's duration (a full progress monitor). */
+ PMEndOperationProc endOperation;
+
+ /** Set the progress monitor's duration. */
+ PMSetDurationProc setDuration;
+
+ /** Set the current value of the progress monitor and update the display. */
+ PMSetCurrValueProc setCurrValue;
+
+ /** Get the progress monitor's duration. */
+ PMGetDurationProc getDuration;
+
+ /** Get the progress monitor's duration. */
+ PMGetCurrValueProc getCurrValue;
+
+ /** Set the text string that is displayed by the progress monitor. */
+ PMSetTextProc setText;
+}
+ASProgressMonitorRec, *ASProgressMonitor;
+
+/* Allow clients to use the older names, without the "AS" prefix.
+These are present only for backward compatibility - they must
+not be used for new code. */
+#define ProgressMonitor ASProgressMonitor
+#define ProgressMonitorRec ASProgressMonitorRec
+
+/**
+ <p>This callback replaces CancelProc().</p>
+
+ <p>A callback to check for cancelling operations. An ASCancelProc()
+ is typically passed to some method that takes a long time
+ to complete. At frequent intervals, the method calls the
+ ASCancelProc(). If it returns <code>true</code>, the method cancels
+ its operation; if it returns <code>false</code>, it continues. </p>
+ @param clientData IN/OUT User-supplied data that was passed to
+ the method that uses the ASCancelProc().
+ @return <code>true</code> if the processing is to be canceled, <code>false</code> otherwise.
+
+ @see PDFLPrintCancelProc (Only available with the PDF Library SDK)
+
+ @see AVAppGetCancelProc
+ @see PDDocCreateThumbs
+ @see PDDocInsertPages
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASCancelProc)(void *clientData);
+
+/* Define older name for backward compatibilty. Do not use this older name
+in new code */
+#define CancelProc ASCancelProc
+
+/* ASPortRef */
+#if MAC_PLATFORM
+typedef CGrafPtr ASPortRef;
+#elif WIN_PLATFORM
+
+/**
+ Provides access to a port. On Windows, ASPortRef is the same as <code>HDC</code>.
+*/
+typedef void* ASPortRef;
+#elif UNIX_PLATFORM
+typedef void* ASPortRef;
+#endif
+
+/* ASWindowRef */
+#if MAC_PLATFORM
+typedef WindowRef ASWindowRef;
+#elif WIN_PLATFORM
+
+/**
+ A platform-dependent window handle corresponding to an <code>HWND</code> in Windows,
+ a <code>WindowPtr</code> on Mac OS, and a <code>Widget</code> on UNIX.
+*/
+typedef void* ASWindowRef;
+#elif UNIX_PLATFORM
+typedef void* ASWindowRef;
+#endif
+
+#if DEBUG
+#define CHECKTYPE(type, data) ((void *)((data) == ((type)data) ? data : data))
+#else /* !DEBUG */
+#define CHECKTYPE(type, data) ((void *)data)
+#endif /* !DEBUG */
+
+/* Helper defines for the mystical ASFileSysCreatePathName. */
+/**
+ A helper macro for the ASFileSysCreatePathName() method.
+ @param asfs (May be <code>NULL</code>) The file system through which
+ the ASPathName is obtained.
+ @param cDIPath A C string containing the device-independent
+ path for which the ASPathName is obtained.
+ @param aspRelativeTo (May be <code>NULL</code>) An ASPathName against which
+ <code>cDIPath</code> will be evaluated if it contains a relative
+ path.
+ @see ASFileSysCreatePathFromCString
+ @see ASFileSysCreatePathFromFSSpec
+ @see ASFileSysCreatePathWithFolderName
+*/
+#define ASFileSysCreatePathFromDIPath(asfs, cDIPath, aspRelativeTo) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("DIPath"), \
+ (void *)CHECKTYPE(char *, cDIPath), (void *)CHECKTYPE(ASPathName, aspRelativeTo))
+/** */
+#define ASFileSysCreatePathFromDIPathText(asfs, tDIPath, aspRelativeTo) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("DIPathWithASText"), \
+ (void *)CHECKTYPE(ASText, tDIPath), (void *)CHECKTYPE(ASPathName, aspRelativeTo))
+/**
+ Helper macro for the ASFileSysCreatePathName() method.
+ @param asfs (May be <code>NULL</code>) The file system through which
+ the ASPathName is obtained.
+ @param aspFolder An ASPathName containing the path of the
+ folder.
+ @param cFileName A C string containing the name of the
+ file. The returned ASPathName contains the result of appending
+ <code>cFileName</code> to <code>aspFolder</code>.
+ @see ASFileSysCreatePathFromCString
+ @see ASFileSysCreatePathFromDIPath
+ @see ASFileSysCreatePathFromFSSpec
+*/
+#define ASFileSysCreatePathWithFolderName(asfs, aspFolder, cFileName) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("FolderPathName"), \
+ (void *)CHECKTYPE(ASPathName, aspFolder), (void *)CHECKTYPE(char *, cFileName))
+/** */
+#define ASFileSysCreatePathWithFolderNameWithASText(asfs, aspFolder, tFileName) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("FolderPathNameWithASText"), \
+ (void *)CHECKTYPE(ASPathName, aspFolder), (void *)CHECKTYPE(ASText, tFileName))
+/**
+ Helper macro for the ASFileSysCreatePathName() method.
+
+ @param asfs (May be <code>NULL</code>) The file system through which
+ the ASPathName is obtained.
+ @param cPath A C string containing the path for which
+ the ASPathName is obtained.
+ @see ASFileSysCreatePathFromDIPath
+ @see ASFileSysCreatePathFromFSSpec
+ @see ASFileSysCreatePathWithFolderName
+ @note This macro uses a local variable named <code>scratchFourBytes</code>:
+ (<code>void* scratchFourBytes</code>). PDF Library users need to provide
+ this variable in order to utilize the macro; the variable
+ must be local to the client application, not to the library.
+ Any client can use this macro provided that it has code
+ similar to the following, in the same source file that uses
+ the macro: <code>static void* scratchFourBytes;</code>
+*/
+#define ASFileSysCreatePathFromCString(asfs, cPath) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("Cstring"), \
+ (void *)CHECKTYPE(char *, cPath), NULL);
+#if MAC_PLATFORM
+/**
+ Helper macro for the ASFileSysCreatePathName() method.
+ @param asfs (May be <code>NULL</code>) The file system through which
+ the ASPathName is obtained.
+ @param cPath The FSSpec for which the ASPathName is obtained.
+ @see ASFileSysCreatePathFromCString
+ @see ASFileSysCreatePathFromDIPath
+ @see ASFileSysCreatePathWithFolderName
+*/
+#define ASFileSysCreatePathFromFSSpec(asfs, cPath) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("FSSpec"), \
+ (void *)CHECKTYPE(FSSpec *, cPath), NULL);
+/** */
+#define ASFileSysCreatePathFromFSRef(asfs, fsRef) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("FSRef"), \
+ (void *)CHECKTYPE(FSRef, fsRef), NULL);
+/** */
+#define ASFileSysCreatePathFromFSRefWithCFStringRef(asfs, fsRefWithCFStringRef) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("FSRefWithCFStringRef"), \
+ (void *)CHECKTYPE(FSRefWithCFStringRefRec *, fsRefWithCFStringRef), NULL);
+/** */
+#define ASFileSysCreatePathFromCFURLRef(asfs, cfURLRef) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("CFURLRef"), \
+ (void *)CHECKTYPE(CFURLRef, cfURLRef), NULL);
+/** */
+#define ASFileSysCreatePathFromPOSIXPath(asfs, posixPath) \
+ ASFileSysCreatePathName(asfs, ASAtomFromString("POSIXPath"), \
+ (void *)CHECKTYPE(char *, posixPath), NULL);
+#endif
+
+/* Definitions related to encodings and encoding conversions */
+
+
+/**
+ Describes the various Unicode formats you can place into
+ and read out of an ASText object.
+ @see ASTextFromUnicode
+ @see ASTextFromSizedUnicode
+ @see ASTextSetUnicode
+ @see ASTextSetSizedUnicode
+ @see ASTextGetUnicodeCopy
+*/
+enum {
+ /** Always returns the bytes in big-endian order.*/
+ kUTF16BigEndian,
+ /** Returns the bytes in the host's native endian order, whatever is natural for an ASUns16.*/
+ kUTF16HostEndian,
+ /** Endian neutral.*/
+ kUTF8,
+ /** Always returns the bytes in big-endian order.*/
+ kUTF32BigEndian,
+ /** Returns the bytes in the host's native endian order, whatever is natural for an ASUns32.*/
+ kUTF32HostEndian
+};
+typedef ASEnum16 ASUnicodeFormat;
+
+/**
+ An integer specifying the host encoding for text. On Mac OS,
+ it is a script code. On Windows, it is a <code>CHARSET id</code>.
+ In UNIX, Acrobat currently only supports English, so the
+ only valid ASHostEncoding is <code>0</code> (Roman). See ASScript.
+*/
+typedef ASInt32 ASHostEncoding;
+
+/** An ASUnicodeChar is large enough to hold any Unicode character
+ (at least 21 bits wide).
+*/
+typedef ASUns32 ASUnicodeChar;
+typedef ASUns32 ASUTF32Val;
+
+/**
+ Holds a single 16-bit value from a UTF-16 encoded Unicode
+ string. It is typically used to point to the beginning of an UTF-16
+ string. For example: <code> ASUTF16Val *utf16String = ... </code>
+ <p>This data type is not large enough to hold any arbitrary
+ Unicode character. Use ASUnicodeChar to pass individual
+ Unicode characters. </p>
+ @see ASTextGetUnicode
+ @see ASTextGetUnicodeCopy
+*/
+typedef ASUns16 ASUTF16Val;
+
+/** An ASUTF8Val holds a single 8-bit value from a UTF-8 encoded
+ Unicode string.
+*/
+typedef ASUns8 ASUTF8Val;
+
+/**
+ An enumeration of writing scripts. Not all of these scripts
+ are supported on all platforms.
+*/
+enum {
+
+ /** Roman. */
+ kASRomanScript,
+ /** Japanese. */
+ kASJapaneseScript,
+ /** Traditional Chinese. */
+ kASTraditionalChineseScript,
+ /** Korean. */
+ kASKoreanScript,
+ /** Arabic. */
+ kASArabicScript,
+ /** Hebrew. */
+ kASHebrewScript,
+ /** Greek. */
+ kASGreekScript,
+ /** Cyrillic. */
+ kASCyrillicScript,
+ /** RightLeft. */
+ kASRightLeftScript,
+ /** Devanagari. */
+ kASDevanagariScript,
+ /** Gurmukhi. */
+ kASGurmukhiScript,
+ /** Gujarati. */
+ kASGujaratiScript,
+ /** Oriya. */
+ kASOriyaScript,
+ /** Bengali. */
+ kASBengaliScript,
+ /** Tamil. */
+ kASTamilScript,
+ /** Telugu. */
+ kASTeluguScript,
+ /** Kannada. */
+ kASKannadaScript,
+ /** Malayalam. */
+ kASMalayalamScript,
+ /** Sinhalese. */
+ kASSinhaleseScript,
+ /** Burmese. */
+ kASBurmeseScript,
+ /** Khmer */
+ kASKhmerScript,
+ /** Thai */
+ kASThaiScript,
+ /** Laotian. */
+ kASLaotianScript,
+ /** Georgian. */
+ kASGeorgianScript,
+ /** Armenian. */
+ kASArmenianScript,
+ /** Simplified Chinese. */
+ kASSimplifiedChineseScript,
+ /** Tibetan. */
+ kASTibetanScript,
+ /** Mongolian. */
+ kASMongolianScript,
+ /** Ge'ez. */
+ kASGeezScript,
+ /** East European Roman. */
+ kASEastEuropeanRomanScript,
+ /** Vietnamese. */
+ kASVietnameseScript,
+ /** Extended Arabic. */
+ kASExtendedArabicScript,
+ /** Unicode. */
+ kASEUnicodeScript,
+ /** Unknown. */
+ kASDontKnowScript = -1
+};
+typedef ASInt32 ASScript;
+
+/* UUID structure */
+/**
+ A structure representing a universal unique identifier (UUID) for the current user or the
+ current session.
+*/
+typedef struct
+{
+ /** Timestamp low field. */
+ ASUns32 timeLow;
+ /** Timestamp middle field. */
+ ASUns16 timeMid;
+ /** Timestamp middle field multiplexed with the version number.*/
+ ASUns16 timeHiAndVersion;
+ /** High field of the clock sequence multiplexed with the variant. */
+ ASUns8 clockSeqHiAndReserved;
+ /** Low field of the clock sequence. */
+ ASUns8 clockSeqLow;
+ /** The spatially unique node identifier. */
+ ASUns8 node[6];
+} ASUUID;
+
+/**
+ A constant for the maximum string length of a unique identifier
+ (UUID).
+ @see ASUUIDToCString
+*/
+#define ASUUIDMaxStringLen 40 /* leave a bit of padding just in case */
+
+/*------------------------------------------------------------------------
+ typedefs for ASDate
+------------------------------------------------------------------------*/
+
+/* ASDate
+*
+*/
+
+/* string formats
+ kASTimePDF = "D:20000911121643-08'00'"
+ kASTimeUniversal = "2000.09.11 13:30:20 -08'00' DST"
+ kASTimeUniversalH = "2000-09-11 13:30:20 -08'00' DST"
+ kASTimeUTC_ASN1 = "000911203020Z"
+ kASTimeGENERALIZED_ASN1 = "20000911203020Z" */
+
+/** A constant indicating a string format for representing a date and time. */
+enum {
+ /** None. */
+ kASTimeNone=0,
+ /** PDF date format, as defined in the PDF Reference. */
+ kASTimePDF,
+ /** Slight variations of the time format expressed in ISO 8601. */
+ kASTimeUniversal,
+ /** Slight variations of the time format expressed in ISO 8601. */
+ kASTimeUniversalH,
+ /** UTC ASN1 format. */
+ kASTimeUTC_ASN1,
+ /** ASN1 format. */
+ kASTimeGENERALIZED_ASN1
+ };
+typedef ASEnum8 ASDateTimeFormat;
+
+/** An opaque object holding information for a particular date and time.
+ All ASDate objects are guaranteed to give accurate representation of UTC time, unadjusted for
+ leap seconds. This is due to the fact that the introduction of leap seconds
+ to the international calendar does not happen according to a well-defined
+ rule.
+ @see ASDateGetCurrentLocalTime
+ @note ASDate objects are not guaranteed to represent local time accurately.
+ To be exact, in Mac OS and UNIX, ASDate cannot always determine the prevailing
+ daylight saving rule for the operating system's time zone. See ASDateGetCurrentLocalTime()
+ for further explanation.
+*/
+typedef struct _t_ASDateRec *ASDate;
+
+/**
+ Represents a calendar time span used to calculate ambiguous
+ time spans such as 1 year and 3 months. A calendar time
+ span cannot be negative.
+ @see ASCalendarTimeSpanAddWithBase
+ @see ASCalendarTimeSpanCompare
+ @see ASCalendarTimeSpanDiff
+*/
+typedef struct _t_ASCalendarTimeSpan{
+ /** Year. */
+ ASUns32 Year;
+ /** Month. */
+ ASUns32 Month;
+ /** Day. */
+ ASUns32 Day;
+ /** Hour. */
+ ASUns32 Hour;
+ /** Minute. */
+ ASUns32 Minute;
+ /** Second. */
+ ASUns32 Second;
+} ASCalendarTimeSpanRec, *ASCalendarTimeSpan;
+
+/**
+ An ASTimeSpan represents an exact time span, measured in seconds. The internal representation uses
+ 64-bit signed integers to avoid the year 2037 problem. Negative timespans are allowed.
+*/
+typedef struct _t_ASTimeSpanRec *ASTimeSpan;
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_ASExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraCalls.h
new file mode 100644
index 0000000..ec00fde
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraCalls.h
@@ -0,0 +1,401 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1999-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASExtraCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_ASExtraCalls
+#define _H_ASExtraCalls
+
+#include "ASExtraExpT.h"
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _ASExtraHFT_LATEST_VERSION 0x00090000
+#define _ASExtraHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _ASEXTRAHFT_IS_BETA 0
+
+/* for public use */
+#define ASExtraHFT_LATEST_VERSION (_ASEXTRAHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _ASExtraHFT_LATEST_VERSION) : _ASExtraHFT_LATEST_VERSION)
+
+#define ASExtraHFT_VERSION_5 0x00050000
+#define ASExtraHFT_VERSION_6 0x00060000
+#define ASExtraHFT_VERSION_7 0x00070000
+#define ASExtraHFT_VERSION_9 ASExtraHFT_LATEST_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* "Routines" described as macros on top of real
+ HFT calls.
+ */
+ #define ASTextEqual(a, b) (ASTextCmp((a), (b)) == 0)
+
+#ifdef NPROC
+#undef NPROC
+#endif
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #include "ASExtraProcs.h"
+ #undef NPROC
+#endif /* !PLUGIN */
+
+#if PLUGIN
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+
+ enum {
+ ASExtraBAD_SELECTOR,
+ #include "ASExtraProcs.h"
+ ASExtraNUMSELECTORSplusOne
+ };
+
+ #define ASExtraNUMSELECTORS (ASExtraNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #include "ASExtraProcs.h"
+ #undef NPROC
+
+#if PI_ASEXTRA_VERSION != 0
+#ifdef THREAD_SAFE_PDFL
+ #define gASExtraHFT (GetHFTLocations()->asExtraHFT)
+ #define gASExtraVersion (GetHFTLocations()->asExtraVersion)
+#else
+ extern HFT gASExtraHFT;
+ extern ASUns32 gASExtraVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+#define ASEXTRAROUTINE(level, name) (ACROASSERT(gASExtraVersion >=level), *((name##SELPROTO)(gASExtraHFT[name##SEL])))
+
+#if !STATIC_HFT
+ /* version 5.0 routines */
+ #define ASScriptToHostEncoding ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASScriptToHostEncoding)
+ #define ASScriptFromHostEncoding ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASScriptFromHostEncoding)
+ #define ASTextNew ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextNew)
+ #define ASTextFromUnicode ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromUnicode)
+ #define ASTextFromSizedUnicode ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromSizedUnicode)
+ #define ASTextFromEncoded ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromEncoded)
+ #define ASTextFromSizedEncoded ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromSizedEncoded)
+ #define ASTextFromScriptText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromScriptText)
+ #define ASTextFromSizedScriptText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromSizedScriptText)
+ #define ASTextFromPDText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromPDText)
+ #define ASTextFromSizedPDText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromSizedPDText)
+ #define ASTextDestroy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextDestroy)
+ #define ASTextSetUnicode ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetUnicode)
+ #define ASTextSetSizedUnicode ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetSizedUnicode)
+ #define ASTextSetEncoded ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetEncoded)
+ #define ASTextSetSizedEncoded ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetSizedEncoded)
+ #define ASTextSetScriptText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetScriptText)
+ #define ASTextSetSizedScriptText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetSizedScriptText)
+ #define ASTextSetPDText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetPDText)
+ #define ASTextSetSizedPDText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetSizedPDText)
+ #define ASTextGetUnicode ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetUnicode)
+ #define ASTextGetUnicodeCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetUnicodeCopy)
+ #define ASTextGetEncoded ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetEncoded)
+ #define ASTextGetEncodedCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetEncodedCopy)
+ #define ASTextGetScriptText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetScriptText)
+ #define ASTextGetScriptTextCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetScriptTextCopy)
+ #define ASTextGetPDTextCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetPDTextCopy)
+ #define ASTextGetBestEncoding ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetBestEncoding)
+ #define ASTextGetBestScript ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetBestScript)
+ #define ASTextGetCountry ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetCountry)
+ #define ASTextSetCountry ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetCountry)
+ #define ASTextGetLanguage ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextGetLanguage)
+ #define ASTextSetLanguage ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextSetLanguage)
+ #define ASTextCat ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextCat)
+ #define ASTextCatMany ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextCatMany)
+ #define ASTextCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextCopy)
+ #define ASTextDup ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextDup)
+ #define ASTextCmp ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextCmp)
+ #define ASTextReplace ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextReplace)
+ #define ASTextReplaceASCII ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextReplaceASCII)
+
+ #define ASCabNew ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabNew)
+ #define ASCabFromEntryList ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabFromEntryList)
+ #define ASCabDestroy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDestroy)
+ #define ASCabNumEntries ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabNumEntries)
+ #define ASCabKnown ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabKnown)
+ #define ASCabGetType ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetType)
+ #define ASCabEnum ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabEnum)
+ #define ASCabRemove ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabRemove)
+ #define ASCabGetBool ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetBool)
+ #define ASCabPutBool ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutBool)
+ #define ASCabGetInt ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetInt)
+ #define ASCabPutInt ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutInt)
+ #define ASCabGetAtom ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetAtom)
+ #define ASCabPutAtom ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutAtom)
+ #define ASCabGetDouble ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetDouble)
+ #define ASCabPutDouble ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutDouble)
+ #define ASCabGetPointerRaw ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetPointerRaw)
+ #define ASCabDetachPointerRaw ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDetachPointerRaw)
+ #define ASCabPutPointerRaw ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutPointerRaw)
+ #define ASCabGetPointerDestroyProc ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetPointerDestroyProc)
+ #define ASCabGetPointerType ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetPointerType)
+ #define ASCabPutCab ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutCab)
+ #define ASCabGetCab ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetCab)
+ #define ASCabDetachCab ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDetachCab)
+ #define ASCabGetString ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetString)
+ #define ASCabGetStringCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetStringCopy)
+ #define ASCabDetachString ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDetachString)
+ #define ASCabPutString ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutString)
+ #define ASCabGetText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetText)
+ #define ASCabDetachText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDetachText)
+ #define ASCabPutText ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutText)
+ #define ASCabGetBinary ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetBinary)
+ #define ASCabGetBinaryCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetBinaryCopy)
+ #define ASCabDetachBinary ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDetachBinary)
+ #define ASCabPutBinary ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutBinary)
+ #define ASCabPutNull ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutNull)
+ #define ASCabMakeEmpty ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabMakeEmpty)
+ #define ASCabDestroyEmpties ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDestroyEmpties)
+ #define ASCabCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabCopy)
+ #define ASCabDup ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDup)
+ #define ASCabValueEqual ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabValueEqual)
+ #define ASCabEqual ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabEqual)
+ #define ASCabMunge ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabMunge)
+ #define ASCabPutPathName ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabPutPathName)
+ #define ASCabGetPathNameCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabGetPathNameCopy)
+ #define ASCabDetachPathName ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabDetachPathName)
+ #define ASCabWriteToStream ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabWriteToStream)
+ #define ASCabReadFromStream ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabReadFromStream)
+
+ #define ASCabRename ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASCabRename)
+ #define ASTextIsEmpty ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextIsEmpty)
+ #define ASTextNormalizeEndOfLine ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextNormalizeEndOfLine)
+
+ #define ASTextFromInt32 ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromInt32)
+ #define ASTextFromUns32 ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextFromUns32)
+
+ #define ASTextMakeEmpty ASEXTRAROUTINE(ASExtraHFT_VERSION_5,ASTextMakeEmpty)
+
+ /* version 6.0 routines */
+
+ #define ASTextReplaceBadChars ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTextReplaceBadChars)
+ #define ASCabGetUns ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASCabGetUns)
+ #define ASCabPutUns ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASCabPutUns)
+/* ASDate API #defines.
+*/
+ #define ASDateNew ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateNew)
+ #define ASDateCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateCopy)
+ #define ASDateDup ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateDup)
+ #define ASDateClear ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateClear)
+ #define ASDateDestroy ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateDestroy)
+ #define ASTimeSpanNew ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanNew)
+ #define ASTimeSpanCopy ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanCopy)
+ #define ASTimeSpanDup ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanDup)
+ #define ASTimeSpanDestroy ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanDestroy)
+ #define ASDateSetToCurrentUTCTime ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateSetToCurrentUTCTime)
+ #define ASDateSetToCurrentLocalTime ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateSetToCurrentLocalTime)
+ #define ASDateSetLocalTimeOffset ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateSetLocalTimeOffset)
+ #define ASDateSetTimeFromString ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateSetTimeFromString)
+ #define ASDateSetTimeFromRec ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateSetTimeFromRec)
+ #define ASDateSubtractCalendarTimeSpan ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateSubtractCalendarTimeSpan)
+ #define ASDateAddCalendarTimeSpan ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateAddCalendarTimeSpan)
+ #define ASDateSubtractTimeSpan ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateSubtractTimeSpan)
+ #define ASDateAddTimeSpan ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateAddTimeSpan)
+ #define ASDateCalendarDiff ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateCalendarDiff)
+ #define ASDateExactDiff ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateExactDiff)
+ #define ASDateGetTimeString ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateGetTimeString)
+ #define ASDateGetUTCTime ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateGetUTCTime)
+ #define ASDateGetLocalTimeNoDST ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateGetLocalTimeNoDST)
+ #define ASDateGetLocalTime ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateGetLocalTime)
+ #define ASCalendarTimeSpanCompare ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASCalendarTimeSpanCompare)
+ #define ASTimeSpanCompare ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanCompare)
+ #define ASCalendarTimeSpanAddWithBase ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASCalendarTimeSpanAddWithBase)
+ #define ASTimeSpanAdd ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanAdd)
+ #define ASCalendarTimeSpanDiff ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASCalendarTimeSpanDiff)
+ #define ASTimeSpanDiff ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanDiff)
+ #define ASDateCompare ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASDateCompare)
+ #define ASTimeSpanSetFromASInt32 ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanSetFromASInt32)
+ #define ASTimeSpanSetFromString ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanSetFromString)
+ #define ASTimeSpanSet ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanSet)
+ #define ASTimeSpanNegate ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanNegate)
+
+
+ #define ASTextEval ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTextEval)
+ #define ASFileSysGetItemPropsAsCab ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASFileSysGetItemPropsAsCab)
+ #define ASFileSysConvertCabToItemProps ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASFileSysConvertCabToItemProps)
+ #define ASFileSysConvertItemPropsToCab ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASFileSysConvertItemPropsToCab)
+ #define ASFileSysCanPerformOpOnItem ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASFileSysCanPerformOpOnItem)
+ #define ASFileSysPerformOpOnItem ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASFileSysPerformOpOnItem)
+
+ #define ASIsValidUTF8 ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASIsValidUTF8)
+ #define ASTextCaseSensitiveCmp ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTextCaseSensitiveCmp)
+
+ #define ASConstCabEnum ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASConstCabEnum)
+
+ #define ASTextFilter ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTextFilter)
+
+ #define ASTimeSpanGetASInt32 ASEXTRAROUTINE(ASExtraHFT_VERSION_6,ASTimeSpanGetASInt32)
+
+ #define ASCabGetInt64 ASEXTRAROUTINE(ASExtraHFT_VERSION_7,ASCabGetInt64)
+ #define ASCabPutInt64 ASEXTRAROUTINE(ASExtraHFT_VERSION_7,ASCabPutInt64)
+ #define ASCabGetUns64 ASEXTRAROUTINE(ASExtraHFT_VERSION_7,ASCabGetUns64)
+ #define ASCabPutUns64 ASEXTRAROUTINE(ASExtraHFT_VERSION_7,ASCabPutUns64)
+
+ /* version 9.0 routines */
+
+ #define ASTextMakeEmptyClear ASEXTRAROUTINE(ASExtraHFT_VERSION_9,ASTextMakeEmptyClear)
+ #define ASUCS_GetPasswordFromUnicode ASEXTRAROUTINE(ASExtraHFT_VERSION_9,ASUCS_GetPasswordFromUnicode)
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* !STATIC_HFT */
+
+#endif /* PI_ASEXTRA_VERSION */
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+ /* You shouldn't call the RAW forms of these routines
+ but instead use the macros below.
+ */
+ /*
+ HPUX note: 11/28/06, see watson bug 1419712.
+ With HPUX's aCC compiler, the templates below cause compile errors for
+ client code if the client has PI_ASEXTRA_VERSION = 0. The simple fix
+ of doing something like wrapping the code below in if PI_ASEXTRA_VERSION
+ doesn't work because
+
+ - the internal implementation depends on these macros
+
+ - the conditions under which the code below should be included even on
+ clients is more complicted than just looking at PI_ASEXTRA_VERSION.
+
+ - it's pretty hard to test to make sure a general change in this public
+ header hasn't broken anything on the various platforms and clients.
+
+ therefore, the HPUX_ACC version will just fall back to the C-style
+ macros.
+ */
+#if defined(__cplusplus) && !defined(HPUX_ACC)
+ template <class T>
+ inline T ASCabGetPointerTypeSafe(ASCab theCab, const char *keyName, char *expectedType)
+ {
+#if !defined(__GNUG__) && !defined(_xlC__)
+ return reinterpret_cast<T>(ASCabGetPointerRaw(theCab, keyName, expectedType));
+#else
+ return (T)(ASCabGetPointerRaw(theCab, keyName, expectedType));
+#endif
+ }
+ #define ASCabGetPointer(theCab, theKey, theType) \
+ ASCabGetPointerTypeSafe<theType>(theCab, theKey, #theType)
+
+ template <class T>
+ inline void ASCabPutPointerTypeSafe(ASCab theCab, const char *keyName, const char *theType,
+ T ptrValue, ASCabPointerDestroyProc destroyProc)
+ {
+ ASCabPutPointerRaw(theCab, keyName, theType, (void *) ptrValue, destroyProc);
+ }
+ #define ASCabPutPointer(theCab, theKey, theType, thePtr, destroyProc) \
+ ASCabPutPointerTypeSafe<theType>(theCab, theKey, #theType, thePtr, destroyProc)
+
+ template <class T>
+ inline T ASCabDetachPointerTypeSafe(ASCab theCab, const char *keyName, const char *expectedType,
+ ASBool *isFree)
+ {
+ return reinterpret_cast<T>(ASCabDetachPointerRaw(theCab, keyName, expectedType, isFree));
+ }
+ #define ASCabDetachPointer(theCab, theKey, theType, noRefs) ((theType) \
+ ASCabDetachPointerTypeSafe<theType>(theCab, theKey, #theType, noRefs))
+
+#else
+ #define ASCabGetPointer(theCab, theKey, theType) \
+ ((theType) ASCabGetPointerRaw((theCab), (theKey), #theType))
+ #define ASCabPutPointer(theCab, theKey, theType, thePtr, destroyProc) \
+ ASCabPutPointerRaw((theCab), (theKey), #theType, (thePtr), (destroyProc))
+ #define ASCabDetachPointer(theCab, theKey, theType, noRefs) ((theType) \
+ ASCabDetachPointerRaw((theCab), (theKey), #theType, (noRefs)))
+#endif /* __cplusplus */
+
+#endif /* _H_ASExtraCalls */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraExpT.h
new file mode 100644
index 0000000..741ad7e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraExpT.h
@@ -0,0 +1,457 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1999-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASExtraExpT.h
+
+ - Types, macros, structures, etc. required to use the ASExtra HFT.
+
+*********************************************************************/
+
+#ifndef _H_ASExtraExpT
+#define _H_ASExtraExpT
+
+#include "Environ.h"
+
+#if PLUGIN || ACROBAT_LIBRARY
+#include "CoreExpT.h"
+#include "ASExpT.h"
+#else
+#include "ASBasic.h"
+#include "ASTypes.h"
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** */
+typedef ASUTF16Val ASUniChar;
+/** */
+typedef ASUns16 ASCountryCode;
+/** */
+typedef ASUns16 ASLanguageCode;
+
+
+/**
+*/
+enum {
+
+ /** Does nothing. */
+ kASTextFilterIdentity,
+
+ /** Normalizes line endings (equivalent to ASTextNormalizeEndOfLine()). */
+ kASTextFilterLineEndings,
+
+ /** Makes all text upper case. DEPRECATED: Case is not a reliably localizable concept. Do not use this. */
+ kASTextFilterUpperCase,
+
+ /** Makes all text lower case. DEPRECATED: Case is not a reliably localizable concept. Do not use this. */
+ kASTextFilterLowerCase,
+
+ /** Changes any ASText to "XXX" (for debugging). */
+ kASTextFilterXXXDebug,
+
+ /** Makes all text except <code>scanf</code> format strings upper case. */
+ kASTextFilterUpperCaseDebug,
+
+ /** Makes all text except <code>scanf</code> format strings lower case. */
+ kASTextFilterLowerCaseDebug,
+
+ /** Removes stand-alone ampersands, and turns <code>&&</code> into <code>&</code> */
+ kASTextFilterRemoveAmpersands,
+
+ /** Changes any full width ASCII variants to their lower-ASCII version. */
+ /* For example, <code>0xFF21</code> (full width <code>'A'</code>) becomes <code>0x0041</code> (ASCII <code>'A'</code>) */
+ kASTextFilterNormalizeFullWidthASCIIVariants,
+
+ /** Removes line endings and replaces them with spaces. */
+ kASTextRemoveLineEndings,
+
+ /** Reserved. Do not use. */
+ kASTextFilterRsvd1 = 1000,
+
+ /** An invalid filter type. */
+ kASTextFilterUnknown = -1
+};
+/**
+ Constants that specify filter types used to modify text objects.
+ @see ASTextFilter
+*/
+typedef ASEnum16 ASTextFilterType;
+
+
+/**
+ ASCabinet objects can be used to store arbitrary key/value pairs. The
+ keys are always <code>NULL</code>-terminated strings containing only low ASCII
+ alphanumeric characters. The various types of values are enumerated here.
+*/
+enum {
+
+ /** An ASBool. */
+ kASValueBool,
+
+ /** An ASInt32. */
+ kASValueInteger,
+
+ /** An ASAtom. */
+ kASValueAtom,
+
+ /** A double precision floating-point number. */
+ kASValueDouble,
+
+ /** A <code>NULL</code>-terminated, unencoded string. */
+ kASValueString,
+
+ /** An ASText object. */
+ kASValueText,
+
+ /** A binary blob of any size. */
+ kASValueBinary,
+
+ /** A pointer to something outside the cabinet. */
+ kASValuePointer,
+
+ /** Another cabinet. */
+ kASValueCabinet,
+
+ /** The key exists but has no useful value. For example, the key may be a placeholder. */
+ kASValueNull,
+
+ /** An ASUns32. */
+ kASValueUns,
+
+ /** An ASInt64. */
+ kASValueInt64,
+
+ /** An ASUns64. */
+ kASValueUns64,
+
+ /** An invalid type. */
+ kASValueUnknown = -1
+};
+/**
+ A constant that specifies the various types of values in ASCab objects.
+ ASCab objects can be used to store arbitrary key/value pairs. The
+ keys are always <code>NULL</code>-terminated strings containing only
+ low ASCII alphanumeric characters.
+ @see ASCabFromEntryList
+ @see ASCabGetType
+*/
+typedef ASEnum16 ASCabValueType;
+
+
+/** Cabinet keys are <code>NULL</code>-terminated C strings. This constant
+ declares the maximum length of one component of that string.
+
+ <p>The characters in the key string must all be low ASCII
+ alphanumeric characters, such as <code>'0' - '9'</code>, <code>'a' - 'z'</code>, <code>'A' - 'Z'</code>.</p>
+
+ <p>You can burrow through multiple levels of a cabinet heirarchy by
+ passing in a string of individual key names separated by
+ colons.</p>
+
+ <p>For example, <code>ASCabGetInt(cab, "Hello:World", -1);</code> is equivalent to
+ <code>ASCabGetInt(ASCabGetCab(cab, "Hello"), "World", -1);</code>.</p>
+
+ <p>Similarly, <code>ASCabPutInt(theCab, "Hello:World", 33); </code> will create an
+ integer key named <code>"World"</code> inside the <code>"Hello"</code> cabinet
+ inside theCab, creating the <code>"Hello"</code> key and cabinet if
+ necessary.</p>
+*/
+#define MAX_ASCAB_KEY 1024
+
+
+/**
+ A data structure representing a cabinet entry. The first entry
+ in each descriptor specifies the name of the key, the second
+ field contains the type, and the following fields contain the
+ values. The entry list must end with a descriptor containing
+ <code>NULL</code> for the key name. It can be used as shown below to
+ construct an ASCab:
+
+ <p><code>ASCabEntryRec cabData[] = {{"key1", kASValueInteger, 1},
+ {"key2", kASValueInteger, -1}, {"key3", kASValueBool, false},
+ {NULL}};</code> </p>
+
+ <p><code>ASCab CreateDefaultCab() { return ASCabFromEntryList (cabData); }</code></p>
+
+ <p>This example uses just three values for each record. However,
+ more may be required, such as a <code>double</code>: </p>
+
+ <p><code>{"keyDouble", kASValueDouble, 0, NULL, double}</code></p>
+
+ <p>For a <code>string</code>, the following code could be used: </p>
+
+ <p><code>{"keyString", kASValueString, 0, (void*)string}</code></p>
+ @see ASCabFromEntryList
+*/
+typedef struct _t_ASCabEntryRec {
+
+ /** The name of the key.
+ */
+ const char * keyName;
+
+ /** The supported ASCabValueTypes are:
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Type</TH><TH>Description</TH></TR>
+ <TR><TD>kASValueBool</TD><TD>A boolean value. <code>intVal</code> contains the value.</TD></TR>
+ <TR><TD>kASValueInteger</TD><TD>An integer value. <code>intVal</code> contains the value.</TD></TR>
+ <TR><TD>kASValueAtom</TD><TD>An atom. <code>intVal</code> contains the value.</TD></TR>
+ <TR><TD>kASValueDouble</TD><TD>A double value. <code>doubleVal</code> contains the value.</TD></TR>
+ <TR><TD>kASValueString</TD><TD><code>ptrVal</code> points to a <code>NULL</code>-terminated C string.</TD></TR>
+ <TR><TD>kASValueText</TD><TD><code>ptrVal</code> points to a <code>NULL</code>-terminated string containing script text,
+ and <code>intVal</code> specifies the ASScript code for the text.</TD></TR>
+ <TR><TD>kASValueBinary</TD><TD><code>ptrVal</code> points to the binary data, and <code>intVal</code> specifies the size of the data.</TD></TR>
+ <TR><TD>kASValueNull</TD><TD>Creates an entry with a NULL value.</TD></TR>
+ </TABLE>
+
+ <p>No other types are supported (specifically kASValueCabinet and kASValuePointer). You can build
+ nested cabinets using the <code>"key: key"</code> syntax for the <code>keyNames</code>.</p>
+ */
+ ASCabValueType type;
+
+ /** See above.
+ */
+ ASInt32 intVal;
+ /** See above.
+ */
+ const void * ptrVal;
+ /** See above.
+ */
+ double doubleVal;
+} ASCabEntryRec;
+
+
+/**
+ Used when enumerating the values inside a cabinet.
+ @param theCab The cabinet being enumerated.
+ @param theKey The key name of an entry in the cabinet.
+ @param itsType The type of the value associated with <code>theKey</code>.
+ @param clientData User-supplied data passed into ASCabEnum.
+
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see ASCabEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASCabEnumProc)
+ (ASCab theCab, const char *theKey, ASCabValueType itsType, void *clientData);
+
+
+/**
+ Used when enumerating the values inside a constant cabinet.
+ The callback procedure must not add, delete, or modify items
+ in <code>theCab</code> during the enumeration.
+ @param theCab The cabinet being enumerated.
+ @param theKey The key name of an entry in the cabinet.
+ @param itsType The type of the value associated with <code>theKey</code>.
+ @param clientData User-supplied data passed into ASCabEnum.
+
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see ASConstCabEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASConstCabEnumProc)
+ (ASConstCab theCab, const char *theKey, ASCabValueType itsType, void *clientData);
+
+
+/** A value that determines the actions to be taken when ASCabMunge() is called. <code>keyCab</code>
+ is the ASCab that provides the keys determining how <code>theCab</code> is to be changed.
+ During an ASCabMunge() operation, the key cab will not be altered.
+*/
+enum {
+
+ /** Any keys in <code>keyCab</code> are removed from <code>theCab</code>. */
+ kASMungeRemove,
+
+ /** Any keys in <code>theCab</code> which are not also in <code>keyCab</code> are removed. */
+ kASMungeRemoveUnknown,
+
+ /** Any keys in <code>keyCab</code> which are also in <code>theCab</code> and have the same value in <code>theCab</code> are removed. */
+ kASMungeRemoveDefaults,
+
+ /** Any keys in <code>theCab</code> which are also in <code>keyCab</code> but have different values are removed. */
+ kASMungeRemoveBadValues,
+
+ /** All key/value pairs in <code>keyCab</code> are copied into <code>theCab</code>. */
+ kASMungeCopy,
+
+ /** Any keys in <code>theCab</code> which are also in <code>keyCab</code> are replaced with the values in <code>keyCab</code>. */
+ kASMungeReplace,
+
+ /** Any keys in <code>keyCab</code> which are not in <code>theCab</code> are copied over to <code>theCab</code>. */
+ kASMungeCopyMissing,
+
+ /** Any keys in <code>keyCab</code> with a value of <code>NULL</code> are removed from <code>theCab</code>. */
+ kASMungeRemoveNulls
+};
+typedef ASEnum16 ASCabMungeAction;
+
+
+/**
+ A deallocation callback that can be associated with a pointer
+ in an ASCab. When the reference count of the pointer falls
+ to zero, this callback is called to free the resources associated
+ with the object the pointer references.
+ @param ptr IN/OUT The value stored in an ASCab.
+ @see ASCabPutPointer
+ @see ASCabGetPointerDestroyProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASCabPointerDestroyProc)
+ (void *ptr);
+
+/* ASReportProc
+**
+** Used to report errors, warnings, and other messages to the user.
+**
+** The reportType indicates what sort of information is being
+** reported. Perhaps the best way to think of this is to consider what
+** sort of icon the user should see when they read the message.
+**
+** The errorCode argument should be set to one of the defined error
+** codes (i.e. the same ones you would use when raising errors). It
+** can also be set to 0 (indicating no error).
+**
+** The 'message' field specifies the text the user should read. If the
+** 'message' field is NULL the system will retrieve the message
+** associated with the errorCode. If both 'message' and 'errorCode'
+** are specified the 'message' argument will be used.
+**
+** If the 'replacementText' is not NULL the system will attempt to
+** replace the string "%s" in the message with the replacement
+** text. This applies whether the text is specified via the 'message'
+** argument or retrieved from the system using the 'errorCode'
+** argument.
+**
+** The moreInfo field is not used as yet.
+**
+** The reportProcData is a pointer to whatever data is associated with
+** the reportProc (which should be passed to you with the report
+** proc).
+**
+** All of these arguments are handed off to the reportProc. It's the
+** reportProc's responsibility to destroy all objects passed to it,
+** and it may destroy them at any time.
+*/
+
+
+/** Used in an ASReportProc to indicate what kind of information is being reported.
+ @see ASReportProc
+*/
+enum {
+
+ /** A note. */
+ kASReportNote,
+
+ /** A warning. */
+ kASReportWarning,
+
+ /** An error. */
+ kASReportError
+};
+typedef ASEnum16 ASReportType;
+
+#define kMoreTextKey "MoreText"
+
+
+/**
+ <p>A report proc can be used to report errors, warnings, and
+ other messages to the user. Normally a report proc will use a dialog
+ to notify the user of an error, but in some
+ contexts (such as during batch processing) it may either log the
+ error or warning to a file or ignore it. </p>
+
+ <p>It is this callback's responsibility to destroy all objects
+ passed to it, and it may do so at any time. </p>
+
+ @param reportType The type of information that is reported.
+
+ @param errorCode An error code defined by the system or
+ by ASRegisterErrorString(). If message is not <code>NULL</code>, the error code
+ can be <code>0</code>.
+ @param message Specifies the text the user should read.
+ If the message field is <code>NULL</code>, the system will retrieve the
+ message associated with the <code>errorCode</code>. If both <code>message</code> and
+ <code>errorCode</code> are specified, the message argument is used.
+ @param replacementText If this replacement text is not <code>NULL</code>,
+ the system will attempt to replace the string <code>'%s'</code> in the
+ message with the replacement text. This applies whether
+ the text is specified via the <code>message</code> argument or retrieved
+ from the system using the <code>errorCode</code> argument.
+ @param moreInfo Not currently used. The report proc will
+ destroy this cabinet immediately.
+ @param reportProcData A pointer to the data associated
+ with the report proc (which should be passed in when
+ the report proc is acquired).
+ @see AVAppGetReportProc
+ @see AVCommandGetReportProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ASReportProc)
+ (ASReportType reportType, ASInt32 errorCode, ASText message, ASText replacementText,
+ ASCab moreInfo, void *reportProcData);
+
+/** */
+typedef ACCBPROTO1 ASText (ACCBPROTO2 *ASTextEvalProc)(ASCab params);
+
+
+typedef struct _t_ASStatusMonitorProcs {
+
+ /** The size of the structure. */
+ ASSize_t size;
+
+ /** A pointer to the progress monitor. */
+ ASProgressMonitor progMon;
+
+ /** A pointer to client data, which can be of any type. */
+ void *progMonClientData;
+
+ /**
+ This call has been replaced by ASCancelProc().
+
+ <p>A callback to check for cancelling operations. An ASCancelProc
+ is typically passed to some method that takes a long time
+ to complete. At frequent intervals, the method calls the
+ ASCancelProc. If it returns <code>true</code>, the method cancels
+ its operation; if <code>false</code>, it continues. </p>
+
+ @param clientData User-supplied data passed to the ASCancelProc.
+ @return <code>true</code> if the processing is cancelled, <code>false</code> otherwise.
+ @see PDFLPrintCancelProc (Only available with PDF Library SDK)
+
+ @see AVAppGetCancelProc
+ */
+ ASCancelProc cancelProc;
+
+ /** A pointer to client data for the cancel procedure. */
+ void *cancelProcClientData;
+
+ /** The report procedure. */
+ ASReportProc reportProc;
+
+ /** A pointer to client data for the report procedure. */
+ void *reportProcClientData;
+} ASStatusMonitorProcsRec, *ASStatusMonitorProcs;
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_ASExtraExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraProcs.h
new file mode 100644
index 0000000..95daa38
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraProcs.h
@@ -0,0 +1,2461 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1999-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASExtraProcs.h
+
+ - Catalog of functions exported by the ASExtra HFT.
+
+ WARNING: All additions to this file must go to the end of the
+file. ASExtraProcs.h is #included to make a table. Existing
+plug-ins were compiled expecting the order of entries in that
+table to remain fixed. Adding entries in the middle of this
+file will break those plug-ins which use entries in the HFT.
+
+*********************************************************************/
+
+
+/**
+ Converts from an ASScript code to a host encoding type.
+ On Windows, the host encoding is a <code>CHARSET id</code>. On Mac OS,
+ the host encoding is a script code.
+ @param asScript The script value.
+ @return The new host encoding type.
+ @see ASScriptFromHostEncoding
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASHostEncoding, ASScriptToHostEncoding, (ASScript asScript))
+
+/**
+ Converts from a host encoding type to an ASScript value.
+ On Windows, the host encoding is a <code>CHARSET id</code>. On Mac OS,
+ the host encoding is a script code.
+ @param osScript The host encoding type.
+ @return The new ASScript value.
+ @see ASScriptToHostEncoding
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASScript, ASScriptFromHostEncoding, (ASHostEncoding osScript))
+
+/********************************************************************************
+ * ASText API calls
+ *
+ * General Notes
+ *
+ * When creating a new ASText object, or putting new data in an
+ * existing object, the implementation will always *copy* the
+ * supplied data into the ASText object. The original data is yours
+ * to do with as you will (and release if necessary).
+ *
+ * The size of ASText data is always specified in bytes. For example, the
+ * 'len' argument to ASTextFromSizedUnicode specifies the number of
+ * bytes in the string, not the number of Unicode characters.
+ *
+ * Host encoding and Unicode strings are always terminated with a
+ * NULL *character* (which consists of one NULL byte for host
+ * encoded strings and two NULL bytes for Unicode strings). You
+ * cannot create a string with an embedded NULL character even using
+ * the calls which take an explicit length parameter.
+ *
+ * The 'GetXXX' calls return pointers to data held by the ASText
+ * object. You cannot free or manipulate this data directly. The
+ * 'GetXXXCopy' calls return data you can manipulate at will and
+ * that you're responsible for freeing.
+ *
+ * The ASText object returned by the 'ASTextFromXXX' calls must be
+ * freed by the client by calling ASTextDestroy.
+ *
+ ********************************************************************************/
+
+
+/**
+ Creates a new text object containing no text.
+ @return An ASText object.
+ @exception genErrNoMemory
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextNew, (void))
+
+/**
+ Creates a new string from a <code>NULL</code>-terminated Unicode string.
+ This string is not expected to have <code>0xFE 0xFF</code> prepended,
+ or country/language identifiers.
+ @param ucs A Unicode string.
+ @param format The Unicode format used by <code>ucs</code>.
+ @return An ASText object.
+ @see ASTextFromSizedUnicode
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromUnicode, (const ASUTF16Val *ucs, ASUnicodeFormat format))
+
+/**
+ Creates a new text object from the specified Unicode string.
+ This string is not expected to have <code>0xFE 0xFF</code> prepended,
+ or country/language identifiers.
+
+ <p>The string cannot contain an embedded <code>NULL</code> character. </p>
+
+ @param ucs The Unicode string
+ @param format The Unicode format of <code>ucs</code>.
+ @param len The length of <code>ucs</code> in bytes.
+ @return An ASText object.
+ @exception genErrBadParm is raised if <code>len < 0</code>.
+ @see ASTextFromUnicode
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromSizedUnicode, (const ASUTF16Val *ucs, ASUnicodeFormat format, ASTArraySize len))
+
+/**
+ Creates a new text object from a <code>NULL</code>-terminated multi-byte
+ string in the specified host encoding.
+ @param str The input string.
+ @param encoding The host encoding.
+ @return An ASText object.
+ @see ASTextFromSizedEncoded
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromEncoded, (const char *str, ASHostEncoding encoding))
+
+/**
+ Creates a new text object from a multi-byte string of the specified length in the
+ specified host encoding.
+ @param str A string.
+ @param len The length in bytes.
+ @param encoding The specified host encoding.
+ @return An ASText object.
+ @exception genErrBadParm is raised if <code>len < 0</code>.
+ @see ASTextFromEncoded
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromSizedEncoded, (const char *str, ASTArraySize len, ASHostEncoding encoding))
+
+/**
+ Creates a new string from a <code>NULL</code>-terminated multi-byte string
+ of the specified script. This is a wrapper around ASTextFromEncoded();
+ the script is converted to a host encoding using ASScriptToHostEncoding().
+
+ @param str A string.
+ @param script The specified script.
+ @return An ASText object.
+ @see ASTextFromSizedScriptText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromScriptText, (const char *str, ASScript script))
+
+/**
+ Creates a new text object from the specified multi-byte
+ string of the specified script. This is a wrapper around
+ ASTextFromEncoded(); the script is converted to a host encoding
+ using ASScriptToHostEncoding().
+ @param str A string.
+ @param len The length in bytes.
+ @param script The specified script.
+ @return An ASText object.
+ @see ASTextFromScriptText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromSizedScriptText, (const char *str, ASTArraySize len, ASScript script))
+
+/**
+ Creates a new string from some PDF text taken out of a PDF
+ file. This is either a UTF-16 string with the <code>0xFEFF</code> prepended
+ to the front or a PDFDocEncoding string. In either case
+ the string is expected to have the appropriate <code>NULL</code> termination.
+ If the PDText is in UTF-16, it may have embedded language
+ and country information; this will cause the ASText object
+ to have its language and country codes set to the values
+ found in the string.
+ @param str A string.
+ @return An ASText object.
+ @see ASTextFromSizedPDText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromPDText, (const char *str))
+
+/**
+ Creates a new string from some PDF text taken out of a PDF
+ file. This is either a UTF-16 string with the <code>0xFEFF</code> prepended
+ to the front or a PDFDocEncoding string. If the PDText is
+ in UTF-16, it may have embedded language and country information;
+ this will cause the ASText object to have its language and
+ country codes set to the values found in the string. The
+ <code>length</code> parameter specifies the size, in bytes, of the string.
+ The string must not contain embedded <code>NULL</code> characters.
+ @param str A string.
+ @param length The length in bytes.
+ @return An ASText object.
+ @see ASTextFromPDText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromSizedPDText, (const char *str, ASTArraySize length))
+
+/**
+ Frees all memory associated with the text object.
+ @param str IN/OUT A text object.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextDestroy, (ASText str))
+
+
+/**
+ Alters an existing string from a <code>NULL</code>-terminated Unicode
+ string. This string is not expected to have <code>0xFE 0xFF</code> prepended
+ or embedded country/language identifiers.
+ @param str (Filled by the method) A string.
+ @param ucsValue A Unicode string.
+ @param format The Unicode format.
+ @see ASTextSetSizedUnicode
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetUnicode, (ASText str, const ASUTF16Val *ucsValue, ASUnicodeFormat format))
+
+/**
+ Replaces the contents of an existing ASText object with
+ the specified Unicode string. This string is not expected
+ to have <code>0xFE 0xFF</code> prepended or embedded country/language
+ identifiers.
+
+ <p>The string cannot contain a <code>NULL</code> character. </p>
+
+ @param str (Filled by the method) A string.
+ @param ucsValue A Unicode string.
+ @param format The Unicode format.
+ @param len The length of the string in bytes.
+ @see ASTextSetUnicode
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetSizedUnicode, (ASText str, const ASUTF16Val *ucsValue, ASUnicodeFormat format, ASTArraySize len))
+
+/**
+ Replaces the contents of an existing ASText object with
+ a <code>NULL</code>-terminated multi-byte string in the specified host
+ encoding.
+ @param str IN/OUT An ASText object to hold the string.
+ @param text IN/OUT A pointer to the text string.
+ @param encoding IN/OUT The type of encoding.
+ @exception genErrBadParm is raised if <code>text</code> is <code>NULL</code>.
+ @see ASTextSetSizedEncoded
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetEncoded, (ASText str, const char *text, ASHostEncoding encoding))
+
+/**
+ Alters an existing string from a multi-byte string in the
+ specified host encoding and of the specified length. This
+ text does not need to be <code>NULL</code>-terminated, and no <code>NULL</code> (zero)
+ bytes should appear in the characters passed in.
+ @param str IN/OUT A string.
+ @param text IN/OUT A pointer to the text string.
+ @param len IN/OUT The length of the text string.
+ @param encoding IN/OUT The host encoding type.
+ @exception genErrBadParm is raised if <code>text</code> is <code>NULL</code>.
+ @see ASTextSetEncoded
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetSizedEncoded, (ASText str, const char *text, ASTArraySize len, ASHostEncoding encoding))
+
+/**
+ Alters an existing string from a <code>NULL</code>-terminated multi-byte
+ string of the specified script. This is a wrapper around
+ ASTextFromEncoded(); the script is converted to a host encoding
+ using ASScriptToHostEncoding().
+ @param str IN/OUT A string.
+ @param text IN/OUT A pointer to the text string.
+ @param script IN/OUT The writing script.
+ @see ASTextSetSizedScriptText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetScriptText, (ASText str, const char *text, ASScript script))
+
+/**
+ Replaces the contents of an existing ASText object with
+ the specified multi-byte string of the specified script.
+ This is a wrapper around ASTextFromSizedEncoded(); the script
+ is converted to a host encoding using ASScriptToHostEncoding().
+
+ @param str IN/OUT A string.
+ @param text IN/OUT A pointer to the text string.
+ @param len IN/OUT The length of the text string.
+ @param script IN/OUT The writing script.
+ @exception genErrBadParm is raised if <code>text</code> is <code>NULL</code>.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetSizedScriptText, (ASText str, const char *text, ASTArraySize len, ASScript script))
+
+/**
+ Alters an existing string from some PDF text taken out of
+ a PDF file. This is either a big-endian UTF-16 string with
+ the <code>0xFEFF</code> prepended to the front or a PDFDocEncoding string.
+ In either case the string is expected to have the appropriate
+ <code>NULL</code> termination. If the PDText is in UTF-16, it may have
+ embedded language and country information; this will cause
+ the ASText object to have its language and country codes
+ set to the values found in the string.
+ @param str A string.
+ @param text A text string.
+ @see ASTextSetSizedPDText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetPDText, (ASText str, const char *text))
+
+/**
+ Replaces the contents of an existing ASText object with
+ PDF text taken out of a PDF file. This is either a big-endian
+ UTF-16 string with the <code>0xFEFF</code> prepended to the front or
+ a PDFDocEncoding string. In either case the <code>length</code> parameter
+ indicates the number of bytes in the string. The string
+ should not be <code>NULL</code>-terminated and must not contain any <code>NULL</code>
+ characters. If the PDText is in UTF-16, it may have embedded
+ language and country information; this will cause the ASText
+ object to have its language and country codes set to the
+ values found in the string.
+ @param str A string.
+ @param text A pointer to a text string.
+ @param length The length of the text string.
+ @see ASTextSetPDText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetSizedPDText, (ASText str, const char *text, ASTArraySize length))
+
+/**
+ Returns a pointer to a string in kUTF16HostEndian format
+ (see ASUnicodeFormat). The memory to which this string points
+ is owned by the ASText object, and may not be valid after
+ additional operations are performed on the object.
+
+ <p>The Unicode text returned will not have <code>0xFE 0xFF</code> prepended
+ or any language or country codes. </p>
+
+ @param str A string.
+ @return See above.
+ @see ASTextGetUnicodeCopy
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(const ASUTF16Val *, ASTextGetUnicode, (ASConstText str))
+
+/**
+ Returns a pointer to a <code>NULL</code>-terminated string in the specified
+ Unicode format. The memory to which this string points is
+ owned by the client, which can modify it at will and is responsible
+ for destroying it using ASfree.
+
+ <p>The Unicode text returned will not have <code>0xFE 0xFF</code> prepended
+ or any language or country codes. </p>
+
+ @param str A string.
+ @param format The Unicode format.
+ @return A string copy. The client owns the resulting information.
+
+ @exception genErrNoMemory is raised if memory could not be allocated for the
+ copy.
+ @see ASTextGetUnicode
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASUTF16Val *, ASTextGetUnicodeCopy, (ASConstText str, ASUnicodeFormat format))
+
+/**
+ Returns a <code>NULL</code>-terminated string in the given encoding.
+ The memory to which this string points is owned by the ASText
+ object and may not be valid after additional operations
+ are performed on the object.
+
+ <p>Various exceptions may be raised.</p>
+
+ @param str IN/OUT An ASText object.
+ @param encoding IN/OUT The specified host encoding.
+ @return A pointer to a <code>NULL</code>-terminated string corresponding to the
+ text in <code>str</code>.
+ @see ASTextGetEncodedCopy
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(const char *, ASTextGetEncoded, (ASConstText str, ASHostEncoding encoding))
+
+/**
+ Returns a copy of a string in a specified encoding.
+ @param str An ASText object.
+ @param encoding The specified encoding.
+ @return A copy of the text in <code>str</code>. The client owns the resulting
+ information and is responsible for freeing it using ASfree().
+
+ @exception genErrNoMemory is raised if memory could not be allocated for the
+ copy.
+ @see ASTextGetEncoded
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(char *, ASTextGetEncodedCopy, (ASConstText str, ASHostEncoding encoding))
+
+/**
+ Converts the Unicode string in the ASText object to the
+ appropriate script, and returns a pointer to the converted
+ text. The memory to which it points is owned by the ASText object
+ and must not be altered or destroyed by the client. The
+ memory may also become invalid after subsequent operations
+ are applied to the ASText object.
+
+ <p>Various exceptions may be raised.</p>
+
+ @param str IN/OUT A string.
+ @param script IN/OUT The writing script.
+ @return A string.
+ @see ASTextGetScriptTextCopy
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(const char *, ASTextGetScriptText, (ASConstText str, ASScript script))
+
+/**
+ Converts the Unicode string in the ASText object to the
+ appropriate script and returns a pointer to the converted
+ text. The memory to which it points is owned by the client, which is
+ responsible for freeing it using ASfree().
+ @param str A string.
+ @param script A writing script.
+ @return A string copy. The client owns the resulting information.
+
+ @exception genErrNoMemory is raised if memory could not be allocated for the
+ copy.
+ @see ASTextGetEncodedCopy
+ @see ASTextGetScriptText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(char *, ASTextGetScriptTextCopy, (ASConstText str, ASScript script))
+
+/**
+ Returns the text in a form suitable for storage in a PDF
+ file. If the text can be represented using PDFDocEncoding,
+ it is; otherwise it is represented in big-endian UTF-16
+ format with <code>0xFE 0xFF</code> prepended to the front and any country/language
+ codes embedded in an escape sequence right after <code>0xFE 0xFF</code>.
+
+ <p>You can determine if the string is Unicode by inspecting
+ the first two bytes. The Unicode case is used if the string
+ has a language and country code set. The resulting string
+ is <code>NULL</code>-terminated as appropriate. That is, one <code>NULL</code> byte
+ is used for PDFDocEncoding, two are used for UTF-16. </p>
+
+ <p>Various exceptions may be raised.</p>
+
+ @param str A string.
+ @param len The length in bytes of the resulting string,
+ not counting the <code>NULL</code> bytes at the end.
+ @return A string copy. The client owns the resulting information
+ and is responsible for freeing it with ASfree().
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(char *, ASTextGetPDTextCopy, (ASConstText str, ASTArraySize *len))
+
+/**
+ Returns the best host encoding for representing the text.
+ The best host encoding is the one that is least likely to
+ lose characters during the conversion from Unicode to host.
+ If the string can be represented accurately in multiple
+ encodings (for example, it is low-ASCII text that can be
+ correctly represented in any host encoding), ASTextGetBestEncoding()
+ returns the preferred encoding based on the <code>preferredEncoding</code>
+ parameter.
+
+ <p>Various exceptions may be raised.</p>
+
+ @param str An ASText string.
+ @param preferredEncoding The preferred encoding. There
+ is no default.
+
+ @example
+ <p><code>// If you prefer to use the application's language encoding: </code></p>
+ <p><code>ASHostEncoding bestEncoding = ASTextGetBestEncoding(text, AVAppGetLanguageEncoding()); </code></p>
+ <p><code>// If you prefer to use the operating system encoding: </code></p>
+ <p><code>ASHostEncoding bestEncoding = ASTextGetBestEncoding(text, (ASHostEncoding)PDGetHostEncoding()); </code></p>
+ <p><code>// If you want to favor Roman encodings: </code></p>
+ <p><code>ASHostEncoding hostRoman = ASScriptToHostEncoding(kASRomanScript);</code></p>
+ <p><code>ASHostEncoding bestEncoding = ASTextGetBestEncoding(text, hostRoman);</code></p>
+
+ @return The text encoding.
+ @see ASTextGetBestScript
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASHostEncoding, ASTextGetBestEncoding, (ASConstText str, ASHostEncoding preferredEncoding))
+
+/**
+ Returns the best host script for representing the text.
+ The functionality is similar to ASTextGetBestEncoding(), with resulting
+ host encoding converted to a script code using ASScriptFromHostEncoding().
+
+ @param str IN/OUT An ASText string.
+ @param preferredScript IN/OUT The preferred host script. There
+ is no default.
+ @return The best host script.
+ @see ASTextGetBestEncoding
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASScript, ASTextGetBestScript, (ASConstText str, ASScript preferredScript))
+
+/**
+ Retrieves the country associated with an ASText object.
+
+ @param text IN/OUT An ASText object.
+ @return The country code.
+ @see ASTextSetCountry
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCountryCode, ASTextGetCountry, (ASConstText text))
+
+/**
+ Sets the language codes associated with a piece of text.
+ ASText objects can have country and language codes associated
+ with them. These can be explicitly set or parsed from the
+ Unicode form of PDText strings.
+
+ @param text IN/OUT An ASText object.
+ @param country IN/OUT Country code.
+ @see ASTextGetCountry
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetCountry, (ASText text, ASCountryCode country))
+
+/**
+ Retrieves the language code associated with an ASText object.
+ @param text An ASText object.
+ @return The language code.
+ @see ASTextSetLanguage
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASLanguageCode, ASTextGetLanguage, (ASConstText text))
+
+/**
+ Sets the language codes associated with a piece of text.
+
+ @param text IN/OUT An ASText object.
+ @param language IN/OUT The language code.
+ @see ASTextGetLanguage
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextSetLanguage, (ASText text, ASLanguageCode language))
+
+/**
+ Concatenates the <code>from</code> text to the end of the <code>to</code> text, altering
+ <code>to</code> but not <code>from</code>. It does not change the language or country
+ of <code>to</code> unless it has no language or country, in which case
+ it acquires the language and country of <code>from</code>.
+ @param to IN/OUT The encoded text to which <code>from</code> is appended.
+ @param from IN/OUT The encoded text to be appended to <code>to</code>.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextCat, (ASText to, ASConstText from))
+
+/**
+ Concatenates a series of ASText objects to the end of the
+ <code>to</code> object. Be sure to provide <code>NULL</code> as the last argument
+ to the call.
+
+ <p>Various exceptions may be raised.</p>
+
+ @param to IN/OUT The ASText object to which the subsequent ASText
+ arguments are concatenated.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextCatMany, (ASText to, ...))
+
+/**
+ Copies the text in <code>from</code> to <code>to</code>, along with the country and
+ language.
+ @param to IN/OUT The destination text object.
+ @param from IN/OUT The source text object.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextCopy, (ASText to, ASConstText from))
+
+/**
+ Creates a new ASText object that contains the same text/country/language
+ as the one passed in.
+ @param str A text object.
+ @return An ASText object.
+ @exception genErrBadParm is raised if <code>str</code> is <code>NULL</code>.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextDup, (ASConstText str))
+
+/**
+ Compares two ASText objects. This routine can be used to
+ sort text objects using the default collating rules of the
+ underlying operating system before presenting them to the user. The comparison
+ is case-sensitive. The results are suitable for displaying a sorted
+ list of strings to the user in his chosen language and according
+ to the rules of the platform on which the application is running. The
+ results can vary based on the platform and user locale. If you want
+ to compare strings in a way that is consistent across locales and
+ platforms (but not suitable for displaying sorted strings to a user)
+ see ASTextCaseSensitiveCmp().
+
+ <p>Various exceptions may be raised.</p>
+
+ @param str1 The first text object.
+ @param str2 The second text object.
+ @return A negative number if <code>str1 < str2</code>, a positive number
+ if <code>str1 > str2</code>, and <code>0</code> if they are equal.
+ @see ASTextCaseSensitiveCmp
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, ASTextCmp, (ASConstText str1, ASConstText str2))
+
+/**
+ Replaces all occurrences of <code>toReplace</code> in <code>src</code> with the text
+ specified in <code>replacement</code>. This uses an ASText string
+ to indicate the <code>toReplace</code> string; ASTextReplaceASCII() uses
+ a low ASCII Roman string to indicate the text to replace.
+
+ <p>Various exceptions may be raised.</p>
+
+ @param src Source text.
+ @param toReplace Text in source text to replace.
+ @param replacement Text used in replacement.
+ @see ASTextReplaceASCII
+ @see ASTextReplaceBadChars
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextReplace, (ASText src, ASConstText toReplace, ASConstText replacement))
+
+/**
+ Replaces all occurrences of <code>toReplace</code> in <code>src</code> with the text
+ specified in <code>replacement</code>. ASTextReplace() uses an ASText string
+ to indicate the toReplace string; this uses
+ a low-ASCII Roman string to indicate the text to replace.
+
+ <p>This call is intended for formatting strings for the user
+ interface. For example, it can be used for replacing a known sequence such as
+ <code>'%1'</code> with other text. Be sure to use only low ASCII characters,
+ which are safe on all platforms. Avoid using backslash and
+ currency symbols.</p>
+
+ <p>Various exceptions may be raised.</p>
+
+ @param src The ASText object containing the text.
+ @param toReplace The text to replace.
+ @param replacement The replacement text.
+ @see ASTextReplace
+ @see ASTextReplaceBadChars
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextReplaceASCII, (ASText src, const char *toReplace, ASConstText replacement))
+
+/**
+ Creates a new, empty cabinet.
+ @return The newly created cabinet.
+ @exception genErrNoMemory
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCab, ASCabNew, (void))
+
+/**
+ Builds a cabinet based on a constant array of ASCabDescriptor
+ records (see ASCabEntryRec). The first entry in each descriptor
+ specifies the name of the key; subsequent fields contain
+ the value. The entry list must end with a descriptor containing
+ <code>NULL</code> for the key name. See ASExtraExpT.h for more info.
+
+ @param entryList A constant array of ASCabDescriptor records
+ (see ASCabEntryRec). Passing <code>NULL</code> generates an empty ASCab.
+ @return The newly created ASCab.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCab, ASCabFromEntryList, (const ASCabEntryRec *entryList))
+
+/**
+ Destroys the cabinet and all its key/value pairs. This method
+ raises an exception if the cabinet is the value for some key in another
+ cabinet.
+ @param theCab The cabinet.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabDestroy, (ASCab theCab))
+
+/**
+ Returns the number of key/value pairs in <code>theCab</code>.
+ @param theCab The cabinet.
+ @return See above.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASTArraySize, ASCabNumEntries, (ASConstCab theCab))
+
+/**
+ Returns <code>true</code> if <code>theKey</code> is present in <code>theCab</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return See above.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASBool, ASCabKnown, (ASConstCab theCab, const char *theKey))
+
+/**
+ Returns the type of value stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The type of value stored under <code>theKey</code>, or kASValueUnknown
+ if the key is not found.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCabValueType, ASCabGetType, (ASConstCab theCab, const char *theKey))
+
+/**
+ Enumerates all the keys in the cabinet.
+
+ <p>Keys consisting solely of digits are enumerated first, in
+ numeric order (assuming they are not padded with zeros at
+ the front, which will confuse matters). Non-numeric keys
+ are then enumerated in <code>strcmp</code> order. </p>
+
+ <p>It is safe to add, delete, and modify items in <code>theCab</code> during
+ the enumeration. Items that are added during the enumeration
+ will not be enumerated. Modified items that have been enumerated
+ already will not be enumerated again. Deleted items that
+ have not yet been enumerated will not be enumerated. </p>
+
+ @param theCab The cabinet.
+ @param enumProc A user-supplied callback that is called
+ for each entry found in <code>theCab</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @exception genErrBadParm
+ @note This will <code>RERAISE</code> any exceptions thrown by <code>enumProc</code>.
+ @see ASConstCabEnum
+ @ingroup Enumerators
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabEnum, (ASCab theCab, ASCabEnumProc enumProc, void *clientData))
+
+/* ==================================================== */
+/* Routines for storing and accessing key/value pairs.
+ *
+ * The ASCabinet "owns" all the data inside it (except for
+ * pointers, which are handled separately). When a key is removed from
+ * the cabinet the ASCabinet destroys the associated value.
+ * Similarly, every time you place a value inside a cabinet you are
+ * handing that value to the ASCabinet implementation to manage;
+ * putting a value in a cabinet is always a hand-off operation. For
+ * example, if you create an ASText object and add it as a value in an
+ * ASCabinet the ASText object is no longer "owned" by you; it's
+ * owned by the ASCabinet. The ASCabinet will destroy the ASText
+ * object when it's associated key is removed or its value is
+ * over-written.
+ *
+ * When adding a new value to an ASCabinet, the client may specify the
+ * key to be <code>NULL</code>, in which case the ASCabinet will create a unique
+ * key. The generated key will be a string representation of an
+ * integer that is guaranteed to be greater than the number of items
+ * in the ASCabinet prior to adding the new value.
+ *
+ * The routine naming convention is as follows:
+ *
+ * "Get" routines return a value. These objects are owned by the
+ * ASCabinet and should not be altered or destroyed by the caller
+ * of "Get".
+ *
+ * "GetCopy" routines make a copy of the data; the "GetCopy" client
+ * owns the resulting information and can do whatever they want with
+ * it.
+ *
+ * "Detach" routines work the same way as "Get" routines but the key
+ * is removed from the ASCabinet without destroying the associated
+ * value which is passed back to the client of "Detach".
+ *
+ * Pointers are handled separately. Normally pointers are treated the
+ * same way as integers; the ASCabinet passes the pointer value
+ * back and forth but doesn't "own" the data pointed to. This all
+ * changes if the pointer has an associated 'destroyProc'. If the
+ * 'destroyProc' is set the ASCabinet will reference count the
+ * pointer to track how many times the pointer is referenced from any
+ * ASCab (e.g. the reference count will be bumped up whenever the
+ * pointer is copied via ASCabCopy) and will destroy the data
+ * associated with the pointer when the ref count goes to 0. The data
+ * is destroyed by calling the 'destroyProc' to destroy it. This makes
+ * detaching a pointer somewhat more complicated. Detaching a pointer
+ * removes one reference to the pointer (without every destroying the
+ * information pointed to). ASCabDetachPointer returns a separate
+ * value indicating whether the pointer can safely be destroyed or is
+ * still referred to by other key/value pairs inside ASCabinets.
+ *
+ */
+
+
+/**
+ Removes <code>theKey</code> entry from <code>theCab</code>, destroying the associated
+ value.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabRemove, (ASCab theCab, const char *theKey))
+
+
+/**
+ Returns the ASBool value stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param defValue IN/OUT The default value.
+ @return The ASBool value stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueBool; otherwise
+ <code>defValue</code> is returned.
+ @exception genErrBadParm
+ @see ASCabPutBool
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASBool, ASCabGetBool, (ASConstCab theCab, const char *theKey, ASBool defValue))
+
+/**
+ Stores an ASBool value in theCab under theKey.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN (May be <code>NULL</code>) The key name.
+ @param theBool IN The value to be stored. Non-zero values are stored as <code>true</code>.
+ @exception genErrBadParm
+ @see ASCabGetBool
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutBool, (ASCab theCab, const char *theKey, ASBool theBool))
+
+
+/**
+ Returns the ASInt32 value stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param defValue IN/OUT The default value.
+ @return The ASInt32 value stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueInteger;
+ otherwise <code>defValue</code> is returned.
+ @exception genErrBadParm
+ @see ASCabPutInt
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, ASCabGetInt, (ASConstCab theCab, const char *theKey, ASInt32 defValue))
+
+/**
+ Stores an ASInt32 value in <code>theCab</code> under <code>theKey</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param theInt IN/OUT The value to be stored.
+ @exception genErrBadParm
+ @see ASCabGetInt
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void , ASCabPutInt, (ASCab theCab, const char *theKey, ASInt32 theInt))
+
+
+/**
+ Returns the ASAtom value stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param defValue IN/OUT The default value.
+ @return The ASAtom value stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueAtom; otherwise
+ <code>defValue</code> is returned.
+ @exception genErrBadParm
+ @see ASCabPutAtom
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASAtom, ASCabGetAtom, (ASConstCab theCab, const char *theKey, ASAtom defValue))
+
+/**
+ Stores an ASAtom value in <code>theCab</code> under <code>theKey</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param atomValue IN/OUT The value to be stored.
+ @exception genErrBadParm
+ @see ASCabGetAtom
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutAtom, (ASCab theCab, const char *theKey, ASAtom atomValue))
+
+
+/**
+ Returns the <code>double</code> value stored under <code>theKey</code> in <code>theCab</code>.
+ If the value stored under <code>theKey</code> is of type kASValueInteger,
+ this value will be cast to a <code>double</code> and returned to the
+ client.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param defValue IN/OUT The default value.
+ @return The <code>double</code> value stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueDouble or kASValueInteger; otherwise <code>defValue</code> is returned.
+ @exception genErrBadParm
+ @see ASCabPutDouble
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(double, ASCabGetDouble, (ASConstCab theCab, const char *theKey, double defValue))
+
+/**
+ Stores a <code>double</code> value in <code>theCab</code> under <code>theKey</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param floatValue IN/OUT The value to be stored.
+ @exception genErrBadParm
+ @see ASCabGetDouble
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutDouble, (ASCab theCab, const char *theKey, double floatValue))
+
+/* ASCabGetPointer
+** ASCabDetachPointer
+** ASCabPutPointer
+** ASCabGetPointerDestroyProc
+**
+** Pointers are always 'typed', in that they always have associated with them
+** a string indicating what type they are supposed to point to. For example,
+** to place a pointer to an AVDoc in a cabinet use:
+**
+** ASCabPutPointer(theCab, "BlahBlah", AVDoc, theDoc);
+**
+** and to retrieve it use:
+**
+** theDoc = ASCabGetPointer(theCab, "BlahBlah", AVDoc);
+**
+** In both cases the AVDoc type passed in is used to explicitly denote
+** the pointer's type (and to correctly cast the return result of
+** ASCabGetPointer).
+**
+** You can also associate a destroyProc with a pointer. When all
+** copies of the pointer contained in ASCabs are removed the
+** destroyProc will be called to free the object it points to. When
+** detaching a pointer using ASCabDetachPointer the 'noRefs' param
+** will be set to true if you just removed the last copy of the
+** pointer and 'false' if some ASCab still contains a copy of the
+** pointer.
+**
+** Note: it is valid to pass <code>NULL</code> in for 'noRefs'.
+**
+** Note: calling ASCabPutPointer with a <code>NULL</code> pointer removes the key
+** from the cabinet.
+*/
+
+/* !! Don't call the RAW forms of these routines. Use
+ the macros at the top of this file.
+*/
+
+/**
+ Returns the pointer value stored under <code>theKey</code> in <code>theCab</code>.
+ @param theCab The cabinet.
+ @param theKey The key name.
+ @param expectedType The data type referenced by the pointer. Since
+ ASCabGetPointer() is actually a macro, you should pass the type
+ as a literal name, not a string. For example, use <code>PDDoc</code> instead of <code>"PDDoc"</code>.
+ Pointers are always <i>typed</i>, in that they always have associated with them
+ a string indicating the type to which they point.
+ @return The pointer value stored under <code>theKey</code> if the key is found,
+ the value stored under <code>theKey</code> is of type kASValuePointer, and the type
+ of the pointer matches <code>expectedType</code>; otherwise <code>NULL</code> is returned. The
+ object referenced by this pointer is owned by <code>theCab</code> and should not be
+ destroyed by the client.
+ @exception genErrBadParm
+ @see ASCabDetachPointer
+ @see ASCabPutPointer
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void *, ASCabGetPointerRaw, (
+ ASConstCab theCab, const char *theKey, const char *expectedType))
+
+/**
+ Retrieves the pointer stored under <code>theKey</code> in <code>theCab</code> and removes the
+ key from <code>theCab</code>. If <code>noRefs</code> is set to <code>true</code>, the client assumes ownership
+ of the data referenced by the pointer and is responsible for deallocating
+ any resources associated with it.
+ @param theCab The cabinet.
+ @param theKey The key name.
+ @param expectedType The data type referenced by the pointer. Since
+ ASCabGetPointer() is actually a macro, you should pass the type
+ as a literal name, not a string. For example, use <code>PDDoc</code> instead of <code>"PDDoc"</code>.
+ Pointers are always <i>typed</i>, in that they always have associated with
+ them a string indicating the type to which they point.
+ @param noRefs (Filled by the method, may be <code>NULL</code>) If non-<code>NULL</code>, a value
+ of <code>true</code> indicates that there are no other ASCab objects that reference this
+ pointer, and a value of <code>false</code> indicates that some ASCab object still contains
+ a copy of the pointer.
+ @return The pointer value stored under <code>theKey</code>. It will be <code>NULL</code> if <code>theKey</code> is
+ not present in <code>theCab</code>, the value stored under <code>theKey</code> is not of type
+ kASValuePointer, or the type of the pointer does not match <code>expectedType</code>.
+ @exception genErrBadParm
+ @see ASCabGetPointer
+ @see ASCabPutPointer
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+
+NPROC(void *, ASCabDetachPointerRaw, (
+ ASCab theCab, const char *theKey, const char *expectedType, ASBool *noRefs))
+
+/**
+ Stores a pointer in <code>theCab</code> under <code>theKey</code>. See the ASCab description for more information.
+ @param theCab The cabinet.
+ @param theKey (May be <code>NULL</code>) The key name.
+ @param theType The data type referenced by the pointer. Since
+ ASCabGetPointer() is actually a macro, you should pass the type
+ as a literal name, not a string. For example, use <code>PDDoc</code> instead of <code>"PDDoc"</code>.
+ Pointers are always <i>typed</i>, in that they always have associated with
+ them a string indicating the type to which they point.
+ @param thePtr The value to be stored.
+ @param destroy (May be <code>NULL</code>) A user-supplied callback which is
+ called when the reference count associated with <code>thePtr</code> is zero.
+ @exception genErrBadParm
+ @exception genErrNoMemory
+ @see ASCabGetPointer
+ @see ASCabDetachPointer
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutPointerRaw, (
+ ASCab theCab, const char *theKey, const char *theType,
+ void *thePtr, ASCabPointerDestroyProc destroy))
+
+/**
+ Obtains the resource deallocation callback associated with
+ the pointer stored under <code>theKey</code> in <code>theCab</code>. When the reference
+ count of the pointer falls to zero, the callback is called
+ to free the resources associated with the object it references.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The callback (if any) associated with the pointer if the
+ key is found and the value stored under it is of type kASValuePointer;
+ otherwise <code>NULL</code> is returned.
+ @exception genErrBadParm
+ @see ASCabDetachPointer
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCabPointerDestroyProc, ASCabGetPointerDestroyProc, (
+ ASConstCab theCab, const char *theKey))
+
+/**
+ Returns a string representation of the data type referenced
+ by the pointer stored under <code>theKey</code> in <code>theCab</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The string if the key is found and the value stored under
+ it is of type kASValuePointer; otherwise <code>NULL</code> is returned.
+
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(const char *, ASCabGetPointerType, (
+ ASConstCab theCab, const char *theKey))
+
+
+/**
+ Stores an ASCab in <code>theCab</code> under <code>theKey</code>. If the cabinet is
+ already a value for some other ASCab, ASCabPutCab() will raise an exception,
+ since any cabinet can be contained by at most one other
+ cabinet.
+
+ <p><code>theCab</code> assumes ownership of the cabinet, so the client must
+ not destroy it.</p>
+ @param theCab IN/OUT The cabinet.
+ @param keyName IN/OUT (May be <code>NULL</code>) The key name.
+ @param putCab IN/OUT (May be <code>NULL</code>) The ASCab to be stored in <code>theCab</code>.
+ If <code>cabVal</code> is <code>NULL</code>, then any value under <code>theKey</code> is destroyed
+ and <code>theKey</code> is removed from <code>theCab</code>.
+ @exception genErrBadParm
+ @see ASCabGetCab
+ @see ASCabDetachCab
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutCab, (ASCab theCab, const char *keyName, ASCab putCab))
+
+/**
+ Returns the ASCab stored under <code>theKey</code> in <code>theCab</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The ASCab stored under <code>theKey</code> if the key is found and the
+ value stored under it is of type kASValueCabinet; otherwise
+ <code>NULL</code> is returned. This object is owned by <code>theCab</code> and should
+ not be destroyed by the client.
+ @exception genErrBadParm
+ @see ASCabPutCab
+ @see ASCabDetachCab
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCab, ASCabGetCab, (ASConstCab theCab, const char *theKey))
+
+/**
+ Retrieves the ASCab stored under <code>theKey</code> in <code>theCab</code> and removes
+ the key from <code>theCab</code>.
+
+ <p>The client assumes ownership of the ASCab returned and is
+ responsible for destroying it. </p>
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The cabinet. Will be <code>NULL</code> if <code>theKey</code> is not present in <code>theCab</code>,
+ or if the value stored under <code>theKey</code> is not of type kASValueCabinet.
+
+ @exception genErrBadParm
+ @see ASCabPutCab
+ @see ASCabGetCab
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCab, ASCabDetachCab, (ASCab theCab, const char *theKey))
+
+
+/**
+ Returns the string stored under <code>theKey</code> in <code>theCab</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The string stored under <code>theKey</code> if the key is found and the
+ value stored under it is of type kASValueString; otherwise
+ <code>NULL</code> is returned. The object referenced by this pointer
+ is owned by <code>theCab</code> and should not be destroyed by the client.
+
+ @exception genErrBadParm
+ @exception genErrNoMemory
+ @see ASCabGetStringCopy
+ @see ASCabDetachString
+ @see ASCabPutString
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(const char *, ASCabGetString, (ASConstCab theCab, const char *theKey))
+
+/**
+ Returns a copy of the string stored under <code>theKey</code> in <code>theCab</code>.
+
+ <p>It is the client's responsibility to release the memory
+ allocated for the string using ASfree(). </p>
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return A copy of the string stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueString;
+ otherwise <code>NULL</code> is returned.
+ @exception genErrBadParm
+ @exception genErrNoMemory
+ @see ASCabGetString
+ @see ASCabDetachString
+ @see ASCabPutString
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(char *, ASCabGetStringCopy, (ASConstCab theCab, const char *theKey))
+
+/**
+ Retrieves the string stored under <code>theKey</code> in <code>theCab</code> and removes
+ the key from <code>theCab</code>.
+
+ <p>The client assumes ownership of the string and is responsible
+ for deallocating any resources associated with it. </p>
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The string stored under <code>theKey</code>. Will be <code>NULL</code> if <code>theKey</code> is
+ not present in <code>theCab</code>, or if the value stored under <code>theKey</code>
+ is not of type kASValueString.
+ @exception genErrBadParm
+ @see ASCabGetString
+ @see ASCabGetStringCopy
+ @see ASCabPutString
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(char *, ASCabDetachString, (ASCab theCab, const char *theKey))
+
+/**
+ Stores a string in <code>theCab</code> under <code>theKey</code>. A string consists
+ of some number of bytes followed by a single <code>NULL</code> (zero)
+ byte. The string must have been allocated using ASmalloc().
+
+ <p><code>theCab</code> assumes ownership of the string, so the client should
+ not attempt to free the memory associated with it. </p>
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param theStr IN/OUT (May be <code>NULL</code>) The string to be stored.
+ If <code>NULL</code>, the value (if any) stored under <code>theKey</code> in <code>theCab</code>
+ is destroyed and <code>theKey</code> is removed from <code>theCab</code>.
+ @exception genErrBadParm
+ @see ASCabGetString
+ @see ASCabGetStringCopy
+ @see ASCabDetachString
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutString, (ASCab theCab, const char *theKey, const char *theStr))
+
+
+/**
+ Returns the ASText object stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @return The ASText object stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueText; otherwise
+ <code>NULL</code> is returned. This object is owned by <code>theCab</code> and should
+ not be destroyed by the client.
+ @exception genErrBadParm
+ @see ASCabDetachText
+ @see ASCabPutText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASCabGetText, (ASConstCab theCab, const char *theKey))
+
+/**
+ Retrieves the ASText object stored under <code>theKey</code> in <code>theCab</code>
+ and removes the key from <code>theCab</code>.
+
+ <p>The client assumes ownership of the ASText object and is
+ responsible for deallocating it using ASTextDestroy(). </p>
+ @param theCab The cabinet.
+ @param theKey The key name.
+ @return The ASText object stored under <code>theKey</code>. It will be <code>NULL</code> if <code>theKey</code>
+ is not present in <code>theCab</code>, or if the value stored under <code>theKey</code>
+ is not of type kASValueText.
+ @exception genErrBadParm
+ @see ASCabGetText
+ @see ASCabPutText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASCabDetachText, (ASCab theCab, const char *theKey))
+
+/**
+ Stores an ASText object in <code>theCab</code> under <code>theKey</code>.
+
+ <p><code>theCab</code> assumes ownership of the object, so the client should
+ not attempt to free the memory associated with it. </p>
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param theText IN/OUT (May be <code>NULL</code>) The object to be stored. If its value is
+ <code>NULL</code>, the value (if any) stored under <code>theKey</code> in <code>theCab</code> is
+ destroyed and <code>theKey</code> is removed from <code>theCab</code>.
+ @exception genErrBadParm
+ @see ASCabGetText
+ @see ASCabDetachText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutText, (ASCab theCab, const char *theKey, ASText theText))
+
+
+/**
+ Returns the binary object stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param numBytes IN/OUT (Filled by the method, may be <code>NULL</code>) If it is
+ not <code>NULL</code>, it contains the size (in bytes) of the object returned.
+
+ @return The binary object stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueBinary;
+ otherwise <code>NULL</code> is returned. This object is owned by the
+ ASCab and should not be destroyed by the caller.
+ @exception genErrBadParm
+ @see ASCabGetBinaryCopy
+ @see ASCabDetachBinary
+ @see ASCabPutBinary
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(const void *, ASCabGetBinary, (ASConstCab theCab, const char *theKey, ASTArraySize *numBytes))
+
+/**
+ Returns a copy of the binary object stored under <code>theKey</code>
+ in <code>theCab</code>.
+
+ <p>It is the client's responsibility to release
+ the memory associated with the object using ASfree(). </p>
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param numBytes IN/OUT (Filled by the method, may be <code>NULL</code>) If it is
+ not <code>NULL</code>, it contains the size of the object returned.
+ @return The binary object stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueBinary;
+ otherwise <code>NULL</code> is returned.
+ @exception genErrBadParm
+ @exception genErrNoMemory
+ @see ASCabGetBinary
+ @see ASCabDetachBinary
+ @see ASCabPutBinary
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void *, ASCabGetBinaryCopy, (ASConstCab theCab, const char *theKey, ASTArraySize *numBytes))
+
+/**
+ Retrieves the binary object stored under <code>theKey</code> in <code>theCab</code>
+ and removes the key from <code>theCab</code>.
+
+ <p>The client assumes ownership of the object and is responsible
+ for deallocating any resources associated with it. </p>
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param numBytes IN/OUT (Filled by the method, may be <code>NULL</code>) If it is
+ not <code>NULL</code>, it contains the size (in bytes) of the object retrieved.
+ @return A pointer to the binary object. It will be <code>NULL</code> if <code>theKey</code> is
+ not present in <code>theCab</code> or if the value stored under <code>theKey</code>
+ is not of type kASTypeBinary.
+ @exception genErrBadParm
+ @see ASCabGetBinary
+ @see ASCabGetBinaryCopy
+ @see ASCabPutBinary
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void *, ASCabDetachBinary, (ASCab theCab, const char *theKey, ASTArraySize *numBytes))
+
+/**
+ Stores a binary object in <code>theCab</code> under <code>theKey</code>. The ASCab
+ assumes ownership of the binary object, so the client should
+ not attempt to free the memory associated with it. The binary
+ object must have been allocated using ASmalloc().
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param theBlob IN/OUT (May be <code>NULL</code>) A pointer to the binary object
+ to be stored. If it is <code>NULL</code>, the value (if any) stored under <code>theKey</code>
+ in <code>theCab</code> is destroyed and <code>theKey</code> removed from <code>theCab</code>.
+ @param blobSize IN/OUT The size of the binary object.
+ @exception genErrBadParm
+ @see ASCabGetBinary
+ @see ASCabGetBinaryCopy
+ @see ASCabDetachBinary
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutBinary, (
+ ASCab theCab, const char *theKey, void *theBlob, ASTArraySize blobSize))
+
+
+/**
+ Stores a value with a type of kASValueNull in <code>theCab</code> under
+ <code>theKey</code>. <code>NULL</code> cabinet entries are used as placeholders or
+ to removed other cabinet entries during an ASCabMunge operation.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutNull, (ASCab theCab, const char *theKey))
+
+
+/**
+ Removes all keys from <code>theCab</code> and destroys all values they
+ point to.
+ @param theCab IN/OUT The cabinet.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabMakeEmpty, (ASCab theCab))
+
+
+/**
+ Finds any empty cabinets in <code>theCab</code>, removes their corresponding
+ keys, and destroys them.
+ @param theCab The cabinet.
+ @param recurse <code>true</code> to recurse through all sub-cabinets
+ inside <code>theCab</code>; <code>false</code> to limit enumeration to key/value pairs
+ directly inside <code>theCab</code>.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabDestroyEmpties, (ASCab theCab, ASBool recurse))
+
+
+/**
+ For each key/value pair in <code>srcCab</code> a copy of the key/value
+ pair will be placed into <code>dstCab</code>, possibly overwriting any
+ identically named key/value pair in <code>dstCab</code>. If the value
+ being copied is a pointer with an associated <code>destroyProc</code>,
+ the pointer and its type string, but not the data it points
+ to, will be copied and an internal reference count will be incremented.
+
+ @param srcCab The source cabinet.
+ @param dstCab The destination cabinet.
+ @exception genErrBadParm
+ @exception genErrNoMemory
+ @see ASCabDup
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabCopy, (ASConstCab srcCab, ASCab dstCab))
+
+/**
+ Creates a new ASCab and populates it with copies of the
+ key/value pairs in <code>srcCab</code>. It is equivalent to <code>ASCabCopy( srcCab, ASCabNew () )</code>.
+ @param srcCab The source cabinet.
+ @return The newly created ASCab.
+ @exception genErrBadParm
+ @exception genErrNoMemory
+ @see ASCabCopy
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCab, ASCabDup, (ASConstCab srcCab))
+
+
+/**
+ Compares two cabinet values and returns <code>true</code> only
+ if they are equal (meaning that they have the same type and value).
+ Cabinets are compared using ASCabEqual(). ASText values are
+ compared by using ASTextCmp() and testing for a return value
+ of <code>0</code> (zero). Strings and binary values must have the same
+ lengths and byte-for-byte contents. Booleans, atoms, doubles,
+ and integers must have equal values. Pointer values must
+ point to the same location in memory but may have different
+ <i>destroyProcs</i> and type strings.
+ @param cab1 IN/OUT The first cabinet.
+ @param keyName1 IN/OUT The key name.
+ @param cab2 IN/OUT The second cabinet.
+ @param keyName2 IN/OUT The key name.
+ @return See above.
+ @exception genErrBadParm
+ @see ASCabEqual
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASBool, ASCabValueEqual, (ASConstCab cab1, const char *keyName1,
+ ASConstCab cab2, const char *keyName2))
+
+
+/**
+ Compares two cabinets and verifies that they have a matching
+ set of keys and that all key values are equal as reported by
+ ASCabValueEqual().
+ @param cab1 The first cabinet.
+ @param cab2 The second cabinet.
+ @return <code>true</code> if the cabinets are equal, <code>false</code> otherwise.
+ @exception genErrBadParm
+ @see ASCabValueEqual
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASBool, ASCabEqual, (ASConstCab cab1, ASConstCab cab2))
+
+
+/**
+ Munges the keys and the corresponding values in <code>theCab</code> based
+ on the keys in <code>keyCab</code> and the munge action. Note that <code>keyCab</code>
+ is never altered, but <code>theCab</code> is.
+ @param theCab IN/OUT The cabinet to be modified.
+ @param keyCab IN/OUT The cabinet used to modify <code>theCab</code>.
+ @param action IN/OUT The type of action to be taken.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabMunge, (ASCab theCab, ASConstCab keyCab, ASCabMungeAction action))
+
+
+/**
+ Stores an ASPathName in <code>theCab</code> under <code>theKey</code>.
+
+ <p><code>theCab</code> assumes ownership of the ASPathName, so the client
+ need not call ASFileSysReleasePath(). </p>
+ @param theCab IN/OUT The cabinet.
+ @param keyName IN/OUT (May be <code>NULL</code>) The key name.
+ @param fileSys IN/OUT The ASFileSys from which the path was obtained.
+
+ @param pathName IN/OUT (May be <code>NULL</code>) The ASPathName to be stored.
+ If <code>NULL</code>, the value (if any) stored under <code>theKey</code> in <code>theCab</code>
+ is destroyed and <code>theKey</code> is removed from <code>theCab</code>.
+ @exception genErrBadParm
+ @see ASCabGetPathNameCopy
+ @see ASCabDetachPathName
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabPutPathName,
+ (ASCab theCab, const char *keyName, ASFileSys fileSys, ASPathName pathName))
+
+/**
+ Returns a copy of ASPathName stored under <code>theKey</code> in <code>theCab</code>.
+
+ <p>It is the client's responsibility to release the ASPathName
+ using ASFileSysReleasePath(). </p>
+
+ <p>Both <code>fileSys</code> and <code>pathName</code> will be <code>NULL</code> if <code>theKey</code> was not
+ found, there was no valid ASPathName stored under the
+ key, or if <code>pathName</code> does not point to an existing file. </p>
+
+ @param theCab IN/OUT The cabinet.
+ @param keyName IN/OUT The key name.
+ @param fileSys IN/OUT (Filled by the method) The ASFileSys that
+ <code>pathName</code> was opened through.
+ @param pathName IN/OUT (Filled by the method) The path name.
+ @exception genErrNoMemory
+ @exception Any exception raised by ASFileSysPathFromDIPath.
+ @see ASCabPutPathName
+ @see ASCabDetachPathName
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabGetPathNameCopy,
+ (ASConstCab theCab, const char *keyName, ASFileSys *fileSys, ASPathName *pathName))
+
+/**
+ Retrieves the ASPathName stored under <code>theKey</code> in <code>theCab</code> and
+ removes the key from <code>theCab</code>.
+
+ <p>Both <code>fileSys</code> and <code>pathName</code> will be <code>NULL</code> if <code>theKey</code> was not
+ found, there was no valid ASPathName stored under the
+ key, or if the ASPathName does not point to an existing
+ file.</p>
+
+ <p>It is the client's responsibility to release the memory
+ associated with the ASPathName using ASFileSysReleasePath().</p>
+
+ @param theCab IN/OUT The cabinet.
+ @param keyName IN/OUT The key name.
+ @param fileSys IN/OUT (Filled by the method) The ASFileSys that
+ pathName was opened through.
+ @param pathName IN/OUT (Filled by the method) The path name.
+ @exception genErrNoMemory
+ @exception Any exceptions raised by ASFileSysPathFromDIPath.
+ @see ASCabPutPathName
+ @see ASCabGetPathNameCopy
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabDetachPathName,
+ (ASCab theCab, const char *keyName, ASFileSys *fileSys, ASPathName *pathName))
+
+
+/**
+ Writes <code>theCab</code> out to a stream. The caller retains ownership
+ of the cabinet. The stream will not be closed or flushed.
+
+ @param theCab IN/OUT The cabinet.
+ @param theStm IN/OUT Must be a stream opened through ASFileStmWrOpen()
+ or ASProcStmWrOpen().
+ @exception genErrBadParm
+ @exception fileErrWrite
+ @see ASCabReadFromStream
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabWriteToStream, (ASConstCab theCab, ASStm theStm))
+
+/**
+ Reads a previously written cabinet from a stream.
+ @param stm Must be a stream opened through ASFileStmRdOpen(),
+ ASMemStmRdOpen(), or ASProcStmRdOpenEx().
+ @return The ASCab, or <code>NULL</code> if it could not be constructed.
+ @see ASCabWriteToStream
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASCab, ASCabReadFromStream, (ASStm stm))
+
+
+/**
+ Renames a key within <code>theCab</code> while preserving the value associated
+ with it. If there is already a key equal to <code>newKeyName</code> in
+ <code>theCab</code>, its value will be destroyed and replaced with the
+ value of oldKeyName.
+
+ <p>Any attempt to move the item from one sub-cabinet to another
+ will cause ASCabRename() to raise an exception. For example,
+ <code>ASCabRename(theCab, "SubCab1:Key1", "SubCab2:Key1")</code> will
+ raise an exception. If this routine raises an exception, <code>theCab</code> will
+ be untouched. </p>
+ @param theCab The cabinet.
+ @param oldKeyName The key name to be changed.
+ @param newKeyName The new name.
+ @exception genErrBadParm
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASCabRename, (ASCab theCab, const char *oldKeyName, const char *newKeyName))
+
+/**
+ Used to determine whether the ASText object contains no
+ text. For example, it determines if retrieving Unicode text would yield
+ a <code>0</code>-length string.
+ @param str A string.
+ @return Returns <code>true</code> if the ASText object contains no text.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASBool, ASTextIsEmpty, (ASConstText str))
+
+
+/**
+ Replaces all end-of-line characters within the ASText object
+ with the correct end-of-line character for the current platform. For
+ example, on Windows, <code>\\r</code> and <code>\\n</code> are replaced with <code>\\r\\n</code>.
+
+ @param text An object of type ASText.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextNormalizeEndOfLine, (ASText text))
+
+
+/**
+ Creates a new string from an ASInt32 by converting the number
+ to its decimal representation without punctuation or leading
+ zeros.
+ @param num A number of type ASInt32.
+ @return An ASText object.
+ @see ASTextFromUns32
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromInt32, (ASInt32 num))
+
+/**
+ Creates a new string from an ASUns32 by converting it to
+ a decimal representation without punctuation or leading
+ zeros.
+ @param num IN/OUT A value of type ASUns32.
+ @return An ASText object.
+ @see ASTextFromInt32
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(ASText, ASTextFromUns32, (ASUns32 num))
+
+/**
+ Removes the contents of an ASText (turns it into an empty
+ string).
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, ASTextMakeEmpty, (ASText str))
+
+/* Acrobat 6.0 additions */
+/**
+ Replaces all occurrences of characters contained in the
+ list <code>pszBadCharList</code> in the text with the specified replacement
+ character.
+
+ <p>Various exceptions may be raised.</p>
+
+ @param str The text in which to replace characters.
+ @param pszBadCharList A list of characters to replace,
+ in sorted order with no duplicates.
+ @param replaceChar The character with which to replace
+ any character appearing in the list.
+ @see ASTextReplace
+ @see ASTextReplaceASCII
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(void, ASTextReplaceBadChars, (ASText str, char *pszBadCharList, char replaceChar))
+
+/**
+ Returns the ASUns32 value stored under <code>theKey</code> in <code>theCab</code>.
+ @param theCab The cabinet.
+ @param theKey The key name.
+ @param defValue The default value.
+ @return The ASUns32 value stored under <code>theKey</code> if the key is found and the value stored under
+ it is of type kASValueUns; otherwise <code>defValue</code> is returned.
+ @exception genErrBadParm
+ @see ASCabPutUns
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(ASUns32, ASCabGetUns, (ASConstCab theCab, const char *theKey, ASUns32 defValue))
+
+/**
+ Stores the ASUns32 value under <code>theKey</code> in <code>theCab</code>.
+ @param theCab The cabinet.
+ @param theKey The key name.
+ @param theUns The value to be stored.
+ @exception genErrBadParm
+ @see ASCabGetUns
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(void , ASCabPutUns, (ASCab theCab, const char *theKey, ASUns32 theUns))
+
+/********************************************************************************
+ * ASDate API calls
+ *
+ * General Notes
+ *
+ * Some of the ASDate methods will raise exceptions when they fail to allocate memory.
+ *
+ *
+ ********************************************************************************/
+/**
+ Creates a date object. The newly allocated object reflects
+ the epoch time: Jan 1 1970 00:00:00 UTC.
+
+ <p>Raises an exception if there is not enough memory for the
+ operation.</p>
+ @return The newly created date object.
+ @see ASDateClear
+ @see ASDateCopy
+ @see ASDateDestroy
+ @see ASDateDup
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASDate, ASDateNew, (void))
+
+/**
+ Creates a new date object containing the same data as an existing date object.
+ @param date The date to duplicate.
+ @return The new date object.
+ @see ASDateCopy
+ @see ASDateDestroy
+ @see ASDateNew
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASDate, ASDateDup, (const ASDate date))
+
+/**
+ Reinitializes a date object to the newly-allocated state,
+ as returned by ASDateNew().
+ @param retVal The date object.
+ @see ASDateDestroy
+ @see ASDateNew
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateClear, (ASDate retVal))
+
+/**
+ Copies date and time data from one date object to another.
+
+ @param original The date to be copied.
+ @param copy The date into which the data is copied.
+ @see ASDateClear
+ @see ASDateDup
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateCopy, (const ASDate original, ASDate copy))
+
+/**
+ Releases and destroys a date object.
+ @param date The date.
+ @see ASDateClear
+ @see ASDateDup
+ @see ASDateNew
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateDestroy, (ASDate date))
+
+/**
+ Creates a time span object. It raises an exception if there
+ is not enough memory for the operation.
+ @return The newly created time span object.
+ @see ASTimeSpanCopy
+ @see ASTimeSpanDup
+ @see ASTimeSpanDestroy
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASTimeSpan, ASTimeSpanNew,(void))
+
+/**
+ Creates a new time span object containing the same data
+ as an existing time span object. It raises an exception if
+ there is not enough memory.
+ @param timeSpan The time span to duplicate.
+ @return The new time span object.
+ @see ASTimeSpanCopy
+ @see ASTimeSpanDestroy
+ @see ASTimeSpanNew
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASTimeSpan, ASTimeSpanDup, (const ASTimeSpan timeSpan))
+
+/**
+ Copies data from one time span object to another.
+ @param original The time span to be copied.
+ @param copy The time span into which the data is copied.
+ @see ASTimeSpanDup
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASTimeSpanCopy, (const ASTimeSpan original, ASTimeSpan copy))
+
+/**
+ Releases and destroys a time span object.
+ @param timeSpan The time span.
+ @see ASTimeSpanDup
+ @see ASTimeSpanNew
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASTimeSpanDestroy, (ASTimeSpan timeSpan))
+
+/**
+ Sets a date object to the current UTC time with no time
+ zone information.
+ @param retVal The date.
+ @see ASDateClear
+ @see ASDateGetUTCTime
+ @see ASDateSetToCurrentLocalTime
+ @see ASDateSetLocalTimeOffset
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateSetToCurrentUTCTime, (ASDate retVal))
+
+/**
+ Sets a date object to the current local time, using the
+ time zone information from the operating system.
+ @param date The date.
+ @see ASDateClear
+ @see ASDateGetLocalTime
+ @see ASDateSetToCurrentUTCTime
+ @see ASDateSetLocalTimeOffset
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateSetToCurrentLocalTime, (ASDate date))
+
+/**
+ Sets a date object's local time offset according to the
+ operating system's current time zone information. Different
+ operating systems handle daylight savings differently. This
+ method causes the date object to always use the same daylight savings time
+ offset that the operating system is currently using, even
+ if the date object is modified.
+ @param date The date.
+ @see ASDateSetToCurrentLocalTime
+ @see ASDateSetToCurrentUTCTime
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateSetLocalTimeOffset, (ASDate date))
+
+/**
+ Initializes a date object from a time string. It raises an
+ exception if there is not enough memory, if the format is
+ unrecognized, or if the time string is not formatted according
+ to the supplied format.
+ @param date The date object.
+ @param timeString The time string, in the specified format.
+
+ @param format The format of the time string. kASTimeNone and kASTimeUniversalH are not supported.
+ @see ASDateClear
+ @see ASDateSetToCurrentLocalTime
+ @see ASDateSetToCurrentUTCTime
+ @see ASDateSetTimeFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateSetTimeFromString, (ASDate date, const char* timeString, ASDateTimeFormat format))
+
+/**
+ Initializes a date object from a time record. It raises an
+ exception if the time structure represents an invalid time,
+ such as January 32nd 1999 or Feb 29th 2001. It assumes that
+ the parameters for the day and month in the time record are
+ <code>1</code>-based.
+ @param date The date object.
+ @param timeRec The time record.
+ @see ASDateClear
+ @see ASDateSetToCurrentLocalTime
+ @see ASDateSetToCurrentUTCTime
+ @see ASDateSetTimeFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateSetTimeFromRec, (ASDate date, const ASTimeRec* timeRec))
+
+/*These functions modify the date by the length of time provided by the ASCalendarTimeSpan/ASTimeSpan object.
+ Note the built in ambiguity in ASCalendarTimeSpan. If you want to subtract and add exact timeSpans (2592000
+ seconds as opposed to 1 month, use ASDateAdd/SubtractTimeSpan instead of their CalendarTimeSpan counterparts.*/
+
+/**
+ Subtracts a calendar time span from a date. It modifies the
+ date by the length of time provided in the ASCalendarTimeSpan
+ object.
+
+ @param date The date.
+ @param timeSpan The calendar time span to subtract.
+ @see ASDateAddCalendarTimeSpan
+ @see ASDateSubtractTimeSpan
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+
+ @note There is some ambiguity in a calendar
+ time span; to subtract an exact time span (for example,
+ 2592000 seconds rather than one month), use ASDateSubtractTimeSpan().
+*/
+NPROC(void, ASDateSubtractCalendarTimeSpan, (ASDate date, const ASCalendarTimeSpan timeSpan))
+
+/**
+ Adds a calendar time span to a date. It modifies the date by
+ the length of time provided in the ASCalendarTimeSpan object.
+ @param date The date.
+ @param timeSpan The calendar time span to add.
+ @see ASDateAddTimeSpan
+ @see ASDateSubtractCalendarTimeSpan
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+
+ @note There is some ambiguity in a calendar time span;
+ to add an exact time span (for example, 2592000 seconds
+ rather than one month), use ASDateAddTimeSpan().
+*/
+NPROC(void, ASDateAddCalendarTimeSpan, (ASDate date, const ASCalendarTimeSpan timeSpan))
+
+/**
+ Subtracts a time span (an exact number of seconds) from
+ a date. It modifies the date by the length of time provided
+ in the ASTimeSpan object.
+ @param date The date.
+ @param timeSpan The time span to subtract.
+ @see ASDateAddTimeSpan
+ @see ASDateSubtractCalendarTimeSpan
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateSubtractTimeSpan, (ASDate date, const ASTimeSpan timeSpan))
+
+/**
+ Adds a time span (an exact number of seconds) to a date.
+ It modifies the date by the length of time provided in the
+ ASTimeSpan object.
+ @param date The date.
+ @param timeSpan The time span to add.
+ @see ASDateAddCalendarTimeSpan
+ @see ASDateSubtractTimeSpan
+ @see ASTimeSpanAdd
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateAddTimeSpan, (ASDate date, const ASTimeSpan timeSpan))
+
+
+/**
+ Calculates the difference between two ASDate objects and stores
+ the result in the provided ASCalendarTimeSpan object. The
+ result is broken down into years, months, and so on, in
+ the highest denomination possible. For example, a difference
+ of 13 months is reported as 1 year and 1 month.
+ @param date1 The first date.
+ @param date2 The second date.
+ @param result The calendar time span structure in which
+ to store the difference.
+ @see ASDateExactDiff
+ @see ASDateCompare
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateCalendarDiff, (const ASDate date1, const ASDate date2, ASCalendarTimeSpan result))
+
+/**
+ Calculates the exact difference in seconds between two date
+ objects and stores the result in the provided ASTimeSpan
+ object. If <code>date1</code> is earlier than <code>date2</code>, the result is negative.
+
+ @param date1 The first date.
+ @param date2 The second date.
+ @param result The time span structure in which to store
+ the difference.
+ @see ASDateCalendarDiff
+ @see ASDateCompare
+ @see ASTimeSpanDiff
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASDateExactDiff, (const ASDate date1, const ASDate date2, ASTimeSpan result))
+
+/**
+ Creates a time string from a date object according to a specified format. If time zone
+ information is available in the date object, the string contains the local time along with the
+ time zone adjustment, if that is supported by the requested format.
+ It raises an exception if there is not enough memory.
+
+ <p>It is the client's responsibility to release the memory associated with the returned string using ASfree().</p>
+
+ @param date The date object.
+ @param format The format of the time string.
+ @return The time string in the specified format.
+ @see ASDateClear
+ @see ASDateGetLocalTime
+ @see ASDateGetUTCTime
+ @see ASDateSetTimeFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(char*, ASDateGetTimeString, (const ASDate date, ASDateTimeFormat format))
+
+/**
+ Creates a time record that represents the UTC time represented
+ by the date object. It raises an exception if there is not
+ enough memory.
+ @param date The date object.
+ @return The newly created time record.
+ @see ASDateClear
+ @see ASDateGetLocalTime
+ @see ASDateGetUTCTime
+ @see ASDateSetTimeFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASTimeRec, ASDateGetUTCTime, (const ASDate date))
+
+/**
+ Creates a time record that represents the local time represented
+ by the date object. The resulting local time might not account
+ for daylight savings time correctly if the date object has
+ been modified by adding or substracting a time span or calendar
+ time span. It raises an exception if there is not enough memory.
+ @param date The date.
+ @return The newly created time record.
+ @see ASDateGetTimeString
+ @see ASDateGetUTCTime
+ @see ASDateSetTimeFromRec
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASTimeRec, ASDateGetLocalTime, (const ASDate date))
+
+/**
+ Compares two calendar time spans with respect to a base
+ date. Because the values in a calendar time span are not
+ absolute (for example, a leap year has a different number
+ of days), they are resolved with respect to the base date
+ before the comparison is made.
+ @param timeSpan1 The first calendar time span.
+ @param timeSpan2 The second calendar time span.
+ @param baseDate The base date, or <code>NULL</code> to use Jan 1 1970
+ 00:00:00, the epoch time.
+ @return <code>1</code> if <code>timeSpan1 > timeSpan2</code>, <code>0</code> if they are equal, and <code>-1</code> if <code>timeSpan1 < timeSpan2</code>.
+
+ @see ASDateCompare
+ @see ASTimeSpanCompare
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASCalendarTimeSpanCompare, (const ASCalendarTimeSpan timeSpan1, const ASCalendarTimeSpan timeSpan2, const ASDate baseDate))
+
+/**
+ Compares two time spans to determine if they are equal or if
+ one represents fewer seconds than the other.
+ @param timeSpan1 The first time span.
+ @param timeSpan2 The second time span.
+ @return <code>1</code> if <code>timeSpan1 > timeSpan2</code>, <code>0</code> if they are equal, and <code>-1</code> if <code>timeSpan1 < timeSpan2</code>.
+
+ @see ASDateCompare
+ @see ASCalendarTimeSpanCompare
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASTimeSpanCompare, (const ASTimeSpan timeSpan1, const ASTimeSpan timeSpan2))
+
+/**
+ Adds two calendar time spans, storing the result in another
+ calendar time span object. Because the values in a calendar
+ time span are not absolute (for example, a leap year has
+ a different number of days), they are resolved with respect
+ to the base date before the addition is done. The result
+ is broken down into years, months, and so on, in the highest
+ denomination possible. For example, a difference of 13 months
+ is reported as 1 year and 1 month.
+ @param timeSpan1 The first calendar time span to add.
+
+ @param timeSpan2 The calendar time span to add.
+ @param baseDate The base date, or <code>NULL</code> to use Jan 1 1970
+ 00:00:00, the epoch time.
+ @param result The calendar time span structure in which
+ to store the result.
+ @see ASCalendarTimeSpanCompare
+ @see ASTimeSpanAdd
+ @see ASDateAddCalendarTimeSpan
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASCalendarTimeSpanAddWithBase, (const ASCalendarTimeSpan timeSpan1, const ASCalendarTimeSpan timeSpan2, const ASDate baseDate, ASCalendarTimeSpan result))
+
+/**
+ Adds two time spans, storing the result (an exact number
+ of seconds) in another time span object.
+ @param timeSpan1 The first time span to add.
+ @param timeSpan2 The second time span to add.
+ @param result The time span object in which to store the
+ result.
+ @see ASCalendarTimeSpanAddWithBase
+ @see ASDateAddTimeSpan
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASTimeSpanAdd, (const ASTimeSpan timeSpan1, const ASTimeSpan timeSpan2, ASTimeSpan result))
+
+/**
+ Calculates the difference between calendar time span objects
+ and stores the result in the provided ASCalendarTimeSpan
+ object. If <code>timeSpan2</code> is less than <code>timeSpan1</code>, the result
+ is negative. Because the values in a calendar time span
+ are not absolute (for example, a leap year has a different
+ number of days), they are resolved with respect to the base
+ date before the addition is done. The result is broken down
+ into years, months, and so on, in the highest denomination
+ possible. For example, a difference of 13 months is reported
+ as 1 year and 1 month.
+ @param timeSpan1 The first calendar time span.
+ @param timeSpan2 The second calendar time span.
+ @param baseDate The base date, or <code>NULL</code> to use Jan 1 1970
+ 00:00:00, the epoch time.
+ @param result The calendar time span object in which to
+ store the difference.
+ @see ASDateCalendarDiff
+ @see ASTimeSpanDiff
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASCalendarTimeSpanDiff, (const ASCalendarTimeSpan timeSpan1, const ASCalendarTimeSpan timeSpan2, const ASDate baseDate, ASCalendarTimeSpan result))
+
+/**
+ Calculates the exact difference in seconds between time
+ span objects and stores the result in the provided ASTimeSpan
+ object. If <code>timeSpan2</code> is less than <code>timeSpan1</code>, the result
+ is negative.
+ @param timeSpan1 The first time span.
+ @param timeSpan2 The second time span.
+ @param result The time span object in which to store the
+ difference.
+ @see ASDateExactDiff
+ @see ASCalendarTimeSpanDiff
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASTimeSpanDiff, (const ASTimeSpan timeSpan1, const ASTimeSpan timeSpan2, ASTimeSpan result))
+
+/**
+ Tests whether one date is earlier or later than another.
+
+ @param date1 The first date.
+ @param date2 The second date.
+ @return <code>1</code> if <code>date1 > date2</code>, <code>0</code> if they are equal, <code>-1</code> if <code>date1 < date2</code>.
+
+ @see ASDateExactDiff
+ @see ASTimeSpanCompare
+ @see ASCalendarTimeSpanCompare
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASDateCompare,(const ASDate date1, const ASDate date2))
+
+/**
+ Initializes a time span object to represent a time span
+ of a specific number of seconds.
+ @param timeSpan The time span object.
+ @param numSeconds The number of seconds.
+ @see ASTimeSpanGetASInt32
+ @see ASTimeSpanSet
+ @see ASTimeSpanSetFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASTimeSpanSetFromASInt32,(ASTimeSpan timeSpan, ASInt32 numSeconds))
+
+/**
+ Converts a string to a number of seconds, and initializes
+ a time span object to represent a time span of that number
+ of seconds. This is useful for time spans that are too long
+ to represent with an ASInt32 value.
+ @param timeSpan The time span object.
+ @param numSecondsString The string containing the number
+ of seconds. The string must consist of an optional minus
+ sign (for negative numbers) followed by decimal digits.
+ No white spaces are allowed anywhere in the string.
+ @see ASTimeSpanSet
+ @see ASTimeSpanSetFromASInt32
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASTimeSpanSetFromString, (ASTimeSpan timeSpan, const char* numSecondsString))
+
+/**
+ The internal representation of a time span uses 64-bit signed
+ integers (to avoid the year 2038 problem caused by 32-bit representation).
+ This method initializes a time span object to represent
+ a time span of <code>x</code> seconds, where <code>x</code> is the 64-bit
+ signed integer obtained from concatenating <code>highBits</code> and
+ <code>lowBits</code>.
+ @param timeSpan The time span object.
+ @param highBits The most significant word in the desired
+ 64-bit signed integer value.
+ @param lowBits The least significant word in the desired
+ 64-bit signed integer value.
+ @see ASTimeSpanSetFromASInt32
+ @see ASTimeSpanSetFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASTimeSpanSet, (ASTimeSpan timeSpan, ASInt32 highBits, ASUns32 lowBits))
+
+/**
+ Replaces percent-quoted expressions in the text object with
+ the result of their evaluation, using key/value pairs in
+ the ASCab. For example, for a text value containing the
+ string <code>"%keyone%%keytwo%"</code>, the value is replaced with the
+ concatenation of the values of the keys <code>keyone</code> and <code>keytwo</code>
+ in the ASCab passed in.
+ @param theText A text object containing percent-quoted
+ expressions to replace.
+ @param params The ASCab containing the key/value pairs
+ to use for text replacement.
+ @return None.
+ @exception genErrBadParm if <code>theText</code> is <code>NULL</code>.
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(void, ASTextEval, (ASText theText, ASCab params))
+
+/**
+ Gets a full description of the file system object associated
+ with <code>pathName</code>, returning the item properties in the ASCab
+ format. Calls ASFileSysGetItemPropsAsCabProc().
+
+ <p>If the ASCab has no keys on entry, every property known
+ is filled in. If it is not empty, only properties corresponding
+ to keys in the ASCab are filled in. Keys that do not map
+ to a property of the object are removed.</p>
+
+ <p>The ASCab has the following potential entries:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Key Name</TH><TH>Type</TH></TR>
+ <TR><TD><code>isThere</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>type</code></TD><TD>ASInt32</TD></TR>
+ <TR><TD><code>isHidden</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>isReadOnly</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>creationDate</code></TD><TD><code>char*</code> (PDF style date string)</TD></TR>
+ <TR><TD><code>modDate</code></TD><TD><code>char*</code> (PDF style date string)</TD></TR>
+ <TR><TD><code>fileSizeHigh</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>fileSizeLow</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>folderSize</code></TD><TD>ASInt32</TD></TR>
+ <TR><TD><code>creatorCode</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>typeCode</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>versionMajor</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>versionMinor</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>isCheckedOut</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>isPublished</code></TD><TD>ASBool</TD></TR>
+ </TABLE>
+
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName associated with the object.
+
+ @param theCab (Filled by the method) Properties describing
+ the object, in cabinet format.
+ @return <code>0</code> if no error was encountered; otherwise an error code is
+ returned. If an error code is returned, <code>theCab</code> is not filled
+ with valid values. If the path name does not point to an
+ object on the file system, returns <code>asFileErrFNF</code> and a valid
+ ASCab with <code>isThere</code> set to <code>false</code>.
+ @exception genErrBadParm
+ @exception genErrMethodNotImplemented
+ @see ASFileSysConvertCabToItemProps
+ @see ASFileSysConvertItemPropsToCab
+ @see ASFileSysGetItemProps
+ @since PI_ACROSUPPORT_VERSION >=
+*/
+NPROC(ASInt32, ASFileSysGetItemPropsAsCab, (ASFileSys fileSys, ASPathName pathName, ASCab theCab))
+
+/**
+ Converts a set of item properties from the ASCab format
+ to the ASFileSysItemPropsRec format.
+ @param props (Filled by the method) The item properties
+ structure.
+ @param theCab Properties describing the object, in cabinet
+ format.
+ @return <code>0</code> if no error was encountered; otherwise an error code is
+ returned.
+ @exception genErrBadParm
+ @exception genErrMethodNotImplemented
+ @see ASFileSysConvertItemPropsToCab
+ @see ASFileSysGetItemProps
+ @see ASFileSysGetItemPropsAsCab
+ @since PI_ACROSUPPORT_VERSION >=
+*/
+NPROC(ASInt32, ASFileSysConvertCabToItemProps, (ASFileSysItemProps props, ASCab theCab))
+
+/**
+ Converts a set of item properties from the ASFileSysItemPropsRec
+ format to the ASCab format.
+
+ <p>The ASCab has the following potential entries:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Key Name</TH><TH>Type</TH></TR>
+ <TR><TD><code>isThere</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>type</code></TD><TD>ASInt32</TD></TR>
+ <TR><TD><code>isHidden</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>isReadOnly</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>creationDate</code></TD><TD><code>char*</code> (PDF style date string)</TD></TR>
+ <TR><TD><code>modDate</code></TD><TD><code>char*</code> (PDF style date string)</TD></TR>
+ <TR><TD><code>fileSizeHigh</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>fileSizeLow</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>folderSize</code></TD><TD>ASInt32</TD></TR>
+ <TR><TD><code>creatorCode</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>typeCode</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>versionMajor</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>versionMinor</code></TD><TD>ASUns32</TD></TR>
+ <TR><TD><code>isCheckedOut</code></TD><TD>ASBool</TD></TR>
+ <TR><TD><code>isPublished</code></TD><TD>ASBool</TD></TR>
+ </TABLE>
+
+ @param theCab (Filled by the method) Properties describing
+ the object, in cabinet format.
+ @param props The item properties structure.
+ @return <code>0</code> if no error was encountered; otherwise an error code is
+ returned.
+ @exception genErrBadParm
+ @exception genErrMethodNotImplemented
+ @see ASFileSysConvertCabToItemProps
+ @see ASFileSysGetItemProps
+ @see ASFileSysGetItemPropsAsCab
+ @since PI_ACROSUPPORT_VERSION >=
+*/
+NPROC(ASInt32, ASFileSysConvertItemPropsToCab, (ASCab theCab, const ASFileSysItemPropsRec *props))
+
+/**
+ Tests whether a given operation can be performed on a particular
+ file. It calls the canPerformOpOnItem() procedure registered
+ for the ASFileSysRec, which determines whether the operation
+ is one of the file system-defined operation strings for which
+ there is a handler.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName of the file.
+ @param op The name of the operation to test. A file system-defined
+ string handled by ASFileSysCanPerformOpOnItemProc().
+ @return <code>asGenErrNoError</code> if the operation can be performed
+ on the item, or an error indicating why the oepration would
+ fail.
+ @see ASFileSysPerformOpOnItem
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASFileSysCanPerformOpOnItem, (ASFileSys fileSys, ASPathName pathName, const char *op))
+
+/**
+ Performs a specified operation on a particular file, passing
+ specified parameters. It calls the performOpOnItem() procedure
+ registered for the ASFileSysRec.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName of the file.
+ @param op The name of the operation to perform. A file system-defined
+ string handled by ASFileSysPerformOpOnItemProc().
+ @param params An ASCab object containing parameters to
+ pass to the operation.
+ @return <code>0</code> if the operation was successful,
+ a nonzero platform-dependent error code otherwise.
+ @see ASFileSysCanPerformOpOnItem
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASFileSysPerformOpOnItem, (ASFileSys fileSys, ASPathName pathName, const char *op, ASCab params))
+
+/**
+ Negates the time span value of a time span object.
+ @param timeSpan The time span.
+ @see ASTimeSpanSet
+ @see ASTimeSpanSetFromASInt32
+ @see ASTimeSpanSetFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void,ASTimeSpanNegate, (ASTimeSpan timeSpan))
+
+/**
+ Tests whether the bytes in the string conform to
+ the Unicode UTF-8 encoding form. The method does not test
+ whether the string is <code>NULL</code>-terminated.
+ @param cIn The string.
+ @param cInLen The length of the string in bytes, not including
+ the <code>NULL</code> byte at the end.
+ @return <code>true</code> if the bytes in the string conform to the Unicode UTF-8
+ encoding form, <code>false</code> otherwise.
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(ASBool, ASIsValidUTF8, ( const ASUns8* cIn, ASCount cInLen))
+
+/**
+ Compares two ASConstText objects, ignoring language and
+ country information. The comparison is case-sensitive.
+
+ <p>Various exceptions may be raised.</p>
+
+ @param str1 First text object.
+ @param str2 Second text object.
+ @return Returns a negative number if <code>str1 < str2</code>, a positive number
+ if <code>str1 > str2</code>, and <code>0</code> if they are equal.
+ @see ASTextCmp
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASTextCaseSensitiveCmp, (ASConstText str1, ASConstText str2))
+
+/**
+ Enumerates all the keys in the constant cabinet.
+
+ <p>Keys consisting solely of digits are enumerated first, in
+ numeric order (assuming they are not padded with zeros at
+ the front, which will confuse matters). Non-numeric keys
+ are then enumerated in <code>strcmp</code> order. </p>
+
+ <p>The callback procedure must not add, delete, or modify items
+ in <code>theCab</code> during the enumeration. </p>
+
+ <p>It will <code>RERAISE</code> any exceptions thrown by <code>enumProc</code>.</p>
+
+ @param theCab The cabinet.
+ @param enumProc User-supplied callback that is called
+ for each entry found in <code>theCab</code>. This callback cannot modify
+ the ASConstCab object.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @exception genErrBadParm
+ @see ASCabEnum
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(void, ASConstCabEnum, (ASConstCab theCab, ASConstCabEnumProc enumProc, void *clientData))
+
+/**
+ Runs the specified filter on a text object, modifying the
+ text as specified.
+ @param text A text object modified by the method.
+ @param filter The filter to run on the text object.
+ @return None.
+ @exception genErrBadParm if <code>text</code> is <code>NULL</code> or if an invalid filter is
+ specified.
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(void, ASTextFilter, (ASText text, ASTextFilterType filter))
+
+/**
+ Gets the number of seconds from a time span object.
+ @param timeSpan The time span object.
+ @param outOverflow (Filled by the method) <code>true</code> if the
+ number of seconds was too large to be represented by an
+ ASInt32 value, <code>false</code> otherwise.
+ @return The number of seconds.
+ @see ASTimeSpanSet
+ @see ASTimeSpanSetFromASInt32
+ @see ASTimeSpanSetFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASTimeSpanGetASInt32, (ASTimeSpan timeSpan, ASBool* outOverflow))
+
+/* Acrobat 7.0 additions */
+/**
+ Returns the ASInt64 value stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param defValue IN/OUT The default value.
+ @return The ASInt64 value stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueInt64;
+ otherwise <code>defValue</code> is returned.
+ @exception genErrBadParm
+ @see ASCabPutInt64
+ @since PI_ASEXTRA_VERSION >= 0x00070000
+*/
+NPROC(ASInt64, ASCabGetInt64, (ASConstCab theCab, const char *theKey, ASInt64 defValue))
+
+/**
+ Stores an ASInt64 value in <code>theCab</code> under <code>theKey</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param theInt IN/OUT The value to be stored.
+ @exception genErrBadParm
+ @see ASCabGetInt64
+ @since PI_ASEXTRA_VERSION >= 0x00070000
+*/
+NPROC(void , ASCabPutInt64, (ASCab theCab, const char *theKey, ASInt64 theInt))
+
+/**
+ Returns the ASUns64 value stored under <code>theKey</code> in <code>theCab</code>.
+
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT The key name.
+ @param defValue IN/OUT The default value.
+ @return The ASUns64 value stored under <code>theKey</code> if the key is found
+ and the value stored under it is of type kASValueUns64;
+ otherwise <code>defValue</code> is returned.
+ @exception genErrBadParm
+ @see ASCabPutUns64
+ @since PI_ASEXTRA_VERSION >= 0x00070000
+*/
+NPROC(ASUns64, ASCabGetUns64, (ASConstCab theCab, const char *theKey, ASUns64 defValue))
+
+/**
+ Stores an ASUns64 value in <code>theCab</code> under <code>theKey</code>.
+ @param theCab IN/OUT The cabinet.
+ @param theKey IN/OUT (May be <code>NULL</code>) The key name.
+ @param theInt IN/OUT The value to be stored.
+ @exception genErrBadParm
+ @see ASCabGetUns64
+ @since PI_ASEXTRA_VERSION >= 0x00070000
+*/
+NPROC(void , ASCabPutUns64, (ASCab theCab, const char *theKey, ASUns64 theInt))
+
+/* Acrobat 9.0 additions */
+
+/**
+ Removes the contents of an <code>ASText</code> object (converts it into an empty
+ string). It clears the released storage (for security strings).
+ @since PI_ASEXTRA_VERSION >= 0x00090000
+*/
+NPROC(void, ASTextMakeEmptyClear, (ASText str))
+
+/**
+ Converts user input of a password to a form that can be used by Acrobat to open a file.
+ @param inPassword IN A host-endian, 16-bit <code>NULL</code>-terminated Unicode string.
+ @param outPassword OUT A location to store a pointer to an allocated <code>char*</code> <code>NULL</code>-terminated string.
+ @param useUTF IN A flag for controlling the conversion. Prior to Acrobat 9.0, passwords were converted from
+ host code-page encoding (8-bit mode) to <code>PDFDocEncoding</code>.
+ If <code>useUTF == false</code>, this routine does the same, starting from 16-bit Unicode.
+ With encryption, Acrobat 9.0 and later allows Unicode passwords, normalized and converted to UTF-8 encoding.
+ If <code>useUTF == true</code>, such a Unicode password is what is returned.
+*/
+ NPROC(void, ASUCS_GetPasswordFromUnicode, (ASUTF16Val* inPassword, void** outPassword, ASBool useUTF))
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraVers.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraVers.h
new file mode 100644
index 0000000..ae76b32
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASExtraVers.h
@@ -0,0 +1,26 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1999-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASExtraVers.h
+
+ - ASExtra HFT name and version.
+
+*********************************************************************/
+
+#ifndef _H_ASExtraVers
+#define _H_ASExtraVers
+
+#define ASExtraHFTName "ASExtra"
+
+#endif /* _H_ASExtraVers */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileE.h
new file mode 100644
index 0000000..39e2800
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileE.h
@@ -0,0 +1,20 @@
+/* ASFileE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+
+#include "ASFileEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileEASF.h
new file mode 100644
index 0000000..c78477e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASFileEASF.h
@@ -0,0 +1,70 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(asFileErrNoErr, "No error.")
+
+DefineErr(asFileErrGeneral, "A file error has occurred.")
+
+DefineErr(asFileErrObsolete, "")
+
+DefineErr(asFileErrDirFull, "The folder is full.")
+
+DefineErr(asFileErrDiskFull, "The disk you were saving to or the disk used for temporary files is full. Free some space on this disk and try again, or save to a different disk.")
+
+DefineErr(asFileErrNSV, "The disk containing this file is not available.")
+
+DefineErr(asFileErrIO, "A file I/O error has occurred.")
+
+DefineErr(asFileErrRead, "A file read error has occurred.")
+
+DefineErr(asFileErrWrite, "A file write error has occurred.")
+
+DefineErr(asFileErrEOF, "End of file was reached unexpectedly.")
+
+DefineErr(asFileErrLocked, "This file is locked.")
+
+DefineErr(asFileErrVLocked, "This disk is locked and cannot be written to.")
+
+DefineErr(asFileErrBusy, "This file is busy and cannot be deleted.")
+
+DefineErr(asFileErrExists, "Another file already exists under the same name.")
+
+DefineErr(asFileErrAlreadyOpen, "This file is already open or in use by another application.")
+
+DefineErr(asFileErrPerm, "You do not have access to this file.")
+
+DefineErr(asFileErrWrPerm, "You do not have permission to write to this file.")
+
+DefineErr(asFileErrFNF, "This file cannot be found.")
+
+DefineErr(asFileErrOpenFailed, "File open failed.")
+
+DefineErr(asFileErrBytesNotReady, "Bytes not ready.")
+
+DefineErr(asFileErrUserRequestedStop, "User requested stop.")
+
+DefineErr(asFileErrIOTimeout, "A file I/O error has occurred. The file connection timed out.")
+
+DefineErr(asFileErrReadBlocked, "A file I/O error has occurred. The file is blocked while reading.")
+
+DefineErr(asFileErrNotADir, "This operation can only be performed on a folder.")
+
+DefineErr(asFileErrTempCreate, "A uniquely named temporary file could not be created. Please restart the application and try again.")
+
+DefineErr(asFileErrTooBig, "This file is too big for the current operation.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenE.h
new file mode 100644
index 0000000..369128f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenE.h
@@ -0,0 +1,19 @@
+/* ASGenE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "ASGenEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenEASF.h
new file mode 100644
index 0000000..d0cdfda
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASGenEASF.h
@@ -0,0 +1,44 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(asGenErrNoError, "No error.")
+
+DefineErr(asGenErrGeneral, "An internal error occurred.")
+
+DefineErr(asGenErrNoMemory, "Out of memory.")
+
+DefineErr(asGenErrBadParm, "Bad parameter.")
+
+DefineErr(asGenErrListOverflow, "Operation or data is too complex.")
+
+DefineErr(asGenErrBadUnlock, "Attempt to release an unlocked object.")
+
+DefineErr(asGenErrExceptionStackOverflow, "Exception stack overflow.")
+
+DefineErr(asGenErrResourceLoadFailed, "Failed to load an application resource (internal error).")
+
+DefineErr(asGenErrNameAlreadyRegistered, "Attempt to register an object with a name already in use.")
+
+DefineErr(asGenErrMethodNotImplemented, "Attempt to call a method that has not been implemented.")
+
+DefineErr(asGenErrCanceled, "User canceled operation.")
+
+DefineErr(asGenErrNoValidSerialNoFound, "No valid Acrobat serial number found. Acrobat will now quit.")
+
+DefineErr(asGenErrOutOfRange, "A number is out of range.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASKey.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASKey.h
new file mode 100644
index 0000000..9c036a6
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASKey.h
@@ -0,0 +1,128 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASKey.h
+
+ - Definition of standard key codes for Mac and Windows.
+
+*********************************************************************/
+
+#ifndef _H_ASKey
+#define _H_ASKey
+
+#include "Environ.h"
+#if WIN_PLATFORM
+#include <windows.h>
+#endif
+
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_ESCAPE 27
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_SPACE 32
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_TAB 9
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_ARROW_R 29
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_ARROW_D 31
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_ARROW_L 28
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_ARROW_U 30
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_PAGE_U 11
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_PAGE_D 12
+/** @ingroup KeyCodeAllPlatforms */
+#define ASKEY_HELP 5
+
+#if WIN_PLATFORM
+/** @ingroup KeyCodeWindows */
+#define ASKEY_ENTER 13
+/**
+ Deprecated. Use ASKEY_RIGHT_DELETE or ASKEY_BACKSPACE.
+ @ingroup KeyCodeWindows
+*/
+#define ASKEY_DEL 127
+/** @ingroup KeyCodeWindows */
+#define ASKEY_RIGHT_DELETE 127
+/** @ingroup KeyCodeWindows */
+#define ASKEY_INSERT 126
+/** @ingroup KeyCodeWindows */
+#define ASKEY_BACKSPACE 8
+/** @ingroup KeyCodeWindows */
+#define ASKEY_HOME 4
+/** @ingroup KeyCodeWindows */
+#define ASKEY_END 1
+/** @ingroup KeyCodeWindows */
+#define ASKEY_MENU 2
+#endif
+
+#if MAC_PLATFORM
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_ENTER 3
+/**
+ Deprecated. Please use ASKEY_RIGHT_DELETE or ASKEY_BACKSPACE.
+ @ingroup KeyCodeMacintosh
+*/
+#define ASKEY_DEL 8
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_RIGHT_DELETE 127
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_INSERT 126
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_BACKSPACE 8
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_HOME 1
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_END 4
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_CR 13
+/** @ingroup KeyCodeMacintosh */
+#define ASKEY_CLEAR 27
+#endif
+
+#if UNIX_PLATFORM
+/** @ingroup KeyCodeUNIX */
+#define ASKEY_ENTER 10
+/** @ingroup KeyCodeUNIX */
+#define ASKEY_CR 13
+/** @ingroup KeyCodeUNIX */
+#define ASKEY_CLEAR 27
+/**
+ Deprecated. Please use ASKEY_RIGHT_DELETE or ASKEY_BACKSPACE.
+ @ingroup KeyCodeUNIX
+*/
+#define ASKEY_DEL 8
+/** @ingroup KeyCodeUNIX */
+#define ASKEY_RIGHT_DELETE 127
+/** @ingroup KeyCodeUNIX */
+#define ASKEY_BACKSPACE 8
+/** @ingroup KeyCodeUNIX */
+#define ASKEY_HOME 1
+/** @ingroup KeyCodeUNIX */
+#define ASKEY_END 4
+
+#define ASKEY_MENU 2
+#define ASKEY_INSERT 17
+
+#endif
+
+#ifdef ASKEY_CR
+#define ASKEYIsReturnOrEnter(key) ((key == ASKEY_CR) || (key == ASKEY_ENTER))
+#else
+#define ASKEYIsReturnOrEnter(key) (key == ASKEY_ENTER)
+#endif /* ASKEY_CR */
+
+#endif /* _H_ASKey */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASProcs.h
new file mode 100644
index 0000000..8b8ee1c
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASProcs.h
@@ -0,0 +1,2841 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ASProcs.h
+
+ - Catalog of functions exported by AcroSupport.
+
+*********************************************************************/
+
+#if DEBUG
+
+/**
+ Allocates and returns a pointer to a memory block containing
+ the specified number of bytes.
+ @param nBytes IN/OUT The number of bytes for which space is allocated.
+
+ @return A pointer to the allocated memory. Returns <code>NULL</code> on failure.
+
+ @see ASrealloc
+ @see ASfree
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(void *, ASmalloc, (os_size_t nBytes), ASHFTClientASmalloc)
+
+/**
+ If possible, extends the given block and simply returns
+ <code>ptr</code>. Otherwise, it allocates a new block of <code>newNBytes</code> bytes,
+ copies the contents from the old pointer into the new block,
+ frees the old pointer, and returns the pointer to the new
+ block. If a new block cannot be allocated, the call fails
+ and <code>ptr</code> is not freed. Reallocating a block to a smaller
+ size will never fail.
+ @param ptr IN/OUT The existing memory block.
+ @param newNBytes IN/OUT The number of bytes the memory block must
+ be able to hold.
+ @return A pointer to memory block.
+ @see ASmalloc
+ @see ASfree
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(void *, ASrealloc, (void *ptr, os_size_t newNBytes), ASHFTClientASrealloc)
+
+/**
+ Frees the specified memory block.
+ @param ptr IN/OUT The block of memory to free.
+ @see ASmalloc
+ @see ASrealloc
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+SPROC(void, ASfree, (void *ptr), ASHFTClientASfree)
+#else
+
+/**
+ Allocates and returns a pointer to a memory block containing
+ the specified number of bytes.
+ @param nBytes IN/OUT The number of bytes for which space is allocated.
+
+ @return A pointer to the allocated memory, <code>NULL</code> on failure.
+
+ @see ASrealloc
+ @see ASfree
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(void *, ASmalloc, (os_size_t nBytes))
+
+/**
+ If possible, extends the given block and simply returns
+ <code>ptr</code>. Otherwise, it allocates a new block of <code>newNBytes</code> bytes,
+ copies the contents from the old pointer into the new block,
+ frees the old pointer, and returns the pointer to the new
+ block. If a new block cannot be allocated, the call fails
+ and <code>ptr</code> is not freed. Reallocating a block to a smaller
+ size will never fail.
+ @param ptr IN/OUT The existing memory block.
+ @param newNBytes IN/OUT The number of bytes the memory block must
+ be able to hold.
+ @return A pointer to memory block.
+ @see ASmalloc
+ @see ASfree
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(void *, ASrealloc, (void *ptr, os_size_t newNBytes))
+
+/**
+ Frees the specified memory block.
+ @param ptr IN/OUT The block of memory to free.
+ @see ASmalloc
+ @see ASrealloc
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(void, ASfree, (void *ptr))
+#endif
+
+
+/**
+ Gets a string describing the specified error/exception.
+
+ @param errorCode The exception whose error string is obtained.
+ This must be a full error code, built with the ErrBuildCode()
+ macro or a user-defined exception returned from ASRegisterErrorString().
+ See Errors for a list of predefined exceptions.
+ @param buffer (Filled by the method) A buffer into which
+ the string is written. Make sure to <code>memset</code> the buffer to <code>0</code> before calling
+ ASGetErrorString().
+ @param lenBuffer The number of characters that buffer can hold.
+ @return A useful pointer to <code>buffer</code>. This does not mean that the function worked.
+ You must call <code>strlen</code> on the returned buffer (as long as you <code>memset</code> the buffer to <code>0</code>) to
+ determine whether the error code was valid.
+ @see ASGetExceptionErrorCode
+ @see ASRegisterErrorString
+ @see ASRaise
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(const char *, ASGetErrorString, (ASErrorCode errorCode, char *buffer, ASTArraySize lenBuffer))
+
+/**
+ Registers a new error and string. The error can be used
+ to raise a plug-in-specific exception using ASRaise(). When
+ the exception is raised, its error string can be retrieved
+ using ASGetErrorString() and reported to the user using AVAlertNote().
+
+ <p>The error system is automatically forced to be ErrSysXtn.
+ (See the list of Error Systems).</p>
+
+ <p>The error is automatically assigned an error code that is
+ not used by any other plug-in (in the current implementation,
+ the Acrobat viewer increments a counter each time any plug-in
+ requests an error code, and returns the value of the counter).
+ As a result, plug-ins cannot rely on being assigned the
+ same error code each time the Acrobat viewer is launched.</p>
+
+ @ref ErrorSystems
+
+ @param severity The severity of the error being defined.
+ It must be one of the Severities.
+ @param errorString The string describing the exception.
+ This string is used by ASGetErrorString(), and is
+ copied by ASRegisterErrorString(); it may be freed by the
+ plug-in after registering the error.
+ @return The newly created error code. Plug-ins should assign the
+ error code returned by this method to a variable if they
+ will use the error code later in the current session.
+
+ @see ASGetErrorString
+ @see ASRaise
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASErrorCode, ASRegisterErrorString, (ASErrSeverity severity, const char *errorString))
+
+/**
+ Creates a new Host Function Table (HFT) server. An HFT server
+ is responsible for creating an instance of an HFT with the
+ specified version number, and destroying the HFT.
+ @param name The new HFT server's name.
+ @param serverProc (Required) A user-supplied callback that
+ provides an HFT when given a version number. This procedure
+ is called by ASExtensionMgrGetHFT() when another plug-in imports
+ the HFT.
+ @param destroyProc (Optional) A user-supplied callback that
+ destroys the specified HFT (this generally means deallocating
+ the memory associated with the HFT). This procedure is called
+ by HFTDestroy().
+ @param clientData A pointer to user-supplied data to pass to the HFT server.
+ @return The newly created HFT server.
+ @see HFTServerDestroy
+ @see HFTNewEx
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(HFTServer, HFTServerNew, (const char *name, HFTServerProvideHFTProc serverProc, HFTServerDestroyProc destroyProc, void *clientData))
+
+/**
+ Destroys an HFT server. Call this method only if the HFT
+ will not be used again.
+ @param hftServer IN/OUT The HFT server to destroy.
+ @see HFTServerNew
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(void, HFTServerDestroy, (HFTServer hftServer))
+
+
+/**
+ Obsolete. See HFTNewEx(). Creates a new HFT by calling the specified HFT server's
+ HFTServerProvideHFTProc().
+ @param hftServer The HFT server for the HFT being created.
+ The HFT server must have been created previously using HFTServerNew().
+
+ @param numSelectors The number of entries in the new HFT.
+ This determines the number of methods that the HFT can contain;
+ each method occupies one entry.
+ @return The newly created HFT.
+ @see ASExtensionMgrGetHFT
+ @see HFTDestroy
+ @see HFTNewEx
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(HFT, HFTNew, (HFTServer hftServer, ASTCount numSelectors))
+
+/**
+ Destroys an existing HFT by freeing all the HFT's memory.
+ Call this method only if you are absolutely sure that neither
+ your plug-in nor any other plug-in will use the HFT again.
+ Because this is usually impossible to know, plug-ins should
+ not destroy HFTs. It is even dangerous to destroy an HFT
+ at unload time, because the order in which plug-ins are
+ unloaded is not specified.
+ @param hft The HFT to destroy.
+ @see HFTNew
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, HFTDestroy, (HFT hft))
+
+/**
+ Replaces the specified entry in the specified HFT. This
+ allows a plug-in to override and replace certain methods
+ in Acrobat's API. See Replaceable Methods for a list of
+ replaceable methods. This method can be used from anywhere
+ in the plug-in, but it makes the most sense for most plug-ins
+ to replace methods in the importReplaceAndRegisterCallback()
+ procedure. Plug-ins register their HFTs in the export callback,
+ but the code to populate the function table is only executed
+ when the first client requests the HFT.
+
+ <p>Plug-ins can use the <code>REPLACE</code> macro instead of calling HFTReplaceEntry()
+ directly.</p>
+
+ <p>All plug-ins, and Acrobat itself, share a single copy of
+ each HFT. As a result, when a plug-in replaces the implementation
+ of a method, all other plug-ins and Acrobat also use the
+ new implementation of that method. In addition, once a method's
+ implementation has been replaced, there is no way to remove
+ the new implementation without restarting Acrobat.</p>
+
+ @param hft The HFT in which a method is replaced. Use
+ ASExtensionMgrGetHFT() to get the HFT, given its name. For
+ the HFTs built into the Acrobat viewer, global variables
+ containing the HFTs have been defined, so you can skip calling
+ ASExtensionMgrGetHFT() for these HFTs.
+ @param sel The entry in the HFT to replace, derived from
+ the method's name by appending <code>SEL</code>. For example, to replace
+ AVAlert, <code>sel</code> must be <code>AVAlertSEL</code>.
+ @param newEntry The function to replace the current one.
+ The function pointer must be converted to an HFTEntry using
+ the ASCallbackCreateReplacement() macro.
+ @param flags The new entry's properties. Currently, only
+ HFTEntryReplaceable is defined.
+ @exception xmErrCannotReplaceSelector
+ @ref ReplaceableMethods
+ @see ASExtensionMgrGetHFT
+ @see HFTGetReplacedEntry
+ @see CALL_REPLACED_PROC
+ @see REPLACE
+ @see ASCallbackCreateReplacement
+ @note The <code>CALL_REPLACED_PROC</code> macro is available to call
+ the previous HFT entry function that was replaced.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, HFTReplaceEntry, (HFT hft, Selector sel, HFTEntry newEntry, ASFlagBits flags))
+
+/**
+ Gets the HFTEntry that was replaced by the specified HFTEntry
+ in the specified entry. Plug-ins should generally not use
+ this method directly, but use the <code>CALL_REPLACED_PROC</code> macro
+ instead.
+
+ <p>It is necessary to specify both a selector (the index of
+ an entry in the HFT's table of callback pointers) and an
+ HFTEntry (a callback pointer) because a method may be replaced
+ several times, and the various replacement methods are kept
+ in a linked list. The selector determines which linked list
+ is examined, and the HFTEntry determines the entry in the
+ linked list to return. </p>
+ @param hft The HFT in which a replaced entry is retrieved.
+ See HFTReplaceEntry() for more information.
+ @param sel The selector whose previous value is obtained.
+ See HFTReplaceEntry() for more information.
+ @param oldEntry The HFTEntry for which the previous value
+ is obtained.
+ @return The entry present prior to being replaced.
+ <code>NULL</code> is returned if the entry has not been replaced.
+ @see ASExtensionMgrGetHFT
+ @see CALL_REPLACED_PROC
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(HFTEntry, HFTGetReplacedEntry, (HFT hft, Selector sel, HFTEntry oldEntry))
+
+#if ACROBAT_LIBRARY
+
+/**
+ Multiplies two fixed numbers.
+ @param a The first number to multiply.
+ @param b The second number to multiply.
+ @return The product of <code>a</code> and <code>b</code>.
+ @see ASFixedDiv
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASFixed, ASFixedMul, (ASFixed a, ASFixed b))
+
+/**
+ Divides two fixed numbers.
+ @param a The dividend.
+ @param b The divisor.
+ @return The quotient <code>a / b</code>.
+ @see ASFixedMul
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASFixed, ASFixedDiv, (ASFixed a, ASFixed b))
+
+/**
+ Converts a fixed number to a <code>CString</code>.
+ @param f The fixed number to convert.
+ @param s (Filled by the method) The string corresponding
+ to <code>f</code>.
+ @param maxLength The maximum number of characters that
+ <code>s</code> can contain.
+ @param precision The number of digits to retain in the
+ converted number.
+ @note The precision for Mac OS numbers
+ is valid to 9 significant digits.
+ @see ASCStringToFixed
+ @see Fixed Numbers
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedToCString, (ASFixed f, char *s, os_size_t maxLength, ASSmallCount precision))
+
+/**
+ Converts a <code>CString</code> to a fixed point number. It processes the
+ string from left to right only until the first invalid character
+ is located (for example, <code>a-z, A-Z</code>).
+ @param s A <code>CString</code> to convert.
+ @return Fixed number corresponding to <code>s</code>. Returns <code>0</code> if the string
+ does not contain any valid number.
+ @see ASFixedToCString
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASFixed, ASCStringToFixed, (const char *s))
+
+/**
+ Multiplies two matrices.
+ @param result (Filled by the method) A pointer to matrix
+ <code>m2 x m1</code>. It is allowed for the result to point to the same location
+ as either <code>m1</code> or <code>m2</code>.
+ @param m1 A pointer to the ASFixedMatrix value for the first
+ matrix to multiply.
+ @param m2 A pointer to the ASFixedMatrix value for the second
+ matrix to multiply.
+ @see ASFixedMatrixInvert
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixTransformRect
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixConcat, (ASFixedMatrixP result, const ASFixedMatrix *m1,const ASFixedMatrix *m2))
+
+/**
+ Inverts a matrix.
+
+ <p>If a matrix is nearly singular (which means that it has a determinant
+ that is nearly zero), inverting and re-inverting the matrix may
+ not yield the original matrix. </p>
+ @param result (Filled by the method) A pointer to <code>m-1</code>. It
+ is allowed for the result to point to the same location as <code>m</code>.
+ @param m A pointer to the ASFixedMatrix to invert.
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixTransformRect
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixInvert, (ASFixedMatrixP result, const ASFixedMatrixP m))
+
+/**
+ Transforms the point <code>p</code> through the matrix <code>m</code>, and puts the result
+ in <code>result</code>. <code>p</code> and <code>result</code> can point to the same location.
+ @param result (Filled by the method) A pointer to the ASFixedPoint
+ containing the result of transforming <code>p</code> through <code>m</code>. It is
+ allowed for the result to point to the same location as <code>m</code>.
+ @param m A pointer to the ASFixedMatrix through which <code>p</code>
+ is transformed.
+ @param p A pointer to the ASFixedPoint representing the
+ point to transform through <code>m</code>.
+ @see ASFixedMatrixTransformRect
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixInvert
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixTransform, (ASFixedPointP result, const ASFixedMatrixP m,const ASFixedPointP p))
+
+/**
+ Transforms a rectangle through a matrix.
+ @param result (Filled by the method) A pointer to the ASFixedRect
+ containing the smallest bounding box for the transformed
+ rectangle. It is allowed for the result to point to the same location
+ as <code>m</code>. result will always have <code>bottom < top</code> and <code>left < right</code>.
+
+ @param m A pointer to the ASFixedMatrix containing the matrix
+ through which <code>r</code> is transformed.
+ @param r A pointer to the ASFixedRect containing the
+ rectangle to transform through <code>m</code>.
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixInvert
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixTransformRect, (ASFixedRectP result, const ASFixedMatrixP m,const ASFixedRectP r))
+#else
+
+/**
+ Multiplies two fixed numbers.
+ @param a The first number to multiply.
+ @param b The second number to multiply.
+ @return The product of <code>a</code> and <code>b</code>.
+ @see ASFixedDiv
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(ASFixed, ASFixedMul, (ASFixed a, ASFixed b), ASHFTClientASFixedMul)
+
+/**
+ Divides two fixed numbers.
+ @param a The dividend.
+ @param b The divisor.
+ @return The quotient <code>a / b</code>.
+ @see ASFixedMul
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(ASFixed, ASFixedDiv, (ASFixed a, ASFixed b), ASHFTClientASFixedDiv)
+
+/**
+ Converts a fixed number to a <code>CString</code>.
+ @param f The fixed number to convert.
+ @param s (Filled by the method) The string corresponding
+ to <code>f</code>.
+ @param maxLength The maximum number of characters that
+ <code>s</code> can contain.
+ @param precision The number of digits to retain in the
+ converted number.
+ @note The precision for Mac OS numbers
+ is valid to 9 significant digits.
+ @see ASCStringToFixed
+ @see Fixed Numbers
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(void, ASFixedToCString, (ASFixed f, char *s, os_size_t maxLength, ASSmallCount precision), ASHFTClientASFixedToCString)
+
+/**
+ Converts a <code>CString</code> to a fixed point number. Processes the
+ string from left to right only until the first invalid character
+ is located (for example, <code>a-z, A-Z</code>).
+ @param s A <code>CString</code> to convert.
+ @return A fixed number corresponding to <code>s</code>, <code>0</code> if the string
+ does not contain any valid number.
+ @see ASFixedToCString
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(ASFixed, ASCStringToFixed, (const char *s), ASHFTClientCStringToASFixed)
+
+/**
+ Multiplies two matrices.
+ @param result (Filled by the method) A pointer to matrix
+ <code>m2 x m1</code>. It is allowed for the result to point to the same location
+ as either <code>m1</code> or <code>m2</code>.
+ @param m1 A pointer to the ASFixedMatrix value for the first
+ matrix to multiply.
+ @param m2 A pointer to the ASFixedMatrix value for the second
+ matrix to multiply.
+ @see ASFixedMatrixInvert
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixTransformRect
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixConcat, (ASFixedMatrixP result, const ASFixedMatrix *m1,const ASFixedMatrix *m2))
+
+/**
+ Inverts a matrix.
+
+ <p>If a matrix is nearly singular (meaning that it has a determinant of
+ nearly zero), inverting and re-inverting the matrix may
+ not yield the original matrix. </p>
+
+ @param result (Filled by the method) A pointer to <code>m-1</code>. It
+ is allowed for the result to point to the same location as <code>m</code>.
+ @param m A pointer to the ASFixedMatrix to invert.
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixTransformRect
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixInvert, (ASFixedMatrixP result, const ASFixedMatrixP m))
+
+/**
+ Transforms the point <code>p</code> through the matrix <code>m</code>, puts result
+ in result. <code>p</code> and result can point to the same place.
+ @param result (Filled by the method) A pointer to the ASFixedPoint
+ containing the result of transforming <code>p</code> through <code>m</code>. It is
+ allowed for the result to point to the same location as <code>m</code>.
+ @param m A pointer to the ASFixedMatrix through which <code>p</code>
+ is transformed.
+ @param p A pointer to the ASFixedPoint representing the
+ point to transform through <code>m</code>.
+ @see ASFixedMatrixTransformRect
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixInvert
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixTransform, (ASFixedPointP result, const ASFixedMatrixP m,const ASFixedPointP p))
+
+/**
+ Transforms a rectangle through a matrix.
+ @param result (Filled by the method) A pointer to the ASFixedRect
+ containing the smallest bounding box for the transformed
+ rectangle. It is allowed for the result to point to the same location
+ as <code>m</code>. The result will always have <code>bottom < top</code> and <code>left < right</code>.
+
+ @param m A pointer to the ASFixedMatrix containing the matrix
+ through which <code>r</code> is transformed.
+ @param rectIn A pointer to the ASFixedRect containing the
+ rectangle to transform through <code>m</code>.
+ @see ASFixedMatrixTransform
+ @see ASFixedMatrixConcat
+ @see ASFixedMatrixInvert
+ @see Fixed Numbers
+ @see ASFixedRoundToInt16
+ @see ASFixedRoundToInt32
+ @see ASFixedTruncToInt16
+ @see ASFixedTruncToInt32
+ @see ASFixedToFloat
+ @see ASFloatToFixed
+ @see ASInt16ToFixed
+ @see ASInt32ToFixed
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFixedMatrixTransformRect, (ASFixedRectP result, const ASFixedMatrixP m,const ASFixedRectP rectIn))
+#endif
+
+/**
+ This method was deprecated in Acrobat 5.0. Use ASFileSysCreatePathName()
+ instead.
+
+ <p>It converts a platform-specific path name to an ASPathName.
+ It can create an ASPathName from a file path where the file
+ does not already exist. It works for Windows UNC path names
+ as well. It is the caller's responsibility to release the returned
+ ASPathName.</p>
+ @param platformPath A pointer to a platform-specific path name.
+ On Windows and UNIX, it is a <code>NULL</code>-terminated string containing
+ the full path name with the appropriate path separators for
+ each platform.
+ @return The ASPathName corresponding to <code>platformPath</code>.
+ @see ASFileSysReleasePath
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASPathName, ASPathFromPlatformPath, (void *platformPath))
+
+/**
+ Gets the default standard file system implementation for
+ a platform.
+ @return The platform's default file system.
+ @see ASFileRegisterFileSys
+ @see ASPathFromPlatformPath
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(ASFileSys, ASGetDefaultFileSys, (void))
+
+/**
+ Converts a file name, specified as an ASPathName, to a device-independent
+ path name. It is the caller's responsibility to free the
+ memory associated with the returned string using ASfree().
+
+ @note On Mac OS, if <code>pathName</code> and <code>relativeToThisPath</code>
+ refer to files that are on different volumes, the method returns an absolute path.
+
+ @note This method can only be used to get host encoding.
+ For any other encoding, use ASFileSysDIPathFromPathEx() in
+ Acrobat 6.0 and later.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param path The ASPathName to convert.
+ @param relativeToThisPath (May be <code>NULL</code>) The path name relative
+ to which the device-independent path name is specified. If
+ <code>NULL</code>, the device-independent path name will be an absolute,
+ not a relative, path name.
+ @return A device-independent path name corresponding to the parameter
+ values supplied, or <code>NULL</code> if the operation is not supported
+ by the file system.
+
+ <p>See section 3.10 in the <i>PDF Reference</i> for a description
+ of the device-independent path name format. This path name
+ may not be understood on another platform since drive specifiers
+ may be prepended. </p>
+
+ @see ASGetDefaultFileSys
+ @see ASFileSysPathFromDIPath
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(char *, ASFileSysDIPathFromPath, ( ASFileSys fileSys, ASPathName path, ASPathName relativeToThisPath))
+
+/**
+ Converts a device-independent path name to an ASPathName.
+ This method can only be used for files that already exist
+ (that is, it cannot be used to create a placeholder path name
+ for files that a plug-in intends to create in the future).
+
+ <p>It is the caller's responsibility to release the returned
+ ASPathName. </p>
+
+ @param fileSys (May be <code>NULL</code>) The file system within which the
+ ASPathName will be created. Pass <code>NULL</code> to use the
+ default file system.
+ @param diPath The device-independent path name to convert.
+ See Section 3.10 in the <i>PDF Reference</i> for a description
+ of the device-independent path name format. This path name
+ may not be understood on another platform since drive specifiers
+ may be prepended. On Windows, you cannot specify a UNC path name.
+ You must have a file mounted on the file server. For example,
+ the following path is valid: <code>/f/dirname/file.pdf</code> where <code>f</code>
+ is <code>\\server\\people</code>. The following does not work: <code>/server/people/dirname/file.pdf</code>.
+
+ @param relativeToThisPath The path name relative to which <code>diPath</code>
+ is interpreted. If it is <code>NULL</code>, <code>diPath</code> is interpreted as an absolute
+ path name, not a relative path name.
+ @return An ASPathName corresponding to the parameter values supplied,
+ <code>NULL</code> if <code>diPath</code> cannot be converted to an ASPathName
+ or if the specified file does not already exist.
+ @exception genErrNoMemory
+ @see ASFileSysDIPathFromPath
+ @see ASFileSysReleasePath
+ @note In Acrobat 6.0 and later, use ASFileSysPathFromDIPathEx() instead for anything other than host encoding.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASPathName, ASFileSysPathFromDIPath, (ASFileSys fileSys, const char * diPath, ASPathName relativeToThisPath))
+
+/**
+ Generates and copies the specified ASPathName (but does
+ not copy the file specified by the path name). The ASPathName
+ must have been obtained through the specified file system.
+ This method may be used regardless of whether the file specified
+ by path name is open.
+
+ <p>It is the caller's responsibility to release the ASPathName when it is no longer needed
+ by using ASFileSysReleasePath().</p>
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName to copy.
+ @return A copy of <code>pathName</code>.
+ @see ASFileSysReleasePath
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(ASPathName, ASFileSysCopyPath, (ASFileSys fileSys, ASPathName pathName), ASFileSysCopyPathName)
+
+/**
+ Decrements the internal reference count for the path name and
+ disposes of the path name (but not the file itself) if the
+ reference count is zero. This does not result in any file-level
+ operations, and is unaffected by whether there is an open
+ file for this path name.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName to release.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(void, ASFileSysReleasePath, (ASFileSys fileSys, ASPathName pathName), ASFileSysReleasePathName)
+
+/**
+ Attempts to open a file in the specified file system, in
+ the specified read/write/create mode. If the file is already
+ open, the existing file handle is returned. The caller retains
+ ownership of <code>pathName</code>.
+
+ <p>This call returns an error if a file over 2 GB in length is opened.
+ ASFileSysOpenFile64() should be used instead of this call wherever
+ possible, and must be used if files over 2 GB in length may be
+ encountered.</p>
+
+ <p>In Mac OS, when this method creates a file, the file's creator
+ is set to <code>'CARO'</code> and its type is set to <code>'PDF '</code> (with a space
+ after PDF).</p>
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The path name of the file to open.
+ @param mode An open-mode value as specified for ASFileMode.
+
+ @param fP (Filled by the method) The ASFile that was opened.
+ @return <code>0</code> if the operation was successful, a non-zero
+ error code otherwise. The error is platform and file-system specific:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Platform</TH><TH>Error</TH></TR>
+ <TR><TD>Windows</TD><TD><ul>
+ <li>Returns fileErrWrPerm if trying to open a read-only file with write permissions.</li>
+ <li>Returns ErrSysXtnMgr (use GetLastError()) for platform-specific error conditions that CreateFile() may use.</li>
+ </ul></TD>
+ </TR>
+ <TR><TD>Mac OS</TD><TD><ul>
+ <li>Returns fileErrFNF if trying to open a file for reading that does not exist.</li>
+ <li>Returns ErrSysMDSystem for platform-specific errors that <code>FSpCreate</code>, <code>FSpSetFInfo</code>, <code>FSpOpenRF</code>, <code>FSpOpenDF</code>, or <code>SetFPos</code> may use).</li>
+ </ul></TD>
+ </TR>
+ </TABLE>
+
+ @exception genErrNoError
+ @see ASFileClose
+ @see ASFileReopen
+ @see ASGetDefaultFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASErrorCode, ASFileSysOpenFile, (ASFileSys fileSys, ASPathName pathName, ASFileMode mode, ASFile *fP))
+
+/**
+ Attempts to delete the file referred to by <code>pathName</code>.
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The file to delete.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @note If a file is already open for this <code>pathName</code>, the semantics
+ of ASFileSysRemoveFile() are file system-dependent. Make sure
+ you have closed all ASFile objects for <code>pathName</code> before calling
+ ASFileSysRemoveFile().
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(ASErrorCode, ASFileSysRemoveFile, (ASFileSys fileSys, ASPathName pathName), ASFileSysRemove)
+
+
+/**
+ Attempts to reopen a file using the specified read/write
+ mode. On some platforms, this may result in the file being
+ closed and then reopened, and some error conditions
+ may render the file invalid.
+ @param aFile The file to reopen.
+ @param mode An open-mode value as specified for ASFileMode.
+ @return <code>0</code> if the operation was successful; some file
+ system or platform-dependent error code is returned otherwise.
+ @see ASFileSysOpenFile
+ @see ASFileClose
+ @note The file mode and return types changed in 0x00060000.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASErrorCode, ASFileReopen, ( ASFile aFile, ASFileMode mode ))
+
+/**
+ Closes the specified file. After a call to ASFileClose(),
+ the file handle is no longer valid but may be reused as
+ the result of a subsequent call to ASFileSysOpenFile().
+ @param aFile IN/OUT The file to close. The file must have been
+ opened previously using ASFileSysOpenFile().
+ @return <code>0</code> if the operation was successful; some file
+ system or platform-dependent error code is returned otherwise.
+ @see ASFileFlush
+ @see ASFileReopen
+ @see ASFileStmRdOpen
+ @see ASFileStmWrOpen
+ @see ASFileSysOpenFile
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(ASErrorCode, ASFileClose, ( ASFile aFile ))
+
+/**
+ Seeks to the specified position in a file. This is the position
+ at which the next read or write will begin. This call only works
+ when the desired file position is less than 2 GB.
+ @param aFile IN/OUT The file in which to seek.
+ @param pos IN/OUT The position to seek.
+ @exception fileErrIO
+ @see ASFileSetPos64
+ @see ASFileGetPos
+ @see ASFileRead
+ @see ASFileWrite
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(void, ASFileSetPos, ( ASFile aFile, ASTFilePos pos ))
+
+/**
+ Gets the current seek position in a file. This is the position
+ at which the next read or write will begin. This call returns an
+ error if the file position is greater than 2 GB.
+ @param aFile IN/OUT The file in which to get the seek position.
+
+ @return The current seek position.
+ @exception fileErrIO
+ @see ASFileGetPos64
+ @see ASFileSetPos
+ @see ASFileRead
+ @see ASFileWrite
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(ASTFilePos, ASFileGetPos, ( ASFile aFile ))
+
+/**
+ Changes the size of a file. The new size may by larger or
+ smaller than the original size. Since this method does not return any values,
+ the status can be assessed by examining the error code in the HANDLER clause.
+ This method may raise file system or platform-specific exceptions.
+ This call only works when the desired file size is less than 2 GB.
+ @param aFile The file whose size is changed.
+ @param newFileSize The new size of file.
+ @see ASFileSetEOF64
+ @see ASFileCanSetEOF
+ @see ASFileGetEOF
+ @see ASFileGetPos
+ @exception fileErrIO
+ @exception asGenErrMethodNotImplemented
+ @exception asFileErrGeneral
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFileSetEOF, ( ASFile aFile, ASTFilePos newFileSize ))
+
+/**
+ Gets the current size of a file. It calls ASFileSysGetEofProc().
+ This call returns an error if the file size is greater than 2 GB.
+ @param aFile The ASFile whose size is obtained.
+ @return The size of the file.
+ @exception fileErrIO
+ @see ASFileGetEOF64
+ @see ASFileSetEOF
+ @see ASFileSetPos
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASTFilePos, ASFileGetEOF, ( ASFile aFile ))
+
+/**
+ Reads data from a file, beginning at the current seek position.
+
+ @param aFile IN/OUT The file from which data is read.
+ @param p IN/OUT (Filled by the method) A buffer into which
+ data is written. The buffer must be able to hold at least
+ <code>count</code> bytes.
+ @param count IN/OUT The number of bytes to read.
+ @return The number of bytes actually read from the file.
+ @exception fileErrIO
+ @exception fileErrUserRequestedStop
+ @exception fileErrBytesNotReady
+ @exception fileErrIOTimeout
+ @exception fileErrGeneral
+ @see ASFileSetPos
+ @see ASFileWrite
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(ASTArraySize, ASFileRead, ( ASFile aFile, char *p, ASTArraySize count ))
+
+/**
+ Writes data to a file, beginning at the current seek position.
+
+ @param aFile IN/OUT The file to which data is written.
+ @param p IN/OUT A buffer holding the data that is to be written.
+ The buffer must be able to hold at least <code>count</code> bytes.
+ @param count IN/OUT The number of bytes to write.
+ @return The number of bytes actually written to the file.
+ @exception fileErrIO
+ @exception fileErrWrite
+ @see ASFileRead
+ @see ASFileSetPos
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(ASTArraySize, ASFileWrite, ( ASFile aFile, const char *p, ASTArraySize count ))
+
+/**
+ Flushes any buffered data to a file. This method may raise
+ file system or platform-specific exceptions.
+ @param aFile The file whose data is flushed.
+ @exception fileErrIO
+ @see ASFileHardFlush
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASFileFlush, ( ASFile aFile ))
+
+/**
+ Gets the path name for a file and increments an internal reference
+ count. It is the caller's responsibility to release the
+ ASPathName when it is no longer needed by using ASFileSysReleasePath().
+ @param aFile IN/OUT The file whose path name is acquired.
+ @return The ASPathName associated with <code>asFile</code>. You can use ASFileSysDIPathFromPath()
+ to convert this to a device-independent path name.
+ @see ASFileSysReleasePath
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(ASPathName, ASFileAcquirePathName, (ASFile aFile))
+
+/**
+ Gets the file system through which a file was opened.
+ @param aFile IN/OUT The open file whose file system is obtained.
+
+ @return The file's ASFileSys.
+ @see ASFileGetFileSysByName
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+
+*/
+NPROC(ASFileSys, ASFileGetFileSys, (ASFile aFile))
+
+/**
+ For internal use only.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void *, ASDebug, (ASInt32 op, void *parm, ASTArraySize parmLen, void *clientData))
+
+
+/**
+ Creates a read-only ASStm from a file. The stream supports seek operations.
+
+ @param afile The open file to associate with the stream.
+ The file must have been opened previously using ASFileSysOpenFile().
+ Each open file has a unique ASFile. The ASFile value has
+ meaning only to the common ASFile implementation and bears
+ no relationship to platform-specific file objects.
+ @param bufSize The length in bytes of the data buffer. If <code>bufSize</code>
+ is <code>0</code>, the default buffer size (currently 4 K) will be used.
+ The default is generally sufficient. A larger buffer size
+ should be used only when data in the file will be accessed
+ in chunks larger than the default buffer. Although <code>bufSize</code>
+ is passed as an ASUns16, it is treated internally as an
+ ASInt16. As a result, buffer sizes above 32 K are not permitted.
+ @return The newly created ASStm.
+ @see ASFileSysOpenFile
+ @see ASFileStmWrOpen
+ @see ASMemStmRdOpen
+ @see ASProcStmRdOpenEx
+ @see ASStmClose
+ @see ASStmRead
+ @see CosNewStream
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASStm, ASFileStmRdOpen, (ASFile afile, ASSmallBufferSize bufSize))
+
+/**
+ Creates a read-only ASStm from a memory-resident buffer.
+ The stream supports seek operations.
+ @param data A buffer containing the data to read into the
+ stream. This data buffer must not be disposed of until the
+ ASStm is closed.
+ @param len The length in bytes of <code>data</code>.
+ @return The newly created ASStm.
+ @see ASStmRead
+ @see ASStmClose
+ @see CosNewStream
+ @see ASMemStmRdOpen
+ @see ASProcStmRdOpenEx
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASStm, ASMemStmRdOpen, (char *data, ASArraySize len))
+
+/**
+ Creates a read-only ASStm from an arbitrary data-producing
+ procedure. The stream does not support seek operations.
+
+ <p><code>readProc</code> is called when the client of the stream attempts
+ to read data from it. </p>
+ @param readProc A user-supplied callback that supplies the
+ stream's data.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>readProc</code> each time it is called.
+ @return The newly created ASStm.
+ @exception genErrNoMemory
+ @see ASStmRead
+ @see ASStmClose
+ @see CosNewStream
+ @see ASFileStmRdOpen
+ @see ASMemStmRdOpen
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASStm, ASProcStmRdOpen, (ASStmProc readProc, void *clientData))
+
+
+/**
+ Reads data from <code>stm</code> into memory.
+ @param ptr (Filled by the method) A buffer into which
+ data is written.
+ @param itemSize The number of bytes in a stream item.
+ See the description of <code>nItems</code> for further information.
+ @param nItems The number of items to read. The amount of data
+ read into the memory buffer will be <code>itemSize * nItems</code>, unless
+ an EOF is encountered first. The relative values of <code>itemSize</code>
+ and <code>nItems</code> really do not matter; the only thing that matters
+ is their product. It is often convenient to set <code>itemSize</code>
+ to <code>1</code>, so that <code>nItems</code> is the number of bytes to read.
+ @param stm The stream from which data is read.
+ @return The number of items (not bytes) read.
+ @see ASStmWrite
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASTCount, ASStmRead, (char *ptr, ASTArraySize itemSize, ASTCount nItems, ASStm stm))
+
+/**
+ Writes data from a memory buffer into an ASStm.
+
+ <p>You cannot use this method to change a PDF page content
+ stream. It can only be used for a print stream. </p>.
+
+ <p>Historically, this method was provided to allow plug-ins
+ to write data into the print stream when printing to a PostScript
+ printer (see the PDDocWillPrintPage() notification). However,
+ ASStm is a general purpose I/O mechanism in Acrobat even though
+ only limited open and read/write methods are provided in
+ the plug-in API. For instance, not all ASStm objects support
+ seek operations. </p>
+ @param ptr A buffer from which data is read.
+ @param itemSize The number of bytes in a stream item.
+ See the description of <code>nItems</code> for additional information.
+
+ @param nItems The number of items to write. The amount of
+ data written into the stream will be <code>itemSize * nItems</code>.
+ The relative values of <code>itemSize</code>
+ and <code>nItems</code> really do not matter; the only thing that matters
+ is their product. It is often convenient to set <code>itemSize</code>
+ to <code>1</code>, so that <code>nItems</code> is the number of bytes to read.
+ @param stm The stream into which data is written.
+ @return The number of items (not bytes) written.
+ @see ASStmRead
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASTCount, ASStmWrite, (const char *ptr, ASTArraySize itemSize, ASTCount nItems, ASStm stm))
+
+/**
+ Closes the specified stream.
+ @param stm The stream to close.
+ @see ASFileStmRdOpen
+ @see ASFileStmWrOpen
+ @see ASMemStmRdOpen
+ @see ASProcStmRdOpenEx
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASStmClose, (ASStm stm))
+
+/* Acrobat 2.2 additions */
+
+/**
+ Allows a <code>fileSys</code> to be unregistered. In general, a <code>fileSys</code>
+ is only unregistered by the extension that registered it.
+
+ @param extension IN/OUT The gExtensionID of the plug-in un-registering
+ <code>fileSys</code>.
+ @param fileSys IN/OUT The ASFileSys to un-register.
+ @return <code>true</code> if <code>fileSys</code> successfully unregistered, <code>false</code> if
+ there are any open files that were opened through <code>fileSys</code>.
+
+ @see ASFileRegisterFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+
+*/
+NPROC(ASBool, ASFileUnregisterFileSys, (ASExtension extension, ASFileSys fileSys))
+
+/**
+ Sends data from a file system implementation to an ASFile.
+ The data may be for a multi-read request call, or may be
+ unsolicited.
+
+ <p>This method can only be called from within a file system implementation.
+ It must not be called by clients of the ASFile, such as a caller that
+ acquired the file with ASFileSysOpenFile(). </p>
+
+ @param aFile IN/OUT The file to which data is sent.
+ @param p IN/OUT The data being pushed.
+ @param offset IN/OUT A byte offset into the file at which the data should
+ be written.
+ @param length IN/OUT The number of bytes held in the buffer.
+ @exception fileErrGeneral
+ @see ASFileRead
+ @see ASFileWrite
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+
+*/
+NPROC(void, ASFilePushData, (ASFile aFile, const char *p, ASTFilePos offset, ASTArraySize length))
+
+/**
+ Allows an implementor to provide a file system for use by
+ external clients. An external client can locate the file
+ system using ASFileGetFileSysByName(). <code>fileSys</code> provides its
+ name via the ASFileSysGetFileSysNameProc() callback. This
+ method returns <code>false</code> if a file system with the same name
+ is already registered.
+ @param extension IN/OUT The gExtensionID of the plug-in registering
+ the <code>fileSys</code>.
+ @param fileSys IN/OUT The ASFileSys being registered.
+ @return <code>true</code> if <code>fileSys</code> is successfully registered, <code>false</code> otherwise.
+
+ @see ASFileUnregisterFileSys
+ @see ASFileGetFileSysByName
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+
+*/
+NPROC(ASBool, ASFileRegisterFileSys, (ASExtension extension, ASFileSys fileSys))
+
+/**
+ Gets the file system that was registered with the specified
+ name.
+ @param name IN/OUT The ASAtom corresponding to the name of the
+ file system to obtain. It may be one of the following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>String</TH><TH>Description</TH></TR>
+ <TR><TD><code>"Mac_K"</code></TD><TD>Mac OS file system</TD></TR>
+ <TR><TD><code>"DOS_K"</code></TD><TD>Classic Windows file system (it only supports host-encoded paths)</TD></TR>
+ <TR><TD><code>"Win_K"</code></TD><TD>Unicode Windows file system</TD></TR>
+ <TR><TD><code>"Unix_K"</code></TD><TD>UNIX file system</TD></TR>
+ <TR><TD><code>"CHTTP"</code></TD><TD>HTTP file system</TD></TR>
+ <TR><TD><code>"CDocumentum"</code></TD><TD>Documentum file system</TD></TR>
+ <TR><TD><code>"CODMA"</code></TD><TD>Open Document Management file system</TD></TR>
+ </TABLE>
+
+ @return The file system, otherwise <code>NULL</code> if no matching file system
+ was found.
+ @see ASFileGetFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+
+*/
+NPROC(ASFileSys, ASFileGetFileSysByName, (ASAtom name))
+
+/**
+ Gets the ASFile associated with the specified ASMDFile and
+ ASFileSys.
+ @param mdFile IN/OUT The ASMDFile for which the information is
+ desired.
+ @param fileSys IN/OUT The ASFileSys through which <code>fileID</code> was opened.
+
+ @param pfN IN/OUT (Filled by the method, may be <code>NULL</code>) The ASFile
+ representing <code>fileID</code> within <code>fileSys</code>.
+ @return <code>true</code> if <code>fileID</code> is determined to be a valid file opened through
+ <code>fileSys</code>, <code>false</code> otherwise.
+ @see ASFileGetFileSys
+ @see ASFileGetMDFile
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+
+*/
+NPROC(ASBool, ASFileFromMDFile, (ASMDFile mdFile, ASFileSys fileSys, ASFile *pfN))
+
+/**
+ Given an ASFile, returns the <code>fileSys</code> and the ASMDFile identification
+ in that <code>fileSys</code>. This call is needed for a file system in
+ a plug-in to be able to call the inner routines in another
+ file system.
+ @param fN IN/OUT The ASFile for which the information is desired.
+
+ @param pFileID IN/OUT (Filled by the method, may be <code>NULL</code>) The
+ ASMDFile identifier associated with file.
+ @param pFileSys IN/OUT (Filled by the method, may be <code>NULL</code>) The
+ file system through which this file was opened.
+ @return <code>true</code> if the file is an open file, <code>false</code> otherwise.
+ @see ASFileFromMDFile
+ @see ASFileGetFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+
+*/
+NPROC(ASBool, ASFileGetMDFile, (ASFile fN, ASMDFile *pFileID, ASFileSys *pFileSys))
+
+
+/**
+ Creates an ASPathName based on the input type and <code>pathSpec</code>.
+ Each <code>fileSys</code> implementation must publish the input types
+ that it accepts.
+
+ <p>It is the caller's responsibility to release the ASPathName
+ when it is no longer needed by using ASFileSysReleasePath().</p>
+
+ <p>Developers should consider using the simpler helper macros
+ instead of using the call directly. </p>
+
+ @note This method does not work for relative POSIX paths on Mac OS; only absolute POSIX paths will work.
+
+ @param fileSys (May be <code>NULL</code>) The ASFileSys in which you
+ are trying to create an ASPathName. Pass <code>NULL</code> to use the
+ default file system.
+ @param pathSpecType An ASAtom specifying the data type
+ in <code>pathSpec</code>, as follows:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Data type</TH><TH>Description</TH></TR>
+ <TR>
+ <TD><code>"Cstring"</code></TD>
+ <TD>Accepted by the
+ default file system on all platforms. <code>pathSpec</code> is a <code>NULL</code>-
+ terminated <code>char*</code>. On Mac OS it must be an absolute path
+ separated by colons, as in <code>"VolumeName:Folder:file.pdf"</code>.
+ On Windows the path may be absolute, as in <code>"C:\\folder\\file.pdf"</code>
+ or relative as in <code>"...\\folder\\file.pdf"</code>. On UNIX the
+ path may be absolute as in <code>"/folder/file.pdf"</code> or relative
+ as in <code>".../folder/file.pdf"</code>.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"FSSpec"</code></TD>
+ <TD>Accepted by the default file system on Mac OS. <code>pathSpec</code> is a pointer to a valid FSSpec.
+ This type is deprecated in Acrobat 9.0. Use ASPlatformPathGetFSRefPtr(), ASPlatformPathGetFSRefWithCFStringRefRecPtr(),
+ ASPlatformPathGetCFURLRefRecPtr(), or ASPlatformPathGetPOSIXPathPtr() instead.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"FSRef"</code></TD>
+ <TD>
+ Accepted by the default file system on Mac OS.
+ <code>pathSpec</code> is a valid FSRef.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"FSRefWithCFStringRef"</code></TD>
+ <TD>
+ Accepted by the default file system on Mac OS. <code>pathSpec</code> is a pointer
+ to a valid FSRefWithCFStringRefRec.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"CFURLRef"</code></TD>
+ <TD>Accepted by the default file system on Mac OS. <code>pathSpec</code> is a valid CFURLRef.</TD>
+ </TR>
+ <TR>
+ <TD><code>"POSIXPath"</code></TD>
+ <TD>
+ Accepted by the default file system on Mac OS. <code>pathSpec</code> is a
+ <code>NULL</code>-terminated <code>char*</code> containing a POSIX-style, UTF-8 encoded path string.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"SFReply"</code></TD>
+ <TD>
+ In the past this was accepted by the default file system on Mac OS.
+ This type is deprecated and should not be used.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"DIPath"</code></TD>
+ <TD>
+ Accepted by the default file system on Windows and Mac OS. <code>pathSpec</code> is a device-independent
+ path as documented in the <i>PDF Reference</i>. <code>pathSpec</code> can contain
+ an absolute or relative path. If a relative path is used,
+ the method will evaluate that path against an ASPathName
+ passed in the <code>mustBeZero</code> parameter.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"DIPathWithASText"</code></TD>
+ <TD>Accepted by the default file system on Windows and Mac OS. <code>pathSpec</code> is a device-independent
+ path, in the form of an ASText, as documented in the <i>PDF Reference</i>. <code>pathSpec</code> can contain
+ an absolute or relative path. If a relative path is used,
+ the method will evaluate that path against an ASPathName
+ passed in the <code>mustBeZero</code> parameter.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"FolderPathName"</code></TD>
+ <TD>
+ Accepted by the default file system on Windows and Mac OS.
+ <code>pathSpec</code> is an ASPathName that contains the path of a folder.
+ <code>mustBeZero</code> is a C string containing the name of the file.
+ The returned ASPathName contains the result of appending
+ <code>mustBeZero</code> to <code>pathSpec</code>.
+ </TD>
+ </TR>
+ <TR>
+ <TD><code>"FolderPathNameWithASText"</code></TD>
+ <TD>
+ Accepted by the default file system on Windows and Mac OS.
+ <code>pathSpec</code> is an ASPathName that contains the path of a folder.
+ <code>mustBeZero</code> is an ASText containing the name of the file.
+ The returned ASPathName contains the result of appending
+ <code>mustBeZero</code> to <code>pathSpec</code>.
+ </TD>
+ </TR>
+ </TABLE>
+
+ @param pathSpec The file specification from which to create
+ an ASPathName. Relative paths are evaluated from the directory
+ containing the executable (if used with the PDF Library),
+ or the directory containing Acrobat (if used in a plug-in).
+
+ @param additionalData See <code>pathSpecType</code> parameter description.
+ @return The newly created path name, or <code>NULL</code> on failure.
+ @exception genErrBadParm on Windows if the <code>pathSpecType</code> is not recognized.
+
+ @exception genErrMethodNotImplemented
+ @see ASFileSysCopyPath
+ @see ASFileSysCreatePathFromCString
+ @see ASFileSysCreatePathFromDIPath
+ @see ASFileSysCreatePathFromFSSpec
+ @see ASFileSysCreatePathWithFolderName
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+*/
+NPROC(ASPathName, ASFileSysCreatePathName, (const ASFileSys fileSys, ASAtom pathSpecType, const void *pathSpec,
+ const void *additionalData))
+
+/**
+ Converts an ASPathName from one file system to another.
+ It returns an ASPathName acquired through <code>newFileSys</code> that refers
+ to an image (which may possibly be cached) of the file in <code>oldfileSys</code>.
+ Use this call to get a local file that is an image of a
+ remote file (in a URL file system, for example). This is
+ needed by programs such as the QuickTime Movie Player, because they
+ can only work from local file-system files. The returned
+ ASPathName may be a reference to a cache, so the file should
+ be treated as read-only.
+
+ <p>Because of the possibility of cache flushing, you must hold
+ a copy of the remote file's ASPathName for the duration
+ of use of the local file. </p>
+
+ <p>Do not remove the local file copy, since the <code>newFileSys</code>
+ system does not know about the linkage to the remote (<code>oldFileSys</code>)
+ file! </p>
+
+ <p>The source file does not have to be open. </p>
+
+ <p>This call is handled by <code>oldFileSys</code> if <code>oldFileSys</code> contains
+ the appropriate procedure. Otherwise it is handled by copying
+ the file. The source file is closed at the end of the copy
+ if it was not open prior to the call. </p>
+
+ <p>It is the caller's responsibility to release the ASPathName
+ when it is no longer needed by using ASFileSysReleasePath().</p>
+
+ @param oldFileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ <code>oldPathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param oldPathName IN/OUT The ASPathname in the current file system.
+
+ @param newFileSys IN/OUT (May be <code>NULL</code>) The file system to which
+ the <code>oldPathName</code> is converted. Pass <code>NULL</code> to use the default
+ file system.
+ @return The ASPathName in <code>newFileSys</code> or <code>NULL</code> if one cannot be made.
+
+ @exception ERR_NOMEMORY
+ @exception fileErrIO
+ @exception fileErrUserRequestedStop
+ @exception fileErrBytesNotReady
+ @exception fileErrIOTimeout
+ @exception fileErrGeneral
+ @exception fileErrWrite
+ @see ASFileSysCreatePathName
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+
+*/
+NPROC(ASPathName, ASFileSysAcquireFileSysPath, (ASFileSys oldFileSys, ASPathName oldPathName, ASFileSys newFileSys))
+
+/**
+ Gets or sets the mode flags for a file. Pass <code>0</code> for <code>modeValue</code>
+ and <code>modeMask</code> to simply get the current mode flags.
+ @param fN The file for which to get or set the mode.
+
+ @param modeValue The mode flag values to get or set, which
+ are described in ASFileMode Flags.
+ @param modeMask The mask for the mode flags to get or set.
+ @return The previous value of the mode, or <code>0</code> if the file system
+ does not support this operation.
+
+ @see ASFileRead
+ @see ASFileSysOpenFile
+ @note This operation is primarily intended for slow file
+ systems such as the Internet, where there can potentially
+ be an appreciable wait between requesting and retrieving
+ bytes.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020002
+*/
+NPROC(ASFlagBits, ASFileSetMode, (ASFile fN, ASFlagBits modeValue, ASFlagBits modeMask))
+
+/* Acrobat 4.0 additions */
+
+/**
+ Creates an ASStm from an arbitrary data-producing procedure.
+ The stream does not support seek operations.
+ @param writeProc A user-supplied callback that provides
+ the data for the stream.
+ @param destroyProc A user-supplied callback that destroys
+ the specified ASStm. (Generally, this means deallocating
+ the memory associated with the ASStm.)
+ @param clientData A pointer to user-supplied data to pass
+ to <code>writeProc</code> each time it is called.
+ @return The newly created ASStm.
+ @exception genErrNoMemory
+ @see ASFileStmRdOpen
+ @see ASFileStmWrOpen
+ @see ASMemStmRdOpen
+ @see ASProcStmRdOpenEx
+ @see ASStmWrite
+ @see ASStmRead
+ @see ASStmClose
+ @see CosNewStream
+ @since PI_ACROSUPPORT_VERSION >= 0x00040000
+*/
+NPROC(ASStm, ASProcStmWrOpen, (ASStmProc writeProc, ASProcStmDestroyProc destroyProc, void *clientData))
+
+/**
+ Creates a writable ASStm from a file. The stream supports seek operations.
+
+ @param afile The open file to associate with the stream.
+ The file must have been opened previously using ASFileSysOpenFile().
+ Each open file has a unique ASFile. The ASFile value has
+ meaning only to the common ASFile implementation and bears
+ no relationship to platform-specific file objects.
+ @param bufSize The length in bytes of a data buffer. If <code>bufSize</code>
+ is <code>0</code>, the default buffer size (currently 4kB) is used. The
+ default is generally sufficient. A larger buffer size should
+ be used only when data in the file will be accessed in chunks
+ larger than the default buffer. Although <code>bufSize</code> is passed
+ as an ASUns16, it is treated internally as an ASInt16. As
+ a result, buffer sizes above 32 K are not permitted.
+ @return The newly created ASStm.
+ @exception genErrNoMemory
+ @see ASProcStmWrOpen
+ @see ASFileStmRdOpen
+ @see ASMemStmRdOpen
+ @see ASProcStmRdOpenEx
+ @see ASStmWrite
+ @see ASStmRead
+ @see ASStmClose
+ @see ASFileSysOpenFile
+ @see CosNewStream
+ @since PI_ACROSUPPORT_VERSION >= 0x00040000
+*/
+NPROC(ASStm, ASFileStmWrOpen, (ASFile afile, ASSmallBufferSize bufSize))
+
+/**
+ Tests whether an HFT is valid.
+ @param hft IN/OUT The HFT to test.
+ @return <code>true</code> if <code>hft</code> is valid, <code>false</code> otherwise.
+ @since PI_ACROSUPPORT_VERSION >= 0x00040000
+
+*/
+NPROC(ASBool, HFTIsValid, (HFT hft))
+
+
+/* Acrobat 5.0 additions */
+
+/**
+ Populates an ASFileSysItemProps record with a full description
+ of the file system object associated with <code>pathName</code>. It calls
+ ASFileSysGetItemPropsProc().
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName associated with the object.
+
+ @param props (Filled by the method) A properties structure
+ describing the object. The size field must be set on input.
+ @return <code>0</code> if no error was encountered; otherwise an error code is
+ returned. If an error code is returned, <code>props</code> will not be
+ filled with valid values. If no file system object is present,
+ an error will not be reported and the <code>props.isThere</code>
+ field will be <code>false</code>.
+ @exception genErrBadParm
+ @exception genErrMethodNotImplemented
+ @see ASFileSysConvertCabToItemProps
+ @see ASFileSysConvertItemPropsToCab
+ @see ASFileSysGetItemPropsAsCab
+
+ @note The method clears the memory associated with <code>itemProps</code>,
+ so the caller need not do so. However, the caller must explicitly
+ set the <code>props->size</code> field of the ASFileSysItemProps structure
+ before calling this method.
+
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASErrorCode, ASFileSysGetItemProps, (ASFileSys fileSys, ASPathName pathName, ASFileSysItemProps props))
+
+/**
+ Creates an iterator which can be used to enumerate all objects
+ inside the specified folder, and returns the properties
+ of the first item found in the folder. The iteration can
+ be continued by passing the returned ASFolderIterator to
+ ASFileSysNextFolderItem.
+
+ <p>Both <code>itemProps</code> and <code>itemPath</code> are optional, and may be <code>NULL</code>
+ if you are not interested in that information. </p>
+
+ <p>The client is obligated to eventually free the resources
+ associated with ASFolderIterator by calling ASFileSysDestroyFolderIterator(). </p>
+
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ <code>folderPath</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param folderPath IN/OUT The path associated with the target folder.
+
+ @param props IN/OUT (Filled by the method, may be <code>NULL</code>) A properties
+ structure describing the first object iterated.
+ @param itemPath (Filled by the method, may be <code>NULL</code>) An ASPathName, allocated by
+ ASFileSysFirstFolderItem(), which is associated with the object.
+ The caller of ASFileSysFirstFolderItem() must free the ASPathName.
+ This parameter contains an absolute path on Windows and UNIX.
+ @return A valid ASFolderIterator object if <code>folderPath</code> contained
+ any files. <code>NULL</code> will be returned if the folder is empty
+ or the operation is not supported by the file system.
+ @exception genErrBadParm
+ @exception fileErrFNF (raised by the Windows default file system)
+ @exception asFileErrNotADir (raised by the Windows default file system)
+ @exception ERR_NOMEMORY
+ @see ASFileSysNextFolderItem
+ @see ASFileSysDestroyFolderIterator
+
+ @note The order in which items are enumerated is implementation-dependent.
+ Of particular importance is the fact that items will probably not be iterated in alphabetic order.
+
+ @note If items are added to or removed from a folder during
+ iteration, the results are implementation-dependent.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(ASFolderIterator, ASFileSysFirstFolderItem, (ASFileSys fileSys, ASPathName folderPath, ASFileSysItemProps props, ASPathName *itemPath))
+
+/**
+ Continues the iteration process associated with the ASFolderIterator
+ object.
+
+ <p>Both <code>itemPath</code> and <code>itemProps</code> are optional, and may be <code>NULL</code>
+ if you are not interested in that information. </p>
+
+ @param fileSys (May be <code>NULL</code>) The file system with which
+ the iteration was started. Pass <code>NULL</code> to use the default
+ file system.
+ @param folderIter An ASFolderIterator object returned
+ from a previous call to ASFileSysFirstFolderItem().
+ @param props (Filled by the method, may be <code>NULL</code>) A properties
+ structure describing the next object in the iteration.
+ @param itemPath (Filled by the method, may be <code>NULL</code>) An ASPathName, allocated by
+ ASFileSysNextFolderItem(), which is associated with the object.
+ The caller of ASFileSysNextFolderItem() must free the ASPathName.
+ This parameter contains an absolute path on Windows and UNIX.
+ @return <code>true</code> if another object was found, <code>false</code> otherwise.
+ @exception genErrBadParm
+ @exception fileErrGeneral
+ @exception ERR_NOMEMORY
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysDestroyFolderIterator
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASBool, ASFileSysNextFolderItem, (ASFileSys fileSys, ASFolderIterator folderIter, ASFileSysItemProps props, ASPathName *itemPath))
+
+/**
+ Releases the resources associated with <code>folderIter</code>.
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ the iteration was started. Pass <code>NULL</code> to use the default
+ file system.
+ @param folderIter IN/OUT An ASFolderIterator object returned from
+ a previous call to ASFileSysFirstFolderItem().
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(void, ASFileSysDestroyFolderIterator, (ASFileSys fileSys, ASFolderIterator folderIter))
+
+/**
+ Returns the parent folder of the file system object associated
+ with <code>pathName</code>. The following rules apply in the default
+ file systems:
+
+ <ul>
+ <li><code>pathName</code> may be associated with either a file or a folder.</li>
+ <li>The file system object associated with <code>pathName</code> need not exist.</li>
+ </ul>
+
+
+ <p>It is the caller's responsibility to release the returned ASPathName. </p>
+
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName IN/OUT The ASPathName.
+ @return The ASPathName associated with the parent folder. The method will return
+ <code>NULL</code> if the parent could not be returned.
+ @exception genErrNoMemory
+ @exception fileErrIO
+ @exception fileErrUserRequestedStop
+ @exception fileErrBytesNotReady
+ @exception fileErrIOTimeout
+ @exception fileErrGeneral
+ @exception fileErrWrite
+ @see ASFileSysCreatePathName
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(ASPathName, ASFileSysAcquireParent, (ASFileSys fileSys, ASPathName pathName))
+
+
+/**
+ Performs a comparison between the file and path to determine
+ if they represent the same file. This method will return
+ <code>false</code> if the file was not opened through the <code>fileSys</code> file system.
+
+ @param fN IN/OUT The file in question.
+ @param pathName IN/OUT The ASPathName in question.
+ @param fileSys IN/OUT The file system from which the path was obtained.
+
+ @return <code>false</code> if the comparison fails, <code>true</code> otherwise.
+ @note This method is not guaranteed to work on all file systems.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(ASBool, ASFileIsSame, (ASFile fN, ASPathName pathName, ASFileSys fileSys))
+
+/**
+ Extracts the file name (including extension) from the path.
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName associated with the file in question.
+ @param name (Filled by the method) A buffer used to store the file name.
+ @param maxLength Maximum number of bytes that buffer can hold.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise. The buffer is returned as
+ a host-encoded C string.
+ @exception fileErrGeneral
+ @see ASFileSysGetNameFromPathAsASText
+
+ @note In Acrobat 6.0 and later, this method can only be used to get
+ host encoding. For any other encoding, use ASFileSysGetNameFromPathAsASText().
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASErrorCode, ASFileSysGetNameFromPath, (ASFileSys fileSys, ASPathName pathName, char *name, ASTArraySize maxLength))
+
+/**
+ Returns a unique path name suitable for use in creating
+ temporary files. It is the caller's responsibility to release
+ the returned object using ASFileSysReleasePath().
+
+ <p>If <code>siblingPath</code> is non-<code>NULL</code>, the returned ASPathName is created
+ at the same folder level as this path. Otherwise the standard
+ temporary file location is used. </p>
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>siblingPath</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param siblingPathName (May be <code>NULL</code>) An ASPathName indicating
+ the desired location of the temporary path name. The returned
+ ASPathName is created at the same folder level as this path.
+ @return The ASPathName if the operation was successful, <code>NULL</code> otherwise.
+
+ @see ASFileSysReleasePath
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASPathName, ASFileSysGetTempPathName, (ASFileSys fileSys, ASPathName siblingPathName))
+
+/**
+ Gets the amount of free space on the volume containing <code>pathName</code>.
+
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName IN/OUT The ASPathName in question.
+ @return The amount of free space in bytes, <code>0</code> otherwise. Because
+ the free space is returned as an ASUns32, it is limited to 4 GB.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(ASDiskSpace, ASFileSysGetStorageFreeSpace, (ASFileSys fileSys, ASPathName pathName))
+
+/**
+ Flushes the volume on which the specified file resides.
+ This ensures that any data written to the system for the
+ volume containing <code>pathName</code> is flushed out to the physical
+ volume (equivalent to Mac OS FlushVol or to the UNIX
+ sync).
+
+ <p>Only the Mac OS default file system implements the callback
+ associated with this method. This is a no-op on Windows
+ and UNIX.</p>
+
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName IN/OUT The ASPathName from which the volume information is obtained.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(ASErrorCode, ASFileSysFlushVolume, (ASFileSys fileSys, ASPathName pathName))
+
+
+/**
+ Initiates a byte range request for a given file, if the file is in the browser.
+ @param fN The file for which you wish to make read requests.
+ @param blockPairs The array of <code>ASInt32</code> pairs. The first <code>ASInt32</code> in the pair
+ is the offset into the file to read, and the second <code>ASInt32</code> is the length of
+ the range to request.
+ @param nBlockPairs The number of block pairs to request.
+ @see ASFileHasOutstandingMReads
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(void, ASFileMReadRequest, (ASFile fN, ASInt32 *blockPairs, ASTCount nBlockPairs ))
+
+/**
+ Clears all outstanding <code>mreads</code> for the given file.
+ @param fN The file to clear <code>mreads</code> for.
+ @see ASFileHasOutstandingMReads
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASFileClearOutstandingMReads, (ASFile fN))
+
+/**
+ Returns the URL corresponding to <code>pathName</code>. It is the caller's
+ responsibility to free the memory associated with the returned
+ string using ASfree().
+ @param fileSys IN/OUT The file system from which <code>path</code> was obtained.
+ Pass <code>NULL</code> to use the default file system.
+ @param path IN/OUT The ASPathName in question.
+ @return A buffer containing the URL, or <code>NULL</code> if some error occurred.
+ The URL is in the standard <code>'file://'</code> URL style.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(char *, ASFileSysURLFromPath, (ASFileSys fileSys, ASPathName path))
+
+/**
+ Returns the URL associated with file. It is the caller's
+ responsibility to release the memory associated with the
+ returned string using ASfree().
+ @param asf IN/OUT The file in question.
+ @return A buffer containing the URL, or <code>NULL</code> if it could not be determined.
+ On all file systems, the path will be URL-escaped. On the default file system, encoding will be
+ platform-encoded. On Unicode and browser file systems, encoding will be UTF8.
+
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(char *, ASFileGetURL, (ASFile asf))
+
+/**
+ Creates an empty folder at the specified <code>pathName</code>.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param path The path of the folder to create.
+ @param recurse Recursively create the parent folder if necessary.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @exception genErrMethodNotImplemented
+ @exception fileErrFNF
+ @see ASFileSysRemoveFolder
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASErrorCode, ASFileSysCreateFolder, (ASFileSys fileSys, ASPathName path, ASBool recurse))
+
+/**
+ Deletes the folder at the specified <code>pathName</code> only if it is empty.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param path The path of the folder to remove.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @exception genErrMethodNotImplemented
+ @see ASFileSysCreateFolder
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASErrorCode, ASFileSysRemoveFolder, (ASFileSys fileSys, ASPathName path))
+
+/**
+ Gets the file access mode(s) specified for the file when it
+ was opened.
+ @param fN The file in question.
+ @return A value corresponding to one or more ASFileMode objects
+ used to access or create the file, as shown in the table below. The
+ values that can be returned include combinations of the
+ following, OR'd with each other:
+
+ <p>Return value from ASFileGetOpenMode(): </p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Return value</TH><TH>Meaning</TH></TR>
+ <TR><TD><code>0</code></TD><TD>created</TD></TR>
+ <TR><TD><code>1</code></TD><TD>readable</TD></TR>
+ <TR><TD><code>2</code></TD><TD>readable and writable</TD></TR>
+ <TR><TD><code>8</code></TD><TD>sequential access</TD></TR>
+ <TR><TD><code>16</code></TD><TD>local</TD></TR>
+ </TABLE>
+
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASFileMode, ASFileGetOpenMode, (ASFile fN))
+
+/**
+ Returns a user-friendly representation of a path. It is
+ the caller's responsibility to release the memory associated
+ with the returned string using ASfree().
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param path The ASPathName in question.
+ @return A buffer containing the display string, or <code>NULL</code> if this
+ operation is not supported by the file system or some error
+ occurred.
+
+ @example
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating system</TH><TH>Display string</TH></TR>
+ <TR><TD>Windows</TD><TD><code>"C:\\Folder\\File"</code></TD></TR>
+ <TR><TD>Mac OS</TD><TD><code>"Hard Disk:Folder:File"</code></TD></TR>
+ <TR><TD>UNIX</TD><TD><code>"/Folder/File"</code></TD></TR>
+ </TABLE>
+
+ @see ASFileSysDisplayASTextFromPath
+
+ @note In Acrobat 6.0 and later, this method can only be used to get
+ host encoding. For any other encoding, use ASFileSysDisplayASTextFromPath().
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(char *, ASFileSysDisplayStringFromPath, (ASFileSys fileSys, ASPathName path))
+
+/**
+ Returns the number of seconds elapsed since midnight, January
+ 1, 1970, coordinated universal time, up to the current time.
+ @return See above.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+SPROC(ASCount, ASGetSecs, (void), ASSecs)
+
+/**
+ Sets the type and creator of a file. See Type/Creator Codes.
+
+ @param fileSys IN/OUT The file system for which the type and creator
+ are needed.
+ @param path IN/OUT The path name of the file.
+ @param type IN/OUT The type of the file.
+ @param creator IN/OUT The creator of the file.
+ @return None.
+ @see ASFileSysGetTypeAndCreator
+ @note As is the case for ASFileSysGetTypeAndCreator(), this
+ method only applies to the Mac OS default file system.
+ Windows and UNIX make this a no-op.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+
+*/
+NPROC(void, ASFileSysSetTypeAndCreator, (ASFileSys fileSys, ASPathName path, unsigned long type, unsigned long creator))
+
+/**
+ Gets the type and creator of the file specified by the path.
+
+ <p>See Creators and Acrobat Types. </p>
+
+ @ref Creators
+ @ref AcrobatTypes
+ @param fileSys The file system containing the file for
+ which the type and creator are needed.
+ @param path The path name of the file.
+ @param type (Filled by method) The type of the file.
+ @param creator (Filled by method) The creator of the file.
+ @see ASFileSysSetTypeAndCreator
+
+ @note This is only meaningful for the Mac OS default file system.
+ Windows and UNIX always return <code>0</code> for both <code>type</code> and <code>creator</code>.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(void, ASFileSysGetTypeAndCreator, (ASFileSys fileSys, ASPathName path, ASlFileMode *type, ASlFileMode *creator))
+
+/**
+ Determines whether the given byte is a lead byte of a multi-byte
+ character, and how many tail bytes follow.
+
+ <p>When parsing a string in a host encoding, you must keep in
+ mind that the string could be in a variable length multi-byte
+ encoding. In such an encoding (for example, Shift-JIS) the
+ number of bytes required to represent a character varies
+ on a character-by-character basis. To parse such a string
+ you must start at the beginning and, for each byte, determine
+ whether that byte represents a character or is the first
+ byte of a multi-byte character. If the byte is a lead byte
+ for a multi-byte character, you must also compute how many
+ bytes will follow the lead byte to make up the entire character.
+ Currently the API provides a call (PDHostMBLen()) that performs
+ these computations, but only if the encoding in question
+ is the operating system encoding (as returned by PDGetHostEncoding()). ASHostMBLen()
+ allows you to determine this for any byte in any host
+ encoding. </p>
+
+ @param encoding The host encoding type.
+ @param byte The first byte of a multi-byte character.
+ @return The number of additional bytes required to form the character.
+ For example, if the encoding is a double-byte encoding, the
+ return value will be <code>1</code> for a two-byte character and <code>0</code> for
+ a one-byte character. For Roman encodings, the return value
+ will always be <code>0</code>.
+
+ @note ASHostMBLen() cannot confirm whether the required number of
+ trailing bytes actually follow the first byte. If you are
+ parsing a multi-byte string, make sure your code will stop
+ at the first <code>NULL</code> (zero) byte even if it appears immediately
+ after the lead byte of a multi-byte character.
+ @see PDGetHostEncoding
+ @see PDHostMBLen
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, ASHostMBLen, (ASHostEncoding encoding, ASUns8 byte))
+
+/**
+ Causes a hard flush on a file, which means that
+ the file is flushed to the physical destination. For example,
+ if a WebDAV-based file is opened, ASFileFlush() only flushes
+ changes to the local cached version of the file. This method
+ would flush changes all the way to the WebDAV server.
+ @param aFile The file that is flushed.
+ @return <code>0</code> if the operation succeeded, <code>-1</code> if there was an error.
+
+ @see ASFileFlush
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(ASErrorCode, ASFileHardFlush, ( ASFile aFile ))
+
+/**
+ A new version of HFTReplaceEntry() that adds the extension argument.
+
+ <p>Plug-ins can use the REPLACE macro instead of calling HFTReplaceEntryEx
+ directly. </p>
+
+ @param hft The HFT in which a method is replaced. Use
+ ASExtensionMgrGetHFT() to get the HFT, given its name. For
+ the HFTs built into the Acrobat viewer, global variables
+ containing the HFTs have been defined, so you can skip calling
+ ASExtensionMgrGetHFT() for these HFTs.
+ @param sel The entry in the HFT to replace, derived from
+ the method's name by appending <code>SEL</code>. For example, to replace
+ AVAlert, <code>sel</code> must be <code>AVAlertSEL</code>.
+ @param newEntry The function to replace the current one.
+ The function pointer must be converted to an HFTEntry using
+ the ASCallbackCreateReplacement() macro.
+ @param extension Plug-ins should pass in <code>gExtensionID</code>
+ for this parameter (see the code for the Acrobat 5.0 version
+ of the REPLACE macro). This parameter is stored by Acrobat
+ so that any entries that were replaced by a plug-in can
+ be unreplaced in the event that the plug-in unloads.
+ @param flags The new entry's properties. Currently, only
+ <code>HFTEntryReplaceable</code> is defined.
+ @exception xmErrCannotReplaceSelector
+ @see ASExtensionMgrGetHFT
+ @see HFTGetReplacedEntry
+ @see HFTReplaceEntry
+ @see HFTUnreplaceEntry
+ @see CALL_REPLACED_PROC
+ @see REPLACE
+ @see ASCallbackCreateReplacement
+ @note The CALL_REPLACED_PROC macro is available to call
+ the previous HFT entry function that was replaced.
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(void, HFTReplaceEntryEx, (HFT hft, Selector sel, HFTEntry newEntry, ASExtension extension, ASFlagBits flags))
+
+/**
+ Removes the <code>oldEntry</code> item from <code>hft</code> at <code>sel</code> if the extension
+ fields match. It allows HFT replacements to be undone in cases
+ such as with the DigSig plug-in, which replaces a method
+ that Acrobat could use after DigSig unloads.
+ @param hft The HFT in which a method is un-replaced. Use
+ ASExtensionMgrGetHFT() to get the HFT, given its name. For
+ the HFTs built into the Acrobat viewer, global variables
+ containing the HFTs have been defined, so you can skip calling
+ ASExtensionMgrGetHFT() for these HFTs.
+ @param sel The entry in the HFT to un-replace, derived
+ from the method's name by appending <code>SEL</code>. For example, to
+ replace AVAlert, <code>sel</code> must be <code>AVAlertSEL</code>.
+ @param oldEntry The old function to be replaced. The function
+ pointer must be converted to an HFTEntry using the ASCallbackCreateReplacement()
+ macro.
+ @param extension An object of type ASExtension.
+ @see ASExtensionMgrGetHFT
+ @see HFTGetReplacedEntry
+ @see HFTReplaceEntry
+ @see HFTReplaceEntryEx
+ @see REPLACE
+ @see ASCallbackCreateReplacement
+ @since PI_ACROSUPPORT_VERSION >= 0x00050000
+*/
+NPROC(void, HFTUnreplaceEntry, (HFT hft, Selector sel, HFTEntry oldEntry, ASExtension extension))
+
+/* Acrobat 6.0 additions */
+
+/**
+ Extends ASProcStmRdOpen() and creates a read-only
+ ASStm from an arbitrary data-producing procedure. The stream
+ optionally supports seek operations, although external clients do not
+ have the ability to initiate a seek operation.
+
+ <p>The supplied handlers are called when the client of the
+ stream attempts to read data from it, seek it, or find it's
+ length, as well as when the client closes it.</p>
+
+ @param handler A structure containing user-supplied callbacks
+ that supply the stream's data and destroy the stream.
+ @param clientData A pointer to user-supplied data to pass
+ to the procedures each time they are called.
+ @return The newly created ASStm.
+ @exception genErrNoMemory
+ @see ASProcStmRdOpen
+ @see ASStmClose
+ @see ASStmRead
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASStm, ASProcStmRdOpenEx, (ASProcStmRdExHandler handler, void *clientData))
+
+/**
+ Generates a unique identifier (UUID).
+ @param dst (Filled by the method) The UUID created from the hash.
+ @return <code>true</code> if the UUID is successfully created, <code>false</code> otherwise.
+
+ @see ASUUIDFromCString
+ @see ASUUIDGenFromHash
+ @see ASUUIDGenFromName
+ @see ASUUIDToCString
+ @see AVAppGetUUID
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(ASBool, ASUUIDGenUnique, (ASUUID *dst))
+
+/**
+ Generates a universal unique identifier (UUID) for a block
+ of data (a name) in a context (a namespace).
+ @param dst (Filled by the method) The UUID created from the name.
+ @param ns A namespace or context meaningful to the client.
+
+ @param name A pointer to an arbitrary block of data to
+ be identified by the UUID.
+ @param bytes The number of bytes in <code>name</code>.
+ @return <code>true</code> if the UUID is successfully created, <code>false</code> otherwise.
+
+ @see ASUUIDFromCString
+ @see ASUUIDGenFromHash
+ @see ASUUIDGenUnique
+ @see ASUUIDToCString
+ @see AVAppGetUUID
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(ASBool, ASUUIDGenFromName, (ASUUID *dst, const ASUUID *ns, void *name, ASByteCount bytes))
+
+/**
+ Generates a unique identifier (UUID) from a hash value.
+
+ @param dst (Filled by the method) The UUID created from the hash.
+ @param hash A hash value, such as MD5.
+ @return <code>true</code> if the UUID is successfully created, <code>false</code> otherwise.
+
+ @see ASUUIDFromCString
+ @see ASUUIDGenFromName
+ @see ASUUIDGenUnique
+ @see ASUUIDToCString
+ @see AVAppGetUUID
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(ASBool, ASUUIDGenFromHash, (ASUUID *dst, ASUns8 hash[16]))
+
+/**
+ Parses a C string, such as one generated by ASUUIDToCString(),
+ into a unique identifier (UUID).
+ @param dst (Filled by the method) The UUID created from the string.
+ @param str A <code>NULL</code>-terminated string from which to generate
+ the UUID, in the following form: <code>f81d4fae-7dec-11d0-a765-00a0c91e6bf6</code>.
+ @return <code>true</code> if the UUID is successfully created, <code>false</code> otherwise.
+
+ @see ASUUIDGenFromHash
+ @see ASUUIDGenFromName
+ @see ASUUIDGenUnique
+ @see ASUUIDToCString
+ @see AVAppGetUUID
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(ASBool, ASUUIDFromCString, (ASUUID *dst, const char *str))
+
+/**
+ Generates a <code>NULL</code>-terminated C string from the unique identifier
+ (UUID) for a user or session.
+ @param dst (Filled by the method) A <code>NULL</code>-terminated string
+ from which to generate the UUID, in the following
+ form: <code>f81d4fae-7dec-11d0-a765-00a0c91e6bf6</code>. The string must
+ be at least the length specified by ASUUIDMaxStringLen().
+
+ @param src The UUID from which to generate the string .
+ @see ASUUIDFromCString
+ @see ASUUIDGenFromHash
+ @see ASUUIDGenFromName
+ @see ASUUIDGenUnique
+ @see AVAppGetUUID
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(void, ASUUIDToCString, (char *dst, const ASUUID *src))
+
+/**
+ Deprecated API: always returns <code>NULL</code>.
+ @since PI_ASEXTRA_VERSION >= 0x00060000
+*/
+NPROC(void *, ASFileSysGetPlatformThing, (ASFileSys fileSys, ASPathName path, ASAtom thing))
+
+/**
+ Returns a platform-specific file system representation of
+ the specified path, according to the specified type, wrapped
+ in an allocated ASPlatformPath object. It calls ASFileSysAcquirePlatformPathProc().
+
+ <p>This method creates an equivalent platform-specific type
+ (such as FSRef on Mac OS) from an ASPathName. Use ASFileSysCreatePathName()
+ for the reverse situation to create an equivalent ASPathName from
+ a platform-specific type. </p>
+
+ <p>In previous releases, you could cast an ASPathName to an
+ FSSpec, for example, but that does not work in the Acrobat
+ 6.0 SDK and later (because of changes to accommodate long, Unicode
+ file names on Mac OS X). When developing for Mac OS, use
+ this call to get an FSSpec from an ASPathName safely on
+ Mac OS X, without casting. However, it is recommended that
+ you transition to using newer types such as FSRef to be
+ compatible with OS X filenames, or change to using all ASFileSys
+ methods. </p>
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param path The ASPathName in the file system specified
+ by fileSys.
+ @param platformPathType The platform path type, one of
+ the following ASAtom values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>ASAtom value</TH><TH>Operating system</TH></TR>
+ <TR><TD>FSRefWithCFStringRef</TD><TD>Mac OS</TD></TR>
+ <TR><TD>FSSpec</TD><TD>Mac OS</TD></TR>
+ <TR><TD>CFURLRef</TD><TD>Mac OS</TD></TR>
+ <TR><TD>POSIXPath</TD><TD>Mac OS</TD></TR>
+ <TR><TD>FSRef (<code>pathName</code> object must exist)</TD><TD>Mac OS</TD></TR>
+ <TR><TD><code>CString</code></TD><TD>Windows/UNIX</TD></TR>
+ </TABLE>
+
+ @param platformPath (Filled by the method) The new platform
+ path object. Always free this object with ASFileSysReleasePlatformPath()
+ when done.
+ @return <code>0</code> if the operation was successful, non-zero error
+ code otherwise.
+ @see ASFileSysReleasePlatformPath
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, ASFileSysAcquirePlatformPath, (ASFileSys fileSys, ASPathName path, ASAtom platformPathType, ASPlatformPath *platformPath))
+
+/**
+ Releases the specified platform path object. Each call to
+ ASFileSysAcquirePlatformPath() should have a corresponding
+ call to this method.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param platformPath The platform path object to release.
+ @see ASFileSysAcquirePlatformPath
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASFileSysReleasePlatformPath, (ASFileSys fileSys, ASPlatformPath platformPath))
+
+/**
+ Gets a platform path object in the form of a C string for
+ Windows or UNIX, if the ASPlatformPath object
+ was acquired with this type in the <code>platformPathType</code> parameter
+ of ASFileSysAcquirePlatformPath().
+ @param path The platform path.
+ @return A pointer to a C string of a platform-specific path.
+ @see ASFileSysAcquirePlatformPath
+ @see ASFileSysReleasePlatformPath
+
+ @note Applications should use this as a read-only pointer;
+ modifying the returned buffer can corrupt the ASPlatformPath.
+ Do not free the pointer.
+
+ @note Do not release the returned value, or any member data
+ of an ASPlatformPath directly; use ASFileSysReleasePlatformPath()
+ when finished with the object.
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(Cstring_Ptr, ASPlatformPathGetCstringPtr, (ASPlatformPath path))
+
+/**
+ This method was deprecated in Acrobat 9.0. Use ASPlatformPathGetFSRefPtr(),
+ ASPlatformPathGetFSRefWithCFStringRefRecPtr(), ASPlatformPathGetCFURLRefRecPtr(),
+ or ASPlatformPathGetPOSIXPathPtr() instead.
+
+ Gets a platform path object in the form of an FSSpec for the
+ Mac OS, if the ASPlatformPath object was acquired with this
+ type in the <code>platformPathType</code> parameter of ASFileSysAcquirePlatformPath().
+ @param path The platform path.
+ @return A pointer to an FSSpec.
+ @see ASFileSysAcquirePlatformPath
+ @see ASPlatformPathGetFSRefPtr
+ @see ASFileSysReleasePlatformPath
+
+ @note Do not release the returned value, or any member data
+ of an ASPlatformPath directly; use ASFileSysReleasePlatformPath()
+ when finished with the object.
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(FSSpec_Ptr, ASPlatformPathGetFSSpecPtr, (ASPlatformPath path))
+
+/**
+ Gets a platform path object in the form of an FSRef for the
+ Mac OS, if the ASPlatformPath object was acquired with this
+ type in the <code>platformPathType</code> parameter of ASFileSysAcquirePlatformPath().
+ @param path The platform path.
+ @return A pointer to an FSRef.
+ @see ASFileSysAcquirePlatformPath
+ @see ASPlatformPathGetFSRefWithCFStringRefRecPtr
+ @see ASFileSysReleasePlatformPath
+
+ @note Do not release the returned value, or any member data
+ of an ASPlatformPath directly; use ASFileSysReleasePlatformPath()
+ when finished with the object.
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(FSRef_Ptr, ASPlatformPathGetFSRefPtr, (ASPlatformPath path))
+
+/**
+ Gets a platform path object in the form of an FSRef and
+ CFStringRef for Mac OS, if the ASPlatformPath object was
+ acquired with this type in the <code>platformPathType</code> parameter
+ of ASFileSysAcquirePlatformPath().
+ @param path The platform path.
+ @return A pointer to a structure containing an FSRef and a CFStringRef.
+
+ @see ASFileSysAcquirePlatformPath
+ @see ASPlatformPathGetFSRefPtr
+ @see ASFileSysReleasePlatformPath
+
+ @note Do not release the returned value, or any member data
+ of an ASPlatformPath directly; use ASFileSysReleasePlatformPath()
+ when finished with the object.
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(FSRefWithCFStringRefRec_Ptr, ASPlatformPathGetFSRefWithCFStringRefRecPtr, (ASPlatformPath path))
+
+/**
+ Gets a platform path object in the form of a CFURLRef for the
+ Mac OS, if the ASPlatformPath object was acquired with this
+ type in the <code>platformPathType</code> parameter of ASFileSysAcquirePlatformPath().
+ @param path The platform path.
+ @return A pointer to a structure containing a CFURLRef.
+ @see ASFileSysAcquirePlatformPath
+ @see ASFileSysReleasePlatformPath
+
+ @note Do not release the returned value, or any member data
+ of an ASPlatformPath directly; use ASFileSysReleasePlatformPath()
+ when finished with the object.
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(CFURLRefRec_Ptr, ASPlatformPathGetCFURLRefRecPtr, (ASPlatformPath path))
+
+/**
+ Gets a platform path object in the form of a POSIX path
+ C string, if the ASPlatformPath object was acquired with
+ this type in the <code>platformPathType</code> parameter of ASFileSysAcquirePlatformPath().
+ @param path The platform path.
+ @return A pointer to a POSIX path (UTF-8 encoding) as a C string.
+
+ @see ASFileSysAcquirePlatformPath
+ @see ASFileSysReleasePlatformPath
+
+ @note Do not release the returned value, or any member data
+ of an ASPlatformPath directly; use ASFileSysReleasePlatformPath()
+ when finished with the object.
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(POSIXPath_Ptr, ASPlatformPathGetPOSIXPathPtr, (ASPlatformPath path))
+
+/**
+ Extracts the file name (including the extension) from the path as
+ an ASText object. This method supersedes ASFileSysGetNameFromPath() in
+ Acrobat 6.0 and later.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName associated with the file
+ in question.
+ @param name (Filled by the method) The text object containing
+ the file name.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @exception fileErrGeneral
+ @see ASFileSysGetNameFromPath
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASErrorCode, ASFileSysGetNameFromPathAsASText, (ASFileSys fileSys, ASPathName pathName, ASText name))
+
+/**
+ Returns a user-friendly representation of a path as a text
+ object. It calls ASFileSysDisplayASTextFromPathProc().
+
+ <p>This method supersedes ASFileSysDisplayStringFromPath() in Acrobat 6.0 and later.</p>
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param path The ASPathName in question.
+ @param displayText (Filled by method) The text object
+ containing the display representation of the path.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASFileSysDisplayStringFromPath
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASErrorCode, ASFileSysDisplayASTextFromPath, (ASFileSys fileSys, ASPathName path, ASText displayText))
+
+
+/**
+ Flushes any buffered data to the specified stream.
+ @param stm The stream to flush.
+ @return <code>0</code> if successful, non-zero otherwise.
+ @see ASStmClose
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASTCount, ASStmFlush, (ASStm stm))
+
+/**
+ Determines whether there are any outstanding multi-byte range
+ requests for a file. A document can have outstanding <code>mreads</code>
+ if it was opened in a browser, Acrobat requested some
+ byte ranges, and the byte ranges have not yet arrived.
+ @param fN The file in question.
+ @return <code>true</code> if the file has outstanding <code>mreads</code>, <code>false</code> otherwise.
+
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASBool, ASFileHasOutstandingMReads,(ASFile fN))
+
+/**
+ Checks if ASFileSetEOF() can be done for this file with a specified new file size.
+ @param file The file in question.
+ @param newFileSize The proposed new file size. This parameter will be treated as unsigned.
+ @see ASFileSetEOF
+ @see ASFileGetEOF
+ @see ASFileGetPos
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASBool, ASFileCanSetEOF, (ASFile file, ASInt32 newFileSize))
+
+/**
+ Returns the version of the HFT, if available.
+ @param hft The HFT whose version is obtained.
+ @return The version number if the HFT is valid and the version is
+ available, <code>HFT_ERROR_NO_VERSION</code> otherwise.
+ @see HFTNewEx
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASVersion, HFTGetVersion, (HFT hft))
+
+
+/**
+ Extends HFTNew() with version information in Acrobat 6. Creates
+ a new HFT by calling the specified HFT server's HFTServerProvideHFTProc().
+
+ @param hftServer The HFT server for the HFT being created.
+ The HFT server must have been created previously using HFTServerNew().
+
+ @param data The data to pass to the server, which includes:
+ <ul>
+ <li>
+ The number of entries in the new HFT, which determines
+ the number of methods that the HFT can contain. Each method
+ occupies one entry.
+ </li>
+ <li>The HFT version.</li>
+ </ul>
+ @return The newly created HFT.
+ @see HFTNew
+ @see ASExtensionMgrGetHFT
+ @see HFTDestroy
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(HFT, HFTNewEx, (HFTServer hftServer, HFTData data))
+
+/**
+ Converts a file name, specified as an ASPathName, to a device-independent
+ path name, which is returned as an ASText object. It calls ASFileSysDIPathFromPathExProc().
+
+ <p>This method supersedes ASFileSysDIPathFromPath() in Acrobat 6.0 and later. </p>
+
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param path The ASPathName to convert.
+ @param relativeToThisPath (May be <code>NULL</code>) The path name relative
+ to which the device-independent path name is specified. If it is
+ <code>NULL</code>, the device-independent path name will be an absolute,
+ not a relative, path name.
+ @param diPathText (Filled by the method) The ASText object
+ to contain the device-independent path. It must be allocated
+ and freed by the client.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @see ASGetDefaultFileSys
+ @see ASFileSysPathFromDIPathEx
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASErrorCode, ASFileSysDIPathFromPathEx, ( ASFileSys fileSys, ASPathName path, ASPathName relativeToThisPath, ASText diPathText))
+
+
+/**
+ Converts a device-independent path name in an ASText object
+ to an ASPathName. This method can only be used for files
+ that already exist (that is, it cannot be used to create
+ a placeholder path name for files that a plug-in intends
+ to create in the future).
+
+ <p>It is the caller's responsibility to release the returned ASPathName.</p>
+
+ <p>This method supersedes ASFileSysPathFromDIPath() in Acrobat 6.0 and later.</p>
+
+ @param fileSys (May be <code>NULL</code>) The file system within which the
+ ASPathName will be created. Pass <code>NULL</code> to use the
+ default file system.
+ @param diPathText The device-independent path name to convert,
+ as an ASText object. See Section 3.10 in the <i>PDF Reference</i>
+ for a description of the device-independent path name format.
+ This path name may not be understood on another platform
+ since drive specifiers may be prepended. On Windows, you
+ cannot specify a UNC path name. You must have a file mounted
+ on the file server. For example, the following path is valid:
+ <code>/f/dirname/file.pdf</code> where <code>f</code> is <code>\\server\\people</code>. The following
+ does not work: <code>/server/people/dirname/file.pdf</code>.
+ @param relativeToThisPath A path name relative to which <code>diPath</code>
+ is interpreted. If <code>NULL</code>, <code>diPath</code> is interpreted as an absolute
+ path name, not a relative path name.
+ @return An ASPathName corresponding to the parameter values supplied.
+ Returns <code>NULL</code> if <code>diPath</code> cannot be converted to an ASPathName. This would occur,
+ for example, if the specified file does not already exist.
+
+ @exception genErrNoMemory
+ @see ASFileSysDIPathFromPathEx
+ @see ASFileSysReleasePath
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASPathName, ASFileSysPathFromDIPathEx, (ASFileSys fileSys, ASConstText diPathText, ASPathName relativeToThisPath))
+
+
+/**
+ Gets the temporary file system implementation for
+ a platform.
+ @return The platform's default file system.
+ @see ASSetTempFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASFileSys, ASGetTempFileSys, (void)) /* JGS */
+
+/**
+ Sets the temporary file system implementation for
+ a platform.
+ @return none
+ @see ASGetDefaultFileSys
+ @see ASGetTempFileSys
+ @see ASGetRamFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(void, ASSetTempFileSys, (ASFileSys fileSys)) /* JGS */
+
+/**
+ Gets the in-memory file system implementation for
+ a platform.
+ @return The platform's in-memory file system.
+ @see ASSetDefaultFileSys
+ @see ASSetTempFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00060000
+*/
+NPROC(ASFileSys, ASGetRamFileSys, (void)) /* JGS */
+
+/**
+ Converts an ASFixed to a <code>float</code>.
+
+ @param inASFixed IN The ASFixed value to convert.
+ @return The <code>float</code> representation of the ASFixed value.
+
+*/
+NPROC(float, ASFixedToFloat, (ASFixed inASFixed))
+
+/**
+ Converts a <code>float</code> to an ASFixed value.
+
+ @param inFloat IN The <code>float</code> value to convert.
+ @return The ASFixed representation of the <code>float</code> value.
+
+*/
+NPROC(ASFixed, FloatToASFixed, (double inFloat))
+
+/**
+ Attempts to open a file in the specified file system, in
+ the specified read/write/create mode. If the file is already
+ open, the existing file handle is returned. The caller retains
+ ownership of <code>pathName</code>.
+
+ <p>This call can open files over 2 GB in length and should be used
+ instead of ASFileSysOpenFile() whenever possible.</p>
+
+ <p>On Mac OS, when this method creates a file, the file's creator
+ is set to <code>'CARO'</code> and its type is set to <code>'PDF '</code> (with a
+ space after PDF). </p>
+
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which the
+ path name was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName IN/OUT The path name of the file to open.
+ @param mode IN/OUT An <code>OR</code> of the ASFile Open Modes.
+ @param fP IN/OUT (Filled by the method) The ASFile that was opened.
+
+ @ref ASFileOpenModes
+
+ @return <code>0</code> if the operation was successful, a non-zero
+ error code otherwise. The error is platform and file-system specific:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Platform</TH><TH>Error</TH></TR>
+ <TR><TD>Windows</TD><TD><ul>
+ <li>Returns fileErrWrPerm if trying to open a read-only file with write permissions.</li>
+ <li>Returns ErrSysXtnMgr (use GetLastError()) for platform-specific error conditions that CreateFile() may use.</li>
+ <li>Returns <code>fileErrGeneral</code> if the developer passed in an invalid ASPathName.</li>
+ </ul></TD>
+ </TR>
+ <TR><TD>Mac OS</TD><TD><ul>
+ <li>Returns fileErrFNF if trying to open a file for reading that does not exist.</li>
+ <li>Returns ErrSysMDSystem for platform-specific errors that <code>FSpCreate</code>, <code>FSpSetFInfo</code>, <code>FSpOpenRF</code>, <code>FSpOpenDF</code>, or <code>SetFPos</code> may use).</li>
+ <li>Returns <code>fileErrGeneral</code> if the developer passed in an invalid ASPathName.</li>
+ </ul></TD>
+ </TR>
+ </TABLE>
+
+ @exception genErrNoError
+ @see ASFileClose
+ @see ASFileReopen
+ @see ASGetDefaultFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+
+*/
+NPROC(ASErrorCode, ASFileSysOpenFile64, (ASFileSys fileSys, ASPathName pathName, ASFileMode mode, ASFile *fP))
+
+/**
+ Returns the maximum file position that can be processed by this file
+ system. This is not the maximum size file that can be created or the
+ amount of room left in the file system, but the maximum file position
+ that can be handled by the arithmetic in the file system implementation.
+ This will typically be <code>(2 ^ 31) - 1</code> or <code>(2 ^ 63) - 1</code>.
+ @return The maximum file position that can be processed.
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ the path name was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @see ASFileSysOpenFile64
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+
+*/
+NPROC(ASFilePos64, ASFileSysGetFilePosLimit, (ASFileSys fileSys))
+
+/**
+ Seeks to the specified position in a file. This is the position
+ at which the next read or write will begin. This call will
+ work with files over 2 GB in length.
+ @param aFile IN/OUT The file in which to seek.
+ @param pos IN/OUT The position to seek.
+ @exception fileErrIO
+ @see ASFileGetPos64
+ @see ASFileRead
+ @see ASFileWrite
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+
+*/
+NPROC(void, ASFileSetPos64, ( ASFile aFile, ASFilePos64 pos ))
+
+/**
+ Gets the current seek position in a file. This is the position
+ at which the next read or write will begin. This call will
+ work with files over 2 GB in length.
+ @param aFile IN/OUT The file in which to get the seek position.
+
+ @return The current seek position.
+ @exception fileErrIO
+ @see ASFileSetPos64
+ @see ASFileRead
+ @see ASFileWrite
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+
+*/
+NPROC(ASFilePos64, ASFileGetPos64, ( ASFile aFile ))
+
+/**
+ Changes the size of a file. The new size may by larger or
+ smaller than the original size. This method may raise file
+ system or platform-specific exceptions. This call will
+ work with files over 2 GB in length.
+ @param aFile IN/OUT The file whose size is changed.
+ @param newFileSize IN/OUT The new size of the file.
+ @exception fileErrIO
+ @see ASFileGetEOF64
+ @see ASFileGetPos
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+
+*/
+NPROC(void, ASFileSetEOF64, ( ASFile aFile, ASFilePos64 newFileSize ))
+
+/**
+ Gets the current size of a file.
+ @param aFile IN/OUT The ASFile whose size is obtained. This
+ call will work with files over 2 GB in length.
+ @return The size of the file.
+ @exception fileErrIO
+ @see ASFileSetEOF64
+ @see ASFileSetPos
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+
+*/
+NPROC(ASFilePos64, ASFileGetEOF64, ( ASFile aFile ))
+
+/**
+ Sets the temporary file system implementation for
+ a platform.
+ @see ASGetRamFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+*/
+NPROC(void, ASRamFileSysSetLimitKB, (ASInt32 limit))
+
+/**
+ This method writes into <code>nameForDisplay</code>
+ the representation of that item as it would be shown in Windows Explorer
+ or Mac OS Finder. For example, it will provide the localized string for
+ <code>"My Documents"</code> even though, on disk, <code>"My Documents"</code> is always in English.
+ It will also strip the extension if that is what Windows Explorer or the
+ Mac Finder would do for that file.
+ @param fileSys (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName The ASPathName associated with the file
+ in question.
+ @param nameForDisplay (Filled by the method) The text object containing
+ the name used for display.
+ @return <code>0</code> if the operation was successful, a non-zero
+ platform-dependent error code otherwise.
+ @exception fileErrGeneral
+ @since PI_ACROSUPPORT_VERSION >= 0x00070000
+*/
+NPROC(ASErrorCode, ASFileSysGetNameFromPathForDisplay, (ASFileSys fileSys, ASPathName pathName, ASText nameForDisplay))
+
+/**
+ Gets the file system implementation that supports
+ Unicode file path names. If a platform does not
+ have a file system that supports Unicode, then <code>NULL</code>
+ will be returned.
+ @return The platform's Unicode file system.
+ @see ASGetDefaultFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00080000
+
+*/
+NPROC(ASFileSys, ASGetDefaultUnicodeFileSys, (void))
+
+/**
+ Gets an ASText object containing a string describing the specified exception.
+
+ @param errorCode The exception whose error string is obtained.
+ This must be a full error code, built with the ErrBuildCode
+ macro or a user-defined exception returned from ASRegisterErrorString().
+ See Error Systems for a list of predefined exceptions.
+ @param errorString (Filled by the method) The text object containing the error string.
+ The client must pass a valid ASText object. The routine does not allocate it.
+
+ @see ASGetErrorString
+ @see ASRegisterErrorStringASText
+ @see ASRegisterErrorString
+ @see ASGetExceptionErrorCode
+ @see ASRaise
+ @ref ErrorSystems
+ @since PI_ACROSUPPORT_VERSION >= 0x00080000
+*/
+NPROC(void, ASGetErrorStringASText, (ASErrorCode errorCode, ASText errorString))
+
+/**
+ Registers a new error and string.
+
+ @param severity The severity of the error being defined.
+ It must be one of the Error Severities.
+ @param errorString The text object containing the error string to be set.
+ @return The newly created error code. Plug-ins should assign the
+ error code returned by this method to a variable if they
+ wish to use the error code later in the current session.
+
+ @see ASRegisterErrorString
+ @see ASGetErrorStringASText
+ @see ASGetErrorString
+ @see ASRaise
+ @ref ErrorSeverities
+ @since PI_ACROSUPPORT_VERSION >= 0x00080000
+*/
+NPROC(ASErrorCode, ASRegisterErrorStringASText, (ASErrSeverity severity, const ASText errorString))
+
+/**
+ Gets the best file system implementation that supports
+ the passed in path. If the path requires the
+ Unicode file system then the default Unicode file system
+ is returned, otherwise the default file system is returned.
+ @return The platform's default or Unicode file system.
+ @see ASGetDefaultFileSys
+ @see ASGetDefaultUnicodeFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00080000
+
+*/
+NPROC(ASFileSys, ASGetDefaultFileSysForPath, (ASAtom pathSpecType, const void *pathSpec))
+
+/**
+ Returns <code>true</code> if <code>fileSys</code> is <code>NULL</code>,
+ the default file system or the default Unicode file system.
+ @return <code>true</code> if <code>fileSys</code> is <code>NULL</code>
+ or a local file system.
+ @see ASGetDefaultFileSys
+ @see ASGetDefaultUnicodeFileSys
+ @since PI_ACROSUPPORT_VERSION >= 0x00080000
+
+*/
+NPROC(ASBool, ASFileSysIsLocal, (ASFileSys fileSys))
+
+/**
+ Gets the amount of free space on the volume containing <code>pathName</code>.
+ This is the same as ASFileSysGetStorageFreeSpace() without the 4 GB limit.
+
+ @param fileSys IN/OUT (May be <code>NULL</code>) The file system from which
+ <code>pathName</code> was obtained. Pass <code>NULL</code> to use the default file
+ system.
+ @param pathName IN/OUT The ASPathName.
+ @return The amount of free space in bytes, <code>0</code> otherwise.
+ @since PI_ACROSUPPORT_VERSION >= 0x00080000
+
+*/
+NPROC(ASDiskSpace64, ASFileSysGetStorageFreeSpace64, (ASFileSys fileSys, ASPathName pathName))
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASRaiseAware.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASRaiseAware.h
new file mode 100644
index 0000000..e2e91f0
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ASRaiseAware.h
@@ -0,0 +1,360 @@
+/*********************************************************************************
+ File: ASRaiseAware.h
+ Created: June 16, 2003
+ Purpose: This file contains code needed for making a class safe across
+ exceptions.
+
+*
+* ___________________
+*
+* (c) Copyright 2003-2006 Adobe Systems, Inc.
+* All Rights Reserved.
+*
+* NOTICE: Adobe permits you to use, modify, and distribute this file
+* in accordance with the terms of the Adobe license agreement
+* accompanying it. If you have received this file from a source other
+* than Adobe, then your use, modification, or distribution of it
+* requires the prior written permission of Adobe.
+************************************************************************************/
+#ifndef _H_ASRAISEAWARE
+#define _H_ASRAISEAWARE
+
+/* ============================ C++ compatibility ======================== */
+
+#if defined (__cplusplus)
+
+#ifndef _H_ACEXCEPT
+#include "CorCalls.h"
+#endif
+
+#if (EXCHANGE || READER)
+#include "ACExcept.h"
+#endif
+
+/*
+ NEEDS_RAISEAWARE can be set to 0 by modules that wrap all outgoing
+ calls at the module boundary with a DURING/HANDLER and convert them
+ to C++ exceptions or error return values. This shields the classes
+ within from ASRaise related issues and hence does not require
+ RAISEAWARE on any platform
+
+ The only downside to NEEDS_RAISEAWARE being 1 is a small
+ performance hit. Hence it is safe, not to disable it by setting it
+ to 0 in case there is doubt on whether it is required.
+*/
+
+#ifndef NEEDS_RAISEAWARE
+
+#if (defined(WIN_PLATFORM) && defined(_MSC_VER))
+/*
+ For modules compiled with VC++, make sure that the module is compiled
+ using the /EHsc- switch. Not having that set could result in stack
+ objects not getting cleaned up during a Raise. If that setting is not
+ set, then force enable NEEDS_RAISEAWARE by setting it to 1 in the
+ project settings.
+*/
+ #define NEEDS_RAISEAWARE 0
+
+#elif MAC_PLATFORM
+/*
+ Since we now use real C++ exceptions for DURING/HANDLER/ASRAISE, we no
+ long need RAISEAWARE on Mac.
+*/
+ #define NEEDS_RAISEAWARE 0
+
+#elif UNIX_PLATFORM
+
+/* serre, 10/6/06
+ When DURING/HANDLER/ASRAISE are called from C++ code, a C++
+ exception is thrown and we don't need RAISEAWARE to destruct objects
+ constructed "on the stack".
+ If DURING/HANDLER/ASRAISE are called from C code, then the setjmp/longjmp
+ version of exceptions are used, and there may be resource leaks.
+ We would like to have users only call PDF lib functions from C++ code so
+ we don't have to use this RAISEAWARE code. If this turns out to not be
+ acceptable, then we will switch back (or do something else).
+ */
+ #define NEEDS_RAISEAWARE 0
+
+#else
+
+ #define NEEDS_RAISEAWARE 1
+
+#endif /* (defined(WIN_PLATFORM) && defined(_MSC_VER)) */
+
+#endif /* NEEDS_RAISEAWARE */
+
+
+
+#if (NEEDS_RAISEAWARE)
+
+/* SUMMARY:
+ If your class has a destructor, especially one that releases storage,
+ and you're using this with code that can raise, then you should make
+ your class be a RaiseAware Class, so that Raise will invoke the destructor.
+ Details on making a class a RaiseAware class is given below.
+
+ DETAILS:
+ Define a class of C++ objects that respond to ASRaise by invoking their
+ destructors. (If you don't do something like this, then ASRaise will bypass
+ the destructor, causing memory leaks and other problems.) The basic scheme
+ is that each class uses the RAISEAWARE macro, has a constructor that declares
+ a RaiseAwareConstructor, whose sole purpose is to push an exception frame
+ when the constructor finishes, and has a destructor that declares a
+ RaiseAwareDestructor, whose sole purpose is to pop the frame when the
+ destructor begins. This happens only for stack-based objects.
+
+ This mechanism is used only for stack objects. The check is done within
+ the class. This is because the push/pop exception frame calls need to
+ match and that would not happen in case of heap objects.
+
+ If there are two classes A & B then the following stack scenario would
+ break this mechanism too. A a(B b). Where b is sent as a stack object to
+ A's constructor. This needs to be avoided.
+
+ The RaiseAware classes should implement their own copy constructor
+ and assignment operator and not use the default as it could result in a crash.
+
+ In a class hierarchy, each class needs to be a RAISEAWARE class. Having
+ the base class as a RAISEAWARE class with a virtual destructor and all
+ its derived classes being non RAISEAWARE does not work. This is because
+ when there is a RAISE the base class destructor would be called but none
+ of its derived classes.
+
+ Example:
+
+ RAISEAWARECLASS( MyClass )
+ class MyClass
+ {
+ RAISEAWARE (MyClass)
+ ...
+ MyClass ()
+ {
+ CTOR; // macro for creating a RaiseAwareConstructor
+ ... the real constructor stuff ...
+ }
+ ~MyClass ()
+ {
+ DTOR; // macro for creating a RaiseAwareDestructor
+ ... the real destructor stuff ...
+ }
+ };
+*/
+
+#if DO_ADDITIONAL_RAISEAWARE_CHECKS
+
+#define RAISEAWARECLASS( className ) class className; \
+ template <> \
+ struct IsRaiseAwareClass< className > \
+ { \
+ typedef int Raise_Aware_Classes_Must_Use_The_Macro_RAISEAWARECLASS; \
+ };
+
+#else
+
+#define RAISEAWARECLASS(X)
+
+#endif
+
+/****************************************************************************/
+/* This class provides for utility classes that are used by both CTOR and DTOR */
+class _ra_utils
+{
+public:
+ /* This is a platform-specific (compiler-specific) routine that tests whether v
+ has been allocated on the stack. */
+ static ASBool onStack (void* v)
+ {
+#if MAC_PLATFORM
+ int x, *y=&x;
+ return (ASBool)((v < (y+4000)) && (v > (y-4000)));
+#elif UNIX_PLATFORM
+ // Doing this inline causes problems with some compiler
+ // optimizations (see bug #1278558)
+ // defined in ACExcept.cpp
+ return ::onStack(v);
+#elif WIN_PLATFORM
+ // This is called for cases where the compiler on Windows is not MSVC
+ register signed long delta = (unsigned long)v - (unsigned long)&v;
+ return delta > 0 && delta < 0x00010000;
+#endif
+ }
+};
+
+/* This class pushes an exception frame on the stack */
+class _ra_ctor
+{
+ void* m_obj;
+ ACRestoreEnvironProc m_handler;
+ ASBool& m_bThrowHandler;
+
+public:
+ _ra_ctor (void* obj, ASBool& bFrameHasBeenPopped, ASBool& bThrowHandler, ACRestoreEnvironProc handler)
+ : m_obj(obj), m_bThrowHandler(bThrowHandler), m_handler(handler)
+ {
+ bFrameHasBeenPopped = false;
+#if (EXCHANGE || READER || TOOLKIT)
+ // TODO: Need to export this API so that it can be accessible thru plugins
+ m_bThrowHandler = (ACGetTopExceptionHandlerType() == kASEHTThrowHandler);
+#else
+ m_bThrowHandler = false;
+#endif
+ };
+ ~_ra_ctor()
+ {
+ if ((_ra_utils::onStack(m_obj) == true) && (!m_bThrowHandler))
+ {
+ ACPushExceptionFrame(m_obj, m_handler);
+ }
+ }
+};
+
+/* This class pops the exception frame from the stack */
+class _ra_dtor
+{
+public:
+ _ra_dtor(void* obj, ASBool& bFrameHasBeenPopped, ASBool bThrowHandler)
+ {
+ if ((!bFrameHasBeenPopped) && (_ra_utils::onStack(obj) == true) && (!bThrowHandler))
+ {
+ /* Prevent that from happening twice. (This could happen if the */ \
+ /* derived object's destructor calls Raise.) */ \
+ bFrameHasBeenPopped = true;
+ ACPopExceptionFrame();
+ }
+ }
+};
+
+#if DO_ADDITIONAL_RAISEAWARE_CHECKS \
+
+#define CTOR \
+ _ra_ctor _ra_ctor_instance(this, _ra_bFrameHasBeenPopped, _ra_bThrowHandler, _ra_handleRaise); \
+ IsRaiseAwareClassHelperFunction( this ); \
+
+#else
+
+#define CTOR \
+ _ra_ctor _ra_ctor_instance(this, _ra_bFrameHasBeenPopped, _ra_bThrowHandler, _ra_handleRaise);
+
+#endif
+
+
+#define DTOR \
+ _ra_dtor _ra_dtor_instance(this, _ra_bFrameHasBeenPopped, _ra_bThrowHandler)
+
+
+/* This macro makes the copy constructor private as the classes that
+ are RAISEAWARE should not use the default copy constructor. In
+ case the class needs a copy constructor it should have an explicit
+ one and then use the macro RAISEAWARE_WITH_COPY_CONSTRUCTOR instead
+*/
+#define RAISEAWARE(tagX) \
+private: \
+ tagX(const tagX& rhs); \
+ RAISEAWARE_WITH_COPY_CONSTRUCTOR(tagX)
+
+/* This macro assumes that the class has an explicit copy constructor
+ and does not use the default copy constructor. Using this macro
+ without an explicit copy constructor will result in a crash
+*/
+#define RAISEAWARE_WITH_COPY_CONSTRUCTOR(tagX) \
+public: \
+ ASBool _ra_bFrameHasBeenPopped; \
+ ASBool _ra_bThrowHandler;\
+private: \
+ static ACCB1 void ACCB2 _ra_handleRaise(void *vThis) \
+{ \
+ /* Someone called ASRaise. */ \
+ tagX* self = (tagX*) vThis; \
+ /* Save the error. */ \
+ ASInt32 err = ACGetExceptionErrorCode (); \
+ /* Prevent that from happening twice. (This could happen if the */ \
+ /* derived object's destructor calls Raise.) */ \
+ self->_ra_bFrameHasBeenPopped = true; \
+ /* Pop the exception frame. */ \
+ ACPopExceptionFrame (); \
+ /* Invoke the destructor. */ \
+ self->tagX::~tagX (); \
+ /* Reraise the error. */ \
+ ASRaise (err); \
+}
+
+/* This macro makes the copy constructor private as the structs that
+ are RAISEAWARE should not use the default copy constructor. In
+ case the struct needs a copy constructor it should have an explicit
+ one and then use the macro RAISEAWARE_STRUCT_WITH_COPY_CONSTRUCTOR
+ instead
+*/
+#define RAISEAWARE_STRUCT(tagX) \
+private: \
+ tagX(const tagX& rhs); \
+ RAISEAWARE_STRUCT_WITH_COPY_CONSTRUCTOR(tagX)
+
+/* This macro assumes that the struct has an explicit copy constructor
+ and does not use the default copy constructor. Using this macro without
+ an explicit copy constructor will result in a crash
+*/
+#define RAISEAWARE_STRUCT_WITH_COPY_CONSTRUCTOR(tagX) \
+public: \
+ ASBool _ra_bFrameHasBeenPopped; \
+ ASBool _ra_bThrowHandler;\
+private: \
+ static ACCB1 void ACCB2 _ra_handleRaise(void *vThis) \
+{ \
+ /* Someone called ASRaise. */ \
+ tagX* self = (tagX*) vThis; \
+ /* Save the error. */ \
+ ASInt32 err = ACGetExceptionErrorCode (); \
+ /* Prevent that from happening twice. (This could happen if the */ \
+ /* derived object's destructor calls Raise.) */ \
+ self->_ra_bFrameHasBeenPopped = true; \
+ /* Pop the exception frame. */ \
+ ACPopExceptionFrame (); \
+ /* Invoke the destructor. */ \
+ self->tagX::~tagX (); \
+ /* Reraise the error. */ \
+ ASRaise (err); \
+}
+
+#else /* NEEDS_RAISEAWARE */
+
+#define RAISEAWARECLASS(X)
+
+#if defined(AIX_VACPP) || defined(__SUNPRO_CC)
+
+// On AIX, RAISEAWARE(foo); causes complaints about the
+// trailing semi-colon if it is defined to nothing
+#define RAISEAWARE(X) private: \
+void raiseaware_compile_stub() {}\
+
+#define RAISEAWARE_WITH_COPY_CONSTRUCTOR(X) private: \
+void raiseaware_compile_stub() {}\
+
+#define RAISEAWARE_STRUCT(X) private: \
+void raiseaware_compile_stub() {}\
+
+#define RAISEAWARE_STRUCT_WITH_COPY_CONSTRUCTOR(X) private: \
+void raiseaware_compile_stub() {}\
+
+#else /* AIX_VACPP || __SUNPRO_CC */
+
+#define RAISEAWARE(X)
+#define RAISEAWARE_WITH_COPY_CONSTRUCTOR(X)
+#define RAISEAWARE_STRUCT(X)
+#define RAISEAWARE_STRUCT_WITH_COPY_CONSTRUCTOR(X)
+
+#endif /* AIX_VACPP || __SUNPRO_CC */
+
+
+#define CTOR
+#define DTOR
+
+#endif /* NEEDS_RAISEAWARE */
+
+/****************************************************************************/
+
+#endif /* defined (__cplusplus) */
+
+/* ======================================================================= */
+
+#endif /* _H_ASRAISEAWARE */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCalls.h
new file mode 100644
index 0000000..3401e87
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCalls.h
@@ -0,0 +1,1628 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AVCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. Better is to use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions so if
+ you require ~HFT_VERSION_4 your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, etc.
+
+ You can support old versions, yet still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK this will be
+ set to the actual version of the HFT returned to you (For example, you require version 4,
+ you are returned version 7 which is compatible; g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ ACROASSERT(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example this file would be called "~Calls.h")
+
+ Most importantly, routines that have been released can never be deleted or changed.
+ If you want to make a new version create a new call, add to the end of this file and
+ increment the _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, you should change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example the last release of Acrobat was version 20. Version 21
+ is under development. You add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in our example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, etc.) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ alone.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version
+ >= LAST_BETA_COMPATIBLE_VERSION and <= HFT_LATEST_VERSION.
+ By incrementing the version number you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words in makes sure both sides are in sync.
+
+ Again, whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or similar milestone, change the _~_IS_BETA flag to 0, jump
+ The _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in our example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in our example).
+
+*********************************************************************/
+
+#ifndef _H_AVCalls
+#define _H_AVCalls
+
+#if PLUGIN
+#include "acroassert.h"
+#endif
+
+#include "AVVers.h" /* contains the version numbers for this file */
+
+#ifndef CAN_EDIT
+#define CAN_EDIT 1 /*assume we can edit */
+#endif
+#include "AVExpT.h"
+#include "acroassert.h"
+
+//#if CAN_EDIT
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PLUGIN
+#include "NSelExpT.h"
+#endif
+
+#define EXTERNAL_AVPROCS_USER 1 /* External user of AVProcs.h header file */
+
+#define HAS_MENUBAR 1
+#define HAS_FULL_SCREEN 1
+#define HAS_MENUS 1
+#define CAN_SELECT_GRAPHICS 1
+
+#if !PLUGIN
+
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define SPROC(returnType, name, params, stubProc) \
+ extern ACEX1 returnType ACEX2 stubProc params;
+
+ #define ANPROC NPROC
+ #define PROC NPROC
+ #define NOPROC(name)
+ #define UPROC PROC
+ #define UNPROC NPROC
+ #define USPROC SPROC
+#if CAN_EDIT
+ #define XNPROC NPROC
+ #define XPROC NPROC
+ #define XSPROC NPROC
+#else
+ #define XNPROC NOPROC
+ #define XPROC NOPROC
+ #define XSPROC NOPROC
+#endif
+
+ #include "AVProcs.h"
+
+ #undef NPROC
+ #undef ANPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XNPROC
+ #undef XPROC
+ #undef XSPROC
+ #undef UPROC
+ #undef UNPROC
+ #undef USPROC
+
+ /* These functions have a different name internally */
+ #define AVAppEnumActionHandlers AVAppEnumSupportedActions
+ #define AVAppRegisterNotification AVExtensionMgrRegisterNotification
+ #define AVAppUnregisterNotification AVExtensionMgrUnregisterNotification
+ #define AVPageViewGoBack AVPageViewDoGoBack
+ #define AVPageViewGoForward AVPageViewDoGoForward
+ #define oldAVAppRegisterForPageViewDrawing oldAVPageViewRegisterForDrawing
+ #define AVAppUnregisterForPageViewDrawing AVPageViewUnregisterForDrawing
+ #define oldAVAppRegisterForPageViewClicks oldAVPageViewRegisterForClicks
+ #define AVAppUnregisterForPageViewClicks AVPageViewUnregisterForClicks
+ #define oldAVAppRegisterForPageViewAdjustCursor oldAVPageViewRegisterForAdjustCursor
+ #define AVAppUnregisterForPageViewAdjustCursor AVPageViewUnregisterForAdjustCursor
+ #define AVPageViewAcquireMachinePort AVPageViewGetMachinePort
+ #define AVPageViewReleaseMachinePort AVPageViewFreeMachinePort
+ #define oldAVPageViewPointToDevice oldAVPagePointToDevice
+ #define oldAVPageViewDevicePointToPage oldAVPageDevicePointToPage
+ #define oldAVPageViewRectToDevice oldAVPageRectToDevice
+ #define oldAVPageViewDeviceRectToPage oldAVPageDeviceRectToPage
+ #define oldAVPageViewTrackText oldAVPageViewTrackTextHost
+ #define AVToolButtonSetExternal AVToolButtonSetLocation
+ #define oldAVDocSetViewDef oldAVDocUseViewDef
+ #define oldAVPageViewDeviceRectToPageRZ oldAVPageDeviceRectToPageRZ
+ #define oldAVPageViewSnapRect oldAVPageViewGridSnapRect
+ #define AVAppRegisterForPageViewAdjustCursor AVPageViewRegisterForAdjustCursor
+ #define AVAppRegisterForPageViewClicks AVPageViewRegisterForClicks
+ #define AVAppRegisterForPageViewDrawing AVPageViewRegisterForDrawing
+ #define AVDocSetViewDef AVDocUseViewDef
+ #define AVPageViewRectToDevice AVPageRectToDevice
+ #define AVPageViewDeviceRectToPage AVPageDeviceRectToPage
+ #define AVPageViewDevicePointToPage AVPageDevicePointToPage
+ #define AVPageViewTrackText AVPageViewTrackTextHost
+ #define AVPageViewDeviceRectToPageRZ AVPageDeviceRectToPageRZ
+ #define AVPageViewSnapRect AVPageViewGridSnapRect
+ #define AVPageViewPointToDevice AVPagePointToDevice
+ #define AVDocSetViewDefEx AVDocUseViewDefEx
+ #define AVAppRegisterForPageViewRightClicks AVPageViewRegisterForRightClicks
+ #define AVAppUnregisterForPageViewRightClicks AVPageViewUnregisterForRightClicks
+ #define AVAppUnregisterForPageViewDrawingEx AVPageViewUnregisterForDrawingEx
+
+#endif /* !PLUGIN */
+
+#if PLUGIN
+
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define SPROC(returnType, name, params, stubProc) \
+ name##SEL,
+ #define NOPROC(name) \
+ name##SEL,
+ #define PROC NPROC
+ #define ANPROC NPROC
+ #define XNPROC NPROC
+ #define XPROC NPROC
+ #define XSPROC SPROC
+ #define UPROC NPROC
+ #define UNPROC NPROC
+ #define USPROC SPROC
+
+ enum {
+ AVBAD_SELECTOR,
+ #include "AVProcs.h"
+ AVNUMSELECTORSplusOne
+ };
+
+ #define AVNUMSELECTORS (AVNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef ANPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XNPROC
+ #undef XPROC
+ #undef XSPROC
+ #undef UPROC
+ #undef UNPROC
+ #undef USPROC
+
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define SPROC(returnType, name, params, stubProc) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define PROC NPROC
+ #define ANPROC NPROC
+#if READER_PLUGIN
+ /* Force an error for Exchange procs */
+ #define XNPROC(returnType, name, params)
+ #define XPROC(returnType, name, params)
+ #define XSPROC(returnType, name, params, stubProc)
+ #define UPROC(returnType, name, params)
+ #define UNPROC(returnType, name, params)
+ #define USPROC(returnType, name, params, stubProc)
+#else
+ #define XNPROC NPROC
+ #define XPROC NPROC
+ #define XSPROC SPROC
+ #define UPROC NPROC
+ #define UNPROC NPROC
+ #define USPROC SPROC
+#endif
+ #define NOPROC(name)
+
+ #include "AVProcs.h"
+
+ #undef NPROC
+ #undef ANPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XNPROC
+ #undef XPROC
+ #undef XSPROC
+ #undef UPROC
+ #undef UNPROC
+ #undef USPROC
+
+#if PI_ACROVIEW_VERSION != 0
+
+extern HFT gAcroViewHFT;
+extern ASVersion gAcroViewVersion;
+
+/* declare a routine name to require version >= level. Routine is indexed from HFT */
+#define AVROUTINE(level, name) (ACROASSERT(gAcroViewVersion >=level), *((name##SELPROTO)(gAcroViewHFT[name##SEL])))
+
+#if !STATIC_HFT
+
+/* check SDK level. If user is using OLD SDK map calls to old routines. If user is supporting old and new calls
+ use AVCOMPAT_ROUTINE to check current level and call new routine, or call compatstub to use old routine.
+ If user is only using current routines, map calls to current routines
+ Note that this macro makes use of the assumption that the old routine will be renamed to "oldroutine". A new
+ macro will have to be constructed to handle 3 level routines and a maybe call the next oldest "old2routine" or
+ something. */
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)
+/* caller only knows about old routine, and uses old calling convention. Map name to "old" routine and call directly */
+/* multiaware routines still only have one HFT entry, but need special code when supporting multiple versions */
+/* this special code is located in the AVCompat.cpp file */
+#define DECLARE_MULTIAVROUTINE(oldlev, newlev, name) AVROUTINE(oldlev, old##name)
+#define DECLARE_MULTIAWAREAVROUTINE(oldlev, newlev, name) AVROUTINE(oldlev, name)
+
+#elif defined(PI_ACROVIEW_VERSION) && (PI_ACROVIEW_VERSION < AcroViewHFT_VERSION_6)
+
+/* declare a routine name that has an older version, the first version (oldest) calls nameCompatStub, the second (new) calls directly to the HFT */
+#define AVCOMPAT_ROUTINE(first, second, name) (ACROASSERT(gAcroViewVersion >=first), \
+ gAcroViewVersion >=second? AVROUTINE(second, name) :name##CompatStub)
+#include "AVCompat.h"
+#define DECLARE_MULTIAVROUTINE(oldlev, newlev, name) AVCOMPAT_ROUTINE(oldlev, newlev, name)
+#define DECLARE_MULTIAWAREAVROUTINE DECLARE_MULTIAVROUTINE
+
+#else /*(PI_ACROVIEW_VERSION >= AcroViewHFT_VERSION_6)*/
+
+/* support only new calling convention, no support for older AV routines */
+#define DECLARE_MULTIAVROUTINE(oldlev, newlev, name) AVROUTINE(newlev, name)
+#define DECLARE_MULTIAWAREAVROUTINE DECLARE_MULTIAVROUTINE
+
+#endif /*(PI_ACROVIEW_VERSION >= AcroViewHFT_VERSION_6)*/
+
+/* AVActionHandlerGetType */
+#define AVActionHandlerGetType AVROUTINE(AcroViewHFT_VERSION_2, AVActionHandlerGetType)
+
+/* AVActionHandlerGetUIName */
+#define AVActionHandlerGetUIName AVROUTINE(AcroViewHFT_VERSION_2, AVActionHandlerGetUIName)
+
+/* AVActionHandlerGetProcs */
+#define AVActionHandlerGetProcs AVROUTINE(AcroViewHFT_VERSION_2, AVActionHandlerGetProcs)
+
+/* AVAlert */
+#define AVAlert AVROUTINE(AcroViewHFT_VERSION_2, AVAlert)
+
+/* AVAlertNote */
+#define AVAlertNote AVROUTINE(AcroViewHFT_VERSION_2, AVAlertNote)
+
+/* AVAlertConfirm */
+#define AVAlertConfirm AVROUTINE(AcroViewHFT_VERSION_2, AVAlertConfirm)
+
+/* AVAppGetVersion */
+#define AVAppGetVersion AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetVersion)
+
+/* AVAppGetLanguage */
+#define AVAppGetLanguage AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetLanguage)
+
+/* AVAppGetName */
+#define AVAppGetName AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetName)
+
+/* AVAppGetCancelProc */
+#define AVAppGetCancelProc AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetCancelProc)
+
+/* AVAppCanQuit */
+#define AVAppCanQuit AVROUTINE(AcroViewHFT_VERSION_2, AVAppCanQuit)
+
+/* AVAppGetActiveDoc */
+#define AVAppGetActiveDoc AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetActiveDoc)
+
+/* AVAppGetNumDocs */
+#define AVAppGetNumDocs AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetNumDocs)
+
+/* AVAppEnumDocs */
+#define AVAppEnumDocs AVROUTINE(AcroViewHFT_VERSION_2, AVAppEnumDocs)
+
+/* AVAppGetDocProgressMonitor */
+#define AVAppGetDocProgressMonitor AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetDocProgressMonitor)
+
+/* AVAppGetMenubar */
+#define AVAppGetMenubar AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetMenubar)
+
+/* AVAppGetToolBar */
+#define AVAppGetToolBar AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetToolBar)
+
+/* AVAppGetActiveTool */
+#define AVAppGetActiveTool AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetActiveTool)
+
+/* AVAppGetLastActiveTool */
+#define AVAppGetLastActiveTool AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetLastActiveTool)
+
+/* AVAppGetDefaultTool */
+#define AVAppGetDefaultTool AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetDefaultTool)
+
+/* AVAppSetActiveTool */
+#define AVAppSetActiveTool AVROUTINE(AcroViewHFT_VERSION_2, AVAppSetActiveTool)
+
+/* AVAppGetToolByName */
+#define AVAppGetToolByName AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetToolByName)
+
+/* AVAppEnumTools */
+#define AVAppEnumTools AVROUTINE(AcroViewHFT_VERSION_2, AVAppEnumTools)
+
+/* AVAppRegisterTool */
+#define AVAppRegisterTool DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVAppRegisterTool)
+
+/* AVAppGetAnnotHandlerByName */
+#define AVAppGetAnnotHandlerByName AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetAnnotHandlerByName)
+
+/* AVAppEnumAnnotHandlers */
+#define AVAppEnumAnnotHandlers AVROUTINE(AcroViewHFT_VERSION_2, AVAppEnumAnnotHandlers)
+
+/* AVAppRegisterAnnotHandler */
+#define AVAppRegisterAnnotHandler DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVAppRegisterAnnotHandler)
+
+/* AVAppGetActionHandlerByType */
+#define AVAppGetActionHandlerByType AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetActionHandlerByType)
+
+/* AVAppEnumActionHandlers */
+#define AVAppEnumActionHandlers AVROUTINE(AcroViewHFT_VERSION_2, AVAppEnumActionHandlers)
+
+/* AVAppRegisterActionHandler */
+#define AVAppRegisterActionHandler AVROUTINE(AcroViewHFT_VERSION_2, AVAppRegisterActionHandler)
+
+/* AVAppGetPreference */
+#define AVAppGetPreference AVROUTINE(AcroViewHFT_VERSION_2, AVAppGetPreference)
+
+/* AVAppSetPreference */
+#define AVAppSetPreference AVROUTINE(AcroViewHFT_VERSION_2, AVAppSetPreference)
+
+/* AVAppBeginFullScreen */
+#define AVAppBeginFullScreen AVROUTINE(AcroViewHFT_VERSION_2, AVAppBeginFullScreen)
+
+/* AVAppEndFullScreen */
+#define AVAppEndFullScreen AVROUTINE(AcroViewHFT_VERSION_2, AVAppEndFullScreen)
+
+/* AVAppDoingFullScreen */
+#define AVAppDoingFullScreen AVROUTINE(AcroViewHFT_VERSION_2, AVAppDoingFullScreen)
+
+/* AVAppBeginModal */
+#define AVAppBeginModal AVROUTINE(AcroViewHFT_VERSION_2, AVAppBeginModal)
+
+/* AVAppModalWindowIsOpen */
+#define AVAppModalWindowIsOpen AVROUTINE(AcroViewHFT_VERSION_2, AVAppModalWindowIsOpen)
+
+/* AVAppEndModal */
+#define AVAppEndModal AVROUTINE(AcroViewHFT_VERSION_2, AVAppEndModal)
+
+/* AVAppRegisterIdleProc */
+#define AVAppRegisterIdleProc AVROUTINE(AcroViewHFT_VERSION_2, AVAppRegisterIdleProc)
+
+/* AVAppUnregisterIdleProc */
+#define AVAppUnregisterIdleProc AVROUTINE(AcroViewHFT_VERSION_2, AVAppUnregisterIdleProc)
+
+/* AVAppRegisterNotification */
+#define AVAppRegisterNotification AVROUTINE(AcroViewHFT_VERSION_2, AVAppRegisterNotification)
+
+/* AVAppUnregisterNotification */
+#define AVAppUnregisterNotification AVROUTINE(AcroViewHFT_VERSION_2, AVAppUnregisterNotification)
+
+/* AVDocOpenFromFile */
+#define AVDocOpenFromFile DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVDocOpenFromFile)
+
+/* AVDocOpenFromFileWithParams */
+#define AVDocOpenFromFileWithParams DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVDocOpenFromFileWithParams)
+
+/* AVDocOpenFromPDDoc */
+#define AVDocOpenFromPDDoc DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVDocOpenFromPDDoc)
+
+/* AVDocOpenFromPDDocWithParams */
+#define AVDocOpenFromPDDocWithParams DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVDocOpenFromPDDocWithParams)
+
+/* AVDocOpenFromFileWithParamString */
+#define AVDocOpenFromFileWithParamString AVROUTINE(AcroViewHFT_VERSION_6, AVDocOpenFromFileWithParamString)
+
+/* AVDocOpenFromPDDocWithParamString */
+#define AVDocOpenFromPDDocWithParamString AVROUTINE(AcroViewHFT_VERSION_6, AVDocOpenFromPDDocWithParamString)
+
+/* AVDocOpenFromASFileWithParamString */
+#define AVDocOpenFromASFileWithParamString AVROUTINE(AcroViewHFT_VERSION_6, AVDocOpenFromASFileWithParamString)
+
+/* AVDocClose */
+#define AVDocClose AVROUTINE(AcroViewHFT_VERSION_2, AVDocClose)
+
+/* AVDocGetPDDoc */
+#define AVDocGetPDDoc AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetPDDoc)
+
+/* AVDocGetPageView */
+#define AVDocGetPageView AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetPageView)
+
+/* AVDocGetAVWindow */
+#define AVDocGetAVWindow AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetAVWindow)
+
+/* AVDocGetViewMode */
+#define AVDocGetViewMode AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetViewMode)
+
+/* AVDocSetViewMode */
+#define AVDocSetViewMode AVROUTINE(AcroViewHFT_VERSION_2, AVDocSetViewMode)
+
+/* AVDocGetSplitterPosition */
+#define AVDocGetSplitterPosition AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetSplitterPosition)
+
+/* AVDocSetSplitterPosition */
+#define AVDocSetSplitterPosition AVROUTINE(AcroViewHFT_VERSION_2, AVDocSetSplitterPosition)
+
+/* AVDocPrintPages */
+#define AVDocPrintPages AVROUTINE(AcroViewHFT_VERSION_2, AVDocPrintPages)
+
+/* AVDocGetSelectionType */
+#define AVDocGetSelectionType AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetSelectionType)
+
+/* AVDocGetSelection */
+#define AVDocGetSelection AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetSelection)
+
+/* AVDocSetSelection */
+#define AVDocSetSelection AVROUTINE(AcroViewHFT_VERSION_2, AVDocSetSelection)
+
+/* AVDocDeleteSelection */
+#define AVDocDeleteSelection AVROUTINE(AcroViewHFT_VERSION_2, AVDocDeleteSelection)
+
+/* AVDocClearSelection */
+#define AVDocClearSelection AVROUTINE(AcroViewHFT_VERSION_2, AVDocClearSelection)
+
+/* AVDocCopySelection */
+#define AVDocCopySelection AVROUTINE(AcroViewHFT_VERSION_2, AVDocCopySelection)
+
+/* AVDocEnumSelection */
+#define AVDocEnumSelection AVROUTINE(AcroViewHFT_VERSION_2, AVDocEnumSelection)
+
+/* AVDocDoSelectionProperties */
+#define AVDocDoSelectionProperties AVROUTINE(AcroViewHFT_VERSION_2, AVDocDoSelectionProperties)
+
+/* AVDocShowSelection */
+#define AVDocShowSelection AVROUTINE(AcroViewHFT_VERSION_2, AVDocShowSelection)
+
+/* AVDocGetSelectionServerByType */
+#define AVDocGetSelectionServerByType AVROUTINE(AcroViewHFT_VERSION_2, AVDocGetSelectionServerByType)
+
+/* AVDocRegisterSelectionServer */
+#define AVDocRegisterSelectionServer DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVDocRegisterSelectionServer)
+
+/* AVDocPerformAction */
+#define AVDocPerformAction AVROUTINE(AcroViewHFT_VERSION_2, AVDocPerformAction)
+
+/* AVMenubarShow */
+#define AVMenubarShow AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarShow)
+
+/* AVMenubarHide */
+#define AVMenubarHide AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarHide)
+
+/* AVMenubarGetNumMenus */
+#define AVMenubarGetNumMenus AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarGetNumMenus)
+
+/* AVMenubarAcquireMenuByName */
+#define AVMenubarAcquireMenuByName AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarAcquireMenuByName)
+
+/* AVMenubarAcquireMenuByIndex */
+#define AVMenubarAcquireMenuByIndex AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarAcquireMenuByIndex)
+
+/* AVMenubarAcquireMenuByPredicate */
+#define AVMenubarAcquireMenuByPredicate AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarAcquireMenuByPredicate)
+
+/* AVMenubarAcquireMenuItemByName */
+#define AVMenubarAcquireMenuItemByName AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarAcquireMenuItemByName)
+
+/* AVMenubarAcquireMenuItemByPredicate */
+#define AVMenubarAcquireMenuItemByPredicate AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarAcquireMenuItemByPredicate)
+
+/* AVMenubarGetMenuIndex */
+#define AVMenubarGetMenuIndex AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarGetMenuIndex)
+
+/* AVMenubarAddMenu */
+#define AVMenubarAddMenu AVROUTINE(AcroViewHFT_VERSION_2, AVMenubarAddMenu)
+
+/* AVMenuNew */
+#define AVMenuNew AVROUTINE(AcroViewHFT_VERSION_2, AVMenuNew)
+
+/* AVMenuAcquire */
+#define AVMenuAcquire AVROUTINE(AcroViewHFT_VERSION_2, AVMenuAcquire)
+
+/* AVMenuRelease */
+#define AVMenuRelease AVROUTINE(AcroViewHFT_VERSION_2, AVMenuRelease)
+
+/* AVMenuRemove */
+#define AVMenuRemove AVROUTINE(AcroViewHFT_VERSION_2, AVMenuRemove)
+
+/* AVMenuGetName */
+#define AVMenuGetName AVROUTINE(AcroViewHFT_VERSION_2, AVMenuGetName)
+
+/* AVMenuGetTitle */
+#define AVMenuGetTitle AVROUTINE(AcroViewHFT_VERSION_2, AVMenuGetTitle)
+
+
+/* AVMenuGetNumMenuItems */
+#define AVMenuGetNumMenuItems AVROUTINE(AcroViewHFT_VERSION_2, AVMenuGetNumMenuItems)
+
+/* AVMenuAcquireMenuItemByIndex */
+#define AVMenuAcquireMenuItemByIndex AVROUTINE(AcroViewHFT_VERSION_2, AVMenuAcquireMenuItemByIndex)
+
+/* AVMenuGetMenuItemIndex */
+#define AVMenuGetMenuItemIndex AVROUTINE(AcroViewHFT_VERSION_2, AVMenuGetMenuItemIndex)
+
+/* AVMenuGetParentMenubar */
+#define AVMenuGetParentMenubar AVROUTINE(AcroViewHFT_VERSION_2, AVMenuGetParentMenubar)
+
+/* AVMenuGetParentMenuItem */
+#define AVMenuGetParentMenuItem AVROUTINE(AcroViewHFT_VERSION_2, AVMenuGetParentMenuItem)
+
+/* AVMenuAddMenuItem */
+#define AVMenuAddMenuItem AVROUTINE(AcroViewHFT_VERSION_2, AVMenuAddMenuItem)
+
+/* AVMenuItemNew */
+#define AVMenuItemNew AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemNew)
+
+/* AVMenuItemAcquire */
+#define AVMenuItemAcquire AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemAcquire)
+
+/* AVMenuItemRelease */
+#define AVMenuItemRelease AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemRelease)
+
+/* AVMenuItemRemove */
+#define AVMenuItemRemove AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemRemove)
+
+/* AVMenuItemGetName */
+#define AVMenuItemGetName AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemGetName)
+
+/* AVMenuItemGetTitle */
+#define AVMenuItemGetTitle AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemGetTitle)
+
+/* AVMenuItemSetTitle */
+#define AVMenuItemSetTitle AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemSetTitle)
+
+/* AVMenuItemGetShortcut */
+#define AVMenuItemGetShortcut AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemGetShortcut)
+
+/* AVMenuItemGetLongOnly */
+#define AVMenuItemGetLongOnly AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemGetLongOnly)
+
+/* AVMenuItemSetExecuteProc */
+#define AVMenuItemSetExecuteProc AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemSetExecuteProc)
+
+/* AVMenuItemSetComputeEnabledProc */
+#define AVMenuItemSetComputeEnabledProc AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemSetComputeEnabledProc)
+
+/* AVMenuItemSetComputeMarkedProc */
+#define AVMenuItemSetComputeMarkedProc AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemSetComputeMarkedProc)
+
+/* AVMenuItemAcquireSubmenu */
+#define AVMenuItemAcquireSubmenu AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemAcquireSubmenu)
+
+/* AVMenuItemIsEnabled */
+#define AVMenuItemIsEnabled AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemIsEnabled)
+
+/* AVMenuItemIsMarked */
+#define AVMenuItemIsMarked AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemIsMarked)
+
+/* AVMenuItemExecute */
+#define AVMenuItemExecute AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemExecute)
+
+/* AVMenuItemGetParentMenu */
+#define AVMenuItemGetParentMenu AVROUTINE(AcroViewHFT_VERSION_2, AVMenuItemGetParentMenu)
+
+/* AVPageViewGetAVDoc */
+#define AVPageViewGetAVDoc AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetAVDoc)
+
+/* AVPageViewGetAperture */
+#define AVPageViewGetAperture DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewGetAperture)
+
+/* AVPageViewGetPage */
+#define AVPageViewGetPage AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetPage)
+
+/* AVPageViewGetZoom */
+#define AVPageViewGetZoom AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetZoom)
+
+/* AVPageViewGetZoomType */
+#define AVPageViewGetZoomType AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetZoomType)
+
+/* AVPageViewGetPageNum */
+#define AVPageViewGetPageNum AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetPageNum)
+
+/* AVPageViewGetColor */
+#define AVPageViewGetColor AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetColor)
+
+/* AVPageViewSetColor */
+#define AVPageViewSetColor AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewSetColor)
+
+/* AVPageViewBeginOperation */
+#define AVPageViewBeginOperation AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewBeginOperation)
+
+/* AVPageViewEndOperation */
+#define AVPageViewEndOperation AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewEndOperation)
+
+/* AVPageViewGoTo */
+#define AVPageViewGoTo AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGoTo)
+
+/* AVPageViewZoomTo */
+#define AVPageViewZoomTo AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewZoomTo)
+
+/* AVPageViewScrollTo */
+#define AVPageViewScrollTo DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewScrollTo)
+
+/* AVPageViewScrollToRect */
+#define AVPageViewScrollToRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewScrollToRect)
+
+/* AVPageViewReadPageUp */
+#define AVPageViewReadPageUp AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewReadPageUp)
+
+/* AVPageViewReadPageDown */
+#define AVPageViewReadPageDown AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewReadPageDown)
+
+/* AVPageViewGoBack */
+#define AVPageViewGoBack AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGoBack)
+
+/* AVPageViewGoForward */
+#define AVPageViewGoForward AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGoForward)
+
+/* AVPageViewToViewDest */
+#define AVPageViewToViewDest AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewToViewDest)
+
+/* AVPageViewInvalidateRect */
+#define AVPageViewInvalidateRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewInvalidateRect)
+
+/* AVPageViewDrawNow */
+#define AVPageViewDrawNow AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewDrawNow)
+
+/* AVPageViewInvertRect */
+#define AVPageViewInvertRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewInvertRect)
+
+/* AVPageViewInvertRectOutline */
+#define AVPageViewInvertRectOutline AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewInvertRectOutline)
+
+/* AVPageViewDrawRectOutline */
+#define AVPageViewDrawRectOutline DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewDrawRectOutline)
+
+/* AVPageViewDrawRect */
+#define AVPageViewDrawRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewDrawRect)
+
+/* AVPageViewGetMousePosition */
+#define AVPageViewGetMousePosition DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewGetMousePosition)
+
+/* AVPageViewDragOutNewRect */
+#define AVPageViewDragOutNewRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewDragOutNewRect)
+
+/* AVPageViewDragRect */
+#define AVPageViewDragRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewDragRect)
+
+/* AVAppRegisterForPageViewDrawing */
+#define AVAppRegisterForPageViewDrawing DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVAppRegisterForPageViewDrawing)
+
+/* AVAppUnregisterForPageViewDrawing */
+/* note: still only uses one HFT entry, but compat layer needs to be notified about unregister before version 6*/
+#define AVAppUnregisterForPageViewDrawing DECLARE_MULTIAWAREAVROUTINE(AcroViewHFT_VERSION_2,AcroViewHFT_VERSION_6, AVAppUnregisterForPageViewDrawing)
+
+/* AVAppUnregisterForPageViewDrawingEx */
+#define AVAppUnregisterForPageViewDrawingEx AVROUTINE(AcroViewHFT_VERSION_6, AVAppUnregisterForPageViewDrawingEx)
+
+/* AVAppRegisterForPageViewClicks */
+#define AVAppRegisterForPageViewClicks DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVAppRegisterForPageViewClicks)
+
+/* AVAppUnregisterForPageViewClicks */
+/* note: still only uses one HFT entry, but compat layer needs to be notified about unregister before version 6*/
+#define AVAppUnregisterForPageViewClicks DECLARE_MULTIAWAREAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVAppUnregisterForPageViewClicks)
+
+/* AVAppRegisterForPageViewAdjustCursor */
+#define AVAppRegisterForPageViewAdjustCursor DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVAppRegisterForPageViewAdjustCursor)
+
+/* AVAppUnregisterForPageViewAdjustCursor */
+/* note: still only uses one HFT entry, but compat layer needs to be notified about unregister before version 6*/
+#define AVAppUnregisterForPageViewAdjustCursor DECLARE_MULTIAWAREAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVAppUnregisterForPageViewAdjustCursor)
+
+/* AVPageViewIsAnnotAtPoint */
+#define AVPageViewIsAnnotAtPoint DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewIsAnnotAtPoint)
+
+/* AVPageViewGetAnnotRect */
+#define AVPageViewGetAnnotRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewGetAnnotRect)
+
+/* AVPageViewSetAnnotLocation */
+#define AVPageViewSetAnnotLocation DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewSetAnnotLocation)
+
+/* AVPageViewStartReadingThread */
+#define AVPageViewStartReadingThread AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewStartReadingThread)
+
+/* AVPageViewGetThreadIndex */
+#define AVPageViewGetThreadIndex AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetThreadIndex)
+
+/* AVPageViewGetActiveBead */
+#define AVPageViewGetActiveBead AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetActiveBead)
+
+/* AVPageViewIsBeadAtPoint */
+#define AVPageViewIsBeadAtPoint DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewIsBeadAtPoint)
+
+/* AVPageViewAcquireMachinePort */
+#define AVPageViewAcquireMachinePort AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewAcquireMachinePort)
+
+/* AVPageViewReleaseMachinePort */
+#define AVPageViewReleaseMachinePort AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewReleaseMachinePort)
+
+/* AVPageViewGetPageToDevMatrix */
+#define AVPageViewGetPageToDevMatrix AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetPageToDevMatrix)
+
+/* AVPageViewGetDevToPageMatrix */
+#define AVPageViewGetDevToPageMatrix AVROUTINE(AcroViewHFT_VERSION_2, AVPageViewGetDevToPageMatrix)
+
+/* AVPageViewPointToDevice */
+#define AVPageViewPointToDevice DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewPointToDevice)
+
+/* AVPageViewDevicePointToPage */
+#define AVPageViewDevicePointToPage DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewDevicePointToPage)
+
+/* AVPageViewRectToDevice */
+#define AVPageViewRectToDevice DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewRectToDevice)
+
+/* AVPageViewDeviceRectToPage */
+#define AVPageViewDeviceRectToPage DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVPageViewDeviceRectToPage)
+
+/* AVSysGetModifiers */
+#define AVSysGetModifiers AVROUTINE(AcroViewHFT_VERSION_2, AVSysGetModifiers)
+
+/* AVSysMouseIsStillDown */
+#define AVSysMouseIsStillDown AVROUTINE(AcroViewHFT_VERSION_2, AVSysMouseIsStillDown)
+
+/* AVSysBeep */
+#define AVSysBeep AVROUTINE(AcroViewHFT_VERSION_2, AVSysBeep)
+
+/* AVSysGetStandardCursor */
+#define AVSysGetStandardCursor AVROUTINE(AcroViewHFT_VERSION_2, AVSysGetStandardCursor)
+
+/* AVSysSetCursor */
+#define AVSysSetCursor AVROUTINE(AcroViewHFT_VERSION_2, AVSysSetCursor)
+
+/* AVSysGetCursor */
+#define AVSysGetCursor AVROUTINE(AcroViewHFT_VERSION_2, AVSysGetCursor)
+
+/* AVToolBarGetFrame (obsolete) */
+#define AVToolBarGetFrame AVROUTINE(AcroViewHFT_VERSION_2, oldAVToolBarGetFrame)
+
+/* AVToolBarGetButtonByName */
+#define AVToolBarGetButtonByName AVROUTINE(AcroViewHFT_VERSION_2, AVToolBarGetButtonByName)
+
+/* AVToolBarEnumButtons */
+#define AVToolBarEnumButtons AVROUTINE(AcroViewHFT_VERSION_2, AVToolBarEnumButtons)
+
+/* AVToolBarAddButton */
+#define AVToolBarAddButton AVROUTINE(AcroViewHFT_VERSION_2, AVToolBarAddButton)
+
+/* AVToolBarGetNumButtons */
+#define AVToolBarGetNumButtons AVROUTINE(AcroViewHFT_VERSION_2, AVToolBarGetNumButtons)
+
+/* AVToolBarIsRoomFor */
+#define AVToolBarIsRoomFor AVROUTINE(AcroViewHFT_VERSION_2, AVToolBarIsRoomFor)
+
+/* AVToolBarUpdateButtonStates */
+#define AVToolBarUpdateButtonStates AVROUTINE(AcroViewHFT_VERSION_2, AVToolBarUpdateButtonStates)
+
+/* AVToolButtonNew */
+#define AVToolButtonNew AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonNew)
+
+/* AVToolButtonDestroy */
+#define AVToolButtonDestroy AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonDestroy)
+
+/* AVToolButtonRemove */
+#define AVToolButtonRemove AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonRemove)
+
+/* AVToolButtonIsSeparator */
+#define AVToolButtonIsSeparator AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonIsSeparator)
+
+/* AVToolButtonGetName */
+#define AVToolButtonGetName AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonGetName)
+
+/* */
+#define AVToolButtonExecute AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonExecute)
+
+/* AVToolButtonSetExecuteProc */
+#define AVToolButtonSetExecuteProc AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonSetExecuteProc)
+
+/* AVToolButtonSetComputeEnabledProc */
+#define AVToolButtonSetComputeEnabledProc AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonSetComputeEnabledProc)
+
+/* AVToolButtonSetComputeMarkedProc */
+#define AVToolButtonSetComputeMarkedProc AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonSetComputeMarkedProc)
+
+/* AVToolButtonIsEnabled */
+#define AVToolButtonIsEnabled AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonIsEnabled)
+
+/* AVToolButtonIsMarked */
+#define AVToolButtonIsMarked AVROUTINE(AcroViewHFT_VERSION_2, AVToolButtonIsMarked)
+
+
+/* AVToolGetType */
+#define AVToolGetType AVROUTINE(AcroViewHFT_VERSION_2, AVToolGetType)
+
+/* AVToolIsPersistent */
+#define AVToolIsPersistent AVROUTINE(AcroViewHFT_VERSION_2, AVToolIsPersistent)
+
+/* AVWindowNew */
+#define AVWindowNew DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2,AcroViewHFT_VERSION_6, AVWindowNew)
+
+/* AVWindowNewFromPlatformThing */
+#define AVWindowNewFromPlatformThing DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVWindowNewFromPlatformThing)
+
+/* AVWindowDestroy */
+#define AVWindowDestroy AVROUTINE(AcroViewHFT_VERSION_2, AVWindowDestroy)
+
+/* AVWindowUserClose */
+#define AVWindowUserClose AVROUTINE(AcroViewHFT_VERSION_2, AVWindowUserClose)
+
+/* AVWindowMaximize */
+#define AVWindowMaximize AVROUTINE(AcroViewHFT_VERSION_2, AVWindowMaximize)
+
+/* AVWindowShow */
+#define AVWindowShow AVROUTINE(AcroViewHFT_VERSION_2, AVWindowShow)
+
+/* AVWindowHide */
+#define AVWindowHide AVROUTINE(AcroViewHFT_VERSION_2, AVWindowHide)
+
+/* AVWindowIsVisible */
+#define AVWindowIsVisible AVROUTINE(AcroViewHFT_VERSION_2, AVWindowIsVisible)
+
+/* AVWindowGetPlatformThing */
+#define AVWindowGetPlatformThing AVROUTINE(AcroViewHFT_VERSION_2, AVWindowGetPlatformThing)
+
+/* AVWindowGetOwnerData */
+#define AVWindowGetOwnerData AVROUTINE(AcroViewHFT_VERSION_2, AVWindowGetOwnerData)
+
+/* AVWindowSetOwnerData */
+#define AVWindowSetOwnerData AVROUTINE(AcroViewHFT_VERSION_2, AVWindowSetOwnerData)
+
+/* AVWindowGetTitle */
+#define AVWindowGetTitle DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVWindowGetTitle)
+
+/* AVWindowSetTitle */
+#define AVWindowSetTitle DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVWindowSetTitle)
+
+/* AVWindowGetFrame */
+#define AVWindowGetFrame DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVWindowGetFrame)
+
+/* AVWindowSetFrame */
+#define AVWindowSetFrame DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVWindowSetFrame)
+
+/* AVWindowGetInterior */
+#define AVWindowGetInterior DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVWindowGetInterior)
+
+/* AVWindowBringToFront */
+#define AVWindowBringToFront AVROUTINE(AcroViewHFT_VERSION_2, AVWindowBringToFront)
+
+/* AVWindowInvalidateRect */
+#define AVWindowInvalidateRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2, AcroViewHFT_VERSION_6, AVWindowInvalidateRect)
+
+/* AVWindowDrawNow */
+#define AVWindowDrawNow AVROUTINE(AcroViewHFT_VERSION_2, AVWindowDrawNow)
+
+/* AVWindowSetWantsKey */
+#define AVWindowSetWantsKey AVROUTINE(AcroViewHFT_VERSION_2, AVWindowSetWantsKey)
+
+/* AVWindowIsKey */
+#define AVWindowIsKey AVROUTINE(AcroViewHFT_VERSION_2, AVWindowIsKey)
+
+/* AVWindowBecomeKey */
+#define AVWindowBecomeKey AVROUTINE(AcroViewHFT_VERSION_2, AVWindowBecomeKey)
+
+/* AVWindowResignKey */
+#define AVWindowResignKey AVROUTINE(AcroViewHFT_VERSION_2, AVWindowResignKey)
+
+/* AVGrafSelectCreate */
+#define AVGrafSelectCreate AVROUTINE(AcroViewHFT_VERSION_2, AVGrafSelectCreate)
+
+/* AVGrafSelectDestroy */
+#define AVGrafSelectDestroy AVROUTINE(AcroViewHFT_VERSION_2, AVGrafSelectDestroy)
+
+/* AVGrafSelectGetBoundingRect */
+#define AVGrafSelectGetBoundingRect AVROUTINE(AcroViewHFT_VERSION_2, AVGrafSelectGetBoundingRect)
+
+/* AVCryptDoStdSecurity */
+#define AVCryptDoStdSecurity AVROUTINE(AcroViewHFT_VERSION_2, AVCryptDoStdSecurity)
+
+/* AVCryptGetPassword */
+#define AVCryptGetPassword AVROUTINE(AcroViewHFT_VERSION_2, AVCryptGetPassword)
+
+/* AVDocDoSave */
+#define AVDocDoSave AVROUTINE(AcroViewHFT_VERSION_2, AVDocDoSave)
+
+/*
+** If you need to use AVDocGetClientName(), AVDocSetClientName(), or AVPageViewGetText()
+** from within your plug-in, you will need to bump up the value of PI_ACROVIEW_VERSION
+** in PIRequir.h to 0x00020001.
+*/
+
+/* AVDocGetClientName */
+#define AVDocGetClientName AVROUTINE(AcroViewHFT_VERSION_2_1, AVDocGetClientName)
+
+/* AVDocSetClientName */
+#define AVDocSetClientName AVROUTINE(AcroViewHFT_VERSION_2_1, AVDocSetClientName)
+
+/* AVDocGetPageText */
+#define AVDocGetPageText AVROUTINE(AcroViewHFT_VERSION_2_1, AVDocGetPageText)
+
+
+/*
+** If you need to use these calls from within your plug-in, you will need to bump up
+** the value of PI_ACROVIEW_VERSION in PIRequir.h to 0x00020002.
+*/
+
+
+#define AVToolButtonSetHelpText AVROUTINE(AcroViewHFT_VERSION_2_2, AVToolButtonSetHelpText)
+
+#define AVPageViewTrackText DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVPageViewTrackText)
+
+#define AVPageViewHighlightText AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewHighlightText)
+
+#define AVPageViewInvalidateText AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewInvalidateText)
+
+
+#define AVPageViewPointInText DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVPageViewPointInText)
+
+#define AVPageViewGetFirstVisiblePageNum AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewGetFirstVisiblePageNum)
+
+#define AVPageViewGetLastVisiblePageNum AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewGetLastVisiblePageNum)
+
+#define AVPageViewPageNumIsVisible AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewPageNumIsVisible)
+
+#define AVPageViewSetPageNum AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewSetPageNum)
+
+#define AVPageViewGetSelectedAnnotPageNum AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewGetSelectedAnnotPageNum)
+
+#define AVDocSendAuxData AVROUTINE(AcroViewHFT_VERSION_2_2, AVDocSendAuxData)
+
+#define AVHasAuxDataHandler AVROUTINE(AcroViewHFT_VERSION_2_2, AVHasAuxDataHandler)
+
+#if ACRO_SDK_LEVEL >= 0x00090000
+#define AVRegisterAuxDataHandler AVROUTINE(AcroViewHFT_VERSION_9, AVRegisterAuxDataHandler)
+#else
+#define AVRegisterAuxDataHandler AVROUTINE(AcroViewHFT_VERSION_2_2, oldAVRegisterAuxDataHandler)
+#endif
+
+#define AVUnregisterAuxDataHandler AVROUTINE(AcroViewHFT_VERSION_2_2, AVUnregisterAuxDataHandler)
+
+#define AVDocPrintPagesWithParams DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVDocPrintPagesWithParams)
+
+#define AVPageViewDrawCosObj DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVPageViewDrawCosObj)
+
+#define AVDocSetDead AVROUTINE(AcroViewHFT_VERSION_2_2, AVDocSetDead)
+
+#define AVToolButtonSetExternal AVROUTINE(AcroViewHFT_VERSION_2_2, AVToolButtonSetExternal)
+
+#define AVAppIsIdle AVROUTINE(AcroViewHFT_VERSION_2_2, AVAppIsIdle)
+
+#define AVDocOpenFromASFileWithParams DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVDocOpenFromASFileWithParams)
+
+#define AVPageViewGetNextView AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewGetNextView)
+
+#define AVDocGetViewDef DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVDocGetViewDef)
+
+#define AVDocSetViewDef DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVDocSetViewDef)
+
+#define AVWindowHandlePlatformEvent AVROUTINE(AcroViewHFT_VERSION_2_2, AVWindowHandlePlatformEvent)
+
+#define AVWindowGetCursorAtPoint AVROUTINE(AcroViewHFT_VERSION_2_2, AVWindowGetCursorAtPoint)
+
+#define AVDocDoActionPropsDialog AVROUTINE(AcroViewHFT_VERSION_2_2, AVDocDoActionPropsDialog)
+
+#define AVAppGetTransHandlerByType AVROUTINE(AcroViewHFT_VERSION_2_2, AVAppGetTransHandlerByType)
+
+#define AVAppEnumTransHandlers AVROUTINE(AcroViewHFT_VERSION_2_2, AVAppEnumTransHandlers)
+
+#define AVAppRegisterTransHandler AVROUTINE(AcroViewHFT_VERSION_2_2, AVAppRegisterTransHandler)
+
+#define AVDocDoSaveAs AVROUTINE(AcroViewHFT_VERSION_2_2, AVDocDoSaveAs)
+
+#define AVPageViewSetLayoutMode AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewSetLayoutMode)
+
+#define AVPageViewGetLayoutMode AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewGetLayoutMode)
+
+#define AVPageViewInsetRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_2, AcroViewHFT_VERSION_6, AVPageViewInsetRect)
+
+#define AVDocIsExternal AVROUTINE(AcroViewHFT_VERSION_2_2, AVDocIsExternal)
+
+#define AVPageViewUseThisDestination AVROUTINE(AcroViewHFT_VERSION_2_2, AVPageViewUseThisDestination)
+
+#define AVAuthOpen AVROUTINE(AcroViewHFT_VERSION_2_2, AVAuthOpen)
+
+
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_ACROVIEW_VERSION in PIRequir.h to
+** 0x00020003.
+*/
+
+#define AVDocCopyAnnot AVROUTINE(AcroViewHFT_VERSION_2_3, AVDocCopyAnnot)
+
+#define AVDocCopyAnnotCommon AVROUTINE(AcroViewHFT_VERSION_2_3, AVDocCopyAnnotCommon)
+
+#define AVDocCopyAction AVROUTINE(AcroViewHFT_VERSION_2_3, AVDocCopyAction)
+
+#define AVDocCopyActionCommon AVROUTINE(AcroViewHFT_VERSION_2_3, AVDocCopyActionCommon)
+
+#define AVDocCopyAdditionalActions AVROUTINE(AcroViewHFT_VERSION_2_3, AVDocCopyAdditionalActions)
+
+#define AVPageViewDrawCosObjEx DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_2_3, AcroViewHFT_VERSION_6, AVPageViewDrawCosObjEx)
+
+/* AVPageViewToDestInfo */
+#define AVPageViewToDestInfo AVROUTINE(AcroViewHFT_VERSION_2_3, AVPageViewToDestInfo)
+
+/* AVPageViewUseDestInfo */
+#define AVPageViewUseDestInfo AVROUTINE(AcroViewHFT_VERSION_2_3, AVPageViewUseDestInfo)
+
+/* AVDestInfoDestroy */
+#define AVDestInfoDestroy AVROUTINE(AcroViewHFT_VERSION_2_3, AVDestInfoDestroy)
+
+
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_AcroViewHFT_VERSION in PIRequir.h to
+** 0x00040000.
+*/
+
+
+/* AVPageViewDrawAnnotSequence */
+#define AVPageViewDrawAnnotSequence DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_4, AcroViewHFT_VERSION_6, AVPageViewDrawAnnotSequence)
+
+/* AVDocDoPrint */
+#define AVDocDoPrint AVROUTINE(AcroViewHFT_VERSION_4, AVDocDoPrint)
+
+/* AVDocDoSaveAsWithParams */
+#define AVDocDoSaveAsWithParams AVROUTINE(AcroViewHFT_VERSION_4, AVDocDoSaveAsWithParams)
+
+#define AVAnnotHandlerGetInfo AVROUTINE(AcroViewHFT_VERSION_4, AVAnnotHandlerGetInfo)
+#define AVAnnotHandlerDeleteInfo AVROUTINE(AcroViewHFT_VERSION_4, AVAnnotHandlerDeleteInfo)
+#define AVAnnotHandlerGetAnnotInfo AVROUTINE(AcroViewHFT_VERSION_4, AVAnnotHandlerGetAnnotInfo)
+#define AVAnnotHandlerDeleteAnnotInfo AVROUTINE(AcroViewHFT_VERSION_4, AVAnnotHandlerDeleteAnnotInfo)
+
+#define AVPageViewDoPopupMenu DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_4, AcroViewHFT_VERSION_6, AVPageViewDoPopupMenu)
+
+#define AVPageViewTransformRectRZ AVROUTINE(AcroViewHFT_VERSION_4, AVPageViewTransformRectRZ)
+#define AVPageViewAppearanceGetAVMatrix AVROUTINE(AcroViewHFT_VERSION_4, AVPageViewAppearanceGetAVMatrix)
+
+/* AVPageViewGetVisibleAnnotPage */
+#define AVPageViewGetVisibleAnnotPage AVROUTINE(AcroViewHFT_VERSION_4, AVPageViewGetVisibleAnnotPage)
+
+/* AVPageViewInvertQuad */
+#define AVPageViewInvertQuad DECLARE_MULTIAWAREAVROUTINE(AcroViewHFT_VERSION_4, AcroViewHFT_VERSION_6, AVPageViewInvertQuad)
+
+/* AVSysAllocTimeStringFromTimeRec / AVSysTimeASTextFromTimeRec */
+#define AVSysAllocTimeStringFromTimeRec AVROUTINE(AcroViewHFT_VERSION_4, AVSysAllocTimeStringFromTimeRec)
+#define AVSysTimeASTextFromTimeRec AVROUTINE( AcroViewHFT_VERSION_8, AVSysTimeASTextFromTimeRec )
+
+/* AVAppHandlePlatformEvent */
+#define AVAppHandlePlatformEvent AVROUTINE(AcroViewHFT_VERSION_4, AVAppHandlePlatformEvent)
+
+/* AVDocSetReadOnly */
+#define AVDocSetReadOnly AVROUTINE(AcroViewHFT_VERSION_4, AVDocSetReadOnly)
+
+/* AVDocIsReadOnly */
+#define AVDocIsReadOnly AVROUTINE(AcroViewHFT_VERSION_4, AVDocIsReadOnly)
+
+/* AVPageViewShowControl */
+#define AVPageViewShowControl AVROUTINE(AcroViewHFT_VERSION_4, AVPageViewShowControl)
+
+/* Toolbutton related calls for 4.0 */
+#define AVToolBarNewFlyout AVROUTINE(AcroViewHFT_VERSION_4, AVToolBarNewFlyout)
+#define AVToolButtonSetFlyout AVROUTINE(AcroViewHFT_VERSION_4, AVToolButtonSetFlyout)
+#define AVToolButtonGetFlyout AVROUTINE(AcroViewHFT_VERSION_4, AVToolButtonGetFlyout)
+
+#define AVToolButtonSetMenu AVROUTINE(AcroViewHFT_VERSION_4, AVToolButtonSetMenu)
+#define AVToolButtonGetMenu AVROUTINE(AcroViewHFT_VERSION_4, AVToolButtonGetMenu)
+
+#define AVToolButtonSetIcon AVROUTINE(AcroViewHFT_VERSION_4, AVToolButtonSetIcon)
+#define AVToolButtonGetIcon AVROUTINE(AcroViewHFT_VERSION_4, AVToolButtonGetIcon)
+
+/* AVPageViewDeviceRectToPageRZ */
+#define AVPageViewDeviceRectToPageRZ DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_4, AcroViewHFT_VERSION_6, AVPageViewDeviceRectToPageRZ)
+
+#define AVDocAlert AVROUTINE(AcroViewHFT_VERSION_4, AVDocAlert)
+#define AVDocAlertNote AVROUTINE(AcroViewHFT_VERSION_4, AVDocAlertNote)
+#define AVDocAlertConfirm AVROUTINE(AcroViewHFT_VERSION_4, AVDocAlertConfirm)
+#define AVDocAlertYesNo AVROUTINE(AcroViewHFT_VERSION_4, AVDocAlertYesNo)
+
+#define AVMenubarAddHiddenMenu AVROUTINE(AcroViewHFT_VERSION_4, AVMenubarAddHiddenMenu)
+#define AVMenuIsHiddenOnMenubar AVROUTINE(AcroViewHFT_VERSION_4, AVMenuIsHiddenOnMenubar)
+
+#define AVAppOpenHelpFile AVROUTINE(AcroViewHFT_VERSION_4, AVAppOpenHelpFile)
+#define AVAppOpenHelpFileWithParams AVROUTINE(AcroViewHFT_VERSION_6, AVAppOpenHelpFileWithParams)
+#define AVAppHelpShowContents AVROUTINE(AcroViewHFT_VERSION_6, AVAppHelpShowContents)
+#define AVAppHelpSearch AVROUTINE(AcroViewHFT_VERSION_6, AVAppHelpSearch)
+#define AVAppHelpShowIndex AVROUTINE(AcroViewHFT_VERSION_6, AVAppHelpShowIndex)
+#define AVPageViewGetGrayRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_4, AcroViewHFT_VERSION_6, AVPageViewGetGrayRect)
+
+#define AVDocSelectionEnumPageRanges AVROUTINE(AcroViewHFT_VERSION_4, AVDocSelectionEnumPageRanges)
+
+#define AVDocDoCopyAs AVROUTINE(AcroViewHFT_VERSION_4, AVDocDoCopyAs)
+
+
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_ACROVIEW_VERSION in PIRequir.h to
+** 0x00040005.
+*/
+
+
+/* AVWindowGetMinMaxSize */
+#define AVWindowGetMinMaxSize DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_4_5, AcroViewHFT_VERSION_6, AVWindowGetMinMaxSize)
+
+/* AVWindowSetMinMaxSize */
+#define AVWindowSetMinMaxSize DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_4_5, AcroViewHFT_VERSION_6, AVWindowSetMinMaxSize)
+
+/* AVAppRegisterForPageViewKeyDown */
+#define AVAppRegisterForPageViewKeyDown AVROUTINE(AcroViewHFT_VERSION_4_5, AVAppRegisterForPageViewKeyDown)
+
+/* AVAppUnregisterForPageViewKeyDown */
+#define AVAppUnregisterForPageViewKeyDown AVROUTINE(AcroViewHFT_VERSION_4_5, AVAppUnregisterForPageViewKeyDown)
+
+
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_ACROVIEW_VERSION in PIRequir.h to
+** 0x00050000.
+*/
+
+#define AVAppRegisterToPDFHandler AVROUTINE(AcroViewHFT_VERSION_5, AVAppRegisterToPDFHandler)
+#define AVAppRegisterFromPDFHandler AVROUTINE(AcroViewHFT_VERSION_5, AVAppRegisterFromPDFHandler)
+#define AVConversionEnumToPDFConverters AVROUTINE(AcroViewHFT_VERSION_5, AVConversionEnumToPDFConverters)
+#define AVConversionEnumFromPDFConverters AVROUTINE(AcroViewHFT_VERSION_5, AVConversionEnumFromPDFConverters)
+#define AVConversionConvertToPDFWithHandler AVROUTINE(AcroViewHFT_VERSION_5, AVConversionConvertToPDFWithHandler)
+#define AVConversionConvertFromPDFWithHandler AVROUTINE(AcroViewHFT_VERSION_5, AVConversionConvertFromPDFWithHandler)
+#define AVConversionConvertToPDF AVROUTINE(AcroViewHFT_VERSION_5, AVConversionConvertToPDF)
+
+#define AVCommandNew AVROUTINE(AcroViewHFT_VERSION_5, AVCommandNew)
+
+#define AVCommandDestroy AVROUTINE(AcroViewHFT_VERSION_5, AVCommandDestroy)
+
+#define AVCommandGetName AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetName)
+
+#define AVCommandGetStatus AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetStatus)
+
+#define AVCommandGetCab AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetCab)
+
+#define AVCommandPutCab AVROUTINE(AcroViewHFT_VERSION_5, AVCommandPutCab)
+
+#define AVCommandSetParams AVROUTINE(AcroViewHFT_VERSION_5, AVCommandSetParams)
+
+#define AVCommandGetParams AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetParams)
+
+#define AVCommandSetConfig AVROUTINE(AcroViewHFT_VERSION_5, AVCommandSetConfig)
+
+#define AVCommandGetConfig AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetConfig)
+
+#define AVCommandGetProps AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetProps)
+
+#define AVCommandSetInputs AVROUTINE(AcroViewHFT_VERSION_5, AVCommandSetInputs)
+
+#define AVCommandGetInputs AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetInputs)
+
+#define AVCommandShowDialog AVROUTINE(AcroViewHFT_VERSION_5, AVCommandShowDialog)
+
+#define AVCommandWork AVROUTINE(AcroViewHFT_VERSION_5, AVCommandWork)
+
+#define AVCommandCancel AVROUTINE(AcroViewHFT_VERSION_5, AVCommandCancel)
+
+#define AVCommandReset AVROUTINE(AcroViewHFT_VERSION_5, AVCommandReset)
+
+#define AVCommandGetUIPolicy AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetUIPolicy)
+
+#define AVCommandGetAVDoc AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetAVDoc)
+
+#define AVCommandGetPDDoc AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetPDDoc)
+
+#define AVCommandGetReportProc AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetReportProc)
+
+#define AVCommandGetProgressMonitor AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetProgressMonitor)
+
+#define AVCommandGetCancelProc AVROUTINE(AcroViewHFT_VERSION_5, AVCommandGetCancelProc)
+
+#define AVAppRegisterCommandHandler AVROUTINE(AcroViewHFT_VERSION_5, AVAppRegisterCommandHandler)
+
+#define AVAppFindCommandHandlerByName AVROUTINE(AcroViewHFT_VERSION_5, AVAppFindCommandHandlerByName)
+
+#define AVAppRegisterGlobalCommand AVROUTINE(AcroViewHFT_VERSION_5, AVAppRegisterGlobalCommand)
+
+#define AVAppFindGlobalCommandByName AVROUTINE(AcroViewHFT_VERSION_5, AVAppFindGlobalCommandByName)
+
+#define AVAppUnregisterGlobalCommand AVROUTINE(AcroViewHFT_VERSION_5, AVAppUnregisterGlobalCommand)
+
+#define AVCommandExecute AVROUTINE(AcroViewHFT_VERSION_5, AVCommandExecute)
+
+#define AVAppOpenDialog DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVAppOpenDialog)
+
+#define AVAppSaveDialog DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVAppSaveDialog)
+
+#define AVAppChooseFolderDialog DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVAppChooseFolderDialog)
+
+#define AVAcquireSpecialFolderPathName AVROUTINE(AcroViewHFT_VERSION_5, AVAcquireSpecialFolderPathName)
+
+#define AVAcquireSpecialFilePathName AVROUTINE(AcroViewHFT_VERSION_5, AVAcquireSpecialFilePathName)
+
+#define AVPageViewGetFocusAnnot AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewGetFocusAnnot)
+
+#define AVPageViewSetFocusAnnot AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewSetFocusAnnot)
+
+#define AVPageViewClearFocusAnnot AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewClearFocusAnnot)
+
+#define AVPageViewIsFocusAnnot AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewIsFocusAnnot)
+
+#define AVUtilGetBaseNameAndExtensionByPathName AVROUTINE(AcroViewHFT_VERSION_5, AVUtilGetBaseNameAndExtensionByPathName)
+
+#define AVUtilGetBaseNameAndExtensionByString AVROUTINE(AcroViewHFT_VERSION_5, AVUtilGetBaseNameAndExtensionByString)
+
+#define AVIdentityGetText AVROUTINE(AcroViewHFT_VERSION_5, AVIdentityGetText)
+
+#define AVIdentitySetText AVROUTINE(AcroViewHFT_VERSION_5, AVIdentitySetText)
+
+#define AVPageViewFocusAnnotPerformOp AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewFocusAnnotPerformOp)
+
+#define AVPageViewFilterKeyDownForFocusAnnot AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewFilterKeyDownForFocusAnnot)
+
+#define AVPageViewGhostRectOutline DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewGhostRectOutline)
+
+#define AVToolBarNew AVROUTINE(AcroViewHFT_VERSION_5, AVToolBarNew)
+
+#define AVAppRegisterToolBarPosition DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5,AcroViewHFT_VERSION_6, AVAppRegisterToolBarPosition)
+
+#define AVPageViewSnapPoint DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewSnapPoint)
+
+#define AVPageViewSnapPointEx AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewSnapPointEx)
+
+#define AVPageViewGetMousePositionSnapped DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewGetMousePositionSnapped)
+
+#define AVPageViewDragOutNewRectSnapped DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewDragOutNewRectSnapped)
+
+#define AVPageViewDragRectSnapped DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewDragRectSnapped)
+
+#define AVPageViewDragRectSnappedEx AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewDragRectSnappedEx)
+
+#define AVRectHandleHitTest DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVRectHandleHitTest)
+
+#define AVPageViewDrawRectOutlineWithHandles DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewDrawRectOutlineWithHandles)
+
+#define AVPageViewIsAnnotOfTypeAtPoint DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewIsAnnotOfTypeAtPoint)
+
+#define AVWindowCenter AVROUTINE(AcroViewHFT_VERSION_5, AVWindowCenter)
+
+#define AVDocFromPDDoc AVROUTINE(AcroViewHFT_VERSION_5, AVDocFromPDDoc)
+
+#define AVPageViewSnapRect DECLARE_MULTIAVROUTINE(AcroViewHFT_VERSION_5, AcroViewHFT_VERSION_6, AVPageViewSnapRect)
+
+#define AVAppGetReportProc AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetReportProc)
+
+#define AVDocIsDead AVROUTINE(AcroViewHFT_VERSION_5, AVDocIsDead)
+
+#define AVAppGetPrefBool AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefBool)
+
+#define AVAppGetPrefInt AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefInt)
+
+#define AVAppGetPrefAtom AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefAtom)
+
+#define AVAppGetPrefDouble AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefDouble)
+
+#define AVAppGetPrefString AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefString)
+
+#define AVAppGetPrefText AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefText)
+
+#define AVAppGetPrefCab AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefCab)
+
+#define AVAppGetPrefPathName AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetPrefPathName)
+
+#define AVAlertWithParams AVROUTINE(AcroViewHFT_VERSION_5, AVAlertWithParams)
+
+#define AVDocPerformActionEx AVROUTINE(AcroViewHFT_VERSION_5, AVDocPerformActionEx)
+
+#define AVExtensionGetNumPlugIns AVROUTINE(AcroViewHFT_VERSION_5, AVExtensionGetNumPlugIns)
+
+#define AVExtensionAcquireInfo AVROUTINE(AcroViewHFT_VERSION_5, AVExtensionAcquireInfo)
+
+#define AVExtensionReleaseInfo AVROUTINE(AcroViewHFT_VERSION_5, AVExtensionReleaseInfo)
+
+#define AVPageViewDeviceToInfo AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewDeviceToInfo)
+
+#define AVPageViewInfoToDevice AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewInfoToDevice)
+
+#define AVPageViewPointToInfo AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewPointToInfo)
+
+#define AVPageViewInfoToPoint AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewInfoToPoint)
+
+#define AVPageViewUpdateInfoPanel AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewUpdateInfoPanel)
+
+#define AVAppGetToolBarByName AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetToolBarByName)
+
+#define AVAppGetLanguageEncoding AVROUTINE(AcroViewHFT_VERSION_5, AVAppGetLanguageEncoding)
+
+#define AVAlertResetPrefs AVROUTINE(AcroViewHFT_VERSION_5, AVAlertResetPrefs)
+
+#define AVAlertSetPref AVROUTINE(AcroViewHFT_VERSION_5, AVAlertSetPref)
+
+#define AVAlertGetPref AVROUTINE(AcroViewHFT_VERSION_5, AVAlertGetPref)
+
+#define AVPageViewScrollToAnnot AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewScrollToAnnot)
+
+#define AVSysSetWaitCursor AVROUTINE(AcroViewHFT_VERSION_5, AVSysSetWaitCursor)
+
+#define AVDocPermRequest AVROUTINE(AcroViewHFT_VERSION_5, AVDocPermRequest)
+
+#define AVPageViewSuspendOffscreenDrawing AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewSuspendOffscreenDrawing)
+
+#define AVPageViewResumeOffscreenDrawing AVROUTINE(AcroViewHFT_VERSION_5, AVPageViewResumeOffscreenDrawing)
+
+#define AVAppDidOrWillSwitchForDialog AVROUTINE(AcroViewHFT_VERSION_5, AVAppDidOrWillSwitchForDialog)
+
+#define AVAppYieldToOtherApps AVROUTINE(AcroViewHFT_VERSION_5, AVAppYieldToOtherApps)
+
+#define AVWindowEnsureInBounds AVROUTINE(AcroViewHFT_VERSION_5, AVWindowEnsureInBounds)
+
+/* PI_ACROVIEW_VERSION >= 0x00050001 5.0SP1 */
+
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_ACROVIEW_VERSION in PIRequir.h to
+** 0x00050001.
+*/
+
+/* AVMenuClone */
+#define AVMenuClone AVROUTINE(AcroViewHFT_VERSION_5_1, AVMenuClone)
+
+/* PI_ACROVIEW_VERSION >= AcroViewHFT_VERSION_6 6.0 Newport */
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_ACROVIEW_VERSION in PIRequir.h to
+** AcroViewHFT_VERSION_6.
+*/
+
+/* PI_ACROVIEW_VERSION >= AcroViewHFT_VERSION_6 6 */
+#define AVAppGetUUID AVROUTINE(AcroViewHFT_VERSION_6, AVAppGetUUID)
+
+#define AVSysGetIconFromFilename AVROUTINE(AcroViewHFT_VERSION_6, AVSysGetIconFromFilename)
+#define AVSysGetIconFromMimeType AVROUTINE(AcroViewHFT_VERSION_6, AVSysGetIconFromMimeType)
+#define AVSysGetIconFromTypeAndCreator AVROUTINE(AcroViewHFT_VERSION_6, AVSysGetIconFromTypeAndCreator)
+
+#define AVConversionConvertStreamToPDFWithHandler AVROUTINE(AcroViewHFT_VERSION_6, AVConversionConvertStreamToPDFWithHandler)
+#define AVConversionConvertStreamFromPDFWithHandler AVROUTINE(AcroViewHFT_VERSION_6, AVConversionConvertStreamFromPDFWithHandler)
+#define AVConversionConvertStreamFromStructNodeWithHandler AVROUTINE(AcroViewHFT_VERSION_6, AVConversionConvertStreamFromStructNodeWithHandler)
+#define AVConversionConvertStreamToPDF AVROUTINE(AcroViewHFT_VERSION_6, AVConversionConvertStreamToPDF)
+
+/* AVMenuDoPopUp */
+#define AVMenuDoPopUp AVROUTINE(AcroViewHFT_VERSION_6, AVMenuDoPopUp)
+
+#define AVDocGetNumPageViews AVROUTINE(AcroViewHFT_VERSION_6, AVDocGetNumPageViews)
+#define AVDocGetNthPageView AVROUTINE(AcroViewHFT_VERSION_6, AVDocGetNthPageView)
+
+// tool button animation support...
+#define AVToolButtonAddAnimationIcon AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonAddAnimationIcon)
+#define AVToolButtonGetAnimationIconCount AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonGetAnimationIconCount)
+#define AVToolButtonStartAnimation AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonStartAnimation)
+#define AVToolButtonStopAnimation AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonStopAnimation)
+#define AVToolButtonIsAnimationRunning AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonIsAnimationRunning)
+#define AVToolButtonSetAnimationPeriod AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonSetAnimationPeriod)
+#define AVToolButtonGetAnimationPeriod AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonGetAnimationPeriod)
+#define AVToolButtonRemoveAnimationIcons AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonRemoveAnimationIcons)
+
+/* AVMenu and AVMenuItem variants that use ASText instead of char* */
+#define AVMenuNewWithASText AVROUTINE(AcroViewHFT_VERSION_6, AVMenuNewWithASText)
+#define AVMenuGetTitleAsASText AVROUTINE(AcroViewHFT_VERSION_6, AVMenuGetTitleAsASText)
+#define AVMenuItemNewWithASText AVROUTINE(AcroViewHFT_VERSION_6, AVMenuItemNewWithASText)
+#define AVMenuItemGetTitleAsASText AVROUTINE(AcroViewHFT_VERSION_6, AVMenuItemGetTitleAsASText)
+#define AVMenuItemSetTitleWithASText AVROUTINE(AcroViewHFT_VERSION_6, AVMenuItemSetTitleWithASText)
+
+#define AVUtilGetBaseNameAndExtensionEx AVROUTINE(AcroViewHFT_VERSION_6, AVUtilGetBaseNameAndExtensionEx)
+
+#define AVAcquireSpecialFilePathNameWithASText AVROUTINE(AcroViewHFT_VERSION_6, AVAcquireSpecialFilePathNameWithASText)
+
+#define AVPageViewSetVisibleInks AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewSetVisibleInks)
+#define AVPageViewSetInkPreview AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewSetInkPreview)
+#define AVPageViewGetNumVisibleInks AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewGetNumVisibleInks)
+#define AVPageViewGetVisibleInks AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewGetVisibleInks)
+#define AVPageViewGetPixelInformationAtPoint AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewGetPixelInformationAtPoint)
+
+/* AVUndo stuff */
+#define AVUndoNew AVROUTINE(AcroViewHFT_VERSION_6, AVUndoNew)
+#define AVUndoSetData AVROUTINE(AcroViewHFT_VERSION_6, AVUndoSetData)
+#define AVUndoGetData AVROUTINE(AcroViewHFT_VERSION_6, AVUndoGetData)
+#define AVUndoGetAVDoc AVROUTINE(AcroViewHFT_VERSION_6, AVUndoGetAVDoc)
+#define AVUndoGetType AVROUTINE(AcroViewHFT_VERSION_6, AVUndoGetType)
+#define AVDocClearUndos AVROUTINE(AcroViewHFT_VERSION_6, AVDocClearUndos)
+#define AVDocGetTopUndo AVROUTINE(AcroViewHFT_VERSION_6, AVDocGetTopUndo)
+#define AVDocGetTopUndoAndRedo AVROUTINE(AcroViewHFT_VERSION_6, AVDocGetTopUndoAndRedo)
+#define AVDocBeginUndoOperation AVROUTINE(AcroViewHFT_VERSION_6, AVDocBeginUndoOperation)
+#define AVDocEndUndoOperation AVROUTINE(AcroViewHFT_VERSION_6, AVDocEndUndoOperation)
+
+/* AVPageViewDrawNowWithTransition */
+#define AVPageViewDrawNowWithTransition AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewDrawNowWithTransition)
+
+#define AVDocPrintSeparations AVROUTINE(AcroViewHFT_VERSION_6, AVDocPrintSeparations)
+#define AVWindowDoModal AVROUTINE(AcroViewHFT_VERSION_6, AVWindowDoModal)
+#define AVWindowEndModal AVROUTINE(AcroViewHFT_VERSION_6, AVWindowEndModal)
+#define AVSysGetUsePenForInput AVROUTINE(AcroViewHFT_VERSION_6, AVSysGetUsePenForInput)
+
+/* Cab-based ViewDefEx calls */
+#define AVDocGetViewDefEx AVROUTINE(AcroViewHFT_VERSION_6, AVDocGetViewDefEx)
+#define AVDocSetViewDefEx AVROUTINE(AcroViewHFT_VERSION_6, AVDocSetViewDefEx)
+#define AVDocUseViewDefEx AVROUTINE(AcroViewHFT_VERSION_6, AVDocUseViewDefEx)
+
+/* sets the Mega Tooltip compute proc*/
+#define AVToolButtonSetComputeTooltipProc AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonSetComputeTooltipProc)
+/* sets routine to be called before regular tooltip */
+#define AVToolButtonSetNotifyTooltipProc AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonSetNotifyTooltipProc)
+
+#define AVToolButtonSetLabelText AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonSetLabelText)
+#define AVToolButtonGetLabelText AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonGetLabelText)
+
+/* AVMenuClone */
+#define AVMenuItemClone AVROUTINE(AcroViewHFT_VERSION_6, AVMenuItemClone)
+
+/* AVAppGetLanguage */
+#define AVAppGetLanguageWithParams AVROUTINE(AcroViewHFT_VERSION_6, AVAppGetLanguageWithParams)
+
+/* AVIconBundle6 APIs */
+#define AVAppCreateIconBundle6 AVROUTINE(AcroViewHFT_VERSION_6, AVAppCreateIconBundle6)
+
+/* AVWindowGetBorderWidths */
+#define AVWindowGetBorderWidths AVROUTINE(AcroViewHFT_VERSION_6, AVWindowGetBorderWidths)
+
+/* AVPageViewDrawPolygon */
+#define AVPageViewDrawPolygon AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewDrawPolygon)
+
+/* AVPageViewDrawPolygonOutline */
+#define AVPageViewDrawPolygonOutline AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewDrawPolygonOutline)
+
+/* AVAppRegisterHowToPanel */
+#define AVAppRegisterHowToPanel AVROUTINE(AcroViewHFT_VERSION_6, AVAppRegisterHowToPanel)
+
+/* AVAppSetHowToPanelAutoShowText */
+#define AVAppSetHowToPanelAutoShowText AVROUTINE(AcroViewHFT_VERSION_6, AVAppSetHowToPanelAutoShowText)
+
+/* AVAppGetHowToPanelAutoShow */
+#define AVAppGetHowToPanelAutoShow AVROUTINE(AcroViewHFT_VERSION_6, AVAppGetHowToPanelAutoShow)
+
+/* AVAppSetHowToPanelAutoShow */
+#define AVAppSetHowToPanelAutoShow AVROUTINE(AcroViewHFT_VERSION_6, AVAppSetHowToPanelAutoShow)
+
+/* AVAppAutoShowHowToPanel */
+#define AVAppAutoShowHowToPanel AVROUTINE(AcroViewHFT_VERSION_6, AVAppAutoShowHowToPanel)
+
+/* AVMenuItemSetComputeVisibleProc */
+#define AVMenuItemSetComputeVisibleProc AVROUTINE(AcroViewHFT_VERSION_6, AVMenuItemSetComputeVisibleProc)
+
+/* AVMenuItemIsVisible */
+#define AVMenuItemIsVisible AVROUTINE(AcroViewHFT_VERSION_6, AVMenuItemIsVisible)
+
+/* AVToolButtonSetComputeVisibleProc */
+#define AVToolButtonSetComputeVisibleProc AVROUTINE(AcroViewHFT_VERSION_6, AVToolButtonSetComputeVisibleProc)
+
+/* AVAppRegisterHowToPanel */
+#define AVAppSetHowToPanelComputeVisibleProc AVROUTINE(AcroViewHFT_VERSION_6, AVAppSetHowToPanelComputeVisibleProc)
+
+/* AVAppRegisterForContextMenuAddition */
+#define AVAppRegisterForContextMenuAddition AVROUTINE(AcroViewHFT_VERSION_6, AVAppRegisterForContextMenuAddition)
+
+/* AVPageViewGetPageToDevScaling */
+#define AVPageViewGetPageToDevScaling AVROUTINE(AcroViewHFT_VERSION_6, AVPageViewGetPageToDevScaling)
+
+/* AVDocGetActiveTool */
+#define AVDocGetActiveTool AVROUTINE(AcroViewHFT_VERSION_6, AVDocGetActiveTool)
+
+/* AVDocSetActiveTool */
+#define AVDocSetActiveTool AVROUTINE(AcroViewHFT_VERSION_6, AVDocSetActiveTool)
+
+/* AVAppRegisterForPageViewRighClicks */
+#define AVAppRegisterForPageViewRightClicks AVROUTINE(AcroViewHFT_VERSION_6, AVAppRegisterForPageViewRightClicks)
+
+/* AVAppUnregisterForPageViewRightClicks */
+/* note: still only uses one HFT entry, but compat layer needs to be notified about unregister before version 6*/
+#define AVAppUnregisterForPageViewRightClicks AVROUTINE(AcroViewHFT_VERSION_6, AVAppUnregisterForPageViewRightClicks)
+
+/* AVDocIsSlow */
+#define AVDocIsSlow AVROUTINE(AcroViewHFT_VERSION_6, AVDocIsSlow)
+
+/* AVWindowGetDesktopBounds */
+#define AVWindowGetDesktopBounds AVROUTINE(AcroViewHFT_VERSION_6, AVWindowGetDesktopBounds)
+
+/* AVDocGetServerType */
+#define AVDocGetServerType AVROUTINE(AcroViewHFT_VERSION_6, AVDocGetServerType)
+
+/* AVPageViewSetWireframeDrawing */
+#define AVPageViewSetWireframeDrawing AVROUTINE(AcroViewHFT_VERSION_7, AVPageViewSetWireframeDrawing)
+
+/* AVPageViewGetWireframeDrawing */
+#define AVPageViewGetWireframeDrawing AVROUTINE(AcroViewHFT_VERSION_7, AVPageViewGetWireframeDrawing)
+
+/* AVAppShouldKeyDeleteObject */
+#define AVAppShouldKeyDeleteObject AVROUTINE(AcroViewHFT_VERSION_7, AVAppShouldKeyDeleteObject)
+
+/* AVAppRegisterLateInitProc */
+#define AVAppRegisterLateInitProc AVROUTINE(AcroViewHFT_VERSION_7, AVAppRegisterLateInitProc)
+
+/* AVDocGetBookmarks */
+#define AVDocGetBookmarks AVROUTINE(AcroViewHFT_VERSION_7, AVDocGetBookmarks)
+
+#define AVDocGetLastActiveTool AVROUTINE(AcroViewHFT_VERSION_7, AVDocGetLastActiveTool)
+
+#define AVDocGetNumWindows AVROUTINE( AcroViewHFT_VERSION_7, AVDocGetNumWindows )
+#define AVDocGetNthWindow AVROUTINE( AcroViewHFT_VERSION_7, AVDocGetNthWindow )
+
+#define AVPageViewGetAVWindow AVROUTINE( AcroViewHFT_VERSION_7, AVPageViewGetAVWindow )
+
+#define AVDocDoAnnotProperties AVROUTINE( AcroViewHFT_VERSION_7, AVDocDoAnnotProperties )
+
+#define AVSysTrackMouse AVROUTINE( AcroViewHFT_VERSION_8, AVSysTrackMouse )
+
+#define AVDocSaveOptimized AVROUTINE( AcroViewHFT_VERSION_8, AVDocSaveOptimized )
+
+#define AVGetOptimizerPresets AVROUTINE( AcroViewHFT_VERSION_8, AVGetOptimizerPresets )
+
+#define AVGetOptimizerParamsForPreset AVROUTINE( AcroViewHFT_VERSION_8, AVGetOptimizerParamsForPreset )
+
+#define AVAppGetAnnotAppearancePadding AVROUTINE( AcroViewHFT_VERSION_8, AVAppGetAnnotAppearancePadding )
+
+#define AVMenuItemIsScriptable AVROUTINE(AcroViewHFT_VERSION_8, AVMenuItemIsScriptable)
+
+#define AVToolButtonSetMenuIcon AVROUTINE(AcroViewHFT_VERSION_8, AVToolButtonSetMenuIcon)
+
+#define AVDocApplyRedactions AVROUTINE(AcroViewHFT_VERSION_9, AVDocApplyRedactions)
+#define AVListenForCustomNotification AVROUTINE(AcroViewHFT_VERSION_9, AVListenForCustomNotification)
+
+#define AVUnlistenForCustomNotification AVROUTINE(AcroViewHFT_VERSION_9, AVUnlistenForCustomNotification)
+
+#define AVBroadcastCustomNotification AVROUTINE(AcroViewHFT_VERSION_9, AVBroadcastCustomNotification)
+
+#define AVToolBarAddButtonEx AVROUTINE(AcroViewHFT_VERSION_9, AVToolBarAddButtonEx)
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* !STATIC_HFT */
+
+/* ASCallbackCreateNotification
+** Type-checking notification callback creation. Will cause a compiler
+** error if the proc's signature does not match the signature of the given
+** notification (if DEBUG is 1).
+*/
+#define ASCallbackCreateNotification(nsel, proc) ASCallbackCreateProto(nsel##NPROTO, proc)
+
+#define AVAppBeginSave AVROUTINE(AcroViewHFT_VERSION_9, AVAppBeginSave)
+#define AVAppEndSave AVROUTINE(AcroViewHFT_VERSION_9, AVAppEndSave)
+#define AVAppCancelSave AVROUTINE(AcroViewHFT_VERSION_9, AVAppCancelSave)
+#define AVPageViewGetInkPreview AVROUTINE(AcroViewHFT_VERSION_9, AVPageViewGetInkPreview)
+
+#endif /* PI_ACROVIEW_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+
+#ifdef __cplusplus
+}
+#endif
+//#endif /* CAN_EDIT*/
+#endif /* !defined(_H_AVCalls) */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.cpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.cpp
new file mode 100644
index 0000000..29aba52
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.cpp
@@ -0,0 +1,916 @@
+/*
+** AVCompat.CPP
+**
+** Code to call old functions compatibly from current SDK
+**
+** If you are getting link errors saying you need some "CompatStub" routines, you need to make a decision.
+
+** 1) If you want to run on older versions of Acrobat, add the AVCompat.cpp file to your project. This file
+** will accept calls using the current 32-bit values and structures and change them to 16-bit for calling
+** older versions of Acrobat.
+
+** 2) If you do not need to run on older versions of Acrobat, you need to change the minimum required
+** PI_ACROVIEW_VERSION to be higher than what you have (e.g. switch from AcroViewHFT_VERSION_5 to AcroViewHFT_VERSION_6)
+** this is a #define typically set very early.
+
+** This file is furnished to you by Adobe Systems Incorporated under the terms of the
+** Acrobat (r) Plug-ins Software Development Kit License Agreement.
+** Copyright (C) 2001,2003,2006 Adobe Systems Inc. All Rights Reserved.
+**
+*/
+#include "CorCalls.h"
+#include "ASCalls.h"
+#include "ASExtraCalls.h"
+#include "AVCalls.h"
+#include "AVCompat.h"
+#include "acroassert.h"
+
+extern HFT gAcroViewHFT;
+extern ASUns32 gAcroViewVersion;
+#define OLDCALL(x) ((old##x##SELPROTO)(gAcroViewHFT[old##x##SEL]))
+#if ACRO_SDK_LEVEL >= 0x00060000
+inline ASInt16 StepDown(const ASInt32& x)
+{
+ if (x > ASMAXInt16 || x < ASMINInt16)
+ ASRaise(GenError(genErrBadParm));
+ return (ASInt16)x;
+}
+inline AVRect StepUp(const oldAVRect& oldr)
+{
+ AVRect r;
+ r.left = oldr.left;
+ r.right = oldr.right;
+ r.top = oldr.top;
+ r.bottom = oldr.bottom;
+ return r;
+}
+inline oldAVRect StepDown(const AVRect& oldr)
+{
+ oldAVRect r;
+ if (oldr.left > ASMAXInt16 || oldr.right > ASMAXInt16 || oldr.top > ASMAXInt16 || oldr.bottom > ASMAXInt16 ||
+ oldr.left < ASMINInt16 || oldr.right < ASMINInt16 || oldr.top < ASMINInt16 || oldr.bottom < ASMINInt16)
+ ASRaise(GenError(genErrBadParm));
+ r.left = (ASInt16)oldr.left;
+ r.right = (ASInt16)oldr.right;
+ r.top = (ASInt16)oldr.top;
+ r.bottom = (ASInt16)oldr.bottom;
+ return r;
+}
+/* can safely cast from one to the other since the only difference is what pointers are pointing at */
+inline oldAVDocSelectionServer StepDown(const AVDocSelectionServer& s)
+{
+ ACROASSERT(s);
+ s->size = sizeof(oldAVDocSelectionServerRec); //5.0 version of this routine will only take structs that are exact size
+ return (oldAVDocSelectionServer)s;
+}
+inline AVDocSelectionServer StepUp(const oldAVDocSelectionServer& s)
+{
+ return (AVDocSelectionServer)s;
+}
+static void AVDocVD_to_oldAVDocVD(const AVDocViewDef& vd, oldAVDocViewDef newvd)
+{
+ ACROASSERT(newvd);
+ ACROASSERT(vd);
+ newvd->size = sizeof(*newvd);
+ newvd->bringToFront = vd->bringToFront;
+ newvd->usePageViewInfo = vd->usePageViewInfo;
+ newvd->pageViewLayoutMode = vd->pageViewLayoutMode;
+ newvd->pageViewPageNum = vd->pageViewPageNum;
+ newvd->pageViewZoomType = vd->pageViewZoomType;
+ newvd->pageViewZoom = vd->pageViewZoom;
+ newvd->pageViewX = StepDown(vd->pageViewX);
+ newvd->pageViewY = StepDown(vd->pageViewY);
+ newvd->pageViewStartThread = vd->pageViewStartThread;
+ newvd->pageViewThreadIndex = vd->pageViewThreadIndex;
+ newvd->pageViewBead = vd->pageViewBead;
+ newvd->useOverViewInfo = vd->useOverViewInfo;
+ newvd->overViewMode = vd->overViewMode;
+ newvd->overViewPos = vd->overViewPos;
+ newvd->overViewX = vd->overViewX;
+ newvd->overViewY = vd->overViewY;
+ newvd->useWindowInfo = vd->useWindowInfo;
+ newvd->windowFrame = StepDown(vd->windowFrame);
+}
+static void AVDocOP_to_oldAVDocOP(const AVDocOpenParams& p, oldAVDocOpenParams newp)
+{
+ ACROASSERT(p);
+ ACROASSERT(newp);
+ newp->size = sizeof(*newp);
+ newp->useFrame = p->useFrame;
+ newp->frame = StepDown(p->frame);
+ newp->useVisible = p->useVisible;
+ newp->visible = p->visible;
+ newp->useServerType = p->useServerType;
+ newp->serverType = p->serverType;
+ newp->serverCreationData = p->serverCreationData;
+ newp->useSourceDoc = p->useSourceDoc;
+ newp->sourceDoc = p->sourceDoc;
+ newp->useReadOnly = p->useReadOnly;
+ newp->readOnly = p->readOnly;
+ newp->useViewType = p->useViewType;
+ newp->viewType = p->viewType;
+ newp->useViewDef = p->useViewDef;
+
+ if(newp->useViewDef) {
+ ACROASSERT(p->viewDef);
+ AVDocVD_to_oldAVDocVD(p->viewDef, newp->viewDef);
+ }
+
+ newp->usePermReqProc = p->usePermReqProc;
+ newp->permReqProc = p->permReqProc;
+}
+static void AVOpenSaveDialogParams_to_oldAVOpenSaveDialogParams(const AVOpenSaveDialogParamsRec& newparams, oldAVOpenSaveDialogParamsRec& oldparams)
+{
+ oldparams.size = sizeof(oldparams);
+ oldparams.flags = newparams.flags;
+ oldparams.parentWindow = newparams.parentWindow;
+ oldparams.windowTitle = newparams.windowTitle;
+ oldparams.actionButtonTitle = newparams.actionButtonTitle;
+ oldparams.cancelButtonTitle = newparams.actionButtonTitle;
+ oldparams.initialFileSys = newparams.initialFileSys;
+ oldparams.initialPathName = newparams.initialPathName;
+ if(newparams.initialFileName != NULL)
+ oldparams.initialFileName = ASTextGetEncoded(newparams.initialFileName, AVAppGetLanguageEncoding());
+ else
+ oldparams.initialFileName = NULL;
+ oldparams.fileFilters = newparams.fileFilters;
+ oldparams.numFileFilters = newparams.numFileFilters;
+ oldparams.settingsComputeEnabledProc = newparams.settingsComputeEnabledProc;
+ oldparams.settingsExecuteProc = newparams.settingsExecuteProc;
+ oldparams.settingsProcData = newparams.settingsProcData;
+}
+ACCB1 AVDoc ACCB2 AVDocOpenFromFileCompatStub(ASPathName pathName, ASFileSys fileSys, const ASText tempTitle)
+{
+ const char *cTempTitle = ASTextGetEncoded(tempTitle, AVAppGetLanguageEncoding());
+ return OLDCALL(AVDocOpenFromFile)(pathName,fileSys,const_cast<char*>(cTempTitle));
+}
+
+ACCB1 AVDoc ACCB2 AVDocOpenFromFileWithParamsCompatStub(ASPathName pathName, ASFileSys fileSys,
+ const ASText tempTitle, AVDocOpenParams params)
+{
+ const char *cTempTitle = ASTextGetEncoded(tempTitle, AVAppGetLanguageEncoding());
+
+ oldAVDocOpenParamsRec op;
+ oldAVDocViewDefRec vd;
+ if (params) {
+ op.viewDef = &vd;
+ AVDocOP_to_oldAVDocOP(params, &op);
+ }
+ return OLDCALL(AVDocOpenFromFileWithParams)(pathName, fileSys, const_cast<char*>(cTempTitle), params? &op:NULL);
+}
+ACCB1 AVDoc ACCB2 AVDocOpenFromPDDocWithParamsCompatStub(PDDoc pdDoc, const ASText tempTitle, AVDocOpenParams params)
+{
+ const char *cTempTitle = ASTextGetEncoded(tempTitle, AVAppGetLanguageEncoding());
+
+ oldAVDocOpenParamsRec op;
+ oldAVDocViewDefRec vd;
+ if (params) {
+ op.viewDef = &vd;
+ AVDocOP_to_oldAVDocOP(params, &op);
+ }
+ return OLDCALL(AVDocOpenFromPDDocWithParams)(pdDoc, const_cast<char*>(cTempTitle), params?&op:NULL);
+}
+ACCB1 AVDoc ACCB2 AVDocOpenFromPDDocCompatStub(PDDoc pdDoc, const ASText tempTitle)
+{
+ const char *cTempTitle = ASTextGetEncoded(tempTitle, AVAppGetLanguageEncoding());
+ return OLDCALL(AVDocOpenFromPDDoc)(pdDoc, const_cast<char*>(cTempTitle));
+}
+ACCB1 AVDoc ACCB2 AVDocOpenFromASFileWithParamsCompatStub(ASFile file, const ASText tempTitle, AVDocOpenParams params)
+{
+ const char *cTempTitle = ASTextGetEncoded(tempTitle, AVAppGetLanguageEncoding());
+
+ oldAVDocOpenParamsRec op;
+ oldAVDocViewDefRec vd;
+ if (params) {
+ op.viewDef = &vd;
+ AVDocOP_to_oldAVDocOP(params, &op);
+ }
+ return OLDCALL(AVDocOpenFromASFileWithParams)(file, const_cast<char*>(cTempTitle), params?&op:NULL);
+}
+ACCB1 void ACCB2 AVDocGetViewDefCompatStub(AVDoc doc, AVDocViewDef viewDef)
+{
+ oldAVDocViewDefRec vd;
+ AVDocVD_to_oldAVDocVD(viewDef, &vd);
+ OLDCALL(AVDocGetViewDef)(doc, &vd);
+}
+ACCB1 void ACCB2 AVDocSetViewDefCompatStub(AVDoc doc, AVDocViewDef viewDef)
+{
+ oldAVDocViewDefRec vd;
+ AVDocVD_to_oldAVDocVD(viewDef, &vd);
+ OLDCALL(AVDocSetViewDef)(doc, &vd); //sproc
+}
+typedef struct _t_ProcDataLinks
+{
+ struct _t_ProcDataLinks *next;
+ void* proc;
+ void* data;
+} ProcDataLinksRec, *ProcDataLinkP;
+static void UnregisterThisProc(ProcDataLinkP& linkP, void* proc)
+{
+ ProcDataLinkP prev = NULL;
+ ProcDataLinkP current;
+ ProcDataLinkP found=NULL;
+ if (!linkP)
+ return;
+ if (linkP->proc == proc) {
+ found = linkP;
+ linkP = linkP->next; //remove from chain
+ }
+ else {
+ current = linkP->next;
+ prev = linkP;
+ while(current && !found) {
+ if (current->proc == proc) {
+ found = current;
+ prev->next = current->next; //remove from chain
+ }
+ else {
+ prev = current;
+ current = current->next;
+ }
+ }
+ }
+ if (found)
+ ASfree(found);
+}
+static void CompatRegisterThisProc(ProcDataLinkP& linkP, void* proc, void* data)
+{
+ ProcDataLinkP item = (ProcDataLinkP) ASmalloc(sizeof(ProcDataLinksRec));
+ //add to head
+ item->proc = proc;
+ item->data = data;
+ item->next = linkP;
+ linkP = item;
+}
+enum procKind {
+ ePROC_DRAW=0,
+ ePROC_PAGEVIEW_CLICK,
+ ePROC_PAGEVIEW_ADJUST_CURSOR,
+ ePROC_WIN_MOUSE_DOWN,
+ ePROC_WIN_DRAW,
+ ePROC_WIN_WILLBERESIZED,
+ ePROC_WIN_ADJUST_CURSOR,
+ ePROC_WIN_DIDRESIZE,
+
+ kPROCKIND_COUNT
+};
+ProcDataLinkP gProcList[kPROCKIND_COUNT]={0};
+ACCB1 void ACCB2 CompatDoPageViewDrawCB(AVPageView pageView, oldAVRect* updateRect, void*data);
+ACCB1 void ACCB2 CompatDoPageViewDrawCB(AVPageView pageView, oldAVRect* updateRect, void*data)
+{
+ ACROASSERT(updateRect);
+ AVRect ur = StepUp(*updateRect);
+ for (ProcDataLinkP i = gProcList[ePROC_DRAW];i!=NULL;i = i->next)
+ ((AVPageViewDrawProc)i->proc)(pageView, &ur, i->data);
+}
+static ACCB1 ASBool ACCB2 CompatDoPageViewClicksCB(AVPageView pageView, ASInt16 x, ASInt16 y, AVFlagBits16 flags, AVTCount clickNo, void*data)
+{
+ ASBool handled = false;
+ for (ProcDataLinkP i = gProcList[ePROC_PAGEVIEW_CLICK];i!=NULL && !handled;i = i->next)
+ handled = ((AVPageViewClickProc)i->proc)(pageView, x, y, flags, clickNo, i->data);
+ return handled;
+}
+static ACCB1 ASBool ACCB2 CompatAnnotDoLClick(oldAVAnnotHandler annotHandler, PDAnnot hitAnnot, AVPageView pageView,
+ ASInt16 xHit, ASInt16 yHit, ASInt16 flags, ASInt16 clickNo)
+{
+ //annotHandler points to a valid AVAnnotHandler type since this got assigned in an AVAnnotHandler routine
+ ACROASSERT(annotHandler);
+ ACROASSERT(((AVAnnotHandler)annotHandler)->DoClick);
+ return ((AVAnnotHandler)annotHandler)->DoClick(((AVAnnotHandler)annotHandler), hitAnnot, pageView, xHit, yHit, flags, clickNo);
+}
+static ACCB1 ASBool ACCB2 CompatAnnotDoRClick(oldAVAnnotHandler annotHandler, PDAnnot hitAnnot, AVPageView pageView,
+ ASInt16 xHit, ASInt16 yHit, ASInt16 flags, ASInt16 clickNo)
+{
+ //annotHandler points to a valid AVAnnotHandler type since this got assigned in an AVAnnotHandler routine
+ ACROASSERT(annotHandler);
+ ACROASSERT(((AVAnnotHandler)annotHandler)->DoRightClick);
+ return ((AVAnnotHandler)annotHandler)->DoRightClick(((AVAnnotHandler)annotHandler), hitAnnot, pageView, xHit, yHit, flags, clickNo);
+}
+static ACCB1 ASBool ACCB2 CompatAnnotAdjustCursor(oldAVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView, ASInt16 xHit, ASInt16 yHit)
+{
+ //annotHandler points to a valid AVAnnotHandler type since this got assigned in an AVAnnotHandler routine
+ ACROASSERT(annotHandler);
+ ACROASSERT(((AVAnnotHandler)annotHandler)->AdjustCursor);
+ return ((AVAnnotHandler)annotHandler)->AdjustCursor(((AVAnnotHandler)annotHandler), anAnnot, pageView, xHit, yHit);
+}
+static ACCB1 void ACCB2 CompatGetAnnotViewBBox(oldAVAnnotHandler annotHandler, AVPageView pageView,
+ PDAnnot anAnnot, oldAVRect *bbox)
+{
+ //annotHandler points to a valid AVAnnotHandler type since this got assigned in an AVAnnotHandler routine
+ AVRect rect;
+ ACROASSERT(annotHandler);
+ ACROASSERT(((AVAnnotHandler)annotHandler)->GetAnnotViewBBox);
+ ((AVAnnotHandler)annotHandler)->GetAnnotViewBBox(((AVAnnotHandler)annotHandler), pageView, anAnnot, &rect);
+ *bbox = StepDown(rect);
+}
+static ACCB1 ASBool ACCB2 CompatPtInAnnotViewBBox(oldAVAnnotHandler annotHandler, AVPageView pageView,
+ PDAnnot anAnnot, ASInt16 xHit, ASInt16 yHit)
+{
+ //annotHandler points to a valid AVAnnotHandler type since this got assigned in an AVAnnotHandler routine
+ ACROASSERT(annotHandler);
+ ACROASSERT(((AVAnnotHandler)annotHandler)->PtInAnnotViewBBox);
+ return ((AVAnnotHandler)annotHandler)->PtInAnnotViewBBox(((AVAnnotHandler)annotHandler), pageView, anAnnot, xHit, yHit);
+}
+static ACCB1 void ACCB2 CompatAnnotDrawEx(oldAVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView, oldAVRect *updateRect)
+{
+ //annotHandler points to a valid AVAnnotHandler type since this got assigned in an AVAnnotHandler routine
+ ACROASSERT(annotHandler);
+ ACROASSERT(updateRect);
+ ACROASSERT(((AVAnnotHandler)annotHandler)->DrawEx);
+ AVRect r = StepUp(*updateRect);
+ ((AVAnnotHandler)annotHandler)->DrawEx(((AVAnnotHandler)annotHandler), anAnnot, pageView, &r);
+}
+
+static ACCB1 ASBool ACCB2 CompatAVDocSelectionShowMenuProc(AVDoc doc, void *data, ASInt16 x, ASInt16 y)
+{
+ AVDocSelectionServer ss= AVDocGetSelectionServerByType( AVDocGetSelectionType( doc ) );
+ return ss->ShowMenu(doc, data, x, y);
+}
+static ACCB1 ASBool ACCB2 CompatAVDocSelectionGetAVRectProc(AVDoc doc, PDPageNumber pageNo, oldAVRect* rect, void* data)
+{
+ ASBool res;
+ AVRect r;
+ AVDocSelectionServer ss= AVDocGetSelectionServerByType( AVDocGetSelectionType( doc ) );
+ res = ss->GetAVRect(doc, pageNo, &r, data);
+ *rect = StepDown(r);
+ return res;
+}
+
+
+static ACCB1 ASBool ACCB2 CompatToolDoClick(oldAVTool tool, AVPageView pageView, ASInt16 xHit, ASInt16 yHit,
+ ASInt16 flags, ASInt16 clickNo)
+{
+ //tool points to a valid AVTool struct
+ ACROASSERT(tool);
+ ACROASSERT(((AVTool)tool)->DoClick);
+ return ((AVTool)tool)->DoClick(((AVTool)tool), pageView, xHit, yHit, flags, clickNo);
+}
+static ACCB1 ASBool ACCB2 CompatToolDoRClick(oldAVTool tool, AVPageView pageView, ASInt16 xHit, ASInt16 yHit,
+ ASInt16 flags, ASInt16 clickNo)
+{
+ //tool points to a valid AVTool struct
+ ACROASSERT(tool);
+ ACROASSERT(((AVTool)tool)->DoRightClick);
+ return ((AVTool)tool)->DoRightClick(((AVTool)tool), pageView, xHit, yHit, flags, clickNo);
+}
+static ACCB1 ASBool ACCB2 CompatToolAdjustCursor(oldAVTool tool, AVPageView pageView, ASInt16 x, ASInt16 y)
+{
+ //tool points to a valid AVTool struct
+ ACROASSERT(tool);
+ ACROASSERT(((AVTool)tool)->AdjustCursor);
+ return ((AVTool)tool)->AdjustCursor(((AVTool)tool), pageView, x, y);
+}
+
+static ACCB1 ASBool ACCB2 CompatDoPageViewCursorCB(AVPageView pageView, ASInt16 x, ASInt16 y, void* data)
+{
+ ASBool handled = false;
+ for (ProcDataLinkP i = gProcList[ePROC_PAGEVIEW_ADJUST_CURSOR];i!=NULL && !handled;i = i->next)
+ handled = ((AVPageViewCursorProc)i->proc)(pageView, x, y, i->data);
+ return handled;
+}
+static ACCB1 void ACCB2 CompatAVWindowMouseDownProc(AVWindow win, ASInt16 x, ASInt16 y, void *platformEvent)
+{
+ for (ProcDataLinkP i = gProcList[ePROC_WIN_MOUSE_DOWN];i!=NULL;i = i->next)
+ if (i->data == win) {
+ ((AVWindowMouseDownProc)i->proc)(win, x, y, platformEvent);
+ return;
+ }
+ ACROASSERT(false); //should never happen
+}
+static ACCB1 void ACCB2 CompatAVWindowDrawProc(AVWindow win, const oldAVRect *rect)
+{
+ ACROASSERT(rect);
+ AVRect r = StepUp(*rect);
+ for (ProcDataLinkP i = gProcList[ePROC_WIN_DRAW];i!=NULL;i = i->next)
+ if (i->data == win) {
+ ((AVWindowDrawProc)i->proc)(win, &r);
+ return;
+ }
+ ACROASSERT(false); //should never happen
+}
+static ACCB1 ASBool ACCB2 CompatAVWindowWillBeResizedProc(AVWindow win, oldAVRect *newFrame)
+{
+ ASBool res;
+ ACROASSERT(newFrame);
+ AVRect r = StepUp(*newFrame);
+ for (ProcDataLinkP i = gProcList[ePROC_WIN_WILLBERESIZED];i!=NULL;i = i->next)
+ if (i->data == win) {
+ res = ((AVWindowWillBeResizedProc)i->proc)(win, &r);
+ *newFrame = StepDown(r);
+ return res;
+ }
+ ACROASSERT(false); //should never happen
+ return true;
+}
+static ACCB1 void ACCB2 CompatAVWindowAdjustCursorProc(AVWindow win, ASInt16 x, ASInt16 y)
+{
+ for (ProcDataLinkP i = gProcList[ePROC_WIN_ADJUST_CURSOR];i!=NULL;i = i->next)
+ if (i->data == win) {
+ ((AVWindowAdjustCursorProc)i->proc)(win, x, y);
+ return;
+ }
+ ACROASSERT(false); //should never happen
+}
+static ACCB1 void ACCB2 CompatAVWindowDidResizeProc(AVWindow win, const oldAVRect *newFrame)
+{
+ ACROASSERT(newFrame);
+ AVRect r = StepUp(*newFrame);
+ for (ProcDataLinkP i = gProcList[ePROC_WIN_DIDRESIZE];i!=NULL;i = i->next)
+ if (i->data == win) {
+ ((AVWindowDidResizeProc)i->proc)(win, &r);
+ return;
+ }
+ ACROASSERT(false); //should never happen
+}
+
+ACCB1 ASBool ACCB2 AVDocRegisterSelectionServerCompatStub(AVDocSelectionServer server)
+{
+ ACROASSERT(server);
+ if (server->GetAVRect) {
+ server->oldGetAVRect = CompatAVDocSelectionGetAVRectProc;
+ }
+ if (server->ShowMenu) {
+ server->oldShowMenu = CompatAVDocSelectionShowMenuProc;
+ }
+ oldAVDocSelectionServer s= StepDown(server);
+ return OLDCALL(AVDocRegisterSelectionServer)(s);
+}
+
+ACCB1 void ACCB2 AVAppRegisterForPageViewDrawingCompatStub(AVPageViewDrawProc drawproc, void* data)
+{
+ if (!gProcList[ePROC_DRAW])
+ OLDCALL(AVAppRegisterForPageViewDrawing)(CompatDoPageViewDrawCB, NULL);
+ CompatRegisterThisProc(gProcList[ePROC_DRAW], (void *) drawproc, data);
+}
+ACCB1 void ACCB2 AVAppRegisterForPageViewClicksCompatStub(AVPageViewClickProc clickproc, void* data)
+{
+ if (!gProcList[ePROC_PAGEVIEW_CLICK])
+ OLDCALL(AVAppRegisterForPageViewClicks)(CompatDoPageViewClicksCB, NULL);
+ CompatRegisterThisProc(gProcList[ePROC_PAGEVIEW_CLICK], (void *) clickproc, data);
+}
+ACCB1 void ACCB2 AVAppRegisterForPageViewAdjustCursorCompatStub(AVPageViewCursorProc cursorProc, void* data)
+{
+ if (!gProcList[ePROC_PAGEVIEW_ADJUST_CURSOR])
+ OLDCALL(AVAppRegisterForPageViewAdjustCursor)(CompatDoPageViewCursorCB, NULL);
+ CompatRegisterThisProc(gProcList[ePROC_PAGEVIEW_ADJUST_CURSOR], (void *) cursorProc, data);
+}
+ACCB1 void ACCB2 AVAppUnregisterForPageViewDrawingCompatStub(AVPageViewDrawProc proc)
+{
+ UnregisterThisProc(gProcList[ePROC_DRAW], (void*) proc);
+ if (!gProcList[ePROC_DRAW])
+ AVROUTINE(AcroViewHFT_VERSION_2, AVAppUnregisterForPageViewDrawing)((AVPageViewDrawProc) CompatDoPageViewDrawCB); //call original sproc
+}
+ACCB1 void ACCB2 AVAppUnregisterForPageViewClicksCompatStub(AVPageViewClickProc proc)
+{
+ UnregisterThisProc(gProcList[ePROC_PAGEVIEW_CLICK], (void*) proc);
+ if (!gProcList[ePROC_PAGEVIEW_CLICK])
+ AVROUTINE(AcroViewHFT_VERSION_2, AVAppUnregisterForPageViewClicks)((AVPageViewClickProc) CompatDoPageViewClicksCB);
+}
+ACCB1 void ACCB2 AVAppUnregisterForPageViewAdjustCursorCompatStub(AVPageViewCursorProc proc)
+{
+ UnregisterThisProc(gProcList[ePROC_PAGEVIEW_ADJUST_CURSOR], (void*) proc);
+ if (!gProcList[ePROC_PAGEVIEW_ADJUST_CURSOR])
+ AVROUTINE(AcroViewHFT_VERSION_2, AVAppUnregisterForPageViewAdjustCursor)((AVPageViewCursorProc) CompatDoPageViewCursorCB);
+}
+
+ACCB1 void ACCB2 AVPageViewInvertQuadCompatStub(AVPageView pageView, const Quad *quad, ASBool highlight)
+{
+ oldQuad q;
+ if (quad) {
+ q.tlh = StepDown(quad->tlh);
+ q.tlv = StepDown(quad->tlv);
+ q.trh = StepDown(quad->trh);
+ q.trv = StepDown(quad->trv);
+ q.blh = StepDown(quad->blh);
+ q.blv = StepDown(quad->blv);
+ q.brh = StepDown(quad->brh);
+ q.brv = StepDown(quad->brv);
+ }
+ AVROUTINE(AcroViewHFT_VERSION_4, AVPageViewInvertQuad)(pageView, quad? (Quad*)&q : NULL, highlight);
+}
+ACCB1 void ACCB2 AVPageViewInvalidateRectCompatStub(AVPageView pageView, AVRect *area)
+{
+ oldAVRect r;
+ if (area)
+ r = StepDown(*area);
+ OLDCALL(AVPageViewInvalidateRect)(pageView, area? &r:NULL);
+}
+ACCB1 void ACCB2 AVPageViewGetMousePositionCompatStub(AVPageView pageView, AVDevCoord *x, AVDevCoord *y)
+{
+ ACROASSERT(x);
+ ACROASSERT(y);
+ ASInt16 x16, y16;
+ OLDCALL(AVPageViewGetMousePosition)(pageView, &x16, &y16);
+ *x = x16;
+ *y = y16;
+}
+ACCB1 void ACCB2 AVPageViewGetMousePositionSnappedCompatStub(AVPageView pageView, AVDevCoord *x, AVDevCoord *y, AVDragType direction)
+{
+ ACROASSERT(x);
+ ACROASSERT(y);
+ ASInt16 x16, y16;
+ OLDCALL(AVPageViewGetMousePositionSnapped)(pageView, &x16, &y16, direction);
+ *x = x16;
+ *y = y16;
+}
+ACCB1 void ACCB2 AVPageViewInvertRectCompatStub(AVPageView pageView, const AVRect *rect, ASBool highlight)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewInvertRect)(pageView, &r, highlight);
+}
+ACCB1 void ACCB2 AVPageViewDrawRectOutlineCompatStub(AVPageView pageView, const AVRect *rect, AVDevSize lineWidth, ASFixedP dashArray, Int32 arrayLen)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewDrawRectOutline)(pageView, &r, StepDown(lineWidth), dashArray, arrayLen);
+}
+ACCB1 void ACCB2 AVPageViewDrawRectCompatStub(AVPageView pageView, const AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewDrawRect)(pageView, &r);
+}
+ACCB1 void ACCB2 AVPageViewGhostRectOutlineCompatStub(AVPageView pageView, const AVRect* rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewGhostRectOutline)(pageView, &r);
+}
+ACCB1 void ACCB2 AVPageViewDrawCosObjCompatStub(AVPageView pageView, CosObj cosObj, const AVRect* rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewDrawCosObj)(pageView, cosObj, &r);
+}
+ACCB1 void ACCB2 AVPageViewDrawCosObjExCompatStub(AVPageView pageView, CosObj cosObj, const AVRect* rect, ASFixedMatrix *matrix)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewDrawCosObjEx)(pageView, cosObj, &r, matrix);
+}
+ACCB1 void ACCB2 AVPageViewInsetRectCompatStub(AVPageView pageView, const AVRect* rr, ASBool down)
+{
+ ACROASSERT(rr);
+ oldAVRect r = StepDown(*rr);
+ OLDCALL(AVPageViewInsetRect)(pageView, &r, down);
+}
+ACCB1 void ACCB2 AVPageViewScrollToCompatStub(AVPageView pageView, AVDevCoord xOrigin, AVDevCoord yOrigin)
+{
+ OLDCALL(AVPageViewScrollTo)(pageView, StepDown(xOrigin), StepDown(yOrigin));
+}
+ACCB1 void ACCB2 AVPageViewScrollToRectCompatStub(AVPageView pageView, const AVRect *rect,
+ ASBool favorLeft, ASBool favorTop, AVDevSize margin)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewScrollToRect)(pageView, &r, favorLeft, favorTop, StepDown(margin));
+}
+
+ACCB1 void ACCB2 AVPageViewGetApertureCompatStub(AVPageView pageView, AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r;
+ OLDCALL(AVPageViewGetAperture)(pageView, &r);
+ *rect = StepUp(r);
+}
+ACCB1 void ACCB2 AVPageViewGetGrayRectCompatStub(AVPageView pageView, AVRect* rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r;
+ OLDCALL(AVPageViewGetGrayRect)(pageView, &r);
+ *rect = StepUp(r);
+}
+ACCB1 void ACCB2 AVAppRegisterToolBarPositionCompatStub(const char *toolBarName, ASBool external, AVToolBarPosition position)
+{
+
+ oldAVToolBarPositionRec oldposition;
+ oldposition.inDoc = position->inDoc;
+ oldposition.dockPosition = position->dockPosition;
+ oldposition.floatingWindowName = position->floatingWindowName;
+ oldposition.stackNum = position->stackNum;
+ oldposition.offset = position->offset;
+ oldposition.order = position->order;
+ oldposition.windowFrame = StepDown(position->windowFrame);
+ oldposition.layout = position->layout;
+ oldposition.hidden = position->hidden;
+ oldposition.windowHidden = position->windowHidden;
+ oldposition.size = sizeof(oldposition);
+ OLDCALL(AVAppRegisterToolBarPosition)(toolBarName,external,&oldposition);
+}
+
+ACCB1 void ACCB2 AVPageViewSnapPointCompatStub(AVPageView pageView, AVDevCoord *x, AVDevCoord *y, AVDragType direction)
+{
+ ACROASSERT(x);
+ ACROASSERT(y);
+ ASInt16 x1 = StepDown(*x);
+ ASInt16 y1 = StepDown(*y);
+ OLDCALL(AVPageViewSnapPoint)(pageView, &x1, &y1, direction);
+ *x = x1;
+ *y = y1;
+}
+ACCB1 void ACCB2 AVPageViewDragOutNewRectCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVRect *resultRect)
+{
+ ACROASSERT(resultRect);
+ oldAVRect r;
+ OLDCALL(AVPageViewDragOutNewRect)(pageView, StepDown(xStart), StepDown(yStart), &r);
+ *resultRect = StepUp(r);
+}
+ACCB1 ASInt32 ACCB2 AVPageViewDragOutNewRectSnappedCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart,
+ AVRect *resultRect, AVCursor *cursorArray, ASInt16 nCursors)
+{
+ ACROASSERT(resultRect);
+ ASInt32 res;
+ oldAVRect r;
+ res = OLDCALL(AVPageViewDragOutNewRectSnapped)(pageView, StepDown(xStart), StepDown(yStart), &r, cursorArray, nCursors);
+ *resultRect = StepUp(r);
+ return res;
+}
+ACCB1 void ACCB2 AVPageViewDragRectCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVRect *startRect, AVRect *resultRect, Int32 dragType, AVRect *extrema)
+{
+ ACROASSERT(startRect);
+ ACROASSERT(resultRect);
+ oldAVRect sr = StepDown(*startRect);
+ oldAVRect rr;
+ oldAVRect er;
+ if (extrema)
+ er = StepDown(*extrema);
+ OLDCALL(AVPageViewDragRect)(pageView, StepDown(xStart), StepDown(yStart), &sr, &rr, dragType, extrema? &er : NULL);
+ *resultRect = StepUp(rr);
+}
+ACCB1 ASInt32 ACCB2 AVPageViewDragRectSnappedCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVRect *startRect,
+ AVRect *resultRect, Int32 dragType, AVRect *extrema, AVCursor *cursorArray, ASInt16 nCursors)
+{
+ ACROASSERT(startRect);
+ ACROASSERT(resultRect);
+ ASInt32 res;
+ oldAVRect sr = StepDown(*startRect);
+ oldAVRect rr;
+ oldAVRect er;
+ if (extrema)
+ er = StepDown(*extrema);
+ res = OLDCALL(AVPageViewDragRectSnapped)(pageView, StepDown(xStart), StepDown(yStart), &sr, &rr, dragType, extrema? &er : NULL, cursorArray, nCursors);
+ *resultRect = StepUp(rr);
+ return res;
+}
+ACCB1 void ACCB2 AVPageViewSnapRectCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVDevCoord xNow, AVDevCoord yNow,
+ AVRect *startRect, AVRect *resultRect, ASInt32 handleType, ASUns32 modifiers, const AVRect *extrema)
+{
+ ACROASSERT(startRect);
+ ACROASSERT(resultRect);
+ oldAVRect sr = StepDown(*startRect);
+ oldAVRect rr;
+ oldAVRect er;
+ if (extrema)
+ er = StepDown(*extrema);
+ OLDCALL(AVPageViewSnapRect)(pageView, StepDown(xStart), StepDown(yStart), StepDown(xNow), StepDown(yNow), &sr, &rr, handleType, modifiers, extrema? &er : NULL);
+ *resultRect = StepUp(rr);
+}
+
+ACCB1 AVMenuItem ACCB2 AVPageViewDoPopupMenuCompatStub(AVPageView pageView, AVMenu menu, AVDevCoord xHit, AVDevCoord yHit,
+ ASBool rightMouse, ASInt32 choice)
+{
+ return OLDCALL(AVPageViewDoPopupMenu)(pageView, menu, StepDown(xHit), StepDown(yHit), rightMouse, choice);
+}
+ACCB1 ASBool ACCB2 AVPageViewPointInTextCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDTextSelect pdText)
+{
+ return OLDCALL(AVPageViewPointInText)(pageView, StepDown(xHit), StepDown(yHit), pdText);
+}
+
+ACCB1 PDTextSelect ACCB2 AVPageViewTrackTextHostCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDTextSelect current)
+{
+ return OLDCALL(AVPageViewTrackText)(pageView, StepDown(xHit), StepDown(yHit), current); //sproc
+}
+
+ACCB1 ASBool ACCB2 AVPageViewIsAnnotAtPointCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDAnnot *hitAnnot)
+{
+ return OLDCALL(AVPageViewIsAnnotAtPoint)(pageView, StepDown(xHit), StepDown(yHit), hitAnnot);
+}
+
+ACCB1 void ACCB2 AVPageViewGetAnnotRectCompatStub(AVPageView pageView, PDAnnot anAnnot, AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r;
+ OLDCALL(AVPageViewGetAnnotRect)(pageView, anAnnot, &r);
+ *rect = StepUp(r);
+}
+ACCB1 void ACCB2 AVPageViewDrawAnnotSequenceCompatStub(AVPageView pv, PDAnnot an, const AVRect *bbox)
+{
+ ACROASSERT(bbox);
+ oldAVRect r = StepDown(*bbox);
+ OLDCALL(AVPageViewDrawAnnotSequence)(pv, an, &r);
+}
+ACCB1 ASBool ACCB2 AVPageViewIsBeadAtPointCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDBead *beadP)
+{
+ return OLDCALL(AVPageViewIsBeadAtPoint)(pageView, StepDown(xHit), StepDown(yHit), beadP);
+}
+ACCB1 void ACCB2 AVPageViewDevicePointToPageCompatStub(AVPageView pageView, AVDevCoord x, AVDevCoord y, ASFixedPoint *p)
+{
+ OLDCALL(AVPageViewDevicePointToPage)(pageView, StepDown(x), StepDown(y), p);
+}
+ACCB1 void ACCB2 AVPageViewRectToDeviceCompatStub(AVPageView pageView, const ASFixedRectP src, AVRect *dst)
+{
+ ACROASSERT(dst);
+ oldAVRect r;
+ OLDCALL(AVPageViewRectToDevice)(pageView, src, &r);
+ *dst = StepUp(r);
+}
+ACCB1 void ACCB2 AVPageViewDeviceRectToPageCompatStub(AVPageView pageView, const AVRect *src, ASFixedRect *dst)
+{
+ ACROASSERT(src);
+ oldAVRect r = StepDown(*src);
+ OLDCALL(AVPageViewDeviceRectToPage)(pageView, &r, dst);
+}
+
+ACCB1 void ACCB2 AVPageViewDeviceRectToPageRZCompatStub(AVPageView pageView, Int32 flags, AVDevCoord xHot, AVDevCoord yHot, const AVRect *src,
+ ASFixedRect *dst)
+{
+ ACROASSERT(src);
+ oldAVRect r = StepDown(*src);
+ OLDCALL(AVPageViewDeviceRectToPageRZ)(pageView, flags, StepDown(xHot), StepDown(yHot), &r, dst); //sproc
+}
+
+ACCB1 void ACCB2 AVPageViewPointToDeviceCompatStub(AVPageView pageView, const ASFixedPointP p, AVDevCoord *x, AVDevCoord *y)
+{
+ ACROASSERT(x);
+ ACROASSERT(y);
+ ASInt16 x1;
+ ASInt16 y1;
+ OLDCALL(AVPageViewPointToDevice)(pageView, p, &x1, &y1);
+ *x = x1;
+ *y = y1;
+}
+ACCB1 AVDragTypeEx ACCB2 AVRectHandleHitTestCompatStub(const AVRect *rect, ASBool bMidpoints, AVDevCoord x, AVDevCoord y)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ return OLDCALL(AVRectHandleHitTest)(&r, bMidpoints, StepDown(x), StepDown(y));
+}
+ACCB1 void ACCB2 AVAppRegisterAnnotHandlerCompatStub(AVAnnotHandler handler)
+{
+ ACROASSERT(handler);
+ if (handler->DoClick )
+ handler->oldDoClick = CompatAnnotDoLClick;
+ if (handler->AdjustCursor )
+ handler->oldAdjustCursor = CompatAnnotAdjustCursor;
+ if (handler->PtInAnnotViewBBox )
+ handler->oldPtInAnnotViewBBox = CompatPtInAnnotViewBBox;
+ if (handler->GetAnnotViewBBox )
+ handler->oldGetAnnotViewBBox = CompatGetAnnotViewBBox;
+ if (handler->DoRightClick )
+ handler->oldDoRightClick = CompatAnnotDoRClick;
+ if (handler->DrawEx )
+ handler->oldDrawEx = CompatAnnotDrawEx;
+ OLDCALL(AVAppRegisterAnnotHandler)(handler); //call original sproc
+}
+ACCB1 void ACCB2 AVAppRegisterToolCompatStub(AVTool tool)
+{
+ ACROASSERT(tool);
+ if (tool->DoClick)
+ tool->oldDoClick = CompatToolDoClick;
+ if (tool->DoRightClick)
+ tool->oldDoRightClick = CompatToolDoRClick;
+ if (tool->AdjustCursor)
+ tool->oldAdjustCursor = CompatToolAdjustCursor;
+ OLDCALL(AVAppRegisterTool)(tool); //call original sproc
+}
+ACCB1 ASBool ACCB2 AVPageViewIsAnnotOfTypeAtPointCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, ASAtom annotType, ASBool belowOthers, PDAnnot *annot)
+{
+ return OLDCALL(AVPageViewIsAnnotOfTypeAtPoint)(pageView, StepDown(xHit), StepDown(yHit), annotType, belowOthers, annot);
+}
+ACCB1 void ACCB2 AVPageViewSetAnnotLocationCompatStub(PDAnnot anAnnot, AVPageView pageView, AVDevCoord x, AVDevCoord y)
+{
+ OLDCALL(AVPageViewSetAnnotLocation)(anAnnot, pageView, StepDown(x), StepDown(y));
+}
+static void FixupWindowHandler(AVWindowHandler handler)
+{
+ if (!handler)
+ return; //easy to fixup null handlers
+ if (handler->MouseDown) {
+ ACROASSERT(handler->MouseDown != (AVWindowMouseDownProc)CompatAVWindowMouseDownProc); //expected a 32-bit callback, not the swapped in 16-bit compatible version
+ CompatRegisterThisProc(gProcList[ePROC_WIN_MOUSE_DOWN], (void *) (handler->MouseDown), handler);
+ handler->MouseDown = (AVWindowMouseDownProc)CompatAVWindowMouseDownProc;
+ }
+ if (handler->Draw) {
+ ACROASSERT(handler->Draw != (AVWindowDrawProc)CompatAVWindowDrawProc); //expected a 32-bit callback, not the swapped in 16-bit compatible version
+ CompatRegisterThisProc(gProcList[ePROC_WIN_DRAW], (void *) (handler->Draw), handler);
+ handler->Draw = (AVWindowDrawProc)CompatAVWindowDrawProc;
+ }
+ if (handler->WillBeResized) {
+ ACROASSERT(handler->WillBeResized != (AVWindowWillBeResizedProc)CompatAVWindowWillBeResizedProc); //expected a 32-bit callback, not the swapped in 16-bit compatible version
+ CompatRegisterThisProc(gProcList[ePROC_WIN_WILLBERESIZED], (void *) (handler->WillBeResized), handler);
+ handler->WillBeResized = (AVWindowWillBeResizedProc)CompatAVWindowWillBeResizedProc;
+ }
+ if (handler->AdjustCursor) {
+ ACROASSERT(handler->AdjustCursor != (AVWindowAdjustCursorProc)CompatAVWindowAdjustCursorProc); //expected a 32-bit callback, not the swapped in 16-bit compatible version
+ CompatRegisterThisProc(gProcList[ePROC_WIN_ADJUST_CURSOR], (void *) (handler->AdjustCursor), handler);
+ handler->AdjustCursor = (AVWindowAdjustCursorProc)CompatAVWindowAdjustCursorProc;
+ }
+ if (handler->DidResize) {
+ ACROASSERT(handler->DidResize != (AVWindowDidResizeProc)CompatAVWindowDidResizeProc); //expected a 32-bit callback, not the swapped in 16-bit compatible version
+ CompatRegisterThisProc(gProcList[ePROC_WIN_DIDRESIZE], (void *) (handler->DidResize), handler);
+ handler->DidResize = (AVWindowDidResizeProc)CompatAVWindowDidResizeProc;
+ }
+}
+ACCB1 AVWindow ACCB2 AVWindowNewFromPlatformThingCompatStub(AVWindowLayer layer, Uns32 flags,
+ AVWindowHandler handler, ASExtension owner, void *platformThing)
+{
+ FixupWindowHandler(handler);
+ return OLDCALL(AVWindowNewFromPlatformThing)(layer, flags, (oldAVWindowHandler)handler, owner, platformThing);
+}
+
+ACCB1 AVWindow ACCB2 AVWindowNewCompatStub(AVWindowLayer layer, Uns32 flags, AVWindowHandler handler,
+ ASExtension owner)
+{
+ FixupWindowHandler(handler);
+ return OLDCALL(AVWindowNew)(layer, flags, (oldAVWindowHandler)handler, owner);
+}
+ACCB1 void ACCB2 AVWindowSetMinMaxSizeCompatStub(AVWindow win, const AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVWindowSetMinMaxSize)(win, &r);
+}
+ACCB1 void ACCB2 AVWindowGetMinMaxSizeCompatStub(AVWindow win, AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVWindowGetMinMaxSize)(win, &r);
+}
+ACCB1 void ACCB2 AVWindowInvalidateRectCompatStub(AVWindow win, const AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVWindowInvalidateRect)(win, &r);
+}
+ACCB1 void ACCB2 AVWindowGetInteriorCompatStub(AVWindow win, AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r;
+ OLDCALL(AVWindowGetInterior)(win, &r);
+ *rect = StepUp(r);
+}
+ACCB1 void ACCB2 AVWindowGetTitleCompatStub(AVWindow win, ASText title)
+{
+ ACROASSERT(title);
+ char cTitle[1024] = "";
+ OLDCALL(AVWindowGetTitle)(win, cTitle, sizeof(cTitle));
+ ASTextSetEncoded(title, cTitle, AVAppGetLanguageEncoding());
+}
+ACCB1 void ACCB2 AVWindowSetTitleCompatStub(AVWindow win, const ASText title)
+{
+ ACROASSERT(title);
+ const char *cTitle = ASTextGetEncoded(title, AVAppGetLanguageEncoding());
+ OLDCALL(AVWindowSetTitle)(win, cTitle);
+}
+ACCB1 void ACCB2 AVWindowSetFrameCompatStub(AVWindow win, const AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVWindowSetFrame)(win, &r);
+}
+ACCB1 void ACCB2 AVWindowGetFrameCompatStub(AVWindow win, AVRect *rect)
+{
+ ACROASSERT(rect);
+ oldAVRect r;
+ OLDCALL(AVWindowGetFrame)(win, &r);
+ *rect = StepUp(r);
+}
+ACCB1 void ACCB2 AVPageViewDrawRectOutlineWithHandlesCompatStub(AVPageView pageView, const AVRect *rect, ASBool bMidpoints, ASBool bThin, ASFixed *dashArray, ASInt32 arrayLen)
+{
+ ACROASSERT(rect);
+ oldAVRect r = StepDown(*rect);
+ OLDCALL(AVPageViewDrawRectOutlineWithHandles)(pageView, &r, bMidpoints, bThin, dashArray, arrayLen);
+}
+ACCB1 ASBool ACCB2 AVAppOpenDialogCompatStub(AVOpenSaveDialogParams dialogParams, ASFileSys *outFileSys, ASPathName **outASPathNames, ASUns16 *outNumASPathNames, ASInt16 *ioChosenFilterIndex)
+{
+ ACROASSERT(dialogParams);
+ oldAVOpenSaveDialogParamsRec oldParams;
+ AVOpenSaveDialogParams_to_oldAVOpenSaveDialogParams(*dialogParams, oldParams);
+ return OLDCALL(AVAppOpenDialog)(&oldParams, outFileSys, outASPathNames, outNumASPathNames, ioChosenFilterIndex);
+}
+ACCB1 ASBool ACCB2 AVAppSaveDialogCompatStub(AVOpenSaveDialogParams dialogParams, ASFileSys *outFileSys, ASPathName *outASPathName, ASInt16 *ioChosenFilterIndex)
+{
+ ACROASSERT(dialogParams);
+ oldAVOpenSaveDialogParamsRec oldParams;
+ AVOpenSaveDialogParams_to_oldAVOpenSaveDialogParams(*dialogParams, oldParams);
+ return OLDCALL(AVAppSaveDialog)(&oldParams, outFileSys, outASPathName, ioChosenFilterIndex);
+}
+ACCB1 ASBool ACCB2 AVAppChooseFolderDialogCompatStub(AVOpenSaveDialogParams dialogParams, ASFileSys *outFileSys, ASPathName *outASPathName)
+{
+ ACROASSERT(dialogParams);
+ oldAVOpenSaveDialogParamsRec oldParams;
+ AVOpenSaveDialogParams_to_oldAVOpenSaveDialogParams(*dialogParams, oldParams);
+ return OLDCALL(AVAppChooseFolderDialog)(&oldParams, outFileSys, outASPathName);
+}
+ACCB1 void ACCB2 AVDocPrintPagesWithParamsCompatStub(AVDoc doc, AVDocPrintParams paramsIn)
+{
+ //kAVEmitTransferFuncs (0x8000) phased out. Set to opposite of kAVSuppressTransfer
+ ACROASSERT(paramsIn);
+ if (paramsIn->emitFlags & kAVSuppressTransfer)
+ paramsIn->emitFlags &= ~(0x8000);
+ else
+ paramsIn->emitFlags |= (0x8000);
+ AVROUTINE(AcroViewHFT_VERSION_2_2, AVDocPrintPagesWithParams)(doc,paramsIn); //call original
+}
+#endif //ACRO_SDK_LEVEL >= 0x00060000
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.h
new file mode 100644
index 0000000..3d9f447
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVCompat.h
@@ -0,0 +1,111 @@
+/*
+** AVCompat.h
+**
+** Code to call old functions compatibly from current SDK
+**
+** If you are getting link errors saying you need some "CompatStub" routines, you need to make a decision.
+
+** 1) If you want to run on older versions of Acrobat, add the AVCompat.cpp file to your project. This file
+** will accept calls using the current 32-bit values and structures and change them to 16-bit for calling
+** older versions of Acrobat.
+
+** 2) If you do not need to run on older versions of Acrobat, you need to change the minimum required
+** PI_ACROVIEW_VERSION to be higher than what you have (e.g. switch from AcroViewHFT_VERSION_5 to AcroViewHFT_VERSION_6)
+** this is a #define typically set very early.
+
+** This file is furnished to you by Adobe Systems Incorporated under the terms of the
+** Acrobat (r) Plug-ins Software Development Kit License Agreement.
+** Copyright (C) 2001,2003,2006 Adobe Systems Inc. All Rights Reserved.
+**
+*/
+
+#ifndef _H_AVCompat
+#define _H_AVCompat
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ACCB1 ASBool ACCB2 AVDocRegisterSelectionServerCompatStub(AVDocSelectionServer server);
+ACCB1 AVDoc ACCB2 AVDocOpenFromFileCompatStub(ASPathName pathName, ASFileSys fileSys, const ASText tempTitle);
+ACCB1 AVDoc ACCB2 AVDocOpenFromFileWithParamsCompatStub(ASPathName pathName, ASFileSys fileSys,
+ const ASText tempTitle, AVDocOpenParams params);
+ACCB1 AVDoc ACCB2 AVDocOpenFromPDDocCompatStub(PDDoc pdDoc, const ASText tempTitle);
+ACCB1 AVDoc ACCB2 AVDocOpenFromPDDocWithParamsCompatStub(PDDoc pdDoc, const ASText tempTitle, AVDocOpenParams params);
+ACCB1 AVDoc ACCB2 AVDocOpenFromASFileWithParamsCompatStub(ASFile file, const ASText tempTitle, AVDocOpenParams params);
+ACCB1 void ACCB2 AVDocGetViewDefCompatStub(AVDoc doc, AVDocViewDef viewDef);
+ACCB1 void ACCB2 AVDocSetViewDefCompatStub(AVDoc doc, AVDocViewDef viewDef);
+ACCB1 void ACCB2 AVAppRegisterForPageViewDrawingCompatStub(AVPageViewDrawProc proc, void* data);
+ACCB1 void ACCB2 AVAppRegisterForPageViewClicksCompatStub(AVPageViewClickProc clickProc, void* data);
+ACCB1 void ACCB2 AVAppRegisterForPageViewAdjustCursorCompatStub(AVPageViewCursorProc cursorProc, void* data);
+ACCB1 void ACCB2 AVPageViewInvertQuadCompatStub(AVPageView pageView, const Quad *quad, ASBool highlight);
+ACCB1 void ACCB2 AVPageViewInvalidateRectCompatStub(AVPageView pageView, AVRect *area);
+ACCB1 void ACCB2 AVPageViewGetMousePositionCompatStub(AVPageView pageView, AVDevCoord *x, AVDevCoord *y);
+ACCB1 void ACCB2 AVPageViewGetMousePositionSnappedCompatStub(AVPageView pageView, AVDevCoord *x, AVDevCoord *y, AVDragType direction);
+ACCB1 void ACCB2 AVPageViewInvertRectCompatStub(AVPageView pageView, const AVRect *rect, ASBool highlight);
+ACCB1 void ACCB2 AVPageViewDrawRectOutlineCompatStub(AVPageView pageView, const AVRect *rect, AVDevSize lineWidth, ASFixedP dashArray, Int32 arrayLen);
+ACCB1 void ACCB2 AVPageViewDrawRectCompatStub(AVPageView pageView, const AVRect *rect);
+ACCB1 void ACCB2 AVPageViewGhostRectOutlineCompatStub(AVPageView pageView, const AVRect* rect);
+ACCB1 void ACCB2 AVPageViewDrawCosObjCompatStub(AVPageView pageView, CosObj cosObj, const AVRect* rect);
+ACCB1 void ACCB2 AVPageViewDrawCosObjExCompatStub(AVPageView pageView, CosObj cosObj, const AVRect* rect, ASFixedMatrix *matrix);
+ACCB1 void ACCB2 AVPageViewInsetRectCompatStub(AVPageView pageView, const AVRect* rr, ASBool down);
+ACCB1 void ACCB2 AVPageViewScrollToCompatStub(AVPageView pageView, AVDevCoord xOrigin, AVDevCoord yOrigin);
+ACCB1 void ACCB2 AVPageViewScrollToRectCompatStub(AVPageView pageView, const AVRect *rect,
+ ASBool favorLeft, ASBool favorTop, AVDevSize margin);
+ACCB1 void ACCB2 AVPageViewGetApertureCompatStub(AVPageView pageView, AVRect *rect);
+ACCB1 void ACCB2 AVPageViewGetGrayRectCompatStub(AVPageView pageView, AVRect* rect);
+ACCB1 void ACCB2 AVAppRegisterToolBarPositionCompatStub(const char *toolBarName, ASBool external, AVToolBarPosition position);
+ACCB1 void ACCB2 AVPageViewSnapPointCompatStub(AVPageView pageView, AVDevCoord *x, AVDevCoord *y, AVDragType direction);
+ACCB1 void ACCB2 AVPageViewDragOutNewRectCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVRect *resultRect);
+ACCB1 ASInt32 ACCB2 AVPageViewDragOutNewRectSnappedCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVRect *resultRect, AVCursor *cursorArray, ASInt16 nCursors);
+ACCB1 void ACCB2 AVPageViewDragRectCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVRect *startRect, AVRect *resultRect, Int32 dragType, AVRect *extrema);
+ACCB1 ASInt32 ACCB2 AVPageViewDragRectSnappedCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVRect *startRect, AVRect *resultRect, Int32 dragType, AVRect *extrema, AVCursor *cursorArray, ASInt16 nCursors);
+ACCB1 void ACCB2 AVPageViewSnapRectCompatStub(AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVDevCoord xNow, AVDevCoord yNow, AVRect *startRect, AVRect *resultRect, ASInt32 handleType, ASUns32 modifiers, const AVRect *extrema);
+ACCB1 AVMenuItem ACCB2 AVPageViewDoPopupMenuCompatStub(AVPageView pageView, AVMenu menu, AVDevCoord xHit, AVDevCoord yHit,
+ ASBool rightMouse, ASInt32 choice);
+ACCB1 ASBool ACCB2 AVPageViewPointInTextCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDTextSelect pdText);
+#define AVPageViewTrackTextCompatStub AVPageViewTrackTextHostCompatStub
+ACCB1 PDTextSelect ACCB2 AVPageViewTrackTextHostCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDTextSelect current);
+ACCB1 ASBool ACCB2 AVPageViewIsAnnotAtPointCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDAnnot *hitAnnot);
+ACCB1 void ACCB2 AVPageViewGetAnnotRectCompatStub(AVPageView pageView, PDAnnot anAnnot, AVRect *rect);
+ACCB1 void ACCB2 AVPageViewDrawAnnotSequenceCompatStub(AVPageView pv, PDAnnot an,const AVRect *bbox);
+ACCB1 ASBool ACCB2 AVPageViewIsBeadAtPointCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDBead *beadP);
+ACCB1 void ACCB2 AVPageViewDevicePointToPageCompatStub(AVPageView pageView, AVDevCoord x, AVDevCoord y, ASFixedPoint *p);
+ACCB1 void ACCB2 AVPageViewRectToDeviceCompatStub(AVPageView pageView, const ASFixedRectP src, AVRect *dst);
+ACCB1 void ACCB2 AVPageViewDeviceRectToPageCompatStub(AVPageView pageView, const AVRect *src, ASFixedRect *dst);
+ACCB1 void ACCB2 AVPageViewDeviceRectToPageRZCompatStub(AVPageView pageView, Int32 flags, AVDevCoord xHot, AVDevCoord yHot, const AVRect *src, ASFixedRect *dst);
+ACCB1 void ACCB2 AVPageViewPointToDeviceCompatStub(AVPageView pageView, const ASFixedPointP p, AVDevCoord *x, AVDevCoord *y);
+ACCB1 AVDragTypeEx ACCB2 AVRectHandleHitTestCompatStub(const AVRect *rect, ASBool bMidpoints, AVDevCoord x, AVDevCoord y);
+ACCB1 ASBool ACCB2 AVPageViewIsAnnotOfTypeAtPointCompatStub(AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, ASAtom annotType, ASBool belowOthers, PDAnnot *annot);
+ACCB1 void ACCB2 AVPageViewSetAnnotLocationCompatStub(PDAnnot anAnnot, AVPageView pageView, AVDevCoord x, AVDevCoord y);
+ACCB1 AVWindow ACCB2 AVWindowNewFromPlatformThingCompatStub(AVWindowLayer layer, Uns32 flags,
+ AVWindowHandler handler, ASExtension owner, void *platformThing);
+ACCB1 AVWindow ACCB2 AVWindowNewCompatStub(AVWindowLayer layer, Uns32 flags, AVWindowHandler handler,
+ ASExtension owner);
+ACCB1 void ACCB2 AVWindowSetMinMaxSizeCompatStub(AVWindow win, const AVRect *rect);
+ACCB1 void ACCB2 AVWindowGetMinMaxSizeCompatStub(AVWindow win, AVRect *rect);
+ACCB1 void ACCB2 AVWindowInvalidateRectCompatStub(AVWindow win, const AVRect *rect);
+ACCB1 void ACCB2 AVWindowGetInteriorCompatStub(AVWindow win, AVRect *rect);
+ACCB1 void ACCB2 AVWindowGetTitleCompatStub(AVWindow win, ASText title);
+ACCB1 void ACCB2 AVWindowSetTitleCompatStub(AVWindow win, const ASText title);
+ACCB1 void ACCB2 AVWindowSetFrameCompatStub(AVWindow win, const AVRect *rect);
+ACCB1 void ACCB2 AVWindowGetFrameCompatStub(AVWindow win, AVRect *rect);
+ACCB1 void ACCB2 AVPageViewDrawRectOutlineWithHandlesCompatStub(AVPageView pageView, const AVRect *rect, ASBool bMidpoints, ASBool bThin, ASFixed *dashArray, ASInt32 arrayLen);
+ACCB1 ASBool ACCB2 AVAppOpenDialogCompatStub(AVOpenSaveDialogParams dialogParams, ASFileSys *outFileSys, ASPathName **outASPathNames, ASUns16 *outNumASPathNames, ASInt16 *ioChosenFilterIndex);
+ACCB1 ASBool ACCB2 AVAppSaveDialogCompatStub(AVOpenSaveDialogParams dialogParams, ASFileSys *outFileSys, ASPathName *outASPathName, ASInt16 *ioChosenFilterIndex);
+ACCB1 ASBool ACCB2 AVAppChooseFolderDialogCompatStub(AVOpenSaveDialogParams dialogParams, ASFileSys *outFileSys, ASPathName *outASPathName);
+ACCB1 void ACCB2 AVDocPrintPagesWithParamsCompatStub(AVDoc doc, AVDocPrintParams paramsIn);
+
+/* these routines are needed to convert callbacks to 16 bit, the HFT is still the same */
+ACCB1 void ACCB2 AVAppUnregisterForPageViewDrawingCompatStub(AVPageViewDrawProc proc);
+ACCB1 void ACCB2 AVAppUnregisterForPageViewClicksCompatStub(AVPageViewClickProc proc);
+ACCB1 void ACCB2 AVAppUnregisterForPageViewAdjustCursorCompatStub(AVPageViewCursorProc proc);
+ACCB1 void ACCB2 AVAppRegisterAnnotHandlerCompatStub(AVAnnotHandler handler);
+ACCB1 void ACCB2 AVAppRegisterToolCompatStub(AVTool tool);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_AVCompat */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpT.h
new file mode 100644
index 0000000..2873de3
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpT.h
@@ -0,0 +1,10293 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AVExpt.h
+
+ - Types, macros, structures, etc. required to use the AcroView HFT.
+
+ The functions and types can be thought of those that are current and those that are
+ obsolete. Code written using obsolete functions will still compile and work, but those
+ definitions have been moved out of this files and into AVExpTObsolete1.h and
+ AVExpTObsolete2.h which are included by this file.
+*********************************************************************/
+
+#ifndef _H_AVExpT
+#define _H_AVExpT
+
+#include "CoreExpT.h"
+#include "ASExpT.h"
+#include "PDExpT.h"
+#include "AVPrefsD.h" /* Using AV_PREFERENCES */
+#include "ASExtraExpT.h"
+
+#if WIN_PLATFORM
+#ifndef _WINDOWS_ /* Check if 32-bit MFC already included <windows.h> */
+#define WINDOWS <windows.h>
+#include WINDOWS
+#endif
+
+#elif UNIX_PLATFORM
+#ifndef X11X
+#define X11X <X11/X.h>
+#include X11X
+#include <X11/Xlib.h>
+#endif
+
+#elif OS2_PLATFORM
+#define INCL_WIN
+#define INCL_DOS
+#define OS2 <os2.h>
+#include OS2
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/************************************************************************************\
+|* *|
+|* Notification Types *|
+|* *|
+\************************************************************************************/
+#ifndef _T_NSELECTOR
+#define _T_NSELECTOR
+typedef ASInt32 NSelector; /* Selector for HNT functions */
+#define BAD_NSELECTOR (-1)
+#endif
+
+/************************************************************************************\
+|* *|
+|* AVApp *|
+|* *|
+\************************************************************************************/
+/*
+** AV Application Preferences data type, see AVAppGetPreference()/AVAppSetPreference().
+*/
+enum {
+#define AVP(a, b) a,
+#define AVX AVP
+#define AVS AVP
+#define AVPVOIDP(a) a,
+#define AVPSTR(a) a,
+#if PLUGIN
+#define AVU(a, b, c) avpUnused##c,
+#else
+#define AVU(a, b, c) a,
+#endif
+ AV_PREFERENCES
+ avpNumPrefs
+#undef AVP
+#undef AVX
+#undef AVS
+#undef AVU
+#undef AVPVOIDP
+#undef AVPSTR
+};
+
+#ifndef _T_AVPREFSTYPE
+#define _T_AVPREFSTYPE
+#if WIN_PLATFORM
+
+/*
+ To allow AVPrefsType to run up to 255 entries while still
+ maintaining its original size it has been changed from an ASEnum8
+ to an ASUns8 on Mac and Unix. On Windows it's alwasy been a 16-bit
+ value (even though it's defined as ASEnum8) and so will remain
+ unchanged to ensure that the size remains constant.
+
+ You may wonder why ASEnum8 yields a 16-bit value on Window but an
+ 8-bit value on other platform. This is due to a historical mix-up
+ that's best left in the past.
+*/
+/**
+ A structure containing values that specify the Acrobat viewer's
+ preferences settings. It can contain up to 255 entries.
+ It contains bit-flag ASUns32 constants for use with AVDocPrintParams().
+ @see AVAppGetPreference
+ @see AVAppSetPreference
+
+*/
+typedef ASEnum8 AVPrefsType;
+#else
+typedef ASUns8 AVPrefsType;
+#endif
+#endif /* _T_AVPREFSTYPE */
+
+/**
+ Constants used to specify measurement units in AVPrefsType.
+
+ Do not set the <code>avpPageUnits</code> preference to any value larger
+ than <code>Picas</code>.
+ @see AVAppGetPreference
+ @see AVAppSetPreference
+*/
+typedef enum _t_PageUnitsType {
+ /** */
+ Points,
+ /** */
+ Inches,
+ /** */
+ Millimeters,
+ /** */
+ Centimeters,
+ /** Do not set <code>avpPageUnits</code> preference any larger than this value. */
+ Picas,
+ /** Used only for kKeyPrefsDisplayMeasure preference. */
+ Feet,
+ /** Used only for kKeyPrefsDisplayMeasure preference. */
+ Yards,
+ /** Used only for kKeyPrefsDisplayMeasure preference. */
+ Meters,
+ /** Used only for kKeyPrefsDisplayMeasure preference. */
+ Kilometers,
+ /** Used only for kKeyPrefsDisplayMeasure preference. */
+ Miles,
+ /** Used only for kKeyPrefsDisplayMeasure preference. */
+ Custom
+} PageUnitsType;
+
+/* These types are provided to abstract the bitwise implementation. Thus, the same source
+ could be compiled to different implementations for 16-bit, 32-bit, Win, Mac, Unix, etc. */
+
+/**
+ A pixel offset value for use in an AVDoc view definition.
+
+ @see AVDocGetViewDef
+*/
+typedef ASInt16 AVPixelOffset;
+
+/**
+ An array size value for AV methods.
+ @see AVAppChooseFolderDialog
+ @see AVAppOpenDialog
+ @see AVAppSaveDialog
+ @see AVExtensionAcquireInfo
+ @see AVExtensionGetNumPlugIns
+
+*/
+typedef ASUns16 AVArraySize;
+
+/**
+ A flag-bits value for use in callback procedures.
+ @see AVAnnotHandlerDoClickProc
+ @see AVAnnotHandlerDoKeyDownExProc
+ @see AVAnnotHandlerDoKeyDownProc
+ @see AVDocSelectionKeyDownProc
+ @see AVPageViewClickProc
+ @see AVPageViewKeyDownProc
+*/
+typedef ASInt16 AVFlagBits16;
+
+/**
+ A flag-bits value for use in callback procedures.
+ @see AVAnnotHandlerGetFlagsProc
+ @see AVIconHandlerGetFlagsProc
+ @see AVPageViewAppearanceGetAVMatrix
+ @see AVSysGetModifiers
+ @see AVWindowNew
+ @see AVWindowNewFromPlatformThing
+*/
+typedef ASUns32 AVFlagBits32;
+
+/** Not used. */
+typedef ASInt16 AVMouseEventCode;
+
+/**
+ A key code value for use in key-down callback procedures.
+
+ @see AVAnnotHandlerDoKeyDownExProc
+ @see AVAnnotHandlerDoKeyDownProc
+ @see AVDocSelectionKeyDownProc
+ @see AVPageViewKeyDownProc
+*/
+typedef ASUns16 AVKeyCode;
+
+/** A signed <code>int</code> for historical reasons. */
+typedef ASInt16 AVPriority;
+
+/** A version-number part. */
+typedef ASUns16 AVVersionNumPart;
+
+/** The number of bytes. */
+typedef ASUns32 AVBufferSize;
+
+/** AVDragType or <code>-1</code> for <code>err</code>. */
+typedef ASInt16 AVDragTypeEx;
+
+/**
+ A menu index value that indicates a user's choice in a popup menu. It uses negative indices for errors.
+ @see AVMenubarAcquireMenuByIndex
+ @see AVMenubarGetMenuIndex
+ @see AVMenubarAddMenu
+ @see AVMenuAcquireMenuItemByIndex
+ @see AVMenuGetMenuItemIndex
+ @see AVMenuAddMenuItem
+ @see AVPageViewDoPopupMenu
+*/
+typedef ASInt32 AVMenuIndex;
+
+/** Not used. */
+typedef ASInt32 AVIconType;
+
+/**
+ A filter index value for AV methods. It uses <code>0+</code> for valid values, <code>-1</code> for all others.
+ @see AVAppOpenDialog
+ @see AVAppSaveDialog
+*/
+typedef ASInt16 AVFilterIndex;
+
+/**
+ A page index value for use in an AVDoc view definition.
+ It uses <code>0+</code> for valid values, <code>-1</code> for invalid or non-applicable values.
+
+ @see AVDocGetViewDef
+*/
+typedef ASInt32 AVPageIndex;
+
+/** Uses <code>0+</code> for valid values. */
+typedef ASInt32 AVCursorID;
+
+/* These types are signed for historical reasons. They may change to unsigned in the future. */
+/* When possible use the equivalent unsigned type above. */
+
+/**
+ The number of items (not the number of bytes) in an array,
+ for use in page view methods.
+ @see AVAppGetNumDocs
+ @see AVDocGetClientName
+ @see AVMenubarGetNumMenus
+ @see AVMenuGetNumMenuItems
+ @see AVMenuGetTitle
+ @see AVMenuItemGetTitle
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewDrawRectOutlineWithHandles
+ @see AVPageViewGetThreadIndex
+ @see AVToolBarGetNumButtons
+ @see AVUtilGetBaseNameAndExtensionByPathName
+ @see AVUtilGetBaseNameAndExtensionByString
+ @see AVActionGetInstructionsProc
+ @see AVActionGetButtonTextProc
+ @see AVActionGetStringOneTextProc
+ @see AVActionGetStringTwoTextProc
+*/
+typedef ASInt32 AVTArraySize;
+
+/**
+ The number of bytes in a buffer, for use in page view methods.
+
+ @see AVAppGetNumDocs
+*/
+typedef ASInt32 AVTBufferSize;
+
+/**
+ An array size value for use in page view methods.
+ @see AVPageViewDragOutNewRectSnapped
+ @see AVPageViewDragRectSnapped
+*/
+typedef ASInt16 AVTSmallArraySize;
+
+/**
+ A flag-bits value for use in page view methods.
+ @see AVPageViewDeviceRectToPageRZ
+ @see AVPageViewDragOutNewRectSnapped
+ @see AVPageViewDragRectSnapped
+ @see AVPageViewDragRectSnappedEx
+*/
+typedef ASInt32 AVTFlagBits;
+
+/**
+ A flag-bits value for use in tool button methods.
+ @see AVToolButtonSetExternal
+*/
+typedef ASUns16 AVTFlagBits16;
+
+/**
+ A click-number value for use in page view callback procedures.
+
+ @see AVPageViewClickProc
+ @see AVPageViewKeyDownProc
+*/
+typedef ASInt16 AVTCount;
+
+/* A signed <code>int</code> for historical reasons. */
+/**
+ A version number part.
+ @see AVAppGetVersion
+*/
+typedef ASInt16 AVTVersionNumPart;
+
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)
+typedef ASInt16 AVSDKDependentInteger;
+#else
+typedef ASInt32 AVSDKDependentInteger;
+#endif
+
+/**
+ A size in the page view's device space.
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewScrollToRect
+*/
+typedef AVSDKDependentInteger AVDevSize;
+
+/**
+ An AVDevCoord contains an x or y coordinate in the page view's
+ device space.
+*/
+typedef AVSDKDependentInteger AVDevCoord;
+
+/**
+ An x or y coordinate in the window's space. (0,0) is at
+ the top left, and units are in pixels.
+ @see AVWindowAdjustCursorProc
+ @see AVWindowMouseDownProc
+*/
+typedef AVSDKDependentInteger AVWindowCoord;
+
+/**
+ An x or y coordinate in the screen space. (0,0) is at the
+ top left of the main monitor.
+*/
+typedef AVSDKDependentInteger AVScreenCoord;
+
+
+/************************************************************************************\
+|* *|
+|* AVIcon *|
+|* *|
+\************************************************************************************/
+
+/**
+ An icon on a menu item or toolbar button.
+
+ <p>On Windows this is an <code>HBITMAP</code> or an AVIconBundle.</p>
+ @ingroup AVIcon
+ @see AVMenuItemNew
+ @see AVToolButtonGetIcon
+ @see AVToolButtonNew
+ @see AVToolButtonSetIcon
+*/
+typedef const char * AVIconID;
+typedef void * AVIcon;
+
+#if WIN_PLATFORM
+
+ /**
+ @ingroup AVIcon
+ */
+ typedef HICON AVIconBundleIconRef;
+#elif MAC_PLATFORM
+ /**
+ @ingroup AVIcon
+ */
+ typedef IconSuiteRef AVIconBundleIconRef;
+#else
+ /**
+ @ingroup AVIcon
+ */
+ typedef void* AVIconBundleIconRef;
+#endif /* WIN_PLATFORM */
+
+
+/**
+ An icon bundle allows you to gather up multiple icons and
+ present them to Acrobat as a single AVIcon. For example,
+ when creating a toolbar button you can pass in an icon bundle
+ specifying both gray and color icons; the gray icon will
+ be used to draw the button in its normal state, and the color
+ icon will be used to draw the button when the pointer is
+ over it.
+
+ <p>The format for icon bundles is platform-specific (primarily
+ since the format for AVIcon objects is platform-specific). On Windows
+ the icons can be specified using <code>HICON</code>s, not <code>HBITMAP</code>s. On
+ Mac OS, they are <code>IconSuiteRef</code> resources. Both
+ platforms support the PNG format.</p>
+
+ <p>The tags at the front are there so the implementation can
+ determine with certainty that the information
+ passed in is an icon bundle and not an Acrobat 4-compatible
+ AVIcon. </p>
+
+ @ingroup AVIcon
+*/
+typedef struct _t_AVIconBundleRec {
+
+ /** Set to <code>AVIC</code> (for example, <code>bundle.tag1 = 'AVIC'</code>). */
+ ASUns32 tag1;
+
+ /** Set to <code>ONBU</code> (for example, <code>bundle.tag2 = 'ONBU'</code>). */
+ ASUns32 tag2;
+
+ /** Set to the version of the application (for example, <code>0x00050000</code> for Acrobat 5.0). */
+ ASInt32 version;
+
+ /** Defined according to the AVIconBundleRef <code>typedef</code>. */
+ AVIconBundleIconRef grayIcon;
+
+ /** Defined according to the AVIconBundleRef <code>typedef</code>. */
+ AVIconBundleIconRef colorIcon;
+} AVIconBundleRec, *AVIconBundle;
+
+
+
+/**
+ @ingroup AVIcon
+*/
+enum {
+ /**
+ @ingroup AVIcon
+ */
+ kAVIconColor,
+ /**
+ @ingroup AVIcon
+ */
+ kAVIconGrayscale,
+ /**
+ @ingroup AVIcon
+ */
+ kAVIconHighContrast
+};
+typedef ASEnum16 AVIconColorFormat;
+
+/** */
+enum
+{
+#ifdef MAC_PLATFORM
+ /** 16x16 icon reference
+ @ingroup AVIcon
+ */
+ kAVIconMacIconRef16,
+ /** 32x32 icon reference
+ @ingroup AVIcon
+ */
+ kAVIconMacIconRef32,
+ /** 128x128 icon reference
+ @ingroup AVIcon
+ */
+ kAVIconMacIconRef128,
+#endif
+ /**
+ @ingroup AVIcon
+ */
+ kAVIconPNG,
+ /**
+ @ingroup AVIcon
+ */
+ kAVIconLayered
+};
+
+/**
+ Constants that specify a data format for an AVIconBundle6.
+
+ @ingroup AVIcon
+ @see AVAppCreateIconBundle6
+*/
+typedef ASEnum16 AVIconDataFormat;
+
+
+/**
+ An icon bundle allows you to gather up multiple icons and
+ present them to Acrobat as a single AVIcon. For example,
+ when creating a toolbar button you can pass in an icon bundle
+ specifying both gray and color icons; the gray icon will
+ be used to draw the button in its normal state, the color
+ icon will be used to draw the button when the pointer is
+ over it. The format for icon bundles is platform-specific
+ (primarily since the format for AVIcons is platform-specific).
+ On Windows the icons are specified using <code>HICON</code>s, not <code>HBITMAP</code>s.
+ On Mac OS, they are IconSuiteRef resources.
+ The tags at the front are there so the implementation can
+ determine with certainty that the information
+ passed in is an icon bundle and not an Acrobat 4-compatible
+ AVIcon.
+
+ @ingroup AVIcon
+
+ @note This form of the icon bundle is new in Acrobat 6.0.
+
+*/
+typedef struct _t_AVIconBundleRec6 AVIconBundleRec6, *AVIconBundle6;
+
+
+/**
+ Flags returned by <code>AVIconHandler->getFlags()</code>.
+
+ @ingroup AVIcon
+*/
+#define AVICON_DONT_CACHE 1
+
+/**
+ A callback for AVIconHandler that retrieves the measurements
+ of the icon. All icons in the bundle are assumed to be the
+ same size.
+
+ @ingroup AVIcon
+
+ @param bundle The icon bundle for which the icon size
+ is measured.
+ @param w (Filled by the method) The icon width in pixels.
+ @param h (Filled by the method) The icon height in pixels.
+ @see AVAppCreateIconBundle6
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVIconHandlerMeasureProc)(AVIconBundle6 bundle, ASInt32 *w, ASInt32 *h);
+
+/**
+ A callback for AVIconHandler. It opens a stream so that a
+ drawing function can read the data contained in the icon
+ set.
+
+ @ingroup AVIcon
+
+ @param bundle The icon bundle for which the stream is
+ opened.
+ @param colorFormat The color format for the icon bundle.
+ @return The stream object.
+ @see AVAppCreateIconBundle6
+*/
+typedef ACCBPROTO1 ASStm (ACCBPROTO2 *AVIconHandlerOpenStmProc)(AVIconBundle6 bundle, AVIconColorFormat colorFormat);
+
+/**
+ A callback for AVIconHandler. It returns the flags value for
+ the icon.
+
+ @ingroup AVIcon
+
+ @param bundle The icon bundle for which the flags are
+ obtained. The following flags are defined: <code>AVICON_DONT_CACHE=1</code>.
+ @return The flags value.
+ @see AVAppCreateIconBundle6
+*/
+typedef ACCBPROTO1 AVFlagBits32 (ACCBPROTO2 *AVIconHandlerGetFlagsProc)(AVIconBundle6 bundle);
+
+/**
+ A callback for AVIconHandler. It releases the icon object.
+
+ @ingroup AVIcon
+
+ @param bundle The icon bundle that is released.
+ @see AVAppCreateIconBundle6
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVIconHandlerReleaseProc)(AVIconBundle6 bundle);
+
+
+/**
+ @ingroup AVIcon
+*/
+typedef struct _t_AVIconHandlerRec {
+ /** The size of the structure. Set it to <code>sizeof(AVIconHandlerRec)</code>. */
+ ASInt32 size;
+ /** A pointer to user-defined data passed to the callback. */
+ void* clientData;
+ /** */
+ AVIconHandlerMeasureProc Measure;
+ /** */
+ AVIconHandlerOpenStmProc OpenStm;
+ /** */
+ AVIconHandlerGetFlagsProc GetFlags;
+ /** */
+ AVIconHandlerReleaseProc Release;
+} AVIconHandlerRec, *AVIconHandler;
+
+
+/**
+ An icon bundle allows you to gather up multiple icons and present them to Acrobat as a
+ single AVIcon. For example, when creating a toolbar button you can pass in an icon
+ bundle specifying both gray and color icons; the gray icon will be used to draw the button
+ in its normal state, the color icon will be used to draw the button when the pointer is over
+ it. The format for icon bundles is platform-specific (primarily since the format for AVIcon objects
+ is platform-specific). On Windows the icons are specified using <code>HICON</code>s, not <code>HBITMAP</code>s. On
+ Mac OS, they are IconSuiteRef resources. The tags at the front are there so
+ the implementation can determine with certainty that the information
+ passed in is an icon bundle and not an Acrobat 4-compatible AVIcon.
+
+ @ingroup AVIcon
+
+ @note This form of the icon bundle is new in Acrobat 6.0.
+*/
+struct _t_AVIconBundleRec6 {
+ /** Set to <code>AVIC</code> (for example, <code>bundle.tag1 = 'AVIC'</code>) */
+ ASUns32 tag1;
+ /** Set to <code>ONBU</code> (for example, <code>bundle.tag2 = 'ONBU'</code>) */
+ ASUns32 tag2;
+ /** Set to the version of the application (for example, <code>0x00060000</code> for Acrobat 6.0) */
+ ASInt32 version;
+ /** The icon handler. */
+ AVIconHandler handler;
+ /** A pointer to the icon data record structure. */
+ void *iconData;
+};
+
+
+/**
+ A data record for an AVIconBundle6.
+
+ @ingroup AVIcon
+ @see AVAppCreateIconBundle6
+*/
+typedef struct _t_AVIconData {
+ /** A data stream containing the binary-encoded data. */
+ ASStm dataStm;
+ /** The color this icon represents. */
+ AVIconColorFormat eColorFormat;
+} AVIconDataRec, *AVIconData;
+
+
+/************************************************************************************\
+|* *|
+|* AVPageView *|
+|* *|
+\************************************************************************************/
+#ifndef _T_AVPAGEVIEW
+#define _T_AVPAGEVIEW
+
+#ifdef __cplusplus
+class AVPageViewObj;
+/** */
+typedef AVPageViewObj* AVPageView;
+#else
+
+/**
+ The area of the Acrobat viewer's window that displays the contents of a document
+ page. Every AVDoc has an AVPageView and vice versa. It contains references to the
+ PDDoc and PDPage objects for the document being displayed.
+ @see AVDocGetPageView
+ @see AVPageViewAppearanceGetAVMatrix
+ @see AVPageViewAcquireMachinePort
+ @see AVPageViewReleaseMachinePort
+ @see AVPageViewGetActiveBead
+ @see AVPageViewGetAnnotRect
+ @see AVPageViewSetAnnotLocation
+ @see AVPageViewGetAperture
+ @see AVPageViewGetAVDoc
+ @see AVPageViewGetColor
+ @see AVPageViewSetColor
+ @see AVPageViewShowControl
+ @see AVPageViewGetDevToPageMatrix
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewGetFocusAnnot
+ @see AVPageViewSetFocusAnnot
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewGetLayoutMode
+ @see AVPageViewSetLayoutMode
+ @see AVPageViewGetMousePosition
+ @see AVPageViewGetMousePositionSnapped
+ @see AVPageViewGetNextView
+ @see AVPageViewGetPage
+ @see AVPageViewGetPageNum
+ @see AVPageViewSetPageNum
+ @see AVPageViewGoBack
+ @see AVPageViewGoForward
+ @see AVPageViewGoTo
+ @see AVPageViewGetPageToDevMatrix
+ @see AVPageViewGetSelectedAnnotPageNum
+ @see AVPageViewGetThreadIndex
+ @see AVPageViewGetVisibleAnnotPage
+ @see AVPageViewGetZoom
+ @see AVPageViewZoomTo
+ @see AVPageViewGetZoomType
+ @see AVPageViewDeviceRectToPageRZ
+ @see AVPageViewDrawCosObj
+ @see AVPageViewDragRect
+ @see AVPageViewDrawNow
+ @see AVPageViewDrawRect
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewHighlightText
+ @see AVPageViewInsetRect
+ @see AVPageViewInvalidateRect
+ @see AVPageViewInvalidateText
+ @see AVPageViewInvertRect
+ @see AVPageViewInvertRectOutline
+ @see AVPageViewInvertQuad
+ @see AVPageViewIsBeadAtPoint
+ @see AVPageViewPageNumIsVisible
+ @see AVPageViewPointInText
+ @see AVPageViewReadPageDown
+ @see AVPageViewReadPageUp
+ @see AVPageViewGoForward
+ @see AVPageViewGoTo
+ @see AVPageViewGetPageToDevMatrix
+ @see AVPageViewGetSelectedAnnotPageNum
+ @see AVPageViewGetThreadIndex
+ @see AVPageViewGetVisibleAnnotPage
+ @see AVPageViewGetZoom
+ @see AVPageViewZoomTo
+ @see AVPageViewGetZoomType
+ @see AVPageViewDeviceRectToPageRZ
+ @see AVPageViewDrawCosObj
+ @see AVPageViewDragRect
+ @see AVPageViewDrawNow
+ @see AVPageViewDrawRect
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewHighlightText
+ @see AVPageViewInsetRect
+ @see AVPageViewInvalidateRect
+ @see AVPageViewInvalidateText
+ @see AVPageViewInvertRect
+ @see AVPageViewInvertRectOutline
+ @see AVPageViewInvertQuad
+ @see AVPageViewIsBeadAtPoint
+ @see AVPageViewPageNumIsVisible
+ @see AVPageViewPointInText
+ @see AVPageViewReadPageDown
+ @see AVPageViewReadPageUp
+*/
+typedef struct _t_AVPageView *AVPageView;
+#endif /* __cplusplus */
+
+#endif /* _T_AVPAGEVIEW */
+
+
+#if WIN_PLATFORM
+
+/* we have to use this old definition because the Windows 3.0 GM build
+ did not pick up the new definition below. */
+
+/**
+ Constants that specify the zoom strategy that Acrobat is
+ to follow.
+ @see AVPageViewZoomTo
+ @see AVPageViewGetZoomType
+*/
+typedef enum _t_AVZoomType {
+
+ /** No variable zoom (the zoom is a fixed value such as <code>1.0</code> for 100%). */
+ AVZoomNoVary,
+
+ /** Fits the page to the window. */
+ AVZoomFitPage,
+
+ /** Fits the page width to the window. */
+ AVZoomFitWidth,
+
+ /** Fits the page height to the window. */
+ AVZoomFitHeight,
+
+ /** Fits the width of the portion of the page upon which marks are made to the window. */
+ AVZoomFitVisibleWidth,
+
+ /** Uses the page's preferred zoom. */
+ AVZoomPreferred,
+
+ /** (New in Acrobat 5.0) Reflow page to window width. */
+ AVZoomReflowWidth
+} AVZoomType;
+
+#else
+
+
+/**
+
+*/
+enum {
+ /** No variable zoom. */
+ AVZoomNoVary,
+ /** Fit page to window. */
+ AVZoomFitPage,
+ /** Fit page width to the window. */
+ AVZoomFitWidth,
+ /** Fit page height to the window. */
+ AVZoomFitHeight,
+ /** Fit visible width to the window. */
+ AVZoomFitVisibleWidth,
+ /** Use the page's preferred zoom. */
+ AVZoomPreferred,
+ /** Reflow the page to the window width. */
+ AVZoomReflowWidth
+};
+typedef ASEnum8 AVZoomType;
+
+#endif
+
+
+/**
+ (Acrobat 5.0 and later) Used with AVPageViewShowControl() to allow a plug-in author
+ to turn on and off the controls shown in the status area
+ at the bottom of a page view.
+ @see AVPageViewShowControl
+*/
+enum {
+
+ /** The zoom control. */
+ kAVPageViewZoomControl,
+
+ /** The page flip control. */
+ kAVPageViewPageFlipControls,
+
+ /** The page number control. */
+ kAVPageViewPageNumberControl,
+
+ /** The page size control. */
+ kAVPageViewPageSizeControl,
+
+ /** The splitter bar control. */
+ kAVPageViewSplitterBar,
+
+ /** The horizontal scroll. */
+ kAVPageViewHorizontalScrollBar,
+
+ /** The vertical scroll. */
+ kAVPageViewVerticalScrollBar,
+
+ /** The gray border control. */
+ kAVPageViewGrayBorder
+};
+typedef ASEnum16 AVPageViewControlID;
+
+#if WIN_PLATFORM
+
+/**
+ The <code>HWND</code> is that of the document window's AVPageView region
+ (the portion of the window in which the PDF file's pages
+ are drawn).
+ @see AVPageViewAcquireMachinePort
+*/
+typedef struct _t_WinPort {
+
+ /** */
+ HWND hWnd;
+
+ /** */
+ HDC hDC;
+} WinPortRec, *WinPort;
+#endif
+
+#if UNIX_PLATFORM
+typedef struct _t_UnixPort {
+ Window drawable;
+ Display *display;
+ Screen *screen;
+ GC gc;
+ ASInt32 originX;
+ ASInt32 originY;
+} UnixPortRec, *UnixPort;
+#endif
+
+#if OS2_ENV
+typedef struct _t_OS2Port {
+ HWND hWnd;
+ HPS hPS;
+} OS2PortRec, *OS2Port;
+#endif
+
+
+/** The view has been scrolled.
+ @ingroup AVPageViewDidChangeFlags
+*/
+#define PAGEVIEW_UPDATE_SCROLL 1
+
+/** The page number has changed.
+ @ingroup AVPageViewDidChangeFlags
+*/
+#define PAGEVIEW_UPDATE_PAGENUM 2
+
+/** A new view has been created.
+ @ingroup AVPageViewDidChangeFlags
+*/
+#define PAGEVIEW_UPDATE_PAGESIZE 4
+
+/** The zoom has been changed.
+ @ingroup AVPageViewDidChangeFlags
+*/
+#define PAGEVIEW_UPDATE_ZOOM 8
+
+
+/** Constants identifying mouse events in <code>AVMouseInfoRec.event</code>. */
+enum {
+
+ /** */
+ kAVLeftButtonDown = 1,
+
+ /** */
+ kAVLeftButtonUp,
+
+ /** */
+ kAVLeftButtonClick,
+
+ /** */
+ kAVLeftButtonDblClick,
+
+ /** */
+ kAVRightButtonDown,
+
+ /** */
+ kAVRightButtonUp,
+
+ /** */
+ kAVRightButtonClick,
+
+ /** */
+ kAVRightButtonDblClick,
+
+ /** */
+ kAVMouseMove,
+
+ /** */
+ kAVMouseEnter,
+
+ /** */
+ kAVMouseLeave
+};
+typedef ASEnum16 AVMouseEvent;
+
+#ifndef _T_AVDOC
+#define _T_AVDOC
+
+
+/** A view of a PDF document in a window. There is one AVDoc per displayed document.
+ Unlike a PDDoc, an AVDoc has a window associated with it.
+ @see AVAppGetActiveDoc
+ @see AVAppEnumDocs
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+ @see AVPageViewGetAVDoc
+ @see AVDocClose
+ @see AVAppEnumDocs
+ @see AVDocEnumSelection
+ @see AVDocDoActionPropsDialog
+ @see AVDocDoCopyAs
+ @see AVDocDoPrint
+ @see AVDocDoSaveAs
+ @see AVDocDoSaveAsWithParams
+ @see AVDocDoSelectionProperties
+ @see AVDocGetAVWindow
+ @see AVDocGetClientName
+ @see AVDocSetClientName
+ @see AVDocGetPageText
+ @see AVDocGetPageView
+ @see AVDocGetPDDoc
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocShowSelection
+ @see AVDocGetSelection
+ @see AVDocSetSelection
+ @see AVDocGetSelectionServerByType
+ @see AVDocGetSelectionType
+ @see AVDocGetSplitterPosition
+ @see AVDocSetSplitterPosition
+ @see AVDocGetViewDef
+ @see AVDocSetViewDef
+ @see AVDocGetViewMode
+ @see AVDocSetViewMode
+ @see AVDocIsExternal
+ @see AVDocPerformAction
+ @see AVDocRegisterSelectionServer
+ @see AVDocSetDead
+ @see AVDocIsReadOnly
+ @see AVDocSetReadOnly
+*/
+
+#ifdef __cplusplus
+class AVBaseDocument;
+typedef AVBaseDocument* AVDoc;
+#else
+typedef struct _t_AVDoc *AVDoc;
+#endif // __cplusplus
+
+#endif /* _T_AVDOC */
+
+#include "AVExpTObsolete1.h" /* types for old versions of Acrobat */
+
+/*
+** AcroView defines a coordinate system in which (0,0) is at the top,
+** x increases to the right, and y increases down (the same as GDI and
+** Quickdraw but opposite PostScript). An AVRect is defined so that
+** its top is above its bottom, but this means that 0 < top < bottom.
+*/
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A data structure representing a rectangle (a quadrilateral
+ having only horizontal and vertical sides).
+
+ <p>The AcroView coordinate system is defined so that (0,0)
+ is at the top, x increases to the right, and y increases
+ down (the same as GDI and QuickDraw but opposite to the
+ PostScript language). An AVRect is defined so that its top
+ is above its bottom, but this means that <code>0 < top < bottom</code>.</p>
+
+
+ @note The types of numeric coordinate values have changed in
+ Acrobat 6.0. These types are conditionally compiled as ASInt16
+ or ASInt32 depending on the Acrobat version level.
+*/
+typedef struct AVRect {
+
+ /** */
+ AVSDKDependentInteger left;
+
+ /** */
+ AVSDKDependentInteger top;
+
+ /** */
+ AVSDKDependentInteger right;
+
+ /** */
+ AVSDKDependentInteger bottom;
+} AVRect, *AVRectP;
+#endif
+
+/**
+ A data structure representing a rectangle (a quadrilateral
+ having only horizontal and vertical sides) in a page view's
+ device space.
+ @see AVPageViewDragOutNewRect
+ @see AVPageViewDragOutNewRectSnapped
+ @see AVPageViewDragRect
+ @see AVPageViewDragRectSnapped
+ @see AVPageViewDragRectSnappedEx
+ @see AVPageViewDrawAnnotSequence
+ @see AVPageViewDrawRect
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewDrawRectOutlineWithHandles
+ @see AVPageViewGetAnnotRect
+ @see AVPageViewGetAperture
+ @see AVPageViewInvalidateRect
+ @see AVPageViewInvertRect
+ @see AVPageViewInvertRectOutline
+ @see AVPageViewScrollToRect
+ @see AVPageViewSnapRect
+ @see AVRectHandleHitTest
+ @see AVAnnotHandlerDrawExProc
+ @see AVAnnotHandlerGetAnnotViewBBoxProc
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewScrollToRect
+*/
+typedef AVRect AVDevRect;
+/* The _T_AVDEVRECT macro prevents AVDevRectP from being multiply defined */
+/* AVDevRectP is also defined in PINotify.h */
+#ifndef _T_AVDEVRECT
+#define _T_AVDEVRECT
+typedef AVRectP AVDevRectP;
+#endif /* _T_AVDEVRECT */
+
+/**
+ A data structure representing a rectangle (a quadrilateral
+ having only horizontal and vertical sides) in a window's
+ coordinate space.
+ @see AVWindowGetInterior
+ @see AVWindowInvalidateRect
+ @see AVWindowDrawProc
+*/
+typedef AVRect AVWindowRect;
+
+/**
+ A data structure representing a rectangle (a quadrilateral
+ having only horizontal and vertical sides) in a screen's
+ coordinate space.
+ @see AVWindowGetFrame
+ @see AVWindowSetFrame
+ @see AVWindowDidResizeProc
+ @see AVWindowWillBeResizedProc
+*/
+typedef AVRect AVScreenRect;
+
+
+/** */
+typedef struct _t_AVPoint
+{
+ /** */
+ ASInt32 h;
+ /** */
+ ASInt32 v;
+} AVPoint;
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A user-supplied callback that is called whenever the AVPageView
+ is drawn. This callback is registered using AVAppRegisterForPageViewDrawing().
+ @param pageView The AVPageView to redraw.
+ @param updateRect The rectangle enclosing the region to
+ redraw.
+ @param data User-supplied data that was passed in the
+ call to AVAppRegisterForPageViewDrawing().
+ @see AVAppRegisterForPageViewDrawing
+ @see AVAppUnregisterForPageViewDrawing
+
+ @note The numeric types have changed in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVPageViewDrawProc)(AVPageView pageView, AVDevRect* updateRect, void*data);
+
+/**
+ A user-supplied callback that is called whenever there is
+ a mouse click in its AVPageView. This callback is registered
+ using AVAppRegisterForPageViewClicks().
+ @param pageView IN/OUT The AVPageView in which the click occurred.
+ @param x IN/OUT The click's x-coordinate.
+ @param y IN/OUT The click's y-coordinate.
+ @param flags IN/OUT Modifier keys that are held down while the
+ mouse was clicked. They must be an <code>OR</code> of the Modifier Keys
+ value.
+ @param clickNo IN/OUT <code>1</code> for single click, <code>2</code> for double-click, <code>3</code>
+ for triple-click.
+ @param data IN/OUT User-supplied data that was passed in the call
+ to AVAppRegisterForPageViewClicks().
+ @return <code>true</code> if the callback handles the mouse click, <code>false</code> if it
+ does not and the click should be passed on to the next click
+ handler.
+ @see AVAppRegisterForPageViewClicks
+ @see AVAppUnregisterForPageViewClicks
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVPageViewClickProc)(AVPageView pageView, AVDevCoord x, AVDevCoord y, AVFlagBits16 flags, AVTCount clickNo, void*data);
+
+/**
+ A user-supplied callback that is called whenever the cursor
+ is moved. This callback is registered using AVAppRegisterForPageViewAdjustCursor().
+ @param pageView The AVPageView in which the cursor is
+ located.
+ @param x The cursor's x-coordinate.
+ @param y The cursor's y-coordinate.
+ @param data User-supplied data that was passed in the
+ call to AVAppRegisterForPageViewAdjustCursor().
+ @return <code>true</code> if the callback handled the cursor movement, <code>false</code>
+ if it did not and the cursor handler should be allowed to do so.
+
+ @see AVAppRegisterForPageViewAdjustCursor
+ @see AVAppUnregisterForPageViewAdjustCursor
+
+ @note The coordinate numeric types have changed in Acrobat
+ 6.0.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVPageViewCursorProc)(AVPageView pageView, AVDevCoord x, AVDevCoord y, void* data);
+#endif
+
+/**
+ Called whenever there is a key down in its AVPageView. This
+ callback is registered using AVAppRegisterForPageViewKeyDown().
+ @param pageView The AVPageView in which the keystroke
+ occurred.
+ @param keyCode An ASCII code representing the key that
+ was pressed. In some cases a different code results from
+ a key combination (for example, a <b>Control+key</b> combination
+ results in an ASCII code that is less than or equal to (<=) <code>31</code>).
+ @param flags Modifier keys that are held down while the
+ key was pressed. They must be an <code>OR</code> of the Modifier Keys
+ value.
+ @param data User-supplied data that was passed in the
+ call to AVAppRegisterForPageViewKeyDown().
+ @return <code>false</code> to process the keydown event, <code>true</code> otherwise.
+ @see AVAppRegisterForPageViewKeyDown
+ @see AVAppUnregisterForPageViewKeyDown
+
+ @note The numeric argument types have changed in Acrobat
+ 6.0.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVPageViewKeyDownProc)(AVPageView pageView, AVKeyCode keyCode, AVFlagBits16 flags, void* data);
+
+/**
+ A callback for AVDocGetPageText(). Text is passed to it in the
+ specified format.
+ @param format IN/OUT Text format. See the description of the format
+ parameter of AVDocGetPageText() for a list of the allowed
+ types.
+ @param buf IN/OUT The text.
+ @param bufLen IN/OUT Length of <code>buf</code> in bytes.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVDocGetPageText().
+ @see AVDocGetPageText
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVTextCopyProc)(ASAtom format, void *buf, AVTBufferSize bufLen, void *clientData);
+
+/************************************************************************************\
+|* *|
+|* AVMenu *|
+|* *|
+\************************************************************************************/
+
+
+/** A menu in the Acrobat viewer's menu bar. Plug-ins can create new menus, add menu
+ items at any location in any menu, and remove menu items. Deleting an AVMenu
+ removes it from the menu bar (if it was attached) and deletes all the menu items it
+ contains.
+ @see AVMenuAcquire
+ @see AVMenuNew
+ @see AVMenuItemAcquireSubmenu
+ @see AVMenuItemGetParentMenu
+ @see AVMenubarAcquireMenuByName
+ @see AVMenubarAcquireMenuByIndex
+ @see AVMenubarAcquireMenuByPredicate
+ @see AVMenuRelease
+ @see AVMenuRemove
+ @see AVMenuAddMenuItem
+ @see AVMenuGetMenuItemIndex
+ @see AVMenuGetName
+ @see AVMenuGetNumMenuItems
+ @see AVMenuGetParentMenubar
+ @see AVMenuGetParentMenuItem
+ @see AVMenuGetTitle
+*/
+typedef struct _t_AVMenu *AVMenu;
+
+
+/**
+ A callback that is called for each menu enumerated by AVMenubarAcquireMenuByPredicate().
+ The first menu for which this callback returns <code>true</code> is acquired.
+
+ @param menu IN/OUT The current menu in the enumeration.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVMenubarAcquireMenuByPredicate().
+ @return <code>true</code> to acquire the current menu and halt enumeration, <code>false</code>
+ to continue enumeration.
+ @see AVMenubarAcquireMenuByPredicate
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVMenuPredicate)(AVMenu menu, void *clientData);
+
+/**
+ Called after a context menu has been created but before
+ it is shown to the user. The callback can add menu items
+ to or remove menu items from the menu. The client must register
+ the callback using AVAppRegisterForContextMenuAddition().
+
+ <p>This callback should not raise an error. </p>
+ @param menuName The menu name.
+
+ <p>Possible values:</p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>Page</TD><TD>The standard context menu for an AVPageView.</TD></TR>
+ <TR><TD>Select</TD><TD>The context menu for selected text.</TD></TR>
+ </TABLE>
+
+ @param menu The menu object.
+ @param menuData The menu data as an AVDoc pointer.
+ @param clientData User-supplied data that was passed in
+ the call to AVAppRegisterForContextMenuAddition().
+ @see AVAppRegisterForContextMenuAddition
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVContextMenuAdditionProc)
+ (ASAtom menuName, AVMenu menu, void *menuData, void *clientData);
+
+/************************************************************************************\
+|* *|
+|* AVMenubar *|
+|* *|
+\************************************************************************************/
+
+
+/** The Acrobat viewer's menu bar and a list of all menus. There is only one AVMenubar.
+ Plug-ins can add new menus to or remove any menu from the menu bar. The menu bar
+ can be hidden from the user's view.
+ @see AVAppGetMenubar the standard way to obtain the menubar.
+ @see AVMenuGetParentMenubar
+ @see AVMenubarAddMenu
+ @see AVMenuRemove
+ @see AVMenubarAcquireMenuByIndex
+ @see AVMenubarAcquireMenuByName
+ @see AVMenubarAcquireMenuByPredicate
+ @see AVMenubarAcquireMenuItemByName
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenubarGetMenuIndex
+ @see AVMenubarGetNumMenus
+ @see AVMenuItemRemove
+ @see AVMenubarHide
+ @see AVMenubarShow
+*/
+typedef struct _t_AVMenubar *AVMenubar;
+
+#define BAD_MENUITEM_INDEX (-1)
+#define PREPEND_MENUITEM (-2)
+#define APPEND_MENUITEM (9999)
+
+#define BAD_MENU_INDEX (-1)
+#define PREPEND_MENU (-2)
+#define APPEND_MENU (9999)
+
+#define NO_SHORTCUT ('\0')
+
+/************************************************************************************\
+|* *|
+|* AVMenuItem *|
+|* *|
+\************************************************************************************/
+
+/** A menu item under a menu in the Acrobat viewer. It has a number of attributes,
+ including a name, a keyboard shortcut, a procedure to execute when the menu item is
+ selected, a procedure to compute whether the menu item is enabled, a
+ procedure to compute whether the menu item is check marked, and whether or
+ not it has a submenu.
+ @see AVMenuItemNew
+ @see AVMenuItemAcquire
+ @see AVMenubarAcquireMenuByName
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenuAcquireMenuItemByIndex
+ @see AVMenuGetParentMenuItem
+ @see AVMenuItemRelease
+ @see AVMenuItemRemove
+ @see AVMenuGetMenuItemIndex
+ @see AVMenuItemAcquireSubmenu
+ @see AVMenuItemGetLongOnly
+ @see AVMenuItemGetName
+ @see AVMenuItemGetParentMenu
+ @see AVMenuItemGetShortcut
+ @see AVMenuItemGetTitle AVMenuItemSetTitle
+ @see AVMenuItemIsEnabled
+ @see AVMenuItemIsMarked
+ @see AVMenuItemSetComputeEnabledProc
+ @see AVMenuItemSetComputeMarkedProc
+ @see AVMenuItemSetComputeVisibleProc
+ @see AVMenuItemSetExecuteProc
+*/
+typedef struct _t_AVMenuItem *AVMenuItem;
+
+/**
+ A callback that is called whenever a menu item or toolbar
+ button is executed. It implements whatever the menu item
+ or toolbar button does (for example, opening a file or initiating
+ a search).
+
+ <p>This method may also be called from an external application
+ displaying a PDF file in its window, using the ExternalDocServerCreationData
+ structure. </p>
+ @param data IN/OUT User-supplied data that was passed when AVMenuItemSetExecuteProc()
+ or AVToolButtonSetExecuteProc() were called.
+ @see AVMenuItemSetExecuteProc
+ @see AVToolButtonSetExecuteProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVExecuteProc)(void *data);
+
+/**
+ A callback that is used to determine whether a menu item,
+ toolbar button, or tool is enabled. If used for a tool,
+ it is one of the optional callbacks for AVTool.
+
+ <p>This procedure is called every time the menu or toolbar
+ button is displayed, so it should not do compute-time-intensive
+ processing. It is called before the menu item or toolbar
+ button is displayed, or before a tool is activated. If it
+ returns <code>false</code>, the menu item, toolbar button, or tool is
+ disabled; otherwise it is enabled. If this callback is <code>NULL</code>,
+ the menu item, toolbar button, or tool is always enabled. </p>
+
+ <p>Each menu item, toolbar button, or tool can have its own
+ AVComputeEnabledProc(), or they can be shared. </p>
+
+ @param data User-supplied data that was passed in the
+ call to AVMenuItemSetComputeEnabledProc() or AVToolButtonSetComputeEnabledProc().
+ @return <code>true</code> if the menu item, toolbar button, or tool is enabled,
+ <code>false</code> otherwise.
+ @see AVMenuItemSetComputeEnabledProc
+ @see AVToolButtonSetComputeEnabledProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVComputeEnabledProc)(void *data);
+
+/**
+ A callback that is used to determine whether a menu
+ item or toolbar button is marked (a marked menu item has
+ a check mark next to it, and a marked toolbar button appears
+ selected). It is called before the menu item or toolbar
+ button is displayed. If it returns <code>false</code>, the menu item
+ of toolbar button is not marked; otherwise it is marked.
+
+ <p>Each menu item and toolbar button can have is own AVComputeMarkedProc,
+ or they can be shared.</p>
+ @param data IN/OUT User-supplied data that was passed in the call
+ to AVMenuItemSetComputeMarkedProc() or AVToolButtonSetComputeMarkedProc().
+
+ @return <code>true</code> if the menu item or toolbar button is marked, <code>false</code>
+ otherwise.
+ @see AVMenuItemSetComputeMarkedProc
+ @see AVToolButtonSetComputeMarkedProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVComputeMarkedProc)(void *data);
+
+/**
+ A callback that is used to determine whether a toolbar button,
+ menu item, or HowTo panel is visible when its parent is
+ opened. It is called before the item is displayed. If it
+ returns <code>true</code>, the item is visible; otherwise it is not visible.
+
+ <p>Each toolbar button, menu item, or HowTo panel can have
+ its own visibility procedure, or they can be shared. </p>
+
+ <p>Because the procedure is called whenever the item is displayed,
+ it should not do any resource-intensive computing. </p>
+ @param data User-supplied data that was passed in the
+ call to AVMenuItemSetComputeVisibleProc(), AVToolButtonSetComputeVisibleProc(),
+ or AVAppSetHowToPanelComputeVisibleProc().
+ @return <code>true</code> if the item is visible, <code>false</code> otherwise.
+ @see AVAppSetHowToPanelComputeVisibleProc
+ @see AVMenuItemSetComputeVisibleProc
+ @see AVToolButtonSetComputeVisibleProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVComputeVisibleProc)(void *data);
+
+
+/**
+ A callback that is called for each menu item enumerated by
+ AVMenubarAcquireMenuItemByPredicate(). The first menu item
+ for which this callback returns <code>true</code> is acquired.
+ @param menuItem IN/OUT The current menu item in the enumeration.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVMenubarAcquireMenuItemByPredicate().
+ @return <code>true</code> to acquire the current menu item and halt enumeration,
+ <code>false</code> to continue enumeration.
+ @see AVMenubarAcquireMenuItemByPredicate
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVMenuItemPredicate)(AVMenuItem menuItem, void *clientData);
+
+
+/**
+ A callback that is used to get the mega-tooltip help text
+ for a toolbar button.
+
+ <p>It is called whenever the mouse hovers long enough to display
+ the mega-tooltip. </p>
+
+ <p>Each toolbar button can have its own AVGetTooltipProc(), or
+ they can be shared.</p>
+ @param data IN/OUT User-supplied data that was passed in the call
+ to AVToolButtonSetGetTooltipProc() or AVToolButtonSetComputeEnabledProc().
+ @param enabled IN Specifies whether the button is enabled.
+
+ @return <code>true</code> if the menu item, toolbar button, or tool is enabled,
+ <code>false</code> otherwise.
+ @see AVMenuItemSetComputeEnabledProc
+ @see AVToolButtonSetComputeEnabledProc
+*/
+typedef ACCBPROTO1 ASText (ACCBPROTO2 *AVComputeTooltipProc)(void *data, ASBool enabled);
+
+
+/**
+ A callback that is called whenever the mouse hovers long enough
+ to display the tooltip text. It returns text that is displayed
+ in the tooltip.
+
+ <p>Each toolbar button can have its own tooltip procedure,
+ or they can be shared. </p>
+ @param data User-supplied data that was passed in the
+ call to AVToolButtonSetNotifyTooltipProc().
+ @see AVToolButtonSetNotifyTooltipProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVNotifyTooltipProc)(void *data);
+
+
+/************************************************************************************\
+|* *|
+|* AVDoc *|
+|* *|
+\************************************************************************************/
+
+
+/**
+ A callback used by AVAppEnumDocs(). It is called once for each
+ open AVDoc.
+ @param doc IN/OUT The current document. Do not close this AVDoc
+ in this callback function.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVAppEnumDocs().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see AVAppEnumDocs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocEnumProc)(AVDoc doc, void *clientData);
+
+/**
+ A user-supplied callback that is passed in the call to AVDocEnumSelection.
+ It is called once for each 'item' in the selection.
+
+ <p>AVDocEnumSelection() calls the AVDocSelectionEnumSelectionProc()
+ for the current selection's server to actually enumerate
+ the selection. </p>
+ @param doc The document whose selection is enumerated.
+
+ @param clientData User-supplied data that was passed in
+ the call to AVDocEnumSelection().
+ @param aSelectedObject The selected item currently being
+ enumerated. The format of the data is up to the selection
+ server. See AVDocSetSelection() for a list of the data formats
+ for the Acrobat viewer's built-in selection servers.
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see AVDocEnumSelection
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVSelectionEnumProc)(AVDoc doc, void *clientData, void *aSelectedObject);
+
+/**
+ A user-supplied callback that is passed in the call to AVDocSelectionEnumPageRanges().
+ It is called once for each page in the selection, and consecutive
+ pages are grouped into a single page range.
+ @param doc The document whose selection is enumerated.
+
+ @param clientData User-supplied data that was passed in
+ the call to AVDocSelectionEnumPageRanges().
+ @param firstPage The first page in a consecutive range
+ of pages with a selection.
+ @param lastPage The first page in a consecutive range
+ of pages with a selection.
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see AVDocEnumSelection
+ @see AVDocSelectionEnumPageRanges
+
+ @note The page number numeric type has changed in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVSelectionPageRangeEnumProc)(
+ AVDoc doc, void *clientData, PDPageNumber firstPage, PDPageNumber lastPage);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It returns the selection
+ type this server handles (for example, <code>'Text'</code> or <code>'Bookmark'</code>).
+ This information is used so that the Acrobat viewer knows
+ which selection server to call.
+ @return The selection type this selection server handles.
+ @see AVDocGetSelectionServerByType
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *AVDocSelectionGetTypeProc)( void);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It is called when the
+ selection is set (for example, via <code>AVDocSetSelection()</code>).
+
+ <p>In addition to its other functionality, this callback must also highlight
+ the specified selection, if requested, using
+ the selection server's <code>AVDocSelectionHighlightSelectionProc()</code> callback. </p>
+ @param doc IN/OUT The document containing the selection.
+ @param selData IN/OUT The selection data being added.
+ @param highlight IN/OUT If <code>true</code>, highlight the selection, <code>false</code>
+ otherwise.
+ @see AVDocSetSelection
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionGettingSelectionProc)(AVDoc doc, void *selData, ASBool highlight);
+
+/**
+ A callback for <code>AVDocSelectionServer</code> that adds the specified item
+ to the selection, highlights it, and returns the new selection
+ containing the newly-added item.
+ @param doc IN/OUT The document containing the data to add to the
+ selection.
+ @param curData IN/OUT Data representing the current selection.
+ Its format is specific to the selection server.
+ @param addData IN/OUT The item to add to the selection.
+ @param highlight IN/OUT <code>true</code> if the selection should be highlighted
+ (because it has not already been highlighted), <code>false</code> if
+ the selection should not be highlighted (because it has
+ already been highlighted by whatever called this callback).
+ See <code>AVDocSetSelection()</code> for additional information on highlighting.
+
+ @return New selection data containing all current selections (that
+ is, the previous selection plus the newly-added selection),
+ or <code>NULL</code> if failure occurred. If the selection server allows only
+ a single item to be selected at a time, clear the previous
+ selection, highlight the selection specified by <code>addData</code>
+ (if <code>highlight</code> is <code>true</code>), and simply return <code>addData</code>.
+ @see AVDocSelectionRemovedFromSelectionProc
+*/
+typedef ACCBPROTO1 void* (ACCBPROTO2 *AVDocSelectionAddedToSelectionProc)( AVDoc doc, void *curData, void *addData, ASBool highlight);
+
+/**
+ <p>A callback for <code>AVDocSelectionServer</code>. This method is called
+ by <code>AVDocClearSelection</code> (among others), to let the selection
+ server responsible for the old selection do whatever cleanup
+ it needs. </p>
+
+ <p>In addition to its other functionality, it
+ must de-highlight the specified selection (if requested),
+ using the selection server's AVDocSelectionHighlightSelectionProc()
+ callback. </p>
+ @param doc The document whose selection is cleared.
+ @param selData The current selection data.
+ @param highlight If <code>true</code>, the selection specified by <code>selData</code>
+ should be de-highlighted, <code>false</code> otherwise.
+ @see AVDocClearSelection
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionLosingSelectionProc)( AVDoc doc, void* selData, ASBool highlight);
+
+/**
+ A callback for <code>AVDocSelectionServer</code> that de-highlights the old
+ item given in <code>remData</code>, and returns a new <code>curData</code> or <code>NULL</code>
+ if failure occurred.
+ @param doc IN/OUT The document in which an item is removed from
+ the selection.
+ @param curData IN/OUT The current selection data.
+ @param remData IN/OUT The item to remove from the selection. The
+ content and format of <code>selData</code> differs for each selection
+ server, and are decided by the selection server's implementors.
+ @param highlight IN/OUT If <code>true</code>, the item removed should be de-
+ highlighted. If <code>false</code>, it should not.
+ @return The new selection data after the specified item has been
+ removed.
+ @see AVDocSelectionAddedToSelectionProc
+*/
+typedef ACCBPROTO1 void* (ACCBPROTO2 *AVDocSelectionRemovedFromSelectionProc)( AVDoc doc, void *curData, void *remData, ASBool highlight);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It is used to determine
+ whether the current selection type can perform a <i>select
+ all</i> operation. This controls whether the Select All menu
+ item is enabled.
+ @param doc The document containing the current selection.
+ @param selData The current selection's data.
+ @return <code>true</code> if <i>select all</i> can be performed on the current selection
+ type, <code>false</code> otherwise.
+ @see AVDocSelectionSelectAllProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCanSelectAllProc)( AVDoc doc, void* selData);
+
+/**
+ A callback for <code>AVDocSelectionServer</code> that selects all items of
+ the current type.
+ @param doc IN/OUT The document in which the Select All is performed.
+ @param selData IN/OUT The current selection data in <code>doc</code>.
+ @return The new selection data after all items of the specified
+ type have been selected.
+ @see AVDocSelectionCanSelectAllProc
+*/
+typedef ACCBPROTO1 void* (ACCBPROTO2 *AVDocSelectionSelectAllProc)( AVDoc doc, void* selData);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It is used to determine
+ whether the current selection has user-specified properties.
+ This controls whether the Properties menu item is enabled.
+
+ <p>The Properties menu item will not be enabled if the selection
+ server does not have a AVDocSelectionPropertiesProc() callback.</p>
+
+ @param doc The document containing the current selection.
+ @param selData The current selection data.
+ @return <code>true</code> if the current selection has a Properties user interface, <code>false</code>
+ otherwise.
+ @see AVDocDoSaveAsWithParams
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCanPropertiesProc)( AVDoc doc, void* selData);
+
+/**
+ (Optional) A callback for <code>AVDocSelectionServer</code> that displays the
+ <b>set properties</b> user interface, if any, for the selection
+ server and lets the user set the server's properties. This
+ callback is not needed unless the selection server has properties
+ that can be set by the user (for example, text highlight
+ color). This callback is called by AVDocDoSaveAsWithParams().
+ @param doc IN/OUT The document in which the selection server's
+ properties are set.
+ @param selData IN/OUT The current selection data.
+ @see AVDocDoSaveAsWithParams
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionPropertiesProc)( AVDoc doc, void* selData);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It is used to determine
+ whether the current selection can be deleted. This controls,
+ for example, whether the Delete menu item is enabled.
+
+ <p>The Delete menu item is only enabled if the selection server's
+ AVDocSelectionCanDeleteProc() returns <code>true</code> and the selection
+ server has an AVDocSelectionDeleteProc(). </p>
+ @param doc The document containing the current selection.
+ @param selData The current selection data.
+ @return <code>true</code> if the current selection can be deleted, <code>false</code> otherwise.
+ @see AVDocSelectionCanDeleteProc
+ @see AVDocDeleteSelection
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCanDeleteProc)( AVDoc doc, void* selData);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It deletes the current selection.
+
+ @param doc IN/OUT Document whose selection is deleted.
+ @param selData IN/OUT The current selection in <code>doc</code>.
+ @return <code>true</code> if the data was actually deleted, <code>false</code> otherwise.
+ @see AVDocDeleteSelection
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionDeleteProc)( AVDoc doc, void* selData);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It is used to determine
+ whether the current selection can be copied. This
+ controls, for example, whether the Copy menu item
+ is enabled.
+
+ <p>The Copy menu item is only enabled if the selection server's
+ AVDocSelectionCanCopyProc() returns <code>true</code> and the selection
+ server has an AVDocSelectionCopyProc(). </p>
+ @param doc IN/OUT The document containing the selection.
+ @param selData IN/OUT The current selection data.
+ @return <code>true</code> if the current selection can be copied, <code>false</code> otherwise.
+ @see AVDocSelectionCopyProc
+ @see AVDocCopySelection
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCanCopyProc)( AVDoc doc, void* selData);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It copies the selected
+ item to the clipboard. The Acrobat viewer will have already
+ cleared the clipboard and placed some private data onto
+ it, in order to identify the selection server that put
+ data on the clipboard. Because of this, a plug-in must
+ not clear the clipboard, and should only add its private data.
+ In addition, if the current selection can be reasonably
+ represented as text, plug-ins are strongly encouraged to
+ place a text representation of the selection onto the clipboard,
+ in addition to their own private format.
+ @param doc IN/OUT The document whose selection is copied.
+ @param selData IN/OUT The current selection data in <code>doc</code>.
+ @return <code>true</code> if the data was actually copied, <code>false</code> otherwise.
+ @see AVDocCopySelection
+ @see UnixAppClipboardGetItemId
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCopyProc)( AVDoc doc, void* selData);
+
+/**
+ (Optional) A callback for <code>AVDocSelectionServer</code>. It is called by
+ AVDocEnumSelection(). This callback enumerates the current
+ selection, calling the specified AVSelectionEnumProc() for
+ each item in the selection (the selection server is free
+ to decide what constitutes an item).
+
+ <p>If omitted, the selection is enumerated by calling <code>proc</code>
+ once, passing the entire selection to it. </p>
+ @param doc IN/OUT The document whose selection is enumerated.
+ @param data IN/OUT The current selection in <code>doc</code>.
+ @param proc IN/OUT The procedure to call for each item in the
+ selection. This callback must halt enumeration if <code>proc</code> returns
+ <code>false</code>, and continue enumeration if <code>proc</code> returns <code>true</code>.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVDocEnumSelection(). Pass this as the client data
+ each time <code>proc</code> is called.
+ @see AVDocSelectionEnumPageRangesProc
+ @see AVDocEnumSelection
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionEnumSelectionProc)( AVDoc doc, void *data, AVSelectionEnumProc proc, void *clientData);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It changes the view (for
+ example, by scrolling the current page or moving to the
+ appropriate page) so that the current selection is visible.
+
+ @param doc IN/OUT The document whose selection is displayed.
+ @param data IN/OUT The current selection data in <code>doc</code>.
+ @see AVDocShowSelection
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionShowSelectionProc)( AVDoc doc, void *data);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It is used to determine
+ whether the current selection can be cut. This controls,
+ for example, whether the Cut menu item is enabled.
+
+ <p>The Cut menu item is only enabled if the selection server's
+ AVDocSelectionCanCutProc() returns <code>true</code> and the selection
+ server has an AVDocSelectionCutProc(). </p>
+ @param doc The document containing the current selection.
+ @param data The current selection data.
+ @return <code>true</code> if the current selection can be cut, <code>false</code> otherwise.
+ @see AVDocSelectionCutProc
+ @see AVDocSelectionCanPasteProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCanCutProc)( AVDoc doc, void* data);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It cuts the current selection.
+ See the discussion under AVDocSelectionCopyProc() for information
+ on how the selection server must use the clipboard.
+ @param doc IN/OUT Document whose selection is cut.
+ @param data IN/OUT The current selection data in <code>doc</code>.
+ @return <code>true</code> if the data was actually cut, <code>false</code> otherwise.
+ @see UnixAppClipboardGetItemId
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCutProc)( AVDoc doc, void* data);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It is used to determine
+ whether the current selection can be pasted. This
+ controls, for example, whether the Paste menu item
+ is enabled.
+
+ <p>The Paste menu item is only enabled if the selection server's
+ AVDocSelectionCanPasteProc() returns <code>true</code> and the selection
+ server has an AVDocSelectionPasteProc(). </p>
+ @param doc IN/OUT The document into which the selection is pasted.
+ @return <code>true</code> if the data currently on the clipboard can be pasted,
+ <code>false</code> otherwise.
+ @see AVDocSelectionPasteProc
+ @see AVDocSelectionCanCutProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCanPasteProc)( AVDoc doc );
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It pastes the current selection
+ from the clipboard.
+ @param doc IN/OUT The document into whose selection the clipboard
+ is pasted.
+ @see AVDocSelectionCutProc
+ @see AVDocSelectionCanPasteProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionPasteProc)( AVDoc doc );
+
+/**
+ (Optional) A callback for <code>AVDocSelectionServer</code>. It handles a
+ key press. It is needed only if the selection server processes
+ key presses.
+ @param doc The document in which the click occurred.
+ @param data The current selection data for <code>doc</code>.
+ @param key The key that was pressed.
+ @param flags Modifier keys that were pressed with <code>key</code>.
+ It must be an <code>OR</code> of the Modifier Keys values.
+ @return <code>true</code> if it the keypress was handled, <code>false</code> if it was not
+ and therefore needs to be passed to the next procedure in
+ the key handling chain.
+
+ @note The <code>key</code> and <code>flags</code> numeric types changed in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionKeyDownProc)( AVDoc doc, void* data, AVKeyCode key, AVFlagBits16 flags);
+
+/**
+ (Previously known as <code>AVDocHighlightSelectionProc</code>) Callback
+ for <code>AVDocSelectionServer</code>. It highlights the selection. This
+ method is unnecessary if the selection type highlights itself
+ (as in the case of annotations).
+ @param doc The document containing the selection.
+ @param data The current selection data. Its content and
+ organization are decided by the selection server for the current
+ selection type.
+ @see AVDocSelectionHighlightSelectionExProc
+ @see AVDocSelectionGettingSelectionProc
+ @see AVDocSelectionLosingSelectionProc
+
+ @note Superseded by <code>AVDocSelectionHighlightSelectionExProc</code>
+ in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionHighlightSelectionProc)(AVDoc doc, void* data);
+
+/* When this call is made you should highlight your selection. It is
+ normally called when an update event is being processed for a page
+ view. The page view passed into this call is the one being updated
+ and might not be the active page view returned by AVDocGetPageView().
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionHighlightSelectionExProc)(AVDoc doc, AVPageView pageView, void* data);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It provides a way for
+ a single selection server to register different selection
+ types based on the selection data. If this callback is not
+ supplied, the selection type defaults to the return value
+ from AVDocSelectionGetTypeProc().
+
+ <p>This callback does not affect existing selection servers. </p>
+
+ @param doc IN/OUT The document containing the selection.
+ @param data IN/OUT The current selection data. Its content and
+ organization are decided by the selection server for the current
+ selection type.
+ @see AVDocSelectionGetTypeProc
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *AVDocSelectionGetSelectionTypeProc)(AVDoc doc, void* data);
+
+/**
+ A callback for <code>AVDocSelectionServer</code>. It allows enumeration
+ of the set of pages the selection covers.
+ @param doc IN/OUT The document containing the selection.
+ @param selectionData IN/OUT The current selection data. Its content
+ and organization are decided by the selection server for the current
+ selection type.
+ @param enumProc IN/OUT The current selection data. Its content
+ and organization are decided by the selection server for the current
+ selection type.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVDocSelectionEnumPageRanges().
+ @see AVDocSelectionEnumSelectionProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionEnumPageRangesProc)(
+ AVDoc doc, void *selectionData,
+ AVSelectionPageRangeEnumProc enumProc, void *clientData);
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ Called to identify the bounding rectangle of a selection.
+ It is used by the Info palette to display the width and height
+ of the selection.
+
+ <p>Rectangle coordinates are in device space. </p>
+ @param doc The document containing the selection.
+ @param pageNo The number of the page containing the bounding
+ rectangle.
+ @param rect (Filled by the callback) The bounding rectangle
+ of the selection.
+ @param data Server-dependent selection data.
+ @return <code>true</code> if the bounding rect was successfully determined, <code>false</code>
+ otherwise.
+
+ @note The page number numeric type has changed in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionGetAVRectProc)(AVDoc doc, PDPageNumber pageNo, AVDevRect* rect, void* data);
+
+/**
+ Called to request that the selection server display a context
+ menu appropriate for the current selection.
+
+ <p>The given coordinates provide a suggested location for displaying
+ the menu and are in device space for the current AVPageView. </p>
+
+ @param doc The document containing the selection.
+ @param data Server-dependent selection data.
+ @param x The x-coordinate of the point specifying the
+ upper left corner of the menu.
+ @param y The y-coordinate of the point specifying the
+ upper left corner of the menu.
+ @return <code>true</code> if the server showed the menu successfully, <code>false</code> otherwise.
+
+ @note The coordinate types have changed in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionShowMenuProc)(AVDoc doc, void *data, AVDevCoord x, AVDevCoord y);
+#endif
+
+/**
+ A callback for <code>AVDocSelectionServer</code> that gets a quad-based
+ region for the selection.
+ @param doc The document containing the selection.
+ @param data The current selection data. Its content and
+ organization are decided by the selection server for the current
+ selection type.
+ @param pageNum The page number of the selection.
+ @param quads (Filled by the method.) A pointer to an array
+ of quads, or <code>NULL</code>. If it is non-<code>NULL</code>, the selection server allocates
+ an array of ASFixedQuad objects in user space describing the selection,
+ and stores a pointer to the array at <code>*quad</code>. If <code>NULL</code>, the
+ selection server returns the number of quads in the selection
+ without allocating an array.
+ @return The number of quads in the selection.
+
+ @note This procedure is new in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 ASArraySize (ACCBPROTO2 *AVDocSelectionAcquireQuadsProc)(AVDoc doc, void *data, ASInt32 pageNum, ASFixedQuad **quads);
+
+/**
+ Determines whether a selection can be pasted.
+ @param doc The document containing the selection.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionCanPasteFromPlatformProc)( AVDoc doc );
+
+/**
+ Paste the selection.
+ @param doc The document containing the selection.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVDocSelectionPasteFromPlatformProc)( AVDoc doc );
+
+/**
+ (Optional) A callback for <code>AVDocSelectionServer</code>. It handles a
+ key press using Unicode values. It is needed only if the selection server
+ processes key presses.
+
+ <p>If this callback is provided, all key events will be passed to
+ it; the <code>KeyDown</code> callback will never be called.</p>
+
+ <p>The application may pass several Unicode characters to the
+ <code>UnicodeKeyDown</code> callback. For example, if the user invokes
+ an IME to compose a string of text, the entire text string
+ may be passed to the <code>UnicodeKeyDown</code> callback at once. This
+ behavior may also vary across platforms. If the callback
+ returns <code>true</code> the application assumes the selection server
+ processed all of the characters; if the callback returns
+ <code>false</code> the viewer assumes the selection server processed
+ none of the characters.</p>
+
+ @param doc The document in which the keyboard event occurred.
+ @param data The current selection data for <code>doc</code>.
+ @param numUTF16Vals The number of UTF-16 values being passed.
+ @param utf16Vals The host-endian UTF-16 values.
+ @param flags Modifier keys that were pressed with <code>key</code>.
+ It must be an <code>OR</code> of the Modifier Keys values.
+ @return <code>true</code> if it the keypress was handled, <code>false</code> if it was not
+ and therefore needs to be passed to the next procedure in
+ the key handling chain.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVDocSelectionUnicodeKeyDownProc)( AVDoc doc, void* data, ASCount numUTF16Vals, const ASUTF16Val* utf16Vals, AVFlagBits16 flags);
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A data structure containing callbacks that implement a selection
+ server. The callbacks implement the selection server functions.
+ For example, they can add an item to the selection, remove an item
+ from the selection, or copy the current selection to the clipboard.
+
+ @see AVDocRegisterSelectionServer
+ @see AVDocGetSelectionServerByType
+*/
+typedef struct _t_AVDocSelectionServer {
+
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVDocSelectionServerRec)</code>.*/
+ ASSize_t size;
+
+ /** Obsolete. Use the Type field instead. */
+ AVDocSelectionGetTypeProc GetType;
+
+ /** Highlight the seclection. */
+ AVDocSelectionGettingSelectionProc GettingSelection;
+
+ /** Add the item to the selection. */
+ AVDocSelectionAddedToSelectionProc AddedToSelection;
+
+ /** De-highlight the selection. */
+ AVDocSelectionLosingSelectionProc LosingSelection;
+
+ /** Remove the item from the selection. */
+ AVDocSelectionRemovedFromSelectionProc RemovedFromSelection;
+
+ /** Determine whether the current selection type can perform a <i>select all</i> operation. */
+ AVDocSelectionCanSelectAllProc CanSelectAll;
+
+ /** Select all items of the current type. */
+ AVDocSelectionSelectAllProc SelectAll;
+
+ /** Determine whether the current selection has user-specified properties. */
+ AVDocSelectionCanPropertiesProc CanProperties;
+
+ /** Display the <b>set properties</b> user interface. */
+ AVDocSelectionPropertiesProc Properties;
+
+ /** Determine whether the current selection can be deleted. */
+ AVDocSelectionCanDeleteProc CanDelete;
+
+ /** Delete the current selection. */
+ AVDocSelectionDeleteProc Delete;
+
+ /** Determine whether the current selection can be copied. */
+ AVDocSelectionCanCopyProc CanCopy;
+
+ /** Copy the selected item to the clipboard. */
+ AVDocSelectionCopyProc Copy;
+
+ /** Enumerates the current selection. */
+ AVDocSelectionEnumSelectionProc EnumSelection;
+
+ /** Change the view so that the current selection is visible. */
+ AVDocSelectionShowSelectionProc ShowSelection;
+
+ /** Determine whether the current selection can be cut. */
+ AVDocSelectionCanCutProc CanCut;
+
+ /** Cut the current selection. */
+ AVDocSelectionCutProc Cut;
+
+ /** Determine whether the current selection can be pasted. */
+ AVDocSelectionCanPasteProc CanPaste;
+
+ /** Paste the current selection from the clipboard. */
+ AVDocSelectionPasteProc Paste;
+
+ /** Handles a key press. */
+ AVDocSelectionKeyDownProc KeyDown;
+
+ /** Highlight the selection. */
+ AVDocSelectionHighlightSelectionProc HighlightSelection;
+
+ /** Get the selection type so that a single selection server can register different selection
+ types based on the selection data. */
+ AVDocSelectionGetSelectionTypeProc GetSelectionType;
+
+ /** Allow enumeration of the set of pages the selection covers. */
+ AVDocSelectionEnumPageRangesProc EnumPageRanges;
+
+ /** Deprecated. */
+ oldAVDocSelectionGetAVRectProc oldGetAVRect;
+
+ /** Deprecated. */
+ oldAVDocSelectionShowMenuProc oldShowMenu;
+
+ /** Identify the bounding rectangle of a selection. */
+ AVDocSelectionGetAVRectProc GetAVRect;
+
+ /** Request that the selection server display a context
+ menu appropriate for the current selection. */
+ AVDocSelectionShowMenuProc ShowMenu;
+
+ /** Highlight the selection. */
+ AVDocSelectionHighlightSelectionExProc HighlightSelectionEx;
+
+ /** Get a quad-based region for the selection. */
+ AVDocSelectionAcquireQuadsProc AcquireQuads;
+
+ /** Determine whether a selection can be pasted. */
+ AVDocSelectionCanPasteFromPlatformProc CanPasteFromPlatform;
+
+ /** Paste the selection. */
+ AVDocSelectionPasteFromPlatformProc PasteFromPlatform;
+
+ /** Handles a key press using Unicode values. */
+ AVDocSelectionUnicodeKeyDownProc UnicodeKeyDown;
+
+ /** The selection type. */
+ ASAtom Type;
+
+} AVDocSelectionServerRec, *AVDocSelectionServer;
+#endif
+
+
+
+/* Keys for the new Cab-based <code>ViewDef</code>; for use with the <code>ViewDefEx</code> methods */
+
+/** <code>boolean</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyBringToFront "bringToFront"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewLayoutMode "pageViewLayoutMode"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewPageNum "pageViewPageNum"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewZoomType "pageViewZoomType"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewZoom "pageViewZoom"
+
+/** <code>int</code> */
+#define kAVDocViewDefKeyPageViewX "pageViewX"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewY "pageViewY"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewStartThread "pageViewStartThread"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewThreadIndex "pageViewThreadIndex"
+
+/** binary: <code>PDBead</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyPageViewBead "pageViewBead"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyOverViewMode "overViewMode"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyOverViewPos "overViewPos"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyOverViewX "overViewX"
+
+/** <code>int</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyOverViewY "overViewY"
+
+/** binary: <code>AVRect</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyWindowFrame "windowFrame"
+
+/** binary: <code>AVRect</code>
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyWindowMaximized "windowMaximized"
+
+/** cab
+ @ingroup AVDocViewDef
+*/
+#define kAVDocViewDefKeyOCGStates "ocgStates"
+
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A structure that defines a view of a document, including page,
+ zoom, and so on.
+ @see AVDocGetViewDef
+ @see AVDocSetViewDef
+
+ @note Numeric types have changed in Acrobat 6.0, and the
+ AVDocGetViewDef() and AVDocSetViewDef() methods have been superseded
+ by AVDocGetViewDefEx() and AVDocSetViewDefEx().
+
+ @ingroup AVDocViewDef
+*/
+typedef struct _t_AVDocViewDef
+{
+
+ /** The size of the data structure. It must be set to <code>sizeof( AVDocViewDef)</code>. */
+ ASSize_t size;
+
+
+ /** If <code>true</code>, bring the window to the front; if <code>false</code>, do not bring the window to the front. */
+ ASBool bringToFront;
+
+
+ /** If <code>true</code>, use the next 6 page view fields. If <code>false</code>, do not use them. */
+ ASBool usePageViewInfo; /* pageview info */
+
+ /** The page layout mode; it must be one of PDLayoutMode.
+ @see PDLayoutMode
+ */
+ PDLayoutMode pageViewLayoutMode;
+
+ /** The page number. */
+ PDPageNumber pageViewPageNum;
+
+ /** The zoom type; it must be one of AVZoomType.
+ @see AVZoomType
+ */
+ AVZoomType pageViewZoomType;
+
+ /** The zoom factor; it is used if <code>pageViewZoomType</code> is AVZoomNoVary. Use zero to inherit the zoom. */
+ ASFixed pageViewZoom;
+
+ /** The x-coordinate to scroll to. */
+ AVDevCoord pageViewX;
+
+ /** The y-coordinate to scroll to. */
+ AVDevCoord pageViewY;
+
+
+ /** If <code>true</code>, use the next two article thread fields. If <code>false</code>, do not use them. */
+ ASBool pageViewStartThread;
+
+ /** The current thread index. */
+ AVPageIndex pageViewThreadIndex;
+
+ /** The current PDBead. */
+ PDBead pageViewBead;
+
+
+ /** If <code>true</code>, use the next four view fields. If <code>false</code>, do not use them. */
+ ASBool useOverViewInfo;
+
+ /** The PDPageMode to use.
+ @see PDPageMode
+ */
+ PDPageMode overViewMode;
+
+ /** The position of the splitter. */
+ AVPixelOffset overViewPos;
+
+ /** The x-coordinate to scroll to in the bookmark or thumbnail pane.*/
+ ASInt32 overViewX;
+
+ /** The y-coordinate to scroll to in the bookmark or thumbnail pane. */
+ ASInt32 overViewY;
+
+ /** If <code>true</code>, use the <code>windowFrame</code> field. If <code>false</code>, do not use it.*/
+ ASBool useWindowInfo;
+
+ /** The new window frame in which to display the document.*/
+ AVScreenRect windowFrame;
+
+ /** Is the window frame maximized. */
+ ASBool windowMaximized;
+
+ /** Currently unused. */
+ const char* unused2; /* obsolete */
+
+} AVDocViewDefRec, *AVDocViewDef;
+
+#endif
+
+
+/**
+ A data structure representing a destination in a PDF document.
+ An AVDestInfo carries all the information that a PDViewDestination
+ can. It is used for ensuring that cross-document links in external
+ windows act as expected, so a client can go to a destination
+ without building it via PDViewDestCreate(), which does not
+ work on read-only documents.
+ @see AVPageViewToDestInfo
+ @see AVPageViewUseDestInfo
+ @see AVDestInfoDestroy
+*/
+typedef struct _t_AVDestInfo
+{
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVDestInfo)</code>.*/
+ ASSize_t size;
+
+
+ /** The named destination associated with this destination. If this is non-<code>NULL</code>, the other attributes
+ are ignored. This destination may contain multi-byte characters.*/
+ const char* namedDest;
+
+ /** The length of <code>namedDest</code> in bytes. */
+ AVTArraySize nameLength;
+
+ /** The page number of the destination view. */
+ PDPageNumber pageNum;
+
+ /** The fit type of the destination view. It must be one of View Destination Fit Types.
+ @ref ViewDestinationFitTypes
+ */
+ ASAtom fitType;
+
+ /** A rectangle enclosing the destination view. */
+ ASFixedRect destRect;
+
+ /** The zoom factor of the destination view. Use zero to inherit the zoom. */
+ ASFixed zoom;
+
+} AVDestInfoRec, *AVDestInfo;
+
+
+/**
+ A callback that can be associated with an AVDoc when it
+ is opened (via an AVDocOpenParamsRec). It can restrict the
+ set operations allowed on the document. When AVDocPermRequest()
+ is called, this callback must be consulted to deny or grant
+ the permission. If it denies permission, AVDocPermRequest()
+ will also deny permission. If it grants permission, the
+ security handler for the document will be consulted to determine
+ the result of AVDocPermRequest(). This callback can only deny
+ permissions allowed by the security handler; it cannot grant
+ permissions that the security handler does not grant.
+ @param doc IN/OUT The current document.
+ @param obj IN/OUT Description of target object.
+ @param opr IN/OUT Description of target operation.
+ @return The status.
+*/
+typedef ACCBPROTO1 PDPermReqStatus (ACCBPROTO2 *AVDocPermReqProc)(AVDoc doc, PDPermReqObj obj, PDPermReqOpr opr);
+
+
+/************************************************************************************\
+|* *|
+|* AVWindow *|
+|* *|
+\************************************************************************************/
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ Creates and manages windows. Plug-ins should use AVWindows for their own
+ dialog boxes, floating palettes, and so on, to ensure that those windows work well with
+ the Acrobat viewer. For example, under Windows they are hidden when the Acrobat
+ viewer is turned into an icon. Once your plug-in creates an AVWindow, it is free to use
+ platform-dependent code to put whatever you would like in the window.
+ @see AVWindowNew
+ @see AVWindowNewFromPlatformThing
+ @see AVDocGetAVWindow
+ @see AVWindowDestroy
+ @see AVWindowUserClose
+ @see AVWindowDrawNow
+ @see AVWindowGetFrame
+ @see AVWindowSetFrame
+ @see AVWindowGetInterior
+ @see AVWindowGetOwnerData
+ @see AVWindowSetOwnerData
+ @see AVWindowGetPlatformThing
+ @see AVWindowGetTitle
+ @see AVWindowSetTitle
+ @see AVWindowIsKey
+ @see AVWindowBecomeKey
+ @see AVWindowSetWantsKey
+ @see AVWindowResignKey
+ @see AVWindowBringToFront
+ @see AVWindowIsVisible
+ @see AVWindowShow
+ @see AVWindowHide
+ @see AVWindowInvalidateRect
+ @see AVWindowMaximize
+*/
+#ifndef _T_AVWINDOW
+#define _T_AVWINDOW
+
+#ifdef __cplusplus
+class AVBaseWindow;
+typedef AVBaseWindow* AVWindow;
+#else
+typedef struct _t_AVWindow *AVWindow;
+#endif // __cplusplus
+
+#endif // _T_AVWINDOW
+
+#endif // ACRO_SDK_LEVEL
+
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ Parameters used when opening a file.
+
+ <p>In UNIX, it is not possible to set the frame of the <code>NULL</code>
+ document (that is, the window to show when no document is
+ open) using this data structure. </p>
+ @see AVAppOpenHelpFileWithParams
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+
+typedef struct _t_AVDocOpenParams
+{
+
+ /** The size of the data structure. It must be set to <code>sizeof( AVDocOpenParamsRec)</code>. */
+ ASSize_t size;
+
+
+ /** If <code>true</code>, <code>frame</code> is used to specify the size
+ and location of the window into which the document is opened.
+ If <code>false</code>, <code>frame</code> is ignored and the default frame is used
+ instead. See also <code>visible</code>.
+ */
+ ASBool useFrame;
+
+ /** An AVRect specifying the size and location
+ of the window into which the document is opened. On Mac
+ OS, the coordinates are global screen coordinates. On Windows,
+ the coordinates are MDI client coordinates. See also <code>visible</code>.
+ */
+ AVScreenRect frame;
+
+
+ /** If <code>true</code>, <code>visible</code> is used to determine
+ whether the window is visible after the document
+ is opened. If <code>false</code>, <code>visible</code> is ignored. See also <code>visible</code>.
+ */
+ ASBool useVisible;
+
+ /** Specifies the window's visibility. If <code>visible</code>
+ is <code>false</code> and <code>useVisible</code> is <code>true</code>, <code>frame</code> is ignored regardless
+ of the setting of <code>useFrame</code>. On Mac OS, if <code>true</code>, the document
+ is opened into a visible window. If <code>false</code>, the document
+ is opened into a hidden window. On Windows, if <code>true</code>, the
+ document is opened in a visible window. If <code>false</code>, the document
+ is opened in a minimized window.
+ */
+ ASBool visible;
+
+ /** Indicates whether the <code>serverType</code> and <code>serverCreationData</code> fields are used. */
+ ASBool useServerType;
+
+ /** The name of the AVDoc server for this AVDoc:
+ <code>EXTERNAL</code> means the AVDoc server for an external window.
+ */
+ const char* serverType;
+
+ /** Platform-dependent server data
+ to associate with the AVDoc server. For a <code>serverType</code> of
+ <code>EXTERNAL</code>, it must be of type <code>ExternalDocServerCreationData</code>.
+ */
+ void* serverCreationData;
+
+
+ /** Indicates whether the <code>sourceDoc</code> field is used. */
+ ASBool useSourceDoc;
+
+ /** An AVDoc whose window will be taken over
+ by a new document. <code>sourceDoc</code> will be closed at the same time.
+ */
+ AVDoc sourceDoc;
+
+ /** Indicates whether the <code>readOnly</code> field is used. */
+ ASBool useReadOnly;
+
+ /** If <code>true</code>, open the document in read-only mode. */
+ ASBool readOnly;
+
+ /** Indicates whether the <code>viewType</code> field is used. */
+ ASBool useViewType;
+
+ /** The type of view to open for the document.
+
+ <p>Permissible values:</p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>"AVPageView"</code></TD><TD>Displays only the AVPageView, which is the window that displays the PDF file. It does not
+ display scrollbars, the toolbar, or the bookmark or thumbnails pane. Annotations, such as links, are active.</TD></TR>
+ <TR><TD><code>"AVDocView"</code></TD><TD>Displays the AVPageView, scrollbars, and bookmark and thumbnails pane. Annotations, such as
+ links, are active.</TD></TR>
+ <TR><TD><code>"AVExternalView"</code></TD><TD>Displays the AVPageView, scrollbars, toolbar, and bookmark or thumbnails pane. Annotations,
+ such as links, are active.</TD></TR>
+ <TR><TD><code>"AVEmbeddedView"</code></TD><TD>Embeds the PDF file in an external document such as an HTML file. It shows the first page of the PDF
+ file. No scrollbars are visible. The toolbar and bookmark or thumbnails pane are visible. Annotations, such as links, are neither
+ displayed nor active.</TD></TR>
+ </TABLE>
+
+ */
+ const char* viewType;
+
+ /** Indicates whether the <code>viewDef</code> field is used. */
+ ASBool useViewDef;
+
+ /** Initial view with which to open the document. It must be an AVDocViewDef. */
+ AVDocViewDef viewDef;
+
+ /** A <code>boolean</code> indicating whether the <code>permReqProc</code> field be used. */
+ ASBool usePermReqProc;
+
+ /** Returns PDPermReqDenied to deny a permission, PDPermReqGranted to grant one. */
+ AVDocPermReqProc permReqProc;
+
+ /** An expanded and more flexible version of the <code>viewDef</code> field. If both are specified, the older AVDocViewDef takes precedence. */
+ ASCab openActions;
+
+ /** Indicates whether to suppress any non-alert dialog boxes that may be triggered by opening the document. */
+ ASBool suppressDialogs;
+
+ /**
+ A PDF 1.7+ file may contain a collection dictionary that specifies a target
+ document, which is an embedded file within the host document that should be
+ opened instead of the host. Assuming the caller is opening a collection
+ document that specifies such a target document, the following applies:
+
+ <ul>
+ <li>
+ <p>If <code>useCollectionPref</code> is set to <code>false</code>, then
+ <code>collectionPref</code> is ignored, and:</p>
+ <ul>
+ <li>
+ AVDocOpenFromFileWithParams() will open the target document, honoring the
+ collection dictionary.
+ </li>
+ <li>
+ AVDocOpenFromPDDocWithParams() will open the host document, ignoring the
+ collection dictionary.
+ </li>
+ </ul>
+ </li>
+ <li>
+ If <code>useCollectionPref</code> is <code>true</code> and <code>collectionPref</code> is
+ <code>true</code>, then all APIs will open the target document, honoring the collection
+ dictionary.
+ </li>
+ <li>
+ If <code>useCollectionPref</code> is <code>true</code> and <code>collectionPref</code> is
+ <code>false</code>, then all APIs will open the host document, ignoring the collection
+ dictionary.
+ </li>
+ </ul>
+
+ <p>AVDocOpenFromFileWithParams() and AVDocOpenFromPDDocWithParams() exhibit different default
+ behavior since the expectation around opening an AVDoc from a file versus a PDDoc is different;
+ a caller would be surprised if AVDocOpenFromPDDoc() did not return an AVDoc for that same PDDoc.
+ The caller should generally set <code>useCollectionPref</code> to <code>false</code> unless
+ special behavior is required.</p>
+ */
+ ASBool useCollectionPref;
+ ASBool collectionPref;
+
+ /** If <code>true</code>, <code>minimize</code> is used to determine
+ whether the window is minimized after the document
+ is opened. If <code>false</code>, <code>minimize</code> is ignored. See also <code>minimize</code>.
+ */
+ ASBool useMinimize;
+
+ /** Specifies the window's minimize state.
+ */
+ ASBool minimize;
+}
+AVDocOpenParamsRec, *AVDocOpenParams;
+
+#endif
+
+/* Data types for "EXTERNAL" serverType documents */
+
+/**
+ A callback in ExternalDocServerCreationData. It is called when a
+ cross-document link is clicked in an AVDoc in an external
+ application's window.
+ @param path Path to document to which the link points.
+ @param fileSys The ASFileSys with which to open the document.
+ @param viewDef The AVDocViewDef with which to open the document.
+ @param srcDoc The AVDoc that contains the cross-document
+ link.
+ @param data User-supplied data that was passed in the
+ call to CrossDocLinkProc().
+ @return The AVDoc for the new document.
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+typedef ACCBPROTO1 AVDoc (ACCBPROTO2 *CrossDocLinkProc)(ASPathName path, ASFileSys fileSys, AVDocViewDef viewDef, AVDoc srcDoc, void* data);
+
+/**
+ (Unused) Callback in ExternalDocServerCreationData for opening
+ PDF files in external windows.
+ @param msg IN/OUT A message for the external application.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVSetMessageProc().
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVSetMessageProc)(char* msg, void* clientData);
+
+/**
+ Callback in ExternalDocServerCreationData to return focus
+ to the browser displaying the document.
+ @param clientData IN/OUT User-supplied data.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVSetFocusProc)(void* clientData);
+
+/**
+ A callback in ExternalDocServerCreationData. It is called when a
+ cross-document link is clicked in an AVDoc in an external
+ application's window.
+ @param path IN/OUT The path to the document to which the link points.
+ @param fileSys IN/OUT The ASFileSys with which to open the document.
+ @param viewDef IN/OUT The AVDocViewDef with which to open the document.
+ @param destInfo IN/OUT A destination in a PDF document.
+ @param srcDoc IN/OUT The AVDoc that contains the cross-document
+ link.
+ @param data IN/OUT User-supplied data that was passed in the call
+ to CrossDocLinkProc().
+ @return The AVDoc for the new document.
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+typedef ACCBPROTO1 AVDoc (ACCBPROTO2 *CrossDocLinkWithDestProc)(
+ ASPathName path,
+ ASFileSys fileSys,
+ AVDocViewDef viewDef,
+ AVDestInfo destInfo,
+ AVDoc srcDoc,
+ void* data);
+
+#if WIN_PLATFORM
+/** */
+typedef HWND ExternalDocWindowData;
+
+#elif MAC_PLATFORM
+
+
+/**
+ (Mac OS only) Data for an external window. A platform-dependent
+ structure used in ExternalDocWindowData when opening an
+ AVDoc with AVDocOpenFromASFileWithParamString(), AVDocOpenFromASFileWithParams(),
+ or AVDocOpenFromPDDocWithParams().
+
+ <p>Coordinates specified in this structure are in application
+ space. Use AVRectToRect() to translate from user space to
+ device space coordinates, then use Mac OS <code>GlobalToLocal</code>
+ function to translate from device space coordinates to application
+ space coordinates. </p>
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+typedef struct _t_ExternalDocWindowRefData
+{
+
+ /** A WindowPtr for the external window. */
+ WindowPtr *window;
+
+ /** The x-displacement in application space coordinates
+ from the application's window to the AVPageView in which
+ Acrobat renders the PDF file.
+ */
+ ASUns32 *x;
+
+ /** The y-displacement in application space coordinates
+ from the application's window to the AVPageView in which
+ Acrobat renders the PDF file.
+ */
+ ASUns32 *y;
+
+ /** The width of the external window, specified in device space units. */
+ ASUns32 *width;
+
+ /** The height of the external window, specified in device space units. */
+ ASUns32 *height;
+
+ /** The clipping rectangle (Mac OS <code>Rect</code>) for the external window in application space units. It is usually the entire window. */
+ Rect *clip;
+
+ /** The x-displacement in application space coordinates from the AVPageView in which Acrobat renders the PDF file
+ to the actual PDF file page. It should usually be <code>0</code>.
+ */
+ ASInt32 *portx;
+
+ /** The y-displacement in application space coordinates from the AVPageView in which Acrobat renders the PDF file
+ to the actual PDF file page. Should usually be <code>0</code>.
+ */
+ ASInt32 *porty;
+
+} ExternalDocWindowRefDataRec, *ExternalDocWindowRefData;
+
+
+/**
+ (Mac OS only) A callback in ExternalDocWindowData for opening
+ PDF files in external windows. It is called for a mouse-related
+ event, such as mouse down or mouse movement.
+ @param curs A handle to the cursor. It is a <code>CursHandle</code>.
+ @param clientData User-supplied data that was passed in
+ ExternalDocWindowData.
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVSetCursorProc)(CursHandle curs, void* clientData);
+
+
+/**
+ Data for an AVDoc in an external window. It is a platform-dependent
+ structure used in ExternalDocServerCreationData when opening
+ an AVDoc with AVDocOpenFromASFileWithParamString(), AVDocOpenFromASFileWithParams(),
+ or AVDocOpenFromPDDocWithParams().
+
+ <p>On Mac OS, a plug-in must handle events that affect the
+ window, such as resize and mouse events. </p>
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+typedef struct _t_ExternalDocWindowData
+{
+
+ /** A pointer to external window data. It must be of type ExternalDocWindowRefData. */
+ ExternalDocWindowRefDataRec *ref;
+
+
+ /** A callback for handling mouse-related events, such as mouse down or mouse movement.*/
+ AVSetCursorProc setCursor;
+
+ /** Optional client-specified data. */
+ void* setCursorProcData;
+
+} ExternalDocWindowDataRec, *ExternalDocWindowData;
+
+#elif UNIX_PLATFORM
+
+typedef Window ExternalDocWindowData;
+
+#elif OS2_PLATFORM
+
+typedef HWND ExternalDocWindowData;
+
+#endif
+
+/**
+ Data for an AVDoc in an external window. It is a platform-dependent
+ structure used in AVDocOpenParams when opening an AVDoc
+ with AVDocOpenFromASFileWithParamString(), AVDocOpenFromASFileWithParams(),
+ or AVDocOpenFromPDDocWithParams().
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDocWithParams
+*/
+typedef struct _t_ExternalDocServerCreationData
+{
+ /** The size of the data structure. It must be set to <code>sizeof(ExternalDocServerCreationData Rec)</code>. */
+ ASSize_t size;
+
+ /** A platform-dependent structure of type ExternalDocWindowData representing a window.
+
+ <p>Operating system detail:</p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating system</TH><TH>Description</TH></TR>
+ <TR><TD>Mac OS</TD><TD>The ExternalDocWindowData structure is used.</TD></TR>
+ <TR><TD>Windows</TD><TD><code>HWND</code> is cast as ExternalDocWindowData.</TD></TR>
+ <TR><TD>UNIX</TD><TD><code>Widget</code> is cast as ExternalDocWindowData.</TD></TR>
+ </TABLE>
+ */
+ ExternalDocWindowData platformWindow;
+
+ /** An optional callback. It is called when the Acrobat button (if present) is clicked in the external
+ application.
+ */
+ AVExecuteProc acrobatProc;
+
+ /** Client-specified data for <code>acrobatProc</code>. */
+ void* acrobatProcData;
+
+ /** A callback of type CrossDocLinkProc. */
+ CrossDocLinkProc crossDocLinkProc;
+
+ /** Client-specified data for <code>crossDocLinkProc</code>. */
+ void* crossDocLinkProcData;
+
+ /** Currently unused. */
+ AVSetMessageProc setMessage;
+
+ /** Currently unused. Client-specified data for <code>setMessage</code>. */
+ void* setMessageProcData;
+
+ /** A callback to call when a cross-document link occurs. */
+ CrossDocLinkWithDestProc crossDocLinkWithDestProc;
+
+ /** Client-specified data for <code>crossDocLinkWithDestProc</code>.*/
+ void* crossDocLinkWithDestData;
+
+
+ /** (New in Acrobat 5.0) A callback to call when Acrobat returns focus to the browser displaying
+ the document.
+ */
+ AVSetFocusProc setFocus;
+
+ /** (New in Acrobat 5.0) Client-specified data for <code>setFocus</code>. */
+ void* setFocusProcData;
+
+ /** (New in Acrobat 7.0) Used for extended TAB handling in the browser. */
+ AVSetFocusProc setFocusSHIFTTAB;
+ /** (New in Acrobat 7.0) Used for extended TAB handling in the browser. */
+ void* setFocusSHIFTTABProcData;
+
+ /** (New in Acrobat 7.0) Used for extended TAB handling in the browser. */
+ AVSetFocusProc setFocusCTRLTAB;
+ /** (New in Acrobat 7.0) Used for extended TAB handling in the browser. */
+ void* setFocusCTRLTABProcData;
+
+} ExternalDocServerCreationDataRec, *ExternalDocServerCreationData;
+
+
+/**
+ Constant values indicating the type of document server being
+ used for a document.
+ @see AVDocGetServerType
+*/
+typedef enum _t_AVDocServerType {
+ /** Unknown server type. */
+ AVDocServerUnknown,
+ /** The default document server (used for most documents). */
+ AVDocServerDefault,
+ /** The same as the default document server. */
+ AVDocServerInternal = AVDocServerDefault,
+ /** Used for external documents, shown in a web browser. */
+ AVDocServerExternal,
+ /** A server used for documents displayed in the help window. */
+ AVDocServerHelp
+} AVDocServerType;
+
+/**
+ Specifies a special value for
+ AVDocSetSplitterPosition() and AVDocGetSplitterPosition().
+
+ @see AVDocSetSplitterPosition
+ @see AVDocGetSplitterPosition
+*/
+#define kAVDocSplitterPinnedLeft (0)
+/**
+ Specifies a special value for
+ AVDocSetSplitterPosition() and AVDocGetSplitterPosition().
+
+ @see AVDocSetSplitterPosition
+ @see AVDocGetSplitterPosition
+*/
+#define kAVDocSplitterPinnedRight (ASMAXInt16)
+
+/************************************************************************************\
+|* *|
+|* AVAnnotHandler *|
+|* *|
+\************************************************************************************/
+
+/* Flags returned by <code>AVAnnotHandler->GetFlags()</code>. */
+#define AV_ANNOT_POPUPISREADONLY 0x0001
+#define AV_ANNOT_SHOW_OFFSCREEN_INDICATOR 0x0002
+#define AV_ANNOT_SUPPORTS_REPLIES 0x0004
+#define AV_ANNOT_SUPPRESS_POPUP 0x0008
+
+/*------------------------------------------------------------------------
+ The layer parameter of Annotation Handlers defines the draw order and (in reverse)
+ the order of mouse hit detection. Valid ranges are fixedZero - fixedPositiveInfinity.
+ Notice that any form of non-update driven drawing (like during a DoClick method)
+ can make an annotation in a lower level appear to be above those in higher levels.
+ ------------------------------------------------------------------------*/
+/** Links live at this level. */
+#define LINK_LAYER fixedOne
+/** Closed notes live here, with open notes just above. */
+#define NOTE_LAYER fixedThree
+/** Set this bit of <code>flags</code> to prevent the standard text selection tool from inverting your annotation. */
+#define ANNOT_CLIP_TEXT_SELECTION 0x0001
+/** Set this bit of <code>flags</code> to prevent the standard "shift-key ignores annotations" behavior. */
+#define ANNOT_WANTS_SHIFT_KEY 0x0002
+
+
+/**
+ A structure used to describe information for a particular
+ annotation type.
+ @see AVAnnotHandlerDeleteInfoProc
+ @see AVAnnotHandlerGetInfoProc
+ @see AVAnnotHandlerGetInfo
+*/
+typedef struct _AVAnnotHandlerInfoRec {
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVAnnotHandlerInfoRec)</code>. */
+ ASSize_t size;
+
+ /** The user interface name of the annotation type in the host encoding. */
+ unsigned char *cName;
+
+ /** A platform-dependent bitmap used as the annotation icon. If it is <code>NULL</code>, the annotation
+ manager uses the unknown annotation icon for the annotation.
+ */
+ void *vBitmap;
+} AVAnnotHandlerInfoRec, *AVAnnotHandlerInfo;
+
+/* UI friendly name is in host encoding. Bitmap is platform dependent, if set
+** to null, the annotation manager uses the Unknown annotation icon. */
+#define AVAnnotHandlerInfoInit(x) \
+ do { \
+ memset(x, 0, sizeof(AVAnnotHandlerInfoRec)); \
+ x->size = sizeof(AVAnnotHandlerInfoRec); \
+ }while(0)
+
+/* Operations we can ask an annotation to perform */
+
+/**
+ <p>An enumeration detailing operations to which the annotation can be requested to respond.</p>
+
+ <p>Operation codes containing the word <code>"Do"</code> are sent to
+ notify the annotation handler of a significant event.
+ All other operation codes are sent to tell the annotation
+ to perform a specific action.</p>
+
+ @see AVPageViewFocusAnnotPerformOp
+*/
+enum {
+ /** Accept input focus. */
+ kAVAnnotAcceptFocus,
+ /** Lost the input focus. */
+ kAVAnnotLostFocus,
+ /** The user presses Enter while in focus. */
+ kAVAnnotDefaultAction,
+ /** Show a context menu for the annotation. */
+ kAVAnnotShowMenu,
+ /** The focus is temporarily lost; it may be restored. */
+ kAVAnnotSuspendFocus,
+ /** The focus has been restored. */
+ kAVAnnotResumeFocus,
+ /** The page the annotation is on has become the current page. */
+ kAVAnnotDoPageHasOpened,
+ /** The page the annotation is on is no longer the current page. */
+ kAVAnnotDoPageHasClosed,
+ /** The page this annotation is on has become visible to the user. */
+ kAVAnnotDoPageIsInView,
+ /** The page this annotation is on is no longer visible to the user. */
+ kAVAnnotDoPageIsNotInView
+};
+#ifndef _T_AVANNOTOP
+#define _T_AVANNOTOP
+typedef ASEnum16 AVAnnotOp;
+#endif /* _T_AVANNOTOP */
+
+/* Additional information passed to the annotation when performing an
+ operation. For some operations a <code>NULL</code> will be passed; in others a
+ pointer to an AVAnnotOpData structure will be passed.
+*/
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+/** Constants that specify how an annotation operation request was triggered.
+ @see AVPageViewFocusAnnotPerformOp
+*/
+typedef enum {
+ /** The first entry for <code>memset</code> of AVAnnotOpDataRec to <code>0</code>. */
+ kAVAnnotUnknown = 0,
+ /** An operation triggered by a mouse click. */
+ kAVAnnotClick,
+ /** An operation triggered by a Tab key press. */
+ kAVAnnotTab
+} AVAnnotOpReason;
+
+/**
+ Additional information passed to the annotation when performing
+ an operation. For some operations a <code>NULL</code> will be passed;
+ in others a pointer to an AVAnnotOpData structure will be
+ passed.
+
+ @note The coordinate numeric type has changed in Acrobat 6.0.
+ @see AVPageViewSetFocusAnnot
+*/
+typedef struct _t_AVAnnotOpData {
+ /** Set by Acrobat to the size of this record. */
+ ASSize_t size;
+ /** If the operation is kAVAnnotShowMenu, this value provides the default location of the menu in AV device coordinates (<code>x</code>). */
+ AVDevCoord x;
+ /** If the operation is kAVAnnotShowMenu, this value provides the default location of the menu in AV device coordinates (<code>y</code>) */
+ AVDevCoord y;
+ /** Used by Forms and Annots to determine when an annotation is getting focus via a mouse click.*/
+ void * clientData;
+ /** The reason for this operation */
+ AVAnnotOpReason reason;
+ /** The page number this annotation is on. */
+ ASInt32 pageNum;
+} AVAnnotOpDataRec, *AVAnnotOpData;
+#endif
+
+ /* Concrete instantiation of an annot handler object. Annot handler implementations will
+ usually "subclass" this by pass a ptr to struct with an AVAnnotHandlerRec as
+ its first member to AVAppRegisterAnnotHandler, cast as an AVAnnotHandler.
+ */
+
+/* AVAnnotHandlerEnumProc -- used by AVAppEnumAnnotHandlers.
+** If the proc returns <code>false</code>, the enumeration will terminate.
+*/
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A data structure containing callbacks that implement an annotation
+ handler. The callbacks implement the annotation handler
+ functions. For example, they can be used to draw the annotation and highlight the
+ annotation when it is selected. The data specifies properties
+ of the annotation, such as text selection behavior.
+
+ <p>Appearance drawing is new as of Acrobat 6.0. If the handler
+ implements the GetAppearance() or GetAppearanceEx() callback, the new
+ drawing style is used. If the GetAppearance() callback returns <code>false</code> or
+ is not implemented, the viewer calls the drawing procedure
+ (DrawEx() if present, Draw() otherwise) to draw the annotation
+ using Acrobat 5.0-style drawing. </p>
+
+ <p>For the new style of appearance drawing, the viewer calls
+ the handler's BeginAppearanceDrawing() callback, then draws
+ the appearance object. If the drawing operation completes
+ without errors, it call the the handler's BeginAppearanceDrawing()
+ callback; if an error occurs or the operation is cancelled,
+ it calls the CancelAppearanceDrawing() callback. This can
+ happen if, for example, the user switches to another page
+ before the drawing is completed. </p>
+
+ <p>The handler must not destroy or modify the appearance object
+ while it is being drawn. It can do so only after the EndAppearanceDrawing()
+ or CancelAppearanceDrawing() callback is exercised. </p>
+ @see AVAnnotHandlerEnumProc
+ @see PDAnnotHandlerDeleteAnnotInfoProc
+ @see PDAnnotHandlerGetAnnotInfoFlagsProc
+ @see PDAnnotHandlerGetAnnotInfoProc
+ @see PDAnnotHandlerGetTypeProc
+ @see AVAppRegisterAnnotHandler
+ @see AVAppGetAnnotHandlerByName
+ @see AVDocCopyAnnot
+
+ @note The types of numeric values in callbacks have changed
+ in Acrobat 6.0.
+*/
+typedef struct _t_AVAnnotHandler *AVAnnotHandler;
+
+/**
+ Called to request that the annotation appearance be drawn.
+
+ @param annotHandler IN/OUT The annotation handler responsible
+ for this annotation.
+ @param anAnnot IN/OUT The annotation.
+ @param pageView IN/OUT The AVPageView in which the annotation
+ is located.
+ @param updateRect IN/OUT The portion of the annotation's bounding
+ rectangle that should be drawn.
+ @return <code>true</code> if the callback completed drawing successfully, <code>false</code>
+ otherwise.
+ @see AVAnnotHandlerDrawProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerDrawExProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot anAnnot,
+ AVPageView pageView,
+ AVDevRect *updateRect);
+
+/**
+ Deprecated in Acrobat 6.0. Use AVAnnotHandlerDoClickExProc().
+
+ <p>(Optional) A callback for AVAnnotHandler. It handles both
+ left and right mouse button clicks within the annotation.
+ If <code>NULL</code>, the annotation behaves as if the callback returned
+ <code>false</code>. </p>
+ @param annotHandler The annotation handler responsible
+ for this annotation.
+ @param hitAnnot The annotation in which the mouse was
+ clicked.
+ @param pageView The AVPageView in which the annotation
+ is located.
+ @param xHit The x-coordinate of the mouse click.
+ @param yHit The y-coordinate of the mouse click.
+ @param flags Indicates which modifier keys are pressed.
+ It must be an <code>OR</code> of the Modifier Keys values.
+ @param clickNo <code>1</code> if this is a single click, <code>2</code> if this is a double
+ click, <code>3</code> if this is a triple click.
+ @return <code>true</code> if the callback handled the mouse click, <code>false</code> if it
+ did not. If the callback does not handle the click, it is
+ passed to any annotation at the same location in lower layers.
+
+ @see AVAnnotHandlerDoKeyDownExProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerDoClickProc)(AVAnnotHandler annotHandler, PDAnnot hitAnnot,
+ AVPageView pageView,
+ AVDevCoord xHit, AVDevCoord yHit,
+ AVFlagBits16 flags,
+ AVTCount clickNo);
+
+/**
+ Deprecated in Acrobat 6.0. Use AVAnnotHandlerAdjustCursorExProc().
+
+ <p>(Optional) A callback for AVAnnotHandler. It controls the
+ cursor shape when the cursor is within the annotation. If
+ <code>NULL</code>, the annotation behaves as if the AdjustCursor() callback
+ returned <code>false</code>. </p>
+ @param annotHandler The annotation handler responsible
+ for this annotation.
+ @param anAnnot The annotation containing the cursor.
+ @param pageView The AVPageView in which the annotation
+ is located.
+ @param xHit The cursor's current x-coordinate.
+ @param yHit The cursor's current y-coordinate.
+ @return <code>true</code> if the callback handled the adjust cursor event, <code>false</code>
+ otherwise. The callback would return <code>false</code>, for example,
+ if the annotation is irregularly shaped and the cursor is
+ not currently over the real annotation, even though it is
+ within the rectangular bounding box that the Acrobat viewer
+ uses to specify annotations.
+ @see AVAnnotHandlerAdjustCursorExProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerAdjustCursorProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot,
+ AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit);
+
+/**
+ A callback for AVAnnotHandler. It is called by AVPageViewIsAnnotAtPoint()
+ to determine whether a point is within an annotation. The
+ annotation handler is free to determine what it means for
+ the point to be <i>in</i> the annotation. For example, if the
+ annotation appears only as the outline of a circle, the
+ point may be <i>in</i> the annotation only when it is near the
+ border of the circle, but not when it is elsewhere within the circle.
+ @param annotHandler The annotation handler responsible
+ for this annotation.
+ @param pageView The AVPageView in which the annotation
+ appears.
+ @param anAnnot The annotation being tested.
+ @param xHit The x-coordinate of the point to test.
+ @param yHit The y-coordinate of the point to test.
+ @return <code>true</code> if the point is in the annotation, <code>false</code> otherwise.
+
+ @note The coordinate numeric types have changed in Acrobat
+ 6.0.
+ @see AVPageViewIsAnnotAtPoint
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerPtInAnnotViewBBoxProc)(AVAnnotHandler annotHandler, AVPageView pageView,
+ PDAnnot anAnnot, AVDevCoord xHit, AVDevCoord yHit);
+
+
+/**
+ A callback for AVAnnotHandler. It returns the rectangle enclosing
+ the annotation on the screen.
+ @param annotHandler IN/OUT The annotation handler responsible
+ for the annotation.
+ @param pageView IN/OUT The AVPageView in which the annotation
+ is located.
+ @param anAnnot IN/OUT The annotation whose bounding box is returned.
+
+ @param bbox IN/OUT (Filled by the callback) The annotation's bounding
+ rectangle.
+ @see AVAnnotHandlerPtInAnnotViewBBoxProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerGetAnnotViewBBoxProc)(AVAnnotHandler annotHandler, AVPageView pageView,
+ PDAnnot anAnnot, AVDevRect *bbox);
+#endif /* (ACRO_SDK_LEVEL >= 0x00060000) */
+
+
+/**
+ A callback for AVAppEnumAnnotHandlers(). It is called once for
+ each annotation handler currently registered with the Acrobat
+ viewer (see AVAppRegisterAnnotHandler()).
+ @param annotHandler IN/OUT The annotation handler.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVAppEnumAnnotHandlers.
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see AVAppEnumAnnotHandlers
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerEnumProc)(AVAnnotHandler annotHandler, void *clientData);
+
+
+/**
+ (Optional) A callback for AVAnnotHandler. It is called when
+ an annotation is removed from the selection, and should
+ un-highlight the annotation. Set it to <code>NULL</code> if omitted.
+ @param annotHandler IN/OUT The annotation handler responsible
+ for the annotation that was removed from the selection.
+
+ @param anAnnot IN/OUT The annotation that was removed from the
+ selection.
+ @param pageView IN/OUT The AVPageView in which the annotation
+ appears.
+ @see AVDocClearSelection
+ @see AVDocSetSelection
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerNotifyAnnotRemovedFromSelectionProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+/**
+ (Optional) A callback for AVAnnotHandler. It is called when
+ an annotation is added to the selection, and should highlight
+ the annotation. Set it to <code>NULL</code> if it is omitted.
+
+ <p>To allow only a single annotation to be selected at a time, keep
+ a global variable containing the selected annotation and,
+ on each invocation of NotifyAnnotAddedToSelection(), first
+ deselect the current selection, if any (that is, if selectedAnnot
+ is non-<code>NULL</code>), call its AVAnnotHandlerNotifyAnnotRemovedFromSelectionProc(), select
+ the new annotation, and set <code>selectedAnnot</code>. Of course, <code>RemovedFrom</code>
+ should set <code>selectedAnnot</code> to <code>NULL</code>. </p>
+ @param annotHandler IN/OUT The annotation handler responsible
+ for the annotation that was added to the selection.
+ @param anAnnot IN/OUT The annotation that was added to the selection.
+ @param pageView IN/OUT The AVPageVIew containing the annotation
+ that was added to the selection.
+ @see AVDocSetSelection
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerNotifyAnnotAddedToSelectionProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+/**
+ Deprecated in Acrobat 6.0. Use AVAnnotHandlerDrawExProc().
+
+ <p>(Optional) A callback for AVAnnotHandler that draws the annotation.
+ Set it to <code>NULL</code> if the annotation handler has no <code>Draw</code> method.</p>
+
+ <p>If the annotation has an appearance (AP) entry, use this
+ information to draw the annotation. Read the annotation's
+ appearance state (AS) entry to determine which appearance
+ to use. Then read the Cos stream for the appropriate appearance
+ and display it with AVPageViewDrawCosObj(). </p>
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation to draw.
+ @param pageView The AVPageView containing the annotation.
+ @see AVAnnotHandlerDrawExProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerDrawProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+/**
+ (Unused) A callback for AVAnnotHandler. It allows the annotation
+ handler to add any attributes to the annotation object to
+ make sure the new annotation is in a valid initial state
+ for its subclass.
+ @param annotHandler The annotation handler.
+ @param anAnnot The annotation to modify.
+ @param pageView The AVPageView in which the annotation
+ is located.
+ @return <code>true</code> if the new annotation handler is in a valid initial
+ state for its subclass, <code>false</code> otherwise.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerNewProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+/**
+ (Required) A callback for AVAnnotHandler. It returns an ASAtom
+ indicating the annotation type for which the handler is
+ responsible. This corresponds to the annotation's Subtype
+ key in the PDF file.
+
+ <p>This is the method that AVAppGetAnnotHandlerByName() uses
+ to find the correct handler. </p>
+ @param annotHandler IN/OUT The annotation handler whose type is
+ returned.
+ @return The annotation type for which this handler is responsible.
+
+ @see AVAppRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *AVAnnotHandlerGetTypeProc)(AVAnnotHandler annotHandler);
+
+/**
+ Currently unused.
+ @param annotHandler IN/OUT The annotation handler.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerNotifyDestroyProc)(AVAnnotHandler annotHandler);
+
+/**
+ Deprecated in Acrobat 6.0. Use AVAnnotHandlerDoPropertiesExProc().
+
+ <p>(Optional) A callback for AVAnnotHandler. It displays whatever
+ user interface it wishes to allow a user to change an annotation's
+ properties. Set it to <code>NULL</code> if the annotation type has no
+ user-specified properties. </p>
+
+ <p>It is called when the user selects the Properties item from
+ the Edit menu while an annotation of this type is selected.
+ If <code>NULL</code>, the Properties menu item is dimmed when a corresponding
+ object is selected. </p>
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation whose properties are set.
+ @param doc The document containing the annotation.
+ @see AVAnnotHandlerDoPropertiesExProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerDoPropertiesProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVDoc doc);
+
+/**
+ Deprecated in Acrobat 6.0. Use AVAnnotHandlerDoKeyDownExProc().
+
+ <p>(Optional) A callback for AVAnnotHandler. It is called to
+ handle key presses in the annotation. If <code>NULL</code>, it is as
+ if the callback returned <code>false</code>. </p>
+
+ <p>It is called when there is a key-down event and the annotation
+ is selected, and the active tool does not want the event. </p>
+ @param annotHandler The handler responsible for this annotation.
+ @param anAnnot The annotation in which the key press occurred.
+ @param key The key that was pressed.
+ @param flags Indicates which modifier keys are pressed.
+ It must be an <code>OR</code> of the Modifier Keys values.
+ @return <code>true</code> if the callback handled the key press, <code>false</code> otherwise.
+ @see AVAnnotHandlerDoKeyDownExProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerDoKeyDownProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVKeyCode key, AVFlagBits16 flags);
+
+/**
+ Deprecated in Acrobat 6.0. Use AVAnnotHandlerGetLayerExProc().
+
+ <p>A callback for AVAnnotHandler. It returns the annotation's
+ layer. The layer need not be a constant. For example, the
+ Acrobat viewer's built-in text annotations have a different
+ layer depending on whether they are opened or closed. This
+ ensures that a closed text annotation never appears on top
+ of an open text annotation. </p>
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation whose layer is returned.
+ @return The annotation's layer.
+ @see AVAnnotHandlerGetLayerExProc
+*/
+typedef ACCBPROTO1 ASFixed (ACCBPROTO2 *AVAnnotHandlerGetLayerProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot);
+
+/**
+ (Optional) A callback for AVAnnotHandler. It is called whenever
+ the cursor moves over an annotation handled by this annotation
+ handler.
+ @param annotHandler IN/OUT The annotation handler responsible
+ for this annotation.
+ @param anAnnot IN/OUT The annotation.
+ @param pageView IN/OUT The AVPageView in which the annotation
+ is located.
+ @see AVAnnotHandlerCursorExitProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerCursorEnterProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+/**
+ (Optional) A callback for AVAnnotHandler. It is called whenever
+ the cursor moves off an annotation handled by this annotation
+ handler.
+ @param annotHandler IN/OUT The annotation handler responsible
+ for this annotation.
+ @param anAnnot IN/OUT The annotation from which the cursor is exiting.
+ @param pageView IN/OUT The AVPageView in which the annotation
+ is located.
+ @see AVAnnotHandlerCursorEnterProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerCursorExitProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+/**
+ (Optional) A callback for AVAnnotHandler. It is called upon to copy
+ an annotation, possibly to another document. Annotation
+ handlers should provide this callback to allow for copying
+ their annotations. It is called by AVDocCopyAnnot().
+ @param annotHandler The annotation handler responsible
+ for this annotation.
+ @param fromDoc The document whose annotation is copied.
+ @param anAnnot The annotation to copy.
+ @param toDoc The document to which the annotation is copied.
+ @return The newly created PDAnnot copy.
+ @see AVDocCopyAnnot
+*/
+typedef ACCBPROTO1 PDAnnot (ACCBPROTO2 *AVAnnotHandlerCopyProc)(AVAnnotHandler annotHandler, AVDoc fromDoc, PDAnnot anAnnot, AVDoc toDoc);
+
+/* Acrobat 4.0 additions. */
+
+/**
+ (Optional) A callback for AVAnnotHandler. It gets information
+ associated with an annotation.
+
+ <p>To effectively use a PDAnnotHandler associated with an annotation,
+ its AVAnnotHandler must have its AVAnnotHandlerGetInfoProc()
+ and AVAnnotHandlerDeleteInfoProc() callbacks defined. </p>
+ @param avanh IN/OUT The annotation handler responsible for this
+ annotation.
+ @return Information associated with the annotation.
+ @see AVAnnotHandlerDeleteInfoProc
+ @see AVAppRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 AVAnnotHandlerInfo (ACCBPROTO2 *AVAnnotHandlerGetInfoProc)(AVAnnotHandler avanh);
+
+/**
+ (Optional) A callback for AVAnnotHandler. It deletes information
+ associated with an annotation.
+
+ <p>To effectively use a PDAnnotHandler associated with an annotation,
+ its AVAnnotHandler must have its AVAnnotHandlerGetInfoProc()
+ and AVAnnotHandlerDeleteInfoProc() callbacks defined. </p>
+ @param avanh IN/OUT The annotation handler responsible for this
+ annotation.
+ @param info IN/OUT Information associated with the annotation.
+ @see AVAnnotHandlerGetInfoProc
+ @see PDAnnotHandlerDeleteAnnotInfoProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerDeleteInfoProc)(AVAnnotHandler avanh, AVAnnotHandlerInfo info);
+
+/* Acrobat 5.0 additions */
+
+/**
+ Called to determine if this annotation can perform the specified
+ operation.
+ @param annotHandler IN/OUT The annotation handler responsible
+ for this annotation.
+ @param annot IN/OUT The annotation.
+ @param pageView IN/OUT The AVPageView in which the annotation
+ is located.
+ @param annotOp IN/OUT The operation to be performed.
+ @param opData IN/OUT The data associated with the operation.
+ @return <code>true</code> if the operation can be performed, <code>false</code> otherwise.
+ @see AVAnnotHandlerPerformOpProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerCanPerformOpProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot annot,
+ AVPageView pageView,
+ AVAnnotOp annotOp,
+ AVAnnotOpData opData);
+
+/**
+ Called to initiate the operation.
+ @param annotHandler IN/OUT The annotation handler responsible
+ for this annotation.
+ @param annot IN/OUT The annotation.
+ @param pageView IN/OUT The AVPageView in which the annotation
+ is located.
+ @param annotOp IN/OUT The operation to be performed.
+ @param opData IN/OUT The data associated with the operation.
+ @return <code>true</code> if the operation is performed, <code>false</code> otherwise.
+ @see AVAnnotHandlerCanPerformOpProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerPerformOpProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot annot,
+ AVPageView pageView,
+ AVAnnotOp annotOp,
+ AVAnnotOpData opData);
+
+/**
+ Called for each keystroke received when an annotation has
+ focus.
+ @param annotHandler The annotation handler responsible
+ for this annotation.
+ @param annot The annotation.
+ @param pageView The AVPageView in which the annotation
+ is located.
+ @param key The operation to be performed.
+ @param flags Indicates which modifier keys are pressed.
+ See Modifier Keys.
+ @return <code>true</code> if the callback handled the keystroke, <code>false</code> otherwise.
+ @see AVAnnotHandlerDoKeyDownProc
+
+ @note The <code>key</code> and <code>flags</code> numeric types have changed in Acrobat
+ 6.0. This supersedes AVAnnotHandlerDoKeyDownProc().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerDoKeyDownExProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot annot,
+ AVPageView pageView,
+ AVKeyCode key,
+ AVFlagBits16 flags);
+
+/**
+ A callback for AVAnnotHandler. It returns the flags value
+ for the annotation on the screen.
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation whose flags value is returned.
+ @return The flags value.
+ @see AVAnnotHandlerGetAppearanceProc
+*/
+typedef ACCBPROTO1 AVFlagBits32 (ACCBPROTO2 *AVAnnotHandlerGetFlagsProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot anAnnot);
+
+/* Acrobat 6.0 additions */
+
+/* Fill in the apprObj with a CosObj representing a Form field and
+ return 'true' and the viewer will position and draw the appearance
+ for you.
+
+ On entry, *flags will be set to reflect the annot's
+ NoZoom and NoRotate bits. You can modify those bits and they will take
+ effect when the appearance is drawn e.g. if you clear the NoZoom bit
+ the appearance will be drawn as if the original annot did not have the
+ NoZoom bit set.
+
+ You can also OR in any combination of the following bits;
+
+ DrawNow - indicates that you want you do not want the appearance to
+ be drawn at intervals.
+
+ Smooth - indicates that the appearance should be smoothed
+ (anti-aliased) when drawn.
+
+ Selected - indicates the appareance should be drawn with
+ a selection visual around it. If you set this flag you should
+ call AVAppGetAnnotAppearancePadding() and pad the annotation's
+ view bounding box by that many pixels on all sides. This will
+ provide space for the selection visual.
+
+ Return 'false' and your Draw or DrawEx callback will be exercised
+ to draw the annotation instead.
+*/
+#define kAVAppearanceDrawNow 0x01
+#define kAVAppearanceNoZoom 0x02
+#define kAVAppearanceNoRotate 0x04
+#define kAVAppearanceSmooth 0x08
+#define kAVAppearanceSelected 0x10
+/**
+ A callback for AVAnnotHandler. It fills in a CosObj representing
+ a Form field. Upon return, the annotation appearance is
+ drawn according to the returned flag values
+
+ <p>Appearance drawing is new in Acrobat 6.0. If the handler
+ implements this method and it returns <code>true</code>, the new drawing
+ style is used. If this function returns <code>false</code>, the viewer
+ calls the drawing procedure to draw the annotation appearance.
+ See AVAnnotHandler. </p>
+
+ <p>The handler must not destroy or modify the appearance object
+ while it is being drawn. It can do so only after the EndAppearanceDrawing()
+ or CancelAppearanceDrawing() callback is exercised.</p>
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param annot The annotation whose appearance is drawn.
+ @param flags A pointer to an <code>OR</code> of the AVAnnot Appearance
+ Flags. On entry, Acrobat modifies the flags to reflect the
+ annotation's current NoZoom and NoRotate bits. The method
+ can modify these to change the viewer's drawing behavior
+ for this annotation. The modifications take effect when
+ the appearance is drawn, for example, if the callback clears
+ the NoZoom bit, the appearance is drawn as if the original
+ annotation did not have that bit set.
+ @param pageView The page view in which the annotation
+ is drawn.
+ @param apprObj (Filled by the method) A CosObj representing
+ a Form field.
+ @return <code>true</code> to tell the viewer to position and draw the annotation
+ appearance, <code>false</code> to call the DrawEx() or Draw() procedure.
+
+ @see AVAnnotHandlerAppearanceDrawingProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerGetAppearanceProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot annot, ASUns32 *flags,
+ AVPageView pageView,
+ CosObj *apprObj);
+
+
+/**
+ A callback for AVAnnotHandler that draws the appearance of
+ the annotation for the given page view. Use this prototype
+ for three callbacks: BeginAppearanceDrawing(), FinishAppearanceDrawing(),
+ and CancelAppearanceDrawing().
+
+ <p>If the viewer must abandon the drawing of the appearance,
+ it calls the CancelAppearanceDrawing() callback. If the viewer
+ succeeds in drawing the appearance, it calls the FinishAppearanceDrawing()
+ callback. In either case, the handler can destroy the appearance
+ object. See AVAnnotHandler. </p>
+
+ <p>If the annotation sets the <code>kAVAppearanceSelected</code> flag,
+ the viewer will draw a selection visual around the appearance object.
+ To make room for the selection visual, the annotation handler should
+ call AVAppGetAnnotAppearancePadding() and expand the annotation's view
+ bounding box by that number of pixels, to avoid having the selection
+ visual clipped.</p>
+
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param annot The annotation whose appearance is drawn.
+ @param pageView The page view containing the annotation.
+ @param annotRect A pointer to a rectangle in the page
+ view's device space that contains the currently drawn appearance.
+ The procedure must not modify this object.
+ @param updateRect A pointer to a rectangle in the page
+ view's device space that contains the newly drawn appearance.
+ The procedure must not modify this object. As an optimization,
+ the handler can avoid drawing anything outside this rectangle,
+ which the viewer will clip.
+ @see AVAnnotHandlerGetAppearanceProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerAppearanceDrawingProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot annot,
+ AVPageView pageView,
+ const AVDevRect* annotRect,
+ const AVDevRect* updateRect);
+
+/**
+ (Optional) A callback for AVAnnotHandler. It displays whatever
+ user interface it wishes to allow a user to change an annotation's
+ properties. Set it to <code>NULL</code> if the annotation type has no
+ user-specified properties.
+
+ <p>It is called when the user selects the Properties item from
+ the Edit menu while an annotation of this type is selected.
+ If <code>NULL</code>, the Properties menu item is dimmed when a corresponding
+ object is selected. </p>
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation whose properties are set.
+ @param pageView The page view containing the annotation.
+ @see AVAnnotHandlerDoPropertiesProc
+
+ @note Supersedes AVAnnotHandlerDoPropertiesProc() in Acrobat
+ 6.0.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAnnotHandlerDoPropertiesExProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+/**
+ A callback for AVAnnotHandler. It returns the annotation's
+ layer. The layer need not be a constant. For example, the
+ Acrobat viewer's built-in text annotations have a different
+ layer depending on whether they are opened or closed. This
+ ensures that a closed text annotation never appears on top
+ of an open text annotation.
+
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation whose layer is returned.
+ @param pageView The page view containing the annotation.
+ @return The annotation's layer.
+ @see AVAnnotHandlerGetLayerProc
+
+ @note Introduced in Acrobat 6.0. Supersedes AVAnnotHandlerGetLayerProc().
+*/
+typedef ACCBPROTO1 ASFixed (ACCBPROTO2 *AVAnnotHandlerGetLayerExProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView);
+
+
+/**
+ Parameters that describe where and how a mouse click occurred,
+ for the use of click-handling callback procedures.
+ @see AVAnnotHandlerDoClickExProc
+*/
+typedef struct _t_AVClickParams
+{
+ /** The size of this structure. */
+ ASSize_t size;
+ /** The x-coordinate of the mouse click. */
+ AVDevCoord xHit;
+ /** The y-coordinate of the mouse click. */
+ AVDevCoord yHit;
+ /** Indicates which modifier keys are pressed. It must be an <code>OR</code> of the Modifier Keys values. */
+ AVFlagBits16 flags;
+ /** <code>1</code> if this is a single click, <code>2</code> if this is a double click, <code>3</code> if this is a triple click. */
+ AVTCount clickNo;
+ /** The tool type that received the click event.*/
+ ASAtom toolType;
+} AVClickParamsRec, *AVClickParams;
+
+
+/**
+ Parameters that describe where and how a cursor event occurred,
+ for the use of cursor handling callback procedures.
+ @see AVAnnotHandlerAdjustCursorExProc
+*/
+typedef struct _t_AVAdjustCursorParams
+{
+ /** The size of this structure. */
+ ASSize_t size;
+ /** The x-coordinate of the cursor. */
+ AVDevCoord xHit;
+ /** The y-coordinate of the cursor. */
+ AVDevCoord yHit;
+ /** The tool type that received the cursor event */
+ ASAtom toolType;
+} AVAdjustCursorParamsRec, *AVAdjustCursorParams;
+
+/** (Optional) A callback for AVAnnotHandler. It handles both left and right mouse button
+ clicks within the annotation. If <code>NULL</code>, the annotation behaves as if the callback returned
+ <code>false</code>.
+ @param annotHandler IN/OUT The annotation handler responsible for this annotation.
+ @param hitAnnot IN/OUT The annotation in which the mouse was clicked.
+ @param pageView IN/OUT The AVPageView in which the annotation is located.
+ @param clickParams IN/OUT The parameters for the click position and properties.
+ @return <code>true</code> if the callback handled the mouse click, <code>false</code> if it did not. If the callback does not
+ handle the click, it is passed to any annotation at the same location in lower layers.
+ @see AVAnnotHandlerDoClickProc
+ @note Introduced in Acrobat 6.0. Supersedes AVAnnotHandlerDoClickProc().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerDoClickExProc)(AVAnnotHandler annotHandler, PDAnnot hitAnnot,
+ AVPageView pageView,
+ AVClickParams clickParams);
+/** (Optional) A callback for AVAnnotHandler. It controls the cursor shape when the cursor is
+ within the annotation. If <code>NULL</code>, the annotation behaves as if the AdjustCursor() callback
+ returned <code>false</code>.
+ @param annotHandler The annotation handler responsible for this annotation.
+ @param anAnnot The annotation containing the cursor.
+ @param pageView The AVPageView in which the annotation is located.
+ @param params The parameters structure containing the cursor's current x- and y-coordinates.
+ @return <code>true</code> if the callback handled the adjust cursor event, <code>false</code> otherwise. The callback would
+ return <code>false</code>, for example, if the annotation is irregularly shaped and the cursor is not
+ currently over the real annotation even though it is within the rectangular bounding box
+ that the Acrobat viewer uses to specify annotations.
+ @see AVAnnotHandlerAdjustCursorProc
+ @note Introduced in Acrobat 6.0. Supersedes AVAnnotHandlerAdjustCursorProc().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerAdjustCursorExProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot,
+ AVPageView pageView, AVAdjustCursorParams params);
+
+/* Acrobat 7.0 additions */
+
+/** The type of accessibility string to be obtained */
+enum {
+ /** The name and brief description. */
+ kAVAnnotAccName,
+
+ /** The content (or content description). */
+ kAVAnnotAccValue,
+
+ /** The description of the default action. */
+ kAVAnnotAccDefaultAction
+};
+typedef ASEnum8 AVAnnotAccStrType;
+
+/**
+ A callback for AVAnnotHandler. It gets the accessibility string
+ associated with an annotation.
+ @param annotHandler The annotation handler responsible for the annotation.
+ @param anAnnot The annotation whose accessibility string is returned.
+ @param pageNum The page number on which the annotation is drawn.
+ @param strType The type of accessibility string.
+ @param accString The accessibility string.
+ @return <code>true</code> if the new annotation handler has set
+ <code>accString</code> successfully, <code>false</code> otherwise.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerGetAccessibilityStringProc)(AVAnnotHandler annotHandler,
+ PDAnnot anAnnot, PDPageNumber pageNum, AVAnnotAccStrType strType, ASText accString);
+
+
+typedef enum {
+ kAVTabOrderFirst,
+ kAVTabOrderLast,
+ kAVTabOrderNext,
+ kAVTabOrderPrev
+} AVPageViewTabOrder;
+
+/**
+ A callback for AVAnnotHandler. It allows the annotation
+ handler to determine which annot is next in the tab order.
+ @param annotHandler The annotation handler.
+ @param anAnnot Annotation to direct tab order.
+ @param pageView The AVPageView in which the annotation
+ is located.
+ @param tabOrder The type of tab order to follow.
+ @param tabToAnnot The annot to tab to.
+ @param tabToPageNo Indicates the page number to tab to.
+ @return <code>true</code> if the new annotation handler has set
+ the annot to tab to, <code>false</code> otherwise.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerGetAnnotInTabOrderProc)(AVAnnotHandler annotHandler, PDAnnot anAnnot, AVPageView pageView,
+ AVPageViewTabOrder tabOrder, PDAnnot * tabToAnnot, ASInt32 * tabToPageNo );
+
+/* Acrobat 8.0 additions */
+
+/**
+ A callback for AVAnnotHandler. It returns information about
+ auxiliary icons for the annotation on the screen.
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation whose flags value is returned.
+ @param pageView The page view associated with the annotation.
+ @return The number of auxiliary icons associated with the annotation.
+ @see AVAnnotHandlerGetAuxIconsProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *AVAnnotHandlerGetAuxIconCountProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot anAnnot,
+ AVPageView pageView);
+
+/**
+ A callback for AVAnnotHandler. It returns information about
+ auxiliary icons for the annotation on the screen.
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param anAnnot The annotation whose flags value is returned.
+ @param pageView The pageview associated with the annotation.
+ @return <code>NULL</code> or an AS allocated array of AVIconBundle6 objects followed
+ by at least one <code>NULL</code> pointer (calling GetAuxIconCount() is
+ therefore not strictly necessary).
+ @see AVAnnotHandlerGetAuxIconCountProc
+*/
+typedef ACCBPROTO1 AVIconBundle6 *(ACCBPROTO2 *AVAnnotHandlerGetAuxIconsProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot anAnnot,
+ AVPageView pageView);
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+/**
+*/
+typedef struct _t_AVAnnotAppearanceData {
+ /** Set by the viewer to the size of the structure. The
+ annotation handler can query this to determine if a
+ field is in the structure and can be set.*/
+ ASSize_t size;
+ /** The annotation handler must provide an appearance object. */
+ CosObj appearanceObject;
+ /** The annotation handler can optionally provide a separate
+ appearance for drawing the selection visual. The selection
+ visual will surround the shape of this object. If no selection
+ object is provided, <code>appearanceObject</code> will be used to draw
+ the selection visual. */
+ CosObj selectedShapeAppearanceObj;
+} AVAnnotAppearanceDataRec;
+
+/**
+ A callback for AVAnnotHandler. It fills in a structure representing
+ an annotation's appearance. Upon return, the annotation appearance is
+ drawn according to the returned flag values
+
+ <p>If this callback is present, it will be called and the
+ <code>GetAppearance()</code> callback will not be called.</p>
+
+ <p>This callback works identically to the <code>GetAppearance()</code>
+ callback, but allows the annotation handler to provide additional
+ information. If the <code>kAVAppearanceSelected</code> flag is set,
+ this callback can optionally provide a separate appearance object
+ to be used to draw the selection marks around the annotation.</p>
+
+ @param annotHandler The annotation handler responsible
+ for the annotation.
+ @param annot The annotation whose appearance is drawn.
+ @param flags A pointer to an <code>OR</code> of the AVAnnot Appearance
+ Flags. On entry, Acrobat modifies the flags to reflect the
+ annotation's current <code>NoZoom</code> and <code>NoRotate</code> bits. The method
+ can modify these to change the viewer's drawing behavior
+ for this annotation. The modifications take effect when
+ the appearance is drawn, for example, if the callback clears
+ the <code>NoZoom</code> bit, the appearance is drawn as if the original
+ annotation did not have that bit set.
+ @param pageView The page view in which the annotation
+ is drawn.
+ @param appearanceData (Filled by the method) A structure the annotation
+ handler can fill to provide appearance information to the viewer.
+
+ @return <code>true</code> for the viewer to position and draw the annotation
+ appearance, <code>false</code> to call the DrawEx() or Draw() procedure.
+
+ @see AVAnnotHandlerAppearanceDrawingProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAnnotHandlerGetAppearanceExProc)(
+ AVAnnotHandler annotHandler,
+ PDAnnot annot,
+ ASUns32 *flags,
+ AVPageView pageView,
+ AVAnnotAppearanceDataRec* appearanceData);
+#endif
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A data structure containing callbacks that implement an annotation
+ handler. The callbacks implement the annotation handler
+ functions. For example, they can draw the annotation or highlight the
+ annotation when it is selected. The data specifies properties
+ of the annotation (for example, text selection behavior).
+
+ <p>Appearance drawing is new in Acrobat 6.0. If the handler
+ implements the GetAppearance() callback, the new drawing style
+ is used. If the GetAppearance() callback returns <code>false</code> or
+ is not implemented, the viewer calls the drawing procedure
+ (DrawEx() if present, Draw() otherwise) to draw the annotation
+ using Acrobat 5.0-style drawing.</p>
+
+ <p>For the new style of appearance drawing, the viewer calls
+ the handler's BeginAppearanceDrawing() callback, then draws
+ the appearance object. If the drawing operation completes
+ without errors, it call the the handler's BeginAppearanceDrawing()
+ callback; if an error occurs, or the operation is canceled,
+ it calls the CancelAppearanceDrawing() callback. This can
+ happen if, for example, the user switches to another page
+ before the drawing is completed.</p>
+
+ <p>The handler must not destroy or modify the appearance object
+ while it is being drawn. It can do so only after the EndAppearanceDrawing()
+ or CancelAppearanceDrawing() callback has executed. </p>
+ @see AVAnnotHandlerEnumProc
+ @see PDAnnotHandlerDeleteAnnotInfoProc
+ @see PDAnnotHandlerGetAnnotInfoFlagsProc
+ @see PDAnnotHandlerGetAnnotInfoProc
+ @see PDAnnotHandlerGetTypeProc
+ @see AVAppRegisterAnnotHandler
+ @see AVAppGetAnnotHandlerByName
+ @see AVDocCopyAnnot
+
+ @note Types of numeric values in callbacks have changed
+ in Acrobat 6.0.
+*/
+typedef struct _t_AVAnnotHandler
+{
+
+ /** The size of the data structure. It must be set to <code>sizeof( AVAnnotHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** A collection of flags that affect the annotation's behavior. The flags may be OR-ed together.
+
+ <p>Permissible flags:</p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Flag</TH><TH>Description</TH></TR>
+ <TR><TD>ANNOT_CLIP_TEXT_SELECTION</TD><TD>If this flag is set, text selection in the main document
+ never selects text within the annotation (that is, the annotation behaves like the Acrobat viewer's
+ text annotation). If this flag is not set, text selection in the main document can select text within
+ the annotation (that is, the annotation behaves like the Acrobat viewer's link annotation).</TD></TR>
+ <TR><TD>ANNOT_WANTS_SHIFT_KEY</TD><TD>This flag is set to prevent the standard shift-key ignores
+ annotation's behavior.</TD></TR>
+ </TABLE>
+
+ @note These flags are not the ones used in PDAnnotArray.
+ */
+ AVFlagBits32 flags;
+
+
+ /** Deprecated */
+ oldAVAnnotHandlerDoClickProc oldDoClick;
+
+ /** Deprecated */
+ oldAVAnnotHandlerAdjustCursorProc oldAdjustCursor;
+
+ /** Deprecated */
+ oldAVAnnotHandlerPtInAnnotViewBBoxProc oldPtInAnnotViewBBox;
+
+ /** Deprecated */
+ oldAVAnnotHandlerGetAnnotViewBBoxProc oldGetAnnotViewBBox;
+
+ /** */
+ AVAnnotHandlerNotifyAnnotRemovedFromSelectionProc NotifyAnnotRemovedFromSelection;
+
+ /** */
+ AVAnnotHandlerNotifyAnnotAddedToSelectionProc NotifyAnnotAddedToSelection;
+
+ /** Deprecated */
+ AVAnnotHandlerDrawProc Draw;
+
+ /** */
+ AVAnnotHandlerNewProc New;
+
+ /** */
+ AVAnnotHandlerGetTypeProc GetType;
+
+ /** */
+ AVAnnotHandlerNotifyDestroyProc NotifyDestroy;
+
+ /** */
+ AVAnnotHandlerDoPropertiesProc DoProperties;
+
+ /** */
+ AVAnnotHandlerDoKeyDownProc DoKeyDown;
+
+ /** */
+ AVAnnotHandlerGetLayerProc GetLayer;
+
+ /** */
+ AVAnnotHandlerCursorEnterProc CursorEnter;
+
+ /** */
+ AVAnnotHandlerCursorExitProc CursorExit;
+
+ /** */
+ AVAnnotHandlerCopyProc Copy;
+
+ /** Deprecated */
+ oldAVAnnotHandlerDoClickProc oldDoRightClick;
+
+ /** */
+ AVAnnotHandlerGetInfoProc GetInfo;
+
+ /** */
+ AVAnnotHandlerDeleteInfoProc DeleteInfo;
+
+ /** */
+ AVAnnotHandlerCanPerformOpProc CanPerformOp;
+
+ /** */
+ AVAnnotHandlerPerformOpProc PerformOp;
+
+ /** */
+ AVAnnotHandlerDoKeyDownExProc DoKeyDownEx;
+
+ /** Deprecated */
+ oldAVAnnotHandlerDrawExProc oldDrawEx;
+
+ /** */
+ AVAnnotHandlerGetFlagsProc GetFlags;
+
+ /** */
+ AVAnnotHandlerDoClickProc DoClick;
+
+ /** */
+ AVAnnotHandlerAdjustCursorProc AdjustCursor;
+
+ /** */
+ AVAnnotHandlerPtInAnnotViewBBoxProc PtInAnnotViewBBox;
+
+ /** */
+ AVAnnotHandlerGetAnnotViewBBoxProc GetAnnotViewBBox;
+
+ /** */
+ AVAnnotHandlerDoClickProc DoRightClick;
+
+ /** */
+ AVAnnotHandlerDrawExProc DrawEx;
+
+ /** */
+ AVAnnotHandlerGetAppearanceProc GetAppearance;
+
+ /** */
+ AVAnnotHandlerAppearanceDrawingProc BeginAppearanceDrawing;
+
+ /** */
+ AVAnnotHandlerAppearanceDrawingProc FinishAppearanceDrawing;
+
+ /** */
+ AVAnnotHandlerAppearanceDrawingProc CancelAppearanceDrawing;
+
+ /** */
+ AVAnnotHandlerDoPropertiesExProc DoPropertiesEx;
+
+ /** */
+ AVAnnotHandlerGetLayerExProc GetLayerEx;
+
+ /** */
+ AVAnnotHandlerDoClickExProc DoClickEx;
+
+ /** */
+ AVAnnotHandlerDoClickExProc DoRightClickEx;
+
+ /** */
+ AVAnnotHandlerAdjustCursorExProc AdjustCursorEx;
+
+ /** */
+ AVAnnotHandlerGetAccessibilityStringProc GetAccessibilityString;
+
+ /** */
+ AVAnnotHandlerGetAnnotInTabOrderProc GetAnnotInTabOrder;
+
+ /** */
+ AVAnnotHandlerGetAuxIconCountProc GetAuxIconCount;
+
+ /** */
+ AVAnnotHandlerGetAuxIconsProc GetAuxIcons;
+
+ /** */
+ AVAnnotHandlerGetAppearanceExProc GetAppearanceEx;
+} AVAnnotHandlerRec;
+#endif /* (ACRO_SDK_LEVEL >= 0x00060000) */
+
+
+/**
+ A callback that is called periodically when the Acrobat viewer
+ is otherwise idle.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVAppRegisterIdleProc().
+ @see AVAppRegisterIdleProc
+ @see AVAppUnregisterIdleProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVIdleProc)(void *clientData);
+
+
+/************************************************************************************\
+|* *|
+|* AVSys *|
+|* *|
+\************************************************************************************/
+
+/**
+ A data structure representing the cursor.
+ @see AVSysGetCursor
+ @see AVSysGetStandardCursor
+ @see AVSysSetCursor
+ @see cursorID for a list of already defined cursor shapes.
+*/
+typedef struct _t_AVCursor *AVCursor;
+
+
+/** @ingroup cursorID */
+#define ARROW_CURSOR 0
+
+/** @ingroup cursorID */
+#define IBEAM_CURSOR 1
+
+/** @ingroup cursorID */
+#define CROSSHAIR_CURSOR 1000
+
+/** @ingroup cursorID */
+#define BOX_IBEAM_CURSOR 1001
+
+/** @ingroup cursorID */
+#define HAND_CURSOR 1002
+
+/** @ingroup cursorID */
+#define ZOOM_IN_CURSOR 1003
+
+/** @ingroup cursorID */
+#define ZOOM_OUT_CURSOR 1004
+
+/** @ingroup cursorID */
+#define ZOOM_MAX_CURSOR 1005
+
+/** @ingroup cursorID */
+#define ZOOM_DRAG_CURSOR 1006
+
+/** @ingroup cursorID */
+#define GROW_CURSOR 1008
+
+/** @ingroup cursorID */
+#define BAR_IBEAM_CURSOR 1011
+
+/** @ingroup cursorID */
+#define FIST_CURSOR 1012
+
+/** @ingroup cursorID */
+#define LINK_CURSOR 1100
+
+/** @ingroup cursorID */
+#define MOVEPAGE_CURSOR 1111
+
+/** @ingroup cursorID */
+#define WAIT_CURSOR 1112
+
+/** @ingroup cursorID */
+#define COPYPAGE_CURSOR 1113
+
+/** @ingroup cursorID */
+#define MOVEPAGES_CURSOR 1114
+
+/** @ingroup cursorID */
+#define COPYPAGES_CURSOR 1115
+
+/** @ingroup cursorID */
+#define REPLACEPAGE_CURSOR 1116
+
+/** @ingroup cursorID */
+#define REPLACEPAGES_CURSOR 1117
+
+/** @ingroup cursorID */
+#define NOP_CURSOR 1118
+
+/** @ingroup cursorID */
+#define THREAD_CURSOR 1119
+
+/** @ingroup cursorID */
+#define WORDFINDER_CURSOR 1201
+
+/** @ingroup cursorID */
+#define HAND_THREAD_CURSOR 1202
+
+/** @ingroup cursorID */
+#define HIDDEN_CURSOR 1203
+
+/** @ingroup cursorID */
+#define GROWTOPLEFT_CURSOR 1204
+
+/** @ingroup cursorID */
+#define GROWBOTTOMLEFT_CURSOR 1205
+
+/** @ingroup cursorID */
+#define MOVE_CURSOR 1206
+
+/** @ingroup cursorID */
+#define HAND_THREAD_UP_CURSOR 1207
+
+/** @ingroup cursorID */
+#define HAND_THREAD_END_CURSOR 1208
+
+/** @ingroup cursorID */
+#define HAND_THREAD_UP_END_CURSOR 1209
+
+/** @ingroup cursorID */
+#define HAND_THREAD_BEGIN_CURSOR 1210
+
+/** @ingroup cursorID */
+#define THREAD_CONNECT_CURSOR 1211
+
+/** @ingroup cursorID */
+#define THREAD_END_CURSOR 1212
+
+/** @ingroup cursorID */
+#define VERT_IBEAM_CURSOR 1213
+
+/** @ingroup cursorID */
+#define GROWLEFTRIGHT_CURSOR 33
+
+/** @ingroup cursorID */
+#define HIGHLIGHT_CURSOR 34
+
+/** @ingroup cursorID */
+#define GROWTOPBOTTOM_CURSOR 35
+
+/** @ingroup cursorID */
+#define CROPTOOL_CURSOR 36
+
+/** @ingroup cursorID */
+#define CROPTOOL_SCISSORS_CURSOR 37
+
+/** @ingroup cursorID */
+#define DRAGLEFTRIGHT_CURSOR 1214
+
+/** @ingroup cursorID */
+#define DRAGUPDOWN_CURSOR 1215
+
+/** @ingroup cursorID */
+#define VERTBEAMNOBAR_CURSOR 1216
+
+/** @ingroup cursorID */
+#define GROW_4WAY_CURSOR 1217
+
+/** @ingroup cursorID */
+#define MEASURE_CURSOR 1300
+
+/** @ingroup cursorID */
+#define MEASURECLOSE_CURSOR 1301
+
+/** @ingroup cursorID */
+#define LOUPE_CURSOR 1302
+
+/** @ingroup cursorID */
+#define SELECTOBJECT_CURSOR 1303
+
+/** @ingroup cursorID */
+#define TABLE_CURSOR 1304
+
+/** @ingroup cursorID */
+#define TOUCHUPOBJ_CURSOR 1305
+
+/** @ingroup cursorID */
+#define CROSSHAIR_ADD_CURSOR 1306
+
+/** @ingroup cursorID */
+#define CROSSHAIR_SUBTRACT_CURSOR 1307
+
+/** @ingroup cursorID */
+#define CROSSHAIR_3D_CURSOR 1308
+
+/** @ingroup cursorID */
+#define MOVE_3D_CURSOR 1309
+
+/** @ingroup cursorID */
+#define IBEAM_3D_CURSOR 1310
+
+/** @ingroup cursorID */
+#define NOTE_3D_CURSOR 1311
+
+/** @ingroup cursorID */
+#define SCALEALL_3D_CURSOR 1312
+
+/** @ingroup cursorID */
+#define TEXTMARQUEE_3D_CURSOR 1313
+
+/** @ingroup cursorID */
+#define NEXTPAGE_CURSOR 1314
+/** @ingroup cursorID */
+#define PREVPAGE_CURSOR 1315
+/** @ingroup cursorID */
+#define SCROLL_CURSOR 1316
+
+/** @ingroup KeyStates */
+#define AV_SHIFT 1
+
+/** @ingroup KeyStates */
+#define AV_CONTROL 2
+
+/** @ingroup KeyStates */
+#define AV_COMMAND 4
+
+/** @ingroup KeyStates */
+#define AV_OPTION 8
+
+/** This value can mean right-Alt, right-Ctrl or Enter on enhanced keyboards.
+ @ingroup KeyStates
+*/
+#define AV_EXTENDED 16
+
+/** This value means that the cursor is inverted, or the <i>eraser</i> side of a pen input device is being used.
+ @ingroup KeyStates
+*/
+#define AV_INVERTED 32
+
+/** @ingroup KeyStates */
+#define AV_SPACE 64
+
+/** @ingroup KeyStates */
+#define AV_CAPS 128
+
+/** The pen is used as input device.
+ @ingroup KeyStates
+*/
+#define AV_PENINUSE 256
+
+
+/************************************************************************************\
+|* *|
+|* AVTool *|
+|* *|
+\************************************************************************************/
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+
+/**
+ A data structure for a tool. It contains callbacks that implement
+ the tool's functions (for example, handling mouse clicks
+ and controlling the cursor shape).
+
+ <p>It handles key presses and mouse clicks in the content region of an AVPageView.
+ AVTool objects do not handle mouse clicks in other parts of the viewer's window, such as in
+ the bookmark pane. At any time, there is one active tool.</p>
+ @see AVAppGetActiveTool
+ @see AVAppSetActiveTool
+ @see AVAppGetDefaultTool
+ @see AVAppGetLastActiveTool
+ @see AVAppGetToolByName
+ @see AVAppRegisterTool
+ @see AVToolGetType
+ @see AVToolIsPersistent
+*/
+typedef struct _t_AVTool *AVTool;
+
+/**
+ (Optional) A callback for AVTool. This callback controls the
+ cursor shape when the tool is the active tool.
+
+ <p>If omitted, the cursor specified in the tool's <code>cursorID</code>
+ field is used. </p>
+ @param tool IN/OUT The currently active tool.
+ @param pageView IN/OUT The page view in which the cursor is currently
+ located.
+ @param x IN/OUT The x-coordinate of the current cursor location.
+ @param y IN/OUT The y-coordinate of the current cursor location.
+ @return <code>true</code> if you handled the cursor shape (you do not allow
+ underlying layers to handle it), <code>false</code> if you did (you do allow underlying layers to handle it).
+ @see AVAppRegisterTool
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AdjustCursorProcType)(AVTool tool, AVPageView pageView, AVDevCoord x, AVDevCoord y);
+
+/**
+ A callback for AVTool. It handles mouse clicks when the tool
+ is active. For Mac OS, this handles button or option-button
+ mouse clicks. For Windows, this handles right or left button
+ mouse clicks.
+ @param tool The tool.
+ @param pageView The AVPageView in which the click occurred.
+ @param xHit The click's x-coordinate.
+ @param yHit The click's y-coordinate.
+ @param flags Modifier keys that were held down while clicking.
+ It must be an <code>OR</code> of the Modifier Keys values.
+ @param clickNo <code>1</code> if it is a single click, <code>2</code> if it is a double click, <code>3</code>
+ if it is a triple click.
+ @return <code>true</code> if the callback handled the click, <code>false</code> if it did
+ not and the click should be passed to the next click handling
+ procedure.
+ @see DoKeyDownProcType
+
+ @note The numeric argument types have changed in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DoClickProcType)(AVTool tool, AVPageView pageView,
+ AVDevCoord xHit, AVDevCoord yHit,
+ AVFlagBits16 flags,
+ AVTCount clickNo);
+
+
+#endif /* (ACRO_SDK_LEVEL >= 0x00060000) */
+
+/** A callback for AVTool. It is called when this tool has become the active tool. It is allowed to call
+ AVAppGetActiveTool() from within this method or from DeactivateProcType(); it
+ will return this tool object. Call AVAppGetLastActiveTool() to get the formerly active
+ tool object (its DeactivateProcType() method will already have been called).
+ @param tool IN/OUT The tool to activate.
+ @param persistent IN/OUT <code>true</code> if it should remain active through an
+ arbitrary number of <i>operations</i> (whatever that means for a
+ particular tool) rather than performing a single action
+ (<i>one shot</i>) and then restoring the previously active tool,
+ <code>false</code> otherwise.
+ @see DeactivateProcType
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *ActivateProcType)(AVTool tool, ASBool persistent);
+
+/**
+ A callback for AVTool. It is called when the tool will no longer
+ be the active tool.
+ @param tool IN/OUT The tool to deactivate.
+ @see ActivateProcType
+ @see AVAppSetActiveTool
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DeactivateProcType)(AVTool tool);
+
+/**
+ A callback for AVTool. It handles key presses when the tool is
+ active.
+ @param tool IN/OUT The tool.
+ @param key IN/OUT The key that was pressed.
+ @param flags IN/OUT Modifier keys that were also pressed. It must
+ be an <code>OR</code> of the Modifier Keys values.
+ @return <code>true</code> if the callback handled the key press, <code>false</code> if it
+ did not and the key press should be passed to the key press handling procedure.
+ @see DoClickProcType
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DoKeyDownProcType)(AVTool tool, AVKeyCode key, AVFlagBits16 flags);
+
+/**
+ A callback for AVTool. It returns the tool's name.
+ @param tool IN/OUT The tool.
+ @return The ASAtom corresponding to the tool's name.
+ @see AVAppGetToolByName
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *GetTypeProcType)(AVTool tool);
+
+/**
+ A callback for AVTool. It indicates whether the tool should
+ stay active after it has been used or is a one-shot
+ tool.
+
+ <p>The Acrobat viewer does not contain any code to enforce
+ a tool's request to be persistent; it is up to each tool
+ to be a good citizen. For example, if a tool is not persistent,
+ after that tool is used once it should get the previously
+ active tool (using AVAppGetLastActiveTool()) and check whether
+ that tool should be persistent (using AVToolIsPersistent()).
+ If so, set the active tool to that tool. If not, set the
+ active tool to the default tool (obtained using AVAppGetDefaultTool()). </p>
+ @param tool The tool.
+ @return <code>true</code> if the tool should be persistent, <code>false</code> otherwise.
+ @see AVToolIsPersistent
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *IsPersistentProcType)(AVTool tool);
+
+/**
+ A callback for AVTool. It is called when the tool leaves the page
+ view (when the cursor is moved out of the page view).
+ @param tool IN/OUT The tool.
+ @param pageView IN/OUT The AVPageView that the tool left.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DoLeaveProcType)(AVTool tool, AVPageView pageView);
+
+/**
+ A callback for AVTool. It gets the selection server associated
+ with the tool, if any.
+ @param tool IN/OUT The tool.
+ @param doc IN/OUT The active AVDoc.
+ @return The selection server associated with this tool. It returns
+ <code>NULL</code> if the tool has no selection server.
+*/
+typedef ACCBPROTO1 AVDocSelectionServer (ACCBPROTO2 *GetSelectionServerProcType)(AVTool tool, AVDoc doc);
+
+/**
+ An AVToolRec callback. If provided, it is called at shutdown time
+ to allow the tool to free dynamic memory.
+ @param tool The tool to be destroyed.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVToolDestroyProc)(AVTool tool);
+
+/**
+ A callback for AVToolRec. If provided, it is called when text describing
+ the tool needs to be displayed.
+ @param tool The tool.
+ @return The text object.
+*/
+typedef ACCBPROTO1 ASConstText (ACCBPROTO2 *AVToolGetLabelProc)(AVTool tool);
+
+/**
+ A callback for AVToolRec. If provided, it is called when a static
+ tool icon is needed. This icon should be similar to, but
+ not the same as the tool button icon for this tool.
+ @param tool The tool.
+ @return The icon object.
+*/
+typedef ACCBPROTO1 AVIcon (ACCBPROTO2 *AVToolGetLabelIconProc)(AVTool tool);
+
+/**
+ (Acrobat 7.0 and later) Describes the direction of mouse wheel movement.
+
+ @see HandleMouseWheelScroll
+*/
+enum {
+
+ /** */
+ AVToolMouseWheelUp,
+
+ /** */
+ AVToolMouseWheelDown
+};
+
+typedef ASEnum16 AVToolMouseWheelDirection;
+
+/**
+ A callback for AVTool. Handles mouse wheel scroll events when
+ the tool is active.
+
+ @param tool The tool.
+ @param pageView The AVPageView in which the click occurred.
+ @param direction The direction of the mouse wheel movement.
+ @param numLines The number of lines moved.
+ @param flags Modifier keys that were held down while wheeling. It must be an <code>OR</code> of the Modifier Keys values.
+
+ @return <code>true</code> if the callback handled the click, <code>false</code> if it did
+ not and the wheel should be passed to the next wheel handling
+ procedure.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *HandleMouseWheelScrollProc)(AVTool tool, AVPageView pageView,
+ AVToolMouseWheelDirection direction,
+ AVTCount numLines, AVFlagBits16 flags);
+
+
+/* Concrete instantiation of a tool object. Tool implementations will
+ usually "subclass" this by pass a ptr to struct with an AVToolRec as
+ its first member to AVAppRegisterTool, cast as an AVTool.
+*/
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A data structure for a tool. It contains callbacks that implement
+ the tool's functions (for example, handling mouse clicks
+ and controlling the cursor shape).
+ @see AVAppGetActiveTool
+ @see AVAppSetActiveTool
+ @see AVAppGetDefaultTool
+ @see AVAppGetLastActiveTool
+ @see AVAppGetToolByName
+ @see AVAppRegisterTool
+ @see AVToolGetType
+ @see AVToolIsPersistent
+*/
+typedef struct _t_AVTool
+{
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVToolRec)</code>. */
+ ASSize_t size;
+
+
+ /** This method is called when this tool has become the active tool. It
+ is allowed to call AVAppGetActiveTool() from within this
+ method or from Deactivate(); it will return this tool object. Call
+ AVAppGetLastActiveTool() to get the formerly active tool object
+ (its Deactivate() method will already have been called).
+
+ <p>If <code>persistent</code> is <code>true</code> and has meaning for this tool,
+ it means that the tool should remain active through an arbitrary number of <i>operations</i>
+ (whatever that means for a particular tool), rather than
+ performing a single action (as a <i>one shot</i>) and then restoring
+ the previously active tool. If <code>persistent</code> is <code>false</code>,
+ the opposite is implied.</p>
+ */
+ ActivateProcType Activate;
+
+ /** */
+ DeactivateProcType Deactivate;
+
+ /** Deprecated. Use DoClick(). */
+ oldDoClickProcType oldDoClick;
+
+ /** Deprecated. Use AdjustCursor(). */
+ oldAdjustCursorProcType oldAdjustCursor;
+
+ /** */
+ DoKeyDownProcType DoKeyDown;
+
+ /** */
+ GetTypeProcType GetType;
+
+ /** Returns <code>true</code> if the tool is persistent at this time (this may be <code>false</code>
+ even though Active was called with <code>persistent = true</code>, or vice-versa).
+ If it is <code>NULL</code>, AVToolIsPersistent() will return <code>true</code>.
+ */
+ IsPersistentProcType IsPersistent;
+
+
+ /** A default cursor, used if the tool does not have an AdjustCursorProcType() callback.
+ It is ignored if AdjustCursor() is non-<code>NULL</code>; if AdjustCursor() is <code>NULL</code>, the
+ default AdjustCursor() implementation will set the cursor to the
+ result of calling <code>AVSysGetStandardCursor(cursorId)</code> unless a
+ hit annotation sets the cursor. The default AdjustCursor()
+ is appropriate for most tool implementations. See the ZoomTool implementation for
+ an example of a private AdjustCursor() implementation.
+ */
+ AVCursorID cursorID;
+
+ /** Returns <code>true</code> if the tool is enabled (<i>legal</i>).
+ It is <i>legal</i> if the front-most document permits the tool's operation.
+ It will only be called if there is a front-most document.
+ If it is <code>NULL</code>, the tool is always enabled.
+ */
+ AVComputeEnabledProc ComputeEnabled;
+
+ /** User-supplied data to pass to the tool's AVComputeEnabledProc() callback each time it is called. */
+ void *computeEnabledData;
+
+
+ /** Deprecated. */
+ oldDoClickProcType oldDoRightClick;
+
+ /** */
+ DoLeaveProcType DoLeave;
+
+
+ /** */
+ GetSelectionServerProcType GetSelectionServer;
+
+ /** */
+ DoClickProcType DoClick;
+
+ /** */
+ AdjustCursorProcType AdjustCursor;
+
+ /** */
+ DoClickProcType DoRightClick;
+
+
+ /** */
+ void *clientData;
+
+ /** */
+ AVToolDestroyProc Destroy;
+
+ /** */
+ AVToolGetLabelProc GetLabel;
+
+ /** */
+ AVToolGetLabelIconProc GetLabelIcon;
+
+ /** */
+ HandleMouseWheelScrollProc HandleMouseWheel;
+
+} AVToolRec;
+
+#endif /* (ACRO_SDK_LEVEL >= 0x00060000) */
+
+/**
+ A callback for AVAppEnumTools(). It is called once for each
+ tool.
+ @param tool IN/OUT The tool currently being enumerated.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVAppEnumTools().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see AVAppEnumTools
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVToolEnumProc)(AVTool tool, void *clientData);
+
+
+/************************************************************************************\
+|* *|
+|* AVToolBar *|
+|* *|
+\************************************************************************************/
+#ifdef __cplusplus
+class AVToolBarObj;
+typedef AVToolBarObj *AVToolBar;
+#else
+typedef struct _t_AVToolBar *AVToolBar;
+#endif
+
+/************************************************************************************\
+|* *|
+|* AVToolButton *|
+|* *|
+\************************************************************************************/
+
+/* bit-field values for toolbuttons */
+
+/**
+ Indicates that the toolbar button is visible only in the viewer's toolbar.
+ @ingroup ToolButtonFlags
+*/
+#define TOOLBUTTON_INTERNAL 1
+
+/**
+ Indicates that the toolbar button is visible only in the toolbar of an external application
+ (such as a web browser).
+ @ingroup ToolButtonFlags
+*/
+#define TOOLBUTTON_EXTERNAL 2
+
+/**
+ A button in the Acrobat viewer's toolbar. Like menu items, the procedure that executes
+ when the button is clicked can be set by a plug-in. Although not required, there is
+ generally a menu item corresponding to each button, allowing users to select a
+ function using either the button or the menu item. Buttons are added to the toolbar by
+ specifying which existing button they appear before or after.
+ @see AVToolBarGetButtonByName
+ @see AVToolButtonNew
+ @see AVToolBarEnumButtons
+ @see AVToolButtonDestroy
+ @see AVToolButtonRemove
+ @see AVToolBarEnumButtons
+ @see AVToolButtonGetFlyout
+ @see AVToolButtonSetFlyout
+ @see AVToolButtonGetIcon
+ @see AVToolButtonSetIcon
+ @see AVToolButtonGetMenu
+ @see AVToolButtonSetMenu
+ @see AVToolButtonIsEnabled
+ @see AVToolButtonIsMarked
+ @see AVToolButtonIsSeparator
+ @see AVToolButtonSetComputeEnabledProc
+ @see AVToolButtonSetComputeMarkedProc
+ @see AVToolButtonSetExecuteProc
+ @see AVToolButtonSetExternal
+ @see AVToolButtonSetHelpText
+*/
+#ifdef __cplusplus
+class AVToolButtonObj;
+typedef AVToolButtonObj *AVToolButton;
+#else
+typedef struct _t_AVToolButton *AVToolButton;
+#endif
+
+/**
+ A structure used to describe how a tool button should be inserted into a given toolbar.
+ @see AVToolArAddButtonEx
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+typedef struct _t_AVToolBarAddButtonParamsRec
+{
+ /** Set to <code>sizeof(AVToolBarAddButtonParamsRec)</code>. */
+ ASSize_t size;
+
+ /** Set to a reference button that you want your button to be inserted next to */
+ AVToolButton neighborButton;
+ /** Set to <code>true</code> to insert your button before (left of) the reference button */
+ ASBool before;
+
+ /** Set to <code>true</code> to insert your button as hidden by default */
+ ASBool hiddenDefault;
+} AVToolBarAddButtonParamsRec, *AVToolBarAddButtonParams;
+
+/**
+ A callback for AVToolBarEnumButtons(). It is called once for
+ each toolbar button.
+ @param button IN/OUT The toolbar button currently being enumerated.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVToolBarEnumButtons().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see AVToolBarEnumButtons
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVToolButtonEnumProc)(AVToolButton button, void *clientData);
+
+
+/**
+ Constants that specify the layer in which a newly-created
+ AVWindow is to appear.
+ @see AVWindowNew
+ @see AVWindowNewFromPlatformThing
+*/
+
+typedef ASInt32 AVWindowLayer;
+
+/** @ingroup AVWindowLayerFlags */
+#define AVWLunknown 0
+
+/** A regular window, such as a document window.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLnonfloating 1
+
+/** A floating window, such as a palette.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLfloating 2
+
+/** A modal dialog box.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLmodal 3
+
+/** (New in Acrobat 5.0) A popup window without a caption, a one-pixel border and drop shadow.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLpopup 4
+
+/** (Internal use only) A toolbar window.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLtoolbar 5
+
+/** (Internal use only) A help window.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLhelp 6
+
+/** A window that occupies the same layer as popup menus, and has no title bar decorations.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLmenu 7
+
+/** A top level window that has no user interface except a frame.
+ @ingroup AVWindowLayerFlags
+*/
+#define AVWLtopmost 8
+/** The window is resizeable.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_RESIZEABLE 0x80000000
+
+/** The window has a close box.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_HASCLOSEBOX 0x40000000
+
+/** The window has a zoom box.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_HASZOOMBOX 0x20000000
+
+/** The window has a minimize box.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_HASMINIMIZEBOX 0x04000000
+
+/** The window has a drag bar.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_HASDRAGBAR 0x02000000
+
+/** The window has a small title bar.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_SMALLTITLEBAR 0x01000000
+
+/** <i>Auxiliary</i> windows pass unhandled menu commands to the frontmost document
+ window. For example, the Find dialog box is <i>auxiliary</i> since menu items such as Save and
+ Close should still be enabled. A window that does not purport to operate on
+ the topmost document window (for example, an "Establish Connection to Library of Congress"
+ dialog box) would probably not be auxiliary.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_AUXILIARY 0x10000000
+
+/** @ingroup AVWindowFlags
+ AVWIN_WANTSKEY is deprecated and ignored.
+*/
+#define AVWIN_WANTSKEY 0x08000000
+
+/** The window hides itself when focus is lost.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_TRANSIENT 0x00800000
+
+/** The window sizes itself to fit its child views.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_FORMFIT 0x00400000
+
+/** The default internal document window for the platform.
+ It must be combined with <code>AVWLnonfloating</code>.
+ This overrides <i>all</i> other flags.
+*/
+#define AVWIN_INTERNAL_DOC 0x00200000
+
+/** The window does not have decorations such as borders, captions or edges.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_UNDECORATED 0x00100000
+
+/** The window does not have decorations such as borders, captions or edges.
+ @ingroup AVWindowFlags
+*/
+#define AVWIN_PDFICON 0x00200000
+
+/************************************************************************************\
+|* *|
+|* AVWindowHandler *|
+|* *|
+\************************************************************************************/
+
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A callback for AVWindowHandler. Mouse clicks in the AVWindow
+ are dispatched through this callback.
+ @param win The window in which the click occurred.
+ @param x The click's x-coordinate.
+ @param y The click's y-coordinate.
+ @param platformEvent A platform-specific event record. On Mac OS, it is
+ a pointer to an EventRecord. On the UNIX operating system it is an <code>eventPtr</code>.
+ @see AVWindowKeyDownProc
+
+ @note The coordinate numeric types have changed in Acrobat
+ 6.0.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowMouseDownProc)(AVWindow win, AVWindowCoord x, AVWindowCoord y, void *platformEvent);
+
+/**
+ A callback for AVWindowHandler. It is called whenever the window
+ needs to refresh some part of its interior. It should redraw
+ the contents of the specified rectangle.
+ @param win IN/OUT The window whose content is redrawn.
+ @param rect IN/OUT The region of <code>win</code> to redraw.
+ @see AVWindowDrawNow
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDrawProc)(AVWindow win, const AVWindowRect *rect);
+
+/**
+ A callback for AVWindowHandler. It is called when the window is
+ about to resize.
+ @param win IN/OUT The window to resize.
+ @param newFrame IN/OUT A rectangle specifying the size to which
+ the window will be resized. This callback may change the
+ new frame size.
+ @return <code>true</code> to permit the resizing, <code>false</code> to abort it.
+ @see AVWindowSetFrame
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVWindowWillBeResizedProc)(AVWindow win, AVScreenRect *newFrame);
+
+/**
+ A callback for AVWindowHandler. It is called periodically while
+ the cursor is over the AVWindow (if the window is active).
+ Use this to adjust the cursor's appearance.
+ @param win IN/OUT The window containing the cursor.
+ @param x IN/OUT The cursor's x-coordinate.
+ @param y IN/OUT The cursor's y-coordinate.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowAdjustCursorProc)(AVWindow win, AVWindowCoord x, AVWindowCoord y);
+
+/**
+ A callback for AVWindowHandler. It is called after the window has
+ been resized.
+ @param win IN/OUT The window that was resized.
+ @param newFrame IN/OUT A rectangle specifying the window's new size
+ and location.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDidResizeProc)(AVWindow win, const AVScreenRect *newFrame);
+
+/**
+ A callback for AVWindowHandler. It is called after the window has
+ been maximized.
+ @param win IN/OUT The window that was maximized.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDidMaximizeProc)(AVWindow win);
+
+/**
+ A callback for AVWindowHandler. It is called after the window has
+ been collapsed.
+ @param win IN/OUT The window that was collapsed.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDidCollapseProc)(AVWindow win);
+
+/**
+ A callback for AVWindowHandler. It is called after the window has
+ been resized.
+ @param win IN/OUT The window that was resized.
+ @param newFrame IN/OUT Rectangle specifying the window's new size
+ and location.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDidMoveProc)(AVWindow win, const AVScreenRect *newFrame);
+#endif /* (ACRO_SDK_LEVEL >= 0x00060000) */
+
+/**
+ A callback for AVWindowHandler. The window is about to close.
+ @param win IN/OUT The window to close.
+ @param quitting IN/OUT If <code>true</code>, the application is trying to quit.
+ @return <code>true</code> if the window should close, <code>false</code> to abort the operation.
+ @see AVWindowUserClose
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVWindowWillCloseProc)(AVWindow win, ASBool quitting);
+
+/**
+ A callback for AVWindowHandler. It is called immediately after the
+ window has been closed, but before it has been freed. You
+ may want to explicitly destroy the window in this routine.
+ See also AVWindowWillCloseProc.
+ @param win IN/OUT The window that was closed.
+ @see AVWindowWillCloseProc
+ @see AVWindowUserClose
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDidCloseProc)(AVWindow win);
+
+/**
+ A callback for AVWindowHandler. It is called after the window has
+ been activated. The window being activated will not always
+ become the front-most window.
+ @param win IN/OUT The window being activated.
+ @see AVWindowWillDeactivateProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDidActivateProc)(AVWindow win);
+
+/**
+ A callback for AVWindowHandler. It is called after the window becomes
+ the key window.
+ @param win IN/OUT The window becoming the key
+ window.
+ @see AVWindowWillResignKeyProc
+ @see AVWindowSetWantsKey
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDidBecomeKeyProc)(AVWindow win);
+
+/**
+ A callback for AVWindowHandler. It is called to handle keystrokes
+ when this is the key window.
+ @param win IN/OUT The window.
+ @param key IN/OUT The key that was pressed.
+ @param platformEvent IN/OUT A platform-specific event record. On Mac OS, it is
+ a pointer to an EventRecord. On the UNIX operating system it is an <code>eventPtr</code>.
+ @see AVWindowMouseDownProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowKeyDownProc)(AVWindow win, char key, void *platformEvent);
+
+/**
+ A callback for AVWindowHandler. It is called before the window ceases
+ to be the key window.
+ @param win IN/OUT The window to resign its key status.
+ @see AVWindowDidBecomeKeyProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowWillResignKeyProc)(AVWindow win);
+
+/**
+ A callback for AVWindowHandler. It is called before the window becomes
+ deactivated or hidden.
+ @param win IN/OUT The window that will be deactivated.
+ @see AVWindowDidActivateProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowWillDeactivateProc)(AVWindow win);
+
+/**
+ A callback for AVWindowHandler. It is called when the user has chosen
+ an Edit menu item and the corresponding AVWindowCanPerformEditOpProc()
+ returned <code>true</code>.
+ @param win IN/OUT The window that the Edit menu item is to act
+ on.
+ @param editOp IN/OUT An ASAtom specifying the edit operation.
+ It must be an ASAtom corresponding to one the strings:
+ <ul>
+ <li>
+ <code>"Cut"</code>
+ </li>
+ <li>
+ <code>"Copy"</code>
+ </li>
+ <li>
+ <code>"Paste"</code>
+ </li>
+ <li>
+ <code>"Clear"</code>
+ </li>
+ <li>
+ <code>"SelectAll"</code>
+ </li>
+ <li>
+ <code>"Undo"</code>
+ </li>
+ </ul>
+ @see AVWindowCanPerformEditOpProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowPerformEditOpProc)(AVWindow win, ASAtom editOp);
+
+/**
+ A callback for AVWindowHandler. It is called before showing the
+ Edit menu, to determine whether to enable the Edit menu
+ item corresponding to the given ASAtom.
+ @param win The current window.
+ @param editOp ASAtom specifying the edit operation. It must
+ be an ASAtom corresponding to one the strings:
+ <ul>
+ <li>
+ <code>"Cut"</code>
+ </li>
+ <li>
+ <code>"Copy"</code>
+ </li>
+ <li>
+ <code>"Paste"</code>
+ </li>
+ <li>
+ <code>"Clear"</code>
+ </li>
+ <li>
+ <code>"SelectAll"</code>
+ </li>
+ <li>
+ <code>"Undo"</code>
+ </li>
+ </ul>
+
+ @return <code>true</code> if the specified operation can be performed, <code>false</code>
+ otherwise.
+ @see AVWindowPerformEditOpProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVWindowCanPerformEditOpProc)(AVWindow win, ASAtom editOp);
+
+/**
+ A callback for AVWindowHandler. It is called when it is time to dispose
+ of the <code>platformThing</code> for the window passed to AVWindowNewFromPlatformThing().
+ @param win The window.
+ @param platformThing The platform-specific object (<code>WindowPtr</code>
+ on Mac OS, an <code>HWND</code> on Windows, and a <code>Widget</code> on UNIX) that
+ was used for this window.
+ @see AVWindowNewFromPlatformThing
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVWindowDestroyPlatformThingProc)(AVWindow win, void *platformThing);
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A data structure containing callbacks that implement a window
+ handler. The callbacks implement the window handler functions.
+ For example, they can resize the window, draw its contents, handle
+ mouse clicks, and handle key presses. <code>NULL</code> values are acceptable;
+ default behavior is used in such cases.
+ @see AVWindowNew
+ @see AVWindowNewFromPlatformThing
+*/
+typedef struct _t_AVWindowHandler
+{
+ /** The size of the data structure. It must be set to <code>sizeof(AVWindowHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** Mouse clicks in the AVWindow are dispatched through this callback.*/
+ AVWindowMouseDownProc MouseDown;
+
+ /**
+ The window is about to close. It returns <code>true</code> if the window should
+ close, <code>false</code> to abort the operation. If <code>quitting</code> is <code>true</code>,
+ the application is in the middle of trying to quit.
+ */
+ AVWindowWillCloseProc WillClose;
+
+ /**
+ Called immediately after the window has closed, but before it has
+ been freed (if one-shot).
+ */
+ AVWindowDidCloseProc DidClose;
+
+ /** Called after the window becomes the frontmost, active window.*/
+ AVWindowDidActivateProc DidActivate;
+
+ /** Called after the window becomes the key window. */
+ AVWindowDidBecomeKeyProc DidBecomeKey;
+
+ /** Called to handle keystrokes when this is the key window. */
+ AVWindowKeyDownProc KeyDown;
+
+ /** Called before the window ceases to be the key window. */
+ AVWindowWillResignKeyProc WillResignKey;
+
+ /** Called before the window becomes deactivated or hidden. */
+ AVWindowWillDeactivateProc WillDeactivate;
+
+ /**
+ Called whenever the window needs to refresh some part of its
+ interior.
+ */
+ AVWindowDrawProc Draw;
+
+ /**
+ The window is about to be resized in accordance with the
+ given rectangle. This callback may alter the contents
+ of <code>newFrame</code> to change the new frame size. Returning <code>false</code>
+ aborts the operation.
+ */
+ AVWindowWillBeResizedProc WillBeResized;
+
+ /**
+ Called when the user has chosen an Edit menu item corresponding
+ to the given ASAtom, assuming the corresponding CanPerformEditProc()
+ returned <code>true</code>.
+ */
+ AVWindowPerformEditOpProc PerformEditOp;
+
+ /**
+ Called before showing the menus to determine whether a given
+ Edit menu item corresponding to the given ASAtom should be enabled.
+ */
+ AVWindowCanPerformEditOpProc CanPerformEditOp;
+
+ /**
+ Called periodically while the cursor is over the AVWindow (if active).
+ Use this to adjust the cursor's appearance.
+ */
+ AVWindowAdjustCursorProc AdjustCursor;
+
+ /**
+ Called after a window is resized.
+ */
+ AVWindowDidResizeProc DidResize;
+
+ /**
+ Called during DestroyWindow() when it is time to dispose
+ of the <code>platformThing</code> for the window passed into
+ AVWindowNewFromPlatformThing().
+ */
+ AVWindowDestroyPlatformThingProc DestroyPlatformThing;
+
+ /**
+ Called after a window is maximized.
+ */
+ AVWindowDidMaximizeProc DidMaximize;
+
+ /**
+ Called after a window is collapsed.
+ */
+ AVWindowDidCollapseProc DidCollapse;
+
+ /**
+ Called after a window is moved.
+ */
+ AVWindowDidMoveProc DidMove;
+} AVWindowHandlerRec, *AVWindowHandler;
+#endif
+/************************************************************************************\
+|* *|
+|* AVGrafSelect *|
+|* *|
+\************************************************************************************/
+typedef struct _t_AVGrafSelect *AVGrafSelect;
+
+/************************************************************************************\
+|* *|
+|* AVAlert *|
+|* *|
+\************************************************************************************/
+
+/** @ingroup AVAlertIcons */
+#define ALERT_NOICON 0
+
+/** @ingroup AVAlertIcons */
+#define ALERT_STOP 1
+
+/** @ingroup AVAlertIcons */
+#define ALERT_CAUTION 2
+
+/** @ingroup AVAlertIcons */
+#define ALERT_NOTE 3
+
+/** @ingroup AVAlertIcons */
+#define ALERT_QUESTION 4
+
+
+/** Alert Types */
+enum {
+
+ /** */
+ kAVAlertTypeNone = 0,
+
+ /** */
+ kAVAlertTypeOk,
+
+ /** */
+ kAVAlertTypeOkCancel,
+
+ /** */
+ kAVAlertTypeYesNo,
+
+ /** */
+ kAVAlertTypeYesNoCancel
+};
+typedef ASEnum16 AVAlertType;
+
+
+/**
+ A data structure containing information about a button used
+ in an Alert dialog box.
+ @see AVAlertWithParams
+*/
+typedef struct AVAlertButtonInfo {
+
+ /** Pass <code>true</code> to show the button. */
+ ASBool show;
+
+ /** If non-<code>NULL</code> this text is used as the button caption, otherwise the default is used. The default values
+ for <code>button1</code>, <code>button2</code> and <code>button3</code> are <code>"OK"</code>, <code>"Cancel"</code>, and <code>""</code> respectively.*/
+ ASText title;
+} AVAlertButtonInfo;
+
+
+/**
+ A data structure containing information about a checkbox used
+ in an Alert dialog box.
+ @see AVAlertWithParams
+*/
+typedef struct AVAlertCheckBoxInfo {
+
+ /** Pass <code>true</code> to show the button. */
+ ASBool show;
+
+ /** If non-<code>NULL</code> this text is used as the checkbox caption, otherwise the default is used. The default value
+ for the checkbox is <code>"Do not show this message again"</code>.
+ */
+ ASText title;
+
+ /** Pass <code>true</code> to initially check the box. The chosen value is returned in this parameter. */
+ ASBool value;
+} AVAlertCheckBoxInfo;
+
+/* AVAlertParams -- passed into AVAlertWithParams
+*/
+
+/**
+ A data structure containing information about the format of
+ an Alert dialog box.
+ @see AVAlertWithParams
+*/
+typedef struct _t_AVAlertParams
+{
+
+ /** The size of the structure. It must be set to <code>sizeof(AVAlertParamsRec)</code>. */
+ ASSize_t size;
+
+
+ /** The AVDoc that is the modal parent of the alert dialog box. It may be <code>NULL</code>. The <code>parentDoc</code> can be <code>NULL</code>,
+ in which case the alert dialog box' parent is the currently active doc, if there is one. The <code>parentDoc</code> is a no-op on
+ Mac OS.
+ */
+ AVDoc parentDoc;
+
+ /** The title of the dialog box. It may be <code>NULL</code>, in which case the default title, <code>"Adobe Acrobat"</code>, is used. */
+ ASText windowTitle;
+
+ /** The icon to display. It must be one of the AVAlert Icons.
+ @ref AVAlertIcons
+ */
+ AVIconType iconType;
+
+ /** The message to display. */
+ ASText message;
+
+ /** Set to <code>true</code> to trigger a beep when the dialog box is shown. */
+ ASBool beep;
+
+ /** An AVAlertButtonInfo structure describing the dialog box' buttons. Any or all of these buttons may be <code>NULL</code>. If all
+ are <code>NULL</code>, the dialog box is shown with an OK button.
+ */
+ AVAlertButtonInfo button1;
+
+ /** An AVAlertButtonInfo structure describing the dialog box' buttons. Any or all of these buttons may be <code>NULL</code>. If all
+ are <code>NULL</code>, the dialog box is shown with an OK button.
+ */
+ AVAlertButtonInfo button2;
+
+ /** An AVAlertButtonInfo structure describing the dialog box' buttons. Any or all of these buttons may be <code>NULL</code>. If all
+ are <code>NULL</code>, the dialog box is shown with an OK button.
+ */
+ AVAlertButtonInfo button3;
+
+ /** An AVAlertCheckBoxInfo structure describing the dialog box' checkbox. It may be <code>NULL</code>. */
+ AVAlertCheckBoxInfo checkbox;
+
+ /** The type of the alert. */
+ AVAlertType alertType;
+
+ /** The window to be the parent of the alert. It is ignored if <code>parentDoc</code> is non-<code>NULL</code>. It is ignored on Mac OS. */
+ AVWindow parentWindow;
+}
+AVAlertParamsRec, *AVAlertParams;
+
+/************************************************************************************\
+|* *|
+|* AVAction *|
+|* *|
+\************************************************************************************/
+
+/*
+** opaque action handler object: see AVAction.h
+*/
+
+/** Carries out an action. When the Acrobat viewer executes an action, it looks for the
+ action handler with a type matching that of the action it is trying to execute. The
+ Acrobat viewer invokes the matching handler to perform the action. If no match is
+ found, the Acrobat viewer ignores the user action.
+ @see AVAppGetActionHandlerByType
+ @see AVAppEnumActionHandlers
+ @see AVAppEnumActionHandlers
+ @see AVAppGetActionHandlerByType
+ @see AVActionHandlerGetProcs
+ @see AVActionHandlerGetType
+ @see AVActionHandlerGetUIName
+*/
+typedef struct _t_AVActionHandler *AVActionHandler;
+
+/*
+** definition of action handler procs object used by AVAppRegisterActionHandler, also see AVActnIm.h
+*/
+typedef struct _t_AVActionHandlerProcs *AVActionHandlerProcs;
+
+
+/**
+ A callback used by AVAppEnumActionHandlers(). It is called once
+ for each action handler.
+ @param type The action handler's name.
+ @param userName The action's name, as it appears in the
+ Acrobat viewer's user interface.
+ @param clientData User-supplied data that was passed in
+ the call to AVAppEnumActionHandlers().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see AVActionHandlerGetProcs
+ @see AVAppEnumActionHandlers
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVActionEnumProc)(ASAtom type, char *userName, void *clientData);
+
+/* An implementer of an action handler should fill out the functions in
+ * this struct and call AVAppRegisterActionHandler.
+ */
+
+#define PDACTION_DESC_BUF_SIZE 256
+
+
+/**
+ A callback for AVActionHandlerProcs(). It performs the action.
+ @param actionHandlerObj IN/OUT User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param action IN/OUT The action to perform.
+ @param doc IN/OUT The document in which the action is located.
+ @see AVActionGetInstructionsProc
+ @see AVActionPerformExProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVActionPerformProc)(void *actionHandlerObj, PDAction action, AVDoc doc);
+
+/**
+ A callback for AVActionHandlerProcs(). It displays a user interface
+ that allows a user to set the action's properties. For example,
+ for a Launch action, set the file to launch; for a GoTo
+ action, select the destination page/zoom coordinates).
+ @param actionHandlerObj IN/OUT User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param action IN/OUT The action whose properties are set.
+ @param doc IN/OUT The document in which the action is located.
+ @see AVActionHandlerGetProcs
+ @see AVActionDoPropertiesEx
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVActionDoPropertiesProc)(void *actionHandlerObj, PDAction action, AVDoc doc);
+
+/**
+ (Required) A callback for AVActionHandlerProcs(). This required
+ function is called as soon as the user selects the action
+ from the action types popup menu. It allows an action handler
+ to populate a newly created action's <code>actionDict</code>. At the
+ time this method is called, the information needed to completely
+ specify an action is often not yet available. As a result,
+ this method is generally a good place to populate the <code>actionDict</code>
+ with default values.
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param actionDict The action dictionary to populate with default
+ values.
+ @param doc The document in which the action is located.
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVActionFillActionDictProc)(void *actionHandlerObj, CosObj actionDict, AVDoc doc);
+
+/**
+ A callback for AVActionHandlerProcs(). This optional function
+ should store into buffer a <code>NULL</code>-terminated C string that
+ contains localized instructions for the action creation/properties
+ dialog box.
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param action The action whose instructions are returned.
+ @param buffer (Filled by the callback) The instruction
+ text.
+ @param bufLen The length of <code>buffer</code> in bytes.
+ @param doc The document in which the action is located.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVActionPerformExProc
+ @see AVActionPerformProc
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 AVTArraySize (ACCBPROTO2 *AVActionGetInstructionsProc)(void *actionHandlerObj, PDAction action, char *buffer, AVTArraySize bufLen, AVDoc doc);
+
+/**
+ A callback for AVActionHandlerProcs. This optional function
+ should store into <code>buffer</code> a <code>NULL</code>-terminated C string that
+ is a localized string for the edit action button in the
+ action dialog box.
+
+ <p>For example, the Acrobat viewer's built-in <code>OpenFile</code> action
+ returns <code>"Select File"</code> for this string. </p>
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param action The action whose button text is returned.
+ @param buffer (Filled by the callback) The button text.
+ @param bufLen The length of <code>buffer</code> in bytes.
+ @param doc The document in which the action is located.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVActionGetStringOneTextProc
+ @see AVActionGetStringTwoTextProc
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 AVTArraySize (ACCBPROTO2 *AVActionGetButtonTextProc)(void *actionHandlerObj, PDAction action, char *buffer, AVTArraySize bufLen, AVDoc doc);
+
+/**
+ (Optional) A callback for AVActionHandlerProcs(). This function
+ should store into <code>buffer</code> a <code>NULL</code>-terminated C string that
+ is a localized string placed above the edit action button
+ in the action dialog box. A <code>NULL</code> proc will cause the button
+ to hide.
+
+ <p>For example, the Acrobat viewer's built-in <code>OpenFile</code> action
+ returns <code>"File N: \<the current filename\>"</code> for this string. </p>
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param action The action whose <code>"string 1"</code> text is returned.
+ @param buffer (Filled by the callback) The string text
+ appearing above the button.
+ @param bufLen Length of <code>buffer</code> in bytes.
+ @param doc The document in which the action is located.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVActionGetButtonTextProc
+ @see AVActionGetStringTwoTextProc
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 AVTArraySize (ACCBPROTO2 *AVActionGetStringOneTextProc)(void *actionHandlerObj, PDAction action, char *buffer, AVTArraySize bufLen, AVDoc doc);
+
+/**
+ A callback for AVActionHandlerProcs(). This optional function
+ should store into buffer a <code>NULL</code>-terminated C string which
+ is a localized string placed below the edit action button
+ in the action dialog box.
+
+ <p>For example, the Acrobat viewer's built-in <code>OpenFile</code> action
+ returns nothing for this string, but the built-in <code>GoToView</code>
+ action returns a description of the current zoom type. </p>
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param action The action whose "string 2" text is returned.
+ @param buffer (Filled by the callback) The string text
+ appearing below the button.
+ @param bufLen Length of <code>buffer</code> in bytes.
+ @param doc The document in which the action is located.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVActionGetButtonTextProc
+ @see AVActionGetStringOneTextProc
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 AVTArraySize (ACCBPROTO2 *AVActionGetStringTwoTextProc)(void *actionHandlerObj, PDAction action, char *buffer, AVTArraySize bufLen, AVDoc doc);
+
+/**
+ (Optional) A callback for AVActionHandlerProcs(). It is called upon
+ to copy an action, possibly to another document. Action
+ handlers should provide this callback to allow for copying
+ their actions. It is called by AVDocCopyAction().
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param fromDoc The document whose action is copied.
+ @param anAction The action to copy.
+ @param toDoc The document to which the action is copied.
+ @return The newly created PDAction copy.
+ @see AVDocCopyAction
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 PDAction (ACCBPROTO2 *AVActionCopyProc)(void *actionHandlerObj, AVDoc fromDoc, PDAction anAction, AVDoc toDoc);
+
+/**
+ Optional callback for AVActionHandlerProcs(). It is called to get
+ informational details to present to the user. The handler
+ can provide one or more ASText strings which are added to
+ the ASCab provided by the caller. Generally, each string
+ should form a single informational item, often provided
+ in a <code>"key: value"</code> format. The caller will organize the strings
+ into a list that is presented in the user interface.
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param doc The document in which the action is located.
+ @param action The action whose details are returned.
+ @param details (Filled by the callback) The ASCab to populate
+ with the informational details, provided as ASText strings.
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVActionGetDetailsProc)(void *actionHandlerObj, AVDoc doc, PDAction action, ASCab details);
+
+/**
+ This structure gives the action handler some context in
+ terms of its execution. It specifies the <code>" parent"</code> object,
+ which initiated the action, and the trigger type of the
+ action. Trigger names should correspond to the key used
+ in the AA dictionary of the file.
+ @see AVActionPerformExProc
+*/
+typedef struct _AVActionContextRec {
+
+ /** The size of this record. It must be set to <code>sizeof(AVActionContextRec)</code>. */
+ ASSize_t size;
+
+ /** The object that is performing the action, such as a bookmark or annotation. */
+ CosObj co;
+
+ /** The type of the object, using these defines:
+
+ <p><code>#define AVTRIGGERTYPE_DOC ASAtomFromString("Doc") </code></p>
+ <p><code>#define AVTRIGGERTYPE_DEST ASAtomFromString("Dest") </code></p>
+ <p><code>#define AVTRIGGERTYPE_PAGE ASAtomFromString("Page") </code></p>
+ <p><code>#define AVTRIGGERTYPE_LINK ASAtomFromString("Link") </code></p>
+ <p><code>#define AVTRIGGERTYPE_ANNOT ASAtomFromString("Annot") </code></p>
+ <p><code>#define AVTRIGGERTYPE_BOOKMARK ASAtomFromString("Bookmark")</code></p>
+
+ */
+ ASAtom asaType;
+
+ /** The trigger name for the object, using these defines:
+
+ <p><code>#define AVTRIGGER_MOUSEUP ASAtomFromString("Mouse Up") </code></p>
+ <p><code>#define AVTRIGGER_OPEN ASAtomFromString("Open")</code> </p>
+ <p><code>#define AVTRIGGER_CLOSE ASAtomFromString("Close") </code></p>
+
+ */
+ ASAtom asaKey;
+} AVActionContextRec, *AVActionContext;
+
+#define AVTRIGGERTYPE_DOC ASAtomFromString("Doc")
+#define AVTRIGGERTYPE_DEST ASAtomFromString("Dest")
+#define AVTRIGGERTYPE_PAGE ASAtomFromString("Page")
+#define AVTRIGGERTYPE_LINK ASAtomFromString("Link")
+#define AVTRIGGERTYPE_ANNOT ASAtomFromString("Annot")
+#define AVTRIGGERTYPE_BOOKMARK ASAtomFromString("Bookmark")
+#define AVTRIGGER_MOUSEUP ASAtomFromString("Mouse Up")
+#define AVTRIGGER_OPEN ASAtomFromString("Open")
+#define AVTRIGGER_CLOSE ASAtomFromString("Close")
+#define AVTRIGGER_SHOW ASAtomFromString("Show")
+#define AVTRIGGER_HIDE ASAtomFromString("Hide")
+
+
+/**
+ A callback for AVActionHandlerProcs(). If defined, it is called
+ instead of AVActionPerformProc(). It is passed the context
+ of an action, which provides information on what triggered
+ the action.
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param action An action to perform.
+ @param doc The document in which the action is located.
+ @param context The context of the action.
+ @see AVActionPerformProc
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVActionPerformExProc)(void *actionHandlerObj, PDAction action, AVDoc doc, AVActionContext context);
+
+/**
+ A callback for AVActionHandlerProcs. If defined, it is called
+ instead of DoProperties().
+
+ <p>It is called to allow the user to view or edit the properties
+ for an array of actions. Typically this presents a modal
+ OK/Cancel dialog box to the user. The dialog box should graphically
+ denote properties that do not have the same value for every
+ action in the array by using an <i>indeterminant</i> state. For
+ example, if the action has a flag property that is set to
+ <code>true</code> for one action and <code>false</code> for another, instead of <code>"true"</code>
+ or <code>"false"</code>, the dialog box could show the string <code>"&lt;varies&gt;"</code>
+ for that property. The user will still be able to change
+ the <code>"&lt;varies&gt;"</code> string to either <code>true</code> or <code>false</code>, which would
+ apply the new value to every action in the array. </p>
+ @param actionHandlerObj User-supplied data that was passed
+ when the action handler was registered using AVAppRegisterActionHandler().
+ @param doc The document in which the actions are located.
+ @param actions An array of actions whose properties are
+ set.
+ @param numActions The number of actions in the array.
+ @return <code>true</code> if the actions were changed, <code>false</code> if unchanged.
+ @see AVActionHandlerGetProcs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVActionDoPropertiesExProc)(void *actionHandlerObj, AVDoc doc, PDAction *actions, ASArraySize numActions);
+
+/** A data structure containing callbacks that implement an action handler. The callbacks
+ implement the action handler functions. For example, they can display user interface text,
+ request the action's properties from the user, and perform the action.
+ @see AVAppRegisterActionHandler
+ @see AVActionHandlerGetProcs
+ @see AVDocCopyAction
+*/
+typedef struct _t_AVActionHandlerProcs {
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVActionHandlerProcsRec)</code>. */
+ ASSize_t size;
+
+ /** */
+ AVActionPerformProc Perform;
+
+ /** */
+ AVActionDoPropertiesProc DoProperties;
+
+ /** */
+ AVActionFillActionDictProc FillActionDict;
+
+ /** */
+ AVActionGetInstructionsProc GetInstructions;
+
+ /** */
+ AVActionGetButtonTextProc GetButtonText;
+
+ /** */
+ AVActionGetStringOneTextProc GetStringOneText;
+
+ /** */
+ AVActionGetStringTwoTextProc GetStringTwoText;
+
+ /** */
+ AVActionCopyProc Copy;
+
+ /** */
+ AVActionPerformExProc PerformEx;
+
+ /** */
+ AVActionDoPropertiesExProc DoPropertiesEx;
+
+ /** */
+ AVActionGetDetailsProc GetDetails;
+
+} AVActionHandlerProcsRec;
+
+
+/************************************************************************************\
+|* *|
+|* AVAuxData *|
+|* *|
+\************************************************************************************/
+
+
+/**
+ (Optional) A callback for AVAuxDataHandler. It is called to
+ process auxiliary data sent to the AVDoc using AVDocSendAuxData().
+ This callback must process the data appropriately for whatever
+ <code>auxDataType</code> is sent.
+
+ <p>If <code>NULL</code>, default behavior is used. </p>
+ @param auxDataType IN/OUT Specifies the type of <code>auxData</code>. This
+ determines how <code>auxData</code> is interpreted.
+ @param auxData IN/OUT The auxiliary data.
+ @param auxDataLen IN/OUT The length of <code>auxData</code> in bytes.
+ @param avDoc IN/OUT The document with which the auxiliary data
+ is associated.
+ @return <code>true</code> if the data is acted upon, <code>false</code> if nothing is done.
+ @see AVDocSendAuxData
+*/
+#if (ACRO_SDK_LEVEL >= 0x00090000)
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVAuxDataPerformProc)(ASAtom auxDataType, void *auxData, AVTBufferSize auxDataLen, AVDoc avDoc, void* clientData);
+#endif
+
+/**
+ A data structure containing callbacks and data representing
+ an auxiliary data handler. <code>NULL</code> values are acceptable; in such cases default behavior is used.
+ @see AVDocSendAuxData
+ @see AVHasAuxDataHandler
+ @see AVRegisterAuxDataHandler
+*/
+#if (ACRO_SDK_LEVEL >= 0x00090000)
+typedef struct _t_AVAuxDataHandler {
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVAuxDataHandlerRec)</code>. */
+ ASSize_t size;
+
+ oldAVAuxDataPerformProc oldPerformProc; /* obsolete */
+ /** Called with auxiliary data when a client calls AVDocSendAuxData(). This proc should perform whatever
+ action is required for the auxiliary data.
+ */
+ AVAuxDataPerformProc PerformProc;
+} AVAuxDataHandlerRec, *AVAuxDataHandler;
+#endif
+
+/************************************************************************************\
+|* *|
+|* AVDocPrintParams *|
+|* *|
+\************************************************************************************/
+
+/* AVRect32 only needed for support of 32-bit coordinates before Acrobat 6, preferred method is to use AVRect with ACRO_SDK_LEVEL >= 0x00060000 */
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+typedef AVRect AVRect32;
+
+/**
+ <p>A data structure representing a rectangle (a quadrilateral
+ having only horizontal and vertical sides). </p>
+
+ <p>The AcroView coordinate system is defined so that (0,0)
+ is at the top, <code>x</code> increases to the right, and <code>y</code> increases
+ down (the same as GDI and QuickDraw but opposite to the
+ PostScript language). An AVRect32 is defined so that its
+ top is above its bottom, but this means that <code>0 < top < bottom</code>. </p>
+
+
+ @note This structure supports 32 bit coordinates in versions
+ prior to Acrobat 6.0. For version 6.0 and later, AVRect
+ is preferred.
+*/
+typedef AVRectP AVRect32P;
+
+/* Define a platform specification for a printer */
+
+
+#if UNIX_PLATFORM
+#define kPrinterSpecNameLen 64
+
+typedef struct _t_ASPlatformPrinterSpec {
+ /** The size of the data structure. It must be set to <code>sizeof(ASPlatformPrinterSpecRec)</code>.
+ */
+ ASSize_t size;
+ /** A print command, such as <code>"lp -dMyPrinter -n4"</code>. If <code>printerName</code> is
+ <code>NULL</code>, a default print command is used. The Acrobat viewer's built-in
+ default is <code>"lp"</code> on most UNIX systems, and <code>"lpr"</code> on Sun operating systems. This should
+ print to the system's default printer. Some UNIX systems also use
+ the environment variable <code>LPDEST</code> or <code>PRINTER</code>. See the
+ documentation for your platform to determine whether this is the
+ case.
+ */
+ char printerName[kPrinterSpecNameLen];
+ /* Currently unused. */
+ ASUns8 *baseAddr;
+ /* Currently unused. */
+ AVBufferSize rowBytes;
+ /* Currently unused. */
+ AVBufferSize depth;
+ /* Currently unused. */
+ AVRect bounds;
+} ASPlatformPrinterSpecRec, *ASPlatformPrinterSpec;
+#endif /*UNIX_PLATFORM*/
+#endif
+
+/* Define a platform specification for a printer */
+
+#if MAC_PLATFORM
+#define kPrinterSpecNameLen 256
+typedef struct _t_ASPlatformPrinterSpec {
+ /** The size of the data structure. It must be set to
+ <code>sizeof(ASPlatformPrinterSpecRec)</code>.
+ */
+ ASSize_t size;
+ /** The port to print to. */
+ CGrafPtr *cGrafPtr;
+ /** The best known resolution of the current printer. */
+ short hRes, vRes;
+ /** The name of the printer. */
+ UniChar printerName[kPrinterSpecNameLen];
+} ASPlatformPrinterSpecRec, *ASPlatformPrinterSpec;
+#endif
+
+
+#if WIN_PLATFORM
+#define kPrinterSpecNameLen 64
+
+#define kPrinterSpecUnicodeNameLen 221
+
+
+/**
+ A data structure representing a platform specification for
+ a printer. It is used in AVDocPrintParams.
+ @see AVDocPrintPagesWithParams
+*/
+typedef struct _t_ASPlatformPrinterSpec {
+ /** The size of the data structure. It must be set to <code>sizeof(ASPlatformPrinterSpecRec)</code>. */
+ ASSize_t size;
+
+ /* The following should be provided for full, non-interative printing */
+
+ /** See <code>Windows.h</code> <code>DEVNAMES</code> for a description of these fields.
+ This <code>char</code> name is deprecated; please use the Unicode version <code>driverNameW</code>.
+ */
+ char driverName[kPrinterSpecNameLen];
+
+ /** The name of the printer. For example, it can be <code>"HPPCL"</code>, <code>"HP LaserJet 4"</code>, or <code>"LPT1"</code>.
+ This <code>char</code> name is deprecated; please use the Unicode version <code>printerNameW</code>.
+ */
+ char printerName[kPrinterSpecNameLen];
+
+ /** The port to print to.
+ This <code>char</code> name is deprecated; please use the Unicode version <code>portNameW</code>.
+ */
+ char portName[kPrinterSpecNameLen];
+
+ /* The following must be provided for embedded printing */
+
+ /** This must be <code>true</code> of Windows 32-bit platforms; optional for Windows 16-bit platforms. */
+ ASBool createMetaFile;
+
+ /** The path name for the metafile. It is only required if <code>createMetaFile</code> is <code>true</code>.
+ This <code>char</code> name is deprecated; please use the Unicode version <code>metaFileNameW</code>.
+ */
+ char metaFileName[260];
+
+ /** An <code>HDC</code> for embedded printing on Windows 16-bit platforms, unused on Windows 32-bit platforms. */
+ ASInt32 win16Hdc;
+
+ /** The horizontal resolution of printer. For example, a value of <code>300</code> means 300 dpi. */
+ ASInt32 hRes;
+
+ /** The vertical resolution of printer. For example, a value of <code>300</code> means 300 dpi. */
+ ASInt32 vRes;
+
+ /** The color depth of the device; its value is typically <code>1</code>, <code>8</code>, or <code>24</code>. This determines the depth of images created for the
+ printer. You may specify <code>24</code> when printing to a monochrome printer. The driver is expected to convert to the printer
+ depth. It is not used if <code>isPostScript</code> is <code>true</code>.
+ */
+ ASInt32 colorDepth;
+
+
+ /** Set to <code>true</code> if printing to a PostScript printer. */
+ ASBool isPostScript;
+
+ /** Unicode names of the driver. When both <code>driverName</code> and <code>driverNameW</code> are valid, the Unicode name is used. */
+ ASUns16 driverNameW[kPrinterSpecUnicodeNameLen];
+
+ /** Unicode names of the printer. When both <code>printerName</code> and <code>printerNameW</code> are valid, the Unicode name is used. */
+ ASUns16 printerNameW[kPrinterSpecUnicodeNameLen];
+
+ /** Unicode names of the port. When both <code>portName</code> and <code>portNameW</code> are valid, the Unicode name is used. */
+ ASUns16 portNameW[kPrinterSpecUnicodeNameLen];
+
+ /** Unicode path name for the metafile. When both <code>metaFileName</code> and <code>metaFileNameW</code> are valid, the Unicode name is used. */
+ ASUns16 metaFileNameW[260];
+
+} ASPlatformPrinterSpecRec, *ASPlatformPrinterSpec;
+#endif
+
+#if OS2_PLATFORM
+#define kPrinterSpecNameLen 64 /* room for 64 chars */
+typedef struct _t_ASPlatformPrinterSpec {
+ ASSize_t size; /* set this to be the size of this struct */
+
+ /* The following should be provided for full, non-interative printing */
+ char driverName[kPrinterSpecNameLen]; /* See Windows.h DEVNAMES for a description of these fields */
+ char printerName[kPrinterSpecNameLen]; /* For example, {"HPPCL", "HP LaserJet 4", "LPT1:"}, or, */
+ char portName[kPrinterSpecNameLen]; /* {"HP LaserJet 4/4M PS", "\\PCCAROUSEL\4PLUS", "\\PCCAROUSEL\4PLUS"} */
+
+ /* The following must be provided for embedded printing */
+ ASBool createMetaFile; /* Must be <code>true</code> if Win32; may be optional for Win16 (pending testing). */
+ char metaFileName[260]; /* Pathname for the metafile. Only required if createMetaFile is <code>true</code>. */
+ ASInt32 win16Hdc; /* for possible use in Win16 */
+ ASInt32 hRes; /* horizontal resolution of printer, e.g. 300 dpi */
+ ASInt32 vRes; /* vertical resolution of printer, e.g. 300 dpi */
+ ASInt32 colorDepth; /* Color depth of device; typically 1, 8 or 24.
+ ** This determines the depth of images created for the
+ ** printer. You may specify 24 when printing to
+ ** a monochrome printer. The driver is expected to
+ ** convert to the printer depth.
+ ** Not used if isPostScript.
+ */
+ ASBool isPostScript; /* Set to <code>true</code> if printing to PS printer. */
+ ASInt32 psHeight; /* Printer Presentation space height */
+} ASPlatformPrinterSpecRec, *ASPlatformPrinterSpec;
+#endif
+
+
+enum {
+
+ /** A PS file.
+ @ingroup emitFileOption
+ */
+ kAVEmitFilePS,
+
+ /** An EPS file with no preview.
+ @ingroup emitFileOption
+ */
+ kAVEmitFileEPSNoPrev,
+
+ /** An EPS file with standard preview.
+ @ingroup emitFileOption
+ */
+ kAVEmitFileEPSMacStdPrev,
+
+ /** An EPS file with extended preview.
+ @ingroup emitFileOption
+ */
+ kAVEmitFileEPSMacExtPrev
+};
+
+
+/**
+ The following enumeration is deprecated. It is maintained
+ solely for backward compatibility.
+*/
+enum {
+
+ /** Embed no fonts.
+ @ingroup emitFontOption
+ */
+ kAVEmitFontNoFonts,
+
+ /** Embed all Type 1 embedded fonts.
+ @ingroup emitFontOption
+ */
+ kAVEmitFontAllEmbType1,
+
+ /**
+ Constants that specify tile marking styles for AVDocPrintTileData(),
+ used in AVDocPrintParams.
+ @see AVDocPrintPagesWithParams
+ @ingroup emitFontOption
+ */
+ kAVEmitFontAllType1
+};
+
+/** Constants that specify tile marking styles for AVDocPrintTileData(),
+ used in AVDocPrintParams.
+ @see AVDocPrintPagesWithParams
+*/
+enum {
+ /** */
+ kAVTileMarkNone =0,
+ /** */
+ kAVTileMarkWestern,
+ /** Obsolete: Acrobat 7.0 and later support only one 'kAVTileMarkWestern' tile mark. */
+ kAVTileMarkEastern
+};
+typedef ASEnum16 AVTileMark;
+
+/** The new EmitFont enumeration covers
+ all font types, not just Type 1.
+*/
+enum {
+ /** Emit all embedded fonts. */
+ kAVEmitFontEmbeddedFonts = 1,
+ /** Emit all fonts. */
+ kAVEmitFontAllFonts
+};
+
+
+/** Constants that specify page size types for AVDocPrintParams,
+ introduced in Acrobat 6.0. If the <code>pageSize</code> field is not
+ set, the old field <code>shrinkToFit</code> is used instead.
+ @see AVDocPrintPagesWithParams
+*/
+enum {
+
+ /** Uninitialized. */
+ kAVPageSizeUninitialized =0,
+
+ /** Perform no adjusting for size; pages are cropped by the printer. */
+ kAVPageSizeNone,
+
+ /** Fit to paper. */
+ kAVPageSizeFitToPaper,
+
+ /** Shrink large pages. */
+ kAVPageSizeShrinkLargePages,
+
+ /** Tile large pages. */
+ kAVPageSizeTileLargePages,
+
+ /** Tile all pages. */
+ kAVPageSizeTileAllPages,
+
+ /** N-up printing mode. */
+ kAVPageSizeNup,
+
+ /** Booklet printing mode. */
+ kAVPageSizeBooklet
+};
+typedef ASEnum16 AVPageSize;
+
+
+/** Constants that specify color forcing values for <code>AVDocPrintOverrideData</code>,
+ used in AVDocPrintParams.
+
+ <p>Use <code>AVForceColor</code> when a print driver incorrectly handles
+ conversion of color to grayscale or monochrome. This overrides
+ the Windows printerspec <code>colorDepth</code> value. As of 1/1/02,
+ only WinFax is known to need this setting since it incorrectly
+ converts all colors to black. </p>
+ @see AVDocPrintPagesWithParams
+*/
+enum {
+
+ /** Do not force color conversions. */
+ kAVForceColorNone =0,
+
+ /** Force color to grayscale. */
+ kAVForceColorToGrayscale,
+
+ /** Force color to monochrome. */
+ kAVForceColorToMonochrome
+};
+typedef ASEnum16 AVColorForcing;
+
+/**
+ Constants that determine whether to let Acrobat decide whether
+ to use a feature or force Acrobat to use or
+ not to use the feature. It is used in AVDocPrintOverrideData(),
+ which is used in AVDocPrintParams.
+ @see AVDocPrintPagesWithParams
+*/
+enum {
+ /** Let Acrobat decide whether to use a feature. */
+ kAVuseAuto =0,
+ /** Force Acrobat to use a feature, even if Acrobat determines that it will not work. */
+ kAVuse,
+ /** Do not use a feature, even if Acrobat determines that it will work.*/
+ kAVnoUse
+};
+typedef ASEnum16 AVUseValue;
+
+/** Font and resource policy values for AVDocPrintParams. */
+enum {
+
+ /** Send fonts and resources to the first page on which they are used.
+ Pages must be printed in the order in which they are created. Fonts are
+ downloaded in the global VM. Fonts and resources are removed
+ when they are no longer needed.
+ */
+ kAVResPolicySendAtStart,
+
+ /** Send fonts and resources to each page on which they are used. Fonts
+ are downloaded in the local VM.
+ */
+ kAVResPolicySendByRange,
+
+ /** Send fonts and resources to each page on which they are used.
+ Fonts are downloaded in the local VM.
+ */
+ kAVResPolicySendPerPage
+};
+typedef ASEnum16 AVResourcePolicy;
+
+/** N-up printing page order for AVDocPrintNupData (used by AVDocPrintParams). */
+enum {
+ /** Pages are placed from left to right, and then from top to bottom. */
+ kAVnUpPageOrderHorizontal,
+ /** Pages are placed from right to left, and then from top to bottom. */
+ kAVnUpPageOrderHorizontalRev,
+ /** Pages are placed from top to bottom, and then from left to right. */
+ kAVnUpPageOrderVertical,
+ /** Pages are placed from top to bottom, and then from right to left. */
+ kAVnUpPageOrderVerticalRev
+};
+typedef ASEnum16 AVnUpPageOrder;
+
+/** Booklet printing binding direction (used by AVDocPrintNupData() in the AVDocPrintParams structure). */
+enum {
+ /** Typical left-side binding for text with left-to-right reading direction.
+ The paper is divided vertically in landscape mode.
+ */
+ kAVBookletBinding_Left,
+ /** Right-side binding for text with vertical or right-to-left reading direction.
+ The paper is divided vertically in landscape mode.
+ */
+ kAVBookletBinding_Right,
+ /** Left-side binding for text with left-to-right reading direction.
+ The paper is divided vertically in portrait mode.
+ */
+ kAVBookletBinding_LeftTall,
+ /** Right-side binding for text with vertical or right-to-left reading direction.
+ The paper is divided vertically in portrait mode.
+ */
+ kAVBookletBinding_RightTall
+};
+typedef ASEnum16 AVBookletBinding;
+
+/** Booklet printing page duplex printing subset mode. */
+enum {
+ /** Print pages on both sides. */
+ kAVBooklet_BothSides,
+ /** Print pages on front sides only. */
+ kAVBooklet_FrontSideOnly,
+ /** Print pages on back sides only. */
+ kAVBooklet_BackSideOnly
+};
+typedef ASEnum16 AVBookletDuplexMode;
+
+/** Emit the halftones specified in the document.
+ @ingroup EmitFlags
+*/
+#define kAVEmitHalftones 0x00000001
+
+/** Raise an error on images that
+ cannot be represented in EPS files, following the separation
+ conventions in <i>Technical Note # 5044, Color Separation Conventions
+ for PostScript Language Programs</i>.
+ @ingroup EmitFlags
+*/
+#define kAVEmitSeparableImagesOnly 0x00000002
+
+/** Do not emit the cropbox page clip.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressCropClip 0x00000004
+
+/** Do not emit the transfer functions in the document.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressTransfer 0x00000008
+
+/** Do not emit the BlackGeneration in the document.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressBG 0x00000010
+
+/** Do not emit the UnderColorRemovals in the document.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressUCR 0x00000020
+
+/** If the field is set, calls to AVDocPrintPagesWithParams() generate PostScript that suppresses printer-based font substitution
+ for CJK fonts.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressCJKFontSubst 0x00000040
+
+/** (New for 5.0) Do not rotate the page.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressRotate 0x00000080
+
+/** (New for 5.0) Do not center the page.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressCenter 0x00000100
+
+/** (New for 5.0) Do not emit text annotations.
+ @ingroup EmitFlags
+*/
+#define kAVSuppressAnnots 0x00000200
+
+/** (New for 5.0) Enable setPageSize(), choose the paper tray by PDF page size.
+ @ingroup EmitFlags
+*/
+#define kAVSetPageSize 0x00000400
+
+/** (New for 5.0) Attempt to reduce the amount of VM used on PostScript printers.
+ @ingroup EmitFlags
+*/
+#define kAVSaveVM 0x00000800
+
+/** (New for 5.0) (PostScript only) If set, PostScript is optimized for speed, otherwise pages must be independent.
+ @ingroup EmitFlags
+*/
+#define kAVOptimizeForSpeed 0x00001000
+
+/** (New for 5.0) When printing via the Windows Dynamic Data Exchange (DDE), alerts are not generated; <code>false</code> is returned.
+ @ingroup EmitFlags
+*/
+#define kAVSilent 0x00002000
+
+/** (New for 5.0) Emits a clip to the BoundingBox for EPS.
+ @ingroup EmitFlags
+*/
+#define kAVEmitBBoxClip 0x00004000
+/* #define kAVEmitTransferFuncs 0x00008000 - obsolete, use kAVSuppressTransfer */
+
+/* #define kAVPrintICCColorsAsDevice 0x00010000 - obsolete */
+
+/** (New for 5.0) When set, the print path behaves as if the user had clicked the Apply Overprint Preview
+ checkbox in the Advanced print dialog box.
+ @ingroup EmitFlags
+*/
+#define kAVApplyOverPrint 0x00020000
+
+/** (New for 5.0) When set, the print path behaves as if the user had clicked the Apply Working
+ Color Spaces checkbox in the Advanced print dialog box.
+ @ingroup EmitFlags
+*/
+#define kAVApplyWorkingColorSpaces 0x00040000
+
+/** (PostScript only) Include the PostScript XObjects' content in the output.
+ @ingroup EmitFlags
+*/
+#define kAVEmitPostScriptXObjects 0x00080000
+
+/** Emit only form fields; this takes precedence over kAVSuppressAnnots.
+ @ingroup EmitFlags
+*/
+#define kAVEmitFormFieldsOnly 0x00100000
+
+/** Use the <code>softProofing</code> settings before doing color management.
+ @ingroup EmitFlags
+*/
+#define kAVApplySoftProofSettings 0x00200000
+
+/** When emitting forms, use the <code>execform</code> operator.
+ @ingroup EmitFlags
+*/
+#define kAVEmitFormsAsPSForms 0x00400000
+
+/** When emitting JPEG2000 images, use the maximum available resolution.
+ @ingroup EmitFlags
+*/
+#define kAVMaxJP2KRes 0x00800000
+
+/** Emit TrapNet annots, even if suppress annotations is on.
+ @ingroup EmitFlags
+*/
+#define kAVTrapAnnots 0x01000000
+
+/** Emit the printer's mark annotations, even if suppress annotations is on. The default is off.
+ @ingroup EmitFlags
+*/
+#define kAVPrintersMarks 0x02000000
+
+/** Provide control over the emission of the <code>setflat</code> operator.
+ @ingroup EmitFlags
+*/
+#define kAVEmitFlatness 0x04000000
+
+/** Emit CJK TrueType fonts as CID Type 2 fonts.
+ @ingroup EmitFlags
+*/
+#define kAVEmitCJKTTAsType2 0x08000000
+
+/** Soft proofing: simulate ink black and paper white when doing soft proofing.
+ @ingroup EmitFlags
+*/
+#define kAVSimulateInkBlack 0x10000000
+/**
+ @ingroup EmitFlags
+*/
+#define kAVSimulatePaperWhite 0x20000000
+
+/** Emit document and stamp annotations only.
+ @ingroup EmitFlags
+*/
+#define kAVEmitStampsOnly 0x40000000
+
+
+
+
+enum { /* marksStyleType */
+ /** No flags implies InDesign style printer marks.
+ @ingroup EmitFlags
+ */
+ kAVDefaultMarkType = 0, /* Acrobat defaults to InDesign style marks */
+ /** @ingroup EmitFlags */
+ kAVInDesignJ1MarkType, /* InDesignJ1 */
+ /** @ingroup EmitFlags */
+ kAVInDesignJ2MarkType, /* InDesignJ2 */
+ /** @ingroup EmitFlags */
+ kAVIllustratorMarkType, /* Illustrator */
+ /** @ingroup EmitFlags */
+ kAVIllustratorJ, /* IllustratorJ */
+ /** @ingroup EmitFlags */
+ kAVQuarkXPress, /* QuarkXPress */
+ /** @ingroup EmitFlags */
+ kLastMarkType /* placeholder for custom marks file */
+};
+
+/* flags to fill in marksFlags field */
+/** Emit crop marks.
+ @ingroup EmitFlags
+*/
+#define kAVCropMarks 0x00000001
+/** Emit trim marks.
+ @ingroup EmitFlags
+*/
+#define kAVTrimMarks 0x00000002
+/** Emit bleed marks.
+ @ingroup EmitFlags
+*/
+#define kAVBleedMarks 0x00000004
+/** Emit registration marks.
+ @ingroup EmitFlags
+*/
+#define kAVRegMarks 0x00000008
+/** Emit color bar marks.
+ @ingroup EmitFlags
+*/
+#define kAVColorBarMarks 0x00000010
+/** Emit page information marks.
+ @ingroup EmitFlags
+*/
+#define kAVPageInfoMarks 0x00000020
+
+/** Emit Eastern style marks (the default is Western style).
+ @note Deprecated in Acrobat 7, replaced by the <code>marksStyle</code> field
+ @ingroup EmitFlags
+*/
+#define kAVEasternStyleMarks 0x00000040
+/**
+ For AVDocPrintParams - used in the call AVDocPrintPagesWithParams().
+ @ingroup EmitFlags
+*/
+typedef struct _t_AVDocPrintTileData {
+ /** Set this to be the size of this <code>struct</code>. */
+ ASSize_t size;
+ /** The distance that tiles overlap in points. */
+ ASUns32 overlap;
+ /** A value of <code>1.0</code> indicates normal scale. */
+ ASFixed scale;
+ /** */
+ ASBool label;
+ /** Uses the AVTileMark enum. */
+ AVTileMark markType;
+} AVDocPrintTileDataRec, *AVDocPrintTileData;
+
+/** N-up and booklet printing options for AVDocPrintParams. It is used in the call to AVDocPrintPagesWithParams().
+ @ingroup EmitFlags
+*/
+typedef struct _t_AVDocPrintNupData {
+ /** Set this to be the size of this <code>struct</code>. */
+ ASSize_t size;
+ /** The number of pages on the horizontal direction of the page.
+ The total number of pages per sheet is <code>(numPagesPerSheetH * numPagesPerSheetV)</code>.
+ It is ignored if the page scaling mode, <code>pageSize</code>, is kAVPageSizeBooklet.
+ */
+ ASInt32 numPagesPerSheetH;
+ /** The number of pages on the vertical direction of the page.
+ The total number of pages per sheet is <code>(numPagesPerSheetH * numPagesPerSheetV)</code>.
+ It is ignored if the page scaling mode, <code>pageSize</code>, is kAVPageSizeBooklet.
+ */
+ ASInt32 numPagesPerSheetV;
+ /** N-up page order.
+ It is ignored if the page scaling mode, <code>pageSize</code>, is kAVPageSizeBooklet.
+ */
+ AVnUpPageOrder pageOrder;
+ /** Print page borders during N-up printing. */
+ ASBool pageBorder;
+ /** Automatically rotate each page to match the page orientation to the available paper area. */
+ ASBool autoRotate;
+
+ /** Booklet page binding direction.
+ It is ignored if the page scaling mode, <code>pageSize</code>, is not kAVPageSizeBooklet.
+ */
+ AVBookletBinding bookletBinding;
+ /** Booklet duplex printing mode.
+ It is ignored if the page scaling mode, <code>pageSize</code>, is not kAVPageSizeBooklet.
+ */
+ AVBookletDuplexMode bookletDuplexMode;
+ /** Booklet subset printing range: the first sheet (a valid sheet number starts from <code>0</code>).
+ If this value is <code>-1</code>, it represents the last sheet number.
+ The default value is <code>0</code>.
+ It is ignored if the page scaling mode, <code>pageSize</code>, is not kAVPageSizeBooklet.
+ */
+ ASInt32 bookletSubsetFrom;
+ /** Booklet subset printing range: the last sheet (a valid sheet number starts from <code>0</code>).
+ If this value is <code>-1</code>, it represents the last sheet number.
+ The default value is <code>-1</code>.
+ It is ignored if the page scaling mode, <code>pageSize</code>, is not kAVPageSizeBooklet.
+ */
+ ASInt32 bookletSubsetTo;
+} AVDocPrintNupDataRec, *AVDocPrintNupData;
+
+/**
+ Constants that specify rasterization methods to use for
+ printing. These are used in AVDocPrintRasterizeData(), which is used
+ in AVDocPrintParams.
+ @see AVDocPrintPagesWithParams
+ @ingroup EmitFlags
+*/
+enum {
+ /** No flags
+ @ingroup EmitFlags
+ */
+ kAVRasterizeNoFlags = 0,
+ /**
+ @ingroup EmitFlags
+ */
+ kAVRasterizeAllTextToOutlines = 1 << 0,
+ /**
+ @ingroup EmitFlags
+ */
+ kAVRasterizeAllStrokesToOutlines = 1 << 1,
+ /**
+ @ingroup EmitFlags
+ */
+ kAVRasterizeAllowComplexClipRegions = 1 << 2,
+ /**
+ @ingroup EmitFlags
+ */
+ kAVRasterizePreserveOverprint = 1 << 3
+};
+typedef ASUns32 AVRasterizeFlags;
+
+/** @ingroup EmitFlags */
+#define kPrintMinDPI 1
+/** @ingroup EmitFlags */
+#define kPrintMaxDPI 9600
+/** @ingroup EmitFlags */
+#define kPrintDefaultDPI 1200
+/** @ingroup EmitFlags */
+#define kPrintMinGradDPI 1
+/** @ingroup EmitFlags */
+#define kPrintMaxGradDPI 9600
+/** @ingroup EmitFlags */
+#define kPrintDefaultGradDPI 300
+
+
+/**
+ A structure specifying rasterization parameters used by AVDocPrintParams.
+ The constant DPI values are defined in AVExpT.h.
+ @see AVDocPrintPagesWithParams
+ @ingroup EmitFlags
+*/
+typedef struct _t_AVDocPrintRasterizeData {
+ /** The size of the data structure. It must be set to
+ <code>sizeof(AVDocPrintRasterizeData)</code>.
+ */
+ ASSize_t size;
+ /** An <code>OR</code> of the bit flags that control the rasterization
+ method to use for printing.
+ */
+ AVRasterizeFlags flags;
+ /** The degree of transparency in the range
+ <code>1</code> to <code>100</code>, where <code>1</code> means all raster, and <code>100</code> means preserve
+ as much transparency data as possible.
+ */
+ ASInt32 transparency;
+ /** The DPI for bitmaps. The default is <code>300</code>.
+ This value is also used when <code>printAsImage</code> is <code>true</code>.
+ */
+ ASUns32 bitmapResolution;
+ /** The DPI for the gradient's interior to
+ the object (not the edges). It can generally be lower than the
+ <code>bitmapResolution</code>. The default is <code>150</code>.
+ */
+ ASUns32 gradientResolution;
+ /** The default is <code>300</code>. */
+ ASUns32 printAsImageResolution;
+} AVDocPrintRasterizeDataRec, *AVDocPrintRasterizeData;
+
+/**
+ A structure specifying override parameters used by AVDocPrintParams.
+ @see AVDocPrintPagesWithParams
+ @ingroup EmitFlags
+*/
+typedef struct _t_AVDocPrintOverrideData {
+ /** The size of the data structure. It must be set to <code>sizeof(AVDocPrintOverrideDataRec)</code>. */
+ ASSize_t size;
+ /** Determines whether to use color forcing. The default
+ is AVColorForceNone. It can be used to send 1-bit or 8-bit
+ data to the printer, instead of 24-bit data. It is ignored on Mac OS.
+ */
+ AVColorForcing colorOverride;
+ /** Determines whether to allow the viewer to decide
+ if it should use the printer's PostScript Color Rendering
+ Dictionary. The default is kAVuseAuto, which is normally <code>true</code>.
+ It is <code>false</code> when the printer is listed as broken, which occurs in
+ these cases:
+
+ <ul>
+ <li>
+ When printer-based color management is used,
+ printers whose CRD is incorrect produce light gray or peach
+ for white expressed in an ICC color space.
+ </li>
+ <li>
+ The CRDs for Xerox Phaser 740 and Xerox DocuPrint N2125
+ are known to be incorrect, and this may be so for others,
+ especially in these printer families. It is possible to
+ change the printer defaults such as listing additional printers,
+ or to remove a printer from the broken list
+ if the driver is fixed. Contact Adobe technical support
+ for details.
+ </li>
+ </ul>
+ */
+ AVUseValue usePrinterCRD;
+ /** Determines whether to allow the viewer to
+ decide if it should use T1 color conversion (that is, convert
+ Type1 fonts to more efficient font representations) for
+ better performance. It is ignored on Mac OS. The default is kAVuseAuto,
+ which is normally <code>true</code>, except in cases where the printer
+ cannot handle optimized fonts and needs full, slow, Type1
+ fonts. Only the Windows 16-bit HP LJ 4siMX
+ driver is known to be in this category. It is possible to
+ change the printer defaults such as listing additional printers,
+ or to remove a printer from the broken list
+ if the driver if fixed. Contact Adobe technical support
+ for details.
+ */
+ AVUseValue useT1Conversion;
+} AVDocPrintOverrideDataRec, *AVDocPrintOverrideData;
+
+/**
+ A structure that specifies how to print a document. It specifies rasterization parameters
+ used by AVDocPrintParams. The constant DPI values are defined in AVExpT.h.
+
+ @see AVDocPrintPagesWithParams
+ @see AVDocPrintPagesWithParams
+ @ingroup EmitFlags
+*/
+typedef struct _t_AVDocPrintParams *AVDocPrintParams;
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/* The AVPrintDuplexType enumeration was added for Acrobat 8. */
+enum {
+/** @ingroup AVPrintDuplexType */
+kAVPrintDuplexDontCare = 0,
+/** @ingroup AVPrintDuplexType */
+kAVPrintDuplexSimplex = 1,
+/** @ingroup AVPrintDuplexType */
+kAVPrintDuplexFlipLongEdge = 2,
+/** @ingroup AVPrintDuplexType */
+kAVPrintDuplexFlipShortEdge = 3
+};
+typedef ASEnum8 AVPrintDuplexType;
+
+
+#define kPrintUserNoteLen 256
+/**
+ A structure that specifies how to print a document.
+ @see AVDocPrintPagesWithParams
+ @ingroup EmitFlags
+*/
+typedef struct _t_AVDocPrintParams {
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVDocPrintParamsRec)</code>. */
+ ASSize_t size;
+
+ /** Displays a Print dialog box and print status window while
+ printing. It is mutually exclusive with <code>embedded</code>, <code>emitToPrinter</code>, and <code>emitToFile</code>. */
+ ASBool interactive;
+
+ /** If <code>interactive</code> is <code>false</code> and <code>cancelDialog</code> is <code>true</code>, a Cancel dialog box appears.*/
+ ASBool cancelDialog;
+
+ /** The first page to be printed; a zero-based value. It is used if <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>. If <code>-1</code>, all pages are printed. */
+ ASInt32 firstPage;
+
+ /** The last page to be printed. It is used if <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>. If <code>firstPage</code> is <code>-1</code>, this page is ignored. */
+ ASInt32 lastPage;
+
+ /** Used if <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>.
+ If printing to PostScript, <code>2</code> means level 2, <code>3</code> means level 3.
+ @note With Acrobat 7, level 1 is no longer supported. Attempts to print with <code>psLevel</code> equal to <code>1</code> will
+ generate a bad parameter exception. No output will be generated.
+ */
+ ASInt32 psLevel;
+
+ /** Used if <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>. It is set to <code>true</code> if a binary channel to the printer is supported. */
+ ASBool binaryOK;
+
+ /** Deprecated. Use <code>pageSize</code> instead.
+ <p>Used if <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>.
+ If <code>pageSize</code> is uninitialized and this is <code>true</code>,
+ the page is shrunk or expanded to fit the printer page size.</p> */
+ ASBool shrinkToFit;
+
+ /** The file system name; see <code>filePathName</code>.
+ It is used if <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>.
+ For the operation of printing to a printer (<code>emitToPrinter = true</code>),
+ if <code>filePathName</code> is specified, <code>fileSysName</code> must be the name of the
+ default file system. You can get the file system's name from the ASFileSysGetFileSysNameProc() callback
+ in the ASFileSysRec of the file system you are using.
+ */
+ ASAtom fileSysName;
+
+ /** Used if <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>.
+ If non-<code>NULL</code>, <code>filePathName</code> is a platform path for the
+ specified <code>fileSysName</code>, or, if <code>fileSysName</code> is
+ ASAtomNull, it is one of the following:
+
+ <p>Possible types:</p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating System</TH><TH>Type</TH></TR>
+ <TR><TD>Windows</TD><TD>A C-string path name.</TD></TR>
+ <TR><TD>Mac OS</TD><TD>An FSSpecPtr.</TD></TR>
+ <TR><TD>UNIX</TD><TD>A C-string path name.</TD></TR>
+ </TABLE>
+
+ <p>If <code>emitToPrinter</code> is <code>true</code> and <code>filePathName</code> is non-<code>NULL</code>,
+ the system printer driver is used to emit the output stream to the file.
+ This is implemented for Windows only.</p>
+ */
+ ASPathName filePathName;
+
+ /** Optionally used if <code>interactive</code>, <code>embedded</code>, or <code>emitToPrinter</code> is <code>true</code>.
+ If it is <code>NULL</code>, a default system printer is used.
+ If it is non-<code>NULL</code>, <code>printerSpec</code> is a platform-specific value.
+ It must be an ASPlatformPrinterSpec.
+ */
+ ASPlatformPrinterSpec printerSpec;
+
+ /** <code>true</code> if it is an embedded view of a page to print, <code>false</code>
+ otherwise. It is mutually exclusive with <code>interactive</code>, <code>emitToPrinter</code>, and <code>emitToFile</code>.
+ <code>firstPage</code> only is used. The last page is ignored.
+ The printer must be specified as a metafile or a <code>CGrafPtr</code>.
+ */
+ ASBool embedded;
+
+ /** The size of the embedded output in device units. */
+ AVRect embeddedRect;
+
+ /** If <code>true</code>, use the system printer driver for output.
+ If <code>filePathName</code> is specified, it uses the driver to create
+ the file. It raises genErrBadParm if an invalid parameter is provided
+ (for example, printing to PDFWriter, Distiller, or to a printer that has been un-installed).
+ It is mutually exclusive with <code>interactive</code>, <code>embedded</code> and <code>emitToFile</code>.
+ */
+ ASBool emitToPrinter;
+
+ /* Parameters for emission of PS Level 1 Color Separations and EPS, or vanilla PS.
+ ** Creates and writes to filePathName (may not be <code>NULL</code>).
+ ** Does NOT use system printer driver.
+ ** Only has partial font emitting capabilities on some platforms:
+ ** Mac: embedded and system Type 1 fonts only; no TrueType or substitution fonts.
+ ** Win: embedded and system Type 1 fonts only; no TrueType or substitution fonts.
+ ** UNIX: all fonts
+ */
+
+ /** If <code>true</code>, emit non-interactive output to a file. It is used to emit color separations or EPS. This flag cannot be used
+ with the Adobe Reader. It is mutually exclusive with <code>interactive</code>, <code>embedded</code> and <code>emitToPrinter</code>.
+ @product_exclude RDR
+ */
+ ASBool emitToFile;
+
+ /** Perform level 1 color separations. See <i>Color Separation Conventions for PostScript Language Programs, Technical Note #5044</i>. */
+ ASBool doColorSeparations;
+
+ /** File output options: PostScript or EPS, with or without a preview.
+
+ <p>Possible values:</p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kAVEmitFilePS</TD><TD>PostScript file.</TD></TR>
+ <TR><TD>kAVEmitFileEPSNoPrev</TD><TD>EPS file with no preview.</TD></TR>
+ <TR><TD>kAVEmitFileEPSMacStdPrev</TD><TD>EPS file with standard preview.</TD></TR>
+ <TR><TD>kAVEmitFileEPSMacExtPrev</TD><TD>EPS file with extended preview.</TD></TR>
+ </TABLE>
+ */
+ ASEnum8 emitFileOption;
+
+ /** Font output options. It must be one of EmitFontOptions.
+ @ref EmitFontOptions
+ */
+ ASEnum8 emitFontOption;
+
+ /* More emit options. */
+
+ /** Additional emit options, such as kAVEmitHalftones. It must be one of the Emit Flags.
+ @ref EmitFlags
+ */
+ ASUns32 emitFlags;
+
+ /** Must be a PDPageRange. It takes precedence over the <code>firstPage</code> and <code>lastPage</code> members. */
+ PDPageRange *ranges;
+
+ /** The range of pages to print. */
+ AVTSmallArraySize numRanges;
+ /* control over TrueType --> Type 1 conversion for PostScript printing */
+
+ /** If <code>true</code>, send TrueType fonts as TrueType fonts (level 3 and most level 2 PostScript printers).
+ If <code>false</code>, convert TrueType to Type 1.
+ This is typically only desirable for Level 1 PostScript where no TrueType handling is present.
+ */
+ ASBool TTasT42;
+
+ /** If <code>true</code>, print pages as an image. */
+ ASBool printAsImage;
+
+ /** If <code>true</code>, do not download Far East fonts to the printer. */
+ ASBool printerHasFarEastFonts;
+
+ /** Print from <code>lastPage</code> to <code>firstPage</code>. */
+ ASBool reverse;
+
+ /** Indicates odd, even, or all pages to be printed within the range.
+ It is only meaningful when the <code>firstPage</code> and <code>lastPage</code> parameters are used.
+ It can be either PDAllPages, PDEvenPagesOnly, or PDOddPagesOnly.*/
+ ASInt32 pageSpec;
+
+ /** Deprecated. Set to <code>0</code> and use <code>rasterData</code> instead.
+ The transparency level reflects the pull-down on the Advanced print dialog box for
+ controlling how much rasterization should be performed when flattening transparent objects
+ during printing.
+
+ <p>Possible values:</p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>1</code></TD><TD>The entire page will be rasterized. Use this setting for printing or exporting complex pages with many
+ transparent objects. It is ideal for fast output at low resolution; higher resolution will yield higher quality but
+ increase processing time. The size of saved files or print spool files may be large.</TD></TR>
+ <TR><TD><code>2</code></TD><TD>It maintains simpler vector objects, but rasterizes more complex areas involving transparency. It is ideal for
+ artwork with only a few transparent objects. Some printers may yield rough transitions between bordering
+ vector and raster objects and make hairlines appear thicker. It is appropriate for low memory systems.</TD></TR>
+ <TR><TD><code>3</code></TD><TD>It maintains most objects as vector data, but rasterizes very complex transparent regions. It is generally the best
+ setting for printing and exporting most pages. With some printers, it improves transition issues between
+ bordering vector and raster objects.</TD></TR>
+ <TR><TD><code>4</code></TD><TD>It maintains most of the page content as vectors, rasterizing only extremely complex areas. It produces
+ high quality output that is generally resolution-independent. Higher occurrences of transparent regions
+ will increase processing time. With some printers, it improves transition issues between bordering vector
+ and raster objects.</TD></TR>
+ <TR><TD><code>5</code></TD><TD>The entire page is printed or exported as vector data, to the greatest extent possible. This produces the
+ highest quality resolution-independent output. Processing of complex pages may be very time- and
+ memory-intensive.</TD></TR>
+ </TABLE>
+ */
+ ASInt32 transparencyLevel;
+
+ /** Represents the name of the destination profile to use when doing host-based color management.
+ */
+ char destProfile[256];
+
+ /** */
+ AVPageSize pageSize;
+
+ /** If <code>NULL</code>, it uses default values. */
+ AVDocPrintTileData tileData;
+
+ /** If <code>NULL</code>, it uses default values. */
+ AVDocPrintRasterizeData rasterData;
+
+ /** If <code>NULL</code>, it uses default values. */
+ AVDocPrintOverrideData overrideData;
+
+ /** The area (in pts) of the page(s) to print. If <code>NULL</code>, print the whole page. */
+ ASFixedRect *selectRect;
+
+
+ /** The optional content context to use. If <code>NULL</code>, use the current on-screen OC state, but apply print-
+ specific AutoState changes from the default <code>occonfig</code> object's AS entry
+ */
+ PDOCContext ocContext;
+ /** A short note to the user that appears in the print dialog box. */
+ ASUTF16Val userNote[kPrintUserNoteLen];
+
+
+ /** A font and resource Policy, such as kAVResPolicySendAtStart. It must be one of AVResourcePolicy.
+ @see AVResourcePolicy
+ */
+ AVResourcePolicy resPolicy;
+ /** Determines which printer marks should be emitted, such as kAVCropMarks and so on. */
+ ASUns32 marksFlags;
+
+ /** N-up printing control parameters. If <code>NULL</code>, it uses default values. */
+ AVDocPrintNupData nUpData;
+
+ /** When <code>marksFlags</code> is non-zero, use <code>marksStyle</code> to determine which printer mark style to use.
+ See <code>marksStyleType</code> (makes kAVEasternStyleMarks obsolete) */
+ ASInt32 marksStyle;
+
+ /** Determines whether the user cancelled the print dialog box. */
+ ASBool printDialogWasCancelled;
+
+ /** The parent window of the dialog box (ignored on the Mac platform). It may be <code>NULL</code>. */
+ AVWindow parentWindow;
+
+ /** Represents the name of the proofing profile when doing proofing. */
+ char proofProfile[256];
+ char *ppdPath;
+ /** If <code>markStyle >= kLastMarkType</code>, <code>customMarksFileName</code> should be a valid file name
+ representing a valid .mrk file for custom printer marks. */
+ ASPathName customMarksFileName;
+ /** Specify the number of copies with which to prepopulate the print dialog box. It may be ignored in certain cases. */
+ ASInt32 numCopies;
+ /** Specify the duplex request. */
+ AVPrintDuplexType duplexType;
+} AVDocPrintParamsRec;
+#endif
+
+/** @ingroup EmitFlags */
+typedef struct _t_AVDocPrintSepsParams *AVDocPrintSepsParams;
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/* The AVPrintTrapType enumeration was added for Acrobat 8. */
+enum {
+/** @ingroup EmitFlags */
+kAVPrintTrapNone = 0x01,
+/** @ingroup EmitFlags */
+kAVPrintTrapOnHost = 0x02, /* NOT SUPPORTED in Acrobat 7 */
+/** @ingroup EmitFlags */
+kAVPrintTrapInRIP = 0x04 /* requires in-RIP separations to be on */
+};
+typedef ASEnum8 AVPrintTrapType;
+/**
+ A structure specifying color separation printing parameters
+ used by AVDocPrintSeparations().
+ @see AVDocPrintSeparations
+ @ingroup EmitFlags
+*/
+typedef struct _t_AVDocPrintSepsParams
+{
+ /** The size of the data structure. It must be set to <code>sizeof(AVDocPrintSepsParamsRec)</code>. */
+ ASSize_t size;
+ /** The document for which to print color separations. */
+ AVDoc avDoc;
+ /** <code>firstPage</code>, <code>lastPage</code>, <code>psLevel</code>, <code>binaryOk</code>, and <code>shrinkToFit</code> are used if
+ <code>emitToPrinter</code> or <code>emitToFile</code> is <code>true</code>.
+ */
+ /** The first page to be printed. The first page number is <code>0</code>. If <code>-1</code>, all pages are printed. */
+ ASInt32 firstPage;
+ /** The last page to be printed. This is ignored if the <code>firstPage</code> is <code>-1</code>. */
+ ASInt32 lastPage;
+
+ /** The method creates an output file for each plate for each
+ page, using the <code>fileSysName</code> for the
+ file system, and the <code>filePathName</code> as the root file name
+ for each file. It appends the page number followed by the colorant
+ name to each output file name. If <code>filePathName</code> is not a
+ valid path name to a file to which Acrobat can open and write,
+ the method raises an exception using the value returned
+ by ASFileSysOpenFile().
+ */
+ ASAtom fileSysName;
+ /** The method creates an output file for each plate for each
+ page, using the <code>fileSysName</code> for the
+ file system, and the <code>filePathName</code> as the root file name
+ for each file. It appends the page number followed by the colorant
+ name to each output file name. If <code>filePathName</code> is not a
+ valid path name to a file to which Acrobat can open and write,
+ the method raises an exception using the value returned
+ by ASFileSysOpenFile().
+ */
+ ASPathName filePathName;
+
+ /* Parameters for emission of PS Level 1 Color Separations and EPS, or vanilla PS.
+ ** Creates and writes to filePathName (may not be <code>NULL</code>).
+ ** Does NOT use system printer driver.
+ ** Only has partial font emitting capabilities on some platforms:
+ ** Mac: embedded and system Type 1 fonts only; no TrueType or substitution fonts.
+ ** Win: embedded and system Type 1 fonts only; no TrueType or substitution fonts.
+ ** UNIX: all fonts
+ */
+ /** Not used. */
+ ASEnum8 emitFileOption;
+
+ /* More emit options. */
+ /** Additional emit options. It must be one of the Emit Flags.
+ @ref EmitFlags
+ */
+ ASUns32 emitFlags;
+
+ /** Not used. */
+ AVPageSize pageSize;
+ /** <code>NULL</code> uses default values. */
+ AVDocPrintRasterizeData rasterData; /* If <code>NULL</code>, it uses default values */
+ /** <code>NULL</code> uses default values. */
+ AVDocPrintOverrideData overrideData; /* If <code>NULL</code>, it uses default values */
+ /** The separations specification parameter structure. */
+ PDHostSepsSpec sepsSpec;
+ /** If <code>true</code>, generate in-RIP seps. */
+ ASBool inRip;
+ /** For Acrobat 8, <code>trapType</code> controls the type of trapping desired.
+ @see AVPrintTrapType
+ */
+ ASInt32 trapType;
+
+ /** Optionally used if <code>interactive</code>, <code>embedded</code>, or <code>emitToPrinter</code> is <code>true</code>.
+ If it is <code>NULL</code>, a default system printer is used.
+ If it is non-<code>NULL</code>, <code>printerSpec</code> is a platform-specific value.
+ It must be an ASPlatformPrinterSpec.
+ */
+ ASPlatformPrinterSpec printerSpec;
+
+}
+AVDocPrintSepsParamsRec;
+
+#endif
+
+/************************************************************************************\
+|* *|
+|* Transition Stuff *|
+|* *|
+\************************************************************************************/
+
+
+/**
+ A data structure containing callbacks that implement a transition
+ handler. The callbacks implement the transition handler
+ functions.
+ @see AVAppRegisterTransHandler
+*/
+typedef struct _t_AVTransHandler *AVTransHandler;
+
+/**
+ A platform-dependent data structure for a transition.
+
+ <p>In general, a transition port specifies a bitmap and a rectangle
+ describing the portion of the bitmap affected by the transition.
+ The transition handler's AVTransHandlerExecuteProc() callback
+ must copy all the bits from the source port's bitmap within
+ the source port's rectangle to the area in the destination
+ port's bitmap described by the destination port's rectangle.
+ The source and destination ports' rectangles are guaranteed
+ to be equal in size. </p>
+ @see AVTransHandlerExecuteProc
+*/
+typedef struct _t_AVTransitionPort {
+ /** */
+ void *reserved;
+ /** Reserved. Do not alter. */
+ AVRect32 rect32;
+#if WIN_PLATFORM
+
+ /** */
+ HDC hDC;
+
+ /** */
+ RECT rect;
+#elif MAC_PLATFORM
+ int Acrobat8ForMacDoesNotSupportTheAVTransitionPort;
+ int PleaseContactDeveloperSupportIfThisIsAnIssueForYou;
+#elif UNIX_PLATFORM
+ void* port;
+ void* rect;
+#elif OS2_PLATFORM
+ HPS hPS;
+ RECTL rect;
+#endif
+} AVTransitionPortRec, *AVTransitionPort;
+
+
+
+/**
+ A callback for AVTransHandler. It gets the transition type serviced
+ by this handler. The handler for a given transition is found
+ by comparing the result of PDTransGetSubtype() to the value
+ returned by the registered transition handler's AVTransHandlerGetTypeProc()
+ callbacks.
+ @param avth IN/OUT The transition handler.
+ @return The type of transition handler, which may be one of the types
+ provided in the Acrobat viewer or a new type registered
+ by a plug-in.
+ @see PDTransGetSubtype
+
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *AVTransHandlerGetTypeProc)(AVTransHandler avth);
+
+
+/**
+ A callback for AVTransHandler. It executes the specified transition.
+ The transition handler is responsible for copying the pixels
+ specified by <code>srcTP</code> to the location specified by <code>dstTP</code>. In
+ the process, the handler can create any visual effect you
+ desire, as long as the source pixels are eventually copied
+ over the destination pixels in the end.
+
+ <p>The handler should, if possible, execute the visual effect
+ in the number of seconds specified by duration. </p>
+
+ <p>The implementation will ensure that the source and destination
+ rectangles are the same size, though their corners may not
+ coincide. </p>
+ @param avth IN/OUT The transition handler.
+ @param trans IN/OUT The transition to execute.
+ @param srcTP IN/OUT Source transition port.
+ @param dstTP IN/OUT Destination transition port.
+ @param duration IN/OUT Duration of the transition, in seconds.
+
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVTransHandlerExecuteProc)(AVTransHandler avth, PDTrans trans, AVTransitionPort srcTP, AVTransitionPort dstTP, ASFixed duration);
+
+
+/**
+ A callback for AVTransHandler. It retrieves the user interface
+ name for an existing PDTrans. For example, if the transition
+ type is <code>'Wipe'</code> and the direction is <code>180</code>, AVTransHandlerGetUINameProc()
+ would return <code>"Wipe Left"</code>, localized.
+
+ <p>A transition handler can handle several distinct transitions.
+ For example, the <code>"Wipe"</code> transition handler can create four
+ distinct effects: wipe left, wipe right, wipe up, and wipe
+ down. </p>
+
+ <p>The transition setting dialog box creates a separate user
+ interface entry for each distinct transition. It determines
+ both the number and names of the distinct transition types
+ by repeatedly calling each transition handler's AVTransHandlerGetUINameProc()
+ callback, starting with an item number of <code>0</code> and increasing
+ until the AVTransHandlerGetUINameProc() callback returns an
+ empty string. </p>
+
+ <p>The string returned by AVTransHandlerGetUINameProc() should
+ be localized. </p>
+
+ <p>The AVTransHandlerGetUINameProc() is used to enumerate the
+ entire list of supported transition effects that the handler
+ wishes to display in the popup menu. For example, <code>"Wipe
+ Left"</code> for <code>item == 0</code>, <code>"Wipe Right"</code> for <code>item == 1</code>, and so
+ on). </p>
+ @param avth IN/OUT The transition handler.
+ @param trans IN/OUT The transition whose name is obtained.
+ @param buffer IN/OUT (Filled by the callback) The user interface
+ name of the transition.
+ @param bufLen IN/OUT The length of <code>buffer</code> in bytes.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVTransHandlerGetItemUINameProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *AVTransHandlerGetUINameProc)(AVTransHandler avth, PDTrans trans, char* buffer, ASInt32 bufLen);
+
+
+/**
+ A callback for AVTransHandler.
+
+ <p>A transition handler can handle several distinct transitions.
+ For example, the <code>Wipe</code> transition handler can create four
+ distinct effects: wipe left, wipe right, wipe up, and wipe
+ down. </p>
+
+ <p>The transition setting dialog box should create a separate
+ user interface entry for each distinct transition. It determines
+ both the number and names of the distinct transition types
+ by repeatedly calling each transition handler's AVTransHandlerGetItemUINameProc()
+ callback, starting with an item number of <code>0</code> and increasing
+ until AVTransHandlerGetItemUINameProc ()returns an empty string. </p>
+
+ <p>Thus, when the transaction handler is selected from the list,
+ this callback is called. The transition handler should fill
+ in the Type and S fields. AVTransHandlerGetItemUINameProc()
+ should fill in any default values. This information is passed
+ into the AVTransHandlerDoPropertiesProc() in the form of a
+ PDTrans if that callback exists. </p>
+ @param avth IN/OUT The transition handler.
+ @param item IN/OUT The item number.
+ @param buffer IN/OUT (Filled by the callback) The name of the
+ transition in the user interface. This string should be
+ localized.
+ @param bufLen IN/OUT Length of <code>buffer</code> in bytes.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVTransHandlerGetUINameProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *AVTransHandlerGetItemUINameProc)(AVTransHandler avth, ASInt32 item, char* buffer, ASInt32 bufLen);
+
+/**
+ A callback for AVTransHandler.
+
+ <p>A transition has different variations but the same type of action.
+ For example, the Wipe transition handler can create four
+ distinct effects: wipe left, wipe right, wipe up, and wipe
+ down. </p>
+
+ <p>The transition setting dialog box should create a list of effects
+ for each distinct transition. It will determine the variation according to the
+ transition type (for example, left, right, up, down).</p>
+
+ <p>When the application is building the user interface, the dialog box will call
+ GetItemDirectionUIName() repeatedly for the name of the effect.</p>
+ @param avth IN/OUT The transition handler.
+ @param item IN/OUT The item number.
+ @param buffer (Filled by the callback) The name of the
+ variation in the user interface.
+ @see AVTransHandlerGetItemUINameProc
+*/
+
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVTransHandlerGetItemDirectionUINameProc)(AVTransHandler avth, ASInt32 item, ASText buffer);
+
+/**
+ A callback for AVTransHandler.
+
+ <p>A transition has different variations but the same type of action.
+ For example, the Wipe transition handler can create four
+ distinct effects: wipe left, wipe right, wipe up, and wipe
+ down. </p>
+
+ <p>For some of these effects, there is an opposite effect.
+ For example, Push Left is the opposite of Push Right.</p>
+
+ <p>When the application is building the user interface, the dialog box will call
+ GetBiDirEnabled() to check if the transition type's effects have an opposite effect.</p>
+
+ @param avth IN/OUT The transition handler.
+ @return A boolean value that determines whether the transition can use a bidirectional setting.
+*/
+
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVTransHandlerGetBiDirEnabledProc)(void);
+
+/**
+ A callback for AVTransHandler.
+
+ <p>When a transition is being performed, the animation can slow down at the end of
+ the transition.</p>
+
+ <p>When the application is building the user interface, the dialog box will call
+ GetSmoothActionEnabled() to check if the transition type's effects have an opposite effect.</p>
+
+ @param avth IN/OUT The transition handler.
+ @return A boolean value that determines whether the transition can use a smooth action setting.
+*/
+
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVTransHandlerGetSmoothActionEnabledProc)(void);
+
+/**
+
+ Returns the canonical name for the item. It should return ASAtomNull if the item number is invalid.
+ This was added in Acrobat 5.0 so that different transitions could be handled in a language-independent manner.
+ If this call is not implemented, then it is acceptable to generate a
+ synthetic name from the transition type and the item index.
+ For example, the <code>"Glitter"</code> trans handler should return a canonical name such as <code>"GlitterDown"</code>.
+ If this call is not implemented, then the name will be the trans handler type <code>"Glitter"</code>,
+ plus a period, plus the item number (for example, <code>"Glitter.0"</code>).
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *AVTransHandlerGetItemNameProc)(AVTransHandler avth, ASInt32 item);
+
+/**
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *AVTransHandlerGetNameProc)(AVTransHandler avth, PDTrans trans);
+
+
+/**
+ A callback for AVTransHandler. This method should set default
+ values in the transition dictionary, <code>transDict</code>.
+
+ <p>As soon as the handler is selected from the list, AVTransHandlerInitTransDictProc()
+ is called. This function should fill in the Type and S fields
+ of <code>transDict</code>. AVTransHandlerInitTransDictProc() should also
+ fill in any default values. This information is passed to
+ AVTransHandlerDoPropertiesProc() in the form of a PDTrans
+ if AVTransHandlerDoPropertiesProc() exists. </p>
+
+ <p>Normally the Type and S fields are filled in when the transition
+ is created via PDTransNewFromCosDoc(). The implementation
+ then calls AVTransHandlerInitTransDictProc() and AVTransHandlerCompleteTransDictProc()
+ immediately on the newly created PDTrans. </p>
+ @param avth The transition handler.
+ @param transDict The transition dictionary to set.
+ @see AVTransHandlerCompleteTransDictProc
+ @see PDTransNewFromCosDoc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVTransHandlerInitTransDictProc)(AVTransHandler avth, CosObj transDict);
+
+/**
+ A callback for AVTransHandler. This method is called after
+ the user has selected a distinct transition. The transition
+ handler must fill in any dictionary items necessary to create
+ the effect specified by the <code>uiName</code> passed in. For example,
+ if the <code>Wipe</code> transition handler is passed a <code>uiName</code> of
+ <code>"Wipe Left"</code>, it would set the Dir key in <code>transDict</code> to the
+ value <code>180</code>.
+
+ <p>AVTransHandlerCompleteTransDictProc() should fill in standard
+ information like direction, dimension, motion, and so forth
+ (information gathered entirely from the user interface name). Other
+ specific information should be filled in by AVTransHandlerDoPropertiesProc. </p>
+
+ @param avth IN/OUT The transition handler.
+ @param name IN/OUT The user interface name of the transition.
+ @param transDict IN/OUT The transition dictionary to set.
+ @see AVTransHandlerDoPropertiesProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVTransHandlerCompleteTransDictProc)(AVTransHandler avth, const char *name, CosObj transDict);
+
+/**
+ A callback for AVTransHandler. This method is called when
+ the user clicks the button in the transition settings dialog box.
+ This allows the transition to bring up its own custom dialog box
+ allowing the user to further specify the desired transition
+ effect.
+
+ <p>Once the user selects a transition effect from the popup
+ menu, the viewer immediately creates a transition (using
+ PDTransNewFromCosDoc() or PDTransNew()), and calls AVTransHandlerInitTransDictProc()
+ and AVTransHandlerCompleteTransDictProc(). If the handler
+ provides both an AVTransHandlerDoPropertiesProc() and AVTransHandlerGetButtonTextProc()
+ callbacks, the dialog box displays a button. When the user
+ clicks on the button, the viewer calls the handler's AVTransHandlerDoPropertiesProc()
+ callback. <code>DoProperties</code> is responsible for making any needed
+ alterations to the transition; <code>InitTransDict</code> and <code>CompleteTransDict</code>
+ are not called after <code>DoProperties</code>. </p>
+
+ <p>After the user clicks OK in the dialog box, <code>trans</code> is filled
+ in using the supplied data. </p>
+ @param avth IN/OUT The transition handler.
+ @param name IN/OUT The user interface name for the transition
+ handled by <code>avth</code>.
+ @param trans IN/OUT The PDTrans to initialize.
+ @see AVTransHandlerCompleteTransDictProc
+ @see AVTransHandlerInitTransDictProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVTransHandlerDoPropertiesProc)(AVTransHandler avth, const char *name, PDTrans trans);
+
+/**
+ (Unused) A callback for AVTransHandler.
+ @param avth IN/OUT The transition handler.
+ @param buffer IN/OUT (Filled by the callback) The instruction
+ text.
+ @param bufLen IN/OUT Length of <code>buffer</code> in bytes.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVActionGetInstructionsProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *AVTransHandlerGetInstructionsProc)(AVTransHandler avth, char *buffer, ASInt32 bufLen);
+
+/**
+ A callback for AVTransHandler. It gets a localized string that
+ appears in the button on the transition settings dialog
+ box. If AVTransHandlerGetButtonTextProc() is <code>NULL</code> or the string
+ it returns is empty, no button will appear.
+ @param avth IN/OUT The transition handler.
+ @param buffer IN/OUT (Filled by the callback) The button text.
+
+ @param bufLen IN/OUT Length of <code>buffer</code> in bytes.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVTransHandlerDoPropertiesProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *AVTransHandlerGetButtonTextProc)(AVTransHandler avth, char *buffer, ASInt32 bufLen);
+
+/**
+ A callback for AVTransHandler. Gets a localized string that
+ appears above the button on the transition settings dialog
+ box.
+ @param avth IN/OUT The transition handler.
+ @param buffer IN/OUT (Filled by the callback) The string text
+ appearing above the button.
+ @param bufLen IN/OUT Length of <code>buffer</code> in bytes.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVTransHandlerGetStringTwoTextProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *AVTransHandlerGetStringOneTextProc)(AVTransHandler avth, char *buffer, ASInt32 bufLen);
+
+/**
+ A callback for AVTransHandler. It gets a localized string that
+ appears below the button on the transition settings dialog
+ box.
+ @param avth IN/OUT The transition handler.
+ @param buffer IN/OUT (Filled by the callback) The string text
+ appearing below the button.
+ @param bufLen IN/OUT Length of <code>buffer</code> in bytes.
+ @return The number of characters copied into <code>buffer</code>.
+ @see AVTransHandlerGetStringOneTextProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *AVTransHandlerGetStringTwoTextProc)(AVTransHandler avth, char *buffer, ASInt32 bufLen);
+
+
+/**
+ A data structure containing callbacks that implement a transition
+ handler. The callbacks implement the transition handler
+ functions.
+ @see AVAppRegisterTransHandler
+*/
+typedef struct _t_AVTransHandler
+{
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVTransHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** Return the transition handler type (for example, <code>"Wipe"</code>). */
+ AVTransHandlerGetTypeProc GetType;
+
+ /** Given this PDTrans, execute this transition. */
+ AVTransHandlerExecuteProc Execute;
+
+ /** Given this PDTrans, determine the <code>UIName</code>. */
+ AVTransHandlerGetUINameProc GetUIName;
+
+ /** Return the <code>UIName</code> for the Nth item, <code>NULL</code> if N is invalid. */
+ AVTransHandlerGetItemUINameProc GetItemUIName;
+
+ /** Fill this <code>dict</code> with generic information if necessary. */
+ AVTransHandlerInitTransDictProc InitTransDict;
+
+ /** Fill this <code>dict</code> with specific, standard information. */
+ AVTransHandlerCompleteTransDictProc CompleteTransDict;
+
+ /** The proc to bring up the user interface window. Fill in the PDTrans for non-standard plug-ins that have additional information. */
+ AVTransHandlerDoPropertiesProc DoProperties;
+
+ /** <code>message1</code> for non-standard plug-ins that have additional information. */
+ AVTransHandlerGetInstructionsProc GetInstructions;
+
+ /** Button text for non-standard plug-ins that have additional information. */
+ AVTransHandlerGetButtonTextProc GetButtonText;
+
+ /** <code>message2</code> for non-standard plug-ins that have additional information. */
+ AVTransHandlerGetStringOneTextProc GetStringOneText;
+
+ /** <code>message3</code> for non-standard plug-ins that have additional information. */
+ AVTransHandlerGetStringTwoTextProc GetStringTwoText;
+
+ /** Acrobat 5: given this PDTrans, determine its LI name. This is used for non-standard plug-ins that have additional information. */
+ AVTransHandlerGetNameProc GetName;
+
+ /** Acrobat 5: return the LI name for the Nth item, ASAtomNull if N is invalid. This is used for non-standard plug-ins that have additional information. */
+ AVTransHandlerGetItemNameProc GetItemName;
+
+ /** Acrobat 6: determine if this transition is OK to use with the Random transition. This is used for non-standard plug-ins that have additional information. */
+ ASBool discludeFromRandom;
+
+ /** Acrobat 7: Determine if this transition is OK to set through the user interface. Certain effects, such as /Fly, do not make sense in the general case. */
+ ASBool discludeFromUI;
+
+ /** Acrobat 8 */
+ AVTransHandlerGetItemDirectionUINameProc GetItemDirectionUIName;
+
+ /** Acrobat 8: Determines whether this transition has a bidirectional counterpart. */
+ AVTransHandlerGetBiDirEnabledProc GetBiDirEnabled;
+
+ /** Acrobat 8: Determines whether this transition uses Smooth Action. */
+ AVTransHandlerGetSmoothActionEnabledProc GetSmoothActionEnabled;
+
+} AVTransHandlerRec;
+
+
+/**
+ A callback for AVAppEnumTransHandlers. It is called once for
+ each transition handler.
+ @param avth IN/OUT The transition handler.
+ @param vClientData IN/OUT User-supplied data that was passed in
+ the call to AVAppEnumTransHandlers().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see AVAppEnumTransHandlers
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVTransHandlerEnumProc)(AVTransHandler avth, void *vClientData);
+
+/*------------------------------------------------------------------------------
+ System Font Stuff (Mac only)
+------------------------------------------------------------------------------*/
+#if MAC_ENV
+/* AVSystemFont flags bitfield values */
+
+
+/** Type 1 font.
+ @ingroup AVSystemFontFlags
+*/
+#define kFontIsType1 0x0001
+
+/** Multiple Master font.
+ @ingroup AVSystemFontFlags
+*/
+#define kFontIsMMMaster 0x0002
+
+/** Multiple Master font (a completely specified instance).
+ @ingroup AVSystemFontFlags
+*/
+#define kFontIsMMInstance 0x0004
+
+/** TrueType font.
+ @ingroup AVSystemFontFlags
+*/
+#define kFontIsTrueType 0x0008
+
+/** Character ID Type 0 font.
+ @ingroup AVSystemFontFlags
+*/
+#define kFontIsCIDFontType0 0x0010
+
+/** OCF Type 1 font.
+ @ingroup AVSystemFontFlags
+*/
+#define kFontIsOCFType1 0x0020
+
+/**
+ (Mac OS only, present only in Acrobat 3.0 or later) System
+ font.
+ @see AVAppEnumSystemFonts
+*/
+typedef struct _t_AVSystemFont {
+
+ /** Mac OS FOND id. */
+ short fondID;
+
+ /** Mac OS style value: <code>normal</code>, <code>italic</code>, <code>bold</code>, or <code>bold | italic</code>. */
+ short styleID;
+
+ /** Must be one of the AVSystemFont <code>Flags</code>.
+ @see AVSystemFontFlags
+ */
+ ASUns32 flags;
+
+ /** PostScript name or TrueType-styled name. */
+ ASAtom pdfFontName;
+} AVSystemFontRec, *AVSystemFont;
+
+/**
+ (Mac OS only). A callback for AVAppEnumSystemFonts(). It
+ is called once for each system font.
+ @param systemFont IN/OUT The AVSystemFont currently being enumerated.
+
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to AVAppEnumSystemFonts().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see AVAppEnumSystemFonts
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVSystemFontEnumProc)(AVSystemFont systemFont, void *clientData);
+#endif
+
+
+/**
+ A structure used by AVDocDoSaveAsWithParams() containing parameters
+ that a client wishing to save a file might want to specify.
+ It is passed in by address to AVDocDoSaveAsWithParams() with
+ a size field so that current clients replacing AVDocDoSaveAsWithParams()
+ will not break in the future if new open specifications are
+ provided.
+ @see AVDocDoSaveAsWithParams
+*/
+typedef struct _t_AVDocSaveParams
+{
+ /** The size of the data structure. It must be set to <code>sizeof(AVDocSaveParamsRec)</code>. */
+ ASSize_t size;
+
+ /** Use the standard file Save dialog box. */
+ ASBool useSaveDialog;
+
+ /** (Acrobat 5.0 and later) Do not use "convert from PDF" handlers. */
+ ASBool dontAllowConversions;
+
+ /** The ID of the default filter (<code>NULL</code> means PDF). */
+ const char *filterID;
+
+ /** Bypass the dialog box and use the default path, etc. */
+ ASBool useDefaults;
+}
+AVDocSaveParamsRec, *AVDocSaveParams;
+
+
+
+/**
+ A structure that contains a progress monitor, a cancel procedure,
+ and an error report procedure.
+ @see AVConversionConvertToPDFWithHandler
+ @see AVConversionConvertFromPDFWithHandler
+ @see AVConversionConvertToPDF
+*/
+typedef struct _t_AVStatusMonitorProcs {
+
+ /** The size of this structure. Set it to <code>sizeof(AVStatusMonitorProcsRec)</code>. */
+ ASSize_t size;
+
+
+ /** (May be <code>NULL</code>) The progress monitor. In general, clients of this structure test members for <code>NULL</code>. If a member
+ is found, they do not do anything.
+ */
+ ASProgressMonitor progMon;
+
+ /** The progress monitor client data that was acquired with the progress monitor. */
+ void *progMonClientData;
+
+ /**
+ This call has been replaced by ASCancelProc().
+
+ <p>This is a callback to check for cancelling operations. A <code>CancelProc</code>
+ is typically passed to some method that takes a long time
+ to complete. At frequent intervals, the method calls the
+ <code>CancelProc</code>. If it returns <code>true</code>, then the method cancels
+ its operation; if it returns <code>false</code>, it continues.</p>
+ @param clientData User-supplied data that was passed to
+ the <code>CancelProc</code>.
+ @return <code>true</code> if the processing is cancelled, <code>false</code> otherwise.
+ @see PDFLPrintCancelProc (Only available with PDF Library SDK)
+
+ @see AVAppGetCancelProc
+ */
+ ASCancelProc cancelProc;
+
+ /** The cancellation procedure client data that was acquired with the cancellation procedure. */
+ void *cancelProcClientData;
+
+ /** (May be <code>NULL</code>) The report procedure. In general, clients of this structure test members for <code>NULL</code>.
+ If a member is found, they do not do anything.
+ */
+ ASReportProc reportProc;
+
+ /** The report procedure client data that was acquired with the report procedure.*/
+ void *reportProcClientData;
+} AVStatusMonitorProcsRec, *AVStatusMonitorProcs;
+
+/*********************************************************
+ * AVOpenSaveDialog definitions
+ *********************************************************/
+
+
+/**
+ A structure to handle file types and/or extensions in open
+ and save dialog boxes.
+ @see AVAppChooseFolderDialog
+ @see AVAppOpenDialog
+ @see AVAppSaveDialog
+*/
+typedef struct _t_AVFileDescRec{
+
+ /** A string up to 32 characters in length, for file extension. Use <code>\ 0</code> on Windows for do not care (ignored on Windows only
+ if <code>\\0</code> is used).
+ */
+ char extension[32];
+
+ /** File type (used on Mac OS only). Use <code>0</code> for do not care. */
+ ASUns32 macFileType;
+
+ /** File creator (used on Mac OS only). Use <code>0</code> for do not care. */
+ ASUns32 macFileCreator;
+} AVFileDescRec;
+
+/*
+Examples of AVFileDescRec's:
+
+HTMLFileDesc1:
+"html" - extension
+'TEXT' - type
+0 - creator
+
+HTMLFileDesc2:
+"htm" - extension
+'TEXT' - type
+0 - creator
+
+TextFileDesc1:
+"" - extension
+'TEXT' - type
+0 - creator
+
+TextFileDesc2:
+"txt" - extension
+'TEXT' - type
+0 - creator
+*/
+
+
+/**
+ A structure to hold a series of file type descriptors that
+ form a file filter for an open or save dialog box.
+ @see Various
+ @see AVAppChooseFolderDialog
+ @see AVAppOpenDialog
+ @see AVAppSaveDialog
+*/
+typedef struct _t_AVFileFilterRec {
+
+ /** Localized string describing this filter. It is the name that appears in the open or save dialog box. */
+ ASText filterDescription;
+
+ /** An array of AVFileDescRec objects. A single AVFileFilterRec can have as many AVFileDescRec objects as needed. On Windows, the
+ file name is concatenated with the extension string of the relevant AVFileDescRec in the Open and Save dialog boxes. On
+ Mac OS, the <code>fileDescription</code> string is used in the File Open and Save dialog boxes, and the AVFileDescRec objects are used
+ to filter which files are displayed when that AVFileFilterRec is selected. */
+ AVFileDescRec *fileDescs;
+
+ /** The number of AVFileDescRec objects in <code>fileDescs</code>. */
+ AVArraySize numFileDescs;
+} AVFileFilterRec;
+
+/**
+ An enumerated list of open and save dialog box flags.
+*/
+enum {
+
+ /** Use the "All Files (*.*)" file filter for the dialog box. It is meaningful only for an open dialog box.*/
+ kAVOpenSaveAllowAllFlag = 1 << 0,
+
+ /** Allow multiple files to be opened through this dialog box. It is meaningful only for an open dialog box. */
+ kAVOpenSaveAllowMultiple = 1 << 1,
+
+ /** Allow file systems other than the default to be used to open the file(s). */
+ kAVOpenSaveAllowForeignFileSystems = 1 << 2,
+
+ /** Adds a Settings button to the dialog box. It is meaningful for open and save dialog boxes. */
+ kAVOpenSaveAllowSettingsButton = 1 << 3,
+
+ /** This is meaningful only for Open dialog boxes with more than one passed filter. */
+ kAVOpenSaveMergeTogetherPassedFilters = 1 << 4,
+
+ /** Do not add the Make New Folder push button. It is only meaningful for the Browse For Folder dialog box. **/
+ kAVBrowseForFolderNoNewFolderButton = 1 << 5
+};
+typedef ASUns32 AVOpenSaveDialogFlags;
+
+
+/**
+ A client can provide this optional callback if you wish
+ to control whether the settings button in the open or save
+ dialog box is enabled or disabled. If you do not provide
+ this callback function, then the state of the settings button,
+ enabled or disabled, will be determined by whether the conversion
+ handler has a settings proc.
+ @param currentFilter IN/OUT The currently selected filter in the
+ dialog box.
+ @param data IN/OUT <code>void*</code> of <code>clientData</code>, which is the last member
+ of the AVOpenSaveDialogParamsRec structure.
+ @return <code>true</code> if the Settings button should be enabled, <code>false</code> otherwise.
+
+ @see AVOpenSaveDialogSettingsExecuteProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVOpenSaveDialogSettingsComputeEnabledProc)(AVFileFilterRec *currentFilter, void *data);
+
+/**
+ A client provides this optional callback to decide what
+ action is taken when the user clicks on the settings button.
+ The function is called back with the currently selected
+ filter.
+
+ @param currentFilter IN/OUT The currently selected filter in the
+ dialog box.
+ @param data IN/OUT <code>void*</code> of <code>clientData</code>, which is the last member
+ of the AVOpenSaveDialogParamsRec structure.
+ @return A boolean value.
+ @see AVOpenSaveDialogSettingsComputeEnabledProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVOpenSaveDialogSettingsExecuteProc)(AVFileFilterRec *currentFilter, void *data);
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+
+/**
+ A structure defining the properties and callbacks related
+ to a file open/save dialog box. It is used for AVAppOpenDialog(), AVAppSaveDialog(), and AVAppChooseFolderDialog().
+ @see AVAppOpenDialog
+ @see AVAppSaveDialog
+ @see AVAppChooseFolderDialog
+*/
+typedef struct {
+ /** The size of this structure. Set it to <code>sizeof(AVOpenSaveDialogParamsRec)</code>. */
+ ASSize_t size;
+
+ /** A bitwise <code>OR</code> of the AVOpenSaveDialogFlags. */
+ AVOpenSaveDialogFlags flags;
+
+ /** The parent window of the dialog box (ignored on Mac OS). It may be <code>NULL</code>. */
+ AVWindow parentWindow;
+
+ /** The title of the dialog box that is used for the prompt. It may be <code>NULL</code> for the default title. */
+ ASText windowTitle;
+
+ /** The title of the action button (Open, Save, or Choose). It may be <code>NULL</code> for the default title. */
+ ASText actionButtonTitle;
+
+ /** The title of the cancel button. It may be <code>NULL</code> for the default title. */
+ ASText cancelButtonTitle;
+
+ /** May be <code>NULL</code> if <code>flags</code> does not contain kAVOpenSaveAllowForeignFileSystems. */
+ ASFileSys initialFileSys;
+
+ /** Used to specify the initial location or selection. It may be <code>NULL</code> if the default location or selection is acceptable. */
+ ASPathName initialPathName;
+
+ /** Ignored (may be <code>NULL</code>) for Open and ChooseFolder. For Save, the file name portion is used for the edit
+ field. It may be <code>NULL</code> on Windows, but is required on Mac OS.
+ */
+ ASText initialFileName;
+
+ /** An array of AVFileFilterRec objects. It is ignored (may be <code>NULL</code>) for ChooseFolder. It may be <code>NULL</code> for Open <i>only</i>
+ if kAVOpenSaveAllowAllFlag is set.
+ */
+ AVFileFilterRec **fileFilters;
+
+ /** The number of AVFileFilterRec objects in <code>fileFilters</code>. */
+ AVArraySize numFileFilters;
+
+ /** (Optional) Called to determine whether the Settings button should be enabled.
+ It may be <code>NULL</code>. It is ignored if kAVOpenSaveAllowSettingsButton is not set.
+ */
+ AVOpenSaveDialogSettingsComputeEnabledProc settingsComputeEnabledProc;
+
+ /** Called when the user clicks on the (enabled) Settings button. It may be <code>NULL</code>. It is ignored if
+ kAVOpenSaveAllowSettingsButton is not set.
+ */
+ AVOpenSaveDialogSettingsExecuteProc settingsExecuteProc;
+
+ /** Data that is passed to the <code>settingsExecuteProc</code> callback. It is ignored if kAVOpenSaveAllowSettingsButton is not
+ set.
+ */
+ void *settingsProcData;
+} AVOpenSaveDialogParamsRec, *AVOpenSaveDialogParams;
+#endif
+
+
+/*********************************************************
+ * AVAcquireSpecial definitions
+ *********************************************************/
+
+/* AVAcquireSpecialFolderPathName and AVAcquireSpecialFilePathName. Use
+ these routines to get a path to special folders that exist on the system.
+
+ Valid combinations of cat/fld for these functions are detailed here:
+ kAVSCUser kAVSCApp
+ kAVSFRoot User directory (1) Viewer directory (9)
+ kAVSFEBooks User eBook license files (RMF) (2) N/A
+ kAVSFPreferences User preferences (3) N/A
+ kAVSFSequences User defined batch sequences (4) App batch sequences (10)
+ kAVSFDocuments User documents (5) N/A
+ kAVSFJavaScript User JavaScripts (6) App JavaScripts (11)
+ kAVSFStamps User stamps folder (7) App stamps folder (12)
+ kAVSFDictionaries User installed spelling dicts (8) App installed dicts (13)
+ kAVSFPlugIns N/A Plug-ins folder (14)
+ kAVSFHelp N/A Help folder (15)
+ kAVSFTemp Temporary folder (16) N/A
+ kAVSFMessages User Messages folder (17) Default Messages folder (18)
+ kAVSFHelpLocale Downloaded Adobe Reader Help (19) Help Locale folder (20)
+ kAVSFTouchUpFind N/A App TouchUp find folder (21)
+ kAVSFOrganizerDatabase Organizer Database directory N/A
+ kAVSFNavigators User navigators App navigators (multi-lingual)
+ kAVSFNavigatorsLocalized N/A App navigators (localized)
+ kAVSFMultimediaSkins User multimedia skins App multimedia skins
+
+ (1) User directory
+ Windows: Documents and Settings/<user>/Application Data/Acrobat
+ (2) User eBook license files (RMF)
+ License files used by WebBUY to indicate ownership/rights of particular
+ PDF documents.
+ Windows: Documents and Settings/<user>/Application Data/Acrobat/EBook
+ (3) User preferences
+ Should contain files full of preferences (e.g. ini or Mac prefs files).
+ Generally we do not want the user mucking with these. If a plug-in wants to
+ provide regular preferences it should use the miIni.c interface which would
+ map to pref files in this folder on the Mac and the registry on Windows.
+ Windows: Documents and Settings/<user>/Application Data/Acrobat/Preferences
+ (4) User batch sequences
+ Custom batch scripts that the user has written/defined and saved.
+ Windows: Documents and Settings/<user>/Application Data/Acrobat/Sequences
+ (5) User documents
+ The viewer and all plug-ins should default to opening and saving in this folder.
+ Windows: Documents and Settings/<user>/My Documents
+ (6) User JavaScripts
+ JavaScripts written by the user (.js files) that are loaded at application launch.
+ These are editable directly by the user and as such are not usually found in
+ the same folder as kAVSFEBooks, kAVSFPreferences, or kAVSFSequences.
+ Windows: Documents and Settings/<user>/My Documents/Acrobat/JavaScript
+ (7) User stamps
+ Custom rubber stamps that the user creates are stored in this folder.
+ Windows: Documents and Settings/<user>/My Documents/Acrobat/Stamps
+ (8) User dictionaries
+ User installed dictionaries for the spell checker.
+ Windows: Documents and Settings/<user>/My Documents/Dictionaries
+ (9) Viewer root
+ Location of the application. Sometimes needed to sniff for DLLs and other files
+ that live at this level.
+ Windows: Program Files/Adobe/Acrobat 5.0/<viewer>
+ (10)Application batch sequences
+ Batch sequences that are shipped with the product as examples.
+ Windows: Program Files/Adobe/Acrobat 5.0/<viewer>/Sequences/<locale>
+ (11)Application JavaScripts
+ JavaScripts that are shipped with the product (AForm.js, AFString<lang>.js, Annots.js)
+ Windows: Program Files/Adobe/Acrobat 5.0/<viewer>/plug-ins/EScript/JavaScripts
+ (12)Application stamps
+ Stamps that are shipped with the product.
+ Windows: Program Files/Adobe/Acrobat 5.0/<viewer>/plug-ins/Annotations/Stamps
+ (13)Application Dictionaries
+ Dictionaries that are shipped with the product.
+ Windows: Program Files/Adobe/Acrobat 5.0/<viewer>/plug-ins/Spelling/Dictionaries
+ (14)Application plug-ins
+ Where plug-ins are stored.
+ Windows: Program Files/Adobe/Acrobat 5.0/<viewer>/plug-ins
+ (15)Application help
+ Windows: Program Files/Adobe/Acrobat 5.0/Help
+ (16)Temp folder
+ Windows: Windows\Temp
+ (17)User Messages folder
+ Windows: Documents and Settings/<user>/Application Data/Acrobat/Messages
+ (18)App Messages folder
+ Windows: Program Files/Adobe/Acrobat 5.0/Messages
+ (19)Downloaded Adobe Reader Help folder
+ Used to store the full reader help file on systems that lock out access to
+ the application help folder.
+ Windows: Documents and Settings/<user>/Application Data/Acrobat/Help/<Locale>
+ (20)Application help locale
+ Windows: Program Files/Adobe/Acrobat 5.0/Help/<Locale>
+ (21)Application TouchUp/Find folder
+ Where TouchUp stores find XML files.
+ Windows: "Program Files/Adobe/Acrobat 5.0/<viewer>/plugins/TouchUp/Find"
+
+*/
+
+
+/**
+ Categories of special folders on the system. Used with folder
+ types to locate folders. Note that some combinations of
+ AVSpecialCategory and AVSpecialFolder are not valid. See
+ AVSpecialError for a list of valid combinations.
+ @see AVAcquireSpecialFilePathName
+ @see AVAcquireSpecialFolderPathName
+*/
+typedef enum {
+
+ /** User folders. */
+ kAVSCUser,
+
+ /** Application folders. */
+ kAVSCApp,
+
+ /** Often used to tag the end of an enumeration with a specific value. */
+ kAVSCLast
+} AVSpecialCategory;
+
+
+/**
+ Special folder types on the system. It is used with folder categories
+ to locate folders. Note that some combinations of AVSpecialCategory
+ and AVSpecialFolder are not valid. See AVSpecialError for a list of valid
+ combinations.
+ @see AVAcquireSpecialFilePathName
+ @see AVAcquireSpecialFolderPathName
+*/
+typedef enum {
+
+ /** Viewer root: the location of the application. It is sometimes
+ needed to sniff for DLLs and other files that live at this
+ level.
+ */
+ kAVSFRoot,
+
+ /** User eBook license files (RMF) used by WebBUY to indicate ownership/rights of particular
+ PDF documents.
+
+ */
+ kAVSFEBooks,
+
+ /** User preferences folder. It should contain preferences files (for example, ini or Mac OS prefs
+ files). Generally you do not want the user touching these. If a plug-in provides regular
+ preferences, it should use the <code>miIni.c</code> interface, which would map to pref files in this folder on
+ Mac OS and the registry on Windows.
+ */
+ kAVSFPreferences,
+
+ /** User-defined batch sequences: Custom batch scripts that the
+ user has written/defined and saved.
+ Application batch sequences: Batch sequences that are shipped with the
+ product as examples.
+ */
+ kAVSFSequences,
+
+ /** User documents folder The viewer and all plug-ins should default to opening and saving in
+ this folder.
+
+ */
+ kAVSFDocuments,
+
+ /** User JavaScripts folder: JavaScript (.js) files written by the user that are loaded at
+ application launch. These are editable directly by the user and as such are not usually found in
+ the same folder as kAVSFEBooks, kAVSFPreferences, or kAVSFSequences.
+
+ */
+ kAVSFJavaScript,
+
+ /** User stamps folder: Custom rubber stamps created by the user are stored in this folder.
+ <p>Application stamps folder: Stamps that are shipped with the product. </p>
+ */
+ kAVSFStamps,
+
+ /** User-installed dictionaries: User-installed dictionaries for the spell checker.
+ <p>Application-installed dictionaries: Dictionaries that are shipped with the product. </p>
+ */
+ kAVSFDictionaries,
+
+ /** The application plug-ins folder where plug-ins are stored.
+ */
+ kAVSFPlugIns,
+
+ /** Suite Pea plug-ins folder. */
+ kAVSFSPPlugIns,
+
+ /** Help folder Application help.
+ */
+ kAVSFHelp,
+
+ /** Temporary folder.
+ */
+ kAVSFTemp,
+
+ /** User messages/application messages folder.
+ */
+ kAVSFMessages,
+
+ /** Resources folder. */
+ kAVSFResource,
+
+ /** Update folder. */
+ kAVSFUpdate,
+
+ /** Downloaded Adobe Reader Help folder:
+
+ <p>Used to store the full Adobe Reader Help file on systems that lock out access to the application Help
+ folder.</p>
+ */
+ kAVSFHelpLocale,
+
+ /*** New for Acrobat 6.0 ***/
+ /** */
+ kAVSFAuthoring,
+
+ /** */
+ kAVSFSecurity,
+
+ /** */
+ kAVSFLocalRoot,
+
+ /** */
+ kAVSFLocalCache,
+
+ /** */
+ kAVSFTasks,
+
+ /** Linguistics Library (LILO) files shared among all Adobe applications.
+ */
+ kAVSFLinguistics,
+
+ /** <p>Mapping Tables for the SaveAsXML plug-in.</p>
+ */
+ kAVSFMappingTables,
+
+ /** Used to create a new PDF file from the document template.
+ User templates folder: Custom template files that the user creates are stored in this folder.
+ <p>Application doc template folder: Doc templates that are shipped with the product. </p>
+ */
+ kAVSFDocTemplates,
+
+ /** User desktop folder.
+ */
+ kAVSFDesktop,
+ /** Common PrintSpt folder for storing custom printer marks files.
+ <p>InDesign CS puts its custom marks files there, which is why the Viewer looks there as well.</p>
+ */
+ kAVSFPrintSupport,
+
+ /** */
+ kAVSFGettingStarted,
+
+ /** The TouchUp/Find Application plugin folder where TouchUp stores XML files.
+ */
+ kAVSFTouchUpFind,
+
+ /** The folder where the Organizer database files are to be located.
+ */
+ kAVSFOrganizerDatabase,
+
+ /** Used to create a PDF file envelope containing a secure attachment.
+ */
+ kAVSFHostedServicesTemplates,
+
+ /** Swatchbooks. */
+ kAVSFSwatchbooks,
+
+ /** Application's localized stamps folder: localized application stamps are stored in this folder.
+ <p>Application localized stamps folder: localized stamps that are shipped with the product.</p>
+ */
+ kAVSFStampsLocale,
+
+ /** User navigators folder: Navigators created by the user are stored in this folder.
+
+ <p>Application navigators folder: Multi-lingual navigators that are shipped with the product. </p>
+ */
+ kAVSFNavigators,
+
+ /**Application navigators folder: Localized navigators that are shipped with the product.
+ Acrobat 9.0 supports only localized application navigators. Acrobat 9.1 supports both
+ localized and multi-lingual application navigators. Beyond Acrobat 9.1 we may choose to make
+ all application navigators multi-lingual (and if so will drop this constant).
+ */
+ kAVSFNavigatorsLocalized,
+
+ /** Application multimedia skins folder: Multimedia skins that are shipped with the product.</p>
+ */
+ kAVSFMultimediaSkins,
+
+ /** Often used to tag the end of an enumeration with a specific value. */
+ kAVSFLast
+} AVSpecialFolder;
+
+
+/**
+ Operation status codes for the special folder methods.
+ @see AVAcquireSpecialFilePathName
+ @see AVAcquireSpecialFolderPathName
+*/
+typedef enum {
+
+ /** No error. */
+ kAVSEOkay,
+
+ /** Invalid category/ folder combination. */
+ kAVSEInvalidCombination,
+
+ /** File or directory does not exist. */
+ kAVSEDoesntExist,
+
+ /** File system error: directory could not be created. */
+ kAVSECouldntCreate,
+
+ /** Some other generic error. */
+ kAVSEError
+} AVSpecialError;
+
+/*********************************************************
+ * AVConversionHandler definitions
+ *********************************************************/
+
+/* Default UniqueID's for conversion handlers */
+#define PDF_FILEFILTERREC_UNIQUEID "com.adobe.acrobat.pdf"
+#define FDF_FILEFILTERREC_UNIQUEID "com.adobe.acrobat.fdf"
+
+
+/**
+ The user-defined data that is supplied when a conversion
+ handler is registered with the conversion server. This data
+ is provided to all AVConversionHandler callbacks.
+ @see AVConversionDefaultSettingsProc
+ @see AVConversionParamDescProc
+ @see AVConversionSettingsDialogProc
+ @see AVConversionConvertFromPDFProc
+ @see AVConversionConvertToPDFProc
+*/
+typedef struct _t_AVConversionClientData *AVConversionClientData;
+
+/**
+ An enumerated list of flags that can be passed to AVConversionConvertTo/FromPDF to allow non-default behavior.
+*/
+enum {
+
+ /** No flags. */
+ kAVConversionNoFlags = 0,
+
+ /** Asynchronous conversion is allowed. */
+ kAVConversionAsyncOkay = 1 << 0,
+
+ /** Pop the settings dialog box, if one is provided for this conversion handler. */
+ kAVConversionPopSettingsDialog = 1 << 1,
+
+ /** Interactive mode. Indicates converter can pop additional dialog boxes if necessary. */
+ kAVConversionInteractive = 1 << 2,
+
+ /** Do not overwrite the existing files <i>except</i> for the source file. This flag is only used in batch mode. */
+ kAVConversionDontOverwrite = 1 << 3
+};
+typedef ASUns32 AVConversionFlags;
+
+
+/**
+ Enumerated data type used to describe the status of a conversion
+ operation.
+ @see ASFileSysGetItemPropsProc
+ @see ASFileSysFirstFolderItemProc
+ @see ASFileSysNextFolderItemProc
+ @see ASFileSysGetItemProps
+ @see ASFileSysFirstFolderItem
+ @see ASFileSysNextFolderItem
+*/
+enum {
+
+ /** The conversion failed. */
+ kAVConversionFailed,
+
+ /** The conversion succeeded. */
+ kAVConversionSuccess,
+
+ /** The conversion will continue asynchronously. */
+ kAVConversionSuccessAsync,
+
+ /** The conversion was cancelled. */
+ kAVConversionCancelled
+};
+typedef ASEnum16 AVConversionStatus;
+
+
+/**
+ Called to get the default settings for the conversion operation.
+
+ <p>It is the caller's responsibility to release the resources
+ associated with the returned ASCab. </p>
+ @param uniqueID IN/OUT A string that represents the filterDescription
+ parameter of the AVFileFilterRec for the conversion handler.
+
+ @param clientData IN/OUT The user-defined data that is provided
+ to all AVConversionHandler callbacks.
+ @return An ASCab containing the default settings for the conversion
+ operation, <code>NULL</code> to indicate none.
+*/
+typedef ACCBPROTO1 ASCab (ACCBPROTO2 *AVConversionDefaultSettingsProc)
+ (const char *uniqueID, AVConversionClientData clientData);
+
+
+/**
+ Called to obtain conversion parameter information.
+ @param settings IN/OUT A read-only ASCab containing the requested
+ parameters.
+ @param paramDesc IN/OUT (Filled by the callback) The parameter
+ descriptions (ASText objects) stored under numeric keys
+ starting with the key <code>" 1"</code>.
+ @example <code>key=" 1", value=" Title: API Reference"</code> (ASText object).
+ @param clientData IN/OUT The user-defined data that is provided
+ to all AVConversion callbacks.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVConversionParamDescProc)
+ (const ASCab settings, ASCab paramDesc, AVConversionClientData clientData);
+
+/**
+ Called to request the handler to display its settings dialog box,
+ if it has one. An ASCab containing conversion settings is
+ passed in to fill in the dialog box.
+
+ <p>The implementation should use these settings. Be sure to
+ use this cabinet of settings rather than defaults since
+ the batch framework may provide different settings. </p>
+
+ <p>If the user commits changes, the settings should be stored
+ in the ASCab that was provided. </p>
+
+ <p>For 'ConvertToPDF' handlers, two keys are present in the
+ settings ASCab: </p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Key</TH><TH>Description</TH></TR>
+ <TR><TD>ASPathName</TD><TD>The path to the input file.</TD></TR>
+ <TR><TD>ASFileSys</TD><TD>The associated file system.</TD></TR>
+ </TABLE>
+
+ <p>For 'ConvertFromPDF' handlers, three keys are present
+ in the settings ASCab: </p>
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Key</TH><TH>Description</TH></TR>
+ <TR><TD>PDDoc</TD><TD>The input PDDoc.</TD></TR>
+ <TR><TD>ASPathName</TD><TD>The output path.</TD></TR>
+ <TR><TD>ASFileSys</TD><TD>The associated file system.</TD></TR>
+ </TABLE>
+
+ @param settings The ASCab used to populate the dialog box.
+ @param clientData The user-defined data that is provided
+ to all AVConversion callbacks.
+ @return <code>true</code> to proceed with the conversion, <code>false</code> otherwise.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVConversionSettingsDialogProc)
+ (ASCab settings, AVConversionClientData clientData);
+
+
+/**
+ Called to convert a non-PDF file to a PDF file.
+ @param inSettings An ASCab containing the settings for the
+ conversion operation. It can be <code>NULL</code>. The implementation should
+ use these settings rather than defaults since the batch
+ framework may have provided custom settings.
+ @param flags Indicates any non-default behavior to apply
+ to the conversion. By default, conversions are synchronous,
+ non-interactive, and do not display a settings dialog box. The
+ conversion framework will automatically call your settings
+ dialog box if kAVConversionSyncPopSettingsDialog is set. Do
+ not pop your settings dialog box in your convert proc.
+ @param inPath The location of the input file.
+ @param inFileSys The file system from which path was obtained.
+ @param outPDDoc The output PDDoc. The implementation should
+ not clean up this PDDoc: Acrobat will do this.
+ @param statusMonitor Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>. If an error occurs during conversion, the implementation
+ should not raise or throw an error but instead report the
+ error using the <code>reportProc</code>, if it is available.
+ @param clientData The user-defined data that is provided
+ to all AVConversionHandler callbacks.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionConvertFromPDFProc
+ @see AVConversionConvertToPDFWithHandler
+*/
+typedef ACCBPROTO1 AVConversionStatus (ACCBPROTO2 *AVConversionConvertToPDFProc)(
+ ASCab inSettings,
+ AVConversionFlags flags,
+ ASPathName inPath,
+ ASFileSys inFileSys,
+ PDDoc *outPDDoc,
+ AVStatusMonitorProcs statusMonitor,
+ AVConversionClientData clientData);
+
+/**
+ Called to convert a non-PDF file to a PDF file.
+ @param inSettings IN/OUT An ASCab containing the settings for the conversion
+ operation. It can be <code>NULL</code>. The implementation should use these
+ settings rather than defaults since the batch framework may
+ have provided custom settings.
+ @param flags IN/OUT Bit flags for any non-default behavior to apply to the conversion.
+ By default, conversions are synchronous, non-interactive, and
+ do not display a settings dialog box. The conversion framework calls
+ your settings dialog box if
+ kAVConversionSyncPopSettingsDialog is set; this
+ procedure should not open the settings dialog box.
+ @param stream IN/OUT The input stream.
+ @param metaData IN/OUT An ASCab containing metadata about the input stream, such
+ as a key url containing the URL of HTML data. It can be <code>NULL</code>.
+ @param outPDDoc IN/OUT The output PDDoc. The implementation should not clean up
+ this PDDoc: Acrobat will do this.
+ @param statusMonitor IN/OUT Contains the progress monitor, cancel proc, and error reporting
+ proc to be used by the converter. It can be <code>NULL</code>. If an error
+ occurs during conversion, the implementation should not raise
+ or throw an error but instead report the error using the
+ <code>reportProc</code>, if it is available.
+ @param clientData IN/OUT The user-defined data that is provided to all
+ AVConversionHandler callbacks.
+*/
+typedef ACCBPROTO1 AVConversionStatus (ACCBPROTO2 *AVConversionConvertStreamToPDFProc)(
+ ASCab inSettings,
+ AVConversionFlags flags,
+ ASStm stream,
+ ASCab metaData,
+ PDDoc *outPDDoc,
+ AVStatusMonitorProcs statusMonitor,
+ AVConversionClientData clientData);
+
+/**
+ Called to convert a PDF file to another file format.
+ @param inSettings IN/OUT An ASCab containing the settings for the
+ conversion operation. It can be <code>NULL</code>. The implementation should
+ use these settings rather than defaults since the batch
+ framework may have provided custom settings.
+ @param flags IN/OUT Indicates any non-default behavior to apply
+ to the conversion. By default, conversions are synchronous,
+ non-interactive, and do not display a settings dialog box. The
+ conversion framework will automatically call your settings
+ dialog box if kAVConversionSyncPopSettingsDialog is set. Do
+ not pop your settings dialog box in your convert proc.
+ @param inPDDoc IN/OUT The document that is to be converted.
+ @param outPath IN/OUT The desired location for the output file.
+ @param outFileSys IN/OUT The file system from which path was obtained.
+ @param statusMonitor IN/OUT Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>. If an error occurs during conversion, the implementation
+ should not raise or throw an error but instead report the
+ error using the <code>reportProc</code>, if it is available. The report
+ proc member of the status monitor can be <code>NULL</code>, so developers
+ should check for that condition before calling it.
+ @param clientData IN/OUT The user-defined data that is provided
+ to all AVConversionHandler callbacks.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionConvertToPDFProc
+ @see AVConversionConvertFromPDFWithHandler
+*/
+typedef ACCBPROTO1 AVConversionStatus (ACCBPROTO2 *AVConversionConvertFromPDFProc)(
+ ASCab inSettings,
+ AVConversionFlags flags,
+ PDDoc inPDDoc,
+ ASPathName outPath,
+ ASFileSys outFileSys,
+ AVStatusMonitorProcs statusMonitor,
+ AVConversionClientData clientData);
+
+
+/**
+ Called to convert a PDF file to another file format. It must return an AVConversionStatus
+ indicating success, failure, or cancel.
+ @param inSettings IN/OUT An ASCab of settings which can be <code>NULL</code>. The converter must use these settings
+ rather than default ones since the Batch framework may have provided custom settings.
+ @param flags IN/OUT Indicates any non-default behavior to apply to the conversion. By default, conversions
+ are synchronous, non-interactive, and do not display a settings dialog box. The conversion framework
+ will automatically call your settings dialog box if kAVConversionSyncPopSettingsDialog is set. Do not
+ pop your settings dialog box in your convert proc.
+ @param inPDDoc IN/OUT The input PDDoc that will be converted.
+ @param stream IN/OUT An output ASStm.
+ @param metaData IN/OUT An empty ASCab in which metadata may be placed. For example, for HTML data, there might
+ be a key "url" which contains the URL of the HMTL data.
+ @param statusMonitor IN/OUT Contains the progress monitor, cancel proc, and error reporting proc that the
+ converter should use. This can be <code>NULL</code>. If an error occurs during conversion, the converter
+ should not raise or throw an error but instead report the error using the <code>reportProc</code>, if it is
+ available.
+ @param clientData IN/OUT provided to all AVConversionHandler callbacks.
+ @return One of the AVConversionStatus codes.
+*/
+typedef ACCBPROTO1 AVConversionStatus (ACCBPROTO2 *AVConversionConvertStreamFromPDFProc)(
+ ASCab inSettings,
+ AVConversionFlags flags,
+ PDDoc inPDDoc,
+ ASStm stream,
+ ASCab metaData,
+ AVStatusMonitorProcs statusMonitor,
+ AVConversionClientData clientData);
+
+/**
+ An opaque object representing a node in a document structure tree.
+ @see AVConversionConvertStreamFromStructNodeProc
+ @see AVConversionConvertStreamFromStructNodeWithHandler
+*/
+typedef struct _t_AVStructNode* AVStructNode;
+
+/**
+ Called to convert a structure subtree rooted at a given node to a stream.
+ @param inSettings An ASCab containing the settings for the conversion
+ operation. It can be <code>NULL</code>. The implementation should use these
+ settings rather than defaults since the batch framework may
+ have provided custom settings.
+ @param flags Bit flags for any non-default behavior to apply to the conversion.
+ By default, conversions are synchronous, non-interactive, and
+ do not display a settings dialog box. The conversion framework calls
+ your settings dialog box if
+ kAVConversionSyncPopSettingsDialog is set; this
+ procedure should not open the settings dialog box.
+ @param inStructNode The structure node to be converted.
+ @param stream The output stream.
+ @param metaData An ASCab containing metadata about the input stream, such
+ as a key url containing the URL of HTML data. It can be <code>NULL</code>.
+ @param statusMonitor Contains the progress monitor, cancel proc, and error reporting
+ proc to be used by the converter. It can be <code>NULL</code>. If an error
+ occurs during conversion, the implementation should not raise
+ or throw an error but instead report the error using the
+ <code>reportProc</code>, if it is available.
+ @param clientData The user-defined data that is provided to all AVConversionHandler callbacks.
+ @return AVConversionStatus indicating success, failure, or cancel.
+*/
+typedef ACCBPROTO1 AVConversionStatus (ACCBPROTO2 *AVConversionConvertStreamFromStructNodeProc)(
+ ASCab inSettings,
+ AVConversionFlags flags,
+ AVStructNode inStructNode,
+ ASStm stream,
+ ASCab metaData,
+ AVStatusMonitorProcs statusMonitor,
+ AVConversionClientData clientData);
+
+/**
+ A MIME-type string for PDF conversion.
+ @see AVConversionFromPDFHandler
+ @see AVConversionToPDFHandler
+ @see AVAppRegisterFromPDFHandler
+ @see AVAppRegisterToPDFHandler
+*/
+typedef char AVConversionMimeTypeString[256];
+
+
+/**
+ A data structure containing callbacks that implement the 'ToPDF'
+ handler's functionality and data that describes the handler's
+ conversion capabilities.
+ @see AVConversionToPDFEnumProc
+ @see AVAppRegisterToPDFHandler
+*/
+typedef struct _t_AVConversionToPDFHandler {
+
+ /** An AVFileFilterRec that describes the types of files that this filter can convert. See the descriptions
+ of AVFileFilterRec and AVFileDescRec for more details.
+ @see AVFileFilterRec
+ @see AVFileDescRec
+ */
+ AVFileFilterRec convFilter;
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVConversionFromPDFHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** A unique identifier for the conversion handler. It should be of the form <code>com.companyname.productname.type</code>.
+ See PDF_FILEFILTERREC_UNIQUEID and FDF_FILEFILTERREC_UNIQUEID in AVExpT.h.
+ */
+ char uniqueID[256];
+
+ /** <code>true</code> if the converter can perform synchronous conversion, <code>false</code> if the converter only does asynchronous
+ conversion. This capability is required for the handler to be accessible from the batch framework.
+ */
+ ASBool canDoSync;
+
+ /** Unused. Set to zero.
+ */
+ AVPriority priority;
+
+ /** An AVConversionDefaultSettingsProc() that is called when the handler is registered with the conversion
+ server. It can be <code>NULL</code>.
+ */
+ AVConversionDefaultSettingsProc defaultSettings;
+
+ /** An AVConversionParamDescProc() that is called when a parameter description of this handler is requested.
+ It can be <code>NULL</code>.
+ */
+ AVConversionParamDescProc parameterDescription;
+
+ /** An AVConversionSettingsDialogProc() that is called when the batch framework or the open dialog box requests
+ a settings dialog box for this handler. It can be <code>NULL</code>.
+ */
+ AVConversionSettingsDialogProc settingsDialog;
+
+ /** An AVConversionConvertToPDFProc() that is called to perform the conversion operation. */
+ AVConversionConvertToPDFProc convert;
+
+ /** Provided to all AVConversion callbacks. */
+ AVConversionClientData clientData;
+
+ /** Added with Acrobat 6. A string containing MIME types
+ that can be handled by the <code>convertStream</code> callback. */
+ AVConversionMimeTypeString *streamMimeTypes;
+
+ /** Added with Acrobat 6. The number of MIME types in
+ <code>streamMimeTypes</code>. */
+ AVArraySize numStreamMimeTypes;
+
+ /** Added with Acrobat 6. */
+ AVConversionConvertStreamToPDFProc convertStream;
+ /** Added with Acrobat 9. Unused. Set to zero*/
+ AVConversionClientData reserved;
+} AVConversionToPDFHandlerRec, *AVConversionToPDFHandler;
+
+/**
+ A data structure containing callbacks that implement the 'FromPDF'
+ handler's functionality and data that describes the handler's
+ conversion capabilities.
+ @see AVConversionFromPDFEnumProc
+ @see AVAppRegisterFromPDFHandler
+*/
+typedef struct _t_AVConversionFromPDFHandler {
+
+ /** An AVFileFilterRec that describes the types of files that this filter can convert. See the descriptions
+ of AVFileFilterRec and AVFileDescRec for more details.
+ @see AVFileFilterRec
+ @see AVFileDescRec
+ */
+ AVFileFilterRec convFilter;
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVConversionFromPDFHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** A unique identifier for the conversion handler. It should be of the form <code>com.companyname.productname.type</code>.
+ See PDF_FILEFILTERREC_UNIQUEID and FDF_FILEFILTERREC_UNIQUEID in AVExpT.h.
+ */
+ char uniqueID[256];
+
+ /** <code>true</code> if the converter can perform synchronous conversion, <code>false</code> if the converter only does asynchronous
+ conversion. This capability is required for the handler to be accessible from the batch framework.
+ */
+ ASBool canDoSync;
+
+ /** Unused. Set to zero.
+ */
+ AVPriority priority;
+
+ /** An AVConversionDefaultSettingsProc() that is called when the handler is registered with the conversion
+ server. It can be <code>NULL</code>.
+ */
+ AVConversionDefaultSettingsProc defaultSettings;
+
+ /** An AVConversionParamDescProc() that is called when a parameter description of this handler is
+ requested. It can be <code>NULL</code>.
+ */
+ AVConversionParamDescProc parameterDescription;
+
+ /** An AVConversionSettingsDialogProc() that is called when the batch framework or the open dialog box requests
+ a settings dialog box for this handler. It can be <code>NULL</code>.
+ */
+ AVConversionSettingsDialogProc settingsDialog;
+
+ /** An AVConversionConvertFromPDFProc() that is called to perform the conversion operation. */
+ AVConversionConvertFromPDFProc convert;
+
+ /** Provided to all AVConversion callbacks. */
+ AVConversionClientData clientData;
+
+ /** Added with Acrobat 6.0. It is a string containing MIME types
+ that can be handled by the <code>convertStream</code> callback. */
+ AVConversionMimeTypeString *streamMimeTypes;
+
+ /** Added with Acrobat 6. It is the number of MIME types in
+ <code>streamMimeTypes</code>. */
+ AVArraySize numStreamMimeTypes;
+
+ /** Added with Acrobat 6. The stream-conversion handler procedure. */
+ AVConversionConvertStreamFromPDFProc convertStream;
+
+ /** Added with Acrobat 6. The structure-node-to-stream
+ conversion handler procedure. */
+ AVConversionConvertStreamFromStructNodeProc convertStructNode;
+} AVConversionFromPDFHandlerRec, *AVConversionFromPDFHandler;
+
+
+/**
+ The user-defined data that is supplied to either of the
+ conversion handler enumeration routines.
+ @see AVConversionFromPDFEnumProc
+ @see AVConversionToPDFEnumProc
+ @see AVConversionEnumFromPDFConverters
+ @see AVConversionEnumToPDFConverters
+*/
+typedef struct _t_AVConversionEnumProcData *AVConversionEnumProcData;
+
+/**
+ Called once for each AVConversionToPDFHandler registered
+ with Acrobat, or until the callback returns <code>false</code> to halt
+ the enumeration.
+ @param handler IN/OUT The AVConversionToPDFHandler.
+ @param data IN/OUT User-defined data passed to the call to AVConversionEnumToPDFConverters().
+
+ @return <code>true</code> to continue the enumeration, <code>false</code> otherwise.
+ @see AVConversionFromPDFEnumProc
+ @see AVConversionEnumToPDFConverters
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVConversionToPDFEnumProc)(AVConversionToPDFHandler handler, AVConversionEnumProcData data);
+
+/**
+ Called once for each AVConversionFromPDFHandler registered
+ with Acrobat, or until the callback returns <code>false</code> to halt
+ the enumeration.
+ @param handler IN/OUT The AVConversionFromPDFHandler.
+ @param data IN/OUT User-defined data passed to the call to AVConversionEnumFromPDFConverters.()
+
+ @return <code>true</code> to continue the enumeration, <code>false</code> otherwise.
+ @see AVConversionToPDFEnumProc
+ @see AVConversionEnumFromPDFConverters
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVConversionFromPDFEnumProc)(AVConversionFromPDFHandler handler, AVConversionEnumProcData data);
+
+/*********************************************************
+ * AVIdentity definitions
+ *********************************************************/
+
+/**
+ An enumerated data type used to identify the properties of
+ a user's identity.
+ @see AVIdentityGetText
+ @see AVIdentitySetText
+*/
+typedef enum {
+
+ /** */
+ kAVILoginName,
+
+ /** */
+ kAVIName,
+
+ /** */
+ kAVICorporation,
+
+ /** */
+ kAVIEMail,
+
+ /** */
+ kAVIDepartment,
+
+ /** */
+ kAVITitle,
+
+ /** */
+ kAVIFirstName,
+
+ /** */
+ kAVILastName,
+
+ /** */
+ kAVICorporationAbbr,
+
+ /** */
+ kAVILast
+} AVIdentity;
+
+/*********************************************************
+ * AVCommand definitions
+ *********************************************************/
+
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyASFileSys "ASFileSys"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyASPathName "ASPathName"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyPDDoc "PDDoc"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyAVDoc "AVDoc"
+
+/** If possible, use kAVCommandKeyBaseFileNameASText instead.
+ @ingroup AVCommandStringConstants
+*/
+#define kAVCommandKeyBaseFileName "BaseFileName"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyBaseFileNameASText "BaseFileNameASText"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyOrigExtension "OrigExtension"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyGenericTitle "GenericTitle"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyTitle "Title"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyParams "Params"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyParamsDesc "ParamsDesc"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyCanDescribeParams "CanDescribeParams"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyCanBatch "CanBatch"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyCanShowDialog "CanShowDialog"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyGroupTitle "GroupTitle"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyIsStatus "IsStatus"
+
+/** @ingroup AVCommandStringConstants */
+#define kAVCommandKeyFireWhenModal "FireWhenModal"
+
+/**
+ An enumerated list of status codes that can be returned
+ by various AVCommand methods.
+ @see AVCommandGetStatus
+*/
+enum {
+
+ /** Not working, but ready to work. */
+ kAVCommandReady,
+
+ /** Still working. */
+ kAVCommandWorking,
+
+ /** Done working. */
+ kAVCommandDone,
+
+ /** Cancelled. */
+ kAVCommandCanceled,
+
+ /** In error. */
+ kAVCommandInError,
+
+ /** Cancelled in favor of running this command (with the current parameters) in a sequence of multiple files. */
+ kAVCommandCanceledForMultiple,
+
+ /** Command not executed due to lack of objects on which the command to be executed. */
+ kAVCommandNotExecuted
+};
+typedef ASEnum16 AVCommandStatus;
+
+
+/**
+ An enumeration detailing how the command is expected to
+ interact with the user.
+ @see AVCommandGetUIPolicy
+*/
+enum {
+ /** Fully interactive. Gather parameters based on the currently active document at the time
+ the dialog box is displayed. Display errors and warnings.
+ */
+ kAVCommandUIInteractive = 0,
+
+ /** Interactive but under the control of the sequencing user interface. When showing
+ a dialog box, use the parameters passed in, rather than the parameters gathered from the document.
+ */
+ kAVCommandUISemiInteractive = 1,
+
+ /** Display errors but no other dialog boxes. */
+ kAVCommandUIErrorsOnly = 2,
+
+ /** Never display a dialog box. */
+ kAVCommandUISilent = 3
+};
+typedef ASEnum16 AVCommandUIPolicy;
+
+
+/** An AVCommand represents an action that the user can perform on the
+ current document or the current selection in the current document.
+ Specifically, an AVCommand represents a command which can be added
+ to a command sequence and executed either interactively or via
+ batch processing.
+*/
+typedef struct _t_AVCommandRec *AVCommand;
+
+
+/**
+ Initialize the command handler. It is called once for each command
+ handler registered.
+ @param handlerName IN/OUT The name of the command handler.
+ @return <code>true</code> if initialization succeeds, <code>false</code> otherwise.
+ @see AVCmdHandlerTermProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVCmdHandlerInitProc)
+ (ASAtom handlerName);
+
+
+/**
+ Terminate the handler. It is called once for each handler registered
+ when Acrobat shuts down. It is called before clients are unloaded.
+
+ @param handlerName The name of the handler being terminated.
+ @see AVCmdHandlerInitProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVCmdHandlerTermProc)
+ (ASAtom handlerName);
+
+/**
+ A callback for AVCommandHandlerRec. The application maintains
+ a global list of commands that the user can choose from
+ when building a batch sequence. During the initialization
+ sequence, all registered command handlers are asked to build
+ and register all the commands that the handler wants to include
+ in the global command list. This is done by calling the
+ command handler's <code>RegisterCommands</code> callback, if it is not
+ <code>NULL</code>.
+ @param handlerName IN/OUT The name of the command handler.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVRegisterCommandsProc)
+ (ASAtom handlerName);
+
+/**
+ Called after a command is created. The command handler can
+ establish default parameters and so forth for the newly
+ created command.
+ @param cmd IN/OUT The command that was created.
+ @see AVCommandDestroyProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVCommandCreatedProc)
+ (AVCommand cmd);
+
+/**
+ Called before a command is destroyed. The command handler
+ should free any memory allocated by the command.
+ @param cmd IN/OUT The command being destroyed.
+ @see AVCommandCreatedProc
+ @see AVCommandDestroy
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVCommandDestroyProc)
+ (AVCommand cmd);
+
+/**
+ Called to set a cabinet within a command. It is used in the <code>SetParams</code>
+ member of the AVCommandHandlerRec structure. The command
+ handler should copy any information from the cabinet into
+ the command. It must not destroy or modify the cabinet.
+
+ @param cmd IN/OUT The command.
+ @param cab IN/OUT The cabinet to store.
+ @return One of the AVCommandStatus codes.
+ @see AVCommandResetProc
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandSetProc)
+ (AVCommand cmd, ASCab cab);
+
+/**
+ Retrieves a cabinet from a command. It is used in the
+ <code>GetParams</code> and <code>GetProps</code> members of the AVCommandHandlerRec
+ structure. When retrieving command parameters, the handler
+ should first remove any existing items from <code>theCab</code> using
+ ASCabMakeEmpty(), and then copy all parameter values from the
+ command into <code>theCab</code>. When retrieving properties, the command
+ handler should replace any entries in <code>theCab</code> with key names
+ it recognizes with copies of the command-specific properties.
+ @param cmd IN/OUT The command whose procedure is being retrieved.
+ @param theCab IN/OUT (Filled by the callback) The appropriate
+ command cabinet.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVCommandGetProc)
+ (AVCommand cmd, ASCab theCab);
+
+/**
+ Displays the command's parameter setting dialog box and allows
+ the user to alter the parameters.
+ @param cmd The command whose parameter setting dialog box
+ is displayed.
+ @return One of the AVCommandStatus codes.
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandShowDialogProc)
+ (AVCommand cmd);
+
+
+/**
+ Do some work. If it does not finish its work, return kAVCommandWorking.
+ If it does finish its work, return kAVCommandDone. If the
+ user cancels the operation, return kAVCommandCanceled. If
+ an error occurs, return kAVCommandInError.
+
+ <p>In most cases this method performs its work until it returns
+ kAVCommandDone, but in some cases it may be called on to
+ cancel or reset before its work is done.</p>
+ @param cmd IN/OUT The command doing some work.
+ @return One of the AVCommandStatus codes.
+ @see AVCommandWork
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandWorkProc)
+ (AVCommand cmd);
+
+/**
+ Stop working and clean up as though the command executed
+ to completion.
+ @param cmd IN/OUT The command being cancelled.
+ @return One of the AVCommandStatus codes.
+ @see AVCommandGetCancelProc
+ @see AVCommandCancel
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandCancelProc)
+ (AVCommand cmd);
+
+/**
+ Stops working, clears any errors, and tries to get back into
+ a Ready state. For many commands this is equivalent to cancelling.
+
+ @param cmd IN/OUT The command being reset.
+ @return One of the AVCommandStatus codes.
+ @see AVCommandSetProc
+ @see AVCommandReset
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandResetProc)
+ (AVCommand cmd);
+
+/**
+ Every command in a sequence has its <code>Preflight</code> callback
+ called before the sequence is executed. If any of the <code>Preflight</code>
+ callbacks returns an error, the sequence is aborted.
+
+ <p>Preflights and Postflights are good for getting user data
+ or preparing the command at the beginning of the sequence.
+ For example, you could use the Preflight to ask what password
+ the 'Add Security' command should use. This is important
+ since you only want to ask once (not for every file), and
+ you do not want to store the password in the sequence file
+ (or the command's persistent parameters).</p>
+
+ <ul>
+ <li>Sequence Begins </li>
+ <li>AVCommandPreflightSequenceProc() for all commands are called </li>
+ <li>Open File # 1 </li>
+ <li>AVCommandPreflightFileProcs() for all commands are called </li>
+ <li>Execute all commands on given file </li>
+ <li>AVCommandPostflightFileProcs for all commands are called </li>
+ <li>Close File # 1 </li>
+ <li>Open File # 2 </li>
+ <li>... (repeat pre/post file procs) </li>
+ <li>Close last file </li>
+ <li>AVCommandPostflightSequenceProcs for all commands are called. </li>
+ <li>Sequence ends </li>
+ </ul>
+
+ @param cmd IN/OUT The command.
+ @return One of the AVCommandStatus codes.
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandPreflightSequenceProc)
+ (AVCommand cmd);
+
+
+/**
+ Every command in a sequence has its <code>Preflight</code> callback
+ called after each file has been opened to be processed but
+ before any commands have been executed on that file. If
+ any of the <code>Preflight</code> callbacks returns an error, the sequence
+ is aborted.
+
+ <p>Preflights and Postflights are good for getting user data
+ or preparing the command at the beginning of the sequence.
+ For example, you could use the Preflight to ask what password
+ the 'Add Security' command should use. This is important
+ since you only want to ask once (not for every file), and
+ you do not want to store the password in the sequence file
+ (or the command's persistent parameters).</p>
+
+ <p>See AVCommandPreflightSequenceProc() for the order in which
+ the AVCommand Pre/Postflight callbacks are called. </p>
+ @param cmd The command.
+ @param doc The PDDoc.
+ @return One of the AVCommandStatus codes.
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandPreflightFileProc)
+ (AVCommand cmd, PDDoc doc);
+
+
+/**
+ Every command in a sequence has its <code>Postflight</code> command
+ callback called after all commands in a given sequence have
+ been executed but before the file is closed.
+
+ <p>Preflights and Postflights are good for getting user data
+ or preparing the command at the beginning of the sequence.
+ For example, you could use the Preflight to ask what password
+ the 'Add Security' command should use. This is important
+ since you only want to ask once (not for every file), and
+ you do not want to store the password in the sequence file
+ (or the command's persistent parameters).</p>
+
+ <p>See AVCommandPreflightSequenceProc() for the order in which
+ the AVCommand Pre/Postflight callbacks are called. </p>
+ @param cmd The command.
+ @param doc The PDDoc.
+ @return One of the AVCommandStatus codes.
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandPostflightFileProc)
+ (AVCommand cmd, PDDoc doc);
+
+
+/**
+ Every command in a sequence has its <code>Postflight</code> command
+ callback called after the sequence is executed.
+
+ <p>Preflights and Postflights are good for getting user data
+ or preparing the command at the beginning of the sequence.
+ For example, you could use the Preflight to ask what password
+ the 'Add Security' command should use. This is important
+ since you only want to ask once (not for every file), and
+ you do not want to store the password in the sequence file
+ (or the command's persistent parameters).</p>
+
+ <p>See AVCommandPreflightSequenceProc() for the order in which
+ the AVCommand Pre/Postflight callbacks are called. </p>
+ @param cmd The command.
+ @return One of the AVCommandStatus codes.
+*/
+typedef ACCBPROTO1 AVCommandStatus (ACCBPROTO2 *AVCommandPostflightSequenceProc)
+ (AVCommand cmd);
+
+/**
+ A set of callbacks that perform the actions required of
+ a command.
+*/
+typedef struct _t_AVCommandHandler
+{
+
+ /** The size of the structure. Set it to <code>sizeof(AVCommandHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** Called once for each handler registered. */
+ AVCmdHandlerInitProc Initialize;
+
+ /** Called once for each handler registered when Acrobat shuts down. It is called before plug-ins are unloaded */
+ AVCmdHandlerTermProc Terminate;
+
+ /** The application maintains a global list of commands that you can choose from when building
+ your own command. During the initialization sequence, all registered command handlers are asked
+ to build and register all the commands that the handler wants to include in the global command list.
+ */
+ AVRegisterCommandsProc RegisterCommands;
+
+ /** Called after a command is created. The command handler can establish default parameters and so forth
+ for the newly created command.
+ */
+ AVCommandCreatedProc Created;
+
+ /** Called before a command is destroyed. The command handler should free any memory allocated by the
+ command, and so on.
+ */
+ AVCommandDestroyProc Destroy;
+
+ /** Called to set the command's parameters. */
+ AVCommandSetProc SetParams;
+
+ /** Called to retrieve the command's parameters. */
+ AVCommandGetProc GetParams;
+
+ /** Called to retrieve command properties. */
+ AVCommandGetProc GetProps;
+
+ /** Displays the command's parameter setting dialog box and allows the user to alter the parameters. */
+ AVCommandShowDialogProc ShowDialog;
+
+ /** Do some work. If the command does not finish the work, return kAVCommandWorking. If the command
+ finishes the work, return kAVCommandDone. If the user cancels the operation, return
+ kAVCommandCanceled. If an error occurs, return kAVCommandInError. In most cases the work procedure
+ will be called until you return kAVCommandDone, but in some cases, you may be called upon to Cancel or
+ Reset before the work is done.
+ */
+ AVCommandWorkProc Work;
+
+ /** Stop working and pretend it reached a point where all work was done. */
+ AVCommandCancelProc Cancel;
+
+ /** Stop working, clear any errors, and try to get back into a ready state. For many commands
+ this is equivalent to cancelling.
+ */
+ AVCommandResetProc Reset;
+
+
+ /** See the sequence description in the callback reference. */
+ AVCommandPreflightSequenceProc PreflightSequence;
+
+
+ /** See the sequence description in the callback reference. */
+ AVCommandPreflightFileProc PreflightFile;
+
+
+ /** See the sequence description in the callback reference. */
+ AVCommandPostflightFileProc PostflightFile;
+
+
+ /** See the sequence description in the callback reference. */
+ AVCommandPostflightSequenceProc PostflightSequence;
+
+ /** Reserved for internal use. It must be <code>NULL</code>. */
+ void *reserved;
+} AVCommandHandlerRec;
+typedef AVCommandHandlerRec *AVCommandHandler;
+
+
+/**
+ Enumerates the commands for moving and changing the size
+ of a rectangle.
+ @see AVRectHandleHitTest
+*/
+enum {
+
+ /** Move the whole rectangle. */
+ kAVDragRect,
+
+ /** Top left corner. */
+ kAVDragTopLeft,
+
+ /** Top right corner. */
+ kAVDragTopRight,
+
+ /** Bottom right corner. */
+ kAVDragBottomRight,
+
+ /** Bottom left corner. */
+ kAVDragBottomLeft,
+
+ /** Top middle. */
+ kAVDragTopMiddle,
+
+ /** Right middle. */
+ kAVDragRightMiddle,
+
+ /** Bottom middle. */
+ kAVDragBottomMiddle,
+
+ /** Left middle. */
+ kAVDragLeftMiddle,
+
+ /** Snap to top left. */
+ kAVDragSnapToTopLeft,
+
+ /** Snap to top. */
+ kAVDragSnapToTop,
+
+ /** Snap to top right. */
+ kAVDragSnapToTopRight,
+
+ /** Snap to right. */
+ kAVDragSnapToRight,
+
+ /** Snap to bottom right. */
+ kAVDragSnapToBottomRight,
+
+ /** Snap to bottom. */
+ kAVDragSnapToBottom,
+
+ /** Snap to bottom left. */
+ kAVDragSnapToBottomLeft,
+
+ /** Snap to left. */
+ kAVDragSnapToLeft
+};
+typedef ASEnum8 AVDragType;
+
+
+/**
+ An enumerated list of the types of AVRect handles.
+*/
+enum {
+
+ /** No handle. */
+ kAVRectHandleNone,
+
+ /** Top left. */
+ kAVRectHandleTopLeft,
+
+ /** Top right. */
+ kAVRectHandleTopRight,
+
+ /** Bottom right. */
+ kAVRectHandleBottomRight,
+
+ /** Bottom left. */
+ kAVRectHandleBottomLeft,
+
+ /** Top middle. */
+ kAVRectHandleTopMiddle,
+
+ /** Right middle. */
+ kAVRectHandleRightMiddle,
+
+ /** Bottom middle. */
+ kAVRectHandleBottomMiddle,
+
+ /** Left middle. */
+ kAVRectHandleLeftMiddle
+};
+typedef ASEnum8 AVRectHandleType;
+
+
+/**
+ The parameters for AVPageViewDragRectSnappedEx(), which supersedes
+ AVPageViewDragRectSnapped() in Acrobat 6.0. In addition to
+ the parameters allowed by the earlier method, the new version
+ allows you to specify your own drawing procedure.
+*/
+typedef struct _t_AVDragRectParams {
+
+ /** Set by the caller to <code>sizeof(AVDragRectParamsRec)</code>. */
+ ASSize_t size;
+
+ /** The page view where the drag occurs. */
+ AVPageView pageView;
+
+ /** The starting x-coordinate in device space. */
+ ASInt32 xStart;
+
+ /** The starting y-coordinate in device space. */
+ ASInt32 yStart;
+
+ /** The initial rect in page space. */
+ ASFixedRect *startRect;
+
+ /** The resulting rect in page space. */
+ ASFixedRect *resultRect;
+
+ /** The desired drag type, which is typically the result of AVRectHandleHitTest(). */
+ AVDragType dragType;
+
+ /** The device-space drag bounds. */
+ AVDevRect *extrema;
+
+ /** Pass <code>NULL</code> for default cursors. */
+ AVCursor *cursorArray;
+
+ /** The number of cursors in <code>cursorArray</code>. */
+ ASInt32 nCursors;
+
+ /** Pass <code>NULL</code> for the default Acrobat proc. */
+ AVPageViewDrawProc drawProc;
+
+ /** The device space minimum rectangle. This rectangle is used as a lower
+ bound during a resize operation. The exact position of the rectangle is
+ not important. The rectangles <code>[0,0,10,20]</code> and <code>[100,100,110,120]</code> are considered
+ identical since they have the same width and height. */
+ AVDevRect *minRect;
+
+} AVDragRectParamsRec, *AVDragRectParams;
+
+
+/* Definitions for Accessibility */
+
+/**
+ Definitions specifying the manner in which the background
+ and text colors are chosen when viewing a document.
+ @see AVAppSetPreference
+*/
+enum {
+
+ /** Use the colors specified within the document. */
+ kAVAccessUseDocumentColors,
+
+ /** Use the colors specified by the operating system preferences. */
+ kAVAccessUseSystemColors,
+
+ /** Use the colors specified by the Acrobat preferences. */
+ kAVAccessUsePreferenceColors,
+
+ /** */
+ kAVAccessForceSystemColors,
+
+ /** Use accessible high-contrast colors. **/
+ kAVAccessUseHiContGreenBlack,
+ kAVAccessUseHiContYellowBlack,
+ kAVAccessUseHiContWhiteBlack,
+ kAVAccessUseHiContBlackWhite
+
+};
+typedef ASEnum8 AVAccessColorPolicy;
+
+
+/** Content reading orders used for accessibility support.
+ kAVAccessInferredReadOrder, kAVAccessTBLRReadOrder, and kAVAccessWordyReadOrder
+ can be used as values for the Reading Order preference. kAVAccessTaggedReadOrder
+ and kAVAccessUndefinedReadOrder are used internally for managing the states of
+ documents. */
+enum {
+
+ /** Run MakeAccessible to generate a temporary structure. */
+ kAVAccessInferredReadOrder,
+
+ /** Use Wordy's Top-to-Bottom, Left-to-Right order. */
+ kAVAccessTBLRReadOrder,
+
+ /** Use Wordy's Print Stream order. */
+ kAVAccessWordyReadOrder,
+
+ /** Use the structure tree. */
+ kAVAccessTaggedReadOrder,
+
+ /** The reading order is undetermined. */
+ kAVAccessUndefinedReadOrder
+};
+typedef ASEnum8 AVAccessReadOrder;
+
+
+/**
+ An enumerated list of toolbar positions for registering
+ the preferred position of a toolbar.
+ @see AVAppRegisterToolBarPosition
+*/
+enum {
+
+ /** */
+ kAVToolBarDockTop,
+
+ /** */
+ kAVToolBarDockBottom,
+
+ /** */
+ kAVToolBarDockLeft,
+
+ /** */
+ kAVToolBarDockRight,
+
+ /** */
+ kAVToolBarFloating
+};
+typedef ASEnum8 AVToolBarDockPosition;
+
+
+/**
+ An enumerated list of toolbar layouts.
+ @see AVAppRegisterToolBarPosition
+*/
+enum {
+
+ /** */
+ kAVToolBarHorizontal,
+
+ /** */
+ kAVToolBarVertical,
+
+ /** */
+ kAVToolBarTwoColumn
+};
+typedef ASEnum8 AVToolBarLayout;
+
+#if (ACRO_SDK_LEVEL >= 0x00060000)
+/**
+ A structure that describes the position of a toolbar.
+ @see AVAppRegisterToolBarPosition
+
+*/
+typedef struct _t_AVToolBarPosition {
+
+ /** The size of this structure. Set it to <code>sizeof(AVToolBarPositionRec)</code>. */
+ ASSize_t size;
+
+ /** Specifies that the toolbar is to be <i>in-doc</i> (not shared). If <code>inDoc</code> is <code>true</code>, <code>dockPosition</code> cannot be floating. */
+ ASBool inDoc;
+
+ /** The edge of the document window or monitor to which to attach this toolbar. */
+ AVToolBarDockPosition dockPosition;
+
+ /** If the toolbar is to be floating, you can group it with another toolbar by specifying a name
+ for the floating window. You can set this to a constant string.
+ */
+ const char *floatingWindowName;
+
+ /** The stack on which to insert the toolbar. Make this <code>-1</code> to open a new stack on the left or top, or ASMAXInt32
+ to open a new stack on the right or bottom.
+ */
+ ASInt32 stackNum;
+
+ /** The number of pixels from the top or left edge of the stack from which to position the toolbar. If
+ ASMAXInt32, the toolbar will be positioned snugly behind other toolbars on the stack. If <code>-1</code>, it will
+ be positioned at the front.
+ */
+ ASInt32 offset;
+
+ /** If multiple positions specify an offset of <code>-1</code> or ASMAXInt32, this field is used to further order them.
+ It controls the order in which the bars will be placed, not the visual order on the screen. If, for example,
+ two bars have an offset of <code>-1</code>, the one associated with the value in the lower order field will be
+ positioned first at the front of the bar. Then the one associated by the value in the higher order field
+ will also be positioned at the front of the bar, but will push the first one to the right.
+ */
+ ASInt32 order;
+
+ /** If the toolbar is not <code>inDoc</code> and <code>dockPosition</code> is floating, you may end up creating a new window. Here is its frame. */
+ AVScreenRect windowFrame;
+
+ /** If a new window is called for, here is its layout. */
+ AVToolBarLayout layout;
+
+ /** Set this to <code>true</code> if the toolbar should be hidden by default. */
+ ASBool hidden;
+
+ /** Set this to <code>true</code> if the floating window in which the toolbar is located should be hidden by default. */
+ ASBool windowHidden;
+
+} AVToolBarPositionRec, *AVToolBarPosition;
+#endif
+
+
+/**
+ Describes the preferred monitor to use when going full-screen
+ on a multi-monitor system.
+*/
+enum {
+
+ /** Use the monitor with the largest intersection. */
+ kAVFullScreenLargestIntersection,
+
+ /** Use the monitor with the most colors. */
+ kAVFullScreenMostColors,
+
+ /** Use the monitor with the widest screen. */
+ kAVFullScreenWidest,
+
+ /** Use the monitor with the tallest screen. */
+ kAVFullScreenTallest,
+
+ /** Use the monitor with the largest screen. */
+ kAVFullScreenLargest,
+
+ /** Use the monitor with the main screen. */
+ kAVFullScreenMain,
+
+ /** Enum terminator.*/
+ kAVFullScreen_END_ENUM
+};
+typedef ASEnum8 AVFullScreenMonitor;
+
+
+/**
+ A data structure containing information about a client loaded
+ by the viewer.
+ @see AVExtensionAcquireInfo
+ @see AVExtensionReleaseInfo
+
+ @note For third-party (non-Adobe) clients, only <code>asaName</code>,
+ <code>bLoaded</code>, and <code>bCertified</code> are valid.
+*/
+typedef struct _AVExtensionInfoRec {
+
+ /** The registered name of the plug-in. */
+ ASAtom asaName;
+
+ /** Always <code>true</code>, indicating that the plug-in was loaded. */
+ ASBool bLoaded;
+
+ /** <code>true</code> if the plug-in is certified, <code>false</code> otherwise. */
+ ASBool bCertified;
+
+ /** The major and minor versions of the plug-in. */
+ AVVersionNumPart nMajorVersion, nMinorVersion;
+
+ /** The creation timestamp on the plug-in. */
+ char *cDate;
+
+ /** The path to the plug-in. */
+ ASPathName aspFile;
+
+ /** A description of the plug-in. It may be <code>NULL</code>. */
+ char *cDescription;
+
+ /** The legal text associated with the plug-in. It may be <code>NULL</code>. */
+ char *cLegal;
+
+ /** The dependencies of the plug-in. */
+ char *cDependencies;
+} AVExtensionInfoRec, *AVExtensionInfo;
+
+
+/**
+ Constants for use with AVPageViewUpdateInfoPanel().
+ @see AVPageViewUpdateInfoPanel
+*/
+enum {
+
+ /** The plug-in is assuming control over the output of the info panel. */
+ kAVInfoPanelLock,
+
+ /** The plug-in is transferring control back to Acrobat to update the info panel. */
+ kAVInfoPanelUnlock,
+
+ /** The plug-in is passing the values that should be displayed in the info panel to Acrobat. */
+ kAVInfoPanelRect
+};
+typedef ASEnum8 AVInfoPanelUpdateType;
+
+/*********************************************************
+ * AVBatch definitions
+ *********************************************************/
+
+#ifndef _T_AVBATCHCONTEXT
+#define _T_AVBATCHCONTEXT
+
+/**
+ Placeholder only. Not currently implemented.
+*/
+typedef struct _t_AVBatchContext *AVBatchContext;
+
+#endif /* _T_AVBATCHCONTEXT */
+
+/** For use with AVAppGetUUID(). */
+enum
+{
+
+ /** The UUID for this user <i>for this install</i>. */
+ kAVAppUserUUID,
+
+ /** The UUID for the currently executing session. */
+ kAVAppSessionUUID
+};
+typedef ASEnum8 AVAppUUIDType;
+
+
+/** Icon types for AVSysGetIconFromFilename() and so on. */
+enum
+{
+
+ /** */
+ kAVSysSmallIcon,
+
+ /** */
+ kAVSysLargeIcon,
+
+ /** */
+ kAVSysHugeIcon
+};
+typedef ASEnum8 AVSysIconType;
+
+#include "AVExpTObsolete2.h" //types for old versions of Acrobat
+
+/*******************************************************************************
+ * AVSimpleSelProcs definitions - Simple Selection Server for PDFindSupport API
+ *******************************************************************************/
+
+#define AVSIMPLESEL_TYPE "SimpleSelectHub"
+/* AVSIMPLESEL_TYPE is the main selection type of the Simple Selection Servers that
+ are registered by AVRegisterSimpleHiliteProc(). This selection type should be
+ used in AVDocSetSelection() to identify the selection should be handled by the
+ Simple Selection Server. The actual (selection) object type is deteremined by
+ the client selection type stored in the AVSimpleSelObj and a corresponding hilite
+ function is called by the Simple Selection Server.
+ Example:
+ void HiliteMyObject(AVDoc doc, MyObject data)
+ {
+ AVSimpleSelObj selObject;
+ selObject = AVSimpleSelObjCreate(ASAtomFromString("ABCD_MySelType"), &data, sizeof(data));
+ AVDocSetSelection(doc, ASAtomFromString(AVSIMPLESEL_TYPE), selObject, <code>true</code>);
+ AVDocShowSelection(doc);
+ }
+*/
+/** */
+typedef struct _t_AVSimpleSelObj *AVSimpleSelObj;
+
+/* Callback functions for text highlight, de-highlight, and destroy selection object. */
+/** */
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVSimpleSelHiliteProc)(AVSimpleSelObj selObj, AVDoc doc);
+/** */
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVSimpleSelDeHiliteProc)(AVSimpleSelObj selObj, AVDoc doc);
+/** */
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVSimpleSelDataDestroyProc)(AVSimpleSelObj selObj);
+
+/** */
+typedef struct _t_AVSimpleSelProcs {
+ /** Set to <code>sizeof(AVSimpleSelProcsRec)</code>. */
+ ASSize_t size;
+ /** The sub-selection type. */
+ char *type;
+ /** */
+ AVSimpleSelHiliteProc hiliteProc;
+ /** */
+ AVSimpleSelDeHiliteProc deHiliteProc;
+ /** */
+ AVSimpleSelDataDestroyProc destroyProc;
+} AVSimpleSelProcsRec, *AVSimpleSelProcs;
+
+/************************************************************************************\
+|* *|
+|* AVStatusItem *|
+|* *|
+\************************************************************************************/
+/** */
+typedef struct _t_AVStatusItem *AVStatusItem;
+
+/************************************************************************************\
+|* *|
+|* Undo *|
+|* *|
+\************************************************************************************/
+/* Undo/redo stuff */
+/** An opaque data type to be used with <code>AVUndo</code> APIs. */
+typedef struct _t_AVUndo *AVUndo;
+
+/**
+ Private data for use by callbacks in the AVUndoHandler.
+
+ @see AVUndoGetData
+ @see AVUndoNew
+ @see AVUndoSetData
+*/
+typedef void* AVUndoHandlerData;
+
+/**
+ A callback for AVUndoHandler. It is called when the user initiates
+ an Undo or Redo command. Use this to verify that the undo
+ record is still valid and the operation can be performed.
+
+ @param undo The undo record.
+ @return <code>true</code> if the operation can be performed, <code>false</code> otherwise.
+ @see AVUndoExecuteProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVUndoVerifyProc)
+ (AVUndo undo);
+
+/**
+ A callback for AVUndoHandler. It is called when the undo object
+ is no longer needed. Use this to free any dynamic data that
+ was associated with the object by the handler.
+ @param undo The undo record.
+ @see AVDocClearUndos
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVUndoReleaseProc)
+ (AVUndo undo);
+
+/* Performs the AVUndo. */
+/** A callback for AVUndoHandler. It is called when the user initiates an Undo or Redo command
+ and the AVUndoVerifyProc returns <code>true</code>. Use this to perform the requested operation.
+ @param undo IN/OUT The undo record.
+ @return <code>true</code> if the requested operation is performed successfully, <code>false</code> otherwise.
+ @see AVUndoVerifyProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *AVUndoExecuteProc)
+ (AVUndo undo);
+
+/**
+ A callback for AVUndoHandler. It is called when the user initiates
+ an Undo or Redo command and the AVUndoVerifyProc() returns
+ true. Use this to return the user interface title string for the undo
+ record.
+ @param undo The undo record.
+ @param title (Filled by the method) The user interface title string
+ for the undo record, as a text object.
+ @see AVUndoVerifyProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVUndoGetTitleProc)
+ (AVUndo undo, ASText title);
+
+/**
+ A callback type for AVUndoHandler. The <code>beginUndoRedo</code> procedure
+ is called when the user initiates an Undo or Redo command
+ and the AVUndoVerifyProc() returns <code>true</code>. The <code>endUndoRedo</code> procedure
+ is called when execution of the operation is complete. Use
+ callbacks of this type to notify the handler that an undo
+ or redo operation is beginning or ending.
+
+ <p>These callbacks are optional. They can be used to allocate
+ and deallocate memory for the operations, for example, or,
+ when grouping undo records, to suspend user interface updates during
+ the operation. </p>
+ @param doc The document containing the undo record.
+ @param bUndo <code>true</code> if the user initiated an undo operation,
+ <code>false</code> if it is a redo operation.
+ @see AVUndoGetTitleProc
+ @see AVUndoExecuteProc
+ @see AVUndoVerifyProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVUndoBeginEndProc)
+ (AVDoc doc, ASBool bUndo);
+
+/**
+ Contains a callback procedure for an AVUndo record that performs
+ the undo and redo operations.
+ @see AVDocBeginUndoOperation
+ @see AVDocClearUndos
+ @see AVDocEndUndoOperation
+ @see AVDocGetTopUndo
+ @see AVUndoGetType
+ @see AVUndoNew
+*/
+typedef struct _t_AVUndoHandler {
+ /** The size of the data structure. It must be set to <code>sizeof(AVUndoHandlerRec)</code>. */
+ ASSize_t size;
+ /** The type of the undo record. It can be any client-defined string. It can be
+ matched for retrieval by AVDocGetTopUndo().
+ */
+ const char *type;
+ /** */
+ AVUndoVerifyProc VerifyUndo;
+ /** */
+ AVUndoExecuteProc Undo;
+ /** */
+ AVUndoVerifyProc VerifyRedo;
+ /** */
+ AVUndoExecuteProc Redo;
+ /** */
+ AVUndoGetTitleProc GetUndoTitle;
+ /** */
+ AVUndoGetTitleProc GetRedoTitle;
+ /** */
+ AVUndoReleaseProc Release;
+ /** */
+ AVUndoBeginEndProc BeginUndoRedo;
+ /** */
+ AVUndoBeginEndProc EndUndoRedo;
+} AVUndoHandlerRec, *AVUndoHandler;
+
+/**
+ An ink value for use in color separation methods.
+ @see AVPageViewGetPixelInformationAtPoint
+*/
+typedef struct AVInkValue
+{
+ /** */
+ ASAtom inkName;
+ /** */
+ float value;
+} AVInkValue;
+
+// If a command handler implements these properties
+// a toolbar button or menu item can be generated
+// from them directly using AVMenuItemFromCommand
+// or AVToolButtonFromCommand.
+#define kAVMenuKeyName "Menu:Name"
+#define kAVMenuKeyTitle "Menu:Title"
+#define kAVMenuKeyTitleChanges "Menu:TitleChanges"
+#define kAVMenuKeyIcon "Menu:Icon"
+#define kAVMenuKeyEnabled "Menu:Enabled"
+#define kAVMenuKeyMarked "Menu:Marked"
+#define kAVMenuKeyVisible "Menu:Visible"
+#define kAVMenuKeyShortcut "Menu:Shortcut"
+#define kAVMenuKeyShortcutFlags "Menu:ShortcutFlags"
+#define kAVMenuKeyHelpText "Menu:HelpText"
+
+#define kAVToolButtonKeyName "ToolButton:Name"
+#define kAVToolButtonKeyIcon "ToolButton:Icon"
+#define kAVToolButtonKeyMenuIcon "ToolButton:MenuIcon"
+#define kAVToolButtonKeyEnabled "ToolButton:Enabled"
+#define kAVToolButtonKeyMarked "ToolButton:Marked"
+#define kAVToolButtonKeyVisible "ToolButton:Visible"
+#define kAVToolButtonKeyShortcut "ToolButton:Shortcut"
+#define kAVToolButtonKeyHelpText "ToolButton:HelpText"
+#define kAVToolButtonKeyExternal "ToolButton:External"
+#define kAVToolButtonKeyInternal "ToolButton:Internal"
+#define kAVToolButtonKeyMenu "ToolButton:Menu"
+#define kAVToolButtonKeyLabel "ToolButton:Label"
+#define kAVToolButtonKeyLabelPriority "ToolButton:LabelPriority"
+
+/**
+ A set of priority values for a tool bar button label text.
+ The priority determines the preference order in which labels
+ are shown when a toolbar is too short to hold all of the
+ button labels.
+ @see AVToolButtonGetLabelText
+ @see AVToolButtonSetLabelText
+*/
+enum {
+ /** */
+ kAVButtonPriorityOffExtraLow = 100,
+ /** */
+ kAVButtonPriorityOffLow = 200,
+ /** */
+ kAVButtonPriorityOffNormal = 300,
+ /** */
+ kAVButtonPriorityOffHigh = 400,
+ /** */
+ kAVButtonPriorityOffExtraHigh = 500,
+
+ /** */
+ kAVButtonPriorityOnExtraLow = 600,
+ /** */
+ kAVButtonPriorityOnLow = 700,
+ /** */
+ kAVButtonPriorityOnNormal = 800,
+ /** */
+ kAVButtonPriorityOnHigh = 900,
+ /** */
+ kAVButtonPriorityOnExtraHigh = 1000,
+
+ /** */
+ kAVButtonPriorityAlwaysOn = 1100
+};
+typedef ASEnum16 AVToolButtonLabelPriority;
+
+// If a command returns these properties it will automatically
+// be included as a Task in the task bar. It must also implement
+// the properties required to create a toolbar button, described
+// above.
+#define kAVCommandKeyIsTask "IsTask"
+#define kAVTaskKeyToolBarName "Task:Toolbar"
+#define kAVTaskKeyDoesWork "Task:DoesWork"
+#define kAVTaskKeyButtonOrder "Task:ButtonOrder"
+#define kAVTaskKeyHowToPanelName "Task:HowToPanel"
+#define kAVTaskKeyButtonDefaultUserVisible "Task:ButtonDefaultUserVisible"
+
+/** */
+enum {
+ /** */
+ kAcrobatBasicsSortKey = 100,
+ /** */
+ kAVCreateSortKey = 200,
+ /** */
+ kAVCombineSortKey = 250,
+ /** */
+ kAVExportSortKey = 275,
+ /** */
+ kAVSecureSortKey = 300,
+ /** */
+ kAVSignSortKey = 400,
+ /** */
+ kAVFormSortKey = 500,
+ /** */
+ kAVReviewAndCommentSortKey = 600,
+ /** */
+ kAV3DSortKey = 650,
+ /** */
+ kAVEngineeringToolsSortKey = 700,
+ /** */
+ kAVPrintProductionSortKey = 800,
+ /** */
+ kAVHowToSortKey = ASMAXUns32
+};
+typedef ASUns32 AVHowToTopicSortKey;
+
+/** This enumerates the order of the built-in task buttons. */
+enum {
+ /** */
+ kAVeBookTaskOrder = 100,
+ /** */
+ kAVNewDocumentTaskOrder = 200,
+ /** */
+ kAVCombineFilesTaskOrder = 300,
+ /** */
+ kAVCollabTasksTaskOrder = 350,
+ /** */
+ kAVExportTaskOrder = 400,
+ /** */
+ kAVMeetingTaskOrder = 500,
+ /** */
+ kAVSecureTaskOrder = 600,
+ /** */
+ kAVSignTaskOrder = 700,
+ /** */
+ kAVFormTaskOrder = 800,
+ /** */
+ kAVMultimediaTaskOrder = 850,
+ /** */
+ kAVReviewAndCommentTaskOrder = 900,
+ /** */
+ kAVSendForReviewTaskOrder = 1000,
+ /** */
+ kAVPictureTasksTaskOrder = 1100
+};
+typedef ASEnum16 AVTaskOrderNumbers;
+
+/** This enumerates the order of the toolbars listed in the Tools menu. */
+enum {
+ /** */
+ kAVCommentingMenuOrder = 100,
+ /** No longer used, as of the Acrobat 8.0 release. */
+ kAVAdvCommentingMenuOrder = 200,
+ /** */
+ kAVSelectionMenuOrder = 300,
+ /** */
+ kAVZoomMenuOrder = 400,
+ /** */
+ kAVNavigationMenuOrder = 500,
+ /** */
+ kAVAdvEditingMenuOrder = 600,
+ /** */
+ kAVMeasuringMenuOrder = 700,
+ /** */
+ kAVRotateViewMenuOrder = 800,
+ /** */
+ kAVFindMenuOrder = 900,
+ /** */
+ kAVEndMenuOrder = kASMAXEnum16
+};
+typedef ASEnum16 AVToolsMenuOrderNumbers;
+
+// If a command handler implements these properties, doc status
+// icons can be generated from the AVCommand.
+#define kAVDocStatusKeyName "DocStatus:Name"
+#define kAVDocStatusKeyTipText "DocStatus:TipText"
+#define kAVDocStatusKeyHelpText "DocStatus:HelpText"
+#define kAVDocStatusKeyAlwaysInformText "DocStatus:PrefText"
+#define kAVDocStatusKeySmallIcon "DocStatus:SmallIcon"
+#define kAVDocStatusKeyLargeIcon "DocStatus:LargeIcon"
+#define kAVDocStatusKeyDefaultsToChecked "DocStatus:DefaultsToChecked"
+
+// If a command returns these properties, it will automatically
+// be queried when the document status display is updated.
+#define kAVCommandKeyIsDocStatus "IsDocStatus"
+
+/**
+ Constants that specify language format values for use in
+ AVAppLanguageParams.
+ @see AVAppGetLanguageWithParams
+*/
+enum {
+ /** */
+ kAVAppLanguage_RFC1766,
+ /** */
+ kAVAppLanguage_LCID,
+ /** */
+ kAVAppLanguage_ISO4Char,
+ /** */
+ kAVAppLanguage_RFC3066Bis,
+ /** */
+ kAVAppLanguage_ISO4Variant,
+ /** */
+ kAVAppLanguage_EFIPrint,
+ /** */
+ kAVAppLanguage_MaxSelector
+};
+typedef ASEnum16 AVAppLanguageFormat;
+
+/**
+ Constants that specify if the call to AVAppGetLanguageWithParams()
+ applies to the application or to the fallback language.
+*/
+enum {
+ kAVAppLanguage_app,
+ kAVAppLanguage_fallback,
+ kAVAppLanguage_langpack
+};
+typedef ASEnum16 AVAppLanguageSelector;
+
+
+#define kMaxLanguageNameLen 27
+/** A data structure containing language format information in which to return the language in
+ use for an application.
+*/
+typedef struct _AVAppLanguageParamsRec {
+ /** The size of the data structure. It must be set to <code>sizeof(AVAppLanguageParamsRec)</code>.*/
+ ASSize_t size;
+ /** The format in which to specify the language.*/
+ AVAppLanguageFormat kLangFormat;
+ /** The returned language value in the specified format. For
+ details of language values, see Language Codes.
+ @ref LanguageCodes
+ */
+ char szAVAppLanguage[kMaxLanguageNameLen];
+
+ AVAppLanguageSelector kLangSelector;
+
+ ASInt32 langID;
+
+} AVAppLanguageParamsRec, *AVAppLanguageParams;
+
+/** Constants used to define the set of bookmarks retrieved by AVDocGetBookmarks(). More than
+ one constant can be passed into the API by <code>OR</code>'ing them.
+ @example <code>kAVBookmarkFilterSelected | kAVBookmarkFilterFocus</code>
+*/
+enum {
+ kAVBookmarkFilterSelected = 1,
+ kAVBookmarkFilterFocus = 2
+};
+typedef ASEnum16 AVBookmarkFilter;
+
+
+enum
+{
+ kAVFavToolsFlagOkInternal = 1 << 0, // It is ok for the tool to be a favorite in a non-external situation
+ kAVFavToolsFlagOkExternal = 1 << 1 // It is ok for the tool to be a favorite in an external situation (eg: the web browser)
+};
+
+typedef AVTFlagBits AVFavToolFlags;
+
+/**
+ Describes the paragraph direction.
+*/
+enum {
+
+ kAVParagraphDirectionLeftToRight,
+
+ kAVParagraphDirectionRightToLeft,
+
+ kAVParagraphDirectionSameAsDocument,
+
+ /** Enum terminator.*/
+ kAVParagraphDirection_END_ENUM
+};
+typedef ASEnum8 kAVParagraphDirection;
+
+/* Section name and keys to be used with AVAppGetPref routines */
+/** International section name. */
+#define kSectionPrefsIntl "Intl"
+/** Key name for paragraph direction. */
+#define kKeyPrefsIntlParagraphDir "ParaDir"
+/* Key name for "enable Right to left Options". */
+#define kKeyPrefsIntlRTLUI "RTLUI"
+/* Key name for "enable Digits UI". */
+#define kKeyPrefsIntlDigitsUI "DigitsUI"
+/* Key name for "Current Keyboard Mode for Digits". */
+#define kKeyPrefsIntlNationalDigits "National"
+/* Key name for "enable UI Mirroring options" */
+#define kIsUIMirrored "IsUIMirrored"
+
+/* Structures to be used with the AVDocSaveOptimized routine */
+// Downsampling algorithms: algorithms supported by the PDF Optimizer
+/**
+ @product_exclude RDR
+*/
+enum
+{
+ kPDFOptNoDownsampling=0, // disable downsampling of Image XObjects
+ kPDFOptAverage, // Average downsampling
+ kPDFOptSubsampling, // Subsampling
+ kPDFOptBicubic // Bicubic downsampling
+};
+typedef ASEnum16 PDFOptDownsamplingAlgo;
+
+// Compression algorithms: algorithms supported by the PDF Optimizer.
+/**
+ @product_exclude RDR
+*/
+enum
+{
+ kPDFOptNoRecompression=0,// disable re-compression of image XObjects. It
+ // will retain the original filters.
+ kPDFOptJpeg2000, // available for color and grayscale images
+ kPDFOptJpeg, // available for color and grayscale images
+ kPDFOptFlate, // available for color, grayscale & monochrome images
+ kPDFOptJBIG2, // available for monochrome images
+ kPDFOptCCITT3, // available for monochrome images
+ kPDFOptCCITT4, // available for monochrome images
+ kPDFOptRunLength // available for monochrome images
+};
+typedef ASEnum16 PDFOptCompressionAlgo;
+
+// Compression quality: levels of compression to be applied to specified compression
+// filters.
+// For JBIG2 specifying any value other than kPDFOptLossless implies the application
+// of lossy compression. [XXX: if it is felt that bit flags would provide for a
+// more appropriate implementation, we could switch to those]
+// For the filters not specified here, compression quality is ignored.
+/**
+ @product_exclude RDR
+*/
+enum
+{
+ kPDFOptMinimumQlty=0, // meaningful for JBIG2, Jpeg and Jpeg2000
+ kPDFOptLowQlty, // meaningful for JBIG2, Jpeg and Jpeg2000
+ kPDFOptMediumQlty, // meaningful for JBIG2, Jpeg and Jpeg2000
+ kPDFOptHighQlty, // meaningful for JBIG2, Jpeg and Jpeg2000
+ kPDFOptMaximumQlty, // meaningful for JBIG2, Jpeg and Jpeg2000
+ kPDFOptLossless // meaningful for JBIG2 and Jpeg2000
+};
+typedef ASEnum16 PDFOptCompressionQlty;
+
+/** Image optimization options
+ @product_exclude RDR
+*/
+typedef struct _t_PDFOptImageOptions
+{
+ /** The size of the data structure. It must be set to <code>sizeof(PDFOptImageOptionsRec)</code>. */
+ ASSize_t size;
+
+ /** The downsampling algorithm to be used on the image.
+ @see PDFOptDownsamplingAlgo
+ */
+ PDFOptDownsamplingAlgo enmDownsamplingAlgo;
+
+ /** Downsample to the specified ppi. */
+ ASInt32 ppiDownsampleTo;
+
+ /** Downsample only if the image is above this ppi. */
+ ASInt32 ppiDownsampleAbove;
+
+ /** Compression algorithms: recompress using this algorithm. The rules for filter
+ availability for an image type should be followed.
+ @see PDFOptCompressionAlgo
+ */
+ PDFOptCompressionAlgo enmCompressionAlgo;
+
+ /** Compression quality: recompress to this quality level. It is ignored if it is not relevant
+ for the filter type.
+ @see PDFOptCompressionQlty
+ */
+ PDFOptCompressionQlty enmCompressionQlty;
+
+ /** Use this tile size if compressing using JPEG2000. It is ignored for other filters.
+ Its value should lie between <code>128</code> and <code>2048</code>. */
+ ASInt32 nTileSize;
+} PDFOptImageOptionsRec, *PDFOptImageOptions;
+
+/** Transparency flattening options */
+typedef struct _t_PDFOptFlattenTransparencyOptions
+{
+ /** The size of the data structure. It must be set to <code>sizeof(PDFOptFlattenTransparencyOptionsRec)</code>. */
+ ASSize_t size;
+
+ /** The percentage of vector information that is to be preserved. Lower values will
+ cause higher rasterization of vectors.
+ <p>Being a percentage, its value should lie between <code>0</code> and <code>100</code>.</p>
+ */
+ ASInt32 pctRasterVectorBalance;
+
+ /** Specfies the pixels per inch for flattening edges of atomic regions.
+ Its value should lie between 1 and 9600.
+ */
+ ASInt32 ppiLineArtAndText;
+
+ /** Specfies the pixels per inch for flattening the interiors of atomic regions.
+ Its value should lie between 1 and 1200.
+ */
+ ASInt32 ppiGradientAndMesh;
+
+ /** If <code>true</code>, it outputs text outlines instead of native text. */
+ ASBool bConvertText;
+
+ /** If <code>true</code>, it converts strokes to outlines. */
+ ASBool bConvertStrokes;
+
+ /** If <code>true</code>, it ensures that boundaries between vector and rasterized artwork fall along
+ object paths. */
+ ASBool bClipComplexRegions;
+
+ /** If <code>true</code>, it preserves overprint. */
+ ASBool bPreserveOverprint;
+}PDFOptFlattenTransparencyOptionsRec, *PDFOptFlattenTransparencyOptions;
+
+// Acrobat compatibility version: The Acrobat version to make the PDF compatible with.
+/**
+ @product_exclude RDR
+*/
+enum
+{
+ kPDFOptRetainVersion=0,
+ kPDFOptAcrobat4,
+ kPDFOptAcrobat5,
+ kPDFOptAcrobat6,
+ kPDFOptAcrobat7,
+ kPDFOptAcrobat8,
+ kPDFOptAcrobat9
+};
+typedef ASEnum16 PDFOptPDFVersion;
+
+// Object compression options
+/**
+ @product_exclude RDR
+*/
+enum
+{
+ kPDFOptUntouchedCompression=0, // available for Acrobat 6 or above compatibility
+ kPDFOptFullCompression, // available for Acrobat 6 or above compatibility
+ kPDFOptPartialCompression, // available for all versions of Acrobat
+ kPDFOptRemoveCompression // available for all versions of Acrobat
+};
+typedef ASEnum16 PDFOptObjectCompression;
+
+/**
+ @product_exclude RDR
+*/
+typedef struct _t_PDFOptParams
+{
+ /** The size of the data structure. It must be set to <code>sizeof(PDFOptParamsRec)</code>. */
+ ASSize_t size;
+
+ /** The path to which the file is to be saved. */
+ ASPathName asPathDest;
+
+ /** The file system. If it is <code>NULL</code>, uses the <code>fileSys</code> of the document's current backing file.
+ */
+ ASFileSys fileSys;
+
+ /** The progress monitor. Use AVAppGetDocProgressMonitor() to obtain the default.
+ It may be <code>NULL</code>.
+ @see AVAppGetDocProgressMonitor
+ */
+ ProgressMonitor progMon;
+
+ /** A pointer to user-supplied data to pass to <code>progMon</code> each time it is called. It must be
+ <code>NULL</code> if <code>progMon</code> is <code>NULL</code>. */
+ void * progMonClientData;
+
+ /** Acrobat compatibility version.
+ @see PDFOptPDFVersion
+ */
+ PDFOptPDFVersion enmAcrobatVersion;
+
+ /** Image optimization options for color XObjects. The structure should be filled up
+ keeping in mind the algorithms supported by color images.
+ @see PDFOptImageOptionsRec
+ */
+ PDFOptImageOptionsRec imageOptionsColor;
+
+ /** Image optimization options for grayscale XObjects. The structure should be filled
+ up keeping in mind the algorithms supported by grayscale images.
+ @see PDFOptImageOptionsRec
+ */
+ PDFOptImageOptionsRec imageOptionsGrayscale;
+
+ /** Image optimization options for monochrome XObjects. The structure should be filled
+ up keeping in mind the algorithms supported by monochrome images.
+ @see PDFOptImageOptionsRec
+ */
+ PDFOptImageOptionsRec imageOptionsMonochrome;
+
+ /** An array of PDFont objects. It is a list of fonts that should be unembedded. It may be <code>NULL</code>.
+ */
+ PDFont *arrPDFontsToUnembed;
+
+ /** The length of the <code>arrPDFontsToUnembed</code> array.
+ */
+ ASInt32 cPDFontsToUnembed;
+
+ /** A pointer to PDFOptFlattenTransparencyOptions. It specifies options to flatten
+ transparent regions of the document.
+ It can be <code>NULL</code>, in which case transparent regions will be preserved.
+ @see PDFOptFlattenTransparencyOptionsRec
+ */
+ PDFOptFlattenTransparencyOptions pdfOptFlattenTransparencyOptions;
+
+ /** If <code>true</code>, it removes form submissions, import actions, and reset actions. */
+ ASBool bRemoveFormActions;
+
+ /** If <code>true</code>, it flattens form fields. */
+ ASBool bFlattenFormFields;
+
+ /** If <code>true</code>, it removes JavaScript actions. */
+ ASBool bRemoveJavascriptActions;
+
+ /** If <code>true</code>, it removes alternate images. */
+ ASBool bRemoveAlternateImages;
+
+ /** If <code>true</code>, it removes embedded thumbnails.*/
+ ASBool bRemoveThumbnails;
+
+ /** If <code>true</code>, it removes document tags.*/
+ ASBool bRemoveDocumentTags;
+
+ /** If <code>true</code>, it attempts to merge lines made to look like curves into a single curve. */
+ ASBool bSmoothenLines;
+
+ /** If <code>true</code>, it attempts to merge fragments of an image into a single image. */
+ ASBool bMergeImageFragments;
+
+ /** If <code>true</code>, it removes embedded print settings from the document. */
+ ASBool bRemovePrintSettings;
+
+ /** If <code>true</code>, it removes all embedded search indexes from the document. */
+ ASBool bRemoveSrchIndex;
+
+ /** If <code>true</code>, it removes all bookmarks from the document. */
+ ASBool bRemoveBookmarks;
+
+ /** If <code>true</code>, it removes comments and form widgets. */
+ ASBool bRemoveCommentsAndWidgets;
+
+ /** If <code>true</code>, it removes document information and metadata. */
+ ASBool bRemoveDocInfoAndMetadata;
+
+ /** If <code>true</code>, it removes object data. */
+ ASBool bRemoveObjectData;
+
+ /** If <code>true</code>, it removes file attachments. */
+ ASBool bRemoveFileAttachments;
+
+ /** If <code>true</code>, it removes external cross references. */
+ ASBool bRemoveCrossRefs;
+
+ /** If <code>true</code>, it removes private data of other applications. */
+ ASBool bRemovePrivateData;
+
+ /** If <code>true</code>, it deletes hidden layers and flattens visible layers. */
+ ASBool bFlattenVisibleLayers;
+
+ /** Object compression options. Its value should be among the values
+ supported by the acrobatVersion option.
+ @see PDFOptObjectCompression
+ */
+ PDFOptObjectCompression enmObjectCompression;
+
+ /** If <code>true</code>, it encodes all unencoded streams with the Flate filter. */
+ ASBool bUnencodedToFlate;
+
+ /** If <code>true</code>, it reencodes all LZW encoded streams with the Flate filter.*/
+ ASBool bLZWToFlate;
+
+ /** If <code>true</code>, it removes all invalid bookmarks. */
+ ASBool bRemoveInvalidBookmarks;
+
+ /** If <code>true</code>, it removes all invalid links. */
+ ASBool bRemoveInvalidLinks;
+
+ /** If <code>true</code>, it removes all unreferenced named destinations. */
+ ASBool bRemoveUnreferencedNamedDests;
+
+ /** If <code>true</code>, it optimizes the file for fast web view.*/
+ ASBool bLinearize;
+
+ /** If <code>true</code>, image optimization operations would be applied only if they
+ lead to a reduction in image size. The exception will be cases where recompression is
+ required due to version incompatibility. **/
+ ASBool bSkipIrreducibleImages;
+
+ /** If <code>true</code>, all embedded fonts will be subsetted. **/
+ ASBool bSubsetEmbeddedFonts;
+
+ /** If <code>true</code>, content streams of all pages in the file are optimized. **/
+ ASBool bOptimizeContentStms;
+
+} PDFOptParamsRec, *PDFOptParams;
+
+typedef void (*PluginExecProc)(void*);
+
+typedef struct {
+ ASUns32 size;
+ union {
+ const char* menuID;
+ const char* notification;
+ ASAtom buttonID;
+ };
+} ExecProcData;
+
+typedef struct {
+ ASUns32 size; //size of the final struct. A notification may contain more data but will always have at least the notification name
+ const char* notification; //the name of the notification
+} AVNotificationDataRec, *AVNotificationData;
+typedef void (*AVCustomNotificationProc)(AVNotificationData data, void* clientData);
+
+// File Save Handle (refer AVAppBeginSave/AVAppEndSave/AVAppCancelSave for usage)
+typedef void * AVAppFileSaveHandle;
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_AVExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete1.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete1.h
new file mode 100644
index 0000000..db9d86b
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete1.h
@@ -0,0 +1,183 @@
+/*
+** AVExpTObsolete.h
+**
+** This file contains types used in former versions of Acrobat. By defining ACRO_SDK_LEVEL
+** to the latest version, you will use the latest types and routines. Some of these types are no longer
+** used in any Acrobat source while others may have been redefined. These are provided here to allow
+** existing plug-in code to compile without changes. Backward compatibility can be maintained by adding
+** AVCompat.cpp to your plugin which will handle passing current structures and callbacks to older
+** versions of Acrobat.
+**
+** This file is furnished to you by Adobe Systems Incorporated under the terms of the
+** Acrobat (r) Plug-insSoftware Development Kit License Agreement.
+** Copyright (C) 1994-2001,2003,2006 Adobe Systems Inc. All Rights Reserved.
+*/
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+/*
+** Note that all of the types are prefixed by "old" The recommended type to use does not begin with "old"
+** You should not use any of these types directly. The AVExpT.h file will map types to one or more old types
+** if you do not have ACRO_SDK_LEVEL set to the latest version
+*/
+/* oldAVRect provided for backward compatibility only, use AVRect */
+typedef struct oldAVRect {
+ ASInt16 left;
+ ASInt16 top;
+ ASInt16 right;
+ ASInt16 bottom;
+} oldAVRect, *oldAVRectP;
+
+/* oldQuad provided for backward compatibility only, use Quad */
+typedef struct _t_oldQuad {
+ /** */
+ ASInt16 tlh, tlv;
+ /** */
+ ASInt16 trh, trv;
+ /** */
+ ASInt16 blh, blv;
+ /** */
+ ASInt16 brh, brv;
+} oldQuad;
+
+typedef ASInt32 AVlCoord; /* use AVDevCoord instead, unless you need to support the 3 32-bit calls prior to Acrobat 6.0 AND are using ACRO_SDK_LEVEL=1*/
+typedef ASInt32 AVlDragType; /* only used in obsolete calls. Use AVDragType instead */
+
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)
+typedef struct _t_oldAVDocSelectionServer *AVDocSelectionServer;
+typedef struct _t_oldAVAnnotHandler *AVAnnotHandler;
+typedef struct _t_oldAVTool *AVTool;
+typedef struct _t_oldAVWindowHandler *AVWindowHandler;
+typedef struct _t_oldAVDocViewDef *AVDocViewDef;
+typedef struct _t_oldAVWindow *AVWindow;
+typedef oldAVRect AVRect;
+typedef oldAVRectP AVRectP;
+
+typedef struct _t_AVRect32 {
+ ASInt32 left;
+ ASInt32 top;
+ ASInt32 right;
+ ASInt32 bottom;
+} AVRect32, *AVRect32P;
+
+#if UNIX_PLATFORM
+typedef struct _t_ASPlatformPrinterSpec {
+ ASSize_t size; /* set this to be the size of this struct */
+ char *printerName; /* name of a printer */
+ /* If baseAddr is non-NULL, then print a bitmap image to the baseAddr */
+ ASUns8 *baseAddr;
+ AVBufferSize rowBytes;
+ AVBufferSize depth;
+ AVRect32 bounds;
+} ASPlatformPrinterSpecRec, *ASPlatformPrinterSpec;
+#endif /* UNIX_PLATFORM */
+
+typedef struct _t_AVAnnotOpData {
+ /* Set by the viewer to the size of this record. */
+ ASSize_t size;
+
+ /* If the operation is kAVAnnotShowMenu, provides the default
+ location of the menu in AV device coordinates.
+ */
+ ASInt32 x;
+ ASInt32 y;
+
+ void * clientData;
+
+} AVAnnotOpDataRec, *AVAnnotOpData;
+
+#define kAVEmitTransferFuncs 0x8000 /* emit transfer functions in PDF, use kAVSuppressTransfer before or after 5.0, both on 5.0 */
+/** (5.0 only) When set, this flag causes special handling of one- and four-component ICC profiles,
+ the same as that done when the Print ICC colors as Device colors checkbox is set in the Advanced print dialog.
+ @note Do not convert the ICC profile to a color space array when printing PostScript with PostScript color management on.
+*/
+#define kAVPrintICCColorsAsDevice 0x00010000
+
+#endif
+
+typedef ACCBPROTO1 void (ACCBPROTO2 *oldAVPageViewDrawProc)(AVPageView pageView, oldAVRect* updateRect, void*data);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVPageViewClickProc)(AVPageView pageView, ASInt16 x, ASInt16 y, AVFlagBits16 flags, AVTCount clickNo, void*data);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVPageViewCursorProc)(AVPageView pageView, ASInt16 x, ASInt16 y, void* data);
+
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVDocSelectionGetAVRectProc)(AVDoc doc, PDPageNumber pageNo, oldAVRect* rect, void* data);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVDocSelectionShowMenuProc)(AVDoc doc, void *data, ASInt16 x, ASInt16 y);
+
+typedef struct _t_oldAVAnnotHandler *oldAVAnnotHandler;
+
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVAnnotHandlerDoClickProc)(oldAVAnnotHandler annotHandler, PDAnnot hitAnnot,
+ AVPageView pageView,
+ ASInt16 xHit, ASInt16 yHit,
+ AVFlagBits16 flags,
+ AVTCount clickNo);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVAnnotHandlerAdjustCursorProc)(oldAVAnnotHandler annotHandler, PDAnnot anAnnot,
+ AVPageView pageView, ASInt16 xHit, ASInt16 yHit);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVAnnotHandlerPtInAnnotViewBBoxProc)(oldAVAnnotHandler annotHandler, AVPageView pageView,
+ PDAnnot anAnnot, ASInt16 xHit, ASInt16 yHit);
+
+typedef ACCBPROTO1 void (ACCBPROTO2 *oldAVAnnotHandlerGetAnnotViewBBoxProc)(oldAVAnnotHandler annotHandler, AVPageView pageView,
+ PDAnnot anAnnot, oldAVRect *bbox);
+
+typedef ACCBPROTO1 void (ACCBPROTO2 *oldAVAnnotHandlerDrawExProc)(
+ oldAVAnnotHandler annotHandler,
+ PDAnnot anAnnot,
+ AVPageView pageView,
+ oldAVRect *updateRect);
+
+
+typedef struct _t_oldAVTool *oldAVTool;
+
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAdjustCursorProcType)(oldAVTool tool, AVPageView pageView, ASInt16 x, ASInt16 y);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldDoClickProcType)(oldAVTool tool, AVPageView pageView,
+ ASInt16 xHit, ASInt16 yHit,
+ AVFlagBits16 flags,
+ AVTCount clickNo);
+
+typedef struct _t_oldAVWindowHandler *oldAVWindowHandler;
+typedef struct _t_oldAVWindow *oldAVWindow;
+typedef ACCBPROTO1 void (ACCBPROTO2 *oldAVWindowMouseDownProc)(oldAVWindow win, ASInt16 x, ASInt16 y, void *platformEvent);
+typedef ACCBPROTO1 void (ACCBPROTO2 *oldAVWindowDrawProc)(oldAVWindow win, const oldAVRect *rect);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVWindowWillBeResizedProc)(oldAVWindow win, oldAVRect *newFrame);
+typedef ACCBPROTO1 void (ACCBPROTO2 *oldAVWindowAdjustCursorProc)(oldAVWindow win, ASInt16 x, ASInt16 y);
+typedef ACCBPROTO1 void (ACCBPROTO2 *oldAVWindowDidResizeProc)(oldAVWindow win, const oldAVRect *newFrame);
+
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)
+typedef oldAVPageViewDrawProc AVPageViewDrawProc;
+typedef oldAVPageViewClickProc AVPageViewClickProc;
+typedef oldAVPageViewCursorProc AVPageViewCursorProc;
+
+typedef oldAVDocSelectionGetAVRectProc AVDocSelectionGetAVRectProc;
+typedef oldAVDocSelectionShowMenuProc AVDocSelectionShowMenuProc;
+
+typedef oldAdjustCursorProcType AdjustCursorProcType;
+typedef oldDoClickProcType DoClickProcType;
+
+typedef oldAVWindowMouseDownProc AVWindowMouseDownProc;
+typedef oldAVWindowDrawProc AVWindowDrawProc;
+typedef oldAVWindowWillBeResizedProc AVWindowWillBeResizedProc;
+typedef oldAVWindowAdjustCursorProc AVWindowAdjustCursorProc;
+typedef oldAVWindowDidResizeProc AVWindowDidResizeProc;
+#endif
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *oldAVAuxDataPerformProc)(ASAtom auxDataType, void *auxData, AVTBufferSize auxDataLen, AVDoc avDoc);
+
+typedef struct _t_oldAVAuxDataHandler {
+
+ /** The size of the data structure. It must be set to <code>sizeof(AVAuxDataHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** Called with auxiliary data when a client calls AVDocSendAuxData(). This proc should perform whatever
+ action is required for the auxiliary data.
+ */
+ oldAVAuxDataPerformProc PerformProc;
+} oldAVAuxDataHandlerRec, *oldAVAuxDataHandler;
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00090000)
+typedef oldAVAuxDataPerformProc AVAuxDataPerformProc;
+typedef oldAVAuxDataHandlerRec AVAuxDataHandlerRec;
+typedef oldAVAuxDataHandler AVAuxDataHandler;
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+#pragma options align=reset
+#endif
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete2.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete2.h
new file mode 100644
index 0000000..e3e99a7
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVExpTObsolete2.h
@@ -0,0 +1,396 @@
+/*
+** AVExpTObsolete2.h
+**
+** This file contains types used in former versions of Acrobat. By defining ACRO_SDK_LEVEL
+** to the latest version, you will use the latest types and routines. These types are no longer
+** used in any Acrobat source, but are provided here to allow existing plug-in code to compile
+** without changes. Backward compatibility can be maintained by adding AVCompat.cpp to your plugin
+** which will handle passing current structures and callbacks to older versions of Acrobat.
+**
+** This file is furnished to you by Adobe Systems Incorporated under the terms of the
+** Acrobat (r) Plug-insSoftware Development Kit License Agreement.
+** Copyright (C) 1994-2001,2003,2006-2007 Adobe Systems Inc. All Rights Reserved.
+*/
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+/*
+** Note that all of the types are prefixed by "old" The recommended type to use does not begin with "old"
+** You should not use any of these types directly. The AVExpT.h file will existing types to one or more old types
+** if you do not have ACRO_SDK_LEVEL set to the latest version
+*/
+
+
+typedef struct { /* Used for AVAppOpenDialog, AVAppSaveDialog, and AVAppChooseFolderDialog */
+ ASSize_t size; /* Size of this record */
+ AVOpenSaveDialogFlags flags;
+ AVWindow parentWindow; /* Parent window of dialog -- ignored on Mac */
+ ASText windowTitle; /* Title of dialog - use for prompt. May be NULL for default title */
+ ASText actionButtonTitle; /* Title of 'action' button ('Open', 'Save', or 'Choose'). May be NULL for default title */
+ ASText cancelButtonTitle; /* Title of cancel button. May be NULL for default title */
+ ASFileSys initialFileSys; /* May be NULL if flags does not contain kAVOpenSaveAllowForeignFileSystems */
+ ASPathName initialPathName; /* Used to specify initial location/selection. May be NULL if default location/selection is acceptable */
+ const char *initialFileName; /* Ignored (may be NULL) for Open and ChooseFolder. For Save, filename portion is used for edit field */
+ AVFileFilterRec **fileFilters; /* Array of AVFileFilterRec*s. Ignored (may be NULL) for ChooseFolder. May be NULL for Open ONLY if kAVOpenSaveAllowAllFlag is set */
+ AVArraySize numFileFilters; /* Number of AVFileFilterRec*s in fileFilters */
+ AVOpenSaveDialogSettingsComputeEnabledProc settingsComputeEnabledProc;
+ AVOpenSaveDialogSettingsExecuteProc settingsExecuteProc;
+ void *settingsProcData;
+} oldAVOpenSaveDialogParamsRec, *oldAVOpenSaveDialogParams;
+
+typedef struct _t_oldAVDocSelectionServer {
+
+ ASSize_t size; /* set this to sizeof(AVDocSelectionServerRec) */
+
+ AVDocSelectionGetTypeProc GetType;
+ AVDocSelectionGettingSelectionProc GettingSelection;
+ AVDocSelectionAddedToSelectionProc AddedToSelection;
+ AVDocSelectionLosingSelectionProc LosingSelection;
+ AVDocSelectionRemovedFromSelectionProc RemovedFromSelection;
+ AVDocSelectionCanSelectAllProc CanSelectAll;
+ AVDocSelectionSelectAllProc SelectAll;
+ AVDocSelectionCanPropertiesProc CanProperties;
+ AVDocSelectionPropertiesProc Properties;
+ AVDocSelectionCanDeleteProc CanDelete;
+ AVDocSelectionDeleteProc Delete;
+ AVDocSelectionCanCopyProc CanCopy;
+ AVDocSelectionCopyProc Copy;
+ AVDocSelectionEnumSelectionProc EnumSelection;
+ AVDocSelectionShowSelectionProc ShowSelection;
+ AVDocSelectionCanCutProc CanCut;
+ AVDocSelectionCutProc Cut;
+ AVDocSelectionCanPasteProc CanPaste;
+ AVDocSelectionPasteProc Paste;
+ AVDocSelectionKeyDownProc KeyDown;
+ AVDocSelectionHighlightSelectionProc HighlightSelection;
+ AVDocSelectionGetSelectionTypeProc GetSelectionType;
+ AVDocSelectionEnumPageRangesProc EnumPageRanges;
+ oldAVDocSelectionGetAVRectProc GetAVRect;
+ oldAVDocSelectionShowMenuProc ShowMenu;
+} oldAVDocSelectionServerRec, *oldAVDocSelectionServer;
+
+typedef struct _t_oldAVDocViewDef
+{
+ ASSize_t size;
+
+ ASBool bringToFront;
+
+ ASBool usePageViewInfo; /* pageview info */
+ PDLayoutMode pageViewLayoutMode;
+ PDPageNumber pageViewPageNum;
+ AVZoomType pageViewZoomType;
+ ASFixed pageViewZoom;
+ ASInt16 pageViewX;
+ ASInt16 pageViewY;
+
+ ASBool pageViewStartThread;
+ AVPageIndex pageViewThreadIndex;
+ PDBead pageViewBead;
+
+ ASBool useOverViewInfo; /* overview info */
+ PDPageMode overViewMode;
+ AVPixelOffset overViewPos; /*pixel position of overview */
+ ASInt32 overViewX;
+ ASInt32 overViewY;
+
+ ASBool useWindowInfo; /* window info */
+ oldAVRect windowFrame;
+
+ ASBool unused1; /* obsolete */
+ const char* unused2; /* obsolete */
+
+} oldAVDocViewDefRec, *oldAVDocViewDef;
+
+typedef struct _t_oldAVDocOpenParams
+{
+ ASSize_t size;
+
+ ASBool useFrame; /* Should the "frame" field be used? */
+ oldAVRect frame; /* Frame rectangle of newly opened
+ ** AVDoc, in global screen coordinates
+ */
+
+ ASBool useVisible; /* Should the "visible" field be used? */
+ ASBool visible; /* Should the AVDoc be opened visibly, or
+ ** should it be hidden?
+ */
+
+ ASBool useServerType; /* Should the "serverType" and "serverData" fields be used? */
+ const char* serverType; /* Name of AVDoc server for this AVDoc */
+ void* serverCreationData; /* serverData to be associated with above server */
+
+ ASBool useSourceDoc; /* Should the "sourceDoc" field be used? */
+ AVDoc sourceDoc; /* AVDoc whose window will be taken over by new document. */
+ /* "sourceDoc" will be closed at the same time. */
+
+ ASBool useReadOnly; /* Should the "readOnly" field be used? */
+ ASBool readOnly; /* Open the document in read only mode */
+
+ ASBool useViewType; /* Should the "viewType" field be used */
+ const char* viewType; /* type of view to open on document */
+
+ ASBool useViewDef; /* Should the "viewDef" field be used? */
+ oldAVDocViewDef viewDef; /* initial view to open two */
+
+ ASBool usePermReqProc; /* Should the "permReqProc" field be used? */
+ AVDocPermReqProc permReqProc; /* Return PDPermReqDenied to deny a permission, or PDPermReqGranted to grant it. */
+}
+oldAVDocOpenParamsRec, *oldAVDocOpenParams;
+
+typedef struct _t_oldAVToolBarPosition {
+
+ /** The size of this structure. Set it to <code>sizeof(AVToolBarPositionRec)</code>. */
+ ASSize_t size;
+
+ /** Specifies that the toolbar is to be <i>in-doc</i> (not shared). If <code>inDoc</code> is <code>true</code>, <code>dockPosition</code> cannot be floating. */
+ ASBool inDoc;
+
+ /** The edge of the document window or monitor to which to attach this toolbar. */
+ AVToolBarDockPosition dockPosition;
+
+ /** If the toolbar is to be floating, you can group it with another toolbar by specifying a name
+ for the floating window. You can set this to a constant string.
+ */
+ const char *floatingWindowName;
+
+ /** The stack on which to insert the toolbar. Make this <code>-1</code> to open a new stack on the left or top, or ASMAXInt32
+ to open a new stack on the right or bottom.
+ */
+ ASInt32 stackNum;
+
+ /** The number of pixels from the top or left edge of the stack from which to position the toolbar. If
+ ASMAXInt32, the toolbar will be positioned snugly behind other toolbars on the stack. If <code>-1</code>, it will
+ be positioned at the front.
+ */
+ ASInt32 offset;
+
+ /** If multiple positions specify an offset of <code>-1</code> or ASMAXInt32, this field is used to further order them.
+ It controls the order in which the bars will be placed, not the visual order on-screen. If, for example,
+ two bars have an offset of <code>-1</code>, the one associated with the value in the lower order field will be
+ positioned first at the front of the bar. Then the one associated by the value in the higher order field
+ will also be positioned at the front of the bar, but will push the first one to the right.
+ */
+ ASInt32 order;
+
+ /** If the toolbar is not <code>inDoc</code> and <code>dockPosition</code> is floating, you may end up creating a new window. Here is its frame. */
+ oldAVRect windowFrame;
+
+ /** If a new window is called for, here is its layout. */
+ AVToolBarLayout layout;
+
+ /** Set this to <code>true</code> if the toolbar should be hidden by default. */
+ ASBool hidden;
+
+ /** Set this to <code>true</code> if the floating window in which the toolbar is located should be hidden by default. */
+ ASBool windowHidden;
+
+} oldAVToolBarPositionRec, *oldAVToolBarPosition;
+
+typedef struct _t_oldAVAnnotHandler
+{
+ ASSize_t size;
+ AVFlagBits32 flags;
+
+ oldAVAnnotHandlerDoClickProc DoClick;
+ oldAVAnnotHandlerAdjustCursorProc AdjustCursor;
+ oldAVAnnotHandlerPtInAnnotViewBBoxProc PtInAnnotViewBBox;
+ oldAVAnnotHandlerGetAnnotViewBBoxProc GetAnnotViewBBox;
+ AVAnnotHandlerNotifyAnnotRemovedFromSelectionProc NotifyAnnotRemovedFromSelection;
+ AVAnnotHandlerNotifyAnnotAddedToSelectionProc NotifyAnnotAddedToSelection;
+ AVAnnotHandlerDrawProc Draw;
+ AVAnnotHandlerNewProc New;
+ AVAnnotHandlerGetTypeProc GetType;
+ AVAnnotHandlerNotifyDestroyProc NotifyDestroy;
+ AVAnnotHandlerDoPropertiesProc DoProperties;
+ AVAnnotHandlerDoKeyDownProc DoKeyDown;
+ AVAnnotHandlerGetLayerProc GetLayer;
+ AVAnnotHandlerCursorEnterProc CursorEnter;
+ AVAnnotHandlerCursorExitProc CursorExit;
+ AVAnnotHandlerCopyProc Copy;
+ oldAVAnnotHandlerDoClickProc DoRightClick;
+ AVAnnotHandlerGetInfoProc GetInfo;
+ AVAnnotHandlerDeleteInfoProc DeleteInfo;
+ AVAnnotHandlerCanPerformOpProc CanPerformOp;
+ AVAnnotHandlerPerformOpProc PerformOp;
+ AVAnnotHandlerDoKeyDownExProc DoKeyDownEx;
+ oldAVAnnotHandlerDrawExProc DrawEx;
+ AVAnnotHandlerGetFlagsProc GetFlags;
+} oldAVAnnotHandlerRec;
+
+
+typedef struct _t_oldAVTool
+{
+ ASSize_t size;
+
+ ActivateProcType Activate;
+ DeactivateProcType Deactivate;
+ oldDoClickProcType DoClick;
+ oldAdjustCursorProcType AdjustCursor;
+ DoKeyDownProcType DoKeyDown;
+ GetTypeProcType GetType;
+ IsPersistentProcType IsPersistent;
+ AVCursorID cursorID;
+ AVComputeEnabledProc ComputeEnabled;
+ void *computeEnabledData;
+ oldDoClickProcType DoRightClick;
+ DoLeaveProcType DoLeave;
+ GetSelectionServerProcType GetSelectionServer;
+
+} oldAVToolRec;
+
+typedef struct _t_oldAVWindowHandler
+{
+ ASSize_t size;
+ oldAVWindowMouseDownProc MouseDown;
+ AVWindowWillCloseProc WillClose;
+ AVWindowDidCloseProc DidClose;
+ AVWindowDidActivateProc DidActivate;
+ AVWindowDidBecomeKeyProc DidBecomeKey;
+ AVWindowKeyDownProc KeyDown;
+ AVWindowWillResignKeyProc WillResignKey;
+ AVWindowWillDeactivateProc WillDeactivate;
+ oldAVWindowDrawProc Draw;
+ oldAVWindowWillBeResizedProc WillBeResized;
+ AVWindowPerformEditOpProc PerformEditOp;
+ AVWindowCanPerformEditOpProc CanPerformEditOp;
+ oldAVWindowAdjustCursorProc AdjustCursor;
+ oldAVWindowDidResizeProc DidResize;
+ AVWindowDestroyPlatformThingProc DestroyPlatformThing;
+} oldAVWindowHandlerRec;
+
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)
+//changed use of AVRect32 to AVRect
+typedef struct _t_AVDocPrintParams {
+ ASSize_t size; /* set this to be the size of this struct */
+
+ /* One and only one of the following booleans must be set:
+ interactive - puts up a print dialog and print status window while printing
+ embedded - renders one page scaled to the size specified by embeddedRect
+ emitToPrinter - non-interactive output to a printer without a print dialog or status window
+ emitToFile - non-interactive output to a file. Used to emit color separations or EPS.
+ */
+
+ ASBool interactive; /* if true, display dialogs; else, perform without dialogs */
+ ASBool cancelDialog; /* if interactive false, forces cancel dialog to appear */
+
+ /* firstPage, lastPage, psLevel, binaryOk and shrinkToFit are used if
+ ** emitToPrinter or emitToFile are true.
+ */
+ ASInt32 firstPage; /* first page to be printed; zero-based; if -1, then all pages are printed */
+ ASInt32 lastPage; /* last page to be printed; if firstPage is -1, this page is ignored */
+ ASInt32 psLevel; /* if printing to PostScript, 1 means emit as level 1, 2 means level 2 */
+ ASBool binaryOK; /* set to true if a binary channel to the printer is supported */
+ ASBool shrinkToFit; /* if true, the page is scaled to fit the printer page size */
+
+ /* fileSysName and filePathName are used if emitToPrinter or emitToFile is true.
+ **
+ ** If emitToPrinter is true, and filePathName is non-NULL, then the system printer driver
+ ** is used to emit the output stream to the file. This is implemented for Windows only.
+ */
+ ASAtom fileSysName; /* see filePathName */
+ ASPathName filePathName; /* if non-NULL, is a platform path for the specified fileSysName,
+ or, if fileSysName is ASAtomNull, it is one of the following:
+ on Windows: a C-string path name;
+ on Macintosh: a FSSpecPtr.
+ on Unix: a C-string path name.
+ */
+
+ /* printerSpec is optionally used if interactive, embedded or emitToPrinter is true.
+ ** If NULL, then a default system printer is used.
+ */
+ ASPlatformPrinterSpec printerSpec; /* may be NULL. If non-NULL, is a platform specific. See type above */
+
+ ASBool embedded; /* If true, then this an embedded view of a page that is to be printed.
+ ** firstPage and lastPage must be the same.
+ ** embeddedRect specifies the location in the page where
+ ** the view of the page is to appear.
+ ** embeddedRect is in device coordinates for the current printer.
+ ** The printer must be specified as an HDC or CGrafPtr.
+ */
+ AVRect32 embeddedRect; /* see "embedded" above */
+
+ ASBool emitToPrinter; /* If true, use the system printer driver for output.
+ ** If filePathName is specified, uses the driver to
+ ** create the file.
+ */
+
+ /* Parameters for emission of PS Level 1 Color Separations and EPS, or vanilla PS.
+ ** Creates and writes to filePathName (may not be NULL).
+ ** Does NOT use system printer driver.
+ ** Only has partial font emitting capabilities on some platforms:
+ ** Mac: embedded and system Type 1 fonts only; no TrueType or substitution fonts.
+ ** Win: embedded and system Type 1 fonts only; no TrueType or substitution fonts.
+ ** UNIX: all fonts
+ */
+ ASBool emitToFile;
+ ASBool doColorSeparations; /* Perform level 1 TN #5054 color separations */
+ ASEnum8 emitFileOption; /* file output options: PS, EPS, preview */
+ ASEnum8 emitFontOption; /* font output options: none, embedded Type 1, etc. */
+
+ /* More emit options. */
+ ASUns32 emitFlags; /* such as kAVEmitHalftones */
+
+ /* Support for multiple page ranges */
+ PDPageRange *ranges;
+ AVTSmallArraySize numRanges;
+ /* control over TrueType --> Type 1 conversion for PostScript printing */
+ ASBool TTasT42; /* true means send TrueType fonts as TrueType fonts (level 3 and most level 2 PS printers,
+ false means convert TT to T1, typically ONLY desirable for Level 1 PS where no TT handling was present */
+ ASBool printAsImage; /* true means print pages as image */
+ ASBool printerHasFarEastFonts; /* true means don't down load far east fonts to printer. */
+ ASBool reverse; /* print from lastPage to firstPage */
+ ASInt32 pageSpec; /* PDAllPages, PDEvenPagesOnly, or PDOddPagesOnly */
+ ASInt32 transparencyLevel;
+ /* 1: "The entire page will be rasterized. Use this setting for printing
+ or exporting complex pages with many transparent objects. Ideal for fast
+ output at low resolution; higher resolution will yield higher quality but
+ increase processing time. Size of saved files or print spool files may be large.
+
+ 2: "Maintains simpler vector objects, but rasterizes more complex areas involving
+ transparency. Ideal for artwork with only a few transparent objects. Some printers
+ may yield rough transitions between bordering vector and raster objects and make
+ hairlines appear thicker. Appropriate for low-memory systems.
+
+ 3: "Maintains most objects as vector data, but rasterizes very complex transparent
+ regions. Generally the best setting for printing and exporting most pages.
+ With some printers, improves transition issues between bordering vector and raster objects.
+
+ 4: "Maintains most of the page content as vectors, rasterizing only extremely complex areas.
+ Produces high quality output that is generally resolution-independent. Higher occurrences of
+ transparent regions will increase processing time. With some printers improves transition issues
+ between bordering vector and raster objects.
+
+ 5: "The entire page is printed or exported as vector data, to the greatest extent possible. This
+ produces the highest quality resolution-independent output. Processing of complex pages may be
+ very time and memory intensive.
+
+ */
+ char destProfile[256]; /* Color profile for destination. */
+} AVDocPrintParamsRec;
+#endif /*!defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)*/
+
+
+#if !defined(ACRO_SDK_LEVEL) || (ACRO_SDK_LEVEL < 0x00060000)
+typedef oldAVOpenSaveDialogParamsRec AVOpenSaveDialogParamsRec;
+typedef oldAVOpenSaveDialogParams AVOpenSaveDialogParams;
+typedef oldAVDocSelectionServerRec AVDocSelectionServerRec;
+typedef oldAVDocViewDefRec AVDocViewDefRec;
+typedef oldAVDocOpenParamsRec AVDocOpenParamsRec;
+typedef oldAVDocOpenParams AVDocOpenParams;
+typedef oldAVToolBarPositionRec AVToolBarPositionRec;
+typedef oldAVToolBarPosition AVToolBarPosition;
+typedef oldAVAnnotHandlerDrawExProc AVAnnotHandlerDrawExProc;
+typedef oldAVAnnotHandlerDoClickProc AVAnnotHandlerDoClickProc;
+typedef oldAVAnnotHandlerAdjustCursorProc AVAnnotHandlerAdjustCursorProc;
+typedef oldAVAnnotHandlerPtInAnnotViewBBoxProc AVAnnotHandlerPtInAnnotViewBBoxProc;
+typedef oldAVAnnotHandlerGetAnnotViewBBoxProc AVAnnotHandlerGetAnnotViewBBoxProc;
+typedef oldAVAnnotHandlerRec AVAnnotHandlerRec;
+typedef oldAVToolRec AVToolRec;
+typedef oldAVWindowHandlerRec AVWindowHandlerRec;
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVPrefsD.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVPrefsD.h
new file mode 100644
index 0000000..fafef7f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVPrefsD.h
@@ -0,0 +1,232 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AVPrefsD.h
+
+ - Defines AV_PREFERENCES, the list of AVAppPreferences.
+
+*********************************************************************/
+
+#ifndef AVPREFSD_H
+#define AVPREFSD_H
+
+/* **ER 1/31/96
+** WARNING!
+** Do not ever add preferences to the middle of _t_APrefsType! Always append.
+** If you are not certain that you understand our preferences system,
+** find somebody who does who can help you. Messing with the preferences
+** can cause a lot of problems, some of which can be subtle and hard to find.
+** Additionally, be sure to update AVExpt.h in the SDK so that plug-ins can
+** see your changes.
+*/
+
+/* Items which are declared AVS are either strings or structures, both
+** of which require special handling when establishing defaults, etc.
+** Also, any item marked AVS requires modifications to the preferences
+** code on Mac. String items are stored in a separate record, and
+** non-string items require some special handling in SetProcIndep.
+** (We could avoid the later problem by separating AVS into two
+** defines, one for structures which can be copied as-is and one
+** for strings and other pointers. But not now.)
+*/
+
+/*
+ * AVP(a, b) does not quite cover all cases
+ * AVX(a, b) used only for avpShortMenus
+ * AVS(a, b) for prefs which are structures or strings
+ * initializing defaults needs to be special-cased
+ * AVU(a, b, c) used for obsolete preferences
+ * AVPSTR(a) used for char* strings
+ * AVPVOIDP(a) used for void* objects
+ */
+
+/* DO NOT ADD ANY PREFERENCES TO OR REMOVE ANY PREFERENCES FROM HERE -- these preferences used to use
+** the original preference API. This section is for retaining backwards compatibility
+** with the original API.
+**
+** Use AVAppSetPref___() and AVAppGetPref___() for new preferences.
+**
+** Ask someone if this isn't clear.
+*/
+
+
+#define AV_PREFERENCES \
+AVP(avpPrefsVersion, ASInt32) \
+AVP(avpOpenDialogAtStartup, ASBool) \
+AVP(avpShowSplashAtStartup, ASBool) \
+AVP(avpShowToolBar, ASBool) \
+AVP(avpRememberDialogs, ASBool) \
+AVX(avpShortMenus, ASBool) /* omitted from AVPrefsRec, included in AVPrefsType */ \
+AVP(avpDefaultOverviewType, PDPageMode) \
+AVP(avpDefaultZoomScale, ASFixed) \
+AVP(avpDefaultZoomType, AVZoomType) \
+AVP(avpShowLargeImages, ASBool) \
+AVP(avpGreekText, ASBool) \
+AVP(avpGreekLevel, ASInt32) \
+AVP(avpSubstituteFontType, PDSubstFontPref) \
+AVP(avpDoCalibratedColor, ASBool) \
+AVP(avpSkipWarnings, ASBool) \
+AVP(avpPSLevel, ASInt32) \
+AVP(avpShrinkToFit, ASBool) \
+AVP(avpCaseSensitive, ASBool) \
+AVP(avpWholeWords, ASBool) \
+AVS(avpNoteColor, PDColorValueRec) \
+AVPSTR(avpNoteLabel) /* MAX_NOTE_LABEL */ \
+AVP(avpMaxThreadZoom, ASFixed) \
+AVP(avpEnablePageCache, ASBool) \
+AVS(avpFullScreenColor, PDColorValueRec) \
+AVU(avpFullScrolling, ASBool, 1) /* AVU => obsolete */ \
+AVP(avpMaxPageCacheZoom, ASFixed) \
+AVP(avpMinPageCacheTicks, ASInt32) \
+AVP(avpMaxPageCacheBytes, ASInt32) \
+AVP(avpDrawMissingThumbs, ASBool) /* AVU => obsolete */ \
+AVP(avpFullScreenChangeTimeDelay, ASInt32) \
+AVP(avpFullScreenLoop, ASBool) \
+AVP(avpThumbViewScale, ASFixed) \
+AVP(avpThumbViewTimeout, ASInt32) \
+AVPSTR(avpDestFitType) /* MAX_FIT_TYPE */ \
+AVP(avpDestZoomInherit, ASBool) \
+AVP(avpHighlightMode, ASInt32) \
+AVP(avpDefaultSplitterPos, ASInt32) \
+AVU(avpThreadIndicator, ASUns32, 2) /* AVU => obsolete */ \
+AVP(avpMaxCosDocCache, ASInt32) \
+AVP(avpPageUnits, PageUnitsType) \
+AVPSTR(avpNoteFontName_Deprecated) /* MAX_FONT_NAME */ \
+AVP(avpNoteFontSize_Deprecated, ASInt32) \
+AVPSTR(avpRecentFile1) \
+AVPSTR(avpRecentFile2) \
+AVPSTR(avpRecentFile3) \
+AVPSTR(avpRecentFile4) \
+AVS(avpHighlightColor, PDColorValueRec) \
+AVP(avpFullScreenUseTimer, ASBool) \
+AVP(avpAntialiasText, ASBool) \
+AVP(avpAntialiasLevel, ASInt32) \
+AVP(avpPersistentCacheSize, ASInt32) \
+AVP(avpPersistentCacheFolder, ASPathName) \
+AVP(avpPageViewLayoutMode, PDLayoutMode) \
+AVP(avpSaveAsLinearized, ASBool) \
+AVP(avpMaxOpenDocuments, ASInt32) \
+AVP(avpUseHostFont, ASBool) \
+AVP(avpMarkHiddenPages, ASBool) /* DON'T SAVE TO DISK */ \
+AVPSTR(avpFullScreenTransitionType) \
+AVP(avpFullScreenClick, ASBool) \
+AVP(avpFullScreenEscape, ASBool) \
+AVP(avpFullScreenCursor, ASInt32) \
+AVP(avpOpenInPlace, ASBool) \
+AVP(avpShowHiddenAnnots, ASBool) /* DON'T SAVE TO DISK */ \
+AVP(avpFullScreenUsePageTiming, ASBool) /* DON'T SAVE TO DISK */ \
+AVP(avpDownloadEntireFile, ASBool) \
+AVP(avpEmitHalftones, ASBool) \
+AVP(avpShowMenuBar, ASBool) /* DON'T SAVE TO DISK */ \
+AVP(avpIgnorePageClip, ASBool) \
+AVP(avpMinimizeBookmarks, ASBool) \
+AVP(avpShowAnnotSequence, ASBool) \
+AVP(avpUseLogicalPageNumbers, ASBool) \
+AVS(avpASExtensionDigCert, ASExtensionEncryptedDigitalCertificateRec) \
+AVP(avpShowLeftToolBar, ASBool) \
+AVP(avpAllowOpenFile, ASBool) \
+AVPVOIDP(avpNoteLabelEncoding) \
+AVP(avpBookmarkShowLocation, ASBool) \
+AVP(avpUseLocalFonts, ASBool) \
+AVPSTR(avpCurrCMM) \
+AVP(avpBrowserIntegration, ASBool) \
+AVP(avpBrowserCheck, ASBool) \
+AVP(avpPrintAnnots, ASBool) \
+AVP(avpSendFarEastFonts, ASBool) \
+AVP(avpSuppressCSA, ASBool) \
+AVP(avpAntialiasGraphics, ASBool) \
+AVP(avpSecureOpenFile, ASBool) \
+AVP(avpPaperSize, ASInt32) \
+AVP(avpTrustedMode, ASInt32) \
+AVP(avpTrustedModeOverride, ASInt32) \
+AVP(avpShowUnixEula,ASBool) \
+AVP(avpCMS, ASUns32) \
+AVP(avpCMM, ASUns32) \
+AVPSTR(avpWorkingRGB) \
+AVPSTR(avpWorkingCMYK) \
+AVPSTR(avpWorkingGray) \
+AVP(avpBlackPointCompensation, ASBool) \
+AVP(avpHostBasedCM, ASBool) \
+AVP(avpAntialiasImages, ASBool) \
+AVP(avpDoUpdate, ASBool) \
+AVP(avpUpdateFrequency, ASUns32) \
+AVP(avpShowUpdateDialog, ASBool) \
+AVP(avpLastAcrobatUpdateCheck, ASUns32) \
+AVP(avpDisableAcrobatUpdate, ASBool) \
+AVPSTR(avpOverrideAcrobatUpdateURL) \
+AVP(avpLastWebServicesUpdateCheck, ASUns32) \
+AVP(avpDisableWebServicesUpdate, ASBool) \
+AVP(avpEnableDDR, ASBool) \
+AVP(avpColorArtifactRemoval, ASInt32) \
+AVP(avpGamma, ASInt32) \
+AVP(avpDirectDraw, ASBool) \
+AVP(avpSaveVM, ASBool) \
+AVPSTR(avpColorSettingsFile) \
+AVPSTR(avpPrinterSpace) \
+AVP(avpAccessColorPolicy, ASInt32) \
+AVP(avpAccessOverrideDocColors, ASBool) \
+AVS(avpAccessTextColor, PDColorValueRec) \
+AVS(avpAccessBackgroundColor, PDColorValueRec) \
+AVP(avpShowGrid, ASBool) \
+AVP(avpSnapToGrid, ASBool) \
+AVP(avpGridWidth, ASFixed) \
+AVP(avpGridHeight, ASFixed) \
+AVP(avpGridSubdivisions, ASInt32) \
+AVS(avpGridColor, PDColorValueRec) \
+AVP(avpGridHOffset, ASFixed) \
+AVP(avpGridVOffset, ASFixed) \
+AVS(avpGridMinorColor, PDColorValueRec)\
+AVP(avpAllowByteRangeRequests, ASBool) \
+AVP(avpUsingAreaBoxNames, ASBool) \
+AVP(avpSoftProof, ASBool) \
+AVPSTR(avpProofingSpace)\
+AVP(avpEmitTileMarks, ASInt32) \
+AVP(avpSlugs, ASBool) \
+AVP(avpShowOverprint, ASBool) \
+AVP(avpPrintOverprint, ASBool) \
+AVP(avpNoteOpacity, ASFixed) \
+AVP(avpProofInkBlack, ASBool) \
+AVP(avpProofPaperWhite, ASBool) \
+AVP(avpOptimizeForSpeed, ASBool) \
+AVP(avpAccessPageMode, ASBool) \
+AVP(avpAccessMaxDocModePages, ASInt32) \
+AVP(avpShowTransparencyGrid, ASBool) \
+AVP(avpHoveringPopups, ASBool) \
+AVP(avpFullScreenMonitor, ASInt32) \
+AVP(avpOpenNewDocument, ASBool) \
+AVP(avpOpenAsPDFFilterIndex, ASInt32) \
+AVP(avpSaveAsFilterIndex, ASInt32)\
+AVP(avpHideTabsCompletely, ASBool)\
+AVP(avpPrintUsingWorkingSpaces, ASBool)\
+AVP(avpDisplayRightsDialog, ASBool) \
+AVP(avpCacheFormData, ASBool) \
+AVP(avpEmitPostScriptXObjects, ASBool) \
+AVP(avpWrapLongBookmarks, ASBool) \
+AVP(avpAccessReadOrderOverride, ASBool) \
+AVP(avpAccessReadOrder, ASInt32) \
+AVP(avpFullScreenIgnoreTrans, ASBool) \
+AVP(avpUsePenForInput, ASBool) \
+AVP(avpUseSysSetting, ASBool) \
+AVP(avpPixelsPerInch, ASInt32)
+
+/* DO NOT ADD ANY PREFERENCES TO OR REMOVE ANY PREFERENCES FROM HERE -- these preferences used to use
+** the original preference API. This section is for retaining backwards compatibility
+** with the original API.
+**
+** Use AVAppSetPref___() and AVAppGetPref___() for new preferences.
+**
+** Ask someone if this isn't clear.
+*/
+
+#endif /* AVPREFSD_H */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVProcs.h
new file mode 100644
index 0000000..e205883
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVProcs.h
@@ -0,0 +1,9925 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AVProcs.h
+
+ - Catalog of functions exported by AcroView.
+
+*********************************************************************/
+#if !PLUGIN
+#undef XNPROC
+#undef XPROC
+#undef XSPROC
+#if CAN_EDIT && !READER /* Restore XProcs */
+#define XNPROC NPROC
+#define XPROC PROC
+#define XSPROC SPROC
+#else
+#define XNPROC(returnType, name, params) NOPROC(name)
+#define XPROC(returnType, name, params) NOPROC(name)
+#define XSPROC(returnType, name, params, stubProc) NOPROC(name)
+#endif /* CAN_EDIT && !READER */
+
+#endif
+
+
+/**
+ Gets the ASAtom specifying what type of actions an action handler services.
+ This is the same as the name used when the action handler was registered
+ using AVAppRegisterActionHandler().
+ @param handler IN The action handler whose type is obtained.
+ @return The ASAtom specifying what action types handler services.
+ @see AVAppRegisterActionHandler
+ @see AVActionHandlerGetProcs
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(ASAtom, AVActionHandlerGetType, (AVActionHandler handler))
+
+/**
+ Gets the string that was passed as the user friendly when the action
+ handler was registered using AVAppRegisterActionHandler().
+ @param handler IN The action handler whose user interface name is obtained.
+ @return The user interface name of handler.
+ @see AVAppRegisterActionHandler
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(const char*, AVActionHandlerGetUIName, (AVActionHandler handler))
+
+/**
+ Gets a structure containing pointers to the action handler's procedures.
+
+ <p>This method is useful when you want to subclass a previously registered
+ action handler. Acrobat releases the previously registered action
+ handler when you call AVAppRegisterActionHandler(), so you must copy
+ the previously registered action handler to a new action handler
+ structure, which you use in the call to AVAppRegisterActionHandler().</p>
+ @param handler IN The action handler whose procedures are obtained.
+ @return A pointer to a structure that contains the action handler's callbacks.
+ @see AVAppRegisterActionHandler
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(AVActionHandlerProcs, AVActionHandlerGetProcs, (AVActionHandler handler))
+
+/**
+ Displays an alert containing the specified message, icon, and one
+ to three buttons with the specified titles.
+
+ <p>You can replace this method with your own version, using HFTReplaceEntry(). </p>
+
+ @note It is a limitation of the current implementation that if the button
+ titles do not match either of the following sets, the size of the dialog box
+ is fixed and may not display all of the text in <code>msg</code>:
+
+ <p><code>Yes [, No [, Cancel] ] OK [, Cancel]</code> </p>
+
+ @note All the implementations of the AVAlert methods call AVAlert(),
+ which is a replaceable method. If AVAlert() is replaced, all of the <code>AVAlert</code>
+ methods are also affected.
+ @param iconType IN The icon to display. It must be one of the AVAlert Icons.
+ Mac OS users: These constants are defined as per the standard Mac
+ user interface guidelines.
+
+ <ul>
+ <li>Use <code>NULL</code> for a button title to suppress a button's display.</li>
+ <li>At least <code>button1</code> must be non-<code>NULL</code>. </li>
+ <li><code>button3</code> is not displayed if <code>button2</code> is <code>NULL</code>.</li>
+ </ul>
+
+ @ingroup ReplaceableMethods
+ @param msg IN The message to display.
+ @param button1 IN The title for the first button.
+ @param button2 IN The title for the second button.
+ @param button3 IN The title for the third button.
+ @param beep IN Pass <code>true</code> to perform a system beep when the alert is shown.
+ @return The button number (1, 2, or 3) on which the user clicked.
+ @see AVAlertGetPref
+ @see AVAlertConfirm
+ @see AVAlertNote
+ @see AVDocAlert
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+PROC(ASInt32, AVAlert, (ASInt32 iconType, const char *msg, const char *button1,
+ const char *button2, const char *button3, ASBool beep))
+
+/**
+ Displays a dialog box containing the ALERT_NOTE icon, the specified
+ message and an OK button. The method also performs a system beep.
+
+ @note The implementation of AVAlertNote() calls AVAlert(), which is a
+ replaceable method. If AVAlert() is replaced, AVAlertNote() is also affected.
+ @param msg IN The message to display.
+ @see AVAlert
+ @see AVAlertConfirm
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(void, AVAlertNote, (const char *msg))
+
+/**
+ Displays a dialog box containing the ALERT_CAUTION icon, the specified
+ message, and OK and Cancel buttons. The method also performs a system
+ beep. See AVAlert() for more information.
+ @param msg IN The message to display.
+ @return <code>true</code> if the user clicks OK, <code>false</code> if the user clicks Cancel.
+ @see AVAlert
+ @see AVAlertNote
+ @see AVDocAlertConfirm
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(ASBool, AVAlertConfirm, (const char *msg))
+
+/**
+ Gets the major and minor version numbers of the Acrobat viewer.
+
+ <p>To correctly accommodate cases such as 4.05 and 4.5, the minor version
+ is split into two 8 bit numbers, as shown in the following example:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Version</TH><TH>Description</TH></TR>
+ <TR><TD>4.05</TD><TD>The minor version would be <code>0x0005</code>.</TD></TR>
+ <TR><TD>4.5</TD><TD>The minor version would be <code>0x0500</code>.</TD></TR>
+ </TABLE>
+
+ @param majorP OUT (Filled by the method) A pointer to the major version
+ number.
+ @param minorP OUT (Filled by the method) A pointer to the minor version
+ numbers.
+ @see AVAppGetLanguage
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(void, AVAppGetVersion, (AVTVersionNumPart *majorP, AVTVersionNumPart *minorP))
+
+/**
+ Superseded in Acrobat 6.0 by AVAppGetLanguageWithParams().
+
+ <p>Gets the language in which the application's user interface is running.
+ See the list of Language Codes for the possible return values. </p>
+
+ @param buffer OUT (Filled by the method) The language code. <code>buffer</code> must
+ be able to contain four bytes.
+ @see AVAppGetLanguageWithParams
+ @see AVAppGetVersion
+ @ref LanguageCodes
+
+ @note Superseded in Acrobat 6.0 by AVAppGetLanguageWithParams().
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(void, AVAppGetLanguage, (char* buffer))
+
+/**
+ Gets the ASAtom corresponding to the application's name, which is
+ the name of the file containing the Acrobat viewer application. The
+ user might have changed this, so do not use it to determine what the application
+ is; use ASGetConfiguration() instead.
+ @return An ASAtom representing the Acrobat viewer's name.
+ @see ASGetConfiguration
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(ASAtom, AVAppGetName, (void))
+
+/**
+ Gets the default application cancel procedure. The procedure returns
+ <code>true</code> if the user has recently entered the keystroke described below.
+
+ <p>A cancel procedure is often passed to methods that take a long time to
+ run. The method will call the procedure at frequent intervals, and
+ if the return value is <code>true</code>, the method cancels its operation. </p>
+
+ <p>The keystroke that the application recognizes as a cancel command
+ is platform-dependent: </p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating system</TH><TH>Keystroke</TH></TR>
+ <TR><TD>Mac OS</TD><TD>Command-period</TD></TR>
+ <TR><TD>Windows</TD><TD>Escape</TD></TR>
+ </TABLE>
+
+ @param cancelProcClientDataP IN (Allocated and filled by the method)
+ Data needed by a <code>CancelProc</code>. This value must be passed as the <code>clientData</code>
+ whenever the procedure is called or passed to a method which may call
+ it.
+ @return The default <code>CancelProc</code>, or <code>NULL</code> if one is not available.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(CancelProc, AVAppGetCancelProc, (void **cancelProcClientDataP))
+
+/**
+ The Acrobat viewer calls this method to obtain permission programmatically
+ (without using the user interface) when it wants to quit. To use this method,
+ replace it with your own version using HFTReplaceEntry().
+
+ <p>If you replace this method in UNIX, your replacement implementation
+ must not have any user interface component (for example, dialog boxes).
+ At the time your replacement is called, the Acrobat viewer owns the
+ pointer and will not give it to your dialog box, so the screen will freeze.</p>
+ @ingroup ReplaceableMethods
+ @return Returns <code>true</code> if Acrobat can quit, <code>false</code> if it cannot. The default version
+ of this routine always returns <code>true</code>.
+ @see HFTReplaceEntry
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+PROC(ASBool, AVAppCanQuit, (void))
+
+/**
+ Gets the frontmost document window. In UNIX, it gets the AVDoc
+ being viewed within the window that got the last user event
+ (Key or Button event). This method is often useful for menu
+ or tool enable procs. The frontmost document may not be
+ active. For example, the clipboard window may be active and
+ over it.
+
+ <p>This method returns documents that are being viewed within
+ the host application. In some cases it can return a document
+ open in an external window (for example, a web browser),
+ but you cannot depend on this. </p>
+
+ <p>The safest approach is to avoid calling AVAppGetActiveDoc(),
+ if at all possible. You will usually get good results if
+ AVAppGetActiveDoc() is called only from within menu item or
+ toolbar button callbacks (AVExecuteProc(), AVComputeEnabledProc(),
+ and AVComputeMarkedProc()), but in general it is best to use
+ some bit of context already provided to you to figure out
+ which AVDoc the user is interacting with. Use the following
+ guidelines: </p>
+
+ <ul>
+ <li> If you have a PDDoc available (or can get one from some
+ other PD object) call AVDocFromPDDoc() to find the AVDoc open
+ on the PDDoc. </li>
+ <li> If you have an AVPageView available, call AVPageViewGetAVDoc()
+ to retrieve the AVDoc. </li>
+ <li> If you have an AVPanel available, call AVPanelGetAVDoc() to
+ retrieve the AVDoc that the panel points to. You probably
+ should also provide a <code>DocChanged</code> callback in your panel
+ handler so you will be notified when your panel's document
+ changes. </li>
+ <li> If you have an AVCommand available and are absolutely sure
+ you want an AVDoc, use AVCommandGetPDDoc() and pass the result
+ to AVDocFromPDDoc(). </li>
+ </ul>
+
+ <p>It is also a good idea to localize the determination of the
+ active doc. Occasionally client code calls AVAppGetActiveDoc()
+ often and at various levels. It is more robust to determine
+ the active document once, and then pass it along as an argument
+ to your other routines. </p>
+
+ <p>Also, make absolutely sure you want an AVDoc and not a PDDoc
+ in the first place. If your code can work on a PDDoc (for
+ example, it does not require any user interface) then it should. </p>
+
+ @note AVAppGetActiveDoc is often used to enable a menu item
+ in a client (<code>if AVAppGetActiveDoc() != NULL</code>).
+ @return The frontmost document window, or <code>NULL</code> if no documents are
+ open. <code>NULL</code> is also returned when a document is open but
+ its invisible flag is set (see AVDocOpenParams()) and may
+ be returned while a document is being opened.
+ <p>You can get an AVDoc as it opens by registering for
+ AVDocDidOpen(). </p>
+ @notify AVDocWillOpenFromFile
+ @notify AVDocWillOpenFromPDDoc
+ @notify AVDocDidOpen
+ @see AVAppEnumDocs
+ @see AVAppGetNumDocs
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVDoc, AVAppGetActiveDoc, (void))
+
+/**
+ Gets the number of open document views.
+ @return The number of open AVDocs.
+ @see AVAppGetActiveDoc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(AVTArraySize, AVAppGetNumDocs, (void))
+
+/**
+ Enumerates all AVDoc objects currently open in the viewer, calling the user-
+ supplied procedure for each. It raises an exception only if <code>enumProc</code> raises an exception.
+ @param enumProc IN A user-supplied callback to call once for each open
+ AVDoc.
+ @param clientData IN A pointer to user-supplied data to pass to <code>enumProc</code>
+ each time it is called.
+
+ @see PDEnumDocs
+
+ @note <code>enumProc</code> must not close any documents.
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(void, AVAppEnumDocs, (AVDocEnumProc enumProc, void *clientData))
+
+/**
+ Gets the standard application progress monitor, which puts a
+ combined status window/progress bar in the message pane
+ of the frontmost document window. This progress monitor
+ can subsequently be passed to any API method requiring a
+ progress monitor.
+
+ <p>If you want to display and control a progress monitor in
+ your own client, you can simply invoke the appropriate callbacks
+ in the progress monitor data structure this method returns. </p>
+
+
+ (Acrobat 5.0 and later) A <code>setText</code> value in ASProgressMonitor that
+ allows you to add text to a monitor.
+ @param progMonClientData (Allocated and filled by the
+ method, may not be <code>NULL</code>) Private data used by the progress
+ monitor. This value must be passed as the <code>clientData</code> whenever
+ a callback in the structure is called or the monitor is
+ passed to a method that takes a progress monitor as a parameter.
+ @return The standard application progress monitor, or <code>NULL</code> if no
+ documents are open.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASProgressMonitor, AVAppGetDocProgressMonitor, (void **progMonClientData))
+
+#if HAS_MENUBAR
+
+/**
+ Gets Acrobat's menu bar.
+ @return The menu bar.
+ @see AVMenuGetParentMenubar
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(AVMenubar, AVAppGetMenubar, (void))
+#else
+NOPROC(AVAppGetMenubar)
+#endif
+
+
+/**
+ Retrieves a special toolbar representing
+ the union of all toolbars in the system.
+
+ <p>If this toolbar is passed to AVToolBarEnumButtons(),
+ every button on every non-flyout toolbar will be
+ enumerated.</p>
+
+ <p>If this toolbar is passed to AVToolBarAddButton(),
+ the newly added button will actually be placed on
+ the File menu, unless it is being positioned next
+ to an existing button, in which case it will be
+ placed on the same toolbar as the existing button.</p>
+
+ <p>When adding a button, AVAppGetToolBar() should only be
+ used if the new button is to be added next to an
+ existing button. In fact, it is recommended that you
+ do so by calling AVAppGetToolBar(), finding the existing
+ button, and then placing the new button next to it by
+ calling AVToolBarAddButton(), passing in the toolbar returned
+ by AVAppGetToolBar(). This ensures that if the existing
+ button moves to another toolbar in a later release, your
+ new button will move with it.</p>
+
+ <p>When adding a button that is not going to be positioned
+ next to an existing button, it is recommended that you
+ retrieve the desired toolbar using AVAppGetToolBarByName().</p>
+
+ @return The toolbar.
+ @see AVAppGetToolBarByName
+ @see AVToolBarNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVToolBar, AVAppGetToolBar, (void))
+
+/**
+ Gets the active tool for the application.
+ @return The active tool.
+ @see AVAppSetActiveTool
+ @see AVAppGetLastActiveTool
+ @see AVAppGetDefaultTool
+ @see AVDocGetActiveTool
+
+ @note It is recommended that you use AVDocGetActiveTool()
+ instead, preferably specifying a particular document.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVTool, AVAppGetActiveTool, (void))
+
+/**
+ Gets the tool that was active before the current tool became active.
+
+ @return The last active tool. If only one tool has ever been active, it is returned.
+ @see AVAppGetActiveTool
+ @see AVAppGetDefaultTool
+
+ @note It is recommended that you use AVDocGetLastActiveTool()
+ instead, preferably specifying a particular document.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(AVTool, AVAppGetLastActiveTool, (void))
+
+/**
+ Gets the default tool. Use this method, together with AVAppSetActiveTool(),
+ to restore the default tool any time you want. The default tool is the
+ hand tool.
+ @return The default tool. It returns <code>NULL</code> if there is no default tool.
+ @see AVAppSetActiveTool
+ @see AVAppGetActiveTool
+ @see AVAppGetLastActiveTool
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(AVTool, AVAppGetDefaultTool, (void))
+
+/**
+ Sets the active tool. It does nothing if the specified tool
+ is not currently enabled. The AVComputeEnabledProc() callback in the
+ <code>AVTool</code> structure determines whether a tool is enabled.
+ If this callback is <code>NULL</code>, the tool is
+ always enabled.
+ @param tool The tool to set as the active tool.
+ @param persistent A flag that indicates a preference as
+ to whether the tool stays active after it is used. <code>true</code>
+ is a hint that the tool should, if possible, stay active
+ for an arbitrary number of <i>operations</i> (whatever that happens
+ to be) rather than doing a <i>one shot</i> operation and restoring
+ the prior active tool. Persistence is not enforced by the
+ Acrobat viewer. It is up to a one-shot tool to restore the
+ previously active tool (determined using AVAppGetLastActiveTool()),
+ or to restore the default tool (determined using AVAppGetDefaultTool())
+ if there was no previously active tool.
+ @see AVAppGetActiveTool
+ @see AVAppGetLastActiveTool
+ @see AVAppGetDefaultTool
+ @see AVDocSetActiveTool
+
+ @note It is recommended that you use AVDocSetActiveTool()
+ rather than AVAppSetActiveTool(), preferably specifying a
+ particular document.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppSetActiveTool, (AVTool tool, ASBool persistent))
+
+/**
+ Returns the AVTool that was registered under the specified name.
+ @param name IN The ASAtom corresponding to the tool's name.
+ @return The tool that was registered under <code>name</code>, or <code>NULL</code> if no match was found.
+ @see AVAppGetActiveTool
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(AVTool, AVAppGetToolByName, (ASAtom name))
+
+/**
+ Enumerates all registered tools, calling the user-supplied procedure
+ for each. It raises an exception only if <code>enumProc</code> raises an exception.
+ @param enumProc IN A user-supplied callback to call for each tool.
+ @param clientData IN A pointer to user-supplied data to pass to <code>enumProc</code>
+ each time it is called.
+ @see AVAppGetToolByName
+ @see AVAppRegisterTool
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(void, AVAppEnumTools, (AVToolEnumProc enumProc, void *clientData))
+
+NPROC(void, oldAVAppRegisterTool, (AVTool tool))
+
+
+/**
+ Gets the annotation handler that handles the specified annotation
+ type.
+ @param name The name of the requested annotation handler.
+ @return The annotation handler that services annotations of type
+ <code>name</code>. If no annotation handler is registered for that type,
+ the viewer's default annotation handler is returned. To
+ determine whether the returned annotation handler is the
+ default annotation handler, check the return value from
+ the handler's <code>GetType</code> for the type <code>Unknown</code>.
+ @see AVAppEnumAnnotHandlers
+ @see AVAppGetAnnotHandlerByName
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVAnnotHandler, AVAppGetAnnotHandlerByName, (ASAtom name))
+
+/**
+ Enumerates all registered annotation handlers, calling the user-
+ supplied procedure for each. It raises an exception only if <code>enumProc</code> raises an exception.
+ @param enumProc IN A user-supplied callback to call for each annotation
+ handler.
+ @param clientData IN A pointer to user-supplied data to pass to <code>enumProc</code>
+ each time it is called.
+
+ @see AVAppGetAnnotHandlerByName
+ @see AVAppRegisterAnnotHandler
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(void, AVAppEnumAnnotHandlers, (AVAnnotHandlerEnumProc enumProc, void *clientData))
+
+NPROC(void, oldAVAppRegisterAnnotHandler, (AVAnnotHandler handler))
+
+
+/**
+ Gets the action handler that services the specified action type.
+ @param type IN The action type whose handler is obtained.
+ @return The handler that services actions of the specified type. It returns <code>NULL</code>
+ if no such handler is registered.
+ @see AVAppRegisterActionHandler
+ @see AVActionHandlerGetType
+ @see AVActionHandlerGetUIName
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+
+*/
+NPROC(AVActionHandler, AVAppGetActionHandlerByType, (ASAtom type))
+
+/**
+ Enumerates all registered action handlers, calling the user-
+ supplied procedure for each. It aises an exception only if <code>enumProc</code> raises an exception.
+ @param enumProc IN A user-supplied procedure to call once for
+ each action handler.
+ @param clientData IN A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+
+ @see AVActionHandlerGetProcs
+ @see AVAppRegisterActionHandler
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppEnumActionHandlers, (AVActionEnumProc enumProc, void *clientData),
+ AVAppEnumSupportedActions)
+
+/**
+ Registers an action handler within Acrobat.
+ @param actionHandler IN/OUT A structure containing the callbacks
+ for the action handler to register. This structure must
+ not be freed after calling AVAppRegisterActionHandler.
+ @param actionHandlerObj IN/OUT A pointer to user-supplied data to
+ pass to the action handler's methods when they are invoked.
+
+ @param pdfName IN/OUT The action type serviced by this handler,
+ as it appears in the PDF file. Storage for this string may
+ be released after the call. This string must not contain
+ any white space characters (for example, spaces).
+ @param userName IN/OUT The name of this action type as it should
+ appear in the Acrobat viewer's user interface. Storage for
+ this string may be released after the call.
+ @see AVActionHandlerGetProcs
+ @see AVAppEnumActionHandlers
+ @see AVAppGetActionHandlerByType
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppRegisterActionHandler, (AVActionHandlerProcs actionHandler,
+ void *actionHandlerObj, char *pdfName, char *userName))
+
+/**
+ Gets the value of the specified built-in application preference.
+
+ @param preference IN/OUT The preference value to get. See the
+ preference descriptions in AVPrefsType.
+ @return <code>NULL</code> if preference was not recognized. Otherwise, clients
+ must cast the return value to the appropriate type, depending
+ on the preference requested. See the preference descriptions
+ in AVPrefsType.
+ @see AVAppSetPreference
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void *, AVAppGetPreference, (AVPrefsType preference))
+
+/**
+ Sets the value of the specified built-in application preference.
+ The preference values are automatically saved to disk when
+ a new value is set.
+ @param preference IN/OUT The preference value to set. See AVPrefsType
+ for a list of preference descriptions.
+ @param newValue IN/OUT The new value for the preference. The type of
+ this value is dependent on the preference being set. See
+ AVPrefsType for more information.
+ @notify AVAppOldPrefDidChange
+ @see AVAppGetPreference
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppSetPreference, (AVPrefsType preference, void *newValue))
+
+
+#if HAS_FULL_SCREEN
+
+/**
+ Begins full-screen mode. In full-screen mode, all window
+ borders, the menu bar, and the toolbar are hidden. All regions
+ of the screen outside of the window boundary are painted
+ with the specified color.
+
+ <p>AVAppBeginFullScreen() is ignored if the application is already
+ in full-screen mode, or if there are no currently open documents. </p>
+
+ @param color IN/OUT (May be <code>NULL</code>) The color to use for painting
+ all regions of the screen outside of the window boundary.
+ Pass <code>NULL</code> to use the default color specified by the application
+ preference <code>avpFullScreenColor</code>.
+ @return <code>true</code> if the application enters full-screen mode, <code>false</code> if
+ it is already in full-screen mode or the user selects Cancel
+ from the dialog box describing how to exit full-screen mode.
+
+ @see AVAppEndFullScreen
+ @see AVAppDoingFullScreen
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVAppBeginFullScreen, (PDColorValue color))
+
+/**
+ Ends full-screen mode. It does nothing if the application is
+ not running in full-screen mode.
+ @see AVAppBeginFullScreen
+ @see AVAppDoingFullScreen
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppEndFullScreen, (void))
+
+/**
+ Tests whether the application is running in full-screen
+ mode.
+ @return <code>true</code> if the application is currently in full-screen mode, <code>false</code>
+ otherwise.
+ @see AVAppBeginFullScreen
+ @see AVAppEndFullScreen
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVAppDoingFullScreen, (void))
+#else
+NOPROC(AVAppBeginFullScreen)
+NOPROC(AVAppEndFullScreen)
+NOPROC(AVAppDoingFullScreen)
+#endif
+
+
+/**
+ Prepares the Acrobat viewer to display a modal window. For
+ example, it disables floating windows in Windows, where they
+ are not automatically disabled. When you are done with the
+ modal window, call AVAppEndModal(). Calling AVAppBeginModal()
+ does not make your window modal; it only informs the Acrobat
+ viewer that you intend to display a modal window now.
+
+ <p>If you are displaying a platform modal window that is not wrapped by an <code>AVWindow</code>,
+ call this method passing in <code>NULL</code>.</p>
+
+ <p>Windows users: The parent of a modal window should be determined by calling <code>WinAppGetModalParent()</code>.
+ If the first modal window has an <code>AVWindow</code> wrapper that was passed to this method,
+ you can use <code>WinAppGetModalParent()</code> in this case and obtain the correct result.</p>
+
+ <p>Mac OS and UNIX users: This method must be called.</p>
+
+ @param window IN/OUT The modal window to display.
+ @see AVAppEndModal
+ @see AVAppModalWindowIsOpen
+ @see WinAppGetModalParent
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppBeginModal, (AVWindow window))
+
+/**
+ A client should use this method to determine whether a modal
+ window is open. There is a large (and ill-defined) group
+ of actions that are illegal while a modal window is open,
+ although these actions are not programmatically prevented
+ by the Acrobat viewer. While a modal dialog box is open, a client
+ must not open documents, change pages, change views, close
+ documents, change tools, or do anything that might disrupt
+ the user or Acrobat viewer.
+ @return <code>true</code> if a modal window is open, <code>false</code> otherwise.
+ @see AVAppBeginModal
+ @see AVAppEndModal
+ @see WinAppGetModalParent
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVAppModalWindowIsOpen, (void))
+
+/**
+ (Windows only) Informs the Acrobat viewer that a modal window
+ is no longer being displayed.
+ @see AVAppBeginModal
+ @see AVAppModalWindowIsOpen
+ @see WinAppGetModalParent
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppEndModal, (void))
+
+/**
+ Registers a user-supplied procedure to call regularly
+ when the Acrobat viewer is otherwise idle. If more than
+ one idle procedure is registered, they are all called in
+ a round robin order. The registered idle procs may be called
+ when the Acrobat viewer is not the frontmost application.
+ In addition, in Mac OS, the registered idle procs receive
+ idle events any time a movable modal dialog box or modal AVWindow
+ is displayed, but not a system-modal one. Use AVAppModalWindowIsOpen()
+ if you wish to determine if a modal window is open.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering, and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param idleProc A user-supplied callback to call at idle
+ time.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>idleProc</code> each time it is called.
+ @param period The minimum time between calls to <code>idleProc</code>.
+ <code>idleProc</code> will not be called any more frequently than <code>period</code>,
+ but it may be called less frequently. <code>period</code> is specified
+ in ticks (one tick is 1/60 of a second).
+ @see AVAppUnregisterIdleProc
+ @see AVAppModalWindowIsOpen
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppRegisterIdleProc, (AVIdleProc idleProc, void *clientData, ASUns32 period))
+
+/**
+ Un-registers a user-supplied idle procedure.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering, and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param idleProc The original callback.
+ @param clientData The original <code>clientData</code>.
+ @see AVAppRegisterIdleProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppUnregisterIdleProc, (AVIdleProc idleProc, void *clientData))
+
+/**
+ Registers a user-supplied procedure to call when the specified
+ event occurs.
+
+ <p>Many notifications appear in Will/Did pairs (for example,
+ AVDocWillPerformAction() and AVDocDidPerformAction()). It is
+ possible that an operation may fail after the Will notification
+ and before the Did notification. When this occurs, the Did
+ notification is still broadcast, but the <code>err</code> parameter in
+ the Did notification is non-zero, and represents the error
+ that occurred. When <code>err</code> is non-zero, the other parameters
+ are not necessarily valid. Always check <code>err</code> in a Did notification
+ before using the other parameters. </p>
+
+ <p>When calling AVAppUnregisterNotification() to un-register
+ for a notification, you must pass the <code>proc</code>, <code>clientData</code>,
+ and <code>owner</code> that were used when the notification was registered
+ using AVAppRegisterNotification(). You must use the same callback
+ that was used to register; you cannot use a newly created
+ callback. To accomplish this, call ASCallbackCreateNotification()
+ once before registering, and use the value returned from
+ this call both to register and un-register; do not call
+ ASCallbackCreateNotification() a second time when un-registering.
+ You will then need to destroy the pointer to the callback
+ using the ASCallbackDestroy() method. </p>
+ @param nsel The notification type. It must be one of the
+ notification selectors (see Notifications). The notification
+ selector is the name of the notification with the characters
+ <code>NSEL</code> appended. For example, the selector for AVDocDidOpen()
+ is AVDocDidOpenNSEL().
+ @param owner The <code>gExtensionID</code> of the client registering
+ the notification.
+ @param proc A user-supplied callback to call when the notification
+ occurs. Its declaration depends on the notification type
+ (see Notifications). Remember to use ASCallbackCreateNotification()
+ to convert <code>proc</code> to a callback before passing it to AVAppRegisterNotification().
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see AVAppUnregisterNotification
+ @see ASCallbackCreateNotification
+ @see ASCallbackDestroy
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppRegisterNotification, (NSelector nsel, ASExtension owner, void *proc,
+ void *clientData), AVExtensionMgrRegisterNotification)
+
+/**
+ Un-registers a user-supplied notification procedure.
+
+ <p>To un-register, you must use the same callback, <code>clientData</code>,
+ and <code>owner</code> that were used when the notification was registered
+ using AVAppRegisterNotification(). To accomplish this, call
+ ASCallbackCreateNotification() once before registering, and
+ use the value returned from this call both to register and
+ un-register; do not call ASCallbackCreateNotification() a
+ second time when un-registering.</p>
+ @param nsel The notification type.
+ @param owner The <code>gExtensionID</code> of the client registering
+ the notification.
+ @param proc The original callback.
+ @param clientData The original <code>clientData</code>.
+ @see AVAppRegisterNotification
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppUnregisterNotification, (NSelector nsel, ASExtension owner, void *proc,
+ void *clientData),AVExtensionMgrUnregisterNotification)
+
+NPROC(AVDoc, oldAVDocOpenFromFile, (ASPathName pathName, ASFileSys fileSys, char *tempTitle))
+PROC(AVDoc, oldAVDocOpenFromFileWithParams, (ASPathName pathName, ASFileSys fileSys,
+ char *tempTitle, oldAVDocOpenParams params))
+NPROC(AVDoc, oldAVDocOpenFromPDDoc, (PDDoc doc, char *tempTitle))
+NPROC(AVDoc, oldAVDocOpenFromPDDocWithParams, (PDDoc pdDoc, char *tempTitle, oldAVDocOpenParams params))
+
+/**
+ Closes the document window, optionally prompting the user
+ to save the document if it has been modified. When this
+ method closes the AVDoc, it also closes the underlying PDDoc.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @param doc IN/OUT The document to close.
+ @param noSave IN/OUT If <code>true</code>, the document is closed without prompting
+ the user and without saving, even if the document has been
+ modified. Because this can cause data loss without user
+ approval, use this feature judiciously. If <code>false</code>, it prompts the
+ user to save the document if it has been modified.
+ @return <code>true</code> if the document closed, <code>false</code> if it did not (for example,
+ if the user was prompted with the Save dialog box and chose
+ Cancel). The document will always close if <code>noSave</code> is <code>true</code>.
+
+ @ingroup ReplaceableMethods
+ @notify AVDocWillClose
+ @notify AVDocDidClose
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromPDDoc
+ @see AVDocDoSave
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+PROC(ASBool, AVDocClose, (AVDoc doc, ASBool noSave))
+
+/**
+ Gets the PDDoc to associate with the specified AVDoc.
+ @param avDoc IN/OUT The document whose PDDoc is obtained.
+ @return The PDDoc associated with <code>avDoc</code>.
+ @see AVDocOpenFromPDDoc
+ @see PDEnumDocs
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(PDDoc, AVDocGetPDDoc, (AVDoc avDoc))
+
+/**
+ Gets the AVPageView for the specified document.
+ @param doc The document whose AVPageView is obtained.
+ @return The document's AVPageView.
+ @see AVDocGetAVWindow
+ @see AVDocGetViewMode
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVPageView, AVDocGetPageView, (AVDoc doc))
+
+/**
+ Gets the AVWindow in which the document is displayed.
+ If more than one window is open for a document,
+ this call returns the active window for that document,
+ which is the one with which the user is interacting.
+
+ @param doc The document whose AVWindow is obtained.
+ @return The document's AVWindow.
+ @see AVDocGetPageView
+ @see AVDocGetNumWindows
+ @see AVDocGetNthWindow
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVWindow, AVDocGetAVWindow, (AVDoc doc))
+
+/**
+ Gets the current view mode.
+ @param doc IN/OUT The document whose view mode is obtained.
+ @return The current view mode.
+ @see AVDocSetViewMode
+ @see PDDocGetPageMode
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(PDPageMode, AVDocGetViewMode, (AVDoc doc))
+
+/**
+ Sets the current view mode.
+
+ <p>This method does nothing if the current view mode is full-
+ screen, PDFullScreen. In this case, call AVAppEndFullScreen()
+ first. </p>
+ @param doc IN/OUT The document whose view mode is set.
+ @param newMode IN/OUT The view mode to set.
+ @see AVAppEndFullScreen
+ @see AVDocGetViewMode
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVDocSetViewMode, (AVDoc doc, PDPageMode newMode))
+
+/**
+ Gets the splitter position. The splitter is the vertical
+ division between the bookmark/thumbnail pane and the document
+ pane. The default splitter location is saved in the Acrobat
+ viewer's preferences file, and can be read and set using AVAppGetPreference()
+ and AVAppSetPreference().
+ @param doc IN/OUT The document whose splitter position is obtained.
+
+ @return The width of the bookmark/thumbnail pane, measured in pixels.
+ Returns <code>0</code> if the bookmark/thumbnail pane is not currently
+ displayed.
+ @see AVDocSetSplitterPosition
+ @see AVAppGetPreference
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASInt16, AVDocGetSplitterPosition, (AVDoc doc))
+
+/**
+ Sets the splitter position. The splitter is the vertical
+ division between the bookmark/thumbnail pane and the document
+ pane. The default splitter location is saved in the Acrobat
+ viewer's preferences file, and can be read and set using AVAppGetPreference()
+ and AVAppSetPreference().
+ @param doc The document whose splitter position is set.
+
+ @param newPosition The new splitter position. This value
+ specifies the width of the bookmark/thumbnail pane in pixels.
+ @see AVDocGetSplitterPosition
+ @see AVAppSetPreference
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVDocSetSplitterPosition, (AVDoc doc, ASInt16 newPosition))
+
+/**
+ Prints without displaying any user dialog boxes. The current
+ printer, page settings, and job settings are used. Printing
+ is complete when this method returns.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param doc The document from which pages are printed.
+
+ @param firstPage The first page in <code>doc</code> to print.
+ @param lastPage The last page in <code>doc</code> to print.
+ @param psLevel Applies to PostScript printing. It must be
+ either <code>1</code> or <code>2</code>. If <code>1</code>, Level 1 PostScript code is generated.
+ If <code>2</code>, Level 2 PostScript code is generated.
+ @param binaryOK Applies to PostScript printing. If <code>true</code>,
+ the PostScript code may contain binary data. If <code>false</code>, all
+ binary data is encoded into an ASCII format.
+ @param shrinkToFit If <code>true</code>, the page is shrunk (if necessary)
+ to fit into the imageable area of a page in the printer.
+ If <code>false</code>, pages are printed at actual size and may appear
+ clipped on the printed page.
+ @exception genErrBadParm is raised if an invalid parameter is provided.
+ It can raise any of the <code>CosErrExpected</code> exceptions, such as ErrSysCosSyntax or cosErrExpectedNumber.
+ In general, this method can raise any exception that can occur
+ during the parsing of a page and its resources, such as pdErrUnknownProcsets or
+ pdErrUnableToExtractFontErr.
+ @notify PDDocWillPrintPages
+ @notify PDDocWillPrintPage
+ @notify PDDocDidPrintPage
+ @notify PDDocDidPrintPages
+ @notify PDDocDidPrintTiledPage
+ @notify PDDocPrintingTiledPage
+ @notify PDDocWillPrintTiledPage
+ @see AVDocDoPrint
+ @see AVDocPrintPagesWithParams
+
+ @note If security has been set on a file so that it is not
+ printable, the document will not print, but no error is
+ raised. Check the security before printing the file.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+PROC(void, AVDocPrintPages, (AVDoc doc, AVPageIndex firstPage, AVPageIndex lastPage,ASInt32 psLevel,
+ ASBool binaryOK, ASBool shrinkToFit))
+
+/**
+ Gets the current selection's type for the specified document.
+
+ @param doc The document whose selection type is obtained.
+ @return The ASAtom corresponding to the current selection type.
+ Returns ASAtomNull if there is no selection. The ASAtom
+ returned can be converted to a string using ASAtomGetString().
+ See Selection Types for a list of the built-in selection
+ types.
+ @see AVDocGetSelection
+ @see AVDocSetSelection
+
+ @note To get information about the selected annotation,
+ use AVPageViewGetFocusAnnot().
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, AVDocGetSelectionType, (AVDoc doc))
+
+/**
+ Gets the current selection for the specified document.
+ @param doc The document whose selection is obtained.
+ @return The current selection, or <code>NULL</code> if there is no selection.
+ See Selection Types for a list of the data types returned
+ for the built-in selection types. A <code>NULL</code> return value from
+ this method is not sufficient to determine whether there is
+ no selection; use AVDocGetSelectionType() instead.
+ @see AVDocSetSelection
+ @see AVDocGetSelectionType
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocEnumSelection
+ @see AVDocCopySelection
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void*, AVDocGetSelection, (AVDoc doc))
+
+/**
+ Sets the document's current selection to the specified selection
+ by calling the appropriate selection server's AVDocSelectionGettingSelectionProc()
+ callback. It clears the previous selection, if any, by calling
+ the previous selection server's AVDocSelectionLosingSelectionProc()
+ callback.
+
+ <p>This raises only those exceptions raised by the previous selection server's
+ AVDocSelectionGettingSelectionProc(), and those raised by
+ the new selection server's AVDocSelectionGettingSelectionProc().</p>
+
+ <p>The following selection types can be specified when calling this method. The <i>Details</i> column
+ specifies what should be used for the <code>data</code> parameter:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Selection Type</TH><TH>Description</TH><TH>Data Type</TH><TH>Details</TH></TR>
+ <TR><TD><code>Text</code></TD><TD>Text in the document</TD><TD><code>PDTextSelect</code></TD><TD>Use PDDocCreateTextSelect() to create the selection.</TD></TR>
+ <TR><TD><code>Bitmap</code></TD><TD>Graphics</TD><TD><code>AVGrafSelect</code></TD><TD>Use AVGrafSelectCreate() to create the selection.</TD></TR>
+ <TR><TD><code>Annotation</code></TD><TD>Annotation (text annotation, link, and so on)</TD><TD>To get information about a selected annotation, use AVPageViewGetFocusAnnot().</TD><TD>Allocate memory using <code>ASmalloc(sizeof(PDAnnot))</code>. Copy the desired PDAnnot into the allocated memory and pass a pointer to it. The annotation selection server assumes responsibility for freeing the memory.</TD></TR>
+ <TR><TD><code>Thumbnail</code></TD><TD>Thumbnail image</TD><TD><code></code></TD><TD>Pass the page number (the first page in a document is page <code>0</code>).</TD></TR>
+ </TABLE>
+
+ @param doc The AVDoc in which the selection is set.
+ @param type The selection type. It can be either a built-in type
+ or one supported by a selection server added by a client.
+ It can be converted to an ASAtom using ASAtomFromString(). See
+ Selection Types for a list of the built-in selection types.
+
+ @param data A data structure representing the selection.
+ Its type depends on what is passed in <code>type</code>. See Selection
+ Types for a list of the data types for the built-in selection
+ types.
+ @param highlight Clients should pass <code>true</code>, which tells
+ the Acrobat viewer to highlight the selection because it
+ has not already been highlighted. This only marks the highlighted
+ regions of the display as invalid, but does not immediately
+ redraw the screen. Use AVPageViewDrawNow() to force an immediate
+ redraw if you wish.
+ @return <code>true</code> if the selection was set successfully, <code>false</code> otherwise.
+ This method can fail for reasons including:
+ <ul>
+ <li> There is no selection server for <code>type</code>. </li>
+ <li> There was an attempt to set the selection during link creation. </li>
+ </ul>
+
+ @notify AVDocDidSetSelection
+ @see AVGrafSelectCreate
+ @see AVPageViewDrawNow
+ @see AVDocRegisterSelectionServer
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocDoSelectionProperties
+ @see AVDocEnumSelection
+ @see AVDocCopySelection
+ @see PDDocCreateTextSelect
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVDocSetSelection, (AVDoc doc, ASAtom type, void* data, ASBool highlight))
+
+/**
+ Deletes the specified document's current selection, if possible.
+ The selection is deleted if changing the selection is currently
+ permitted, the selection server has an AVDocSelectionDeleteProc()
+ callback, and the selection server's AVDocSelectionCanDeleteProc()
+ callback returns <code>true</code>. If the selection server does not
+ have a AVDocSelectionCanDeleteProc() callback, a default value
+ of <code>true</code> is used.
+
+ <p>The selection is deleted by calling the selection server's
+ AVDocSelectionDeleteProc() callback. </p>
+
+ <p>It only raises those exceptions raised by the selection server's AVDocSelectionDeleteProc()
+ and AVDocSelectionCanDeleteProc() callbacks.</p>
+
+ @param doc IN/OUT The document whose selection is deleted.
+ @return <code>true</code> if the current selection was actually deleted, <code>false</code>
+ otherwise.
+ @notify AVDocDidDeleteSelection
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVDocDeleteSelection, (AVDoc doc))
+
+/**
+ Clears and destroys the current selection by calling the
+ appropriate selection server's AVDocSelectionLosingSelectionProc().
+
+ @param doc IN/OUT The document whose selection is cleared.
+ @param highlight IN/OUT Pass <code>true</code> to instruct the Acrobat
+ viewer to remove the selection's highlighting, if it has
+ not already been removed. The selection handler may only
+ mark the highlighted regions of the display as invalid, but
+ does not force an immediate redraw of the page view. Use
+ AVPageViewDrawNow() to force an immediate redraw if you wish.
+
+ @return <code>true</code> if the current selection was cleared, <code>false</code> otherwise.
+
+ @notify Broadcasts AVDocWillClearSelection() if the selection type
+ is not ASAtomNull.
+ @see AVDocSetSelection
+ @see AVDocCopySelection
+ @see AVDocEnumSelection
+ @see AVDocDoSelectionProperties
+ @see AVDocGetSelection
+ @see AVDocDeleteSelection
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVDocClearSelection, (AVDoc doc, ASBool highlight))
+
+/**
+ Copies the current selection to the clipboard, if possible.
+ The selection is copied if the selection server has a AVDocSelectionCopyProc()
+ callback, and the selection server's AVDocSelectionCanCopyProc()
+ callback returns <code>true</code>. If the selection server does not
+ have a AVDocSelectionCanCopyProc() method, a default value
+ of <code>true</code> is used.
+
+ <p>The selection is copied by calling the selection server's
+ AVDocSelectionCopyProc() callback. </p>
+
+ <p>It only raises those exceptions raised by the selection server's AVDocSelectionCopyProc()
+ and AVDocSelectionCanCopyProc() callbacks.</p>
+
+ @param doc IN/OUT The document whose selection is copied.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVDocCopySelection, (AVDoc doc))
+
+/**
+ Enumerates the elements of the current selection by calling
+ the current selection server's AVDocSelectionEnumSelectionProc()
+ callback. If the selection server does not have an AVDocSelectionEnumSelectionProc(),
+ it calls <code>proc</code> and passes the entire selection to it in the
+ <code>aSelectedObject</code> parameter.
+
+ <p>It only raises those exceptions raised by the selection server's AVDocSelectionEnumSelectionProc()
+ callback, and those raised by <code>proc</code>.</p>
+
+ @param doc The document whose selection is enumerated.
+
+ @param proc A user-supplied callback to call for each element
+ in the selection. The enumeration ends if <code>proc</code> returns <code>false</code>.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see AVDocRegisterSelectionServer
+ @see AVDocSetSelection
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocCopySelection
+ @see AVDocSelectionEnumPageRanges
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVDocEnumSelection, (AVDoc doc, AVSelectionEnumProc proc, void *clientData))
+
+/**
+ Displays the user interface, if any, for setting the current
+ selection's properties. It does this by invoking the AVDocSelectionPropertiesProc()
+ callback, if any, of the current selection's selection server.
+
+ <p>It only raises those exceptions raised by the selection server's AVDocSelectionPropertiesProc() callback.</p>
+
+ @param doc IN/OUT The document containing the selection whose
+ properties are set.
+ @see AVDocRegisterSelectionServer
+ @see AVDocSetSelection
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVDocDoSelectionProperties, (AVDoc doc))
+
+/**
+ Displays the current selection by calling the selection
+ server's AVDocSelectionShowSelectionProc() callback. It does
+ nothing if the document has no selection, or the current
+ selection's server has no AVDocSelectionShowSelectionProc()
+ callback.
+
+ <p>It only raises those exceptions raised by the selection server's AVDocSelectionShowSelectionProc() callback.</p>
+
+ @param doc IN/OUT The document whose selection is shown.
+ @see AVDocSetSelection
+ @see AVGrafSelectCreate
+ @see AVDocRegisterSelectionServer
+ @see PDDocCreateTextSelect
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreateWordHilite
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVDocShowSelection, (AVDoc doc))
+
+NPROC(oldAVDocSelectionServer, oldAVDocGetSelectionServerByType, (ASAtom type))
+NPROC(ASBool, oldAVDocRegisterSelectionServer, (oldAVDocSelectionServer server))
+
+
+/**
+ Performs an action.
+ @param doc The document containing the action to perform.
+
+ @param action The action to perform.
+ @exception pdErrBadAction
+ @notify AVDocWillPerformAction
+ @notify AVDocDidPerformAction
+ @see AVDocDoActionPropsDialog
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVDocPerformAction, (AVDoc doc, PDAction action))
+
+#if HAS_MENUBAR
+
+/**
+ Shows the menu bar.
+ @param menubar IN/OUT The menu bar to show.
+ @see AVMenubarHide
+ @see AVAppGetMenubar
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenubarShow, (AVMenubar menubar))
+
+/**
+ Hides the menu bar.
+ @param menubar IN/OUT The menu bar to hide.
+ @see AVMenubarShow
+ @see AVAppGetMenubar
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenubarHide, (AVMenubar menubar))
+
+/**
+ Gets the number of menus in <code>menubar</code>.
+ @param menubar IN/OUT The menu bar for which the number of menus
+ is obtained.
+ @return The number of menus in the menu bar, not including submenus.
+ Returns <code>0</code> if <code>menubar</code> is <code>NULL</code>.
+ @see AVAppGetMenubar
+ @see AVMenubarAcquireMenuByIndex
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVTArraySize, AVMenubarGetNumMenus, (AVMenubar menubar))
+
+/**
+ Acquires the menu or submenu that has the specified language-independent
+ menu name (case-sensitive). When you are done using the
+ menu, release it using AVMenuRelease(). Acquiring a menu by
+ name is generally reliable, because names (unlike indices)
+ do not change as menus are added or rearranged.
+ @param menubar The menu bar in which the menu item is located.
+
+ @param name The language-independent name of the menu
+ to acquire. See Menu and Menu Item Names for a list of the
+ names of the built-in menus in Acrobat.
+ @return The menu with the specified name.
+ @see AVAppGetMenubar
+ @see AVMenuRelease
+ @see AVMenubarAcquireMenuItemByName
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenubarAcquireMenuByIndex
+ @ref MenuItemNames
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenu, AVMenubarAcquireMenuByName, (AVMenubar menubar, const char *name))
+
+/**
+ Acquires the menu with the specified index. Menu indices
+ are generally not reliable: they change as clients add, remove,
+ or rearrange menus, and may differ in different versions
+ of the Acrobat viewer (if menus are rearranged, removed,
+ or added). Menus should generally be acquired using AVMenubarAcquireMenuByName(),
+ which is generally reliable.
+ @param menubar The menu bar in which the menu is located.
+
+ @param menuIndex The index (in <code>menubar</code>) of the menu to
+ acquire.
+ @return The menu with the specified index. It returns <code>NULL</code> if there is no such
+ menu or if <code>menubar</code> is <code>NULL</code>.
+ @see AVMenubarAcquireMenuByName
+ @see AVMenubarAcquireMenuByPredicate
+ @see AVAppGetMenubar
+ @see AVMenuRelease
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenu, AVMenubarAcquireMenuByIndex, (AVMenubar menubar, AVMenuIndex menuIndex))
+
+/**
+ Acquires a menu using a user-supplied selection routine.
+ This method can also be used to enumerate all menus. When
+ you are done using the menu that is acquired, release it
+ using AVMenuRelease().
+ @param menubar IN/OUT The menu bar containing the menu to acquire.
+
+ @param predicate IN/OUT A user-supplied <code>AVMenuPredicate</code> function
+ that determines which menu is acquired. Menus are searched
+ depth-first. The first menu for which predicate returns
+ <code>true</code> is acquired. If <code>predicate</code> always returns <code>false</code>, all
+ menus will be enumerated.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>predicate</code> each time it is called.
+ @return The first menu for which predicate returned <code>true</code>. It returns
+ <code>NULL</code> if predicate never returned <code>true</code> or if <code>menubar</code> is <code>NULL</code>.
+
+ @see AVMenuRelease
+ @see AVMenubarAcquireMenuByName
+ @see AVMenubarAcquireMenuByIndex
+ @see AVAppGetMenubar
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenu, AVMenubarAcquireMenuByPredicate, (AVMenubar menubar, AVMenuPredicate predicate,
+ void *clientData))
+
+/**
+ Acquires the menu item with the specified language-independent
+ menu item name (case-sensitive). This method automatically
+ searches all menus and submenus. When you are done using
+ the menu item, release it using AVMenuItemRelease(). Acquiring
+ a menu item by name is generally reliable, because names
+ (unlike indices) do not change as menus items are added
+ or rearranged.
+ @param menubar The menu bar in which the menu item is located.
+
+ @param name The language-independent name of the menu
+ item to acquire. See Menu and Menu Item Names for the language-independent
+ names of the menu items built into Adobe Reader and Acrobat.
+ The language-independent names of menu items added by Adobe
+ clients are described in the technical notes for those clients.
+ @return The menu item with the specified name. It returns <code>NULL</code> if no
+ such menu item exists, if <code>menubar</code> is <code>NULL</code>, or if <code>name</code> is
+ <code>NULL</code>.
+ @see AVAppGetMenubar
+ @see AVMenuItemRelease
+ @see AVMenubarAcquireMenuByName
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenuAcquireMenuItemByIndex
+ @ref MenuItemNames
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuItem, AVMenubarAcquireMenuItemByName, (AVMenubar menubar, const char *name))
+
+/**
+ Acquires a menu item using a user-supplied selection routine.
+ This method may also be used to enumerate all menu items.
+ When you are done using the menu item that is acquired,
+ release it using AVMenuItemRelease().
+ @param menubar The menu bar containing the menu to acquire.
+
+ @param predicate A user-supplied function that determines
+ which menu item is acquired. Menu items are searched depth-first.
+ The first menu item for which <code>predicate</code> returns <code>true</code> is
+ acquired. If <code>predicate</code> always returns <code>false</code>, all menu items
+ will be enumerated.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>predicate</code> each time it is called.
+ @return The first menu item for which <code>predicate</code> returned <code>true</code>. It returns
+ <code>NULL</code> if <code>predicate</code> never returns <code>true</code> or if <code>menubar</code> is <code>NULL</code>.
+
+ @see AVMenuItemRelease
+ @see AVMenubarAcquireMenuByName
+ @see AVMenuAcquireMenuItemByIndex
+ @see AVAppGetMenubar
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuItem, AVMenubarAcquireMenuItemByPredicate, (AVMenubar menubar,
+ AVMenuItemPredicate predicate, void *clientData))
+
+/**
+ Gets the index of the specified menu in the menu bar.
+ @param menubar The menu bar in which the menu is located.
+
+ @param menu The menu whose index is obtained.
+ @return The specified menu's index. It returns BAD_MENU_INDEX if the
+ menu is not in the menubar, is a submenu, if <code>menubar</code> is
+ <code>NULL</code>, or if <code>menu</code> is <code>NULL</code>.
+ @see AVAppGetMenubar
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuIndex, AVMenubarGetMenuIndex, (AVMenubar menubar, AVMenu menu))
+
+/**
+ Inserts a menu into the menubar. It does nothing if <code>menubar</code>
+ is <code>NULL</code> or <code>menu</code> is <code>NULL</code>.
+ @param menubar The menu bar into which the menu is added.
+
+ @param menu The menu to add.
+ @param menuIndex The position at which the menu is added.
+ The left-most menu in a menu bar has an index of zero. Passing
+ a value of APPEND_MENU (see AVExpT.h.) adds the menu to
+ the end of the menu bar.
+ @exception genErrNoMemory
+ @see AVMenuNew
+ @see AVMenuRemove
+ @see AVMenubarAddHiddenMenu
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenubarAddMenu, (AVMenubar menubar, AVMenu menu, AVMenuIndex menuIndex))
+
+#else
+
+NOPROC(AVMenubarShow)
+NOPROC(AVMenubarHide)
+NOPROC(AVMenubarGetNumMenus)
+NOPROC(AVMenubarAcquireMenuByName)
+NOPROC(AVMenubarAcquireMenuByIndex)
+NOPROC(AVMenubarAcquireMenuByPredicate)
+NOPROC(AVMenubarAcquireMenuItemByName)
+NOPROC(AVMenubarAcquireMenuItemByPredicate)
+NOPROC(AVMenubarGetMenuIndex)
+NOPROC(AVMenubarAddMenu)
+
+#endif
+
+#if HAS_MENUS
+
+/**
+ Creates and acquires a new menu with the given title and
+ language-independent name. The menu can be added to the
+ menu bar using AVMenubarAddMenu(). When you are done using
+ the menu, release it using AVMenuRelease().
+ @param title The string that appears in the user interface.
+ On Windows, an ampersand (<code>&</code>) character in the string results
+ in underlining the character after it on the menu.
+ @param name The language-independent name of the menu to create:
+ it is the value returned by AVMenuGetName(). It must not contain
+ any spaces. Developers should prefix the names of menus
+ they add with the name of their client and a colon, to avoid
+ collisions in the menu name space. For example, a client
+ named <code>myPlug</code> might add menus named <code>myPlug:DrawTools</code> and
+ <code>myPlug:Checkout</code>.
+ @param owner The <code>gExtensionID</code> extension registering the
+ menu.
+ @return The newly created menu.
+ @exception genErrNoMemory
+ @see AVMenuRelease
+ @see AVMenubarAddMenu
+ @see AVMenuGetName
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenu, AVMenuNew, (const char *title, const char *name,ASExtension owner))
+
+/**
+ Acquires the specified menu. It increments the menu's reference
+ count. When you are done using the menu item, release it
+ using AVMenuRelease().
+ @param menu IN/OUT The menu to acquire.
+ @return The menu acquired.
+ @see AVMenubarAcquireMenuByIndex
+ @see AVMenubarAcquireMenuByName
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenuRelease
+ @see AVMenuNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenu, AVMenuAcquire, (AVMenu menu))
+
+/**
+ Releases the specified menu. It decrements the reference count
+ and automatically destroys the menu when its reference count
+ is zero.
+ @param menu The menu to release.
+ @see AVMenuAcquire
+ @see AVMenuNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuRelease, (AVMenu menu))
+#else
+NOPROC(AVMenuNew)
+NOPROC(AVMenuAcquire)
+NOPROC(AVMenuRelease)
+#endif
+
+#if HAS_MENUBAR
+
+/**
+ Removes a menu from the menu bar and releases it. If the
+ menu is a submenu, this method does nothing.
+ @param menu IN/OUT The menu to remove.
+ @see AVMenuItemRemove
+ @see AVMenuRelease
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuRemove, (AVMenu menu))
+#else
+NOPROC(AVMenuRemove)
+#endif
+
+#if HAS_MENUS
+
+/**
+ Gets the ASAtom for the menu's language-independent name.
+
+ @param menu IN/OUT The menu whose language-independent name is
+ obtained.
+ @return The menu's name. The ASAtom can be converted to a string
+ using ASAtomGetString(). It returns <code>NULL</code> if <code>menu</code> is <code>NULL</code>.
+ @see AVMenuAcquire
+ @see AVMenuGetTitle
+ @see AVMenuNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, AVMenuGetName, (AVMenu menu))
+
+/**
+ Gets the menu's title as it appears in the user interface.
+ The length of the title remains <code>0</code> if menu is <code>NULL</code>.
+ @param menu The menu whose title is obtained.
+ @param buffer (Filled by the method) A buffer into which
+ the title is copied. If <code>buffer</code> is <code>NULL</code>, it is not filled;
+ the length of the title is still returned.
+ @param bufferSize The maximum number of characters the
+ buffer can hold.
+ @return If <code>menu</code> is non-zero, the length of the title is returned. If
+ <code>menu</code> is <code>NULL</code> and <code>buffer</code> is not, <code>buffer</code> is zeroed. It returns
+ <code>0</code> if <code>buffer</code> is <code>NULL</code>.
+ @see AVMenuGetName
+ @see AVMenuNew
+ @see AVMenuItemGetTitle
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVTArraySize, AVMenuGetTitle, (AVMenu menu, char *buffer, AVTArraySize bufferSize))
+
+/**
+ Gets the number of menu items in a menu, including those
+ that are visible only in long-menus mode.
+ @param menu IN/OUT The menu for which the number of menu items
+ is obtained.
+ @return The number of menu items in the specified menu. It returns
+ <code>0</code> if <code>menu</code> is <code>NULL</code>.
+ @see AVMenuAcquireMenuItemByIndex
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVTArraySize, AVMenuGetNumMenuItems, (AVMenu menu))
+
+/**
+ Acquires the menu item at the specified location in the
+ specified menu. When you are done using the menu item, release
+ it using AVMenuItemRelease(). Menu item indices are generally
+ not reliable: they change as clients add, remove, or rearrange
+ menu items, and may differ in different versions of the
+ Acrobat viewer (if menu items are rearranged, removed, or
+ added). Menu items should generally be acquired using AVMenubarAcquireMenuItemByName(),
+ which is generally reliable.
+ @param menu The menu in which a menu item is acquired.
+
+ @param menuItemIndex The index of the menu item in <code>menu</code>
+ to acquire. The first item in a menu has an index of zero.
+ Even if the Acrobat viewer is displaying short menus, the
+ index includes any intervening long-mode-only menu items
+ (irrelevant for Acrobat 3.0 or later since there are no
+ short menus).
+ @return The menu item whose index is specified. It returns <code>NULL</code> if
+ <code>menu</code> is <code>NULL</code>, if the index is less than zero, or the index
+ is greater than the number of menu items in the menu.
+ @see AVMenuGetNumMenuItems
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenubarAcquireMenuItemByName
+ @see AVMenuItemAcquire
+ @see AVMenuItemRelease
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuItem, AVMenuAcquireMenuItemByIndex, (AVMenu menu, AVMenuIndex menuItemIndex))
+
+/**
+ Gets the index of the specified menu item in the specified
+ menu.
+
+ <p>Indices must be used with caution, because they change as
+ clients add, remove, or rearrange menu items. </p>
+ @param menu The menu in which <code>menuItem</code> is located.
+ @param menuItem The menu item whose index is obtained.
+ @return The index of <code>menuItem</code> in <code>menu</code>. The first item in a menu
+ has an index of zero. Even if the Acrobat viewer is displaying
+ short menus, the index includes any intervening long-mode-only
+ menu items (irrelevant for Acrobat 3.0 or later since there
+ are no short menus).
+
+ @return BAD_MENUITEM_INDEX (see AVExpT.h) if <code>menuItem</code> is
+ not in <code>menu</code>, if <code>menu</code> is
+ <code>NULL</code>, or <code>menuItem</code> is <code>NULL</code>.
+ @see AVMenuGetNumMenuItems
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuIndex, AVMenuGetMenuItemIndex, (AVMenu menu, AVMenuItem menuItem))
+#else
+NOPROC(AVMenuGetName)
+NOPROC(AVMenuGetTitle)
+NOPROC(AVMenuGetNumMenuItems)
+NOPROC(AVMenuAcquireMenuItemByIndex)
+NOPROC(AVMenuGetMenuItemIndex)
+#endif
+
+#if HAS_MENUBAR
+
+/**
+ Gets the parent menu bar for the specified menu.
+ @param menu IN/OUT The menu whose parent menu bar is obtained.
+
+ @return The menu bar to which the menu is attached. It returns <code>NULL</code>
+ if the menu has not yet been added to the menu bar, or if
+ the menu is a submenu.
+ @see AVMenuGetParentMenuItem
+ @see AVMenubarGetMenuIndex
+ @see AVMenuItemGetParentMenu
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenubar, AVMenuGetParentMenubar, (AVMenu menu))
+#else
+NOPROC(AVMenuGetParentMenubar)
+#endif
+
+#if HAS_MENUS
+
+/**
+ Gets the parent menu item for the specified menu.
+ @param menu IN/OUT The menu whose parent menu item is obtained.
+
+ @return The menu item for which the specified menu is a submenu.
+ Returns <code>NULL</code> if the specified menu is not a submenu.
+ @see AVMenuGetParentMenubar
+ @see AVMenubarGetMenuIndex
+ @see AVMenuItemGetParentMenu
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuItem, AVMenuGetParentMenuItem, (AVMenu menu))
+
+/**
+ Inserts a menu item in a specified location in a menu, and
+ acquires the item. It does nothing if the menu or menu item
+ is <code>NULL</code>, or the menu item is already in a menu.
+ @param menu The menu to which a menu item is added.
+ @param menuItem The menu item to add.
+ @param menuItemIndex The location in <code>menu</code> to add <code>menuItem</code>.
+ The first item in a menu has an index of zero. Even if the
+ Acrobat viewer is displaying short menus, the index includes
+ any intervening long-mode-only menu items (irrelevant for
+ Acrobat 3.0 or later since there are no short menus). Pass
+ APPEND_MENUITEM (see AVExpT.h) to append the menu item to
+ the end of the menu.
+ @exception genErrNoMemory
+ @see AVMenuItemRemove
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuAddMenuItem, (AVMenu menu, AVMenuItem menuItem, AVMenuIndex menuItemIndex))
+
+/**
+ Creates and acquires a new AVMenuItem. The menu item can
+ be added to a menu using AVMenuAddMenuItem().
+
+ <p>Release the AVMenuItem using AVMenuItemRelease() after it
+ has been added to a menu. </p>
+ @param title The string shown in the user interface for
+ this menu item. Use a hyphen to create a separator menu
+ item. This value is also returned by AVMenuItemGetTitle().
+ On Windows, an ampersand (<code>&</code>) character in the string results
+ in underlining the character after it on the menu item.
+
+ @param name The language-independent name of the menu
+ item to create. This is the value returned by AVMenuItemGetName().
+ <code>name</code> must not contain any spaces. Client developers should
+ prefix the names of menu items they add with the name of
+ their client and a colon, to avoid collisions in the menu
+ item name space. For example, a client named <code>myPlug</code> might
+ add menu items named <code>myPlug:Scan</code> and <code>myPlug:Find</code>.
+ @param submenu A submenu (if any) for which this menu item
+ is the parent. Pass <code>NULL</code> if this menu item does not have
+ a submenu.
+ @param longMenusOnly (Ignored in Acrobat 3.0 or later)
+ If <code>true</code>, the menu item is visible only when the user selects
+ Full Menus. If <code>false</code>, the menu item is visible for both
+ Full Menus and Short Menus modes.
+ @param shortcut The key to use as a shortcut for the menu
+ item (an ASCII character). Use NO_SHORTCUT (see AVExpT.h)
+ if the menu item has no shortcut. The Acrobat viewer does
+ not check for conflicts between shortcuts. The consequences
+ of multiple menu items having the same shortcut is undefined.
+ On Windows, the shortcut is not displayed for any menu item
+ that also has an icon, although the shortcut will work.
+ @param flags Modifier keys, if any, used as part of the
+ shortcut. It must be an OR of the Modifier Keys values, except
+ that AV_COMMAND cannot be specified.
+ @param icon The icon to show in the menu item, or <code>NULL</code>
+ if no icon is shown. On Windows, <code>icon</code> is a 24x24 sample monochrome
+ <code>HBITMAP</code>.
+ @param owner The <code>gExtensionID</code> extension registering the
+ menu item.
+ @return The newly created menu item.
+ @see AVMenuAddMenuItem
+ @see AVMenuItemRelease
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuItem, AVMenuItemNew, (const char *title, const char *name, AVMenu submenu,
+ ASBool longMenusOnly, char shortcut, AVFlagBits16 flags, AVIcon icon, ASExtension owner))
+
+/**
+ Acquires a menu item. It increments the menu item's reference
+ count.
+ @param menuItem IN/OUT The menu item to acquire.
+ @return The menu item acquired.
+ @see AVMenuItemRelease
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenubarAcquireMenuItemByName
+ @see AVMenuAcquireMenuItemByIndex
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenuItem, AVMenuItemAcquire, (AVMenuItem menuItem))
+
+/**
+ Releases a menu item. It decrements the reference count and
+ destroys the menu item if the count is zero.
+ @param menuItem IN/OUT The menu item to release.
+ @see AVMenuItemAcquire
+ @see AVMenubarAcquireMenuItemByPredicate
+ @see AVMenubarAcquireMenuItemByName
+ @see AVMenuAcquireMenuItemByIndex
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuItemRelease, (AVMenuItem menuItem))
+
+/**
+ Removes a menu item from the menu hierarchy and releases
+ it. It does nothing if <code>menuItem</code> is <code>NULL</code>.
+
+ <p>Keyboard accelerators for the Acrobat viewer's built-in
+ menu items will always work, even if the menu item is removed. </p>
+
+ @param menuItem IN/OUT The menu item to remove.
+ @see AVMenuItemAcquire
+ @see AVMenuItemRelease
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuItemRemove, (AVMenuItem menuItem))
+
+/**
+ Gets the atom for the language-independent name of the menu
+ item.
+ @param menuItem IN/OUT The menu item whose language-independent
+ name is obtained.
+ @return The ASAtom corresponding to the name of the specified menu
+ item, or ASAtomNull if <code>menuItem</code> is <code>NULL</code>. The ASAtom can
+ be converted to a string using ASAtomGetString().
+ @see AVMenuItemGetTitle
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, AVMenuItemGetName, (AVMenuItem menuItem))
+
+/**
+ Gets a menu item's title, which is the string that appears
+ in the user interface.
+ @param menuItem The menu item whose title is obtained.
+
+ @param buffer (Filled by the method) A buffer to hold
+ the <code>NULL</code>-terminated name. If title is <code>NULL</code>, it returns the
+ length of the menu item's name, but does not fill the buffer.
+
+ @param bufferSize The maximum number of characters that
+ can be placed into <code>title</code>. If the name is longer than this,
+ only the first <code>bufferSize - 1</code> characters are placed into
+ <code>buffer</code>, and the buffer is <code>NULL</code>-terminated.
+ @return The length of the title. It returns <code>0</code> if <code>menuItem</code> is <code>NULL</code>.
+ @see AVMenuItemSetTitle
+ @see AVMenuItemGetName
+ @see AVMenuItemGetTitleAsASText
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVTArraySize, AVMenuItemGetTitle, (AVMenuItem menuItem, char *buffer, AVTArraySize bufferSize))
+
+/**
+ Sets a menu item's title, which is the string that appears
+ in the user interface. Use this method to manage menu items
+ whose titles change (such as 'show/hide fooWindow'), instead
+ of inserting and removing menu items on the fly.
+ @param menuItem IN/OUT The menu item whose title is set.
+ @param title IN/OUT The new menu title. It must be a <code>NULL</code>-terminated
+ string.
+ @see AVMenuItemGetTitle
+ @see AVMenuItemGetName
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuItemSetTitle, (AVMenuItem menuItem, const char *title))
+
+/**
+ Gets the shortcut key for the specified menu item.
+ @param menuItem The menu item whose shortcut is obtained.
+
+ @param key (Filled by the method) The key that is a shortcut
+ for the menu item (an ASCII character). The value NO_SHORTCUT
+ (see AVExpT.h) indicates that the menu item has no shortcut.
+
+ @param flags (Filled by the method) Modifier keys, if
+ any, used as part of the shortcut. It must be an OR of the
+ Modifier Keys values, except that AV_COMMAND will never
+ be present.
+ @return <code>true</code> if <code>menuItem</code> is not <code>NULL</code> and <code>menuItem</code> has a shortcut,
+ <code>false</code> otherwise.
+ @see AVMenuItemNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVMenuItemGetShortcut, (AVMenuItem menuItem, char* key, AVFlagBits16* flags))
+
+/**
+ Gets the flag indicating whether a menu item is visible
+ only in long-menus mode.
+ @param menuItem The menu item whose flag is obtained.
+ @return <code>true</code> if the menu item is visible only in long-menus mode.
+ <code>false</code> if the menu item is visible in both long and short
+ menus, or if <code>menuItem</code> is <code>NULL</code>.
+
+ @note In Acrobat 3.0 and later, this is irrelevant, since
+ there is no long/short menus option.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVMenuItemGetLongOnly, (AVMenuItem menuItem))
+
+/**
+ Sets the user-supplied procedure to execute whenever the
+ menu item is chosen. It does nothing if <code>menuItem</code> is <code>NULL</code>. Clients
+ must not set the execute procedure of the Acrobat viewer's
+ built-in menu items.
+ @param menuItem The menu item whose execute procedure
+ is set.
+ @param proc A user-supplied callback to call whenever <code>menuItem</code>
+ is selected.
+ @param data A pointer to user-supplied data to pass to <code>proc</code>
+ each time it is called.
+ @see AVMenuItemExecute
+ @see AVMenuItemSetComputeMarkedProc
+ @see AVMenuItemSetComputeEnabledProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuItemSetExecuteProc, (AVMenuItem menuItem, AVExecuteProc proc, void *data))
+
+/**
+ Sets the user-supplied procedure to call to determine whether
+ the menu item is enabled. It does nothing if <code>menuItem</code> is <code>NULL</code>.
+
+ @param menuItem The menu item whose AVComputeEnabledProc()
+ is set.
+ @param proc A user-supplied callback to call whenever the
+ Acrobat viewer needs to know whether <code>menuItem</code> should be
+ enabled. This procedure is called every time the menu is
+ displayed, so it should not do time-intensive processing.
+
+ @param data A pointer to user-supplied data to pass to <code>proc</code>
+ each time it is called.
+ @see AVMenuItemIsEnabled
+ @see AVMenuItemSetComputeMarkedProc
+ @see AVMenuItemSetExecuteProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuItemSetComputeEnabledProc, (AVMenuItem menuItem, AVComputeEnabledProc proc,
+ void *data))
+
+/**
+ Sets the user-supplied procedure that determines whether
+ the menu item appears with a check mark. It does nothing if
+ <code>menuItem</code> is <code>NULL</code>. If the menu item has no AVExecuteProc()
+ (see AVMenuItemSetExecuteProc()), its AVComputeMarkedProc()
+ is never called. To avoid this, add an AVExecuteProc() that
+ does nothing, and if you wish the menu item to gray out,
+ also add an AVComputeEnabledProc() that always returns <code>false</code>.
+
+ @param menuItem The menu item whose AVComputeMarkedProc()
+ is set.
+ @param proc A user-supplied callback to call whenever the
+ Acrobat viewer needs to know whether <code>menuItem</code> should
+ be marked.
+ @param data A pointer to user-supplied data to pass to <code>proc</code>
+ each time it is called.
+ @see AVMenuItemIsMarked
+ @see AVMenuItemSetExecuteProc
+ @see AVMenuItemSetComputeEnabledProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuItemSetComputeMarkedProc, (AVMenuItem menuItem, AVComputeMarkedProc proc,
+ void *data))
+
+/**
+ Acquires the submenu attached to the specified menu item,
+ if there is one. When you are done with the submenu, release
+ it using AVMenuRelease().
+ @param menuItem IN/OUT The menu item whose submenu is obtained.
+
+ @return The specified menu item's submenu. It returns <code>NULL</code> if <code>menuItem</code>
+ is <code>NULL</code> or if <code>menuItem</code> does not have a submenu.
+ @see AVMenuAcquire
+ @see AVMenuRelease
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenu, AVMenuItemAcquireSubmenu, (AVMenuItem menuItem))
+
+/**
+ Tests whether the specified menu item is enabled.
+ @param menuItem The menu item whose enabled flag is obtained.
+ @return <code>true</code> if <code>menuItem</code> is enabled, if <code>menuItem</code> is <code>NULL</code>, or if
+ <code>menuItem</code> has no AVComputeEnabledProc().
+ It returns <code>false</code> if the menu item is disabled or its AVComputeEnabledProc()
+ raises an exception.
+ @see AVMenuItemSetComputeEnabledProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVMenuItemIsEnabled, (AVMenuItem menuItem))
+
+/**
+ Tests whether <code>menuItem</code> is marked (for example, it appears with
+ a check mark).
+ @param menuItem The menu item whose marked state is obtained.
+ @return <code>true</code> if <code>menuItem</code> is marked.
+ It returns <code>false</code> if <code>menuItem</code> is <code>NULL</code>, if
+ the menu item does not have an AVComputeMarkedProc(), or if
+ it raises an exception.
+ @see AVMenuItemSetComputeMarkedProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVMenuItemIsMarked, (AVMenuItem menuItem))
+
+/**
+ Executes a menu item's AVExecuteProc(). It does nothing if <code>menuItem</code>
+ is <code>NULL</code>, if <code>menuItem</code> has no AVExecuteProc, or if <code>menuItem</code>
+ is not enabled.
+
+ <p>You cannot execute a menu item that has a submenu (for example,
+ the Pages menu item in the Document menu). </p>
+ @param menuItem The menu item to execute.
+ @see AVMenuItemSetExecuteProc
+ @see AVMenuItemIsEnabled
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVMenuItemExecute, (AVMenuItem menuItem))
+
+/**
+ Gets the menu in which the specified menu item appears.
+
+ @param menuItem IN/OUT The menu item whose parent menu is obtained.
+
+ @return The menu in which the specified menu item appears. It returns
+ <code>NULL</code> if this menu item is not in a menu.
+ @see AVMenuGetParentMenuItem
+ @see AVMenuItemAcquireSubmenu
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVMenu, AVMenuItemGetParentMenu, (AVMenuItem menuItem))
+#else /* no menus */
+NOPROC(AVMenuGetParentMenuItem)
+NOPROC(AVMenuAddMenuItem)
+
+NOPROC(AVMenuItemNew)
+NOPROC(AVMenuItemAcquire)
+NOPROC(AVMenuItemRelease)
+NOPROC(AVMenuItemRemove)
+NOPROC(AVMenuItemGetName)
+NOPROC(AVMenuItemGetTitle)
+NOPROC(AVMenuItemSetTitle)
+NOPROC(AVMenuItemGetShortcut)
+NOPROC(AVMenuItemGetLongOnly)
+NOPROC(AVMenuItemSetExecuteProc)
+NOPROC(AVMenuItemSetComputeEnabledProc)
+NOPROC(AVMenuItemSetComputeMarkedProc)
+NOPROC(AVMenuItemAcquireSubmenu)
+NOPROC(AVMenuItemIsEnabled)
+NOPROC(AVMenuItemIsMarked)
+NOPROC(AVMenuItemExecute)
+NOPROC(AVMenuItemGetParentMenu)
+#endif /* no menus */
+
+
+/**
+ Gets the AVDoc for the document currently displayed in <code>pageView</code>.
+
+ @param pageView IN/OUT The page view whose AVDoc is obtained.
+
+ @return The AVDoc for <code>pageView</code>.
+ @see AVDocGetPageView
+ @see AVPageViewGetPage
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVDoc, AVPageViewGetAVDoc, (AVPageView pageView))
+NPROC(void, oldAVPageViewGetAperture, (AVPageView pageView, oldAVRect *rect))
+
+/**
+ Gets a PDPage currently displayed in the specified page
+ view. This does not acquire the page. Do not use this result
+ across methods that might change the current page. To obtain
+ a value that can be used across such calls, use PDDocAcquirePage()
+ instead.
+ @param pageView IN/OUT The page view whose PDPage is obtained.
+
+ @return PDPage currently displayed in <code>pageView</code>, or <code>NULL</code> if there
+ is not a valid PDPage associated with <code>pageView</code>.
+ @see PDDocAcquirePage
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(PDPage, AVPageViewGetPage, (AVPageView pageView))
+
+/**
+ Gets the current zoom for <code>pageView</code>. The zoom factor is point-to-point,
+ not point-to-pixel. For example, a page that is 612 points
+ wide at 100% zoom should be 612 points wide on the monitor,
+ not 612 pixels.
+ @param pageView The page view whose zoom is obtained.
+ @return Current zoom, as a fixed number measured in units in which
+ 1.0 is 100% zoom.
+ @see AVPageViewGetPageToDevScaling
+ @see AVPageViewGetZoomType
+ @see AVPageViewZoomTo
+
+ @note In previous releases, you could use the zoom factor
+ to tranform page units (in points) to device units (in pixels).
+ In Acrobat 6.0 and later, because a point is no longer
+ assumed to be the same as a pixel, this is no longer accurate.
+ It is recommended that you use the page-to-device matrix
+ as much as possible, and use the AVPageViewGetPageToDevScaling()
+ method if you specifically need the point-to-pixel scaling
+ factor.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASFixed, AVPageViewGetZoom, (AVPageView pageView))
+
+/**
+ Gets the current zoom type.
+ @param pageView IN/OUT The page view whose zoom type is obtained.
+
+ @return The current zoom type.
+ @see AVPageViewGetZoom
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVZoomType, AVPageViewGetZoomType, (AVPageView pageView))
+
+/**
+ Gets the current page number for <code>pageView</code>.
+ @param pageView The page view whose current page number
+ is obtained.
+ @return The current page number, or <code>-1</code> if <code>pageView</code> is invalid. The first
+ page in a document is page <code>0</code>.
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewPageNumIsVisible
+ @see AVPageViewSetPageNum
+
+ @note If more than one page may be visible, use AVPageViewGetFirstVisiblePageNum(),
+ AVPageViewGetLastVisiblePageNum(), or AVPageViewPageNumIsVisible()
+ instead of this method.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(PDPageNumber, AVPageViewGetPageNum, (AVPageView pageView))
+
+/**
+ Gets the color that will be used for subsequent drawing
+ by AVPageViewDrawRect() and AVPageViewDrawRectOutline().
+ @param pageView IN/OUT The page view whose drawing color is obtained.
+
+ @param color IN/OUT (Filled by the method) The color to get.
+ @exception genErrBadParm
+ @see AVPageViewSetColor
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewGetColor, ( AVPageView pageView, PDColorValue color ))
+
+/**
+ Sets the color that will be used for subsequent drawing
+ by AVPageViewDrawRect() and AVPageViewDrawRectOutline().
+ @param pageView IN/OUT The page view whose drawing color is set.
+
+ @param color IN/OUT The color to set.
+ @exception genErrBadParm
+ @see AVPageViewGetColor
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewSetColor, ( AVPageView pageView, PDColorValue color ))
+
+/**
+ Increments an internal variable. Neither drawing nor AVPageViewDidChange()
+ notifications will occur as long as the variable has a value
+ greater than zero. In addition, frames are not pushed onto
+ the view history stack.
+ @param pageView IN/OUT The page view whose <code>SuspendDraw</code> variable
+ is incremented.
+ @see AVPageViewEndOperation
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewBeginOperation, (AVPageView pageView))
+
+/**
+ Decrements an internal variable. Neither drawing nor AVPageViewDidChange()
+ notifications will occur as long as the variable has a value
+ greater than zero. In addition, frames are not pushed onto
+ the view history stack.
+ @param pageView IN/OUT The page view whose <code>SuspendDraw</code> variable
+ is decremented.
+ @notify AVPageViewDidChange
+ @see AVPageViewBeginOperation
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewEndOperation, (AVPageView pageView))
+
+/**
+ Goes to the specified page, retaining the current location on
+ the page and the current zoom (either explicit or a variable).
+ It invalidates the display, but does not perform an immediate
+ redraw. This allows your client to call AVPageViewZoomTo(),
+ AVPageViewScrollTo(), or both, and get only a single redraw
+ event. If you decide to do this, you should bracket the
+ calls with AVPageViewBeginOperation() and AVPageViewEndOperation().
+
+ @param pageView The page view in which a different page
+ is displayed.
+ @param pageNum The page number of the destination page.
+ The first page in a document is page <code>0</code>.
+ @notify AVPageViewDidChange
+ @see AVPageViewGetPage
+ @see AVPageViewGoBack
+ @see AVPageViewGoForward
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewGoTo, (AVPageView pageView, PDPageNumber pageNum))
+
+/**
+ Sets the zoom factor and zoom type for the specified page
+ view.
+ @param pageView The page view to zoom.
+ @param zoomType The zoom type to set.
+ @param scale The zoom factor, specified as a magnification
+ factor (for example, 1.0 displays the document at actual
+ size). <code>scale</code> is ignored unless <code>zoomType</code> is AVZoomNoVary.
+ Use zero to inherit the zoom.
+ @notify AVPageViewDidChange
+ @see AVPageViewScrollTo
+ @see AVPageViewScrollToRect
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewZoomTo, (AVPageView pageView, AVZoomType zoomType, ASFixed scale))
+
+NPROC(void, oldAVPageViewScrollTo, (AVPageView pageView, ASInt16 xOrigin, ASInt16 yOrigin))
+NPROC(void, oldAVPageViewScrollToRect, (AVPageView pageView, const oldAVRect *rect,ASBool favorLeft,
+ ASBool favorTop, ASInt16 margin))
+
+/**
+ Scrolls up through a document, as if the user pressed the Enter
+ key. The scrolling follows articles if Acrobat is currently
+ in article-reading mode.
+ @param pageView IN/OUT The page view to scroll.
+ @notify AVPageViewDidChange
+ @see AVPageViewReadPageDown
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewReadPageUp, (AVPageView pageView))
+
+/**
+ Scrolls down through a document, as if the user pressed the
+ Enter key. The scrolling follows articles if Acrobat is
+ currently in article-reading mode.
+ @param pageView IN/OUT The page view to scroll.
+ @notify AVPageViewDidChange
+ @see AVPageViewReadPageUp
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewReadPageDown, (AVPageView pageView))
+
+/**
+ Goes to the previous view on the view stack, if a previous
+ view exists. This might result in a different document being
+ made active.
+ @param pageView IN/OUT The page view to change.
+ @notify AVPageViewDidChange
+ @see AVPageViewGoForward
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVPageViewGoBack, (AVPageView pageView), AVPageViewDoGoBack)
+
+/**
+ Goes to the next view on the view stack, if a next view
+ exists. This might result in a different document being
+ made active.
+ @param pageView IN/OUT The page view to change.
+ @notify AVPageViewDidChange
+ @see AVPageViewGoBack
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVPageViewGoForward, (AVPageView pageView), AVPageViewDoGoForward)
+
+/**
+ Builds a PDViewDestination from the current zoom and position.
+
+ @param pageView The page view from whose current view
+ the destination is created.
+ @param fitType The ASAtom specifying the fit type that
+ the view destination will have. The string associated with
+ <code>fitType</code> must be one of View Destination Fit Types.
+ @param srcPDDoc The document in which the view destination
+ is used.
+ @return The newly created view destination.
+ @see PDViewDestCreate
+ @see PDActionGetDest
+ @see PDActionNewFromDest
+ @ref ViewDestinationFitTypes
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+UNPROC(PDViewDestination, AVPageViewToViewDest, (AVPageView pageView, ASAtom fitType,
+ PDDoc srcPDDoc))
+
+NPROC(void, oldAVPageViewInvalidateRect, (AVPageView pageView, oldAVRect *area))
+
+/**
+ Forces any pending updates for the specified page view to
+ finish drawing.
+ @param pageView IN/OUT The AVPageView to redraw.
+ @see AVPageViewInvalidateRect
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewDrawNow, (AVPageView pageView))
+NPROC(void, oldAVPageViewInvertRect, (AVPageView pageView, const oldAVRect *rect, ASBool highlight))
+NPROC(void, oldAVPageViewInvertRectOutline, (AVPageView pageView, const oldAVRect *rect))
+NPROC(void, oldAVPageViewDrawRectOutline, (AVPageView pageView, const oldAVRect *rect,
+ ASInt16 lineWidth, ASFixed * dashArray, AVTArraySize arrayLen))
+NPROC(void, oldAVPageViewDrawRect, (AVPageView pageView, const oldAVRect *rect))
+NPROC(void, oldAVPageViewGetMousePosition, (AVPageView pageView, ASInt16 *x, ASInt16 *y))
+NPROC(void, oldAVPageViewDragOutNewRect, (AVPageView pageView, ASInt16 xStart, ASInt16 yStart,
+ oldAVRect *resultRect))
+NPROC(void, oldAVPageViewDragRect, (AVPageView pageView, ASInt16 xStart, ASInt16 yStart,
+ oldAVRect *startRect, oldAVRect *resultRect, ASInt32 dragType, oldAVRect *extrema))
+
+SPROC(void, oldAVAppRegisterForPageViewDrawing, (oldAVPageViewDrawProc proc, void* data),
+ oldAVPageViewRegisterForDrawing)
+
+/**
+ <p>Un-registers a user-supplied page view drawing procedure. </p>
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+
+ @note Superseded by AVAppUnregisterForPageViewDrawingEx()
+ in Acrobat 6.0.
+ @param proc The original callback.
+ @see AVAppRegisterForPageViewDrawing
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppUnregisterForPageViewDrawing, (AVPageViewDrawProc proc),
+ AVPageViewUnregisterForDrawing)
+
+
+/**
+ Un-registers a user-supplied page view click procedure.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly-created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when unregistering. </p>
+ @param clickProc IN/OUT The original callback.
+ @param data User-supplied private data.
+ @see AVAppRegisterForPageViewClicks
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, oldAVAppRegisterForPageViewClicks, (oldAVPageViewClickProc clickProc, void* data),
+ oldAVPageViewRegisterForClicks)
+
+/**
+ Un-registers a user-supplied page view click procedure.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param clickProc The original callback.
+ @see AVAppRegisterForPageViewClicks
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppUnregisterForPageViewClicks, (AVPageViewClickProc clickProc),
+ AVPageViewUnregisterForClicks)
+
+SPROC(void, oldAVAppRegisterForPageViewAdjustCursor, (oldAVPageViewCursorProc cursorProc,
+ void* data), oldAVPageViewRegisterForAdjustCursor)
+
+/**
+ Un-registers a user-supplied adjust cursor procedure.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param cursorProc The original callback.
+ @see AVAppRegisterForPageViewAdjustCursor
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppUnregisterForPageViewAdjustCursor, (AVPageViewCursorProc cursorProc),
+ AVPageViewUnregisterForAdjustCursor)
+
+NPROC(ASBool, oldAVPageViewIsAnnotAtPoint, (AVPageView pageView, ASInt16 xHit, ASInt16 yHit,
+ PDAnnot *hitAnnot))
+NPROC(void, oldAVPageViewGetAnnotRect, (AVPageView pageView, PDAnnot anAnnot, oldAVRect *rect))
+NPROC(void, oldAVPageViewSetAnnotLocation, (PDAnnot anAnnot, AVPageView pageView,
+ ASInt16 x, ASInt16 y))
+
+/**
+ Puts the specified page view into <i>article thread-reading</i>
+ mode.
+ @param pageView IN/OUT The page view to set to article thread-
+ reading mode.
+ @param thread IN/OUT The thread to read.
+ @see AVPageViewGetActiveBead
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewStartReadingThread, (AVPageView pageView, PDThread thread))
+
+/**
+ Gets the index of the currently active thread in a page
+ view.
+ @param pageView IN/OUT The page view whose active thread index
+ is obtained.
+ @return The thread index of the current thread, or <code>-1</code> if there is
+ no current thread.
+ @see AVPageViewGetActiveBead
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVTArraySize, AVPageViewGetThreadIndex, (AVPageView pageView))
+
+/**
+ Gets the currently active article thread bead in the specified
+ page view.
+ @param pageView IN/OUT The page view whose currently active bead
+ is obtained.
+ @return The current bead of the current thread, or a <code>NULL</code> Cos object
+ if there is no current thread.
+ @see AVPageViewGetThreadIndex
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(PDBead, AVPageViewGetActiveBead, (AVPageView pageView))
+
+NPROC(ASBool, oldAVPageViewIsBeadAtPoint, (AVPageView pageView, ASInt16 xHit, ASInt16 yHit,
+ PDBead *beadP))
+
+/**
+ Acquires the platform-specific object needed to draw into
+ the Acrobat viewer's document window using a platform's
+ native graphics calls. When done, release it using AVPageViewReleaseMachinePort().
+
+ @param pageView IN/OUT The AVPageView whose platform-dependent
+ port is acquired.
+ @return A platform-dependent value:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating system</TH><TH>Value</TH></TR>
+ <TR><TD>Mac OS</TD><TD><code>GrafPtr</code>.</TD></TR>
+ <TR><TD>Windows</TD><TD><code>WinPort</code>.</TD></TR>
+ <TR><TD>UNIX</TD><TD><code>Widget</code>.</TD></TR>
+ </TABLE>
+
+ @see AVPageViewReleaseMachinePort
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void*, AVPageViewAcquireMachinePort, (AVPageView pageView), AVPageViewGetMachinePort)
+
+/**
+ Releases the platform-specific object needed to draw into
+ Acrobat's document window using a platform's native graphics
+ calls.
+ @param pageView IN/OUT The AVPageView whose platform-dependent
+ port is released.
+ @param port IN/OUT The platform-specific port to release.
+ @see AVPageViewAcquireMachinePort
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVPageViewReleaseMachinePort, (AVPageView pageView, void* port),
+ AVPageViewFreeMachinePort)
+
+/**
+ Gets the matrix that transforms user space coordinates to
+ device space coordinates for the specified page view.
+ @param pageView The page view whose transformation matrix
+ is obtained.
+ @param pageToDevMatrix (Filled by the method) A pointer
+ to the transformation matrix.
+ @see AVPageViewGetDevToPageMatrix
+ @see AVPageViewGetPageToDevScaling
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewGetPageToDevMatrix, (AVPageView pageView, ASFixedMatrix *pageToDevMatrix))
+
+/**
+ Gets the matrix that transforms device space coordinates
+ to user space coordinates for the specified page view.
+ @param pageView IN/OUT The page view whose matrix is obtained.
+
+ @param devToPageMatrix IN/OUT (Filled by the method) A pointer to
+ the transformation matrix.
+ @see AVPageViewGetPageToDevMatrix
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewGetDevToPageMatrix, (AVPageView pageView, ASFixedMatrix *devToPageMatrix))
+
+SPROC(void, oldAVPageViewPointToDevice, (AVPageView pageView, const ASFixedPointP p,
+ ASInt16 *x, ASInt16 *y), oldAVPagePointToDevice)
+SPROC(void, oldAVPageViewDevicePointToPage, (AVPageView pageView, ASInt16 x, ASInt16 y,
+ ASFixedPoint *p), oldAVPageDevicePointToPage)
+SPROC(void, oldAVPageViewRectToDevice, (AVPageView pageView, const ASFixedRectP p, oldAVRect* rect),
+ oldAVPageRectToDevice)
+SPROC(void, oldAVPageViewDeviceRectToPage, (AVPageView pageView, const oldAVRect* rect,
+ ASFixedRect *p), oldAVPageDeviceRectToPage)
+
+/**
+ Gets a flag indicating which modifier keys are currently
+ being pressed.
+ @return An OR of the Modifier Keys.
+ @see AVSysMouseIsStillDown
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVFlagBits32, AVSysGetModifiers, (void))
+
+/**
+ Tests whether the mouse button is still being pressed.
+ @return <code>true</code> if the user is holding the mouse button down and has
+ not released it since the last mouse-down event, <code>false</code> otherwise.
+
+ @see AVSysGetModifiers
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVSysMouseIsStillDown, (void))
+
+/**
+ Beeps.
+ @param duration IN/OUT Always pass 0.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVSysBeep, (ASInt32 duration))
+
+/**
+ Gets the specified cursor. The cursor can subsequently be
+ displayed using AVSysSetCursor().
+ @param cursorID IN/OUT The cursor to show. It must be one of the
+ Predefined Cursors.
+ @return The specified cursor.
+ @see AVSysGetCursor
+ @see AVSysSetCursor
+ @ref cursorID
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVCursor, AVSysGetStandardCursor, (ASInt32 cursorID))
+
+/**
+ Sets the cursor to the specified AVCursor.
+ @param cursor The cursor to display. Predefined platform-independent
+ cursors can be obtained using AVSysGetStandardCursor(). Clients
+ can use their own custom cursors as follows:
+ <p>Mac OS developers:
+ Use the Mac OS Toolbox <code>GetCursor</code> call to retrieve your
+ cursor from a resource. Cast the resulting <code>CursHandle</code> to
+ an AVCursor and pass it to AVSysSetCursor().</p>
+ <p>Windows developers:
+ Use the Windows API function <code>LoadCursor</code> to retrieve your
+ cursor resource. Cast the resulting <code>HCURSOR</code> to an AVCursor
+ and pass it to AVSysSetCursor().</p>
+ @see AVSysGetCursor
+ @see AVSysGetStandardCursor
+ @see AVSysSetWaitCursor
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVSysSetCursor, (AVCursor cursor))
+
+/**
+ Gets the current cursor. Use this method when you want to
+ change the cursor temporarily and be able to restore it
+ to its current shape.
+ @return The current cursor.
+ @see AVSysGetStandardCursor
+ @see AVSysSetCursor
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVCursor, AVSysGetCursor, (void))
+
+NPROC(void, oldAVToolBarGetFrame, (AVToolBar toolBar, oldAVRect *frame))
+
+/**
+ Gets the toolbar button that has the specified name.
+ @param toolBar The toolbar in which the button is located.
+
+ @param buttonName The ASAtom for the button to get. The
+ character string representing <code>buttonName</code> can be converted
+ to an ASAtom using ASAtomFromString(). See Toolbar and Toolbar
+ Button Names for a list of the names of the built-in buttons.
+ @return The button with the specified name; if the name is not found,
+ the return value is <code>NULL</code>.
+ @see AVToolBarEnumButtons
+ @ref ToolbarButtonNames
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVToolButton, AVToolBarGetButtonByName, (AVToolBar toolBar, ASAtom buttonName))
+
+/**
+ Calls <code>enumProc</code> once for each toolbar button in the specified
+ toolbar.
+
+ <p>If a tool button has a flyout, this is a separate toolbar
+ from the toolbar returned by AVAppGetToolBar(); enumerating
+ the toolbar buttons on this main toolbar does not enumerate
+ the toolbar buttons on any flyout. To enumerate the toolbar
+ buttons on a button's flyout, call AVToolButtonGetFlyout()
+ to get its associated toolbar, then call AVToolBarEnumButtons()
+ with this toolbar. </p>
+
+ @param toolBar IN/OUT The toolbar whose buttons are enumerated.
+
+ @param enumProc IN/OUT A user-supplied procedure to call once for
+ each button. The enumeration ends if <code>enumProc</code> returns <code>false</code>.
+
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @see AVAppGetToolBar
+ @see AVToolBarGetButtonByName
+ @see AVToolButtonGetFlyout
+ @see AVToolButtonSetExternal
+
+ @note AVToolBarEnumButtons does not enumerate toolbar buttons
+ that are marked as external by AVToolButtonSetExternal().
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolBarEnumButtons, (AVToolBar toolBar, AVToolButtonEnumProc enumProc,
+ void *clientData))
+
+/**
+ Inserts a button into a toolbar. Call AVToolBarUpdateButtonStates()
+ after adding a button to update the toolbar.
+ @param toolBar The toolbar into which a button is added.
+
+ @param button The button to add to the toolbar.
+ @param before If <code>true</code>, <code>button</code> is added before <code>otherButton</code>;
+ if <code>false</code>, it is added after. If <code>otherButton</code> is <code>NULL</code> and
+ <code>before</code> is <code>true</code>, the button is added to the beginning of
+ the toolbar. If <code>otherButton</code> is <code>NULL</code> and <code>before</code> is <code>false</code>,
+ the button is added to the end of the toolbar.
+ @param otherButton A button relative to which the new
+ button is added.
+ @exception genErrNoMemory
+ @see AVToolButtonRemove
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolBarAddButton, (AVToolBar toolBar, AVToolButton button, ASBool before,
+ AVToolButton otherButton))
+
+/**
+ Gets the number of buttons in <code>toolbar</code>.
+ @param toolBar IN/OUT The toolbar whose button count is obtained.
+
+ @return The number of buttons in <code>toolBar</code>.
+ @see AVAppGetToolBar
+ @see AVToolButtonGetFlyout
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVTArraySize, AVToolBarGetNumButtons, (AVToolBar toolBar))
+
+/**
+ Tests whether there is room in a toolbar for an additional
+ specified number of buttons and separators.
+
+ <p>On Windows, this method assumes the application window has
+ been maximized. </p>
+ @param toolBar The toolbar to check.
+ @param nButtons The number of buttons.
+ @param nSeparators The number of separators.
+ @return <code>true</code> if there is room in <code>toolBar</code> to add <code>nButtons</code> and <code>nSeparators</code>,
+ <code>false</code> otherwise.
+ @see AVAppGetToolBar
+ @see AVToolBarGetFrame
+ @see AVToolBarGetNumButtons
+ @see AVToolButtonGetFlyout
+ @see AVToolButtonNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVToolBarIsRoomFor, (AVToolBar toolBar, AVTCount nButtons, AVTCount nSeparators))
+
+/**
+ Forces a redraw of <code>toolbar</code>. Call this method when a toolbar
+ button is added or removed, or one of the buttons changes
+ state.
+ @param toolbar IN/OUT The toolbar to redraw.
+ @see AVAppGetToolBar
+ @see AVToolBarGetFrame
+ @see AVToolBarIsRoomFor
+ @see AVToolButtonGetFlyout
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolBarUpdateButtonStates, (AVToolBar toolbar))
+
+/**
+ Creates a toolbar button with the specified name, icon and
+ long-menus state. It can also be used to create a separator
+ with the specified name.
+ @param name The ASAtom corresponding to the button's name.
+ The character string for <code>name</code> can be converted to an ASAtom
+ using ASAtomFromString().
+ @param icon The icon to use for this button. On Windows,
+ <code>icon</code> is an 18x18 icon with a light gray background (that
+ is, RGB values of 192,192,192).
+ @param longOnly (Ignored in Acrobat 3.0 or later) If <code>true</code>,
+ the button is shown only when the user selects Full Menus
+ in the Acrobat viewer. If <code>false</code>, it is shown in both Full menu
+ and Short menu modes.
+ @param isSeparator If <code>true</code>, the new button is a separator
+ used to leave space between groups of related buttons. For
+ separators, <code>icon</code>, the button's AVExecuteProc(), AVComputeEnabledProc(),
+ and AVComputeMarkedProc() are ignored. In addition, separators
+ are not clickable. If <code>false</code>, the button is a normal toolbar
+ button.
+ @return The newly created button.
+ @exception genErrNoMemory
+ @see AVToolButtonDestroy
+ @see AVToolButtonSetExecuteProc
+ @see AVToolButtonSetComputeEnabledProc
+ @see AVToolButtonSetComputeMarkedProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVToolButton, AVToolButtonNew, (ASAtom name, AVIcon icon, ASBool longOnly,
+ ASBool isSeparator))
+
+/**
+ Removes the specified button from the toolbar and destroys
+ the button. Call AVToolBarUpdateButtonStates() after removing
+ a button to update the toolbar.
+ @param toolButton IN/OUT The button to destroy.
+ @see AVToolButtonNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolButtonDestroy, (AVToolButton toolButton))
+
+/**
+ Removes the specified button from the toolbar, but does
+ not destroy the button. Call AVToolBarUpdateButtonStates()
+ after removing a button to update the toolbar.
+ @param button IN/OUT The button to remove.
+ @see AVToolBarAddButton
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolButtonRemove, (AVToolButton button))
+
+/**
+ Tests whether a toolbar button is a separator or a normal
+ button.
+ @param button IN/OUT The button to test.
+ @return <code>true</code> if the button is a separator, <code>false</code> otherwise.
+ @see AVToolButtonNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVToolButtonIsSeparator, (AVToolButton button))
+
+/**
+ Gets the ASAtom corresponding to the name of the specified
+ toolbar button.
+ @param button The toolbar button whose name is obtained.
+
+ @return The ASAtom corresponding to the toolbar button's name. ASAtom
+ can be converted to a character string using ASAtomGetString().
+ See Toolbar and Toolbar Button Names for a list of the built-in
+ button names.
+ @see AVToolBarGetButtonByName
+ @ref ToolbarButtonNames
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, AVToolButtonGetName, (AVToolButton button))
+
+/**
+ Executes the AVExecuteProc() associated with button, if it
+ exists. This AVExecuteProc() is set by AVToolButtonSetExecuteProc().
+ It does nothing if AVToolButtonIsEnabled() for the button returns
+ <code>false</code>.
+ @param button IN/OUT The button whose execute proc is executed.
+
+ @see AVToolButtonIsEnabled
+ @see AVToolButtonNew
+ @see AVToolButtonSetExecuteProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolButtonExecute, (AVToolButton button))
+
+/**
+ Sets the user-supplied procedure to call to actually perform
+ the button's intended function.
+ @param button IN/OUT The button whose AVExecuteProc() is set.
+ @param proc IN/OUT A user-supplied procedure to call when <code>button</code>
+ is executed.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see AVToolButtonNew
+ @see AVToolButtonSetComputeEnabledProc
+ @see AVToolButtonSetComputeMarkedProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolButtonSetExecuteProc, (AVToolButton button, AVExecuteProc proc,
+ void *clientData))
+
+/**
+ Sets the AVComputeEnabledProc() associated with a toolbar
+ button. This routine determines whether the button can be
+ selected.
+ @param button The button whose AVComputeEnabledProc() is
+ set.
+ @param proc A user-supplied procedure to call whenever the
+ Acrobat viewer needs to know whether <code>button</code> should be enabled.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see AVToolButtonIsEnabled
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolButtonSetComputeEnabledProc, (AVToolButton button,
+ AVComputeEnabledProc proc, void* clientData))
+
+/**
+ Sets the AVComputeMarkedProc() associated with a toolbar button.
+ A marked button appears pressed on the screen.
+ @param button The button whose AVComputeMarkedProc() is
+ set.
+ @param proc A user-supplied callback to call whenever the
+ Acrobat viewer needs to know whether the specified toolbar
+ button should be marked.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see AVToolButtonIsMarked
+ @see AVToolButtonNew
+ @see AVToolButtonSetComputeEnabledProc
+ @see AVToolButtonSetExecuteProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVToolButtonSetComputeMarkedProc, (AVToolButton button, AVComputeMarkedProc proc,
+ void* clientData))
+
+/**
+ Tests whether a toolbar button is enabled.
+ @param button The button to test.
+ @return <code>true</code> if the button's AVComputeEnabledProc() returns <code>true</code>, <code>false</code>
+ otherwise.
+ @see AVToolButtonSetComputeEnabledProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVToolButtonIsEnabled, (AVToolButton button))
+
+/**
+ Tests whether the specified button is marked.
+ @param button The button to test.
+ @return <code>true</code> if the button's AVComputeMarkedProc() returns <code>true</code>, <code>false</code>
+ if <code>button</code> is not marked or does not have an AVComputeMarkedProc().
+
+ @see AVToolButtonSetComputeMarkedProc
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVToolButtonIsMarked, (AVToolButton button))
+
+/**
+ Gets the currently active tools's type. See Toolbar and
+ Toolbar Button Names for a list of the built-in tool types.
+
+ @param tool The tool whose type is obtained.
+ @return The ASAtom returned can be converted to a string using ASAtomGetString().
+
+ @see AVAppEnumTools
+ @see AVAppGetActiveTool
+ @see AVAppGetDefaultTool
+ @see AVAppGetLastActiveTool
+ @see AVAppGetToolByName
+ @see AVToolIsPersistent
+ @ref ToolbarButtonNames
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, AVToolGetType, (AVTool tool))
+
+/**
+ Tests whether the specified tool is in a state keeping it
+ active through multiple operations rather than only once,
+ then restoring the previous tool. This method is called
+ by another one-shot tool's <code>Activate</code> procedure. Two one-shot
+ tools cannot cycle, because if the previous tool was not
+ persistent, the second non-persistent tool reverts to the
+ default tool.
+ @param tool IN/OUT The tool whose persistence flag is tested.
+
+ @return <code>true</code> if the tool is persistent, <code>false</code> otherwise.
+ @see AVAppEnumTools
+ @see AVAppGetActiveTool
+ @see AVAppGetDefaultTool
+ @see AVAppGetLastActiveTool
+ @see AVAppGetToolByName
+ @see AVToolGetType
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVToolIsPersistent, (AVTool tool))
+
+NPROC(AVWindow, oldAVWindowNew, (AVWindowLayer layer, AVFlagBits32 flags, oldAVWindowHandler handler,
+ ASExtension owner))
+NPROC(AVWindow, oldAVWindowNewFromPlatformThing, (AVWindowLayer layer, AVFlagBits32 flags,
+ oldAVWindowHandler handler, ASExtension owner, void *platformThing))
+
+/**
+ Destroys the specified window and all associated memory.
+ It closes the window without calling the window handler's AVWindowWillCloseProc()
+ (that is, this operation cannot be rejected).
+ @param win IN/OUT The window to destroy.
+ @see AVWindowNew
+ @see AVWindowNewFromPlatformThing
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowDestroy, (AVWindow win))
+
+/**
+ Simulates a user's click on a window's box. This calls the
+ AVWindowWillCloseProc() of the <code>win</code> object's AVWindowHandler.
+ @param win IN/OUT The window to close.
+ @param quitting IN/OUT If <code>true</code>, assume the application is trying
+ to quit. If <code>false</code>, assume the user clicked on the window's
+ close box.
+ @return <code>true</code> if the window was closed, <code>false</code> if the window handler's
+ AVWindowWillCloseProc() aborted the close by returning <code>false</code>.
+
+ @see AVWindowCenter
+ @see AVWindowHide
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVWindowUserClose, (AVWindow win, ASBool quitting))
+
+/**
+ Maximizes the specified window. On Mac OS, this corresponds
+ to calling the ZoomWindow Toolbox function.
+ @param win The window to maximize.
+ @param maximize <code>true</code> to maximize the window, <code>false</code> to
+ return it to its non-maximized state.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowMaximize, (AVWindow win, ASBool maximize))
+
+/**
+ Shows the specified window.
+ @param win IN/OUT The window to show.
+ @see AVWindowHide
+ @see AVWindowIsVisible
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowShow, (AVWindow win))
+
+/**
+ Hides the specified window. Hiding a window makes it invisible;
+ it does not minimize or icon-ize it.
+
+ <p>On Windows, a document window can be minimized using code
+ based on the following: </p>
+
+ <p><code>theAVWindow = AVDocGetAVWindow( theAVDoc); </code></p>
+ <p><code>theThing = (HWND) AVWindowGetPlatformThing( theAVWindow); </code></p>
+ <p><code>wasVisible = ShowWindow(theThing, SW_MINIMIZED);</code></p>
+
+
+ @param win IN/OUT The window to hide.
+ @see AVWindowShow
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowHide, (AVWindow win))
+
+/**
+ Tests whether a window is displayed on the screen.
+ @param win The window whose visibility is tested.
+ @return <code>true</code> if the window is displayed on the screen (even if it
+ is currently obscured by another window), <code>false</code> otherwise.
+
+ @see AVWindowBecomeKey
+ @see AVWindowHide
+ @see AVWindowShow
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVWindowIsVisible, (AVWindow win))
+
+/**
+ Returns a pointer to the platform-specific thing associated
+ with the window. Do not confuse this with the owner data
+ (see also AVWindowGetOwnerData).
+
+ <p>AVDocWantsToDie() is broadcast after AVDocSetDead() has been
+ called, which would warn that the AVWindow associated with that window is <code>NULL</code>. </p>
+
+ @param win IN/OUT Platform-dependent window thing:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating system</TH><TH>Value</TH></TR>
+ <TR><TD>Windows</TD><TD><code>HWND</code>.</TD></TR>
+ <TR><TD>Mac OS</TD><TD><code>WindowRef</code> for Carbon-based windows,
+ <code>NULL</code> for Cocoa-based windows (most windows are Cocoa as of 8.0)</TD></TR>
+ <TR><TD>UNIX</TD><TD><code>Widget</code>.</TD></TR>
+ </TABLE>
+
+ @return The platform-dependent thing for the window. Returns <code>NULL</code> if the
+ window is associated with an AVDoc that has been set dead
+ by AVDocSetDead().
+
+ @see AVDocGetAVWindow
+ @see AVWindowNewFromPlatformThing
+ @see AVWindowNew
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void *, AVWindowGetPlatformThing, (AVWindow win))
+
+/**
+ Gets a window's owner data. The owner data is private data
+ for the use of the window's creator. For example, if a client
+ uses its own class library, it might use the owner data
+ field to store a pointer to the object owning the AVWindow.
+
+ @param win The window whose owner data is obtained.
+ @return A pointer to owner data for <code>win</code>.
+ @see AVWindowSetOwnerData
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void *, AVWindowGetOwnerData, (AVWindow win))
+
+/**
+ Sets a window's owner data. The owner data is private data
+ for the use of the window's creator. For example, if a client
+ uses its own class library, it might use the owner data
+ field to store a pointer to the object owning the AVWindow.
+
+ @param win The window whose owner data is set.
+ @param newData A pointer to the new owner data for <code>win</code>.
+ @see AVWindowGetOwnerData
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowSetOwnerData, (AVWindow win, void *newData))
+
+NPROC(AVTArraySize, oldAVWindowGetTitle, (AVWindow win, char *buffer, AVTBufferSize bufferLen))
+
+NPROC(void, oldAVWindowSetTitle, (AVWindow win, const char *newTitle))
+NPROC(void, oldAVWindowGetFrame, (AVWindow win, oldAVRect *rect))
+NPROC(void, oldAVWindowSetFrame, (AVWindow win, const oldAVRect *rect))
+NPROC(void, oldAVWindowGetInterior, (AVWindow win, oldAVRect *rect))
+
+/**
+ Brings the specified window to the front.
+ @param win IN/OUT The window to bring to the front.
+ @notify AVAppFrontDocDidChange
+ @see AVWindowBecomeKey
+ @see AVWindowIsKey
+ @see AVWindowSetWantsKey
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowBringToFront, (AVWindow win))
+NPROC(void, oldAVWindowInvalidateRect, (AVWindow win, const oldAVRect *rect))
+
+/**
+ Redraws the invalid regions of the specified window.
+ @param win IN/OUT The window to draw.
+ @see AVWindowInvalidateRect
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowDrawNow, (AVWindow win))
+
+/**
+ AVWIN_WANTSKEY is deprecated and ignored.
+ Because of this, AVWindowSetWantsKey effectively does nothing.
+
+ @param wantsKey IN/OUT If <code>true</code>, <code>win</code> is willing to become the key
+ window, <code>false</code> otherwise.
+ @see AVWindowBecomeKey
+ @see AVWindowResignKey
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowSetWantsKey, (AVWindow win, ASBool wantsKey))
+
+/**
+ Tests whether the specified window is the key window. The
+ key window is the window that receives mouse clicks.
+
+ <p>UNIX users: This method is a no-op. </p>
+ @param win The window to test.
+ @return <code>true</code> if <code>win</code> is the key window, <code>false</code> otherwise.
+ @see AVWindowBecomeKey
+ @see AVWindowBringToFront
+ @see AVWindowSetWantsKey
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVWindowIsKey, (AVWindow win))
+
+/**
+ Makes <code>win</code> the key window (regardless of the setting of its
+ <code>wantsKey</code> flag) if the window is visible.
+
+ <p>UNIX developers: This method is a no-op. </p>
+ @param win IN/OUT The window that is to become the key window.
+
+ @see AVWindowSetWantsKey
+ @see AVWindowIsVisible
+ @see AVWindowResignKey
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowBecomeKey, (AVWindow win))
+
+/**
+ Use this method when you want <code>win</code> to resign its key window
+ status. Another window might pick up key window status as
+ a result. You must first call AVWindowSetWantsKey() with a
+ value of <code>false</code> for the <code>wantsKey</code> parameter or your window
+ may immediately become the key window again.
+
+ <p>UNIX developers: This method is a no-op. </p>
+ @param win IN/OUT The window resigning key window status.
+ @see AVWindowBecomeKey
+ @see AVWindowSetWantsKey
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowResignKey, (AVWindow win))
+
+#if CAN_SELECT_GRAPHICS
+
+/**
+ Creates a graphics selection. After creation, the selection
+ can be set using AVDocSetSelection().
+ @param pageView The AVPageView in which a graphics selection
+ is created.
+ @param selRect A pointer to the ASFixedRect bounding the
+ region from which a graphics selection is created, specified
+ in user space coordinates.
+ @return The newly created AVGrafSelect, or <code>NULL</code> if <code>selRect</code> is <code>NULL</code>
+ or is an empty rectangle.
+ @exception genErrBadParm
+ @exception genErrNoMemory
+ @see AVGrafSelectDestroy
+ @see AVDocSetSelection
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVGrafSelect, AVGrafSelectCreate, ( AVPageView pageView, const ASFixedRectP selRect ))
+
+/**
+ Destroys a graphics selection. Use this method to destroy
+ the selection only if you have not called AVDocSetSelection()
+ with it. If the selection has been set by a call to AVDocSetSelection(),
+ it will automatically be destroyed by a call to AVDocClearSelection()
+ or the next call to AVDocSetSelection().
+ @param avGraf IN/OUT The graphics selection to destroy.
+ @exception genErrBadParm
+ @see AVGrafSelectCreate
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVGrafSelectDestroy, ( AVGrafSelect avGraf ))
+
+/**
+ Gets the specified graphics selection's bounding rectangle.
+
+ @param avGraf IN/OUT The graphics selection whose bounding rectangle
+ is obtained.
+ @param boundRectP IN/OUT A pointer to the graphics selection's bounding
+ rectangle, specified in user space coordinates.
+ @exception genErrBadParm
+ @see AVGrafSelectCreate
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVGrafSelectGetBoundingRect, ( AVGrafSelect avGraf, ASFixedRect *boundRectP ))
+#else
+NOPROC(AVGrafSelectCreate)
+NOPROC(AVGrafSelectDestroy)
+NOPROC(AVGrafSelectGetBoundingRect)
+#endif
+
+/**
+ Displays the settings dialog box for the built-in standard security
+ handler, allowing the user to change a document's permissions.
+ The initial configuration of the dialog box may be set by populating
+ the StdSecurityDataRec structure prior to calling the method.
+ @param pdDoc IN/OUT The document for which new security data is
+ obtained.
+ @param secData IN/OUT (Filled by the method) A pointer to a StdSecurityDataRec
+ structure to hold the permissions selected by the user.
+
+ @return <code>true</code> if the user confirmed the selections, <code>false</code>
+ if the user pressed Cancel.
+ @see PDDocAuthorize
+
+ @note This method does not modify the document in any way.
+ It is present in the API so that other security handlers
+ can use it, if they choose, as a standard way to display or
+ obtain permissions from a user.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+UNPROC(ASBool, AVCryptDoStdSecurity, (PDDoc pdDoc, void *secData))
+
+/**
+ Displays a standard dialog box that lets a user enter a
+ password. This method does not attempt to validate the password
+ entered by the user. That operation is performed by PDDocAuthorize().
+
+ <p>It is the client's responsibility to release the memory
+ associated with the password, using ASfree(). </p>
+
+ <p>This method is present in the API so that other security
+ handlers can use it, if they choose, as a standard way to
+ obtain a password from a user. </p>
+ @param pdDoc IN The document whose password is obtained from
+ the user. This parameter is used to generate a label within
+ the dialog box.
+ @param permWanted IN The permissions requested. It must be an
+ OR of the PDPerms values.
+ @param authDataP OUT If
+ the method returns <code>true</code>, <code>authData</code> will reference a <code>char*</code>
+ containing the password.
+ @return <code>true</code> if the user confirmed the selection, <code>false</code>
+ if the user clicked Cancel.
+ @see PDDocAuthorize
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVCryptGetPassword, (PDDoc pdDoc, PDPerms permWanted, void **authDataP))
+
+/**
+ Saves a file, handling any user interface (for
+ example, a Save File dialog box) as needed. Clients do
+ not need to call this method directly, but it is available
+ for clients that need to override the Acrobat viewer's built-in
+ save method. For example, it can be used to save the changes made to a PDF
+ file into a special file, but not save the original PDF
+ file.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param doc The document to save.
+ @return <code>true</code> if the document was successfully saved, <code>false</code> otherwise.
+
+ @see AVDocDoCopyAs
+ @see AVDocDoPrint
+ @see AVDocDoSaveAs
+ @see AVDocDoSaveAsWithParams
+ @note Not replaceable in Adobe Reader.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+UPROC(ASBool, AVDocDoSave, (AVDoc doc))
+
+/**
+ Gets the AVDoc client (container application) name.
+
+ <p>This method can be used by a client to determine which client
+ application caused the Acrobat viewer to open a document. </p>
+
+ @param avDoc The document whose client name is obtained.
+
+ @param buffer (Filled by the method) The buffer into which
+ the client name is written. It may contain up to 255 characters.
+ The client name is <code>NULL</code>-terminated. If the client name is
+ longer than <code>bufSize</code>, the first <code>bufSize-1</code> bytes are copied
+ into it, followed by a <code>NULL</code>.
+ @param bufSize The size of <code>buffer</code> in bytes.
+ @return The number of characters written into <code>buffer</code>, excluding
+ the <code>NULL</code> termination. It returns <code>0</code> if the specified document
+ does not have a client associated with it.
+ @see AVDocSetClientName
+ @since PI_ACROVIEW_VERSION >= 0x00020001
+*/
+/* New for 2.1 */
+NPROC(AVTArraySize, AVDocGetClientName, ( AVDoc avDoc, char *buffer, AVTBufferSize bufSize ))
+
+/**
+ Sets the AVDoc client (container application) name. This
+ method can be used by clients that open documents in the
+ viewer via DDE or Apple events. Most clients will not open
+ documents in this way, however, making this method unnecessary
+ for most clients.
+ @param avDoc The document whose client names is set.
+ @param clientName The buffer from which the client name
+ is read. It may contain up to 255 characters, and must be <code>NULL</code>-terminated.
+ @exception genErrNoMemory
+ @see AVDocGetClientName
+ @since PI_ACROVIEW_VERSION >= 0x00020001
+*/
+NPROC(void, AVDocSetClientName, ( AVDoc avDoc, char *clientName ))
+
+/**
+ Gets the text from the specified text selection, converts
+ it to the specified format, and passes it to a user-supplied
+ procedure.
+ @param doc IN/OUT The document from which the text is obtained.
+ @param pageNum IN/OUT The page number in <code>doc</code> from which the text is
+ obtained. The first page in a document is page <code>0</code>.
+ @param pdText IN/OUT The text selection whose text is obtained.
+ Pass <code>NULL</code> to get all the text on the page.
+ @param format IN/OUT The format in which the text is desired. The
+ following are allowed values (these strings must be converted
+ to ASAtom objects using ASAtomFromString()):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Allowed value</TH><TH>Description</TH></TR>
+ <TR><TD><code>All</code></TD><TD></TD>(Mac OS/Windows) Calls <code>copyProc</code> once with each available format.</TR>
+ <TR><TD><code>Text</code></TD><TD>(Mac OS/Windows) Calls <code>copyProc</code> twice. The first time, it
+ passes the text in the specified selection. The text is
+ passed using the same platform encoding as when it is put
+ onto the clipboard (<code>format = Text</code>). The second time, it
+ passes a Unicode version of the text (<code>format = UCSText</code>).</TD></TR>
+ <TR><TD>Style</TD><TD>(Mac only) Calls <code>copyProc</code> twice. The first time,
+ it passes the <code>Text</code> representation. The second time, it passes
+ a <code>StyleInfo</code> record.</TD></TR>
+ <TR><TD><code>RTF</code></TD><TD>(Mac OS/Windows) Calls <code>copyProc</code>
+ twice. The first time, it passes the text in Rich Text Format.
+ The second time, it passes a Unicode version of the text.
+ Upon using or manipulating the text, you should check the
+ format in <code>copyProc</code>.</TD></TR>
+ </TABLE>
+
+ @param copyProc IN/OUT A user-supplied callback to which the text
+ is passed.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>copyProc</code> each time it is called.
+ @exception pdErrOpNotPermitted
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreateWordHilite
+ @see PDDocCreateTextSelect
+ @see PDWordFinderEnumWords
+ @see PDWordFinderAcquireWordList
+ @since PI_ACROVIEW_VERSION >= 0x00020001
+*/
+SPROC(void, AVDocGetPageText, (AVDoc doc, PDPageNumber pageNum, PDTextSelect pdText, ASAtom format, AVTextCopyProc copyProc, void *clientData), AVDocGetPageTextHost)
+
+/* New for 2.2 */
+/**
+ Sets the text to show in tooltips. This text is shown
+ when the cursor is held over a toolbar button for a period
+ of time.
+
+ <p>In Acrobat 4.0 and later, toolbar buttons can also have
+ single key shortcuts assigned to them. (Conceptually, tools
+ have shortcuts but the shortcuts are attached to the buttons).
+ This is done by appending a vertical bar character <code>'|'</code> followed
+ by the shortcut to the button's tooltip text.</p>
+
+ <p>Appending the shortcut to the tooltip text allows it to
+ localize at the same time as the tooltip text. </p>
+
+ @example Here is the tooltip text for the Hand tool:
+
+ <p><code>'Hand Tool (H)|h' </code></p>
+
+ <p>The trailing <code>'|h'</code> portion indicates that the Hand tool uses
+ the <code>'H'</code> key as the shortcut. This portion is stripped off
+ before the tooltip is displayed. </p>
+
+ <p>This behavior only applies to tooltips where the '|' is
+ the second-to-last character. </p>
+
+ @param button The toolbar button to which a tooltip is
+ added.
+ @param text The text to show.
+ @see AVToolButtonNew
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVToolButtonSetHelpText, (AVToolButton button, const char* text))
+
+SPROC(PDTextSelect, oldAVPageViewTrackText, (AVPageView pageView, ASInt16 xHit, ASInt16 yHit, PDTextSelect current), oldAVPageViewTrackTextHost)
+
+/**
+ Inverts the given text selection on the current page using
+ the current AVPageView color.
+ @param pageView IN/OUT The page view.
+ @param textSelect IN/OUT The words to highlight.
+ @see AVPageViewTrackText
+ @see AVPageViewInvalidateText
+ @see AVPageViewPointInText
+ @see PDDocCreateTextSelect
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVPageViewHighlightText, (AVPageView pageView, PDTextSelect textSelect))
+
+/**
+ Invalidates the bits that AVPageViewHighlightText() touches.
+
+ @param pageView IN/OUT The page view.
+ @param textSelect IN/OUT The words to invalidate.
+ @see AVPageViewHighlightText
+ @see AVPageViewPointInText
+ @see AVPageViewTrackText
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVPageViewInvalidateText, (AVPageView pageView, PDTextSelect textSelect))
+NPROC(ASBool, oldAVPageViewPointInText, (AVPageView pageView, ASInt16 xHit, ASInt16 yHit, PDTextSelect pdText))
+
+/**
+ Returns the page number of the first page that is visible
+ on the screen.
+ @param pageView The page view whose first visible page
+ number is obtained.
+ @return The page number of the first page that is visible on the screen.
+
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewPageNumIsVisible
+ @see AVPageViewGetPageNum
+ @see AVPageViewSetPageNum
+ @see AVPageViewGetSelectedAnnotPageNum
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(PDPageNumber, AVPageViewGetFirstVisiblePageNum, (AVPageView pageView))
+
+/**
+ Returns the page number of the last page that is visible
+ on the screen.
+ @param pageView The page view whose last visible page
+ number is obtained.
+ @return The page number of the last page that is visible on the screen.
+
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewPageNumIsVisible
+ @see AVPageViewGetPageNum
+ @see AVPageViewSetPageNum
+ @see AVPageViewGetSelectedAnnotPageNum
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(PDPageNumber, AVPageViewGetLastVisiblePageNum, (AVPageView pageView))
+
+/**
+ Determines if a given page number is visible.
+ @param pageView IN/OUT The page view.
+ @param pageNum IN/OUT The page number corresponding to the view
+ of interest.
+ @return <code>true</code> if <code>pageNum</code> is visible, <code>false</code> otherwise.
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewGetPageNum
+ @see AVPageViewGetSelectedAnnotPageNum
+ @see AVPageViewSetPageNum
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVPageViewPageNumIsVisible, (AVPageView pageView, PDPageNumber pageNum))
+
+/**
+ Sets the current logical page of the page view, which might
+ not be the same as the current number indicated on the screen.
+
+ <p>Client writers in general do not need this, but if you wish
+ to perform some operation on a page other than the one returned
+ by AVPageViewGetPageNum(), you can use this call to temporarily
+ set the page. You must restore the page number when you
+ are done. You should avoid causing any major changes to
+ the page view (such as scrolling) to ensure that you end
+ up restoring the page to the correct value. </p>
+ @param pageView The page view.
+ @param pageNum The page number.
+ @return Previous page number.
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewGetPageNum
+ @see AVPageViewGetSelectedAnnotPageNum
+ @see AVPageViewPageNumIsVisible
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(PDPageNumber, AVPageViewSetPageNum, (AVPageView pageView, PDPageNumber pageNum))
+
+/**
+ Returns the page number of the currently selected annotation,
+ or <code>-1</code> if no annotation is selected.
+ @param pageView The page view whose selected annotation
+ page is obtained.
+ @return Returns the page number of the currently selected annotation,
+ or <code>-1</code> if no annotation is selected.
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewPageNumIsVisible
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(PDPageNumber, AVPageViewGetSelectedAnnotPageNum, (AVPageView pageView))
+
+/**
+ Sends auxiliary data to an AVDoc. If an AVAuxDataHandler
+ exists for the data type, the handler is called with <code>avDoc</code>,
+ <code>auxDataType</code>, and <code>auxData</code>. The definition of the auxiliary
+ data is dependent on the AVAuxDataHandler.
+
+ <p>For any value of <code>auxDataType</code>, the <code>auxData</code> parameter must
+ be predefined so that a user of this method knows what type
+ of data to send. It is expected that the implementor of
+ an AVAuxDataHandler provides this definition. </p>
+ @param avDoc IN/OUT The target document.
+ @param auxDataType IN/OUT The type of data being sent.
+ @param auxData IN/OUT A pointer to the data.
+ @param auxDataLen IN/OUT The length of the data.
+ @return <code>true</code> if <code>auxData</code> was accepted by a handler, <code>false</code> otherwise.
+
+ @see AVHasAuxDataHandler
+ @see AVRegisterAuxDataHandler
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVDocSendAuxData, (AVDoc avDoc, ASAtom auxDataType, void *auxData, AVTBufferSize auxDataLen))
+
+/**
+ Indicates whether a handler exists for the specified data
+ type.
+ @param auxDataType IN/OUT The name of the data handler being queried.
+ @return <code>true</code> if a handler is registered, <code>false</code> if a handler is not
+ registered.
+ @see AVDocSendAuxData
+ @see AVRegisterAuxDataHandler
+ @see AVUnregisterAuxDataHandler
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVHasAuxDataHandler, (ASAtom auxDataType))
+
+/**
+ Obsolete. Registers an old <code>AuxDataHandler</code>.
+ @see AVRegisterAuxDataHandler
+*/
+NPROC(ASBool, oldAVRegisterAuxDataHandler, (ASExtension extension, ASAtom auxDataType, oldAVAuxDataHandler handler))
+
+/**
+ Un-registers a previously registered auxiliary data handler.
+ @param extension The <code>gExtensionID</code> of the client un-registering
+ the handler.
+ @param auxDataType The type of data for the handler being
+ un-registered.
+ @param handler The handler to un-register.
+ @return <code>true</code> if the handler was un-registered, <code>false</code> if the handler
+ could not be un-registered. For example, it returns <code>false</code> if
+ the handler was never registered.
+ @see AVHasAuxDataHandler
+ @see AVRegisterAuxDataHandler
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVUnregisterAuxDataHandler, (ASExtension extension, ASAtom auxDataType, AVAuxDataHandler handler))
+
+PROC(void, oldAVDocPrintPagesWithParams, (AVDoc doc, AVDocPrintParams params))
+NPROC(void, oldAVPageViewDrawCosObj, (AVPageView pageView, CosObj cosObj, oldAVRect* r))
+
+/**
+ Indicates that the file stream for this document is terminated,
+ although the AVDoc is still open. No more data can be read
+ from this AVDoc.
+
+ <p>AVDocs that are marked as dead may start returning <code>NULL</code>
+ at any time between the initial call to AVDocSetDead() and
+ the time that the AVDoc is actually closed. Callers of
+ AVDocGetAVWindow() and other AVDoc property methods must check
+ for a <code>NULL</code> return value. </p>
+ @param doc IN/OUT The document to set as dead.
+ @param dead IN/OUT <code>true</code> if the document's file stream is terminated,
+ <code>false</code> otherwise.
+ @notify AVDocWantsToDie (if dead is <code>true</code>)
+ @see AVDocClose
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVDocSetDead, (AVDoc doc, ASBool dead))
+
+/**
+ Indicates that the specified toolbar button should be displayed
+ in toolbars contained in external windows, such as in a
+ web browser.
+ @param button The button.
+ @param external Indicates whether to show the button in
+ external windows. It must be one of Tool Button Flags.
+ @see AVToolButtonNew
+
+ @note Call AVToolButtonSetExternal() before adding the tool button
+ with AVToolBarAddButton(). If you want to change the tool button's
+ location after it has been added, call AVToolButtonSetExternal()
+ and add the button again with AVToolBarAddButton().
+
+ @note To enable a toolbar button in an external window, first
+ remove the button from the toolbar, then turn on the TOOLBUTTON_EXTERNAL
+ flag and add the button back onto the toolbar.
+ @ref ToolButtonFlags
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+SPROC(void, AVToolButtonSetExternal, (AVToolButton button, AVTFlagBits16 external), AVToolButtonSetLocation)
+
+
+/**
+ Returns <code>true</code> if the application is in a state in which it
+ is safe to destroy a document that uses the multi-read protocol.
+ The multi-read protocol is implemented on some platforms
+ using a <i>yield</i> mechanism, which involves a transfer of
+ information between two applications. This function returns
+ <code>true</code> if there is no task executing in the application that
+ could invoke such a transfer. Attempting to close a document
+ during such a transfer can cause a deadlock event or a crash.
+
+ <p>When a multi-read protocol document is closed, the client
+ must register an AVAppIdle task. During its idle proc, it
+ must call AVAppHandlePlatformEvent(). If the call returns
+ <code>true</code>, it is safe to call AVDocClose(). If it returns <code>false</code>,
+ the client must retry at its next idle proc call. AVAppHandlePlatformEvent()
+ always returns <code>false</code> if invoked from an AVExecuteProc(). </p>
+
+ <p>This method does not protect against clients that invoke
+ the API outside of AVAppIdle(), an AVExecuteProc(), or other
+ explicit API methods. For example, if a Windows client uses
+ a Windows <code>SetTimer</code> event to call an API method, AVAppHandlePlatformEvent()
+ may erroneously return <code>true</code>. Therefore, clients should always
+ use the API methods. </p>
+ @return <code>true</code> if it is safe to call AVDocClose(), <code>false</code> otherwise.
+
+ @see AVDocClose
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVAppIsIdle, (void))
+
+NPROC(AVDoc, oldAVDocOpenFromASFileWithParams, (ASFile file, char *tempTitle, oldAVDocOpenParams params))
+
+/**
+ Used by page caching code to determine the next page to
+ cache (and at what scale). Allows clients to do their own
+ page caching.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param pageView The page view.
+ @param pdDoc (Filled by the method) The PDDoc containing
+ the next page to cache.
+ @param pageNum (Filled by the method) The next page to
+ cache.
+ @param scale (Filled by the method) The scale of the next
+ page to cache.
+ @return <code>true</code> if the next page was cached, <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+PROC(ASBool, AVPageViewGetNextView, (AVPageView pageView, PDDoc* pdDoc, PDPageNumber* pageNum, ASFixed* scale))
+
+NPROC(void, oldAVDocGetViewDef, (AVDoc doc, oldAVDocViewDef viewDef))
+SPROC(void, oldAVDocSetViewDef, (AVDoc doc, oldAVDocViewDef viewDef), oldAVDocUseViewDef)
+
+/**
+ Handles a platform-specific event. Use this method to dispatch
+ a platform-specific event structure to an AVWindow. This method may raise exceptions, depending on the event.
+ @param win IN/OUT The window with the event to handle.
+ @param platformEvent IN/OUT A pointer to a platform-specific event
+ structure.
+ @return <code>true</code> if the event was handled, <code>false</code> otherwise.
+ @see AVAppHandleAppleEvent
+ @see AVAppHandlePlatformEvent
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASBool, AVWindowHandlePlatformEvent, (AVWindow win, void *platformEvent))
+
+/**
+ Queries the AVWindow for the appropriate cursor for display
+ at the given point (in the AVWindow object's device coordinate
+ space). This method may raise exceptions, depending on the method called.
+ @param win The AVWindow to query.
+ @param x The x-coordinate of a point in <code>win</code>.
+ @param y The y-coordinate of a point in <code>win</code>.
+ @return The AVCursor appropriate for the specified point in the
+ window.
+ @since PI_MACINTOSH_VERSION >= 0x00020002
+*/
+NPROC(AVCursor, AVWindowGetCursorAtPoint, (AVWindow win, AVlCoord x, AVlCoord y))
+
+/**
+ Displays a modal dialog box that allows a user to specify an
+ action. For example, it is used by forms to add actions to fields.
+
+ @param doc IN/OUT The document in which the action is specified.
+
+ @param action IN/OUT The specified action.
+ @param dialogTitle IN/OUT The title for the dialog box.
+ @return <code>true</code> if the user clicked the Set Link button, <code>false</code> if the
+ user clicked Cancel.
+ @see AVDocPerformAction
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+XNPROC(ASBool, AVDocDoActionPropsDialog, (AVDoc doc, PDAction* action, const char* dialogTitle))
+
+/**
+ Gets the transition handler registered for the specified
+ transition type.
+ @param name IN/OUT Type of transition handler, which may be one
+ of the types provided in the Acrobat viewer or a new type
+ registered by a plug-in.
+ @return The transition handler for the type, or <code>NULL</code> if no transition
+ handler is registered for that type.
+ @see AVAppRegisterTransHandler
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(AVTransHandler, AVAppGetTransHandlerByType, (ASAtom name))
+
+/**
+ Enumerates all registered transition handlers, calling the
+ user-supplied procedure for each.
+ @param enumProc IN/OUT A user-supplied procedure to call once for
+ each transition handler.
+ @param clientData IN/OUT A user-supplied data passed to <code>enumProc</code>
+ each time it is called.
+ @exception Raises an exception only if <code>enumProc</code> raises an exception.
+
+ @see AVAppGetTransHandlerByType
+ @see AVAppRegisterTransHandler
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVAppEnumTransHandlers, (AVTransHandlerEnumProc enumProc, void *clientData))
+
+/**
+ Registers a transition handler within Acrobat. If <code>avth</code> has
+ not implemented the <code>GetType</code> callback, it will not be registered.
+
+ @param avth IN/OUT An AVTransHandler structure containing pointers
+ to the transition handler's functions. This structure must
+ not be freed after calling AVAppRegisterTransHandler().
+ @see AVAppEnumTransHandlers
+ @see AVAppGetTransHandlerByType
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVAppRegisterTransHandler, (AVTransHandler avth))
+
+/**
+ Displays a file dialog box which can be used to save the document to a
+ new name. It allows clients (such as Optimizer) to do their
+ own file saving.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param doc The document to save.
+ @return <code>true</code> if the document was successfully saved, <code>false</code> otherwise.
+
+ @see AVDocDoCopyAs
+ @see AVDocDoPrint
+ @see AVDocDoSave
+ @see AVDocDoSaveAsWithParams
+ @note Not replaceable in Adobe Reader.
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+UPROC(ASBool, AVDocDoSaveAs, (AVDoc doc))
+
+/**
+ Sets the layout mode for a page view.
+ @param pageView IN/OUT The page view whose layout mode is set.
+
+ @param mode IN/OUT The new layout mode for the page view.
+ @see AVPageViewGetLayoutMode
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVPageViewSetLayoutMode, (AVPageView pageView, PDLayoutMode mode))
+
+/**
+ Gets the page layout mode for a page view.
+ @param pageView IN/OUT The page view whose layout mode is obtained.
+
+ @return The <code>pageView</code> object's page layout mode, described in PDLayoutMode.
+
+ @see AVPageViewSetLayoutMode
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(PDLayoutMode, AVPageViewGetLayoutMode, (AVPageView pageView))
+NPROC(void, oldAVPageViewInsetRect, (AVPageView pageView, const oldAVRect* rr, ASBool down))
+
+/**
+ Determines whether a given document is displayed in an application's
+ external window (such as in a web browser's window).
+ @param doc The document being tested.
+ @return <code>true</code> if the given document is displayed in an application's
+ external window, <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVDocIsExternal, (AVDoc doc))
+
+/**
+ Causes the given page view to change to the view given by
+ <code>viewDest</code> and <code>sourceZoom</code>.
+ @param pageView IN/OUT The page view to change.
+ @param viewDest IN/OUT The view destination.
+ @param sourceZoom IN/OUT The zoom factor to use, unless <code>viewDest</code>
+ specifies inheriting the current zoom, which is the zoom
+ in effect when a link is clicked.
+
+ <p>For example, <code>sourceZoom</code>
+ is used only if the view destination is of type <code>XYZ</code> (
+ that is, it specifies a point and a zoom) and the zoom is
+ zero (meaning 'inherit the current zoom'). In this case,
+ <code>sourceZoom</code> is used as the zoom to inherit. </p>
+
+ @see PDViewDestCreate
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVPageViewUseThisDestination, (AVPageView pageView, PDViewDestination viewDest, ASFixed sourceZoom))
+
+/**
+ Determines if the current user is authorized to open a document.
+
+ <p>If no password is required to open the document, the user
+ will be granted access automatically. If a password is required,
+ the method queries the user for the password and uses it
+ to request open permissions for the document. </p>
+
+ <p>Clients: This method can be used as a standard, interactive
+ authorization callback when opening documents through PDDocOpen(). </p>
+
+ @param pdDoc The document.
+ @return <code>true</code> if the user is authorized to open the document, <code>false</code>
+ otherwise.
+ @see PDDocAuthorize
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVAuthOpen, (PDDoc pdDoc))
+
+
+/* new procs for 3.1 */
+
+/**
+ Makes a copy of the annotation for the (possibly different)
+ specified AVDoc. It calls the AVAnnotHandlerCopyProc() callback
+ in AVAnnotHandler.
+ @param fromDoc The document containing the annotation.
+ @param anAnnot The annotation to copy.
+ @param toDoc The document to which the annotation is copied.
+ @return A copy of the annotation.
+ @exception avErrBadAnnotationCopy is raised if the associated
+ annotation handler has not implemented the AVAnnotHandlerCopyProc() callback.
+ It raises the standard exceptions if memory limit problems occur.
+
+ @note The Acrobat viewers define AVAnnotHandlerCopyProc()
+ callbacks for all currently defined annotations.
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(PDAnnot, AVDocCopyAnnot, (AVDoc fromDoc, PDAnnot anAnnot, AVDoc toDoc))
+
+/**
+ Makes a copy of the annotation for the (possibly different)
+ specified AVDoc.
+
+ <p>This copy includes only those fields that are described
+ in the <i>PDF Reference</i> as common to all annotations (this
+ list currently includes Type, Subtype, Rect, Border, C,
+ T, M, F, H, AS, BS, and AA). This method is a proper starting
+ point for the design of a Copy method for a custom annotation.
+ This allows a client to concentrate on those member objects
+ specific to the custom annotation. </p>
+
+ <p>It raises the standard exceptions if memory limit problems
+ occur.</p>
+
+ @param fromDoc The document whose annotation is copied.
+
+ @param anAnnot The annotation to copy.
+ @param toDoc The document to which the annotation is copied.
+ @return A copy of the annotation.
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(PDAnnot, AVDocCopyAnnotCommon, (AVDoc fromDoc, PDAnnot anAnnot, AVDoc toDoc))
+
+/**
+ Makes a copy of the action for the (possibly different)
+ specified AVDoc. It calls the AVActionCopyProc() callback in
+ AVActionHandlerProcs.
+
+ <p>It raises the standard exceptions if memory limit problems
+ occur.</p>
+
+ @param fromDoc IN/OUT The document containing the action.
+ @param anAction IN/OUT The PDAction to copy.
+ @param toDoc IN/OUT The document to which the action is copied.
+
+ @return A copy of the action.
+ @exception avErrBadActionCopy is raised if the associated action handler has not
+ implemented the AVActionCopyProc() callback.
+ @exception pdErrBadAction is raised if the action dictionary is invalid.
+ @exception pdErrOpNotPermitted is raised if the user does not have the required
+ permissions level for <code>destDoc</code> to perform this operation.
+
+ @note The Acrobat viewers define AVActionCopyProc() callbacks
+ for all currently defined actions.
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(PDAction, AVDocCopyAction, (AVDoc fromDoc, PDAction anAction, AVDoc toDoc))
+
+/**
+ Makes a copy of the action for the (possibly different)
+ specified AVDoc.
+
+ <p>This copy includes only those fields that are described
+ in the PDF Reference as common to all actions (this list
+ currently includes Type, S, and Next). This method is a
+ proper starting point for the design of a Copy method
+ for a custom action. This allows a client to concentrate
+ on those member objects specific to the custom action. </p>
+
+ <p>It raises the standard exceptions if memory limit problems
+ occur.</p>
+
+ @param fromDoc The document containing the action.
+ @param anAction The PDAction to copy.
+ @param toDoc The document to which the action is copied.
+ @return A copy of the action.
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(PDAction, AVDocCopyActionCommon, (AVDoc fromDoc, PDAction anAction, AVDoc toDoc))
+
+/**
+ Copies any additional actions (AA) from a Cos Dictionary
+ to a Cos Dictionary in the (possibly different) specified
+ AVDoc.
+
+ <p>This method copies the following keys: E, X, D, U, O, C,
+ FP, PP, NP, and LP. This method is designed to aid clients
+ in copying additional actions for pages. </p>
+
+ <p>For copying annotations, it is better to use AVDocCopyAnnotCommon(). </p>
+
+ <p>This method raises the standard exceptions if memory limit problems
+ occur.</p>
+
+ @param avFr The document containing <code>srcDict</code>.
+ @param coFr The dictionary from which the action is
+ copied.
+ @param avTo The document to which the action is copied.
+ @param coTo The dictionary to which the action is
+ copied.
+ @return A copy of the action.
+ @exception cosErrExpectedDict is raised if the object stored under the /AA key
+ in <code>srcDict</code> is not a CosDict.
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(void, AVDocCopyAdditionalActions, (AVDoc avFr, CosObj coFr, AVDoc avTo, CosObj coTo))
+NPROC(void, oldAVPageViewDrawCosObjEx, (AVPageView pageView, CosObj cosObj, oldAVRect* r, ASFixedMatrix *matrix))
+
+/**
+ Creates a destination info object from a given AVPageView
+ and fit type.
+ @param pageView The page view from whose current view
+ the destination information is created.
+ @param fitType The ASAtom specifying the fit type that
+ the view destination will have. The string associated with
+ fit type must be one of View Destination Fit Types.
+ @return The newly created destination info.
+ @see AVDestInfoDestroy
+ @see AVPageViewUseDestInfo
+ @ref ViewDestinationFitTypes
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+
+NPROC(AVDestInfo, AVPageViewToDestInfo, (AVPageView pageView, ASAtom fitType))
+
+/**
+ Causes the given page view to change to the view given by
+ an AVDestInfo object.
+ @param pageView IN/OUT The page view to change.
+ @param destInfo IN/OUT The destination to use.
+ @see AVPageViewToDestInfo
+ @see AVPageViewUseThisDestination
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(void, AVPageViewUseDestInfo, (AVPageView pageView, AVDestInfo destInfo))
+
+/**
+ Releases the memory associated with a destination.
+ @param destInfo IN/OUT The destination information object to destroy.
+
+ @see AVPageViewToDestInfo
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(void, AVDestInfoDestroy, (AVDestInfo destInfo))
+
+/**
+ Prompts the user with a standard file dialog box and copies
+ the file byte for byte. It displays a progress monitor
+ showing the progress of the file copy.
+ @param avDoc IN/OUT The document to copy.
+ @return <code>true</code> if the copy was successful, <code>false</code> otherwise.
+ @see AVDocDoPrint
+ @see AVDocDoSave
+ @see AVDocDoSaveAs
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASBool, AVDocDoCopyAs, (AVDoc avDoc))
+
+
+/* Acrobat 4.0 Additions */
+NPROC(void, oldAVPageViewDrawAnnotSequence, (AVPageView pv, PDAnnot an, oldAVRect *bbox))
+
+/**
+ Performs the print operation, including user dialog boxes.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param doc IN/OUT The document to print.
+ @notify AVDocDidPrint
+ @notify AVDocWillPrint
+ @see AVDocDoCopyAs
+ @see AVDocDoSave
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+PROC(void, AVDocDoPrint, (AVDoc doc))
+
+/**
+ Saves a file, using the parameters specified in <code>params</code>.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param doc IN/OUT The document to save.
+ @param params IN/OUT A structure with information describing how
+ the AVDoc is saved.
+ @return <code>true</code> if the document was successfully saved, <code>false</code> otherwise.
+
+ @see AVDocDoCopyAs
+ @see AVDocDoPrint
+ @see AVDocDoSave
+ @see AVDocDoSaveAs
+ @note Not replaceable in Adobe Reader.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+UPROC(ASBool, AVDocDoSaveAsWithParams, (AVDoc doc, AVDocSaveParams params))
+
+/**
+ Gets the information structure associated with an annotation
+ handler.
+ @param avanh IN/OUT The annotation handler for which the
+ information structure is needed.
+ @return The information structure associated with the annotation handler,
+ or <code>NULL</code> if the handler does not support this operation.
+
+ @see AVAnnotHandlerDeleteInfo
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(AVAnnotHandlerInfo, AVAnnotHandlerGetInfo, (AVAnnotHandler avanh))
+
+/**
+ Deletes the AVAnnotHandlerInfo associated with an annotation
+ handler.
+ @param avanh IN/OUT The annotation handler.
+ @param info IN/OUT The AVAnnotHandlerInfo associated with the
+ annotation handler. <code>info</code> contains the user interface name
+ of the annotation type and the platform-dependent bitmap used
+ as the annotation icon.
+ @see AVAnnotHandlerGetInfo
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVAnnotHandlerDeleteInfo, (AVAnnotHandler avanh, AVAnnotHandlerInfo info))
+#if HAS_MENUS
+/* AVPageViewDoPopupMenu
+** Display the given AVMenu as a popup menu anchored at xHit and yHit. The coordinates
+** are relative to the passed AVPageView. "rightMouse" is <code>true</code> if the right mouse button
+** (where applicable) was used to invoke the popup. "choice" is the index of the AVMenuItem
+** which should appear under the mouse at pop-up time.
+*/
+NPROC(AVMenuItem, oldAVPageViewDoPopupMenu, (AVPageView pageView, AVMenu menu, ASInt16 xHit, ASInt16 yHit, ASBool rightMouse, AVMenuIndex choice))
+#else /* !HAS_MENUS */
+NOPROC(AVPageViewDoPopupMenu)
+#endif /* !HAS_MENUS */
+
+
+/**
+ Calculates where an annotation is drawn with no zoom or
+ no rotation, as specified by the annotation flags. This
+ method generalizes AVPageViewGetAnnotRect().
+ @param pv IN/OUT The page view used for the transformation.
+ @param flags IN/OUT Annotation flags obtained by PDAnnotGetFlags.
+
+ @param ar IN/OUT A pointer to the annotation's bounding rectangle,
+ specified in user space coordinates.
+ @param mr IN/OUT (Filled by the method) The transformation matrix.
+
+ @see AVPageViewAppearanceGetAVMatrix
+ @see AVPageViewDeviceRectToPageRZ
+ @see AVPageViewGetAnnotRect
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVPageViewTransformRectRZ, (AVPageView pv, AVTFlagBits flags, ASFixedRect *ar, ASFixedMatrix *mr))
+
+/**
+ Calculates a matrix for use with AVPageViewDrawCosObj() or
+ AVPageViewDrawCosObjEx() that leaves the appearance unrotated
+ and un-zoomed as specified by <code>flags</code>. This is typically used
+ in conjunction with drawing an annotation appearance represented
+ by <code>appear</code>.
+ @param PageView The page view for which the matrix is
+ calculated.
+ @param flags Annotation flags obtained by PDAnnotGetFlags().
+
+ @param appear The appearance of the object, which is a Form
+ XObject.
+ @param ar The bounding rectangle for <code>appear</code>.
+ @param mr (Filled by the method) The transformation matrix.
+ @see AVPageViewDrawCosObj
+ @see AVPageViewDrawCosObjEx
+ @see AVPageViewTransformRectRZ
+ @note The flag value numeric types changed in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x000400000x00060000.
+*/
+NPROC(void, AVPageViewAppearanceGetAVMatrix, (AVPageView PageView, AVFlagBits32 flags, CosObj appear, ASFixedRect *ar, ASFixedMatrix *mr))
+
+/**
+ Gets the number of a page containing an annotation.
+ @param pageView The page view with the annotation.
+ @param annot The annotation whose page number is obtained.
+ @return The number of the page containing <code>annot</code>.
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewPageNumIsVisible
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(PDPageNumber, AVPageViewGetVisibleAnnotPage,(AVPageView pageView, PDAnnot annot))
+
+/**
+ Inverts the interior of a quad.
+ @param pageView The page view in which the inverted quad
+ is drawn.
+ @param quad A pointer to the quad to <code>invert</code>, specified in
+ device space coordinates. Use AVPageViewPointToDevice() to
+ convert the coordinates of the four corners of the quad
+ that is specified in user space.
+ @param highlight If <code>true</code>, it uses the highlight mode specified
+ by <code>avpHighlightMode</code> in the Acrobat viewer's preferences
+ file (see AVAppSetPreference()). If <code>false</code>, it uses a default
+ highlighting mode.
+ @see AVPageViewInvertRect
+ @note The coordinate amd flag value numeric types changed in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVPageViewInvertQuad, (AVPageView pageView, const Quad *quad, ASBool highlight))
+
+/**
+ Given an ASTimeRecP, it gets a string representing the date
+ and time. This routine is locale-friendly.
+
+ <p>The returned string is allocated using ASmalloc() and must
+ be freed by the caller using ASfree(). </p>
+ @param timeRec IN/OUT A pointer to an ASTimeRec structure.
+ @return A string representing the date and time. It returns <code>NULL</code> if the conversion
+ fails.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(char*, AVSysAllocTimeStringFromTimeRec, (ASTimeRecP timeRec))
+
+/**
+ Handles a platform-specific event. This method may raise exceptions, depending on the event.
+ @param platformEvent IN/OUT A pointer to a platform-specific event
+ structure.
+ @return <code>true</code> if the event was handled, <code>false</code> otherwise.
+ @see AVAppHandleAppleEvent
+ @see AVWindowHandlePlatformEvent
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASBool, AVAppHandlePlatformEvent, (void *platformEvent))
+
+/**
+ Sets the read-only state of an AVDoc.
+ @param doc IN/OUT The AVDoc to set to read-only.
+ @param readOnly IN/OUT <code>true</code> if the given document is set to read-
+ only, <code>false</code> if it is set to read-write.
+ @see AVDocIsReadOnly
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVDocSetReadOnly, (AVDoc doc, ASBool readOnly))
+
+/**
+ Determines whether an AVDoc is read-only.
+ @param doc IN/OUT The AVDoc whose read-only state is checked.
+
+ @return <code>true</code> if the document is read-only, <code>false</code> otherwise.
+
+ @see AVDocSetReadOnly
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASBool, AVDocIsReadOnly, (AVDoc doc))
+
+/**
+ Shows or hides the controls in the status area at the bottom
+ of a page view.
+ @param pageView The page view whose controls are affected.
+
+ @param controlID The controls affected.
+ @param show <code>true</code> if the controls are displayed, <code>false</code>
+ if not shown.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVPageViewShowControl, (
+ AVPageView pageView,
+ AVPageViewControlID controlID,
+ ASBool show))
+
+/**
+ Creates a new sub-toolbar for use as a toolbar button flyout.
+
+ <p>Flyouts are established by creating a new toolbar with AVToolBarNewFlyout(),
+ appending toolbar buttons to the new toolbar using <code>AVToolBar</code>
+ calls, and attaching that toolbar to a tool button, known
+ as the anchor button, with AVToolButtonSetFlyout(). </p>
+
+ <p>This method creates a distinct toolbar from the toolbar
+ returned by AVAppGetToolBar(). </p>
+ @return The newly created toolbar to use for a flyout.
+ @see AVToolButtonGetFlyout
+ @see AVToolButtonSetFlyout
+
+ @note The viewer makes a copy of the anchor button and attaches
+ it to the front of the flyout to achieve the correct visual
+ effect; the client does not need to do this.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(AVToolBar, AVToolBarNewFlyout, (void))
+
+/**
+ Attaches a sub-toolbar or flyout to a toolbar button. A
+ copy of the button is attached to the front of the toolbar.
+ A click-hold pops up the flyout and allow the user to select
+ a different button.
+
+ <p>Flyouts are established by creating a new toolbar with AVToolBarNewFlyout(),
+ appending toolbar buttons to the new toolbar using AVToolBar
+ calls, and attaching that toolbar to a tool button, known
+ as the anchor button, with AVToolButtonSetFlyout(). </p>
+ @param button IN/OUT The toolbar button to attach to the flyout.
+ @param flyout IN/OUT The flyout to which <code>button</code> is attached.
+ @see AVToolBarNewFlyout
+ @see AVToolButtonGetFlyout
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVToolButtonSetFlyout, (AVToolButton button, AVToolBar flyout))
+
+/**
+ Gets the flyout attached to a toolbar button. A flyout is
+ a sub-toolbar attached to a toolbar button.
+
+ <p>This method gets a different toolbar from the toolbar returned
+ by AVAppGetToolBar(). </p>
+ @param button The toolbar button whose flyout is obtained.
+ @return The flyout associated with button. It returns <code>NULL</code> if there
+ is no flyout associated with button.
+ @see AVToolBarNewFlyout
+ @see AVToolButtonSetFlyout
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(AVToolBar, AVToolButtonGetFlyout, (AVToolButton button))
+
+
+/**
+ Attaches a menu to a toolbar button.
+
+ <p>If a tool button has no execute proc, the menu pops up when
+ the tool button is clicked. If the tool button does have
+ an execute proc, the user must click and hold on the button
+ for some time to display the menu. Simply clicking on the
+ button invokes the button's execute proc as usual. </p>
+ @param button IN/OUT The toolbar button to which a menu is attached.
+
+ @param menu IN/OUT The menu to attach to <code>button</code>.
+ @see AVPageViewDoPopupMenu
+ @see AVToolButtonGetMenu
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVToolButtonSetMenu, (AVToolButton button, AVMenu menu))
+
+/**
+ Gets the menu attached to a toolbar button.
+ @param button IN/OUT The toolbar button to which a menu is attached.
+
+ @return The menu attached to <code>button</code>.
+ @see AVPageViewDoPopupMenu
+ @see AVToolButtonSetMenu
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(AVMenu, AVToolButtonGetMenu, (AVToolButton button))
+
+
+/**
+ Sets a new icon for a toolbar button.
+
+ <p>A tool button's icon can change dynamically. This allows
+ multi-state buttons, such as the one that opens and closes
+ the splitter bar, to change appearance appropriately. This
+ should allow multiple buttons to collapse into one. </p>
+
+ <p>Most other aspects of a tool button, such as its execute proc
+ and tooltip text, can be changed on the fly using other
+ AVToolButton methods. </p>
+ @param button IN/OUT The toolbar button whose icon is set.
+ @param icon IN/OUT The icon to place on button.
+ @see AVToolButtonGetIcon
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVToolButtonSetIcon, (AVToolButton button, AVIcon icon))
+
+/**
+ Gets the icon associated with the specified AVToolButton.
+
+ @param button The button whose icon is obtained.
+ @return The icon associated with <code>button</code>.
+ @see AVToolButtonSetIcon
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(AVIcon, AVToolButtonGetIcon, (AVToolButton button))
+
+
+SPROC(void, oldAVPageViewDeviceRectToPageRZ, (AVPageView pageView,
+ AVTFlagBits flags,
+ ASInt16 xHot,
+ ASInt16 yHot,
+ const oldAVRect* rect,
+ ASFixedRect *p),
+ oldAVPageDeviceRectToPageRZ)
+
+/**
+ Displays an alert containing the specified message, icon,
+ and one to three buttons with the specified titles. See
+ AVAlert for more information.
+
+ <p>On the Windows platform, the modal parent for <code>doc</code> (as returned
+ by WinAppGetModalParent()) is used as the owner window of
+ the message dialog box. As such, this method can be used
+ to display alert dialog boxes in the context of an external window
+ that is a web browser. </p>
+ <p>Rules for the buttons:</p>
+ <ul>
+ <li> Use <code>NULL</code> to suppress a button's display. </li>
+ <li> At least <code>button1</code> must be non-<code>NULL</code>.</li>
+ <li> <code>button3</code> is not displayed if <code>button2</code> is <code>NULL</code>.</li>
+ </ul>
+
+ @param doc (Windows only) The AVDoc whose modal parent
+ is used as the owner window of the message dialog box.
+ @param iconType The icon to display. It must be one of the
+ AVAlert Icons. Mac users: These constants are defined
+ as per the standard Mac user interface guidelines.
+
+ @param msg The message to display.
+ @param button1 IN The title for the first button; it cannot be <code>NULL</code>.
+ @param button2 IN The title for the second button; it may be <code>NULL</code> (if so, <code>button3</code> is not displayed).
+ @param button3 IN The title for the third button; it may be <code>NULL</code>.
+ @param beep IN Pass <code>true</code> to perform a system beep when the
+ alert is shown.
+ @return The button number (<code>1</code>, <code>2</code>, or <code>3</code>) on which the user clicked.
+
+ @see AVAlert
+ @see AVDocAlertConfirm
+ @see AVDocAlertNote
+ @see AVDocAlertYesNo
+
+ @note The implementations of the AVDocAlert methods call
+ AVAlert(), which is a replaceable method. If AVAlert() is replaced,
+ the <code>AVDocAlert</code> methods are also affected.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASInt32, AVDocAlert, (AVDoc doc, AVIconType iconType, const char *msg,
+ const char *button1, const char *button2,
+ const char *button3, ASBool beep))
+
+/**
+ Displays a dialog box containing the ALERT_NOTE icon, the
+ specified message and an OK button. The method also performs
+ a system beep. See AVDocAlert() for more information.
+ @param doc IN/OUT (Windows only) The AVDoc whose modal parent
+ is used as the owner window of the message dialog box.
+ @param msg IN/OUT The message to display.
+ @see AVDocAlert
+ @see AVDocAlertConfirm
+ @see AVDocAlertYesNo
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVDocAlertNote, (AVDoc doc, const char *msg))
+
+/**
+ Displays a dialog box containing the ALERT_CAUTION icon,
+ the specified message, and OK and Cancel buttons. The method
+ also performs a system beep. See AVDocAlert() for more information.
+
+ @param doc IN/OUT (Windows only) The AVDoc whose modal parent
+ is used as the owner window of the message dialog box.
+ @param msg IN/OUT The message to display.
+ @return <code>true</code> if the user clicked OK, <code>false</code> if the user clicked Cancel.
+
+ @see AVDocAlert
+ @see AVDocAlertNote
+ @see AVDocAlertYesNo
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASBool, AVDocAlertConfirm, (AVDoc doc, const char *msg))
+
+/**
+ Displays a dialog box containing the specified message,
+ icon, and two or three buttons with the titles Yes, No,
+ and (optionally) Cancel. See AVDocAlert() for more information.
+
+ @param doc IN/OUT (Windows only) The AVDoc whose modal parent
+ is used as the owner window of the message dialog box.
+ @param iconType IN/OUT The icon to display. It must be one of the
+ AVAlert Icons. Mac users: These constants are defined
+ as per the standard Mac user interface guidelines.
+
+ @param msg IN/OUT The message to display.
+ @param cancel IN/OUT <code>true</code> if a Cancel button should be provided,
+ <code>false</code> otherwise.
+ @param beep IN/OUT <code>true</code> if it beeps, <code>false</code> otherwise.
+ @return The button number (<code>1</code>, <code>2</code>, or <code>3</code>) on which the user clicked.
+
+ @see AVDocAlert
+ @see AVDocAlertConfirm
+ @see AVDocAlertNote
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASInt32, AVDocAlertYesNo, (AVDoc doc, AVIconType iconType,
+ const char *msg, ASBool cancel, ASBool beep))
+
+
+/**
+ Inserts a hidden menu into the menu bar. It does nothing if
+ <code>menubar</code> is <code>NULL</code> or <code>menu</code> is <code>NULL</code>.
+ @param menubar The menu bar into which the menu is added.
+
+ @param menu The menu to add.
+ @exception genErrNoMemory
+ @see AVMenuIsHiddenOnMenubar
+ @see AVMenubarAddMenu
+ @see AVMenuNew
+ @see AVMenuRemove
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+/* Calls for adding a menu to the AVMenuBar without displaying it
+ on the visible menu bar, and for asking if a menu has this
+ property.
+ */
+NPROC(void, AVMenubarAddHiddenMenu, (AVMenubar menubar, AVMenu menu))
+
+/**
+ Tests whether a menu is hidden on the menu bar.
+ @param menu IN/OUT The menu to test.
+ @return <code>true</code> if <code>menu</code> is hidden, <code>false</code> otherwise.
+ @see AVMenubarAddHiddenMenu
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASBool, AVMenuIsHiddenOnMenubar, (AVMenu menu))
+
+/**
+ <p>Opens a specified help file from the default installation
+ help directory. If the help file is not found, it optionally
+ opens a dialog box asking if the user wants to search for
+ the help file.</p>
+
+ @param fileName The help file name. This is not a fully qualified
+ path name, but the name of an individual help file such
+ as <code>"AcroHelp.pdf"</code>.
+ @param doSearch If <code>true</code> and the help file is not found,
+ it displays a dialog box asking if the user wants to search
+ for the help file. If <code>false</code>, it returns <code>false</code> if the help file
+ is not found.
+ @return <code>true</code> if the help file is found, <code>false</code> otherwise.
+
+ @note Deprecated in Acrobat 6.0. It has been superseded
+ by AVAppOpenHelpFileWithParams().
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(ASBool, AVAppOpenHelpFile, (const char *fileName, ASBool doSearch))
+NPROC(void, oldAVPageViewGetGrayRect, (AVPageView pageView, oldAVRect* greyRect))
+
+/**
+ Enumerates the pages on which there is a selection by calling
+ the current selection server's AVDocSelectionEnumPageRangesProc()
+ callback.
+
+ <p>This method allows you to determine which pages are currently
+ involved in a selection, regardless of the selection type.
+ This enables you to discover whether a given point is in
+ a selection.</p>
+
+ <p>Pages are enumerated in ascending order, and consecutive
+ pages are grouped into a single page range.</p>
+ @param doc IN/OUT The AVDoc from which to enumerate page ranges.
+
+ @param enumProc IN/OUT A user-supplied function that is called for
+ each page on which there is a selection.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @see AVDocEnumSelection
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVDocSelectionEnumPageRanges, (AVDoc doc, AVSelectionPageRangeEnumProc enumProc, void *clientData))
+
+/* Acrobat 4.05 Additions */
+
+NPROC(void, oldAVWindowGetMinMaxSize, (AVWindow win, oldAVRect *rect))
+NPROC(void, oldAVWindowSetMinMaxSize, (AVWindow win, const oldAVRect *rect))
+
+/**
+ Registers a user-supplied procedure to call each time a
+ key is pressed in an AVPageView.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param proc A user-supplied callback to call each time a
+ key is pressed.
+ @param data A pointer to user-supplied data to pass to <code>proc</code>
+ each time it is called.
+ @exception genErrNoMemory
+ @see AVAppUnregisterForPageViewKeyDown
+ @since PI_ACROVIEW_VERSION >= 0x00040005
+*/
+NPROC(void, AVAppRegisterForPageViewKeyDown, (AVPageViewKeyDownProc proc, void* data))
+
+/**
+ Un-registers a user-supplied page view key down procedure.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param proc The original callback.
+ @exception genErrNoMemory
+ @see AVAppRegisterForPageViewKeyDown
+ @since PI_ACROVIEW_VERSION >= 0x00040005
+*/
+NPROC(void, AVAppUnregisterForPageViewKeyDown, (AVPageViewKeyDownProc proc))
+
+
+/* Acrobat 5.0 Additions */
+
+
+/**
+ Registers an AVConversionToPDFHandler to import other file
+ formats. When a <code>ToPDF</code> converter is registered, the converter
+ is automatically added to the list of supported file formats
+ in the Open dialog box. In addition, the converter is displayed
+ in the list of <code>ToPDF</code> converters for the Batch framework.
+ @param conversionHandler IN/OUT The handler.
+ @see AVAppRegisterFromPDFHandler
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+UNPROC(void, AVAppRegisterToPDFHandler, (AVConversionToPDFHandler conversionHandler))
+
+/**
+ Registers an AVConversionFromPDFHandler to export from PDF
+ to other file formats. When a <code>FromPDF</code> converter is registered,
+ the converter is automatically added to the list of supported
+ file formats in the Save As dialog box. In addition, the converter
+ is displayed in the list of <code>FromPDF</code> converters for the Batch
+ framework.
+
+ <p>The handler is only required to implement the conversion callback.
+ All others are optional. If a handler fails to implement
+ the conversion callback, the handler will not be registered. </p>
+
+ @param conversionHandler IN/OUT The handler.
+ @see AVAppRegisterToPDFHandler
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(void, AVAppRegisterFromPDFHandler, (AVConversionFromPDFHandler conversionHandler))
+
+/**
+ Enumerates all registered <code>ConvertToPDF</code> conversion handlers.
+
+ @param proc IN/OUT A user-supplied callback.
+ @param data IN/OUT A pointer to user-defined data to pass to <code>proc</code>
+ each time it is called.
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(void, AVConversionEnumToPDFConverters, (AVConversionToPDFEnumProc proc, AVConversionEnumProcData data))
+
+/**
+ Enumerates all registered <code>ConvertFromPDF</code> conversion handlers.
+
+ @param proc IN/OUT A user-supplied callback.
+ @param data IN/OUT A pointer to user-defined data to pass to <code>proc</code>
+ each time it is called.
+ @see AVConversionEnumToPDFConverters
+ @ingroup Enumerators
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(void, AVConversionEnumFromPDFConverters, (AVConversionFromPDFEnumProc proc, AVConversionEnumProcData data))
+
+/**
+ Converts a file to a PDF document using the handler specified.
+
+ @param inHandler IN Specifies which <code>ConvertToPDF</code> handler to
+ use.
+ @param inSettings IN An ASCab containing the settings to be used
+ in the conversion operation. Pass <code>NULL</code> to use the default
+ settings.
+ @param flags IN Conversion flags.
+ @param inPath IN The location of the input file.
+ @param inFileSys IN The file system from which the path was obtained.
+
+ @param outPDDoc OUT (Filled by the method) It is the caller's responsibility
+ to close the document.
+ @param statusMonitor IN Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>, or any of its members can be <code>NULL</code>.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionEnumToPDFConverters
+ @see AVConversionConvertToPDF
+ @see AVConversionEnumFromPDFConverters
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(AVConversionStatus, AVConversionConvertToPDFWithHandler,(
+ AVConversionToPDFHandler inHandler,
+ ASCab inSettings,
+ AVConversionFlags flags,
+ ASPathName inPath,
+ ASFileSys inFileSys,
+ PDDoc *outPDDoc,
+ AVStatusMonitorProcs statusMonitor))
+
+/**
+ Converts a PDF document to another file format using the
+ handler specified.
+ @param inHandler Specifies which conversion handler to use.
+ @param inSettings An ASCab containing the settings to be used
+ in the conversion operation. There are no specific predefined
+ settings that need to be passed. Pass <code>NULL</code> to use the default
+ settings.
+ @param flags Conversion flags. See AVConversionFlags in AVExpT.h. The default
+ is kAVConversionNoFlags.
+ @param inPDDoc The PDF document to be converted.
+ @param outPath The desired location for the output file.
+ @param outFileSys The file system from which the path was obtained.
+ @param statusMonitor Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ Can be <code>NULL</code>, or any of its members can be <code>NULL</code>.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionEnumFromPDFConverters
+ @see AVConversionConvertToPDFWithHandler
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(AVConversionStatus, AVConversionConvertFromPDFWithHandler,(
+ AVConversionFromPDFHandler inHandler,
+ ASCab inSettings,
+ AVConversionFlags flags,
+ PDDoc inPDDoc,
+ ASPathName outPath,
+ ASFileSys outFileSys,
+ AVStatusMonitorProcs statusMonitor))
+
+/**
+ Converts the specified file to a PDF document using whatever
+ converter is found. Use this function if you do not know
+ which handler to use.
+
+ <p>Multiple conversion handlers can register their services
+ for the same file description, so the first one that matches
+ the file type passed in and has the correct <code>canDoSync</code> settings
+ is used. </p>
+
+ <p>The converters are enumerated in priority order, starting
+ with the highest priority. </p>
+ @param flags IN/OUT Conversion flags.
+ @param inPath IN The location of the input file.
+ @param inFileSys IN The file system from which path was obtained.
+
+ @param outPDDoc OUT (Filled by the method) It is the caller's responsibility
+ to close the document.
+ @param statusMonitor IN Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>, or any of its members can be <code>NULL</code>.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionConvertToPDF
+ @see AVConversionConvertToPDFWithHandler
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(AVConversionStatus, AVConversionConvertToPDF, (
+ AVConversionFlags flags,
+ ASPathName inPath,
+ ASFileSys inFileSys,
+ PDDoc *outPDDoc,
+ AVStatusMonitorProcs statusMonitor))
+
+
+/**
+ Creates a new command of the specified type. An AVCommandHandler
+ for that command type must have already been registered.
+ See AVCommand Descriptions (Built-in Commands) for the names
+ and parameters of built-in commands, as defined in AVCmdDefs.h.
+
+ @param name The new command's type name.
+ @return The new command, or <code>NULL</code> if the specified type has not been
+ registered.
+ @see AVCommandDestroy
+ @see AVAppFindGlobalCommandByName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommand, AVCommandNew, (ASAtom name))
+
+/**
+ Destroys the specified command and its associated resources.
+
+ @param cmd The command to destroy. See AVCommand Descriptions
+ (Built-in Commands).
+ @see AVCommandNew
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVCommandDestroy, (AVCommand cmd))
+
+/**
+ Returns the name of the command.
+ @param cmd The command whose name is returned. See AVCommand
+ Descriptions (Built-in Commands).
+ @return The command name.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASAtom, AVCommandGetName, (AVCommand cmd))
+
+/**
+ Returns the current status of the specified command.
+ @param cmd The command whose status is returned. See AVCommand
+ Descriptions (Built-in Commands).
+ @return The current status of cmd.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandGetStatus, (AVCommand cmd))
+
+/**
+ Returns the ASCab stored in the specified command under the
+ key. If the cabinet is not available, this method will create
+ it if <code>create</code> is set to <code>true</code>. The command retains ownership
+ of the returned cabinet.
+
+ <p>This method can only be exercised by an AVCommandHandler.
+ Command handlers can use this call to attach arbitrary information
+ to a command. Only the command handler should access these
+ cabinets. See AVCommandSetInputs() and AVCommandSetParams(). </p>
+
+ @param cmd The command to be queried. See AVCommand Descriptions
+ (Built-in Commands).
+ @param cabName The key under which the cabinet is stored.
+ @param create Pass <code>true</code> to have this method create the
+ cabinet if it does not exist.
+ @return The cabinet if it was found or created, <code>NULL</code> otherwise.
+ @see AVCommandPutCab
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASCab, AVCommandGetCab, (AVCommand cmd, const char *cabName, ASBool create))
+
+/**
+ Stores a cabinet in the specified command. If a cabinet
+ is currently stored under the key, it is overwritten. The command
+ assumes ownership of <code>cabVal</code>.
+
+ <p>This method can only be exercised by an AVCommandHandler.
+ Command handlers can use this call to store state information
+ (such as parameters) in a command. Only the command handler
+ associated with the command should access these cabinets.
+ See AVCommandSetInputs() and AVCommandSetParams(). </p>
+
+ @param cmd The command. See AVCommand Descriptions (Built-in
+ Commands).
+ @param cabName (May be <code>NULL</code>) The key name under which the cabinet
+ will be stored. If <code>NULL</code>, a numerical name is generated
+ and used.
+ @param cabVal (May be <code>NULL</code>) The cabinet to store. If <code>NULL</code>,
+ the method destroys the cabinet currently stored under the key (if any).
+ @exception genErrBadParm
+ @see AVCommandGetCab
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVCommandPutCab, (AVCommand cmd, const char *cabName, ASCab cabVal))
+
+/**
+ Sets the parameters for the specified command. The parameters
+ are those pieces of information that can be controlled by
+ the user, such as the pages to act on. Use this method and
+ AVCommandSetInputs() to set up a command before calling AVCommandExecute()
+ to execute it.
+
+ <p>Setting any parameters for a command sets all parameters.
+ The command supplies appropriate default parameters for
+ any that are missing from <code>params</code>. Passing an empty cabinet
+ causes all parameters to be set to their default values. </p>
+
+ <p>If the command is not in a ready state, the parameters are
+ not updated. </p>
+
+ <p>The caller retains ownership of <code>params</code>. </p>
+ @param cmd The command whose parameters are being set.
+ See AVCommand Descriptions (Built-in Commands).
+ @param params The parameters to be set.
+ @return The status of <code>cmd</code> after the parameters are set.
+ @see AVCommandGetParams
+ @see AVCommandSetInputs
+ @see AVCommandExecute
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandSetParams, (AVCommand cmd, ASCab params))
+
+/**
+ Retrieves the parameter set for the specified command. It
+ is possible that some commands have no parameters that can
+ be configured, in which case no data will be written to
+ <code>params</code>. The <code>params</code> cabinet should be empty when passed in.
+ Upon return, it will be filled with copies of all of the
+ command's parameter settings.
+
+ <p>The caller retains ownership of <code>params</code>. </p>
+ @param cmd The command whose parameters are being retrieved.
+ See AVCommand Descriptions (Built-in Commands).
+ @param params (Filled by the method) An ASCab into which
+ the parameter set is written.
+ @see AVCommandSetParams
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVCommandGetParams, (AVCommand cmd, ASCab params))
+
+/**
+ Sets the configuration for the specified command. See AVCommandGetConfig()
+ for more information.
+
+ <p><code>config</code> will be merged with the current configuration cabinet
+ to generate the new configuraton. To erase configuration
+ settings, set their values to <code>NULL</code> in your cabinet. </p>
+
+ <p>Currently the only configuration parameters defined are: </p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Parameter</TH><TH>Description</TH></TR>
+ <TR><TD><code>UIPolicy</code> (kASValueInteger)</TD><TD>The local user interface policy for this command.</TD></TR>
+ <TR><TD><code>ParamsDescOpen</code> (kASValueBool)</TD><TD>Indicates whether the description of this command's parameters is visible in the sequence view.</TD></TR>
+ </TABLE>
+
+ <p>The caller retains ownership of <code>config</code>. </p>
+
+ @param cmd The command whose configuration parameters
+ are being set. See AVCommand Descriptions (Built-in Commands).
+ @param config The configuration settings.
+ @return The current status of <code>cmd</code>. The configuration settings will
+ not be updated if the command is not in a ready state.
+ @see AVCommandGetCancelProc
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandSetConfig, (AVCommand cmd, ASCab config))
+
+/**
+ Retrieves the configuration parameters for the specified
+ command.
+
+ <p>Configuration values are controlled by the mechanism that
+ is driving the command, such as a client or the batch
+ framework. For example, one configuration value determines whether
+ to display a dialog box while executing; it can be a setting that the
+ user can toggle through the user interface, or a client can set it
+ through AVCommandSetConfig(). </p>
+
+ <p>To retrieve all the configuration parameters, pass in an
+ empty cabinet for <code>config</code> and the method will fill in the
+ cabinet with the current configuration keys and values. To retrieve
+ specific configuration parameter values, fill the initial
+ dictionary with the keys in which you are interested, each with
+ a <code>NULL</code> value, and the method will attempt to fill in the
+ appropriate value for each key.</p>
+
+ <p>Currently the only configuration parameters defined are: </p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Parameter</TH><TH>Description</TH></TR>
+ <TR><TD><code>UIPolicy</code> (kASValueInteger)</TD><TD>The local user interface policy for this command.</TD></TR>
+ <TR><TD><code>ParamsDescOpen</code> (kASValueBool)</TD><TD>Indicates whether the description of this command's parameters is visible in the sequence view.</TD></TR>
+ </TABLE>
+ @param cmd The command whose configuration parameters
+ are being retrieved. See AVCommand Descriptions (Built-in
+ Commands).
+ @param config (Filled by the method) An ASCab into which
+ the parameters are written.
+ @see AVCommandSetConfig
+ @see AVCommandGetUIPolicy
+
+ @note The caller retains ownership of <code>config</code>.
+ @note Normally the batch sequence framework controls the
+ configuration of commands in batch sequences.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(void, AVCommandGetConfig, (AVCommand cmd, ASCab config))
+
+/**
+ Retrieves the properties of the specified command. Properties
+ are values intrinsic to the command or to the command's
+ current state.
+
+ <p>To retrieve properties, create a cabinet containing the
+ keys for the properties in which you are interested (the values
+ should be invalid, such as <code>NULL</code>), and pass it into this
+ method. The command will copy the requested properties into
+ your cabinet. If the cabinet is empty, the command will
+ fill in all properties.</p>
+
+ <p>The following properties are pre-defined:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Property</TH><TH>Description</TH></TR>
+ <TR><TD><code>CanShowDialog</code> (kASValueBool)</TD><TD>Indicates that the command
+ can show a configuration dialog box. Support of this property
+ is optional; it defaults to <code>false</code>.</TD></TR>
+ <TR><TD><code>CanDescribeParams</code> (kASValueBool)</TD><TD>Indicates that the command
+ can provide a description of its parameters. Support of
+ this property is optional; it defaults to <code>false</code>. If the command
+ sets this property to <code>true</code>, it should support the <code>ParamDesc</code>
+ property also.</TD></TR>
+ <TR><TD><code>ParamsDesc</code> (kASValueCabinet)</TD><TD>A cabinet containing numeric
+ keys (for example, '1', '2', ..., 'n' with kASValueText values
+ describing the command's parameters). The text items will
+ be displayed in the sequence dialog box in the numerical order
+ of the keys.</TD></TR>
+ <TR><TD><code>CanBatch</code> (kASValueBool)</TD><TD>Indicates that the command should
+ appear in the list of commands that can be batched. Support
+ of this property is optional; it defaults to <code>false</code>. If the
+ command set returns this property value as <code>true</code>, it <i>must</i> also
+ support the <code>GenericTitle</code> and <code>GroupTitle</code> properties.</TD></TR>
+ <TR><TD><code>GroupTitle</code> (kASValueText)</TD><TD>The name of the group to which
+ this command belongs. Currently the <code>GroupTitles</code> are localized
+ strings, so they vary from one language to another. The English
+ <code>GroupTitles</code> are those listed in the edit sequence dialog box:
+ <code>'Comments'</code>, <code>'Document'</code>, <code>'JavaScript'</code>, <code>'Page'</code>, and <code>'PDF Consultant'</code>.</TD></TR>
+ <TR><TD><code>GenericTitle</code> (kASValueText)</TD><TD>The generic name for this command
+ (for example, <code>'Show/ Hide Bookmarks'</code>, <code>'Rotate Pages'</code>, and
+ so forth). This is used when displaying the command in the
+ list of global commands.</TD></TR>
+ <TR><TD><code>Title</code> (kASValueText)</TD><TD>The specific title for this command
+ (for example, <code>'Hide Bookmarks'</code> taking the command's parameters
+ into account). This is used for displaying a specific command
+ within a sequence.</TD></TR>
+ </TABLE>
+ @param cmd The command whose properties are being retrieved.
+ See AVCommand Descriptions (Built-in Commands).
+ @param props (Filled by the method) The command properties.
+ The caller retains ownership of the ASCab.
+
+ @note The caller retains ownership of <code>props</code>.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVCommandGetProps, (AVCommand cmd, ASCab props))
+
+/**
+ Sets the input parameters of the specified command. The
+ inputs of a command consist of an ASCab detailing properties
+ of the object on which the command will operate. Use this method
+ and AVCommandSetParams() to set up a command before calling
+ AVCommandExecute() to execute it.
+
+ <p>A command handler should provide at least the following
+ information:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Key (see Command Keys)</TH><TH>Stored As</TH><TH>Description</TH></TR>
+ <TR><TD>kAVCommandKeyPDDoc</TD><TD>kASValuePointer</TD><TD>The document being processed.</TD></TR>
+ <TR><TD>kAVCommandKeyBaseFileName</TD><TD>kASValueString</TD><TD>The name of the input file, without extension.</TD></TR>
+ <TR><TD>kAVCommandKeyOrigExtension</TD><TD>kASValueString</TD><TD>The extension of the input file.</TD></TR>
+ </TABLE>
+
+ <p>The command handler can specify additional inputs as necessary.
+ The caller retains ownership of <code>inputs</code>. </p>
+
+ @param cmd The command whose inputs are being set. See
+ AVCommand Descriptions (Built-in Commands).
+ @param inputs The input parameters.
+ @return The current status of <code>cmd</code>. The input settings will not be
+ updated if the command is not in a ready state.
+ @see AVCommandGetInputs
+ @see AVCommandSetParams
+ @see AVCommandExecute
+ @note AVCommandExecute() will also attempt to provide kAVCommandKeyAVDoc,
+ a pointer to the AVDoc being operated on.
+ @note You can use AVCommandGetPDDoc() and AVCommandGetAVDoc()
+ to quickly retrieve the PDDoc or AVDoc in a command's inputs.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandSetInputs, (AVCommand cmd, ASCab inputs))
+
+/**
+ Retrieves the input parameters of the specified command.
+ The inputs of a command consist of an ASCab detailing properties
+ of the object on which the command will operate. The contents
+ of the cabinet are dependent on the mechanism through which
+ the command is initialized.
+
+ <p>The batch framework attempts to provide the following:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Key (see Command Keys)</TH><TH>Stored As</TH><TH>Description</TH></TR>
+ <TR><TD>kAVCommandKeyPDDoc</TD><TD>kASValuePointer</TD><TD>The document being processed.</TD></TR>
+ <TR><TD>kAVCommandKeyBaseFileName</TD><TD>kASValueString</TD><TD>The name of the input file, without extension.</TD></TR>
+ <TR><TD>kAVCommandKeyOrigExtension</TD><TD>kASValueString</TD><TD>The extension of the input file.</TD></TR>
+ </TABLE>
+
+ <p>Clients should also attempt to provide this information. The
+ content of the <code>inputs</code> cabinet is not limited to the keys
+ listed above. Clients (or the command handler itself ) can
+ specify additional inputs as necessary. The caller retains
+ ownership of <code>inputs</code>. </p>
+ @param cmd The command whose input parameters are being
+ retrieved. See AVCommand Descriptions (Built-in Commands).
+ @param inputs (Filled by the method) The input parameters.
+ @see AVCommandSetInputs
+
+ @note AVCommandExecute() will also attempt to provide kAVCommandKeyAVDoc,
+ a pointer to the AVDoc being operated on.
+ @note You can use AVCommandGetPDDoc() and AVCommandGetAVDoc()
+ to quickly retrieve the PDDoc or AVDoc in a command's inputs.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVCommandGetInputs, (AVCommand cmd, ASCab inputs))
+
+/**
+ Instructs the command to bring up its configuration dialog box
+ and gather parameter information from the user. The dialog box
+ is shown regardless of the <code>UIPolicy</code> of the command.
+
+ <p>If the user confirms the configuration dialog box, the <code>cmd</code> object's parameter
+ set is updated; otherwise <code>cmd</code> will enter a cancelled state. </p>
+
+ <p>Query <code>cmd</code> for its kAVCommandKeyCanShowDialog property using
+ AVCommandGetProps() to determine whether it has a configuration dialog box. </p>
+
+ @param cmd The command for which the dialog box is thrown.
+ See AVCommand Descriptions (Built-in Commands).
+ @return The current status of <code>cmd</code>.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandShowDialog, (AVCommand cmd))
+
+/**
+ Instructs the command do some work based on its current
+ parameters.
+
+ <p>A command will either divide its processing across multiple
+ AVCommandWork() calls, or perform all the processing within
+ a single call. </p>
+
+ <p>If <code>cmd</code> is in a working state upon return, it is the client's
+ responsibility to poll the command's cancel proc, before
+ calling AVCommandWork() again, to continue processing. </p>
+ @param cmd The command that is instructed to do some work.
+ See AVCommand Descriptions (Built-in Commands).
+ @return The current status of <code>cmd</code>. No processing is performed if
+ the command cannot be put in a ready or working state.
+ @see AVCommandCancel
+ @see AVCommandExecute
+ @see AVCommandReset
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandWork, (AVCommand cmd))
+
+/**
+ Cancels the specified command. If the command is currently
+ processing a file, the command might not attempt to roll
+ back any modifications it has made to the document. This
+ may leave the PDF in an invalid state.
+ @param cmd The command to cancel. See AVCommand Descriptions
+ (Built-in Commands).
+ @return The current status of <code>cmd</code>. It should be kAVCommandCanceled.
+
+ @see AVCommandReset
+ @see AVCommandWork
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandCancel, (AVCommand cmd))
+
+/**
+ Resets the specified command. The command is expected to
+ clean up its current state and assume a ready state.
+
+ <p>If the command is currently processing a file, the command
+ might not attempt to roll back any modifications it has
+ made to the PDF. This may leave the PDF in an invalid state. </p>
+
+ @param cmd The command to reset. See AVCommand Descriptions
+ (Built-in Commands).
+ @return The current status of <code>cmd</code>.
+ @see AVCommandCancel
+ @see AVCommandWork
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandReset, (AVCommand cmd))
+
+/**
+ Retrieves the user interface policy that the command will
+ respect while it is executed. The user interface policy is determined
+ by a combination of the command's configuration and the
+ context in which the command is executing (for example,
+ a batch sequence).
+ @param cmd The command whose user interface policy is returned. See
+ AVCommand Descriptions (Built-in Commands).
+ @return The user interface policy.
+ @see AVCommandGetCancelProc
+ @see AVCommandSetConfig
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandUIPolicy, AVCommandGetUIPolicy, (AVCommand cmd))
+
+/**
+ Retrieves the AVDoc from a command's inputs ASCab.
+ @param cmd The command to be queried. See AVCommand Descriptions
+ (Built-in Commands).
+ @return The AVDoc if it was found, <code>NULL</code> otherwise.
+ @see AVCommandSetInputs
+
+ @note In some cases, this call returns a <code>NULL</code> AVDoc even
+ when AVCommandGetPDDoc() returns a non-<code>NULL</code> PDDoc and an AVDoc
+ is open on that PDDoc. In these cases, you should probably
+ ignore the AVDoc or use AVDocFromPDDoc() to find the associated
+ AVDoc.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVDoc, AVCommandGetAVDoc, (AVCommand cmd))
+
+/**
+ Retrieves the PDDoc from a command's inputs ASCab.
+ @param cmd The command to be queried. See AVCommand Descriptions
+ (Built-in Commands).
+ @return A PDDoc if it was found, <code>NULL</code> otherwise.
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+NPROC(PDDoc, AVCommandGetPDDoc, (AVCommand cmd))
+
+/**
+ Returns the ASReportProc associated with the specified command.
+ AVCommandHandlers should report all error and status messages
+ through this procedure.
+
+ <p>Pass the AVCommand itself as the <code>clientData</code> parameter when
+ calling the procedure. </p>
+ @param cmd The command whose ASReportProc is returned.
+ See AVCommand Descriptions (Built-in Commands).
+ @return The ASReportProc.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASReportProc, AVCommandGetReportProc, (AVCommand cmd))
+
+/**
+ Returns a progress monitor the command can use to report
+ progress. The command itself should be passed in as the
+ <code>clientData</code> associated with the monitor's callbacks.
+
+ <p>Command handlers should use this progress monitor rather
+ than a custom implementation.</p>
+
+ <p>If the command is driven by the batch framework, the progress
+ monitor updates the batch progress dialog box. If the command
+ is driven by a client and the AVDoc input key has been set,
+ the progress monitor updates the progress pane at the bottom
+ of the document's window; otherwise, the progress monitor's
+ callbacks are no-ops. </p>
+ @param cmd The command to be queried. See AVCommand Descriptions
+ (Built-in Commands).
+ @return The command progress monitor.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASProgressMonitor, AVCommandGetProgressMonitor, (AVCommand cmd))
+
+/**
+ Returns a cancellation procedure for the command. If the
+ user interface policy is anything other than kAVCommandUIInteractive,
+ this cancellation procedure must be used. If the user interface policy
+ is kAVCommandUIInteractive, an appropriate default cancel
+ proc will be provided, but the command may use a more appropriate
+ one it if preferred. Pass in the command itself as the client
+ data.
+ @param cmd The command whose cancellation procedure is
+ returned. See AVCommand Descriptions (Built-in Commands).
+
+ @return The cancellation procedure.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASCancelProc, AVCommandGetCancelProc, (AVCommand cmd))
+
+/**
+ Registers an AVCommandHandler as the implementor of an AVCommand
+ with the specified name. If there are any existing commands
+ registered under <code>name</code>, the new command replaces them.
+
+ <p>A single handler can implement and register multiple commands. </p>
+
+ @param name IN/OUT The command name.
+ @param handler IN/OUT The handler to register.
+ @see AVAppFindCommandHandlerByName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVAppRegisterCommandHandler, (ASAtom name, AVCommandHandler handler))
+
+/**
+ Gets the AVCommandHandler that was registered under the
+ given name.
+ @param name IN/OUT The name of the handler to obtain.
+ @return The AVCommandHandler if it was found, <code>NULL</code> otherwise.
+ @see AVAppRegisterCommandHandler
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandHandler, AVAppFindCommandHandlerByName, (ASAtom name))
+
+/**
+ Registers an AVCommand in the global command list. The application
+ assumes ownership of the resources associated with <code>cmd</code>.
+ As such, the client must not call AVCommandDestroy().
+ @param cmd IN/OUT The AVCommand to register.
+ @see AVAppFindGlobalCommandByName
+ @see AVAppUnregisterGlobalCommand
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVAppRegisterGlobalCommand, (AVCommand cmd))
+
+/**
+ Returns the AVCommand that was registered under the given
+ name.
+ @param name The name of the AVCommand to obtain.
+ @return The AVCommand if one was found, <code>NULL</code> otherwise.
+ @see AVAppRegisterGlobalCommand
+ @see AVAppUnregisterGlobalCommand
+ @see AVCommandNew
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommand, AVAppFindGlobalCommandByName, (ASAtom name))
+
+/**
+ Removes an AVCommand from the global command list.
+ @param cmd IN/OUT The command.
+ @see AVAppFindGlobalCommandByName
+ @see AVAppRegisterGlobalCommand
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVAppUnregisterGlobalCommand, (AVCommand cmd))
+
+/**
+ Runs the specified AVCommand, after it has been
+ set up using AVCommandSetInputs() and AVCommandSetParams().
+
+ <p>The method runs the command using the following process: </p>
+ <ul>
+ <li> Reset the command if its status is not AVCommandReady. </li>
+ <li> If only a PDDoc input has been configured, AVCommandExecute()
+ does nothing to the inputs. If no AVDoc or PDDoc inputs
+ have been configured, AVCommandExecute() configures the command
+ to use the active AVDoc. In all cases, if an AVDoc has been
+ configured (either by AVCommandExecute() or its caller) the
+ implementation ensures that the PDDoc input matches the
+ AVDoc input. </li>
+ <li> If the command can display a dialog box (that is, if the command
+ handler has a <code>ShowDialog</code> callback and the command's kAVCommandKeyCanShowDialog
+ property is <code>true</code>), present the dialog box to allow the user
+ to alter the command's parameters. </li>
+ <li> Repeatedly call AVCommandWork() on <code>cmd</code> until that method
+ returns a status other than kAVCommandWorking. </li>
+ </ul>
+
+ <p>This method should be used when the client does not need
+ the level of control provided when calling AVCommandWork()
+ directly. Specifically, this method is useful for using
+ a global command from within a menu or a toolbar button's
+ execution procedure. </p>
+ @param cmd The command to execute. See AVCommand Descriptions
+ (Built-in Commands).
+ @return The current status of cmd.
+ @see AVCommandSetInputs
+ @see AVCommandSetParams
+ @see AVCommandWork
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVCommandStatus, AVCommandExecute, (AVCommand cmd))
+NPROC(ASBool, oldAVAppOpenDialog, (oldAVOpenSaveDialogParams dialogParams, /* Standard dialog params for Open/Save/ChooseFolder dialogs */
+ ASFileSys *outFileSys, /* May be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed in dialogParams */
+ ASPathName **outASPathNames, /* Caller must ASfree this array and release its ASPathName elements */
+ AVArraySize *outNumASPathNames, /* Number of ASPathNames in outASPathNames array. It may be <code>NULL</code> if kAVOpenSaveAllowMultiple is not set */
+ AVFilterIndex *ioChosenFilterIndex)) /* May be <code>NULL</code> if caller doesn't care which filter was chosen, -1 if 'All Files'.
+ ** Specify the initially selected filter with the value passed in. If <code>NULL</code>, 1st entry is selected. */
+ /* Returns <code>true</code> if user clicked 'action' button, <code>false</code> if user clicked 'cancel' */
+
+NPROC(ASBool, oldAVAppSaveDialog, (oldAVOpenSaveDialogParams dialogParams, /* Standard dialog params for Open/Save/ChooseFolder dialogs */
+ ASFileSys *outFileSys, /* May be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed in dialogParams */
+ ASPathName *outASPathName, /* Caller must release this ASPathName */
+ AVFilterIndex *ioChosenFilterIndex)) /* May be <code>NULL</code> if caller doesn't care which filter was chosen, -1 if 'All Files'.
+ ** Specify the initially selected filter with the value passed in. If <code>NULL</code>, 1st entry is selected. */
+ /* Returns <code>true</code> if user clicked 'action' button, <code>false</code> if user clicked 'cancel' */
+
+NPROC(ASBool, oldAVAppChooseFolderDialog, (oldAVOpenSaveDialogParams dialogParams,/* Standard dialog params for Open/Save/ChooseFolder dialogs. It may be <code>NULL</code> */
+ ASFileSys *outFileSys, /* May be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed in dialogParams */
+ ASPathName *outASPathName)) /* Caller must release this ASPathName */
+ /* Returns <code>true</code> if user clicked 'action' button, <code>false</code> if user clicked 'cancel' */
+/* Note on the Special Folder/File procedures: if any portion of the special path does
+** not exist and bCreate is not <code>true</code> then kAVSEDoesntExist will be returned. */
+
+/**
+ Obtains the path name of a special folder. This method cannot
+ be used to obtain the ASPathName of a folder that does not
+ exist. It is the caller's responsibility to release the
+ ASPathName.
+ @param cat The folder category. See AVSpecialCategory.
+ Only certain combinations of category/folder are allowed. See
+ AVSpecialError.
+ @param fld The folder. See AVSpecialFolder. Only certain
+ combinations of category/folder are allowed. See AVSpecialError.
+ @param bCreate Create the folder if it does not exist.
+ @param asfs (Filled by the method) The file system
+ through which the path name was obtained.
+ @param asp (Filled by the method) An ASPathName associated
+ with the folder.
+ @return One of the AVSpecialError status codes. It returns kAVSEOkay
+ if the method executed without error. The <code>asfs</code> and <code>asp</code>
+ variables will only be valid if the method returns kAVSEOkay.
+ If <code>bCreate</code> is <code>false</code> and the folder does not exist, kAVSEError
+ is returned on Windows, while kAVSEDoesntExist is returned
+ on Mac OS.
+ @see AVAcquireSpecialFilePathName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASErrorCode, AVAcquireSpecialFolderPathName, (AVSpecialCategory cat, AVSpecialFolder fld, ASBool bCreate, ASFileSys *asfs, ASPathName *asp))
+
+/**
+ In Acrobat 6.0, this method is superseded by AVAcquireSpecialFilePathNameWithASText().
+
+ <p>Obtains the path name for a file in a special folder. It
+ is the caller's responsibility to release the ASPathName.
+ This method may be used even if the associated file does
+ not exist.</p>
+
+ @param cat The folder category. See AVSpecialCategory.
+ Only certain combinations of category/folder are allowed - see
+ AVSpecialError.
+ @param fld The folder in which the file is located.
+ See AVSpecialFolder. Only certain combinations of category/folder
+ are allowed. See AVSpecialError.
+ @param cFile The name of the file (including extension) that
+ you want to access.
+ @param asfs OUT The file system through which the path name was obtained.
+ @param asp OUT An ASPathName associated with the file. The caller must release it.
+ @return One of the AVSpecialError status codes. The <code>asfs</code> and <code>asp</code>
+ variables will only be valid if the method returns
+ kAVSEOkay or kAVSEDoesntExist. kAVSEDoesntExist is returned
+ if the ASPathName was created but the associated file does not
+ exist.
+ @see AVAcquireSpecialFilePathNameWithASText
+ @see AVAcquireSpecialFolderPathName
+
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, AVAcquireSpecialFilePathName, (AVSpecialCategory cat, /* Category (see AVExpT.h) */
+ AVSpecialFolder fld, /* Folder (see AVExpT.h) */
+ const char *cFile, /* File you want to access (e.g. AcroHelp.pdf). */
+ ASFileSys *asfs, /* Filled by this routine. */
+ ASPathName *asp)) /* Filled by this routine. Caller must release this ASPathName */
+
+/**
+ Gets the currently focused annotation from the page view.
+
+ @param pageView IN/OUT The page view.
+ @param annot IN/OUT (Filled by the method) The currently focused
+ annotation. It is <code>NULL</code> if the method returns <code>false</code>.
+ @return <code>true</code> if the annotation was obtained, <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVPageViewGetFocusAnnot, (AVPageView pageView, PDAnnot *annot))
+
+/**
+ Attempts to set an annotation as the active annotation.
+
+ @param pageView IN/OUT The page view in which the annotation resides.
+
+ @param focusAnnot IN/OUT The annotation in question.
+ @param opData IN/OUT Can be <code>NULL</code> and probably should be in most
+ cases. If specified, it will be used for the kAVAnnotAcceptFocus
+ operation.
+ @return <code>true</code> if annot was given the focus, <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVPageViewSetFocusAnnot, (AVPageView pageView, PDAnnot focusAnnot,AVAnnotOpData opData))
+
+/**
+ Removes the focus from the currently selected annotation.
+
+ @param pageView IN/OUT The page view holding the focus.
+ @return <code>false</code> if there was no focus annotation in effect when the
+ method was called, <code>true</code> if there was.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVPageViewClearFocusAnnot, (AVPageView pageView))
+
+/**
+ Used to determine if <code>annot</code> currently has focus.
+ @param pageView IN/OUT The page view in which the annotation resides.
+
+ @param annot IN/OUT The annotation in question.
+ @return <code>true</code> if <code>annot</code> has the focus, <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVPageViewIsFocusAnnot, (AVPageView pageView, PDAnnot annot))
+
+/**
+ Parses a path name to obtain the base file name and extension
+ for a particular file. The function enumerates all registered
+ <code>convertToPDF</code> and <code>convertFromPDF</code> handlers to find a matching
+ extension for the file passed in. This function allocates
+ memory for the file name and extension. It is the caller's
+ responsibility to free the memory allocated by the method.
+
+ @param fileSys The file system from which the path was obtained.
+ Pass <code>NULL</code> to use the default file system.
+ @param pathName The path containing the file name.
+ @param numAddExt The number of additional extensions to
+ search through.
+ @param addExt An array of <code>NULL</code>-terminated strings with
+ extensions to search through.
+ @param baseName (Allocated and filled by the method) A
+ buffer containing the file name. It can be <code>NULL</code> if you do not
+ want the base file name.
+ @param baseExt (Allocated and filled by the method) A
+ buffer containing the file extension. It can be <code>NULL</code> if you
+ do not want the base file extension.
+ @return <code>true</code> if the file info was successfully extracted from the path,
+ <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVUtilGetBaseNameAndExtensionByPathName, (
+ ASFileSys fileSys,
+ ASPathName pathName,
+ AVTArraySize numAddExt,
+ char **addExt,
+ char **baseName,
+ char **baseExt))
+
+/**
+ Parses a file name string to obtain the base file name path
+ and extension for a particular file. The function enumerates
+ all registered <code>convertToPDF</code> and <code>convertFromPDF</code> handlers
+ to find a matching extension for the file passed in. This
+ function allocates memory for the file name and extension.
+ It is the caller's responsibility to free the memory allocated
+ by the method.
+ @param fileName The file name string to parse.
+ @param numAddExt The number of additional extensions to
+ search through.
+ @param addExt An array of <code>NULL</code>-terminated strings with
+ extensions to search through.
+ @param baseName (Allocated and filled by the method) A
+ buffer containing the file name path, which is the path without
+ the extension (for example, <code>c:\\folder\\file</code>). It can be <code>NULL</code> if you
+ do not want the base file name path.
+ @param baseExt (Allocated and filled by the method) A
+ buffer containing the file extension. It can be <code>NULL</code> if you
+ do not want the base file extension.
+ @return <code>true</code> if the file information was successfully extracted from <code>fileName</code>,
+ <code>false</code> otherwise.
+
+ @note <code>fileName</code> is modified by the implementation.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVUtilGetBaseNameAndExtensionByString, (
+ char *fileName,
+ AVTArraySize numAddExt,
+ char **addExt,
+ char **baseName,
+ char **baseExt))
+
+
+/**
+ Gets the value of a particular aspect of the active user's
+ identity. Valid keys are <code>login name</code>, <code>name</code>, <code>corporation</code> and
+ <code>email</code>.
+ @param it IN/OUT The AVIdentity key to retrieve.
+ @param ast IN/OUT (Filled by the method) An ASText object to hold
+ the text associated with the identity key.
+ @return A useful handle to the text parameter.
+ @see AVIdentitySetText
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+/* Gets/Sets the text associated with a particular aspect of user identity.
+** Valid keys are defined by AVIdentity. */
+NPROC(ASText, AVIdentityGetText, (AVIdentity it, ASText ast))
+
+/**
+ Sets the value of a particular aspect of the active user's
+ identity.
+
+ <p>It is not possible to modify the kAVILoginName
+ value through this method. </p>
+ @param it IN/OUT The AVIdentity key to set.
+ @param ast IN/OUT The new value for the key.
+ @see AVIdentityGetText
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVIdentitySetText, (AVIdentity it, ASText ast))
+
+
+/**
+ Attempts to have the currently focused annotation perform
+ the given operation. The method will fail if:
+
+ <ul>
+ <li> There is no currently selected annotation. </li>
+ <li> <code>annotOp</code> is other than kAVAnnotDefaultAction or kAVAnnotShowMenu. </li>
+ <li> The annotation handler is not available or does not support
+ the operation. </li>
+ </ul>
+
+ @param pageView IN/OUT The page view containing the annotation.
+ @param annotOp IN/OUT The operation to perform.
+ @return <code>true</code> if the operation was performed successfully, <code>false</code>
+ otherwise.
+ @notify AVPageViewAnnotDidPerformOp
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVPageViewFocusAnnotPerformOp, (AVPageView pageView, AVAnnotOp annotOp))
+
+/**
+ Processes a keystroke through the currently focused annotation.
+ The current behavior is defined below:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Behavior</TH><TH>Description</TH></TR>
+ <TR><TD>ASKEY_ESCAPE</TD><TD>The annotation loses focus.</TD></TR>
+ <TR><TD>ASKEY_TAB</TD><TD>Focus switches to next annotation in tab order.</TD></TR>
+ <TR><TD>ASKEY_ENTER, ASKEY_CR, and ASKEY_SPACE</TD><TD>It performs the default action associated with the annotation.</TD></TR>
+ </TABLE>
+
+ @param pageView IN/OUT The page view in which the annotation resides.
+
+ @param key IN/OUT The key code. See ASKey.h for possible values.
+
+ @param flags IN/OUT A bit-wise OR of the Modifier Flags. See AVSysGetModifiers().
+
+ @param annotWillLoseFocus IN/OUT (Filled by the method) If <code>true</code>
+ upon return, the keystroke has caused the annotation to
+ lose focus. It may be <code>NULL</code> if the caller is not interested
+ in that information.
+ @return <code>true</code> if the keystroke was processed, <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVPageViewFilterKeyDownForFocusAnnot, (AVPageView pageView, AVKeyCode key, AVFlagBits16 flags, ASBool *annotWillLoseFocus))
+NPROC(void, oldAVPageViewGhostRectOutline, (AVPageView pageView, const oldAVRect* rect))
+
+
+/**
+ Creates a new named toolbar. AVAppRegisterToolBarPosition()
+ must be called after creating the new toolbar to position
+ it relative to other toolbars.
+ @param name IN/OUT The internal, language-independent name of
+ the toolbar. It may not be <code>NULL</code>.
+ @param title IN/OUT The localized, user-friendly name of the toolbar.
+ It may not be <code>NULL</code>.
+ @return The new AVToolBar.
+ @see AVToolBarGetFrame
+ @see AVToolBarGetNumButtons
+ @see AVToolButtonGetFlyout
+ @see AVToolButtonNew
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVToolBar, AVToolBarNew, (const char *name, const char *title))
+
+
+NPROC(void, oldAVAppRegisterToolBarPosition,(const char *toolBarName, ASBool external, oldAVToolBarPosition position))
+
+/* AVPageViewSnapPoint obsolete, use AVPageViewSnapPointEx */
+
+NPROC(void, oldAVPageViewSnapPoint, (AVPageView pageView, ASInt16 *x, ASInt16 *y, AVDragType direction))
+
+NPROC(void, oldAVPageViewGetMousePositionSnapped, (AVPageView pageView, ASInt16 *x, ASInt16 *y, AVDragType direction))
+
+NPROC(AVTFlagBits, oldAVPageViewDragOutNewRectSnapped, (AVPageView pageView, ASInt16 xStart, ASInt16 yStart,
+ oldAVRect *resultRect, AVCursor *cursorArray, AVTSmallArraySize nCursors))
+/* AVPageViewDragRectSnapped obsolete, use AVPageViewDragRectSnappedEx */
+
+NPROC(AVTFlagBits, oldAVPageViewDragRectSnapped, (AVPageView pageView, ASInt16 xStart, ASInt16 yStart,
+ oldAVRect *startRect, oldAVRect *resultRect, AVlDragType dragType, oldAVRect *extrema, AVCursor *cursorArray, AVTSmallArraySize nCursors))
+
+
+NPROC(AVDragTypeEx, oldAVRectHandleHitTest, (oldAVRect *rect, ASBool bMidpoints, ASInt16 x, ASInt16 y))
+
+NPROC(void, oldAVPageViewDrawRectOutlineWithHandles, (AVPageView pageView,const oldAVRect *rect, ASBool bMidpoints, ASBool bThin, ASFixed *dashArray, AVTArraySize arrayLen))
+
+
+NPROC(ASBool, oldAVPageViewIsAnnotOfTypeAtPoint,
+ (AVPageView pageView, ASInt16 xHit, ASInt16 yHit, ASAtom annotType, ASBool belowOthers, PDAnnot *annot))
+
+
+/**
+ Centers the window within its parent window or the desktop
+ if it has no parent.
+ @param win IN/OUT The window to center.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVWindowCenter, (AVWindow win))
+
+/**
+ Gets the AVDoc associated with a PDDoc.
+ @param pdDoc IN/OUT The PDDoc whose AVDoc is to be returned.
+ @return The AVDoc if an AVDoc is already opened for this PDDoc. Otherwise it returns <code>NULL</code>.
+ @see AVDocGetPDDoc
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVDoc, AVDocFromPDDoc, (PDDoc pdDoc))
+
+SPROC(void, oldAVPageViewSnapRect, (AVPageView pageView, ASInt16 xStart, ASInt16 yStart, ASInt16 xNow, ASInt16 yNow,
+ oldAVRect *startRect, oldAVRect *resultRect, ASInt32 handleType, ASUns32 modifiers, oldAVRect *extrema), oldAVPageViewGridSnapRect)
+
+/**
+ Retrieves a standard report proc that can be used to report
+ errors and warnings to the user. See ASReportProc for more
+ details.
+ @param asReportProcClientDataP IN/OUT A pointer to client data passed
+ to the report proc.
+ @return The report callback.
+ @see AVCommandGetReportProc
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASReportProc, AVAppGetReportProc, (void **asReportProcClientDataP))
+
+/**
+ Determines whether a given document is <i>dead</i>. When the
+ connection to a document is severed (for example, when its
+ HTTP connection is broken) the document becomes <i>dead</i> for
+ an interval before it is closed. During that interval, the
+ document may be visible and open, but no operations should
+ be performed on the document.
+ @param avDoc The document being investigated.
+ @return <code>true</code> if the given document is dead, <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVDocIsDead, (AVDoc avDoc))
+
+/* 5.0 Preference API's */
+
+/**
+ Retrieves an ASBool stored in the specified <code>prefs</code> section with the
+ specified key. The default value of <code>defValue</code> will be used if the
+ section or key is not found.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @param defValue The default value if the <code>pref</code> is not found.
+ @return The value stored under the name, or <code>defValue</code> if the key was
+ not found.
+ @see AVAppGetPrefInt
+ @see AVAppGetPrefAtom
+ @see AVAppGetPrefDouble
+ @see AVAppGetPrefString
+ @see AVAppGetPrefText
+ @see AVAppGetPrefCab
+ @see AVAppGetPrefPathName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVAppGetPrefBool, (const char *section, const char *key, ASBool defValue))
+
+
+/**
+ Retrieves an ASInt32 stored in the specified <code>prefs</code> section with the
+ specified key. The default value of <code>defValue</code> will be used if the
+ section or key is not found.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @param defVal The default value if the <code>pref</code> is not found.
+ @return The value stored under the name, or <code>defValue</code> if the key was
+ not found.
+ @see AVAppGetPrefBool
+ @see AVAppGetPrefAtom
+ @see AVAppGetPrefDouble
+ @see AVAppGetPrefString
+ @see AVAppGetPrefText
+ @see AVAppGetPrefCab
+ @see AVAppGetPrefPathName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, AVAppGetPrefInt, (const char *section, const char *key, ASInt32 defVal))
+
+
+/**
+ Retrieves an ASAtom stored in the specified <code>prefs</code> section with the
+ specified key. The default value of <code>defValue</code> will be used if the
+ section or key is not found.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @param defVal The default value if the <code>pref</code> is not found.
+ @return The value stored under the name, or <code>defValue</code> if the key was
+ not found.
+ @see AVAppGetPrefBool
+ @see AVAppGetPrefInt
+ @see AVAppGetPrefDouble
+ @see AVAppGetPrefString
+ @see AVAppGetPrefText
+ @see AVAppGetPrefCab
+ @see AVAppGetPrefPathName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASAtom, AVAppGetPrefAtom, (const char *section, const char *key, ASAtom defVal))
+
+
+/**
+ Retrieves a <code>double</code> value stored in the specified <code>prefs</code> section with the
+ specified key. The default value of <code>defValue</code> will be used if the
+ section or key is not found.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @param defVal The default value if the <code>pref</code> is not found.
+ @return The value stored under the name, or <code>defValue</code> if the key was
+ not found.
+ @return The value stored under the name, or defValue if the key was
+ not found.
+ @see AVAppGetPrefBool
+ @see AVAppGetPrefInt
+ @see AVAppGetPrefAtom
+ @see AVAppGetPrefString
+ @see AVAppGetPrefText
+ @see AVAppGetPrefCab
+ @see AVAppGetPrefPathName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(double, AVAppGetPrefDouble, (const char *section, const char *key, double defVal))
+
+
+/**
+ Retrieves a <code>char*</code> stored in the specified <code>prefs</code> section with the
+ specified key. The <code>char*</code> is a copy and it is up to the caller
+ to free the <code>char*</code> that is returned. If the specified key is not found
+ within the section, then <code>NULL</code> is returned.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @return The value stored under the name, or <code>NULL</code> if the key is not found.
+ @see AVAppGetPrefBool
+ @see AVAppGetPrefInt
+ @see AVAppGetPrefAtom
+ @see AVAppGetPrefDouble
+ @see AVAppGetPrefText
+ @see AVAppGetPrefCab
+ @see AVAppGetPrefPathName
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(char *, AVAppGetPrefString, (const char *section, const char *key))
+
+
+/**
+ Allocates and fills in an ASText object based on the specified <code>prefs</code> section
+ with the specified key. The ASText object is a copy and it is up to the caller
+ to free the ASText with ASTextDestroy(). If the specified key is not found within
+ the section, then <code>NULL</code> is returned.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @return The value stored under the name, or <code>NULL</code> if the key is not found.
+ @see AVAppGetPrefBool
+ @see AVAppGetPrefInt
+ @see AVAppGetPrefAtom
+ @see AVAppGetPrefDouble
+ @see AVAppGetPrefString
+ @see AVAppGetPrefCab
+ @see AVAppGetPrefPathName
+ @see ASTextDestroy
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASText, AVAppGetPrefText, (const char *section, const char *key))
+
+
+/**
+ Allocates and fills in an ASCab object based on the specified <code>prefs</code> section
+ with the specified key. The ASCab object is a copy and it is up to the caller
+ to free the ASCab with ASCabDestroy(). If the specified key is not found within
+ the section, then <code>NULL</code> is returned.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @return The value stored under the name, or <code>NULL</code> if the key is not found.
+ @see AVAppGetPrefBool
+ @see AVAppGetPrefInt
+ @see AVAppGetPrefAtom
+ @see AVAppGetPrefDouble
+ @see AVAppGetPrefString
+ @see AVAppGetPrefText
+ @see AVAppGetPrefPathName
+ @see ASCabDestroy
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASCab, AVAppGetPrefCab, (const char *section, const char *key))
+
+
+/**
+ Retrieves an ASBool stored in the specified <code>prefs</code> section with the
+ specified key. The default value of <code>defValue</code> will be used if the
+ section or key is not found.
+ @param section The name of the section in the <code>prefs</code> to retrieve. It is limited
+ to alphanumeric characters only.
+ @param key The name of the <code>pref</code> to retrieve within the section. It is limited
+ to alphanumeric characters only.
+ @param fileSysVal The function fills in the ASFileSys pointer with the pointer
+ to the file system for the preference in question.
+ @param pathNameVal The function fills in the ASPathName pointer with an allocated
+ ASPathName for the preference in question. It is up to the caller of
+ AVAppGetPrefPathName() to release the ASPathName.
+ @return The value stored under the name, or defValue if the key was
+ not found.
+ @see AVAppGetPrefBool
+ @see AVAppGetPrefInt
+ @see AVAppGetPrefAtom
+ @see AVAppGetPrefDouble
+ @see AVAppGetPrefString
+ @see AVAppGetPrefText
+ @see AVAppGetPrefCab
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVAppGetPrefPathName, (const char *section, const char *key, ASFileSys *fileSysVal, ASPathName *pathNameVal))
+
+
+/**
+ Displays an alert dialog box with a feature set as described
+ by the supplied AVAlertParams.
+ @param params IN/OUT A description of the alert feature set.
+ @return The button number (<code>1</code>, <code>2</code>, or <code>3</code>) on which the user clicked.
+
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+PROC(ASInt32, AVAlertWithParams, (AVAlertParams params))
+
+
+/**
+ Stores a value under <code>name</code> in the AVAlert preference store.
+ The AVAlert preference store is intended to be used by clients
+ to store user preferences regarding whether an alert is
+ displayed prior to execution of a particular operation.
+ The store is persistent across Acrobat sessions. This routine
+ would typically be used when implementing a dialog box that
+ contains a check box saying, <code>"Do not show this dialog
+ again."</code>
+ @param name The name of the entry. It is limited to alphanumeric
+ characters only.
+ @param nAnswer The value to store; pass <code>0</code> (zero) to clear
+ this specific entry.
+ @see AVAlertGetPref
+ @see AVAlertResetPrefs
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVAlertSetPref, (char *name, ASInt32 nAnswer))
+
+
+/**
+ Retrieves the value stored under <code>name</code> in the AVAlert preference
+ store. The AVAlert preference store is intended to be used
+ by clients to store user preferences regarding whether to
+ display an alert prior to execution of a particular operation.
+ The store is persistent across Acrobat sessions. This routine
+ would typically be used when implementing a dialog box that
+ contains a check box saying, <code>"Do not show this dialog
+ again."</code>
+ @param name The name of the entry to retrieve. It is limited to
+ alphanumeric characters only.
+ @return The value stored under the name, or <code>0</code> if the key was not
+ found.
+ @see AVAlertSetPref
+ @see AVAlertResetPrefs
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, AVAlertGetPref, (char *name))
+
+
+/**
+ Resets the entire AVAlert preference store. Specific preference
+ entries can be cleared by passing a value of <code>0</code> to AVAlertSetPref().
+
+ @see AVAlertGetPref
+ @see AVAlertSetPref
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVAlertResetPrefs, (void))
+
+/* Same as AVDocPerformAction but provides context for the execution of the action. */
+
+/**
+ Same as AVDocPerformAction(), but provides context for the
+ execution of the action.
+ @param doc IN/OUT The document containing the action to perform.
+
+ @param action IN/OUT The action to perform.
+ @param data IN/OUT The context for the execution of the action.
+ @see AVDocGetPDDoc
+ @see AVDocPerformAction
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVDocPerformActionEx, (AVDoc doc, PDAction action, AVActionContext data))
+
+
+/**
+ Returns the number of clients loaded by Acrobat.
+ @return The number of clients.
+ @see AVExtensionAcquireInfo
+ @see AVExtensionReleaseInfo
+
+ @note This method is not supported on UNIX platforms.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVArraySize, AVExtensionGetNumPlugIns, (void))
+
+/**
+ Fills an AVExtensionInfoRec structure with some information
+ about a client. It is the caller's responsibility to release
+ the memory associated with the contents of the returned
+ structure by calling AVExtensionReleaseInfo().
+ @param nIndex The index of the client for which to retrieve information.
+ The minimum value for <code>index</code> is zero; the maximum is
+ the return value of <code>AVExtensionGetNumPlugIns() - 1</code>.
+ @return The structure containing information about the client.
+ @see AVExtensionReleaseInfo
+
+ @note This API is not supported on UNIX platforms.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVExtensionInfo, AVExtensionAcquireInfo, (AVArraySize nIndex))
+
+/**
+ Releases the memory associated with the contents of <code>info</code>.
+ @param info The AVExtensionInfoRec structure
+ to release.
+ @see AVExtensionAcquireInfo
+
+ @note This API is not supported on UNIX platforms.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVExtensionReleaseInfo, (AVExtensionInfo info))
+
+
+/**
+ <p>Translates the given point from the device space coordinate
+ system to the <i>info space</i> coordinate system. </p>
+
+ <p><i>Info space</i> is the coordinate system used by the info palette
+ to provide the user with visual feedback during layout operations.
+ The origin of info space for a given page is the upper left
+ corner of the page. The x-axis is horizontal and increases
+ from left to right. The y-axis is vertical and increases
+ from top to bottom. Units are measured in points. Conceptually,
+ info space is the same as user space, with the y-axis flipped
+ and the origin anchored at the upper left of the page.</p>
+ @param pageView The page view holding the focus.
+ @param x The x-coordinate in device space.
+ @param y The y-coordinate in device space.
+ @param info (Filled by the method) The translated point.
+ @see AVPageViewInfoToDevice
+ @see AVPageViewInfoToPoint
+ @see AVPageViewPointToInfo
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(void, AVPageViewDeviceToInfo, (AVPageView pageView, AVlCoord x, AVlCoord y, ASFixedPoint* info))
+
+/**
+ Translates the given point from <i>info space</i> to device space.
+ See AVPageViewDeviceToInfo() for a definition of <i>info space</i>.
+ @param pageView The page view holding the focus.
+ @param info The point in info space.
+ @param x (Filled by the method) The x-coordinate of <code>info</code>
+ in device space.
+ @param y (Filled by the method) The y-coordinate of <code>info</code>
+ in device space.
+ @see AVPageViewDeviceToInfo
+ @see AVPageViewInfoToPoint
+ @see AVPageViewPointToInfo
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+XNPROC(void, AVPageViewInfoToDevice, (AVPageView pageView, const ASFixedPoint* info, AVlCoord* x, AVlCoord* y))
+
+/**
+ Translates the given point from user space to <i>info space</i>.
+ See AVPageViewDeviceToInfo() for a definition of <i>info space</i>.
+
+ @param pageView IN/OUT The page view holding the focus.
+ @param pt IN/OUT The point in user space.
+ @param info IN/OUT (Filled by the method) The point in info space.
+
+ @see AVPageViewDeviceToInfo
+ @see AVPageViewInfoToDevice
+ @see AVPageViewInfoToPoint
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+UNPROC(void, AVPageViewPointToInfo, (AVPageView pageView, const ASFixedPoint* pt, ASFixedPoint* info))
+
+/**
+ Translates the given point from <i>info space</i> to user space.
+ See AVPageViewDeviceToInfo() for a definition of <i>info space</i>.
+
+ @param pageView IN/OUT The page view holding the focus.
+ @param info IN/OUT The point in info space.
+ @param pt IN/OUT (Filled by the method) The point in user space.
+
+ @see AVPageViewDeviceToInfo
+ @see AVPageViewInfoToDevice
+ @see AVPageViewPointToInfo
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+UNPROC(void, AVPageViewInfoToPoint, (AVPageView pageView, const ASFixedPoint* info, ASFixedPoint* pt))
+
+
+/**
+ Allow clients to control the Info panel output.
+ @param pageView The page view.
+ @param updateType An AVInfoPanelUpdateType constant. If it is kAVInfoPanelLock
+ or kAVInfoPanelUnlock, <code>data</code> should be <code>NULL</code> and is ignored.
+ If <code>updateType</code> is kAVInfoPanelRect, clients should pass an
+ AVRect32P through <code>data</code>. It is also useful to note how the
+ rectangle will be interpreted by the info panel.
+
+ <p>The info panel will display the following data:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Data</TH><TH>Description</TH></TR>
+ <TR><TD><code>X</code></TD><TD>The left of the rectangle.</TD></TR>
+ <TR><TD><code>Y</code></TD><TD>The top of the rectangle.</TD></TR>
+ <TR><TD><code>W</code></TD><TD>The width of the rectangle.</TD></TR>
+ <TR><TD><code>H</code></TD><TD>The height of the rectangle.</TD></TR>
+ </TABLE>
+
+ @param data User-supplied data.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+UNPROC(void, AVPageViewUpdateInfoPanel, (AVPageView pageView, AVInfoPanelUpdateType updateType, void *data))
+
+/**
+ Returns the toolbar created with the specified name. Refer
+ to Toolbar and Toolbar Button Names for a list of the standard
+ named toolbars.
+ @param name The name of the toolbar.
+ @return The AVToolBar, or <code>NULL</code> if no AVToolBar was found with the
+ specified name.
+ @see AVAppGetToolBar
+
+ @note It is recommended that you position toolbar buttons
+ by finding a related button on the main toolbar (the one
+ returned by AVAppGetToolBar()) and placing your button next
+ to the existing button. Acrobat will automatically place
+ your tool button on the correct named toolbar so it appears
+ next to the existing button.
+ @ref ToolbarButtonNames
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVToolBar, AVAppGetToolBarByName, (const char *name))
+
+/**
+ Returns the ASHostEncoding corresponding to Acrobat's current
+ locale setting. For example, if the user is using the English
+ version of Acrobat on a Japanese system, AVAppGetLanguageEncoding()
+ returns a Roman encoding but PDGetHostEncoding() returns a
+ Japanese encoding.
+ @return The encoding constant for the application.
+ @see PDGetHostEncoding
+ @see PDGetPDFDocEncoding
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASHostEncoding, AVAppGetLanguageEncoding, (void))
+
+
+/**
+ Scrolls the <code>pageView</code> to ensure that the specified <code>annot</code>
+ is visible.
+ @param pageView IN/OUT The page view to scroll.
+ @param annot IN/OUT The annotation to scroll to.
+ @notify AVPageViewDidChange
+ @see AVPageViewScrollToRect
+ @see AVPageViewScrollTo
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVPageViewScrollToAnnot, (AVPageView pageView, PDAnnot annot))
+
+
+/**
+ Turns the wait cursor on or off. Unlike AVSysGetCursor(),
+ AVSysSetWaitCursor() ensures that the wait cursor stays on
+ until another call to AVSysSetWaitCursor() is made to turn
+ it off, or the time limit is reached. When using this call
+ to turn on the wait cursor, you must ensure that another
+ call will be made to turn it back off.
+ @param turnOn IN/OUT <code>true</code> sets the wait cursor, <code>false</code> resets it.
+
+ @param timeLimit IN/OUT The time limit in ticks (1/60th of a second).
+ If the time limit is reached, the wait cursor will be turned
+ off as if you called <code>AVSysSetWaitCursor(false, ... )</code>. This
+ value is ignored if it is less than or equal to <code>0</code> or if
+ the <code>turnOn</code> parameter is <code>false</code>. Set this to a reasonable
+ nonzero value to ensure that the user wait cursor will go
+ away.
+ @see AVSysGetCursor
+ @see AVSysGetStandardCursor
+ @see AVSysSetCursor
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVSysSetWaitCursor, (ASBool turnOn, ASUns32 timeLimit))
+
+
+/**
+ An exact way to ask if an operation is permitted. This routine
+ should be used to query all user interface-level permissions (for example,
+ to determine whether a tool button or menu item is enabled
+ or whether a tool can act upon a given document). This routine
+ should be used instead of some combination of AVDocIsReadOnly(), AVDocIsExternal(), and
+ PDDocPermRequest(). AVDocPermRequest() calls PDDocPermRequest()
+ internally in the process of determining whether to grant
+ the request.
+ @param doc The document opened in Acrobat.
+ @param obj The description of the target object of a permissions
+ request.
+ @param opr The description of the target operation of a permissions
+ request.
+ @return <code>true</code> if the operation is permitted, <code>false</code> otherwise.
+ @see AVDocIsReadOnly
+ @see AVDocIsExternal
+ @see PDDocPermRequest
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVDocPermRequest, (AVDoc doc, PDPermReqObj obj, PDPermReqOpr opr))
+
+
+/**
+ Clients that correctly use machine ports should work with
+ the new off-screen drawing behavior introduced in Acrobat
+ 5.0. For other clients, the AVPageViewResumeOffscreenDrawing()
+ and AVpageViewSuspendOffscreenDrawing() are provided for temporarily
+ disabling the off screen drawing behavior so that it acts
+ more like Acrobat 4.0. The one restriction is that you cannot
+ call these routines while the page being is drawn. In other
+ words, do not call these routines from within a drawing
+ callback such as one passed to AVAppRegisterForPageViewDrawing()
+ or an annotation handler's <code>DoDraw</code> or <code>DoDrawEx</code> callback.
+ Off-screen drawing should be suspended as rarely and briefly
+ as possible (for example, only while a client that does
+ not use machine ports correctly has a selection active).
+
+ @param pageView The page view whose drawing is to be suspended.
+ @see AVPageViewResumeOffscreenDrawing
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVPageViewSuspendOffscreenDrawing, (AVPageView pageView))
+
+/**
+ Clients that correctly use machine ports should work with
+ the off-screen drawing behavior introduced in Acrobat
+ 5. For other clients, the AVPageViewResumeOffscreenDrawing()
+ and AVPageViewSuspendOffscreenDrawing() are provided for temporarily
+ disabling the off screen drawing behavior so that it acts
+ more like Acrobat 4.0. The one restriction is that you cannot
+ call these routines while the page is drawn. In other words,
+ do not call these routines from within a drawing callback
+ such as one passed to AVAppRegisterForPageViewDrawing() or
+ an annotation handler's <code>DoDraw</code> or <code>DoDrawEx</code> callback.
+ @param pageView The AVPageView being drawn.
+ @see AVPageViewSuspendOffscreenDrawing
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVPageViewResumeOffscreenDrawing, (AVPageView pageView))
+
+
+/**
+ (Mac OS only) This call is useful when Acrobat is running embedded in
+ a browser and needs to present a dialog box for user input.
+ However, before presenting the dialog box, Acrobat needs to
+ pull itself to the front to be the front application. This
+ call enables it to do that.
+ @return <code>true</code> if Acrobat either is running in the background and
+ will pull itself to the front, or has already pulled itself
+ to be the front application; <code>false</code> otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVAppDidOrWillSwitchForDialog, (void) )
+
+/**
+ (Mac Only) Yield to other applications for <code>yieldTimeout</code>.
+
+ @note Mac platform clients will need to call AVAppYieldToOtherApps()
+ instead of <code>WaitNextEvent</code> to prevent problems with Mac OS
+ Carbon event handling. AVAppYieldToOtherApps() calls <code>ReceiveNextEvent</code>.
+ It is recommended that you use the kEventDurationForever
+ constant as the argument to AVAppYieldToOtherApps(), though
+ this will impact portability since it is a CodeWarrior <code>define</code>
+ (in CarbonEvents.h).
+ @param yieldTimeout The minimum amount of time to yield
+ in seconds. It is only applicable for Mac OS 8.6 and 9.x. It is a no-op
+ for Windows and UNIX.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVAppYieldToOtherApps, (double yieldTimeout))
+
+/**
+ If the <code>win</code> is completely outside the desktop region (it is off screen),
+ it is moved so that it will be within the
+ desktop region (it is on screen). No action is taken
+ if a draggable edge of the window is within the desktop
+ region. The desktop region does not include the task bar
+ (Windows) or menu bar (Mac OS).
+ @param win The window to ensure is on screen.
+ @see AVWindowGetDesktopBounds
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVWindowEnsureInBounds, (AVWindow win))
+
+/* Acrobat 5.0SP1 Additions */
+
+#if HAS_MENUS
+
+/**
+ (New in Acrobat 5.0.5)
+
+ Clones a menu, creating a new menu which is an exact duplicate
+ of the original, except that shortcuts are not created for
+ the items.
+ @param menu The menu that is cloned.
+ @return The new menu.
+ @since PI_ACROVIEW_VERSION >= 0x00050001
+*/
+NPROC(AVMenu, AVMenuClone, (AVMenu menu))
+#else
+NOPROC(AVMenuClone)
+#endif
+
+/* Acrobat 6 Additions */
+
+/**
+ Scrolls <code>pageView</code> to the location specified by <code>xOrigin</code> and
+ <code>yOrigin</code>, within the limits imposed by the current zoom mode
+ and the Acrobat viewer.
+ @param pageView The page view to scroll.
+ @param xOrigin The x-coordinate to scroll to, specified
+ in device space coordinates.
+ @param yOrigin The y-coordinate to scroll to, specified
+ in device space coordinates.
+ @notify AVPageViewDidChange
+ @see AVPageViewScrollToRect
+ @see AVPageViewScrollToAnnot
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewScrollTo, (AVPageView pageView, AVDevCoord xOrigin, AVDevCoord yOrigin))
+
+/**
+ Registers a user-supplied procedure to call each time the
+ cursor is moved. If more than one procedure is registered,
+ the procedures are called in the order that they were registered.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param cursorProc A user-supplied callback to call each
+ time the cursor is moved.
+ @param data A pointer to user-supplied data to pass to <code>cursorProc</code>
+ each time it is called.
+ @exception genErrNoMemory
+ @see AVAppUnregisterForPageViewAdjustCursor
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppRegisterForPageViewAdjustCursor, (AVPageViewCursorProc cursorProc,
+ void* data), AVPageViewRegisterForAdjustCursor)
+
+/**
+ Registers a user-supplied procedure to call each time a
+ mouse click occurs. This is useful if a client wishes to
+ handle mouse clicks, and the client is better implemented
+ as something other than an annotation or a tool. If more
+ than one routine is registered to receive mouse clicks,
+ the most recently registered routine is called first.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param clickProc A user-supplied callback to call each time
+ a mouse click occurs. If the user-supplied callback returns
+ <code>true</code>, it indicates that the procedure handled the mouse
+ click, and it should not be passed along to the Acrobat
+ viewer or other clients that registered to receive mouse
+ clicks. If it returns <code>false</code>, the mouse click is passed to
+ the Acrobat viewer or other clients that registered to receive
+ mouse clicks.
+ @param data A pointer to user-supplied data to pass to <code>clickProc</code>
+ each time it is called.
+ @exception genErrNoMemory
+ @see AVAppRegisterForPageViewRightClicks
+ @see AVAppUnregisterForPageViewClicks
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppRegisterForPageViewClicks, (AVPageViewClickProc clickProc, void* data),
+ AVPageViewRegisterForClicks)
+
+/**
+ Registers a user-supplied procedure to call each time a
+ window is drawn, after the page's contents and annotations
+ have been drawn. This allows clients to draw whatever they
+ wish to on top of pages. The procedure is called each time
+ the page view changes (scrolls, zooms, goes to a different
+ page).
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+
+ <p>You can register only one procedure, but you can register
+ it more than once, with a different client data pointer
+ in each case. If more than one procedure-data combination
+ is registered, they are called in a last-in, last-out order.
+ In versions prior to 6.0, you should not do this, as the
+ call to AVAppUnregisterForPageViewDrawing() un-registers only
+ one of the registered combinations, and does not guarantee
+ which one it is. However, in version 6.0 or later, you can
+ pass the same proc and <code>clientData</code> pointer to AVAppUnregisterForPageViewDrawingEx()
+ to un-register that particular combination. </p>
+ @param proc A user-supplied callback to call each time a
+ window is drawn.
+ @param data A pointer to user-supplied data to pass to <code>proc</code>
+ each time it is called.
+ @exception genErrNoMemory
+ @see AVAppUnregisterForPageViewDrawing
+ @see AVAppUnregisterForPageViewDrawingEx
+
+ @note As of version 5.0, Acrobat renders PDF pages offscreen
+ before copying them to the display memory. Windows developers
+ who call AVPageViewAcquireMachinePort() on the AVPageView
+ passed to the drawing callback should note that the <code>HWND</code>
+ points to the screen but the <code>HDC</code> points to an offscreen
+ bitmap. All drawing should be performed using the returned
+ <code>HDC</code>. Developers should not create their own <code>HDC</code> based on
+ the returned <code>HWND</code> because their content will be lost when
+ Acrobat copies the offscreen buffer to the display.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVAppRegisterForPageViewDrawing, (AVPageViewDrawProc proc, void* data),
+ AVPageViewRegisterForDrawing)
+
+/**
+ Opens and displays a document from a file, using the specified
+ parameters to control the window's size, location, and visibility.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+
+ <p>If you want to display a page from a PDF file as a bitmap,
+ use PDPageDrawContentsToWindow(). </p>
+ @ingroup ReplaceableMethods
+ @param pathName The file to open.
+ @param fileSys The file system on which <code>pathName</code> resides.
+ You can obtain the default file system with ASGetDefaultFileSys().
+ @param tempTitle If <code>tempTitle != NULL</code>, <code>pathName</code> is a temporary
+ file and <code>tempTitle</code> is used as the window's title.
+ @param params The parameters used when opening the file. It can
+ be <code>NULL</code>.
+ @return The document that was opened.
+ @notify AVDocWillOpenFromFile
+ @notify AVDocDidOpen
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromFileWithParamString
+ @see AVDocOpenFromPDDoc
+ @see AVDocClose
+
+ @note Do not open and then immediately close an AVDoc without
+ letting at least one event loop complete.
+ @note Changed from <code>char*</code> to ASText argument type in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+PROC(AVDoc, AVDocOpenFromFileWithParams, (ASPathName pathName, ASFileSys fileSys,
+ const ASText tempTitle, AVDocOpenParams params))
+
+/**
+ Opens and displays a document from a PDDoc, using the specified
+ parameters to control the window's size, location, and visibility.
+
+ If you want to display a page from a PDF file as a bitmap,
+ use PDPageDrawContentsToWindow().
+ @param pdDoc The document to open and display.
+ @param tempTitle If <code>tempTitle != NULL</code>, the path name is a temporary
+ file and <code>tempTitle</code> is used as the window's title.
+ @param params The parameters used when opening the file. It can
+ be <code>NULL</code>.
+ @return The document that was opened.
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParamString
+ @see AVDocClose
+
+ @note Do not open and then immediately close an AVDoc without
+ letting at least one event loop complete.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVDoc, AVDocOpenFromPDDocWithParams, (PDDoc pdDoc, const ASText tempTitle, AVDocOpenParams params))
+
+/**
+ Opens and displays a document from a file, using the specified
+ parameters to control the window's size, location, and visibility.
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+
+ <p>If you want to display a page from a PDF file as a bitmap,
+ use PDPageDrawContentsToWindow. </p>
+ @ingroup ReplaceableMethods
+ @param file The ASFile to open.
+ @param tempTitle If <code>tempTitle != NULL</code>, the path name is a temporary
+ file and <code>tempTitle</code> is used as the window's title.
+ @param params The parameters used when opening the file. It can
+ be <code>NULL</code>.
+ @return The document that was opened.
+ @notify AVDocWillOpenFromFile
+ @notify AVDocDidOpen
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+ @see AVDocClose
+
+ @note Do not open and then immediately close an AVDoc without
+ letting at least one event loop complete.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+PROC(AVDoc, AVDocOpenFromASFileWithParams, (ASFile file, const ASText tempTitle, AVDocOpenParams params))
+
+/**
+ Prints a document with a full range of options. Printing
+ is complete when this method returns. It performs <i>embedded</i>
+ printing; that is, it allows a PDF page to print within a bounding
+ rectangle on a page. It allows interactive printing to the
+ specified printer (Windows, Mac OS, and UNIX).
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param doc The AVDoc from which to print pages.
+ @param params A structure containing printing parameters.
+ See AVDocPrintParams. With Adobe Reader, you cannot
+ use the <code>emitToFile</code> flag. For Adobe Reader, use the <code>emitToPrinter</code>,
+ <code>interactive</code>, or <code>embedded</code> flags. In Acrobat 6.0
+ Standard, the printer mark drawing flags (<code>marksFlags</code>) in
+ the parameters structure are ignored.
+ @exception genErrBadParm is raised if an invalid parameter is provided.
+ It can raise any of the <code>CosErrExpected</code> exceptions, such as ErrSysCosSyntax or cosErrExpectedNumber.
+ In general, this method can raise any exception that can occur
+ during the parsing of a page and its resources, such as pdErrUnknownProcsets or pdErrUnableToExtractFontErr.
+ @notify PDDocWillPrintPages
+ @notify PDDocWillPrintPage
+ @notify PDDocDidPrintPage
+ @notify PDDocDidPrintPages
+ @notify PDDocDidPrintTiledPage
+ @notify PDDocPrintingTiledPage
+ @notify PDDocWillPrintTiledPage
+ @see AVDocDoPrint
+ @see AVDocPrintPages
+
+ @note If security has been set on a file so that it is not
+ printable, the document will not print, but no error is
+ raised. Check the security before printing the file.
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+PROC(void, AVDocPrintPagesWithParams, (AVDoc doc, AVDocPrintParams params))
+
+/**
+ Fills out the given AVDocViewDef structure with the information
+ needed to restore this document's state at a later date.
+ You must set the <code>use</code> fields as desired.
+ @param doc The document whose state is recorded.
+ @param viewDef A pointer to the structure that stores
+ the state.
+ @see AVDocGetViewDefEx
+ @see AVDocSetViewDef
+ @note Numeric types in AVDocViewDef have changed in Acrobat
+ 6.0, and the method has been superseded by AVDocGetViewDefEx().
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVDocGetViewDef, (AVDoc doc, AVDocViewDef viewDef))
+
+/**
+ Sets the document's state to match the information in <code>viewDef</code>.
+
+ @param doc The document whose state is updated.
+ @param viewDef A pointer to the structure that stores
+ the state.
+ @see AVDocGetViewDef
+ @see AVDocGetViewDefEx
+ @see AVDocSetViewDefEx
+ @note Numeric types in AVDocViewDef have changed in Acrobat
+ 6.0, and the method has been superseded by AVDocGetViewDefEx().
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+SPROC(void, AVDocSetViewDef, (AVDoc doc, AVDocViewDef viewDef), AVDocUseViewDef)
+
+/**
+ Gets the selection server that handles the specified selection
+ type.
+ @param type IN/OUT The ASAtom corresponding to the type for which
+ the selection server was registered. The string for the type
+ can be converted to an ASAtom using ASAtomFromString().
+ @return The selection server that handles the specified type. It returns
+ <code>NULL</code> if no such selection server is registered.
+ @see AVDocRegisterSelectionServer
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVDocSelectionServer, AVDocGetSelectionServerByType, (ASAtom type))
+
+/**
+ Registers a new selection server with the Acrobat viewer.
+ Selection servers allow the selection of items other than
+ those that can be selected in the as-shipped Acrobat viewer.
+ For example, a selection server could allow a user to select
+ a sampled image.
+
+ <p>This method can be used to replace an existing selection
+ server that handles the same selection type. </p>
+ @param server IN/OUT A structure containing the selection server's
+ callback functions. This structure must not be freed after
+ calling AVDocRegisterSelectionServer().
+ @return This always returns <code>true</code>.
+ @exception genErrBadParm is raised if <code>server</code> is <code>NULL</code>, if the size field
+ in the AVDocSelectionServerRec is incorrect, or if the selection server's AVDocSelectionGetTypeProc() is <code>NULL</code>.
+ @see AVDocClearSelection
+ @see AVDocCopySelection
+ @see AVDocDeleteSelection
+ @see AVDocDoSelectionProperties
+ @see AVDocEnumSelection
+ @see AVDocGetSelection
+ @see AVDocShowSelection
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVDocRegisterSelectionServer, (AVDocSelectionServer server))
+
+/**
+ Gets the aperture of the specified page view. The aperture
+ is the rectangular region of the window in which the document
+ is drawn, measured in device space units.
+ @param pageView The page view whose aperture is obtained.
+
+ @param rect (Filled by the method) A pointer to the aperture
+ rectangle, specified in device space coordinates.
+ @see AVPageViewGetGrayRect
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewGetAperture, (AVPageView pageView, AVDevRect *rect))
+
+/**
+ If the specified rectangle and margin fits inside the aperture, the pageview is scrolled to center the rectangle within the aperture.
+ This method is handy for auto-scrolling the AVPageView in a natural
+ way to bring some page object completely into view. It does
+ not affect the zoom level or AVZoomType.
+ @param pageView The page view to scroll.
+ @param rect A pointer to the rectangle that is completely
+ visible.
+ @param favorLeft Used when <code>rect</code> is wider than the window's
+ aperture. If <code>favorLeft</code> is <code>true</code>, it favors the left side. If it is
+ <code>false</code>, it favors the right side. Favoring a side means that
+ the corresponding edge will appear within the aperture,
+ even if the opposite edge will not.
+ @param favorTop Used when <code>rect</code> is taller than the window's
+ aperture. If <code>favorTop</code> is <code>true</code>, it favors the top side. If it is <code>false</code>,
+ it favors the bottom side. Favoring a side means that the corresponding
+ edge will appear within the aperture, even if the opposite
+ edge will not.
+ @param margin The number of pixels that <code>rect</code> should be from
+ the nearest edges if it does not cause the rectangle to
+ go from completely visible to partially obscured.
+ @notify AVPageViewDidChange
+ @see AVPageViewScrollTo
+ @see AVPageViewScrollToAnnot
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewScrollToRect, (AVPageView pageView, const AVDevRect *rect,ASBool favorLeft,
+ ASBool favorTop, AVDevSize margin))
+
+/**
+ Indicates that the specified area of <code>pageView</code> is invalid
+ and should be redrawn. This adds the rectangle to the list
+ of regions to redraw, but does not force an immediate redraw.
+ Use AVPageViewDrawNow() to force an immediate redraw.
+ @param pageView The AVPageView in which a region is invalidated.
+
+ @param area A pointer to the rectangle to invalidate, specified
+ in device space coordinates. Use AVPageViewRectToDevice()
+ to convert a user space rectangle to device space. Pass
+ <code>NULL</code> to invalidate the entire currently visible portion
+ of the page.
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewInvalidateRect, (AVPageView pageView, AVDevRect *area))
+
+/**
+ Inverts the interior of a rectangle.
+ @param pageView The page view in which the inverted rectangle
+ is drawn.
+ @param rect A pointer to the rectangle to invert, specified
+ in device space coordinates. Use AVPageViewRectToDevice()
+ to convert the coordinates of a rectangle that is specified
+ in user space.
+ @param highlight If <code>true</code>, it uses the highlight mode specified
+ by <code>avpHighlightMode</code> in the Acrobat viewer's preferences
+ file (see AVAppSetPreference()). If it is <code>false</code>, it uses a default
+ highlighting mode.
+ @see AVPageViewDrawRect
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewInsetRect
+ @see AVPageViewInvertRectOutline
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewInvertRect, (AVPageView pageView, const AVDevRect *rect, ASBool highlight))
+
+/**
+ Draws a stroked, but not filled, rectangle using the color
+ most recently set using AVPageViewSetColor().
+ @param pageView The page view in which the rectangle is
+ drawn.
+ @param rect A pointer to the rectangle to draw, specified
+ in device space coordinates.
+ @param lineWidth The border width in pixels. If <code>lineWidth > 1</code>,
+ the border line is entirely inside the <code>rect</code>, thus shrinking
+ the area inside the outline.
+ @param dashArray A pointer to an array of fixed numbers,
+ whose elements alternately specify the length of dashes
+ and gaps. Pass <code>NULL</code> to draw a solid outline.
+ @param arrayLen The number of elements in <code>dashArray</code>. It is ignored
+ if <code>dashArray</code> is <code>NULL</code>. The maximum allowed number of elements
+ is currently <code>10</code>.
+ @see AVPageViewDrawRect
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewDrawRectOutline, (AVPageView pageView, const AVDevRect *rect,
+ AVDevSize lineWidth, ASFixed * dashArray, AVTArraySize arrayLen))
+
+/**
+ Draws a rectangle filled with the color most recently set
+ using AVPageViewSetColor().
+ @param pageView IN/OUT The page view in which the rectangle is
+ drawn.
+ @param rect IN/OUT A pointer to the rectangle to draw, specified
+ in device space coordinates.
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewDrawAnnotSequence
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewDrawRect, (AVPageView pageView, const AVDevRect *rect))
+
+/**
+ Gets an annotation's bounding rectangle. This may be a superset
+ of the actual bounding box of a particular annotation view.
+
+ <p>If the page view has more than one page displayed, as in
+ the continuous modes, you should call AVPageViewSetPageNum()
+ with the annotation's page number before calling this method. </p>
+ @param pageView The page view for which the rectangle
+ is transformed.
+ @param anAnnot The annotation whose bounding rectangle
+ is obtained.
+ @param rect (Filled by the method) A pointer to the annotation's
+ bounding rectangle, specified in device space coordinates.
+ @see AVPageViewSetPageNum
+ @see AVPageViewTransformRectRZ
+ @see PDPageGetAnnot
+
+ @note The coordinate numeric type changed in PI_ACROVIEW_VERSION
+ (in PIRequir.h) 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewGetAnnotRect, (AVPageView pageView, PDAnnot anAnnot, AVDevRect *rect))
+
+/**
+ Transforms a rectangle's coordinates from user space to
+ device space. The resulting AVRect will be <i>normal</i>, meaning
+ that <code>left < right</code> and <code>top < bottom</code>.
+ @param pageView The page view for which the coordinates are
+ transformed.
+ @param p A pointer to the rectangle whose coordinates are
+ transformed, specified in user space coordinates.
+ @param rect (Filled by the method) A pointer to a rectangle
+ containing the device space coordinates corresponding to
+ <code>p</code>.
+ @see AVPageViewPointToDevice
+ @see AVPageViewDevicePointToPage
+ @see AVPageViewDeviceRectToPage
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVPageViewRectToDevice, (AVPageView pageView, const ASFixedRectP p, AVDevRect* rect),
+ AVPageRectToDevice)
+
+/**
+ Transforms a rectangle from device space to user space coordinates.
+ The resulting ASFixedRect is <i>normal</i>, meaning
+ that <code>left < right</code> and <code>bottom < top</code>.
+
+ @param pageView The page view for which the rectangle is transformed.
+ @param rect A pointer to a device space rectangle whose
+ coordinates are transformed to user space.
+ @param p (Filled by the method) A pointer to a user space
+ rectangle corresponding to <code>rect</code>.
+ @see AVPageViewPointToDevice
+ @see AVPageViewDevicePointToPage
+ @see AVPageViewDeviceRectToPageRZ
+ @see AVPageViewRectToDevice
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVPageViewDeviceRectToPage, (AVPageView pageView, const AVDevRect* rect,
+ ASFixedRect *p), AVPageDeviceRectToPage)
+
+/**
+ Draws the CosObj (which currently must be a Form object)
+ and scales it to fit the rectangle. This method may be used to draw
+ an annotation appearance.
+ @param pageView The page view.
+ @param cosObj The CosObj to draw.
+ @param r The rectangle in which to draw.
+ @see AVPageViewAppearanceGetAVMatrix
+ @see AVPageViewDrawCosObjEx
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVPageViewDrawCosObj, (AVPageView pageView, CosObj cosObj, const AVDevRect* r))
+
+/**
+ Draws a 3-D looking inset rectangle on the page view. It can
+ be used to implement an inset style link, where clicking
+ the link causes the page to appear to push into the screen.
+ @param pageView IN/OUT The page view on which to draw the rectangle.
+
+ @param rr IN/OUT The rectangle to draw.
+ @param down IN/OUT <code>true</code> to draw an inset rectangle, <code>false</code> to draw
+ the rectangle in its normal state.
+ @see AVPageViewDrawRect
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewInvertRect
+ @see AVPageViewInvertRectOutline
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(void, AVPageViewInsetRect, (AVPageView pageView, const AVDevRect* rr, ASBool down))
+
+/**
+ Draws the CosObj (which currently must be a Form object),
+ scales it to fit the rectangle, and transforms it according to <code>matrix</code>.
+ This method is the same as AVPageViewDrawCosObj(), but applies
+ an ASFixedMatrix transformation to the CosObj once the CosObj
+ has been scaled to the anamorphic dimensions of the AVRect.
+ This method may be used to draw an annotation appearance.
+ @param pageView The page view.
+ @param cosObj The CosObj to draw.
+ @param r The rectangle in which to draw.
+ @param matrix A pointer to a matrix specifying the matrix
+ to transform the <code>cosObj</code> based on the rectangle. For example, if the
+ AVRect is [10 20 110 220] describing a 100 x 200 area near
+ the top left corner of the page, a ASFixedMatrix of [0.5
+ 0 0 0.5 50 100] would scale the CosObj to 50% and center
+ it inside the AVRect.
+ @see AVPageViewAppearanceGetAVMatrix
+ @see AVPageViewDrawCosObj
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020003
+*/
+NPROC(void, AVPageViewDrawCosObjEx, (AVPageView pageView, CosObj cosObj, const AVDevRect* r, ASFixedMatrix *matrix))
+
+/**
+ Draws the annotation sequence number of an annotation in
+ a rectangle.
+
+ @param pv The page view in which the annotation is drawn.
+ @param an The annotation whose sequence number is drawn.
+ @param bbox A bounding box in which to draw the sequence
+ number of the annotation.
+ @see AVPageViewDrawRect
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVPageViewDrawAnnotSequence, (AVPageView pv, PDAnnot an, const AVDevRect *bbox))
+
+/**
+ Gets the rectangle that bounds a page view. This may include
+ some of the gray area outside a page's crop box.
+ @param pageView The page view.
+ @param greyRect (Filled by the method) A rectangle bounding
+ the page view, specified in device space coordinates.
+ @see AVPageViewDrawRect
+ @see AVPageViewGetAperture
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(void, AVPageViewGetGrayRect, (AVPageView pageView, AVDevRect* greyRect))
+
+/**
+ Draws the specified rectangle in <code>pageView</code> using the ghost
+ outline.
+ @param pageView IN/OUT The page view into which <code>rect</code> is drawn.
+
+ @param rect IN/OUT The rectangle to draw.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVPageViewGhostRectOutline, (AVPageView pageView, const AVDevRect* rect))
+
+/**
+ Tests to determine whether the given point lies on any of the control
+ handles of <code>rect</code>.
+ @param rect The rectangle to test.
+ @param bMidpoints Pass <code>true</code> if you are interested in the midpoint
+ handles. If it is <code>false</code> and a midpoint handle is hit, kAVDragRect
+ is returned.
+ @param x The x-coordinate of the point.
+ @param y The y-coordinate of the point.
+ @return <code>-1</code> if the point is not within the rectangle.
+ If the point is within the rectangle, but not over a handle,
+ kAVDragRect is returned. If the point is within a handle
+ region, one of the AVRectHandleType constants is returned.
+
+ @see AVPageViewSnapRect
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVDragTypeEx, AVRectHandleHitTest, (const AVDevRect *rect, ASBool bMidpoints, AVDevCoord x, AVDevCoord y))
+
+/**
+ Draws the specified rectangle in the page view with drag
+ handles.
+ @param pageView The page view in which the <code>rect</code> is drawn.
+
+ @param rect The rectangle that is to be drawn.
+ @param bMidpoints If <code>true</code>, additional handles are drawn
+ at the midpoint of each side of the rectangle.
+ @param bThin If <code>true</code>, the rectangle is drawn using thin
+ lines.
+ @param dashArray A pointer to an array of fixed numbers
+ whose elements alternately specify the length of dashes
+ and gaps. Pass <code>NULL</code> to use a solid outline.
+ @param arrayLen The number of elements in <code>dashArray</code>.
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVPageViewDrawRectOutlineWithHandles, (AVPageView pageView, const AVDevRect *rect, ASBool bMidpoints, ASBool bThin, ASFixed *dashArray, AVTArraySize arrayLen))
+
+/**
+ Gets the mouse position in <code>pageView</code>. The mouse position
+ is specified in global coordinates. On Mac OS,
+ it is equivalent to calling the Toolbox <code>GetMouse</code> call and
+ adding the window's offset on the screen; on UNIX, it is
+ equivalent to calling <code>XQueryPointer</code> and adding the window's
+ offset on the screen.
+ @param pageView The page view in which the mouse location
+ is obtained.
+ @param x (Filled by the method) The x-coordinate of the
+ mouse location.
+ @param y (Filled by the method) The y-coordinate of the
+ mouse location.
+ @see AVSysMouseIsStillDown
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewGetMousePosition, (AVPageView pageView, AVDevCoord *x, AVDevCoord *y))
+
+/**
+ Allows the user to drag out a new rectangle. Call this method
+ when the user clicks at some point and needs to create a
+ rectangle. The method returns when the user releases the
+ mouse button.
+ @param pageView The page view in which the rectangle is
+ created.
+ @param xStart The x-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param yStart The y-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param resultRect (Filled by the method) A pointer to the
+ rectangle that the user dragged out, specified in device
+ space coordinates.
+ @see AVPageViewDragRect
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewDragOutNewRect, (AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart,
+ AVDevRect *resultRect))
+
+/**
+ Allows the user to move or resize a rectangle. Call this
+ method when the user clicks on a rectangle to modify. It
+ returns after the user releases the mouse button.
+ @param pageView The page view in which the rectangle is
+ located.
+ @param xStart The x-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param yStart The y-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param startRect A pointer to the initial rectangle, which
+ is to moved or resized, specified in device space coordinates.
+
+ @param resultRect (Filled by the method) A pointer to the
+ resized or moved rectangle, specified in device space coordinates.
+
+ @param dragType One of the AVDragType constants.
+ @param extrema (May be <code>NULL</code>) A pointer to the
+ rectangle specifying the maximum limits of the user-dragged
+ rectangle. If it is <code>NULL</code>, the rectangle returned
+ by AVPageViewGetGrayRect() is used instead. The user cannot grow the rectangle outside <code>extrema</code>,
+ specified in device space coordinates. Pass <code>NULL</code> if you
+ do not wish to limit the changes the user is making. <code>extrema</code>
+ is ignored if <code>dragType</code> is <code>0</code>.
+ @see AVPageViewDragOutNewRect
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewDragRect, (AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart,
+ AVDevRect *startRect, AVDevRect *resultRect, ASInt32 dragType, AVDevRect *extrema))
+
+/**
+ Tests whether the specified point is within an annotation.
+ This method is typically used by mouse-handling code, to
+ pass clicks within an annotation to the appropriate annotation
+ handler. For each annotation, this method calls the appropriate
+ annotation handler's AVAnnotHandlerPtInAnnotViewBBoxProc()
+ to test whether the point is within the annotation.
+ @param pageView The page view for which the point to test.
+
+ @param xHit The x-coordinate of the point to test.
+ @param yHit The y-coordinate of the point to test.
+ @param hitAnnot (Filled by the method) A pointer to the
+ top-most annotation (if any) that was hit by the mouse click.
+ @return <code>true</code> if the location specified by <code>xHit</code> and <code>yHit</code> is within
+ an annotation, <code>false</code> otherwise.
+ @see AVPageViewGetAnnotRect
+ @see AVPageViewGetMousePosition
+ @see AVPageViewGetSelectedAnnotPageNum
+ @see AVPageViewIsAnnotOfTypeAtPoint
+ @see AVPageViewGetSelectedAnnotPageNum
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVPageViewIsAnnotAtPoint, (AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit,
+ PDAnnot *hitAnnot))
+
+/**
+ Tests whether the specified point is within a bead. It returns
+ the bead if it is.
+ @param pageView The page view in which the point is tested.
+
+ @param xHit The x-coordinate of the point to test, specified
+ in device space coordinates.
+ @param yHit The y-coordinate of the point to test, specified
+ in device space coordinates.
+ @param beadP (Filled by the method) A pointer to the bead
+ in which the point is located. This is only filled if the
+ point is within a bead.
+ @return <code>true</code> if the point is within a bead, <code>false</code> otherwise. If
+ the location is within a bead, the bead is returned in <code>beadP</code>.
+
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(ASBool, AVPageViewIsBeadAtPoint, (AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit,
+ PDBead *beadP))
+
+/**
+ Transforms a point's coordinates from device space to user
+ space.
+ @param pageView The page view for which the point's coordinates
+ are transformed.
+ @param x The x-coordinate of the point to transform, specified
+ in device space coordinates.
+ @param y The y-coordinate of the point to transform, specified
+ in device space coordinates.
+ @param p (Filled by the method) A pointer to a point whose
+ user space coordinates correspond to <code>x</code> and <code>y</code>.
+ @see AVPageViewPointToDevice
+ @see AVPageViewRectToDevice
+ @see AVPageViewDeviceRectToPage
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVPageViewDevicePointToPage, (AVPageView pageView, AVDevCoord x, AVDevCoord y,
+ ASFixedPoint *p), AVPageDevicePointToPage)
+
+/**
+ Called in response to a mouse click to track a text selection
+ on the screen. It uses the AVPageView current color, and leaves
+ the screen with any highlights visible. It does not affect
+ the current document selection.
+ @param pageView The page view.
+ @param xHit The x-coordinate of the original click.
+ @param yHit The y-coordinate of the original click.
+ @param current Any existing selection that should be built
+ upon.
+ @return PDTextSelect containing the words selected.
+ @see AVPageViewHighlightText
+ @see AVPageViewInvalidateText
+ @see AVPageViewPointInText
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+SPROC(PDTextSelect, AVPageViewTrackText, (AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDTextSelect current), AVPageViewTrackTextHost)
+
+/**
+ Tests if the given point is in the PDTextSelect.
+ @param pageView The page view.
+ @param xHit The x-coordinate to test.
+ @param yHit The y-coordinate to test.
+ @param pdText The text to hit-test upon.
+ @return <code>true</code> if the point is in the PDTextSelect, <code>false</code> otherwise.
+
+ @see AVPageViewTrackText
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVPageViewPointInText, (AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, PDTextSelect pdText))
+
+/**
+ Displays the given AVMenu as a popup menu anchored at <code>xHit</code>
+ and <code>yHit</code>, which are in device coordinates relative to <code>pageView</code>.
+
+ @param pageView The page view in which the menu appears.
+
+ @param menu The displayed menu.
+ @param xHit The x-coordinate of the upper left corner
+ of the menu.
+ @param yHit The y-coordinate of the upper left corner
+ of the menu.
+ @param rightMouse <code>true</code> if the right mouse button (where
+ applicable) was used to invoke the popup, <code>false</code> otherwise.
+
+ @param choice The index of the AVMenuItem that should
+ appear under the mouse at popup time.
+ @return The menu item selected from <code>menu</code>.
+ @see AVToolButtonGetMenu
+ @see AVToolButtonSetMenu
+ @see AVMenuDoPopUp
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+NPROC(AVMenuItem, AVPageViewDoPopupMenu, (AVPageView pageView, AVMenu menu, AVDevCoord xHit, AVDevCoord yHit, ASBool rightMouse, AVMenuIndex choice))
+
+/**
+ Transforms an annotation's rectangle from device space to
+ user space coordinates, allowing for the annotation's attributes
+ of whether it should zoom or rotate when the page is zoomed
+ or rotated. It also specifies a point that can remain in
+ the view.
+ @param pageView The page view for which the rectangle is transformed.
+
+ @param flags Flags to indicate whether the annotation
+ rotates or zooms with the page view. These flags correspond
+ to the annotation's F key and can be obtained from PDAnnotGetFlags().
+ <p>It must be an OR of the following flags:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Flag</TH><TH>Description</TH></TR>
+ <TR><TD>pdAnnotNoZoom</TD><TD>The annotation does not zoom with the view.</TD></TR>
+ <TR><TD>pdAnnotNoRotate</TD><TD>The annotation does not rotate with the page.</TD></TR>
+ </TABLE>
+
+ @param xHot The x-coordinate of the point that should remain
+ in the view.
+ @param yHot The y-coordinate of the point that should remain
+ in the view.
+ @param rect A pointer to a device space annotation rectangle
+ whose coordinates are transformed to user space.
+ @param p (Filled by the method) A pointer to a user space
+ rectangle corresponding to <code>src</code>.
+ @see AVPageViewAppearanceGetAVMatrix
+ @see AVPageViewDeviceRectToPage
+ @see AVPageViewRectToDevice
+ @see AVPageViewTransformRectRZ
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00040000
+*/
+SPROC(void, AVPageViewDeviceRectToPageRZ, (AVPageView pageView,
+ AVTFlagBits flags,
+ AVDevCoord xHot,
+ AVDevCoord yHot,
+ const AVDevRect* rect,
+ ASFixedRect *p),
+ AVPageDeviceRectToPageRZ)
+
+/**
+ This method is superseded by AVPageViewSnapPointEx() in Acrobat 6.0.
+
+ <p>Snaps a point to the layout grid if the <code>avpSnapToGrid</code> preference
+ is set.</p>
+
+ @param pageView The page view.
+ @param x (Filled by the method) The x-coordinate of the
+ point.
+ @param y (Filled by the method) The y-coordinate of the
+ point.
+ @param direction An AVDragType indicating how the point
+ is to be translated. Not all AVDragTypes are allowed.
+ <p>Only the following AVDragTypes are used:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>AVDragType</TH><TH>Description</TH></TR>
+ <TR><TD>kAVDragRect</TD><TD>Snap to the nearest grid intersection.</TD></TR>
+ <TR><TD>kAVDragSnapToTopLeft</TD><TD>Snap to the nearest grid intersection in the top left direction.</TD></TR>
+ <TR><TD>kAVDragSnapToTop</TD><TD>Snap to the nearest grid line above this point; <code>x</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToTopRight</TD><TD>Snap to the nearest grid intersection in the top right direction.</TD></TR>
+ <TR><TD>kAVDragSnapToRight</TD><TD>Snap to the nearest grid line right of this point; <code>y</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToBottomRight</TD><TD>Snap to the nearest grid intersection in the bottom right direction.</TD></TR>
+ <TR><TD>kAVDragSnapToBottom</TD><TD>Snap to the nearest grid line below this point; <code>x</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToBottomLeft</TD><TD>Snap to the nearest grid intersection in the bottom left direction.</TD></TR>
+ <TR><TD>kAVDragSnapToLeft</TD><TD>Snap to the nearest grid line left of this point; <code>y</code> is unchanged.</TD></TR>
+ </TABLE>
+
+ @note This method is superseded by AVPageViewSnapPointEx() in Acrobat 6.0.
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVPageViewSnapPoint, (AVPageView pageView, AVDevCoord *x, AVDevCoord *y, AVDragType direction))
+
+/**
+ Gets the current mouse position snapped to the layout grid.
+ @param pageView The current page view.
+ @param x (Filled by the method) The x-coordinate of the mouse
+ position.
+ @param y (Filled by the method) The y-coordinate of the mouse
+ position.
+ @param direction An AVDragType indicating how the point
+ is to be translated. Not all AVDragTypes are allowed: only
+ those indicating how the point is to be translated are allowed.
+ <p>The following AVDragTypes are used:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>AVDragType</TH><TH>Description</TH></TR>
+ <TR><TD>kAVDragRect</TD><TD>Snap to the nearest grid intersection.</TD></TR>
+ <TR><TD>kAVDragSnapToTopLeft</TD><TD>Snap to the nearest grid intersection in the top left direction.</TD></TR>
+ <TR><TD>kAVDragSnapToTop</TD><TD>Snap to the nearest grid line above this point; <code>x</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToTopRight</TD><TD>Snap to the nearest grid intersection in the top right direction.</TD></TR>
+ <TR><TD>kAVDragSnapToRight</TD><TD>Snap to the nearest grid line right of this point; <code>y</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToBottomRight</TD><TD>Snap to the nearest grid intersection in the bottom right direction.</TD></TR>
+ <TR><TD>kAVDragSnapToBottom</TD><TD>Snap to the nearest grid line below this point; <code>x</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToBottomLeft</TD><TD>Snap to the nearest grid intersection in the bottom left direction.</TD></TR>
+ <TR><TD>kAVDragSnapToLeft</TD><TD>Snap to the nearest grid line left of this point; <code>y</code> is unchanged.</TD></TR>
+ </TABLE>
+
+ @see AVPageViewDragOutNewRectSnapped
+ @see AVPageViewDragRectSnapped
+ @see AVPageViewSnapPoint
+ @see AVPageViewSnapRect
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(void, AVPageViewGetMousePositionSnapped, (AVPageView pageView, AVDevCoord *x, AVDevCoord *y, AVDragType direction))
+
+/**
+ Drags out a rectangle anchored at the given point. The rectangle
+ will be snapped to the layout grid.
+ @param pageView The page view in which the rectangle will be
+ created.
+ @param xStart The x-coordinate of the anchor point.
+ @param yStart The y-coordinate of the anchor point.
+ @param resultRect (Filled by the method) The resulting
+ rectangle generated by the user.
+ @param cursorArray A pointer to an array of AVCursor objects.
+ This value is used in conjunction with <code>nCursors</code> and is treated
+ as follows:
+
+ <ul>
+ <li>If it is <code>NULL</code>, the default cursor will be used
+ during the drag. <code>nCursors</code> is ignored.</li>
+ <li>If it is non-<code>NULL</code> and
+ <code>nCursors</code> is <code>1</code>, the supplied cursor will replace the default
+ cursor during the drag.</li>
+ <li>If it is non-<code>NULL</code> and <code>nCursors</code> is <code>2</code>,
+ the first cursor will replace the default cursor during
+ the drag, and the second cursor will be used if the user
+ presses the control key (on Windows) or the option key (on Mac OS).</li>
+ </ul>
+
+ @param nCursors The number of cursors supplied in <code>cursorArray</code>.
+ @return A bit-wise OR of the Modifier Keys that were pressed as
+ the rectangle was dragged out. See AVSysGetModifiers().
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVTFlagBits, AVPageViewDragOutNewRectSnapped, (AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart,
+ AVDevRect *resultRect, AVCursor *cursorArray, AVTSmallArraySize nCursors))
+
+/**
+ <p>Superseded in Acrobat 6.0 by AVPageViewDragRectSnappedEx().</p>
+
+ <p>Allows the user to move or resize an existing rectangle.
+ If the user has enabled Snap To Grid from the main menu,
+ the resulting rectangle will be aligned to the layout grid
+ according to the <code>dragType</code> parameter.</p>
+
+ @param pageView The page view in which the rectangle resides.
+
+ @param xStart The x-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param yStart The y-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param startRect The initial position of the rectangle.
+
+ @param resultRect (Filled by the method) The position
+ of the rectangle at the end of the operation.
+ @param dragType One of the AVDragType constants. These
+ determine whether the drag is a resize or a move operation.
+ <p>To move the rectangle, specify one of the following:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Version</TH><TH>Description</TH></TR>
+ <TR><TD>kAVDragRect</TD><TD>The corner of the rectangle that is closest to (<code>xStart</code>,<code>yStart</code>)
+ is snapped to the grid, and dragging begins from that point.</TD></TR>
+ <TR><TD><code>kAVDragSnapToXXX</code></TD><TD>The corner or edge specified by <code>'XXX'</code>
+ (<code>TopLeft</code>, <code>Top</code>, and so on) is snapped, and dragging begins from that point.</TD></TR>
+ </TABLE>
+
+ <p>To resize the rectangle, specify <code>kAVDragXXX</code>. The corner or edge specified
+ by <code>'XXX'</code> (<code>TopLeft</code>, <code>Top</code>, and so on) is dragged, and the opposite
+ corner or edge is used as an anchor point.</p>
+
+ @param extrema (May be <code>NULL</code>) The rectangle to which the drag operation
+ is restricted. If it is <code>NULL</code>, the rectangle returned by AVPageViewGetGrayRect()
+ is used instead. Use this to restrict the drag operation
+ to a bounding rectangle. It may be <code>NULL</code>, in which case the
+ bounding rectangle of the page view is used.
+ @param cursorArray A pointer to an array of AVCursor objects.
+ This value is used in conjunction with <code>nCursors</code> and is treated
+ as follows:
+
+ <ul>
+ <li>If it is <code>NULL</code>, the default cursor will be used
+ during the drag. <code>nCursors</code> is ignored.</li>
+ <li>If it is non-<code>NULL</code> and
+ <code>nCursors</code> is <code>1</code>, the supplied cursor will replace the default
+ cursor during the drag.</li>
+ <li>If it is non-<code>NULL</code> and <code>nCursors</code> is <code>2</code>,
+ the first cursor will replace the default cursor during
+ the drag, and the second cursor will be used if the user
+ presses the control key (on Windows) or the option key (on Mac OS).</li>
+ </ul>
+
+ @param nCursors The number of cursors supplied in <code>cursorArray</code>.
+ @return A bit-wise OR of the Modifier Keys that were pressed as
+ the rectangle was dragged.
+ @see AVPageViewDragRectSnappedEx
+ @see AVPageViewSnapPointEx
+ @see AVSysGetModifiers
+
+ @note Superseded in Acrobat 6.0 by AVPageViewDragRectSnappedEx().
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(AVTFlagBits, AVPageViewDragRectSnapped, (AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart,
+ AVDevRect *startRect, AVDevRect *resultRect, AVlDragType dragType, AVDevRect *extrema, AVCursor *cursorArray, AVTSmallArraySize nCursors))
+
+/**
+ Given a starting point, ending point, and starting rectangle,
+ this returns a resulting rectangle which is snapped to the grid.
+ The routine is designed for use within a custom mouse-drag
+ loop, when the default drawing behavior provided by AVPageViewDragRectSnapped()
+ is insufficient.
+ @param pageView The page view.
+ @param xStart The x-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param yStart The y-coordinate of the point where the
+ user initially clicked, specified in device space coordinates.
+
+ @param xNow The x-coordinate.
+ @param yNow The y-coordinate.
+ @param startRect The initial position of the rectangle.
+ @param resultRect (Filled by the method) The position
+ of the rectangle at the end of the operation.
+ @param handleType One of the AVRectHandleType enumerated
+ values, typically obtained by calling AVRectHandleHitTest()
+ with the initial rectangle and starting coordinates. The
+ <code>handleType</code> determines which point or edge of the rectangle
+ should be snapped to the grid.
+ @param modifiers Pass AVSysGetModifiers() to pass in one
+ of the Modifier Keys. If the key indicates that the Shift
+ key is pressed, one of the following is done:
+
+ <ul>
+ <li>If the <code>handleType</code> parameter is a resizing parameter
+ (kAVRectHandleTopLeft through kAVRectHandleLeftMiddle),
+ then maintain the aspect ratio of the original rectangle.</li>
+ <li>If the <code>handleType</code> parameter is kAVRectHandleNone,
+ this means that the rectangle is being moved around rather than
+ resized, and the result rectangle will be snapped to the x-axis or
+ y-axis of the starting rectangle, whichever is closer. </li>
+ </ul>
+
+ @param extrema Restricts the drag operation to a bounding
+ rectangle. If it is <code>NULL</code>, the bounding rectangle of the page view
+ is used.
+
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+SPROC(void, AVPageViewSnapRect, (AVPageView pageView, AVDevCoord xStart, AVDevCoord yStart, AVDevCoord xNow, AVDevCoord yNow,
+ AVDevRect *startRect, AVDevRect *resultRect, ASInt32 handleType, ASUns32 modifiers, const AVDevRect *extrema), AVPageViewGridSnapRect)
+
+/**
+ Inverts the specified rectangle's outline.
+ @param pageView IN/OUT The page view in which the inverted rectangle
+ outline is drawn.
+ @param rect IN/OUT A pointer to the rectangle whose outline is inverted,
+ specified in device space coordinates. Use AVPageViewRectToDevice()
+ to convert the coordinates of a rectangle that is specified
+ in user space coordinates.
+ @see AVPageViewDrawRect
+ @see AVPageViewDrawRectOutline
+ @see AVPageViewInvertRect
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewInvertRectOutline, (AVPageView pageView, const AVDevRect *rect))
+
+/**
+ Transforms a point's coordinates from user space to device
+ space.
+ @param pageView The page view for which the point's coordinates
+ are transformed.
+ @param p A pointer to the ASFixedPoint whose coordinates,
+ specified in user space, are transformed.
+ @param x (Filled by the method) The x-coordinate of the device
+ space point corresponding to <code>p</code>.
+ @param y (Filled by the method) The y-coordinate of the device
+ space point corresponding to <code>p</code>.
+ @see AVPageViewDevicePointToPage
+ @see AVPageViewRectToDevice
+ @see AVPageViewDeviceRectToPage
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+SPROC(void, AVPageViewPointToDevice, (AVPageView pageView, const ASFixedPointP p,
+ AVDevCoord *x, AVDevCoord *y), AVPagePointToDevice)
+
+/**
+ Determines if an annotation of the specified type resides
+ under the given point. If so, a handle to the annotation
+ is returned.
+ @param pageView The page view.
+ @param xHit The x-coordinate of the point.
+ @param yHit The y-coordinate of the point.
+ @param annotType The annotation type of interest.
+ @param belowOthers If <code>true</code>, the search continues below
+ the topmost annotation. Otherwise the search halts after
+ a single annotation is found, irrespective of its type.
+ @param annot (Filled by the method) The uppermost annotation
+ of the given type.
+ @return <code>true</code> if an annotation was found, <code>false</code> otherwise.
+
+ @note Most tools which author new annotations should ignore
+ annotations of other types when performing hit tests. Use
+ this routine instead of AVPageViewIsAnnotAtPoint() to ignore
+ annotations of other types, and pass <code>true</code> for <code>belowOthers</code>
+ so the user can click through annotations of other types.
+
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+NPROC(ASBool, AVPageViewIsAnnotOfTypeAtPoint,
+ (AVPageView pageView, AVDevCoord xHit, AVDevCoord yHit, ASAtom annotType, ASBool belowOthers, PDAnnot *annot))
+
+/**
+ Sets an annotation's location, specified in device space
+ coordinates.
+ @param anAnnot The annotation whose location is set.
+ @param pageView The page view in which the annotation
+ is displayed.
+ @param x The annotation's new x-coordinate, specified
+ in device space coordinates.
+ @param y The annotation's new y-coordinate, specified
+ in device space coordinates.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see AVPageViewGetAnnotRect
+ @see PDPageCreateAnnot
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVPageViewSetAnnotLocation, (PDAnnot anAnnot, AVPageView pageView,
+ AVDevCoord x, AVDevCoord y))
+
+/**
+ 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 AVAnnotHandlerGetTypeProc()
+ returns <code>NULL</code>.
+ @param 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.
+ @see AVAppEnumAnnotHandlers
+ @see AVAppGetAnnotHandlerByName
+ @see AVPageViewIsAnnotAtPoint
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppRegisterAnnotHandler, (AVAnnotHandler handler))
+
+/**
+ Registers the specified tool with the Acrobat viewer. The
+ tool is not registered if its GetTypeProcType() callback returns
+ <code>NULL</code>.
+ @param tool IN/OUT A structure containing the tool's callbacks.
+ This structure must not be freed after calling AVAppRegisterTool(),
+ but must be retained.
+ @see AVAppEnumTools
+ @see AVAppSetActiveTool
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVAppRegisterTool, (AVTool tool))
+
+/**
+ Creates a new window and registers it with the Acrobat viewer.
+
+ <p>Because Windows and UNIX use the platform's native window
+ handling instead of the Acrobat viewer's AVWindowHandler
+ mechanism (that is, the AVWindowHandler mechanism's callbacks are
+ never called on those platforms), there is no advantage
+ to using AVWindowNew(). Client developers on those platforms
+ should use AVWindowNewFromPlatformThing() instead of this
+ method.</p>
+ @param layer The layer in which the window resides. On the
+ Mac OS, it must be one of the AVWindowLayer constants. On Windows,
+ all AVWindow objects are of type <code>AVWLfloating</code>, and <code>layer</code> is ignored.
+ @param flags An OR of the values listed in AVWindow Flags.
+ @param handler A structure containing the window handler's
+ callback functions. Pass <code>NULL</code> in Windows and UNIX, because
+ the window handler's callbacks are unused on those platforms.
+ @param owner The gExtensionID extension registering the
+ window.
+ @return The newly created window.
+ @exception genErrNoMemory
+ @see AVWindowNewFromPlatformThing
+ @note The flags numeric type changed in version 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVWindow, AVWindowNew, (AVWindowLayer layer, AVFlagBits32 flags, AVWindowHandler handler,
+ ASExtension owner))
+
+/**
+ Creates a new window from a platform-specific structure
+ and registers it with the Acrobat viewer.
+
+ <p>If a user creates an <code>HWND</code> or a <code>WindowRef</code> and does not register
+ it with the viewer via AVWindowNewFromPlatformThing(), it
+ should not be allowed to persist across event loops (that
+ is, on Mac OS, it should be system-modal). </p>
+
+ <p>Windows and UNIX use the platform's native window handling
+ instead of the Acrobat viewer's AVWindowHandler mechanism
+ (that is, the AVWindowHandler object's callbacks are never called
+ on those platforms). Client developers on those platforms
+ should use AVWindowNewFromPlatformThing() instead of AVWindowNew(),
+ since they have to create the window using platform-specific
+ code anyway.</p>
+
+ @param layer One of the AVWindowLayer constants, specifying
+ the layer in which the window is located. For Mac OS, see
+ AVWindowNew(). <code>layer</code> is ignored on Windows, because the equivalent
+ information was specified when the platform thing was created.
+ @param flags For Mac OS, it is an OR of the AVWindow Flags.
+ It is the responsibility of the Mac client developer
+ to ensure that <code>flags</code> matches any attributes of the <i>platform-thing</i>
+ window; the Acrobat viewer cannot determine <code>flags</code> from the
+ window itself. <code>flags</code> is ignored on Windows and UNIX, because
+ the equivalent information was specified when the platform
+ thing was created.
+ @param handler A structure containing the window handler's
+ callback functions. Pass <code>NULL</code> on Windows and UNIX, because
+ the window handler's callbacks are unused on those platforms.
+ @param owner The gExtensionID extension registering the
+ window.
+ @param platformThing A platform-specific object (an <code>HWND</code> on Windows, a <code>WindowRef</code>
+ on Mac OS, and a <code>Widget</code> on UNIX) that will be used for this window.
+ @return The newly created window.
+ @exception genErrNoMemory AVWindowNew AVWindowGetPlatformThing
+
+ @note The flags numeric type changed in version 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVWindow, AVWindowNewFromPlatformThing, (AVWindowLayer layer, AVFlagBits32 flags,
+ AVWindowHandler handler, ASExtension owner, void *platformThing))
+
+/**
+ Gets the window's frame, which specifies its size and location
+ on the screen.
+
+ @param win The window whose frame is obtained.
+ @param rect (Filled by the method) A pointer to a rectangle
+ specifying the window's frame rectangle, specified in global
+ screen coordinates. On Mac OS, the frame includes only the
+ window's content region. On Windows, the frame includes only
+ the window's client rectangle.
+ @see AVWindowSetFrame
+ @see AVWindowGetInterior
+
+ @note On Mac OS, this method may change the current port,
+ thus altering the Mac OS graphics state. It sets the
+ port to that specified by <code>win</code>, but fails to restore the
+ previous port before exiting.
+
+ @note On Windows, the frame for an MDI document window
+ is in coordinates relative to the MDI client window, which is
+ the window that contains the MDI children.
+
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowGetFrame, (AVWindow win, AVScreenRect *rect))
+
+/**
+ Sets the window's frame, which specifies its size and location
+ on the screen.
+
+ @param win The window whose frame is set.
+ @param rect A pointer to a rectangle specifying the window's
+ frame rectangle, specified in global screen coordinates.
+ On Windows, the frame includes only the window's
+ client rectangle. On Mac OS, the frame includes only the window's content
+ region.
+ @see AVWindowGetFrame
+ @see AVWindowGetInterior
+
+ @note On Windows, the frame for an MDI document window
+ is in coordinates relative to the MDI client window, which is
+ the window that contains the MDI children.
+
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowSetFrame, (AVWindow win, const AVScreenRect *rect))
+
+/**
+ Gets the interior rectangle of the window.
+ @param win The window whose interior is obtained.
+ @param rect (Filled by the method) A pointer to a rectangle
+ specifying the window's interior, specified as local window
+ coordinates.
+ @see AVWindowGetFrame
+ @see AVWindowSetFrame
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowGetInterior, (AVWindow win, AVWindowRect *rect))
+
+/**
+ Invalidates the specified rectangular region, for eventual
+ redraw. This is the preferred method for refreshing a portion
+ of an AVWindow. Use AVWindowDrawNow() to force a window to
+ redraw its invalid regions.
+ @param win The window in which to invalidate a region.
+
+ @param rect A pointer to a rectangle specifying the region
+ to invalidate.
+ @see AVWindowDrawNow
+ @see AVWindowGetInterior
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowInvalidateRect, (AVWindow win, const AVWindowRect *rect))
+
+/**
+ Gets the minimum and maximum size of the window.
+
+ <p><code>top</code> and <code>left</code> in <code>rect</code> are for minimum size; <code>bottom</code> and <code>right</code>
+ are for maximum size. </p>
+ @param win The window whose size is obtained.
+ @param rect (Filled by the method) A pointer to a rectangle
+ specifying the window's size, specified in device space
+ coordinates. If this method is not supported on a particular
+ platform, the minimum size returned is <code>0, 0</code> and the maximum
+ size is <code>ASMAXInt16, ASMAXInt16</code>.
+ @see AVWindowSetMinMaxSize
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00040005
+*/
+NPROC(void, AVWindowGetMinMaxSize, (AVWindow win, AVRect *rect))
+
+/**
+ Sets the minimum and maximum size of the window.
+
+ <p><code>top</code> and <code>left</code> in <code>rect</code> are for minimum size; <code>bottom</code> and <code>right</code>
+ are for maximum size. </p>
+ @param win The window whose size is set.
+ @param rect A pointer to a rectangle specifying the window's
+ size, specified in device space coordinates.
+ @see AVWindowGetMinMaxSize
+ @note The coordinate numeric type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00040005
+*/
+NPROC(void, AVWindowSetMinMaxSize, (AVWindow win, const AVRect *rect))
+
+/* end of new 32 bit versions of old routines */
+
+
+/**
+ Gets a unique identifier (UUID) for the current user or
+ the current session. The UUID can be used with P2P, web
+ interactions, and so on.
+ @param type (Filled by the method) The UUID type value,
+ which specifies whether it identifies the current user or
+ the current session.
+ @param dst (Filled by the method) A pointer to the UUID
+ object.
+ @return <code>true</code> if the UUID is successfully retrieved, <code>false</code> otherwise.
+
+ @see ASUUIDFromCString
+ @see ASUUIDGenFromHash
+ @see ASUUIDGenFromName
+ @see ASUUIDGenUnique
+ @see ASUUIDToCString
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVAppGetUUID, (AVAppUUIDType type, ASUUID *dst))
+
+
+/**
+ Gets an icon of the specified type from the specified file.
+
+ @param fname The file name.
+ @param itype The icon type, kAVSysSmallIcon, or kAVSysLargeIcon.
+ @return The icon object, or <code>NULL</code> if no icon of the given type was
+ found.
+ @see AVSysGetIconFromMimeType
+ @see AVSysGetIconFromTypeAndCreator
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVIcon, AVSysGetIconFromFilename, (ASText fname, AVSysIconType itype))
+
+/**
+ Gets an icon of the specified type from the specified MIME
+ type.
+ @param mimeType The MIME type.
+ @param itype The icon type, kAVSysSmallIcon, or kAVSysLargeIcon.
+ @return The icon object, or <code>NULL</code> if no icon of the given type was
+ found.
+ @see AVSysGetIconFromFilename
+ @see AVSysGetIconFromTypeAndCreator
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVIcon, AVSysGetIconFromMimeType, (const char *mimeType, AVSysIconType itype))
+
+/**
+ Gets an icon of the specified type from the specified type
+ and creator (for Mac OS).
+ @param type The type value (which specifies a type such
+ as PDF or GIF).
+ @param creator The creator value (which specifies a creator
+ such as Acrobat or Photoshop).
+ @param itype The icon type, kAVSysSmallIcon, or kAVSysLargeIcon.
+ @return The icon object, or <code>NULL</code> if no icon of the given type was
+ found.
+ @see AVSysGetIconFromFilename
+ @see AVSysGetIconFromMimeType
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVIcon, AVSysGetIconFromTypeAndCreator, (ASUns32 type, ASUns32 creator, AVSysIconType itype))
+
+
+/**
+ Converts the specified file to a PDF document using the
+ specified handler.
+ @param inHandler Specifies which <code>ConvertFromPDF</code> handler
+ to use.
+ @param inSettings An ASCab containing the settings to be
+ used in the conversion operation. Pass <code>NULL</code> to use the default
+ settings.
+ @param flags Conversion flags.
+ @param stream The stream to convert.
+ @param metaData The metadata.
+ @param outPDDoc (Filled by the method) It is the caller's
+ responsibility to close the document.
+ @param statusMonitor Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>, or any of its members can be <code>NULL</code>.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionConvertStreamToPDF
+ @see AVConversionConvertToPDFWithHandler
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+XNPROC(AVConversionStatus, AVConversionConvertStreamToPDFWithHandler,(
+ AVConversionToPDFHandler inHandler,
+ ASCab inSettings,
+ AVConversionFlags flags,
+ ASStm stream,
+ ASCab metaData,
+ PDDoc *outPDDoc,
+ AVStatusMonitorProcs statusMonitor))
+
+/**
+ Converts a PDF document to a stream using the specified handler.
+
+ @param inHandler Specifies which <code>ConvertFromPDF</code> handler
+ to use.
+ @param inSettings An ASCab containing the settings to be
+ used in the conversion operation. Pass <code>NULL</code> to use the default
+ settings.
+ @param flags Conversion flags.
+ @param inPDDoc The PDF document to be converted.
+ @param stream The desired location for the output stream.
+
+ @param metaData The file metadata.
+ @param statusMonitor Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>, or any of its members can be <code>NULL</code>.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionConvertFromPDFWithHandler
+ @see AVConversionConvertStreamToPDFWithHandler
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+XNPROC(AVConversionStatus, AVConversionConvertStreamFromPDFWithHandler,(
+ AVConversionFromPDFHandler inHandler,
+ ASCab inSettings,
+ AVConversionFlags flags,
+ PDDoc inPDDoc,
+ ASStm stream,
+ ASCab metaData,
+ AVStatusMonitorProcs statusMonitor))
+
+/**
+ Converts a structure node to a stream using the handler
+ specified.
+ @param inHandler Specifies which <code>ConvertFromPDF</code> handler
+ to use.
+ @param inSettings An ASCab containing the settings to be
+ used in the conversion operation. Pass <code>NULL</code> to use the default
+ settings.
+ @param flags Conversion flags.
+ @param inStructNode The structure node to be converted.
+
+ @param stream The desired location for the output stream.
+
+ @param metaData The file metadata.
+ @param statusMonitor Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>, or any of its members can be <code>NULL</code>.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionConvertStreamFromPDFWithHandler
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+XNPROC(AVConversionStatus, AVConversionConvertStreamFromStructNodeWithHandler,(
+ AVConversionFromPDFHandler inHandler,
+ ASCab inSettings,
+ AVConversionFlags flags,
+ AVStructNode inStructNode,
+ ASStm stream,
+ ASCab metaData,
+ AVStatusMonitorProcs statusMonitor))
+
+/**
+ Converts the specified stream to a PDF document using whatever
+ converter is found. Use this function if you do not know
+ which handler to use.
+
+ <p>Multiple conversion handlers can register their services
+ for the same file description, so the first one that matches
+ the file type passed in that has the correct <code>canDoSync</code> settings
+ is used. </p>
+
+ <p>The converters are enumerated in priority order, starting
+ with the highest priority. </p>
+ @param flags Conversion flags.
+ @param mimeType The MIME type.
+ @param stream The stream to convert.
+ @param metaData The metadata.
+ @param outPDDoc (Filled by the method) It is the caller's
+ responsibility to close the document.
+ @param statusMonitor Contains the progress monitor, cancel
+ proc, and error reporting proc to be used by the converter.
+ It can be <code>NULL</code>, or any of its members can be <code>NULL</code>.
+ @return One of the AVConversionStatus codes.
+ @see AVConversionConvertToPDF
+ @see AVConversionConvertStreamToPDFWithHandler
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+XNPROC(AVConversionStatus, AVConversionConvertStreamToPDF, (
+ AVConversionFlags flags,
+ const char *mimeType,
+ ASStm stream,
+ ASCab metaData,
+ PDDoc *outPDDoc,
+ AVStatusMonitorProcs statusMonitor))
+
+
+/**
+ Pops up a submenu.
+ @param menu The menu to be displayed.
+ @param x The x-coordinate of the upper left corner of
+ the menu.
+ @param y The y-coordinate of the upper left corner of
+ the menu.
+ @param rightButton <code>true</code> if the right mouse button (where
+ applicable) was used to invoke the popup, <code>false</code> otherwise.
+
+ @param choice The index of the AVMenuItem that should
+ appear under the mouse at popup time.
+ @return The menu item selected from menu.
+ @see AVPageViewDoPopupMenu
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVMenuItem, AVMenuDoPopUp, (AVMenu menu, ASInt16 x, ASInt16 y, ASBool rightButton, ASInt32 choice))
+
+
+/**
+ Gets the number of page views for the specified document.
+
+ @param avDoc The document whose page view count is obtained.
+ @return The number of AVPageView objects associated with the document,
+ as an ASCount.
+ @see AVDocGetNthPageView
+ @see AVDocGetPageView
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASCount, AVDocGetNumPageViews, (AVDoc avDoc))
+
+/**
+ Gets the specified AVPageView for the specified document.
+
+ @param avDoc The document whose AVPageView is obtained.
+ @param n The index of the page view to obtain. The index
+ range is <code>0</code> to <code>(AVDocGetNumPageViews-1)</code>.
+ @return The document's nth AVPageView.
+ @see AVDocGetNumPageViews
+ @see AVDocGetPageView
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVPageView, AVDocGetNthPageView, (AVDoc avDoc, ASCount n))
+
+
+/**
+ Opens and displays a document from a file, using the specified
+ parameters to control the window's size, location, and visibility,
+ and passing a URL open action string to control how the
+ file is opened. For more information, see the document <i>Parameters for Opening PDF Files</i>.
+
+ <p>If you want to display a page from a PDF file as a bitmap,
+ use PDPageDrawContentsToWindow(). </p>
+ @param pathName The file to open.
+ @param fileSys The file system on which pathName resides.
+ You can obtain the default file system with ASGetDefaultFileSys.
+
+ @param tempTitle If <code>tempTitle != NULL</code>, <code>pathName</code> is a temporary
+ file and <code>tempTitle</code> is used as the window's title.
+ @param p Parameters used when opening the file. It can
+ be <code>NULL</code>.
+ @param s A string containing the URL open action. For
+ example, <code>Help=contents&nameddest=distiller_mydest</code> would
+ open the PDF in the help window, with the contents panel
+ showing on the left and the page referenced by the named
+ destination <code>distiller_mydest</code> showing on the right.
+ @ingroup ReplaceableMethods
+ @return The document that was opened.
+ @notify AVDocWillOpenFromFile
+ @notify AVDocDidOpen
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFileWithParams
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromPDDoc
+ @see AVDocClose
+
+ @note Do not open and then immediately close an AVDoc without letting at least one event loop complete.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVDoc, AVDocOpenFromFileWithParamString, (ASPathName pathName, ASFileSys fileSys, const ASText tempTitle, AVDocOpenParams p, const char * s))
+
+/**
+ Opens and displays a document from a PDDoc, using the specified
+ parameters to control the window's size, location, and visibility,
+ and passing a URL open action string to control how the
+ file is opened. For more information, see the document <i>Parameters for Opening PDF Files</i>.
+
+ <p>If you want to display a page from a PDF file as a bitmap,
+ use PDPageDrawContentsToWindow(). </p>
+ @param pdDoc The document to open and display.
+ @param tempTitle If <code>tempTitle != NULL</code>, <code>pathname</code> is a temporary
+ file and <code>tempTitle</code> is used as the window's title.
+ @param p Parameters used when opening the file. It can
+ be <code>NULL</code>.
+ @param s A string containing the URL open action. For
+ example, <code>Help=contents&nameddest=distiller_mydest</code> would
+ open the PDF in the help window, with the contents panel
+ showing on the left and the page referenced by the named
+ destination <code>distiller_mydest</code> showing on the right.
+ @return The document that was opened.
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFileWithParamString
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+ @see AVDocClose
+
+ @note Do not open and then immediately close an AVDoc without letting at least one event loop complete.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVDoc, AVDocOpenFromPDDocWithParamString, (PDDoc pdDoc, const ASText tempTitle, AVDocOpenParams p, const char * s))
+
+/**
+ Opens and displays a document from an ASFile, using the
+ specified parameters to control the window's size, location,
+ and visibility, and passing a URL open action string to
+ control how the file is opened. For more information, see
+ <i>Parameters for Opening PDF Files</i>.
+
+ <p>If you want to display a page from a PDF file as a bitmap,
+ use PDPageDrawContentsToWindow(). </p>
+ @param file The ASFile to open.
+ @param tempTitle An optional window title for the document.
+
+ @param p Open parameters for the document.
+ @param s A string containing the URL open action. For
+ example, <code>Help=contents&nameddest=distiller_mydest</code> would
+ open the PDF in the help window, with the contents panel
+ showing on the left and the page referenced by the named
+ destination <code>distiller_mydest</code> showing on the right.
+ @return An AVDoc object for file.
+ @notify AVDocWillOpenFromFile
+ @notify AVDocDidOpen
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromFileWithParamString
+ @see AVDocOpenFromPDDocWithParamString
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVDoc, AVDocOpenFromASFileWithParamString, (ASFile file, const ASText tempTitle, AVDocOpenParams p, const char * s))
+
+
+/**
+ Opens the specified PDF help file and goes to the location
+ of the specified content. If the help file is not found, it
+ opens a dialog box asking if the user wants to search for
+ the help file.
+ @param fileName The name of the PDF help file to open.
+ If it is a simple file name, it is assumed to reside in
+ the help contents folder. Pass <code>NULL</code> for the default Acrobat
+ help file.
+ @param contentTag A named destination defined in the PDF
+ help file.
+ @return <code>true</code> if the PDF was opened successfully, <code>false</code> otherwise.
+
+ @see AVAppHelpSearch
+ @see AVAppHelpShowIndex
+ @see AVAppOpenHelpFileWithParams
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVAppHelpShowContents, (const char * fileName, const char * contentTag) )
+
+/**
+ Opens the specified help file (if it is not already open)
+ and searches for a specified string. If the help file is
+ not found, it opens a dialog box asking if the user wants to
+ search for the help file. If the help file is found, the
+ method opens it with the navigation panel on the left showing
+ the search panel, which displays the result of the search.
+
+ @param fileName The name of the help file in which to search.
+ If it is a simple file name, it is assumed to reside in
+ the help contents folder. Pass <code>NULL</code> for the default Acrobat
+ help file.
+ @param searchText The UTF8-encoded text for which to search.
+
+ @return <code>true</code> if the help file was successfully opened, <code>false</code> otherwise.
+
+ @see AVAppHelpShowContents
+ @see AVAppHelpShowIndex
+ @see AVAppOpenHelpFileWithParams
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVAppHelpSearch, (const char * fileName, const char * searchText))
+
+/**
+ Opens the specified PDF help file and displays the index.
+ If the help file is not found, it opens a dialog box asking
+ if the user wants to search for the help file.
+ @param fileName The name of the PDF help file to open.
+ If it is a simple file name, it is assumed to reside in
+ the help contents folder. Pass <code>NULL</code> for the default Acrobat
+ help file.
+ @return <code>true</code> if the PDF was opened successfully, <code>false</code> otherwise.
+
+ @see AVAppHelpSearch
+ @see AVAppHelpShowContents
+ @see AVAppOpenHelpFileWithParams
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVAppHelpShowIndex, (const char * fileName))
+
+/**
+ Opens a specified help PDF file, using the specified parameters
+ to control the window's size, location, and visibility.
+ If the help file is not found, it optionally opens a dialog
+ box asking if the user wants to search for the help file.
+ @param fileName A help PDF file name. If it is a simple
+ file name, it is assumed to reside in the help contents
+ folder.
+ @param doSearch If <code>true</code> and the help file is not found,
+ a dialog box is displayed, asking if the user wants to search
+ for the help file. If <code>false</code>, <code>false</code> is returned if the help file
+ is not found.
+ @param p Open parameters for the document.
+ @return <code>true</code> if the help file is found, <code>false</code> otherwise.
+ @see AVAppHelpSearch
+ @see AVAppHelpShowContents
+ @see AVAppHelpShowIndex
+
+ @note Supersedes AVAppOpenHelpFile(), which is deprecated in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVAppOpenHelpFileWithParams, (const char * fileName, ASBool doSearch, AVDocOpenParams p))
+
+/**
+ Adds the specified AVIcon to the AVToolbutton object's animation list.
+ @param button An AVToolbutton to which <code>newIcon</code> will be added.
+ @param newIcon An icon that is added to the animation list for <code>button</code>.
+ @see AVToolButtonGetAnimationIconCount
+ @see AVToolButtonStartAnimation
+ @see AVToolButtonStopAnimation
+ @see AVToolButtonIsAnimationRunning
+ @see AVToolButtonSetAnimationPeriod
+ @see AVToolButtonGetAnimationPeriod
+ @see AVToolButtonRemoveAnimationIcons
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonAddAnimationIcon, (AVToolButton button, AVIcon newIcon))
+
+/**
+ Returns the count of animation icons associated with this tool button.
+ @param button An AVToolbutton whose item count is returned.
+ @return An ASInt32 representing the number of icons associated with this tool button.
+ @see AVToolButtonStartAnimation
+ @see AVToolButtonStopAnimation
+ @see AVToolButtonRemoveAnimationIcons
+ @see AVToolButtonIsAnimationRunning
+ @see AVToolButtonSetAnimationPeriod
+ @see AVToolButtonGetAnimationPeriod
+ @see AVToolButtonAddAnimationIcon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, AVToolButtonGetAnimationIconCount, (AVToolButton button))
+
+/**
+ Starts flipping icons for specified button.
+ @param button An AVToolbutton whose animation list will be started.
+ @see AVToolButtonGetAnimationIconCount
+ @see AVToolButtonStopAnimation
+ @see AVToolButtonRemoveAnimationIcons
+ @see AVToolButtonIsAnimationRunning
+ @see AVToolButtonSetAnimationPeriod
+ @see AVToolButtonGetAnimationPeriod
+ @see AVToolButtonAddAnimationIcon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonStartAnimation, (AVToolButton button))
+
+/**
+ Stops flipping icons for specified button.
+ @param button An AVToolbutton whose animation list will be stopped.
+ @see AVToolButtonGetAnimationIconCount
+ @see AVToolButtonStartAnimation
+ @see AVToolButtonRemoveAnimationIcons
+ @see AVToolButtonIsAnimationRunning
+ @see AVToolButtonSetAnimationPeriod
+ @see AVToolButtonGetAnimationPeriod
+ @see AVToolButtonAddAnimationIcon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonStopAnimation, (AVToolButton button))
+
+/**
+ Indicates whether the tool button animation list is flipping.
+ @param button The AVToolbutton whose animation list may be flipping.
+ @return An ASBool indicating whether the button is flipping icons.
+ @see AVToolButtonGetAnimationIconCount
+ @see AVToolButtonStartAnimation
+ @see AVToolButtonRemoveAnimationIcons
+ @see AVToolButtonStopAnimation
+ @see AVToolButtonSetAnimationPeriod
+ @see AVToolButtonGetAnimationPeriod
+ @see AVToolButtonAddAnimationIcon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVToolButtonIsAnimationRunning, (AVToolButton button))
+
+/**
+ Sets the period in seconds of how often to flip the tool button animation icons.
+ @param button An AVToolbutton whose animation period list is being modified.
+ @param newPeriod An ASInt32 period in seconds for this tool button.
+ @see AVToolButtonGetAnimationIconCount
+ @see AVToolButtonStartAnimation
+ @see AVToolButtonRemoveAnimationIcons
+ @see AVToolButtonStopAnimation
+ @see AVToolButtonIsAnimationRunning
+ @see AVToolButtonGetAnimationPeriod
+ @see AVToolButtonAddAnimationIcon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonSetAnimationPeriod, (AVToolButton button, ASInt32 newPeriod))
+
+/**
+ Gets the period in seconds of how often to flip the tool button animation icons.
+ @param button An AVToolbutton whose animation period list is being examined.
+ @return An ASInt32 representing the period in seconds for this tool button.
+ @see AVToolButtonGetAnimationIconCount
+ @see AVToolButtonStartAnimation
+ @see AVToolButtonRemoveAnimationIcons
+ @see AVToolButtonStopAnimation
+ @see AVToolButtonIsAnimationRunning
+ @see AVToolButtonSetAnimationPeriod
+ @see AVToolButtonAddAnimationIcon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, AVToolButtonGetAnimationPeriod, (AVToolButton button))
+
+/**
+ Removes all icons from the tool button animation list.
+ @param button An AVToolbutton that will have its animation icon list cleared.
+ @see AVToolButtonGetAnimationIconCount
+ @see AVToolButtonStartAnimation
+ @see AVToolButtonStopAnimation
+ @see AVToolButtonIsAnimationRunning
+ @see AVToolButtonSetAnimationPeriod
+ @see AVToolButtonGetAnimationPeriod
+ @see AVToolButtonAddAnimationIcon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonRemoveAnimationIcons, (AVToolButton button))
+
+#if HAS_MENUS
+
+/**
+ Creates and acquires a new menu with the given title and
+ language-independent name. The menu can be added to the
+ menu bar using AVMenubarAddMenu(). When you are done using
+ the menu, release it using AVMenuRelease().
+ @param title A constant text object containing the string
+ that appears in the user interface. On Windows, an ampersand
+ (<code>&</code>) character in the string results in underlining the character
+ after it on the menu.
+ @param name A language-independent name of the menu to create:
+ it is the value returned by AVMenuGetName(). It must not contain
+ any spaces. Developers should prefix the names of menus
+ they add with the name of their client and a colon, to avoid
+ collisions in the menu name space. For example, a client
+ named <code>myPlug</code> might add menus named <code>myPlug:DrawTools</code> and
+ <code>myPlug:Checkout</code>.
+ @param owner The gExtensionID extension registering the
+ menu.
+ @return The newly created menu.
+ @exception genErrNoMemory
+ @see AVMenuRelease
+ @see AVMenubarAddMenu
+ @see AVMenuGetName
+ @see AVMenuGetTitleAsASText
+ @see AVMenuNew
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVMenu, AVMenuNewWithASText, (ASConstText title, const char *name, ASExtension owner))
+
+/**
+ Gets the menu's title as it appears in the user interface,
+ as an ASText object.
+ @param menu The menu whose title is obtained.
+ @param title (Filled by the method) The text object containing
+ the title.
+ @see AVMenuGetName
+ @see AVMenuGetTitle
+ @see AVMenuNewWithASText
+ @see AVMenuItemGetTitleAsASText
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVMenuGetTitleAsASText, (AVMenu menu, ASText title))
+
+/**
+ Creates and acquires a new AVMenuItem. The menu item can
+ be added to a menu using AVMenuAddMenuItem().
+
+ <p>Release the AVMenuItem using AVMenuItemRelease() after it
+ has been added to a menu. </p>
+ @param title A constant text object containing the string
+ shown in the user interface for this menu item. Use a hyphen
+ to create a separator menu item. This value is also returned
+ by AVMenuItemGetTitleAsASText(). On Windows, an ampersand
+ (<code>&</code>) character in the string results in underlining the character
+ after it on the menu item.
+ @param name The language-independent name of the menu
+ item to create. This is the value returned by AVMenuItemGetName().
+ <code>name</code> must not contain any spaces. Client developers should
+ prefix the names of menu items they add with the name of
+ their client and a colon, to avoid collisions in the menu
+ item name space. For example, a client named <code>myPlug</code> might
+ add menu items named m<code>yPlug:Scan</code> and <code>myPlug:Find</code>.
+ @param submenu The submenu (if any) for which this menu item
+ is the parent. Pass <code>NULL</code> if this menu item does not have
+ a submenu.
+ @param longMenusOnly (Ignored in Acrobat 3.0 or later)
+ If <code>true</code>, the menu item is visible only when the user selects
+ Full Menus. If <code>false</code>, the menu item is visible for both
+ Full Menus and Short Menus modes.
+ @param shortcut The key to use as a shortcut for the menu
+ item (an ASCII character). Use <code>NO_SHORTCUT</code> (see AVExpT.h)
+ if the menu item has no shortcut. The Acrobat viewer does
+ not check for conflicts between shortcuts. The consequences
+ of multiple menu items having the same shortcut is undefined.
+ On Windows, the shortcut is not displayed for any menu item
+ that also has an icon, although the shortcut will work.
+ @param flags Modifier keys, if any, used as part of the
+ shortcut. It must be an OR of the Modifier Keys values, except
+ that <code>AV_COMMAND</code> cannot be specified.
+ @param icon The icon to show in the menu item, or <code>NULL</code>
+ if no icon is shown. On Windows, <code>icon</code> is a 24x24 sample monochrome
+ <code>HBITMAP</code>.
+ @param owner The gExtensionID extension registering the
+ menu item.
+ @return The newly created menu item.
+ @see AVMenuAddMenuItem
+ @see AVMenuItemGetTitleAsASText
+ @see AVMenuItemRelease
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVMenuItem, AVMenuItemNewWithASText, (ASConstText title, const char *name, AVMenu submenu,
+ ASBool longMenusOnly, char shortcut, AVFlagBits16 flags, AVIcon icon, ASExtension owner))
+
+/**
+ Gets the menu item's title as it appears in the user interface,
+ as an ASText object.
+ @param menuItem The menu item whose title is obtained.
+
+ @param title (Filled by the method) The text object containing
+ the title.
+ @see AVMenuGetTitleAsASText
+ @see AVMenuItemSetTitleWithASText
+ @see AVMenuItemGetName
+ @see AVMenuItemGetTitle
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVMenuItemGetTitleAsASText, (AVMenuItem menuItem, ASText title))
+
+/**
+ Sets a menu item's title, which is the string that appears
+ in the user interface, from a constant text object. Use
+ this method to manage menu items whose titles change (such
+ as <code>'show/hide fooWindow'</code>), instead of inserting and removing
+ menu items on the fly.
+ @param menuItem The menu item whose title is set.
+ @param title The new menu title, as a constant text object.
+ @see AVMenuItemGetTitleAsASText
+ @see AVMenuItemGetName
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVMenuItemSetTitleWithASText, (AVMenuItem menuItem, ASConstText title))
+#else
+NOPROC(AVMenuNewWithASText)
+NOPROC(AVMenuGetTitleAsASText)
+NOPROC(AVMenuItemNewWithASText)
+NOPROC(AVMenuItemGetTitleAsASText)
+NOPROC(AVMenuItemSetTitleWithASText)
+#endif
+
+
+/**
+ Gets the title to display in the specified window's title
+ bar.
+ @param win The window whose title is obtained.
+ @param title (Filled by the method) The window title as
+ an ASText object.
+ @see AVWindowSetTitle
+ @note The parameters changed in number and type and the return type changed
+ in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowGetTitle, (AVWindow win, ASText title))
+
+/**
+ Sets the title to display in the specified window's title
+ bar. This method cannot be used to set the title of the
+ window in which the Acrobat viewer normally opens a PDF
+ file; it can only be used to set the title of an AVWindow
+ created by a client. To set the title of a window in which
+ the Acrobat viewer opens a PDF file, you must replace AVDocOpenFromASFileWithParams()
+ and pass the window title in <code>tempTitle</code>.
+ @param win The window whose title is set.
+ @param newTitle The title to set for <code>win</code>.
+ @exception genErrNoMemory
+ @see AVWindowGetTitle
+ @note The newTitle parameter type changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(void, AVWindowSetTitle, (AVWindow win, const ASText newTitle))
+
+/**
+ Opens and displays a document from a file. This is equivalent
+ to <code>AVDocOpenFromASFileWithParams(pathName, fileSys, tempTitle, NULL)</code>.
+ If you want to display a page from a PDF file as
+ a bitmap, use PDPageDrawContentsToWindow().
+ @param pathName The file to open.
+ @param fileSys The file system on which <code>pathName</code> resides.
+ You can obtain the default file system with ASGetDefaultFileSys().
+
+ @param tempTitle If <code>tempTitle != NULL</code>, <code>pathName</code> is a temporary
+ file, and <code>tempTitle</code> is used as the window's title.
+ @return The document that was opened. It returns <code>NULL</code> if the viewer
+ failed to open the document.
+ @notify AVDocWillOpenFromFile
+ @notify AVDocDidDeleteSelection
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+ @see AVDocClose
+
+ @note Do not open and then immediately close an AVDoc without
+ letting at least one event loop complete.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVDoc, AVDocOpenFromFile, (ASPathName pathName, ASFileSys fileSys, const ASText tempTitle))
+
+/**
+ Opens and returns an AVDoc view of pdDoc.
+ This method is equivalent to <code>AVDocOpenFromPDDocWithParams(pdDoc, tempTitle, NULL)</code>.
+ If you want to display a page from a PDF
+ file as a bitmap, use PDPageDrawContentsToWindow().
+
+ @param doc The document to open.
+ @param tempTitle If <code>tempTitle != NULL</code>, <code>pathname</code> is a temporary
+ file and <code>tempTitle</code> is used as the window's title.
+ @return <code>NULL</code> if failure occurs.
+ @exception genErrGeneral is raised if <code>doc</code> is <code>NULL</code> or has <code>0</code> pages.
+ @exception pdErrBadAction is raised if the document's open action is recursive.
+ @exception avErrCantOpenMoreThanTenDocs is raised if the maximum number of documents is already open.
+ @exception genErrNoMemory is raised if there is insufficient memory to open the document.
+ @notify AVAppFrontDocDidChange
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @notify AVDocWillPerformAction (broadcast if the document has a valid open action)
+ @notify AVDocDidPerformAction (broadcast if the document has a valid open action)
+ @see AVDocOpenFromPDDocWithParams
+ @see AVDocOpenFromPDDocWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocClose
+
+ @note Do not open and then immediately close an AVDoc without
+ letting at least one event loop complete.
+
+ @note AVDocClose() should be used in place of PDDocClose() after
+ AVDocOpenFromPDDoc() is called. AVDocClose() will decrement
+ the PDDoc appropriately and free document-related resources.
+ @since PI_ACROVIEW_VERSION >= 0x00020000
+*/
+NPROC(AVDoc, AVDocOpenFromPDDoc, (PDDoc doc, const ASText tempTitle))
+
+
+/**
+ Parses a path name to obtain the base file name and extension
+ for a particular file. The function enumerates all registered
+ <code>convertToPDF</code> and <code>convertFromPDF</code> handlers to find a matching
+ extension for the file passed in. This function allocates
+ memory for the file name and extension. It is the caller's
+ responsibility to free the memory allocated by the method.
+ @param fileSys The file system from which the path was obtained.
+ Pass <code>NULL</code> to use the default file system.
+ @param pathName The path containing the file name.
+ @param fileName The file name as a constant text object.
+
+ @param numAddExt The number of additional extensions to
+ search through.
+ @param addExt An array of <code>NULL</code>-terminated strings with
+ extensions to search through.
+ @param baseName (Allocated and filled by the method) A
+ buffer containing the file name. It can be <code>NULL</code> if you do not
+ want the base file name.
+ @param baseExt (Allocated and filled by the method) A
+ buffer containing the file extension. It can be <code>NULL</code> if you
+ do not want the base file extension.
+ @return <code>true</code> if the file info was successfully extracted from the path,
+ <code>false</code> otherwise.
+
+ @note This method extends AVUtilGetBaseNameAndExtensionByPathName()
+ in Acrobat 6.0 and later to use constant types and a text-object file
+ name.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVUtilGetBaseNameAndExtensionEx, (const ASFileSys fileSys, const ASPathName pathName, const ASText fileName, ASInt32 numAddExt, const char * const *addExt, ASText baseName, char **baseExt))
+
+
+/**
+ Obtains the path name for a file in a special folder. It
+ is the caller's responsibility to release the ASPathName.
+ This method may be used even if the associated file does
+ not exist.
+ @param cat The folder category. See AVSpecialCategory.
+ Only certain combinations of category/folder are allowed; see
+ AVSpecialError.
+ @param fld The folder in which the file is located. See
+ AVSpecialFolder. Only certain combinations of category/folder
+ are allowed; see AVSpecialError.
+ @param fileName A text object containing the name of the file
+ (including the extension) that you want to access.
+ @param asfs OUT The file system through which the path name was obtained.
+ @param asp OUT The ASPathName associated with the file. The caller must release it.
+ @return One of the AVSpecialError status codes. The <code>asfs</code> and
+ <code>asp</code> variables will only be valid if the method returns
+ kAVSEOkay or kAVSEDoesntExist. kAVSEDoesntExist is returned
+ if the ASPathName was created but the associated file does not
+ exist.
+ @see AVAcquireSpecialFilePathName
+ @see AVAcquireSpecialFolderPathName
+
+ @note This method supersedes AVAcquireSpecialFilePathName() in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASErrorCode, AVAcquireSpecialFilePathNameWithASText, (AVSpecialCategory cat, /* Category (see AVExpT.h) */
+ AVSpecialFolder fld, /* Folder (see AVExpT.h) */
+ const ASText fileName, /* File you want to access (e.g. AcroHelp.pdf). */
+ ASFileSys *asfs, /* Filled by this routine. */
+ ASPathName *asp)) /* Filled by this routine. Caller must release this ASPathName */
+
+/**
+ Displays a platform-dependent file open dialog box. It is the
+ caller's responsibility to release the returned ASPathName objects
+ and the associated memory.
+ @ingroup ReplaceableMethods
+ @param dialogParams Standard parameters for Open/Save/ChooseFolder
+ dialog boxes.
+ @param outFileSys (Filled by the method) The file system
+ through which the contents of the path names were opened. It may
+ be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed
+ in <code>dialogParams</code>.
+ @param outASPathNames (Allocated and filled by the method)
+ The ASPathName object(s) associated with the file(s) selected by
+ the user. The caller must free the list of filled-in ASPathName objects
+ using the supplied ASFileSys.
+ @param outNumASPathNames (Filled by the method, may be <code>NULL</code>)
+ The number of ASPathName objects in the <code>outASPathNames</code> array. It may be <code>NULL</code>
+ if kAVOpenSaveAllowMultiple is not set.
+ @param ioChosenFilterIndex (Filled by the method, may
+ be <code>NULL</code>) The index of the filter chosen by the user to select
+ the file(s). It may be <code>NULL</code> if the caller does not care which filter
+ was chosen, or <code>-1</code> for <code>'All Files'</code>.
+ @return <code>true</code> if the user clicked Action to confirm the selection,
+ <code>false</code> if the user clicked Cancel or some error occurred.
+ @see AVAppChooseFolderDialog
+ @see AVAppSaveDialog
+ @note The numeric parameter types changed in 0x00060000.
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+PROC(ASBool, AVAppOpenDialog, (AVOpenSaveDialogParams dialogParams, /* Standard dialog params for Open/Save/ChooseFolder dialogs */
+ ASFileSys *outFileSys, /* May be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed in dialogParams */
+ ASPathName **outASPathNames, /* Caller must ASfree this array and release its ASPathName elements */
+ AVArraySize *outNumASPathNames, /* Number of ASPathNames in outASPathNames array. It may be <code>NULL</code> if kAVOpenSaveAllowMultiple is not set */
+ AVFilterIndex *ioChosenFilterIndex)) /* May be <code>NULL</code> if caller doesn't care which filter was chosen, -1 if 'All Files'.
+ ** Specify the initially selected filter with the value passed in. If <code>NULL</code>, 1st entry is selected. */
+ /* Returns <code>true</code> if user clicked 'action' button, <code>false</code> if user clicked 'cancel' */
+
+/**
+ Displays a platform-dependent file save dialog box. It is the
+ caller's responsibility to release the returned ASPathName.
+
+ @ingroup ReplaceableMethods
+ @param dialogParams Standard dialog box parameters for Open/Save/ChooseFolder
+ dialog boxes.
+ @param outFileSys (Filled by the method, may be <code>NULL</code>)
+ The file system through which the path name was obtained. It may
+ be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed
+ in <code>dialogParams</code>.
+ @param outASPathName (Filled by the method) The ASPathName
+ associated with the file selected by the user. The caller
+ must free the filled in ASPathName using the supplied ASFileSys.
+
+ @param ioChosenFilterIndex (Filled by the method, may
+ be <code>NULL</code>) The index of the filter chosen by the user to select
+ the file. It may be <code>NULL</code> if caller does not care which filter
+ was chosen, <code>-1</code> for <code>'All Files'</code>.
+ @return <code>true</code> if the user confirmed the selection, <code>false</code> if the user
+ clicked Cancel or some error occurred.
+ @see AVAppOpenDialog
+ @see AVAppChooseFolderDialog
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+PROC(ASBool, AVAppSaveDialog, (AVOpenSaveDialogParams dialogParams, /* Standard dialog params for Open/Save/ChooseFolder dialogs */
+ ASFileSys *outFileSys, /* May be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed in dialogParams */
+ ASPathName *outASPathName, /* Caller must release this ASPathName */
+ AVFilterIndex *ioChosenFilterIndex)) /* May be <code>NULL</code> if caller doesn't care which filter was chosen, -1 if 'All Files'.
+ ** Specify the initially selected filter with the value passed in. If <code>NULL</code>, 1st entry is selected. */
+ /* Returns <code>true</code> if user clicked 'action' button, <code>false</code> if user clicked 'cancel' */
+
+/**
+ Displays a platform dependent folder selection dialog box. <code>outFileSys</code>
+ and <code>outASPathName</code> will be <code>NULL</code> if the user cancelled the operation.
+
+ <p>It is the caller's responsibility to release the returned
+ ASPathName. </p>
+ @ingroup ReplaceableMethods
+ @param dialogParams Standard dialog parameters for the
+ Open/Save/ChooseFolder dialog boxes.
+ @param outFileSys (Filled by the method, may be <code>NULL</code>)
+ The file system through which the path name was obtained. It may
+ be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed
+ in dialogParams.
+ @param outASPathName (Filled by the method) The ASPathName
+ associated with the folder chosen by the user.
+ @return <code>true</code> if the user confirmed the selection, <code>false</code>
+ if the user clicked Cancel or some error occurred.
+ @see AVAppOpenDialog
+ @see AVAppSaveDialog
+ @since PI_ACROVIEW_VERSION >= 0x00050000
+*/
+PROC(ASBool, AVAppChooseFolderDialog, (AVOpenSaveDialogParams dialogParams, /* Standard dialog params for Open/Save/ChooseFolder dialogs. It may be <code>NULL</code> */
+ ASFileSys *outFileSys, /* May be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed in dialogParams */
+ ASPathName *outASPathName)) /* Caller must release this ASPathName */
+ /* Returns <code>true</code> if user clicked 'action' button, <code>false</code> if user clicked 'cancel' */
+
+
+/**
+ Sets the set of inks to be displayed in a separations preview
+ for a page view. The ink preview must be turned on for this
+ method to have an effect.
+ @param pageView The page view whose number of visible
+ inks is obtained.
+ @param nInks The size of the inks array. The maximum number
+ of inks is <code>16</code>.
+ @param inks An array of the new visible inks for the page.
+ It copies the inks into local storage, so the caller does not
+ need to keep the array.
+ @see AVPageViewGetNumVisibleInks
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewSetInkPreview
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+UNPROC(void, AVPageViewSetVisibleInks, (AVPageView pageView, ASInt32 nInks, PDPageInkRec *inks))
+
+/**
+ Sets or clears the ink preview value for a page view, which
+ allows you to disable the rendering of individual inks.
+ This does not change the set of visible inks. Enabling ink
+ preview also enables overprint preview (OPP).
+ @param pageView The page view whose number of visible
+ inks is obtained.
+ @param inkPreview Indicates whether the page view has an ink preview.
+ @see AVPageViewGetNumVisibleInks
+ @see AVPageViewGetPixelInformationAtPoint
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewSetVisibleInks
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+UNPROC(void, AVPageViewSetInkPreview, (AVPageView pageView, ASBool inkPreview))
+
+/**
+ Gets the number of inks (color separations) that are displayed
+ for a page view. An ink, in this context, means the content
+ that will appear on a single plate when the page is separated.
+ For example, a DeviceCMYK color is four inks, and a separation
+ color space is usually one ink.
+ @param pageView The page view whose number of visible
+ inks is obtained.
+ @return The number of visible inks.
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewSetInkPreview
+ @see AVPageViewSetVisibleInks
+ @see PDPageEnumInks
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+UNPROC(ASInt32, AVPageViewGetNumVisibleInks, (AVPageView pageView))
+
+/**
+ Gets the set of inks to be displayed in a separations preview
+ for a page view.
+ @param pageView The page view whose number of visible
+ inks is obtained.
+ @param inks (Filled by the method) A pointer to an array
+ of structures containing the visible ink names for the page.
+ The vector must be large enough to hold the visible inks.
+ @see AVPageViewGetNumVisibleInks
+ @see AVPageViewSetInkPreview
+ @see AVPageViewSetVisibleInks
+ @see PDPageEnumInks
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+UNPROC(void, AVPageViewGetVisibleInks, (AVPageView pageView, PDPageInkRec *inks))
+
+/**
+ Gets the color separation ink information for pixels at
+ the cursor position in the specified page view. Ink previews
+ must be turned on before calling this method.
+ @param pageView The page view whose pixel information
+ is obtained.
+ @param x The horizontal cursor coordinate of the point,
+ as obtained by the AVPageViewCursorProc() callback.
+ @param y The vertical cursor coordinate of the point,
+ as obtained by the AVPageViewCursorProc() callback.
+ @param inkVector (Filled by the method) An array of ink
+ values for the specified point.
+ @param inkVectorLength (Filled by the method) The size
+ of the <code>inkVector</code> array.
+ @return <code>true</code> if the information is successfully retrieved, <code>false</code>
+ otherwise.
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewSetInkPreview
+ @see PDPageEnumInks
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+UNPROC(ASBool, AVPageViewGetPixelInformationAtPoint, (AVPageView pageView, AVDevCoord x, AVDevCoord y, AVInkValue *inkVector, ASUns32 *inkVectorLength))
+
+
+
+
+/**
+ Creates a new AVUndo record for a document's undo list.
+
+ @param doc The document whose undo list contains this
+ undo record.
+ @param handler The handler structure containing callbacks
+ that perform the undo and redo operations.
+ @param undoData Any private data needed by the handler
+ callbacks.
+ @return The new AVUndo object.
+ @see AVUndoGetAVDoc
+ @see AVUndoGetData
+ @see AVUndoGetType
+ @see AVUndoSetData
+ @see AVDocBeginUndoOperation
+ @see AVDocClearUndos
+ @see AVDocEndUndoOperation
+ @see AVDocGetTopUndo
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVUndo, AVUndoNew, (AVDoc doc, AVUndoHandler handler, AVUndoHandlerData undoData))
+
+
+/**
+ Sets or replaces the client-defined private data for the
+ undo record. The handler data can be accessed by any of
+ the callbacks listed in the AVUndoHandler.
+ @param undo The undo record whose handler data is set.
+ @param handlerData The client-defined private data to be set in the undo record.
+ @see AVUndoNew
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVUndoSetData, (AVUndo undo, AVUndoHandlerData handlerData))
+
+
+/**
+ Gets the client-defined private data for the undo record,
+ as specified upon creation. The handler data can be accessed
+ by any of the callbacks listed in the AVUndoHandler.
+ @param undo The undo record whose handler data is obtained.
+ @return The handler data.
+ @see AVUndoNew
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVUndoHandlerData, AVUndoGetData, (AVUndo undo))
+
+
+/**
+ Gets the document whose undo list contains the undo record.
+
+ @param undo The undo record whose document is obtained.
+ @return The AVDoc object.
+ @see AVDocBeginUndoOperation
+ @see AVDocClearUndos
+ @see AVDocEndUndoOperation
+ @see AVDocGetTopUndo
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVDoc, AVUndoGetAVDoc, (AVUndo undo))
+
+
+/**
+ Gets the type of the undo record, as specified in the AVUndoHandler.
+ The type is a client-defined string that can be matched
+ for retrieval by AVDocGetTopUndo().
+ @param undo The undo record whose type is obtained.
+ @return The client-defined type string for the undo record.
+ @see AVUndoNew
+ @see AVDocGetTopUndo
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(const char *, AVUndoGetType, (AVUndo undo))
+
+
+/**
+ Clears the entire undo list for the AVDoc and releases all
+ associated AVUndo objects.
+ @param doc The document whose undo list is cleared.
+ @return None.
+ @see AVUndoNew
+ @see AVUndoReleaseProc
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVDocClearUndos, (AVDoc doc))
+
+
+/**
+ Returns the most recent AVUndo record in the document's
+ undo list, if it of the desired type.
+ @param doc The document.
+ @param desiredType The type of the desired undo record.
+
+ @return The undo record object, or <code>NULL</code> if the undo list is empty
+ or if the type of the most recent undo record does not match
+ <code>desiredType</code>.
+ @see AVDocBeginUndoOperation
+ @see AVDocClearUndos
+ @see AVDocGetTopUndoAndRedo
+ @see AVUndoGetType
+ @see AVUndoNew
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVUndo, AVDocGetTopUndo, (AVDoc doc, const char *desiredType))
+
+
+/**
+ Begins an undo group for the document. To create an undo
+ group, call this method, create each instance with its handler
+ and data, and call AVDocEndUndoOperation().
+
+ <p>All AVUndo objects that are added to a group are presented
+ in the user interface as a single undo operation. Undo groups that are
+ nested in other groups are considered part of the parent
+ group. </p>
+ @param doc The document whose undo group is started.
+ @see AVDocClearUndos
+ @see AVDocEndUndoOperation
+ @see AVDocGetTopUndo
+ @see AVUndoNew
+ @see AVUndoBeginEndProc
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVDocBeginUndoOperation, (AVDoc doc))
+
+
+/**
+ Ends an undo group for the document. To create an undo group,
+ call AVDocBeginUndoOperation(), create each instance with
+ its handler and data, and call this method.
+ @param doc The document whose undo group is ended.
+ @param undoTitle The title to be used as the <code>"Undo"</code> string
+ in the user interface.
+ @param redoTitle The title to be used as the <code>"Redo"</code> string
+ in the user interface.
+ @see AVDocBeginUndoOperation
+ @see AVDocClearUndos
+ @see AVDocGetTopUndo
+ @see AVUndoNew
+ @see AVUndoBeginEndProc
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVDocEndUndoOperation, (AVDoc doc, const ASText undoTitle, const ASText redoTitle))
+
+
+/**
+ Forces any pending updates for the specified page view to
+ finish drawing, using the specified transition effect.
+ @param pageView The AVPageView to redraw.
+ @param trans The transition to use.
+ @see AVPageViewDrawNow
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVPageViewDrawNowWithTransition, (AVPageView pageView, PDTrans trans))
+
+/* AVDocPrintSeparations does nothing for Adobe Reader and non-Pro configurations */
+
+/**
+ Prints document color separations using the supplied parameters.
+ Printing is complete when this method returns.
+
+ <p>For Adobe Reader and Acrobat Standard, this method
+ does nothing.</p>
+
+ @note If security has been set on a file so that it is not
+ printable, the document will not print, but no error is
+ raised. Check the security before printing the file.
+ @param params A structure containing print separation
+ parameters. This structure includes the document object.
+ @see PDPageMakeSeparations
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVDocPrintSeparations, (AVDocPrintSepsParams params))
+
+/**
+ Fills out the given view definition with the information
+ needed to restore this document's state at a later date.
+ If you pass an empty ASCab, the method fills it with all
+ of the view information. Otherwise, it fills only those
+ fields that are present in the ASCab.
+
+ <p>The ASCab can contain the same fields defined for AVDocViewDef,
+ plus an additional field, <code>ocgStates</code>, which is an ASCab containing
+ a set of optional content states. </p>
+ @param doc The document whose state is recorded.
+ @param viewDef A pointer to the ASCab that stores the
+ state.
+ @see AVDocGetViewDef
+ @see AVDocSetViewDefEx
+
+ @note Supersedes AVDocGetViewDef() in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVDocGetViewDefEx, (AVDoc doc, ASCab viewDef))
+
+/**
+ Sets the document's state to match the information in <code>viewDef</code>.
+ @param doc The document whose state is updated.
+ @param viewDef A pointer to the ASCab that stores the
+ state.
+ @see AVDocGetViewDefEx
+ @see AVDocSetViewDef
+
+ NOTE: Supersedes AVDocGetViewDef() in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+SPROC(void, AVDocSetViewDefEx, (AVDoc doc, ASCab viewDef), AVDocUseViewDefEx)
+
+/**
+ Makes the specified window modal, so that no other window
+ can take the keyboard focus when this window is active.
+
+ @param window The window to make modal.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see AVWindowEndModal
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVWindowDoModal, (AVWindow window))
+
+/**
+ Stops the specified window from being modal, so that other
+ windows can take the keyboard focus when this window is
+ active.
+ @param window The window to stop from being modal.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see AVWindowDoModal
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVWindowEndModal, (AVWindow window))
+
+
+/**
+ Gets the value of the <code>UsePenForInput</code> user preference attribute (currently unused).
+ @return Currently, always <code>true</code>.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVSysGetUsePenForInput, (void))
+
+/* AVPageViewSnapPointEx is the same as AVPageViewSnapPoint, but uses page space
+ * coordinates. This is more accurate and generally preferred to AVPageViewSnapPoint
+ * when working with page elements. */
+
+/**
+ <p>Snaps a point to the layout grid if the <code>avpSnapToGrid</code> preference
+ is set, using page-space coordinates. </p>
+
+ @param pageView The page view.
+ @param pt (Filled by the method) The point that will be
+ snapped to the grid, specified in page space.
+ @param direction An AVDragType indicating how the point
+ is to be translated. Not all AVDragType values are allowed; only
+ the following AVDragType values are used:
+
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>AVDragType</TH><TH>Description</TH></TR>
+ <TR><TD>kAVDragRect</TD><TD>Snap to the nearest grid intersection.</TD></TR>
+ <TR><TD>kAVDragSnapToTopLeft</TD><TD>Snap to the nearest grid intersection in the top left direction.</TD></TR>
+ <TR><TD>kAVDragSnapToTop</TD><TD>Snap to the nearest grid line above this point; <code>pt->h</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToTopRight</TD><TD>Snap to the nearest grid intersection in the top right direction.</TD></TR>
+ <TR><TD>kAVDragSnapToRight</TD><TD>Snap to the nearest grid line right of this point; <code>pt->v</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToBottomRight</TD><TD>Snap to the nearest grid intersection in the bottom right direction.</TD></TR>
+ <TR><TD>kAVDragSnapToBottom</TD><TD>Snap to the nearest grid line below this point; <code>pt->h</code> is unchanged.</TD></TR>
+ <TR><TD>kAVDragSnapToBottomLeft</TD><TD>Snap to the nearest grid intersection in the bottom left direction.</TD></TR>
+ <TR><TD>kAVDragSnapToLeft</TD><TD>Snap to the nearest grid line left of this point; <code>pt->v</code> is unchanged.</TD></TR>
+ </TABLE>
+
+ @see AVPageViewDragRectSnappedEx
+ @see AVPageViewSnapPoint
+
+ @note This method supersedes AVPageViewSnapPoint() in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVPageViewSnapPointEx, (AVPageView pageView, ASFixedPoint *pt, AVDragType direction))
+
+/* AVPageViewDragRectSnappedEx should be used in place of AVPageViewDragRectSnapped
+** when page-level accuracy is important and/or the client would like to implement
+** their own draw proc during the drag loop. */
+
+/**
+ <p>Allows the user to move or resize an existing rectangle.
+ This version of the method allows you to specify your own
+ drawing procedure.</p>
+
+ @param params The parameters with which to perform the
+ drag operation. These include the page view object.
+ @return A bit-wise OR of the Modifier Keys that were in effect when
+ the mouse button was released.
+ @see AVPageViewDragRectSnapped
+ @see AVPageViewSnapPointEx
+ @see AVSysGetModifiers
+
+ @note Supersedes AVPageViewDragRectSnapped() in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+XNPROC(AVTFlagBits, AVPageViewDragRectSnappedEx, (const AVDragRectParamsRec *params))
+
+
+/**
+ Sets the AVComputeTooltipProc() associated with a toolbar
+ button. This routine determines the text displayed in the
+ mega-tooltip.
+ @param button IN/OUT The button whose AVComputeTooltipProc() is
+ set.
+ @param proc IN/OUT A user-supplied procedure to call whenever the
+ Acrobat viewer needs to know what mega-tooltip to display.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonSetComputeTooltipProc, (AVToolButton button,
+ AVComputeTooltipProc proc, void* clientData))
+
+/* For setting the button label text. */
+
+/**
+ Sets the label text associated with the specified AVToolButton
+ and its priority value. The priority determines the preference
+ order in which labels are shown when a toolbar is too short
+ to hold all of the button labels. If the priority is less
+ than kAVButtonPriorityOnExtraLow, the label text is not shown
+ at all unless the user forces all labels to be shown using
+ the General preference panel.
+ @param button The button whose label text is obtained.
+ @param labelText The label text.
+ @param priority The label text's priority value.
+ @see AVToolButtonGetLabelText
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonSetLabelText, (AVToolButton button, ASConstText labelText,
+ AVToolButtonLabelPriority priority))
+
+/**
+ Gets the label text associated with the specified AVToolButton
+ and its priority value. The priority determines the preference
+ order in which labels are shown when a toolbar is too short
+ to hold all of the button labels. If the priority is less
+ than kAVButtonPriorityOnExtraLow, the label text is not shown
+ at all unless the user forces all labels to be shown using
+ the General preferences panel.
+ @param button The button whose label text is obtained.
+
+ @param resultText (Filled by the method) The label text.
+
+ @param priority (Filled by the method) The label text's
+ priority value.
+ @return <code>true</code> if the label text string and priority are successfully
+ obtained, <code>false</code> otherwise.
+ @see AVToolButtonSetLabelText
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVToolButtonGetLabelText, (AVToolButton button, ASText resultText,
+ AVToolButtonLabelPriority *priority))
+
+/* Simply clones an AVMenuItem */
+
+/**
+ Creates a new menu item object using an existing menu item
+ as a template. If the menu item contains a submenu, that
+ submenu is also copied.
+ @param menuItem The menu item to copy.
+ @return The new menu item object.
+ @see AVMenuItemNew
+ @see AVMenuItemNewWithASText
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVMenuItem, AVMenuItemClone, (AVMenuItem menuItem))
+
+
+/**
+ Retrieves the language in which the application's user interface
+ is running, in the format specified by the <code>kLangFormat</code> member
+ of the supplied parameter structure.
+ @param params (Filled by the method) On input, it contains
+ the desired language format. On return, it contains the language
+ string in the given format.
+ @return <code>true</code> if the language string was retrieved, otherwise <code>false</code>.
+
+ @see AVAppGetLanguage
+ @see AVAppGetVersion
+
+ @note Supersedes AVAppGetLanguage() in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVAppGetLanguageWithParams, (AVAppLanguageParams params))
+
+
+/**
+ Creates an icon bundle object from an array of icon data
+ records.
+ @param eDataFormat The data format for the icons in the
+ new icon bundle.
+ @param dataRecs An array of icon data records for the
+ new icon bundle.
+ @param numRecs The number of records in <code>dataRecs</code>.
+ @return The new icon bundle object.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVIconBundle6, AVAppCreateIconBundle6, (AVIconDataFormat eDataFormat, AVIconDataRec *dataRecs, ASCount numRecs))
+
+
+/**
+ Sets the AVNotifyTooltipProc() associated with a toolbar button.
+ This routine is called before text is displayed in the tooltip.
+
+ @param button The toolbar button whose tooltip procedure
+ is set.
+ @param proc A user-supplied procedure to call when the Acrobat
+ viewer needs to display tooltip text, as when the cursor
+ moves over the button.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonSetNotifyTooltipProc, (AVToolButton button,
+ AVNotifyTooltipProc proc, void* clientData))
+
+
+/**
+ Fills a rectangle structure with the left, top, right, and
+ bottom distances between the inner window rectangle (the frame
+ rectangle) and the outer window rectangle. These distances include
+ borders, title bars, and so on.
+ @param win The window whose border width is obtained.
+
+ @param rect (Filled by the method) A pointer to a rectangle
+ structure in which to return the window's border width rectangle,
+ specified in global screen coordinates.
+ @see AVWindowGetFrame
+ @see AVWindowGetInterior
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVWindowGetBorderWidths, (AVWindow win, AVRect *rect))
+
+
+/**
+ Draws a polygon, filled with the color most recently set
+ using AVPageViewSetColor(), or inverted.
+ @param pageView The page view in which the polygon is
+ drawn.
+ @param x The list of x-coordinates for the vertices of
+ the polygon.
+ @param y The list of y-coordinates for the vertices of
+ the polygon.
+ @param numPoints The number of vertices in the polygon.
+
+ @param invert When <code>true</code>, it inverts the polygon instead of
+ filling it with the set color.
+ @see AVPageViewDrawPolygonOutline
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVPageViewDrawPolygon, (AVPageView pageView, AVDevCoord* x, AVDevCoord* y, ASCount numPoints, ASBool invert))
+
+
+/**
+ Draws a stroked (not filled) or inverted polygon, using
+ the color most recently set using AVPageViewSetColor().
+ @param pageView The page view in which the polygon is
+ drawn.
+ @param x The list of x-coordinates for the vertices of
+ the polygon.
+ @param y The list of y-coordinates for the vertices of
+ the polygon.
+ @param numPoints The number of vertices in the polygon.
+
+ @param invert When <code>true</code>, it inverts the polygon instead of
+ stroking it with the set color.
+ @see AVPageViewDrawPolygon
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVPageViewDrawPolygonOutline, (AVPageView pageView, AVDevCoord* x, AVDevCoord* y, ASCount numPoints, ASBool invert))
+
+
+/**
+ Registers a HowTo panel with the application.
+ @param panelName The internal language-independent name
+ of the HowTo panel to register.
+ @param panelURL The file name for the XML/HTML content,
+ specified as a device-independent path (see PDFileSpecGetDIPath()). The path
+ is relative to <code>urlDirectory</code> if supplied; otherwise it is
+ relative to the application's localized HowTo folder.
+ @param panelIcon The icon to show in the upper-left corner
+ of the panel.
+ @param panelTitle The text to display in the panel's title.
+ The viewer make a copy of this text.
+ @param showInHomepage <code>true</code> to show the title on the HowTo
+ panel's home page, <code>false</code> otherwise. To hide or show the
+ title dynamically (for example, based on the contents of the current
+ document) use a compute-visible callback. See
+ AVAppSetHowToPanelComputeVisibleProc().
+ @param urlDirectory The directory where the <code>panelURL</code> and
+ other XML/HTML pages are located, specified as a device-independent path,
+ or <code>NULL</code> for the default location (the application's localized
+ HowTo folder).
+ @param sortKey A key by which to order items on the HowTo
+ panel's home page.
+ @see AVAppAutoShowHowToPanel
+ @see AVAppGetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShowText
+ @see AVAppSetHowToPanelComputeVisibleProc
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVAppRegisterHowToPanel, (ASAtom panelName, const char *panelURL,
+ AVIcon panelIcon, ASConstText panelTitle,
+ ASBool showInHomepage, ASPathName urlDirectory,
+ ASUns32 sortKey))
+
+
+/**
+ When the auto-show state of a HowTo panel is <code>true</code>, the panel
+ is shown whenever when the client calls AVAppAutoShowHowToPanel().
+ To give users the option of suppressing the auto-show behavior,
+ use this method to register some text, which appears in
+ a checkbox at the bottom of the panel. If the user clears
+ the checkbox, use AVAppSetHowToPanelAutoShow() to suppress
+ the auto-show behavior for the panel.
+ @param panelName The internal language-independent name
+ of the HowTo panel whose auto-show suppression text is set.
+
+ @param checkBoxText The text to display in the auto-show
+ suppression check box at the bottom of the HowTo panel.
+ The view copies this text. The string should be of the form
+ <code>"Show XXXX when XXX"</code>. For example, it could be <code>"Show home page at startup"</code>.
+
+ @see AVAppAutoShowHowToPanel
+ @see AVAppGetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShow
+ @see AVAppSetHowToPanelComputeVisibleProc
+ @see AVAppRegisterHowToPanel
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVAppSetHowToPanelAutoShowText, (ASAtom panelName, ASConstText checkBoxText))
+
+
+/**
+ Get the current auto-show state of a HowTo panel. The auto-show
+ state is <code>true</code> by default. When the auto-show state is <code>true</code>
+ for a specified panel, that panel is shown whenever the
+ client calls AVAppAutoShowHowToPanel() on it.
+ @param panelName The internal language-independent name
+ of the HowTo panel whose auto-show state is obtained.
+ @return <code>true</code> if the current auto-show state is ON, <code>false</code> otherwise.
+
+ @see AVAppAutoShowHowToPanel
+ @see AVAppSetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShowText
+ @see AVAppSetHowToPanelComputeVisibleProc
+ @see AVAppRegisterHowToPanel
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVAppGetHowToPanelAutoShow, (ASAtom panelName))
+
+
+/**
+ Set the current auto-show state of a HowTo panel. The auto-show
+ state is <code>true</code> by default. When the auto-show state is <code>true</code>,
+ the panel is shown whenever when the client calls AVAppAutoShowHowToPanel().
+ Set it to <code>false</code> to disable the client's auto-show behavior
+ for the panel. See AVAppSetHowToPanelAutoShowText().
+
+ @param panelName The internal language-independent name
+ of the HowTo panel whose auto-show state is set.
+ @param autoShow The new auto-show state, <code>true</code> or <code>false</code>.
+ @see AVAppAutoShowHowToPanel
+ @see AVAppGetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShowText
+ @see AVAppSetHowToPanelComputeVisibleProc
+ @see AVAppRegisterHowToPanel
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVAppSetHowToPanelAutoShow, (ASAtom panelName, ASBool autoShow))
+
+
+/**
+ Opens the HowTo panel and fills it with the specified panel's
+ content, if that panel's <code>AutoShow</code> attribute is <code>true</code>.
+
+ <p>The Acrobat application does not automatically show any
+ HowTo panel; it is up to a client to determine the conditions
+ under which to show the panel automatically. Clients should
+ allow the user to disable the auto-show behavior; use AVAppSetHowToPanelAutoShow()
+ to set the <code>AutoShow</code> attribute of a panel to <code>false</code>. </p>
+ @param avdoc The document for which to show the HowTo
+ panel, or <code>NULL</code> to display the application-wide HowTo panel
+ in the main application window. You must specify the document
+ if it is external to the application.
+ @param panelName The name of the HowTo panel to show.
+ @see AVAppGetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShowText
+ @see AVAppSetHowToPanelComputeVisibleProc
+ @see AVAppRegisterHowToPanel
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVAppAutoShowHowToPanel, (AVDoc avdoc, ASAtom panelName))
+
+/**
+ Sets the user-supplied procedure that determines whether
+ the menu item appears when its parent menu is opened. It does
+ nothing if <code>menuItem</code> is <code>NULL</code>.
+ @param menuItem The menu item whose visibility procedure
+ is set.
+ @param proc User-supplied procedure to call when the Acrobat
+ viewer needs to know if the menu item is visible.
+ @param data A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see AVMenuItemIsVisible
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVMenuItemSetComputeVisibleProc, (AVMenuItem menuItem, AVComputeVisibleProc proc,
+ void *data))
+
+/**
+ Tests whether the specified menu item is visible on its
+ parent menu. The visibility state is calculated using the
+ AVComputeVisibleProc().
+ @param menuItem The menu item whose visibility state is
+ tested.
+ @return <code>true</code> if <code>menuItem</code> is visible, or if <code>menuItem</code> has no AVComputeVisibleProc().
+ It returns <code>false</code> if the menu item is not visible, if its AVComputeVisibleProc()
+ raises an exception (this is not recommended), or if <code>menuItem</code>
+ is <code>NULL</code>.
+ @see AVMenuItemSetComputeVisibleProc
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVMenuItemIsVisible, (AVMenuItem menuItem))
+
+/**
+ Sets the AVComputeVisibleProc() associated with a toolbar
+ button. This routine determines whether the button is visible
+ when its parent toolbar is visible.
+ @param button The toolbar button whose visibility procedure
+ is set.
+ @param p A user-supplied procedure to call when the Acrobat
+ viewer needs to know if the button is visible.
+ @param data A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVToolButtonSetComputeVisibleProc, (AVToolButton button, AVComputeVisibleProc p, void *data))
+
+
+/**
+ Registers a new HowTo panel callback with the application.
+ This callback is executed at various times to determine
+ whether the panel's title will appear in the HowTo home
+ page. The title appears if and only if showInHomePage() was
+ set to <code>true</code> in the call to AVAppRegisterHowToPanel() and this
+ callback returns <code>true</code>.
+
+ <p>If this callback is not registered, the panel title appears
+ if <code>showInHomePage</code> was set to <code>true</code> in the call to AVAppRegisterHowToPanel().</p>
+
+ <p>Register this callback if you want the title to appear only
+ under certain conditions (for example, when the active document
+ has some special characteristics or attributes). </p>
+ @param panelName The internal, language-independent name
+ of the HowTo panel.
+ @param p The procedure to call to determine whether
+ the panel should appear on the HowTo home page.
+ @param data A pointer to data to pass to the procedure.
+ @see AVAppAutoShowHowToPanel
+ @see AVAppGetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShow
+ @see AVAppSetHowToPanelAutoShowText
+ @see AVAppRegisterHowToPanel
+*/
+NPROC(void, AVAppSetHowToPanelComputeVisibleProc, (ASAtom panelName, AVComputeVisibleProc p, void *data) )
+
+/**
+ Sets the position of the toolbar. A toolbar can have separate
+ positional attributes for internal and external views. The
+ position is set when the user first opens Acrobat; after
+ that, the user's preferences dictate where the toolbar is
+ located.
+ @param toolBarName The name of the toolbar. Refer to Toolbar
+ and Toolbar Button Names for a list of the standard named
+ toolbars.
+ @param external If <code>true</code>, the preferences are associated
+ with the external view.
+ @param position The structure defining the toolbar's attributes.
+ @see AVToolBarNew
+ @since PI_ACROVIEW_VERSION >= 0x000500000x00060000
+*/
+NPROC(void, AVAppRegisterToolBarPosition,(const char *toolBarName, ASBool external, AVToolBarPosition position))
+
+/**
+ Returns the most recent undo and redo records in the document's
+ undo list, if they are of the desired type.
+ @param doc The document.
+ @param undo (Filled by the method) A pointer to the latest
+ undo, or <code>NULL</code> if the undo list is empty or if the type of
+ the most recent undo record does not match <code>desiredType</code>.
+
+ @param redo (Filled by the method) A pointer to the latest
+ redo, or <code>NULL</code> if the redo list is empty or if the type of
+ the most recent redo record does not match <code>desiredType</code>.
+
+ @param desiredType The type of the desired undo record.
+
+ @see AVDocBeginUndoOperation
+ @see AVDocClearUndos
+ @see AVDocGetTopUndo
+ @see AVUndoGetType
+ @see AVUndoNew
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVDocGetTopUndoAndRedo, (AVDoc doc, AVUndo *undo, AVUndo *redo,const char *desiredType))
+
+/**
+ Registers a user-supplied procedure to call after a context
+ menu has been created but before it is shown to the user.
+ The callback can add menu items to or remove menu items
+ from the menu.
+ @param menuName The name of the context menu to modify. Its names can be one of the following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Name</TH><TH>Description</TH></TR>
+ <TR><TD><code>Page</code></TD><TD>The standard context menu for an AVPageView.</TD></TR>
+ <TR><TD><code>Select</code></TD><TD>The context menu for selected text. For both menus, the menu data is an AVDoc pointer.</TD></TR>
+ </TABLE>
+
+ @param proc The user-supplied procedure to call.
+ @param clientData A pointer to user-supplied data to pass
+ to the procedure each time it is called.
+ @exception genErrNoMemory
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVAppRegisterForContextMenuAddition, (ASAtom menuName, AVContextMenuAdditionProc proc, void *clientData))
+
+/**
+ Gets the point-to-pixel scaling factor that transforms page
+ units to device space units for the specified page view.
+ Although the method returns both x and y factors, these
+ are normally the same.
+ @param pageView The page view whose scaling is obtained.
+
+ @param xScale (Filled by the method) A pointer to the horizontal
+ scaling factor.
+ @param yScale (Filled by the method) A pointer to the vertical
+ scaling factor.
+ @see AVPageViewGetPageToDevMatrix
+ @see AVPageViewGetZoom
+
+ @note In previous releases, you could use the zoom factor
+ to tranform page units (in points) to device units (in pixels).
+ In Acrobat 6.0 and later, because a point is no longer assumed
+ to be the same as a pixel, this is no longer accurate. It
+ is recommended that you use the page-to-device matrix as
+ much as possible, and use this method if you specifically
+ need the point-to-pixel scaling factor.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVPageViewGetPageToDevScaling, (AVPageView pageView, float *xScale, float *yScale))
+
+/**
+ Gets the active tool for the AVDoc. The call provides the
+ additional context needed to retrieve the active tool for
+ documents that are displayed in external windows such as
+ a web browser.
+ @param doc The document whose active tool is obtained,
+ or <code>NULL</code> to get the active tool for the main application
+ window.
+ @return The active tool object.
+ @exception genErrNoMemory
+ @see AVAppGetActiveTool
+ @see AVAppGetDefaultTool
+ @see AVAppGetLastActiveTool
+ @see AVDocSetActiveTool
+
+ @note It is recommended that you use AVDocGetActiveTool()
+ rather than AVAppGetActiveTool(), preferably specifying a
+ particular document.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVTool, AVDocGetActiveTool, (AVDoc doc))
+
+/**
+ Sets the active tool for the AVDoc.
+ @param doc The document whose active tool is set, or
+ <code>NULL</code> to set the active tool for the application.
+ @param tool The new active tool.
+ @param persistent When <code>true</code>, the tool stays active after
+ it is used. It is passed to the tool's <code>Activate</code> callback.
+ @exception genErrNoMemory
+ @see AVDocGetActiveTool
+
+ @note It is recommended that you use AVDocSetActiveTool()
+ rather than AVAppSetActiveTool(), preferably specifying a
+ particular document.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(void, AVDocSetActiveTool, (AVDoc doc, AVTool tool, ASBool persistent))
+
+/**
+ Registers a user-supplied procedure to call each time a
+ user clicks the right mouse button in an AVPageView. On
+ Mac OS, the procedure is called when the user holds down
+ the Control key and clicks the mouse button.
+
+ <p>To unregister, you must use the same callback that was used
+ to register; you cannot use a newly created callback. To
+ accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and unregister; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param clickProc A user-supplied callback to call each time the
+ right mouse button is clicked.
+ @param data A pointer to user-supplied data to pass to <code>proc</code>
+ each time it is called.
+ @exception genErrNoMemory
+ @see AVAppUnregisterForPageViewClicks
+ @see AVAppUnregisterForPageViewRightClicks
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+SPROC(void, AVAppRegisterForPageViewRightClicks, (AVPageViewClickProc clickProc, void* data),
+ AVPageViewRegisterForRightClicks)
+
+/**
+ Un-registers a user-supplied procedure to call each time
+ a user clicks the right mouse button in an AVPageView.
+
+ <p>To un-register, you must use the same callback that was
+ used to register; you cannot use a newly created callback.
+ To accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and un-register; do not call ASCallbackCreateProto()
+ a second time when un-registering. </p>
+ @param clickProc The original callback.
+ @exception genErrNoMemory
+ @see AVAppRegisterForPageViewRightClicks
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+SPROC(void, AVAppUnregisterForPageViewRightClicks, (AVPageViewClickProc clickProc),
+ AVPageViewUnregisterForRightClicks)
+
+/**
+ Determines whether a given document is on a slow file system
+ (such as a web browser).
+ @param doc The document being investigated.
+ @return <code>true</code> if the given document is on a slow file system; <code>false</code>
+ otherwise.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVDocIsSlow, (AVDoc doc))
+
+/**
+ Gets the desktop boundary for the monitor on which the window
+ would appear if its frame was set to the specified frame.
+ This boundary describes in global coordinates the visible
+ area of the desktop (that is, without the menu bar, task
+ bar, docked toolbars, and so on).
+ @param win The window whose desktop bounds are obtained.
+
+ @param frame A pointer to a rectangle structure for a potential
+ window frame.
+ @param bounds (Filled by the method) A pointer to a structure
+ in which to return the window's desktop bounds rectangle,
+ specified in global screen coordinates.
+ @return <code>true</code> if successful, <code>false</code> if the method cannot provide the
+ information. In this case, the bounds are set to <code>(0,0,0,0)</code>.
+
+ @see AVWindowEnsureInBounds
+ @see AVWindowGetFrame
+ @see AVWindowGetInterior
+ @see AVWindowSetFrame
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(ASBool, AVWindowGetDesktopBounds, (AVWindow win, const AVRect *frame, AVRect *bounds))
+
+/**
+ Gets the server type for the specified document.
+ @param doc The document whose server type is obtained.
+ @return The server type value.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+NPROC(AVDocServerType, AVDocGetServerType, (AVDoc doc))
+
+/**
+ <p>Un-registers a user-supplied page view drawing procedure. </p>
+
+ <p>To unregister, you must use the same callback that was used
+ to register; you cannot use a newly created callback. To
+ accomplish this, call ASCallbackCreateProto() once before
+ registering and use the value returned from this call both
+ to register and unregister; do not call ASCallbackCreateProto()
+ a second time when unregistering. </p>
+
+ <p>You can register only one procedure; however, in version
+ 6.0, you can register it more than once, with a different
+ client data pointer in each case. You can then pass the
+ same <code>proc</code> and <code>clientData</code> pointer to this method to un-register
+ that particular combination. </p>
+ @param proc The original callback.
+ @param clientData A pointer to data to pass to the callback.
+ @see AVAppRegisterForPageViewDrawing
+
+ @note Supersedes AVAppUnregisterForPageViewDrawing() in Acrobat 6.0.
+ @since PI_ACROVIEW_VERSION >= 0x00060000
+*/
+SPROC(void, AVAppUnregisterForPageViewDrawingEx, (AVPageViewDrawProc proc, void *clientData),
+ AVPageViewUnregisterForDrawingEx)
+
+/**
+ Sets the wireframe mode for a page view.
+ @param pageView IN/OUT The page view whose wireframe mode is set.
+ @param drawWireframe IN/OUT The new wireframe mode for the page view.
+ @see AVPageViewGetWireframeDrawing
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC(void, AVPageViewSetWireframeDrawing, (AVPageView pageView, ASBool drawWireframe))
+
+/**
+ Gets the wireframe mode for a page view.
+ @param pageView IN The page view whose wireframe mode is obtained.
+
+ @return pageView's page wireframe mode.
+
+ @see AVPageViewSetWireframeDrawing
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC(ASBool, AVPageViewGetWireframeDrawing, (AVPageView pageView))
+
+/**
+ Returns whether the passed <code>key</code> should cause a selected item to be deleted.
+ This is required since the rules for which keys should delete objects differ among platforms.
+ @param key IN The keycode of the key to check.
+ @param flags IN The flags associated with the keydown.
+
+ @return Whether <code>key</code> should cause an object to be deleted.
+
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC(ASBool, AVAppShouldKeyDeleteObject, (AVKeyCode key, AVFlagBits16 flags))
+
+/**
+Registers a callback that will be called once, when Acrobat is first idle and
+not drawing during idle.
+@param lateInitProc IN The procedure to call.
+@param clientData IN A pointer to data to pass to the callback.
+@param delay IN An additional amount of time to wait before calling after the first idle (in ticks).
+
+@since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC(void, AVAppRegisterLateInitProc, (AVIdleProc lateInitProc, void *clientData, ASUns32 delay))
+
+/**
+ Gets the set of bookmarks for a given document that satisfies the input
+ filter. It is the client's responsibility to release the memory associated
+ with the bookmark array using ASfree().
+
+ @param avDoc IN The document containing the bookmarks
+ @param avBookmarkFilter The filter applied to the bookmarks. See the definition of
+ AVBookmarkFilter in AVExpT.h. The default is <code>0</code>.
+ @param pPDBookmarkArray OUT A pointer to an array for storing the bookmarks
+ If this parameter is <code>NULL</code>, it does not copy the PDBookmark associated
+ with the bookmarks. If this parameter is not <code>NULL</code>, a bookmark
+ array is allocated and assigned to this pointer. The bookmarks that satisfy
+ the filter are copied into this array.
+ @return The number of bookmarks copied into the array.
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC(ASInt32, AVDocGetBookmarks, (AVDoc avDoc, AVBookmarkFilter avBookmarkFilter, PDBookmark **pPDBookmarkArray))
+
+/**
+ Gets the tool that was active for this document
+ before the current tool became active.
+
+ @return The last active tool. If only one tool has ever been active, it is returned.
+ @see AVAppGetActiveTool
+ @see AVAppGetDefaultTool
+ @see AVDocGetActiveTool
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+
+*/
+NPROC(AVTool, AVDocGetLastActiveTool, (AVDoc avDoc))
+
+/**
+ Returns the number of windows currently open for
+ the document.
+
+ @param avDoc IN The document
+ @return The number of windows open for the document.
+ @see AVDocGetNthWindow
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC( ASCount, AVDocGetNumWindows, (AVDoc avDoc))
+
+/**
+ Gets the specified AVWindow for the specified document.
+ If the index is out of range, <code>NULL</code> is returned. The windows
+ are enumerated in no particular order. Specifically, the
+ window at index <code>0</code> is not guaranteed to be the active window.
+
+ @param avDoc The document whose AVWindow is obtained.
+ @param n The index of the window to obtain. The index
+ range is <code>0</code> to <code>(AVDocGetNumWindows()-1)</code>.
+ @return The document's nth AVWindow.
+ @see AVDocGetNumWindows
+ @see AVDocGetAVWindow
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC( AVWindow, AVDocGetNthWindow, (AVDoc avDoc, ASCount n))
+
+/**
+ Gets the AVWindow associated with this AVPageView.
+
+ <p>This routine may return <code>NULL</code> if the page view is
+ not associated with any document window.</p>
+
+ <p>The primary use of this API is to determine which
+ AVPageView objects returned by AVDocGetNthPageView() are
+ associated with the document's active window. To do
+ this, compare the return value of this method with
+ the return value of AVDocGetAVWindow().</p>
+
+ @param pageView The AVPageView whose AVWindow is obtained.
+ @return The page view's AVWindow.
+ @see AVDocGetNumPageViews
+ @see AVDocGetNthPageView
+ @see AVDocGetAVWindow
+ @since PI_ACROVIEW_VERSION >= 0x00070000
+*/
+NPROC( AVWindow, AVPageViewGetAVWindow, (AVPageView pageView))
+
+/**
+ Show the properties dialog box for the specified annotation.
+
+ @param doc The document containing the annotation.
+ @param pageNum The page number where the annotation is located.
+ @param annot The annotation.
+ @exception genErrBadParam is raised if the page number does not correspond to the page where the annotation is located.
+ @since PI_ACROVIEW_VERSION >= 0x00070000 */
+NPROC(void, AVDocDoAnnotProperties, (AVDoc doc, ASInt32 pageNum, PDAnnot annot))
+
+/**
+ Query the state of the mouse buttons in a manner
+ appropriate for click-drag operations. This is
+ similar to AVSysMouseStillDown(), but can be used to
+ query the state of the mouse even while it is up.
+
+ @param canceled Set to indicate whether the user cancelled the operation (for example, by pressing ESC). It can be <code>NULL</code>.
+ @param committed Set to indicate whether the use pressed Enter to commit the operation. It can be <code>NULL</code>.
+ @param removeEvents If <code>true</code>, mouse events will be discarded to prevent mouse button
+ change events from being sent after the drag operation is finished.
+ @return An integer indicates the current state of the mouse buttons:
+ <ul>
+ <li>Bit <code>0</code> will be set if the primary mouse button is down (this is normally the left button).</li>
+ <li>Bit <code>1</code> will be set if the secondary mouse button is down (this is normally the right button).</li>
+ <li>Bit <code>2</code> will be set if the tertiary mouse button is down (this is normally the wheel button).</li>
+ </ul>
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+NPROC(AVFlagBits32, AVSysTrackMouse, (ASBool* canceled, ASBool* committed, ASBool removeEvents))
+
+/**
+ This method invokes the PDF Optimizer tool on a specified AVDoc. An optimized document is created
+ using the settings specified in the PDFOptParamsRec structure. The optimized document is
+ saved to the disk at the location specified in the parameter's structure. If the operation
+ is successful, the active document is closed and the optimized document is opened for viewing.
+ If the operation fails, the active document remains open.
+
+ <p>The AVDoc passed to the <code>proc</code> should not be dirty. PDF Optimizer is unavailable in external
+ windows like those of a web browser, so the AVDoc should not be of a document open
+ in one such window. The document should not be of a version greater than the default PDF
+ version of the Acrobat application.
+ If the optimization succeeds, the document associated with the AVDoc is closed and the
+ optimized document is opened in Acrobat.</p>
+
+ @param avDoc The document that is to be optimized. It should be a valid AVDoc. It cannot be <code>NULL</code>.
+ @param pdfOptParams A pointer to a structure that specifies the operations to be performed on the document.
+ @exception genErrBadParm is raised if any option in the pdfOptParams structure does not conform to the specified rules.
+ @exception fileErrDiskFull is raised if there is not enough disk space.
+ @exception pdErrOpNotPermitted is raised if the caller does not have permissions to modify the PDF document or if the document is read-only.
+ @see AVGetOptimizerParamsForPreset
+ @see AVGetOptimizerPresets
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+XNPROC(void, AVDocSaveOptimized, (AVDoc avDoc, const PDFOptParamsRec *pdfOptParams))
+
+/**
+ This method fills the parameter with names of all PDF Optimizer presets that
+ are available to the caller.
+
+
+ @param pPresetNames The array that will be allocated and populated by the method.
+ The caller should free each member of the array using
+ ASTextDestroy(), and then free the array using ASfree().
+ @return The number of preset names populated.
+
+ @note Certain user-created presets might not be available to the API:
+ <ul>
+ <li> The last unsaved settings appear as Custom in the PDF Optimizer user interface, but it is not a valid preset and therefore will not be available. </li>
+ </ul>
+ The last unsaved settings appear as Custom in the PDF Optimizer user interface,
+ but it is not a valid preset and therefore will not be available.
+
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+XNPROC(ASInt32, AVGetOptimizerPresets, (ASText **pPresetNames))
+
+/**
+ This method can be used to obtain a PDFOptParamsRec structure populated with the
+ values corresponding to a PDF Optimizer preset.
+
+ <p>The values of certain members of the preset may be dependent on the PDF file
+ that needs to be optimized. This is true when:</p>
+ <ul>
+ <li>
+ The Acrobat compatibility level specifies retaining the compatibility of
+ the file.
+ </li>
+ <li>
+ The default list of fonts to be unembedded needs to be determined.
+ </li>
+ </ul>
+
+ <p>In the second parameter, the caller should specify the AVDoc to get values
+ relevant to a particular file. </p>
+
+ <p>If <code>avDoc</code> is specified as <code>NULL</code>, the values populated in <code>pdfOptParams</code> are those
+ that are actually stored in the preset. These may or may not be valid for all
+ PDFs. The list of fonts to be unembedded will always be a <code>NULL</code> value in this
+ case.</p>
+
+ <p>If the flattening of transparency is off in the preset,
+ <code>pdfOptFlattenTransparencyOptions</code> is also set to a <code>NULL</code> value.</p>
+
+ <p>The method assigns <code>NULL</code> values to <code>asPathDest</code> and <code>fileSys</code> members of PDFOptParamsRec. </p>
+
+ <p>It is the caller's responsibility to free the <code>arrPDFontsToUnembed</code> and
+ <code>pdfOptFlattenTransparencyOptions</code> members using ASfree(). </p>
+
+ <p>The <code>progMon</code> and <code>progMonClientData</code> members are populated with the standard
+ application progress monitor, which is the same as the one returned by the
+ AVAppGetDocProgressMonitor() proc.</p>
+
+ <p>It is the caller's responsibilty to ensure that a preset of the specified name
+ is available to the Acrobat user, either as a shipped or a user-created
+ preset. A useful check could be to ensure that the specified preset name is
+ among the names returned by the AVGetOptimizerPresets() method. </p>
+
+ @param presetName The preset for which a populated PDFOptParamsRec is desired.
+ @param pdfOptParams (filled by the method) A pointer to PDFOptParamsRec.
+ @return <code>true</code> if successful. It returns <code>false</code> if the specified preset name is invalid.
+ @see AVGetOptimizerPresets
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+XNPROC(ASBool, AVGetOptimizerParamsForPreset, (ASText presetName, AVDoc avDoc, PDFOptParams pdfOptParams))
+
+/**
+ <p>This method can be used to obtain the padding values necessary for the viewer
+ to display an annotation's appearance, with various visual treatments applied.</p>
+
+ <p>An annotation handler's <code>GetAppearance</code> callback can set several flags, some of which
+ cause the viewer to apply visual treatments to the appearance (for example, kAVAppearanceSelected).
+ These visual treatments may require additional pixels around the
+ appearance object, so the annotation handler must expand the device space bounding box
+ returned by the <code>GetAnnotViewBBox</code> callback to include these additional pixels.</p>
+
+ <p>To determine how many additional pixels to add to the device space bounding box,
+ the annotation handler should call this method, passing in the same flags it intends
+ to return from the <code>GetAppearance</code> callback. The returned offset should
+ be applied to all sides of the bounding box. In other words, it should be subtracted
+ from the top and left and added to the right and bottom.</p>
+
+ @param flags The flags which will be returned by the <code>GetAppearance</code> callback.
+ @return The number of units to expand the bounding box on each side.
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+NPROC(ASCount, AVAppGetAnnotAppearancePadding, (ASUns32 flags))
+
+/**
+ Determines whether the given menu item is an executable menu item.
+ @param menuItem IN The given menu item.
+ @return <code>true</code> if the given menu item is executable.
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+NPROC(ASBool, AVMenuItemIsScriptable, (AVMenuItem menuItem))
+
+/**
+ Given an ASTimeRecP, it sets the ASText object passed in to the string
+ representing the date and time. This routine is locale-friendly.
+
+ @param timeRec IN/OUT A pointer to an ASTimeRec structure.
+ @param text The allocated ASText object this method will store result in.
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+NPROC(void, AVSysTimeASTextFromTimeRec, (ASTimeRecP timeRec, ASText text))
+
+/**
+ Sets a new icon for a toolbar button to display in menus and
+ other UI elements generated from the button that are too small
+ to display the button's normal icon.
+
+ Toolbar buttons that do not have menu icons assigned to them
+ via this API will have appropriately-sized icons generated for
+ them based on the icon provided via AVToolButtonSetIcon. This
+ may result in scaling or clipping artifacts.
+
+ @param button IN The toolbar button whose menu icon is set.
+ @param icon IN The icon to assign as the button's menu icon.
+ @see AVToolButtonSetIcon
+ @since PI_ACROVIEW_VERSION >= 0x00080000
+*/
+NPROC(void, AVToolButtonSetMenuIcon, (AVToolButton button, AVIcon icon))
+
+/**
+ <p>Listens for a custom notification. </p>
+
+ <p>A custom notification is generated by a plug-in, and contains data customized for that notification.
+ Plug-ins can use these to communicate with each other. Data passed to <code>proc</code> from the broadcaster
+ is temporary, and receivers should copy any needed information and should not retain pointers to it.
+ Client data is passed back to <code>proc</code> when the notification is broadcast.</p>
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+NPROC(void, AVListenForCustomNotification,(const char* notification, AVCustomNotificationProc proc, void* clientData))
+
+/**
+ <p>Stops listening for a custom notification. </p>
+
+ <p>A custom notification is generated by a plug-in, and contains data customized for that notification.
+ Plug-ins can use these to communicate with each other.</p>
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+NPROC(void, AVUnlistenForCustomNotification,(const char* notification, AVCustomNotificationProc proc, void* clientData))
+
+/**
+ <p>Sends out a custom notification. </p>
+
+ <p>A custom notification is generated by a plug-in, and contains data customized for that notification.
+ Plug-ins can use these to communicate with each other.
+ Data can have a variable size but must contain at least the data in the <code>AVNotificationData</code> parameter.
+ </p>
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+NPROC(void, AVBroadcastCustomNotification,(const char* notification, AVNotificationData data))
+/**
+ <p>Registers an <code>AuxDataHandler</code>. </p>
+
+ <p>A handler can be registered for more than one kind of auxiliary
+ data. The type of data is passed to the handler at
+ run time so that it can distinguish the type of data
+ it is receiving. </p>
+ @param extension The <code>gExtensionID</code> of the client registering
+ the handler.
+ @param auxDataType The <code>ASAtom</code> for the type of data that
+ the handler accepts.
+ @param handler The handler to register.
+ @return <code>true</code> if the handler was registered, <code>false</code> if the handler
+ could not be un-registered (for example, if another handler
+ is already registered for this time).
+ @see AVDocSendAuxData
+ @see AVHasAuxDataHandler
+ @see AVUnregisterAuxDataHandler
+ @since PI_ACROVIEW_VERSION >= 0x00020002
+*/
+NPROC(ASBool, AVRegisterAuxDataHandler, (ASAtom auxDataType, AVAuxDataHandler handler, void* clientData))
+
+/**
+ Applies a set of redaction marks to the document, permanently removing the affected
+ document content and the marks themselves.
+ @param avDoc IN/OUT The document to which the redaction marks should be applied.
+ @param applyParams IN/OUT A pointer to a <code>PDApplyRedactionParams</code> object, specifying which
+ redaction marks to apply and what parameters to use when applying them. If this parameter is <code>NULL</code>,
+ all redaction marks present in the document will be applied.
+ @param showConfirmation IN A boolean value indicating that a confirmation dialog should be presented
+ to the user before beginning the application process.
+ @param showWarnings IN A boolean value indicating that warning dialogs should be displayed.
+ @param showErrors IN A boolean value indicating that error dialogs should be displayed.
+ @return <code>true</code> if the document's content was changed, <code>false</code> otherwise.
+ @exception pdErrBadAnnotation is raised if any specified redaction marks are invalid.
+ @see PDDocApplyRedactions
+ @see PDDocCreateRedaction
+ @see PDRedactionGetProps
+ @see PDRedactionSetProps
+*/
+XNPROC(ASBool, AVDocApplyRedactions, (AVDoc avDoc, PDApplyRedactionParams applyParams, ASBool showConfirmation, ASBool showWarnings, ASBool showErrors))
+
+/**
+ Inserts a button into a toolbar.
+ @param toolBar The toolbar into which the button is added.
+
+ @param button The button to add to the toolbar.
+ @param params A pointer to an <code>AVToolBarAddButtonParamsRec</code>, describing how the button should be added to the toolbar.
+ @see AVToolButtonRemove
+ @see AVToolBarAddButtonParams
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+NPROC(void, AVToolBarAddButtonEx, (AVToolBar toolBar, AVToolButton button, AVToolBarAddButtonParams params))
+
+/**
+ Displays a platform-dependent file save dialog box.
+ It is used in conjunction with <code>AVAppBeginSave</code> and <code>AVAppCancelSave</code>.
+
+ @param dialogParams IN Standard dialog parameters for Open/Save/ChooseFolder dialogs. The <code>initialFileName</code> member may be ignored when running in protected mode on Internet Explorer on Windows Vista.
+ @param outFileSys OUT May be <code>NULL</code> if kAVOpenSaveAllowForeignFileSystems is not passed in dialogParams
+ @param outASPathNameToWrite OUT An <code>ASPath</code> to which writing can be done. The caller must release this <code>ASPathName</code>.
+ @param outChosenFilterIndex OUT May be <code>NULL</code> if the caller does not care which filter was chosen.
+ @param outASPathNameChosen OUT The <code>ASPath</code> actually chosen by the user. The caller must release this <code>ASPathName</code>.
+ @param outFileSaveHandle OUT The file save handle used to pass to <code>AVAppEndSave</code> or <code>AVAppCancelSave</code>. This handle represents the file that was actually chosen.
+ @return <code>true</code> if the user confirmed the selection, <code>false</code> if the user clicked Cancel or some error occurred.
+ @see AVAppEndSave
+ @see AVAppCancelSave
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+
+NPROC(ASBool, AVAppBeginSave, (AVOpenSaveDialogParams dialogParams, ASFileSys *outFileSys, ASPathName *outASPathNameToWrite, ASInt16 *outChosenFilterIndex, ASPathName *outASPathNameChosen, AVAppFileSaveHandle *outFileSaveHandle))
+
+/**
+ Completes the Save operation started by <code>AVAppBeginSave</code>.
+ It should be called after the data has been written to the path returned by <code>AVAppBeginSave</code>.
+
+ @param inFileSaveHandle IN The file save handle returned by <code>AVAppBeginSave</code>.
+ @param inASPathNameWritten IN An <code>ASPath</code> corresponding to the file to which the data was written.
+ @return <code>true</code> on success, <code>false</code> on failure.
+ @see AVAppBeginSave
+ @see AVAppCancelSave
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+NPROC(ASBool, AVAppEndSave, (AVAppFileSaveHandle inFileSaveHandle, ASPathName inASPathNameWritten))
+
+/**
+ Cancels the Save operation started by <code>AVAppBeginSave</code>.
+ It should be called if the writing of data to the path returned by <code>AVAppBeginSave</code> failed.
+
+ @param inFileSaveHandle IN The file save handle returned by <code>AVAppBeginSave</code>.
+ @return <code>true</code> on success, <code>false</code> on failure.
+ @see AVAppBeginSave
+ @see AVAppEndSave
+ @since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+NPROC(ASBool, AVAppCancelSave, (AVAppFileSaveHandle inFileSaveHandle))
+
+/**
+Returns the ink preview value for a page view.
+@param pageView The page view whose number of visible
+inks is obtained.
+@see AVPageViewSetInkPreview
+@since PI_ACROVIEW_VERSION >= 0x00090000
+*/
+NPROC(ASBool, AVPageViewGetInkPreview, (AVPageView pageView))
+
+#undef XSPROC
+#undef XNPROC
+#undef XPROC
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVVers.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVVers.h
new file mode 100644
index 0000000..05945c0
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AVVers.h
@@ -0,0 +1,21 @@
+/* for Adobe use only */
+#define _AcroViewHFT_LATEST_VERSION 0x00090000
+#define _AcroViewHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _AcroViewHFT_IS_BETA 0
+
+/* for public use */
+#define AcroViewHFT_LATEST_VERSION (_AcroViewHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _AcroViewHFT_LATEST_VERSION) : _AcroViewHFT_LATEST_VERSION)
+
+#define AcroViewHFT_VERSION_2 0x00020000
+#define AcroViewHFT_VERSION_2_1 0x00020001
+#define AcroViewHFT_VERSION_2_2 0x00020002
+#define AcroViewHFT_VERSION_2_3 0x00020003
+#define AcroViewHFT_VERSION_4 0x00040000
+#define AcroViewHFT_VERSION_4_5 0x00040005
+#define AcroViewHFT_VERSION_5 0x00050000
+#define AcroViewHFT_VERSION_5_1 0x00050001
+#define AcroViewHFT_VERSION_6 0x00060000
+#define AcroViewHFT_VERSION_7 0x00070000
+#define AcroViewHFT_VERSION_8 0x00080000
+#define AcroViewHFT_VERSION_9 AcroViewHFT_LATEST_VERSION
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorCalls.h
new file mode 100644
index 0000000..8421ba2
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorCalls.h
@@ -0,0 +1,300 @@
+/*
+** AcroColorCalls.h
+**
+**
+**
+********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2002-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ****************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_AcroColorCalls
+#define _H_AcroColorCalls
+
+/* for Adobe use only */
+#define _AcroColorHFT_LATEST_VERSION 0x00090000
+#define _AcroColorHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _AcroColorHFT_IS_BETA 0
+
+/* for public use */
+#define AcroColorHFT_LATEST_VERSION (_AcroColorHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _AcroColorHFT_LATEST_VERSION) : _AcroColorHFT_LATEST_VERSION)
+
+/* for public use */
+#define AcroColorHFT_VERSION_6 0x00060000
+#define AcroColorHFT_VERSION_7 0x00070000
+#define AcroColorHFT_VERSION_8 0x00080000
+#define AcroColorHFT_VERSION_9 AcroColorHFT_LATEST_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif
+
+#define EXTERNAL_ACROCOLORPROCS_USER 1 /* External user of AcroColorProcs.h header file */
+#include "AcroColorExpT.h"
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ extern ACEX1 returnType ACEX2 name params;
+ #define SPROC(returnType, name, params, stubProc) \
+ extern ACEX1 returnType ACEX2 name params;
+ #define XNPROC NPROC
+ #define PROC NPROC
+ #define XPROC NPROC
+ #define ENPROC NPROC
+ #define NOPROC(name)
+ #include "AcroColorProcs.h"
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XPROC
+ #undef ENPROC
+
+#else
+
+ /* HFT version */
+ #include "PIRequir.h"
+#ifdef THREAD_SAFE_PDFL
+ #include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define SPROC(returnType, name, params, stubProc) \
+ name##SEL,
+ #define NOPROC(name) \
+ name##SEL,
+
+ #define XNPROC NPROC
+ #define PROC NPROC
+ #define XPROC NPROC
+ #define ENPROC NPROC
+ enum {
+ AcroColorBAD_SELECTOR,
+ #include "AcroColorProcs.h"
+ AcroColorNUMSELECTORSplusOne
+ };
+
+ #define AcroColorNUMSELECTORS (AcroColorNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef XPROC
+ #undef NOPROC
+ #undef ENPROC
+
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define SPROC(returnType, name, params, stubProc) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+
+ #define PROC NPROC
+ #define ENPROC NPROC
+ #define NOPROC(name)
+#if READER_PLUGIN
+ /* Force an error for Exchange procs */
+ #define XNPROC(returnType, name, params)
+ #define XPROC(returnType, name, params)
+#else
+ #define XNPROC NPROC
+ #define XPROC NPROC
+#endif
+ #include "AcroColorProcs.h"
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XPROC
+ #undef ENPROC
+ #include "PIRequir.h"
+
+#if PI_ACROCOLOR_VERSION != 0
+
+#include "AcroColorExpT.h"
+#include "ASExpT.h" // For ASText
+//#include "CorCalls.h" /* For ASCallbackCreateProto */
+
+#ifdef THREAD_SAFE_PDFL
+ #define gAcroColorHFT (GetHFTLocations()->acroColorHFT)
+ #define gAcroColorVersion (GetHFTLocations()->acroColorVersion)
+#else /* defined THREAD_SAFE_PDFL */
+ extern HFT gAcroColorHFT;
+ extern ASUns32 gAcroColorVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+#define ACEngineCount (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACEngineCountSELPROTO) (gAcroColorHFT[ACEngineCountSEL])))
+#define ACEngineInfo (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACEngineInfoSELPROTO) (gAcroColorHFT[ACEngineInfoSEL])))
+#define ACSetEngine (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACSetEngineSELPROTO) (gAcroColorHFT[ACSetEngineSEL])))
+
+#define ACMakeProfileList (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeProfileListSELPROTO) (gAcroColorHFT[ACMakeProfileListSEL])))
+#define ACProfileListCount (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileListCountSELPROTO) (gAcroColorHFT[ACProfileListCountSEL])))
+#define ACProfileListItemDescription (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileListItemDescriptionSELPROTO) (gAcroColorHFT[ACProfileListItemDescriptionSEL])))
+#define ACProfileListItemCode (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileListItemCodeSELPROTO) (gAcroColorHFT[ACProfileListItemCodeSEL])))
+#define ACUnReferenceProfileList (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACUnReferenceProfileListSELPROTO) (gAcroColorHFT[ACUnReferenceProfileListSEL])))
+
+#define ACMakePresetList (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakePresetListSELPROTO) (gAcroColorHFT[ACMakePresetListSEL])))
+#define ACPresetListCount (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACPresetListCountSELPROTO) (gAcroColorHFT[ACPresetListCountSEL])))
+#define ACPresetListItemFile (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACPresetListItemFileSELPROTO) (gAcroColorHFT[ACPresetListItemFileSEL])))
+#define ACPresetFileToName (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACPresetFileToNameSELPROTO) (gAcroColorHFT[ACPresetFileToNameSEL])))
+#define ACUnReferencePresetList (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACUnReferencePresetListSELPROTO) (gAcroColorHFT[ACUnReferencePresetListSEL])))
+
+
+#define ACGetSettingsProfile (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACGetSettingsProfileSELPROTO) (gAcroColorHFT[ACGetSettingsProfileSEL])))
+#define ACMakeSettings (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeSettingsSELPROTO) (gAcroColorHFT[ACMakeSettingsSEL])))
+#define ACLoadSettings (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACLoadSettingsSELPROTO) (gAcroColorHFT[ACLoadSettingsSEL])))
+#define ACGetSettingsString (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACGetSettingsStringSELPROTO) (gAcroColorHFT[ACGetSettingsStringSEL])))
+#define ACGetSettingsUnsigned32 (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACGetSettingsUnsigned32SELPROTO) (gAcroColorHFT[ACGetSettingsUnsigned32SEL])))
+#define ACUnReferenceSettings (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACUnReferenceSettingsSELPROTO) (gAcroColorHFT[ACUnReferenceSettingsSEL])))
+
+#define ACProfileDescription (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileDescriptionSELPROTO) (gAcroColorHFT[ACProfileDescriptionSEL])))
+#define ACProfileFromDescription (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileFromDescriptionSELPROTO) (gAcroColorHFT[ACProfileFromDescriptionSEL])))
+#define ACProfileFromCode (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileFromCodeSELPROTO) (gAcroColorHFT[ACProfileFromCodeSEL])))
+#define ACMonitorProfile (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMonitorProfileSELPROTO) (gAcroColorHFT[ACMonitorProfileSEL])))
+#define ACMakeBufferProfile (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeBufferProfileSELPROTO) (gAcroColorHFT[ACMakeBufferProfileSEL])))
+
+#define ACMakeCalRGB (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeCalRGBSELPROTO) (gAcroColorHFT[ACMakeCalRGBSEL])))
+#define ACMakeCalGray (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeCalGraySELPROTO) (gAcroColorHFT[ACMakeCalGraySEL])))
+#define ACMakeCalLab (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeCalLabSELPROTO) (gAcroColorHFT[ACMakeCalLabSEL])))
+#define ACProfileColorSpace (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileColorSpaceSELPROTO) (gAcroColorHFT[ACProfileColorSpaceSEL])))
+#define ACProfileSize (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileSizeSELPROTO) (gAcroColorHFT[ACProfileSizeSEL])))
+#define ACProfileData (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfileDataSELPROTO) (gAcroColorHFT[ACProfileDataSEL])))
+#define ACUnReferenceProfile (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACUnReferenceProfileSELPROTO) (gAcroColorHFT[ACUnReferenceProfileSEL])))
+
+#define ACMakeColorTransform (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeColorTransformSELPROTO) (gAcroColorHFT[ACMakeColorTransformSEL])))
+#define ACApplyTransform (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACApplyTransformSELPROTO) (gAcroColorHFT[ACApplyTransformSEL])))
+#define ACUnReferenceTransform (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACUnReferenceTransformSELPROTO) (gAcroColorHFT[ACUnReferenceTransformSEL])))
+
+#define ACMakeString (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACMakeStringSELPROTO) (gAcroColorHFT[ACMakeStringSEL])))
+#define ACStringASCII (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACStringASCIISELPROTO) (gAcroColorHFT[ACStringASCIISEL])))
+#define ACStringLocalized (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACStringLocalizedSELPROTO) (gAcroColorHFT[ACStringLocalizedSEL])))
+#define ACStringUnicode (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACStringUnicodeSELPROTO) (gAcroColorHFT[ACStringUnicodeSEL])))
+#define ACUnReferenceString (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACUnReferenceStringSELPROTO) (gAcroColorHFT[ACUnReferenceStringSEL])))
+
+#define ACGetWorkingSpaceProfile (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACGetWorkingSpaceProfileSELPROTO) (gAcroColorHFT[ACGetWorkingSpaceProfileSEL])))
+
+#define ACProfilesMatch (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_6), *((ACProfilesMatchSELPROTO) (gAcroColorHFT[ACProfilesMatchSEL])))
+
+/* PDDocColorConvertPage */
+#define PDDocColorConvertPage (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_8), *((PDDocColorConvertPageSELPROTO)(gAcroColorHFT[PDDocColorConvertPageSEL])))
+
+/* PDDocColorConvertEmbedeOuptutIntent */
+#define PDDocColorConvertEmbedOutputIntent (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_8), *((PDDocColorConvertEmbedOutputIntentSELPROTO)(gAcroColorHFT[PDDocColorConvertEmbedOutputIntentSEL])))
+
+
+/* PDColorConvertPDEElement*/
+#define PDColorConvertPDEElement (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_8), *((PDColorConvertPDEElementSELPROTO)(gAcroColorHFT[PDColorConvertPDEElementSEL])))
+
+/* Swatchbook API */
+#define ACSwatchBooksFind (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBooksFindSELPROTO)(gAcroColorHFT[ACSwatchBooksFindSEL])))
+#define ACSwatchBookCount (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookCountSELPROTO)(gAcroColorHFT[ACSwatchBookCountSEL])))
+#define ACSwatchBookTitle (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookTitleSELPROTO)(gAcroColorHFT[ACSwatchBookTitleSEL])))
+#define ACSwatchBookDescription (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookDescriptionSELPROTO)(gAcroColorHFT[ACSwatchBookDescriptionSEL])))
+#define ACSwatchBookDBDestroy (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookDBDestroySELPROTO)(gAcroColorHFT[ACSwatchBookDBDestroySEL])))
+#define ACSwatchBookLoad (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookLoadSELPROTO)(gAcroColorHFT[ACSwatchBookLoadSEL])))
+#define ACSwatchBookLoadFromPath (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookLoadFromPathSELPROTO)(gAcroColorHFT[ACSwatchBookLoadFromPathSEL])))
+#define ACSwatchBookDestroy (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookDestroySELPROTO)(gAcroColorHFT[ACSwatchBookDestroySEL])))
+#define ACSwatchBookNumberOfColors (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookNumberOfColorsSELPROTO)(gAcroColorHFT[ACSwatchBookNumberOfColorsSEL])))
+#define ACSwatchBookColorSpace (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookColorSpaceSELPROTO)(gAcroColorHFT[ACSwatchBookColorSpaceSEL])))
+#define ACSwatchBookIsProcess (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookIsProcessSELPROTO)(gAcroColorHFT[ACSwatchBookIsProcessSEL])))
+#define ACSwatchBookGetSwatchName (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookGetSwatchNameSELPROTO)(gAcroColorHFT[ACSwatchBookGetSwatchNameSEL])))
+#define ACSwatchBookGetSwatchValues (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((ACSwatchBookGetSwatchValuesSELPROTO)(gAcroColorHFT[ACSwatchBookGetSwatchValuesSEL])))
+
+/* PDDocColorConvertPageEx */
+#define PDDocColorConvertPageEx (ACROASSERT(gAcroColorVersion >=AcroColorHFT_VERSION_9), *((PDDocColorConvertPageExSELPROTO)(gAcroColorHFT[PDDocColorConvertPageExSEL])))
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* PI_ACROCOLOR_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+#undef EXTERNAL_ACROCOLORPROCS_USER
+
+#endif /* !defined(_H_AcroColorCalls) */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorExpT.h
new file mode 100644
index 0000000..4c6a084
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorExpT.h
@@ -0,0 +1,1609 @@
+/*
+** AcroColorExpT.h
+**
+** Types, macros, structures, etc. required to use the Acrobat Color Host Function Table.
+**
+Copyright (C) 2002-2006 Adobe Systems Inc. All Rights Reserved.
+**
+*/
+
+#ifndef _H_AcroColorExpT
+#define _H_AcroColorExpT
+
+//#include "Environ.h"
+
+/*
+This version # is used in AcroColorCalls.h for the definition/inclusion of
+the entry points. If missing, you don't get the right results. Clients
+should not have to explicitly specify this to get it to work. They
+will have to specify a later version number if they really want a
+later HFT version.
+*/
+
+#if PLUGIN
+#include "CoreExpT.h"
+#include "ASExpT.h"
+#include "PDExpT.h"
+#include "PEExpT.h"
+#endif /* PLUGIN */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifndef FOUR_CHAR_CODE
+#ifdef __SUNPRO_CC
+//SunStudio reads the byte in reverse order
+#define FOUR_CHAR_CODE(x) (((ASUns32)(x)>>24) + (((x)>>8)&0x0ff00) + (((x)<<8)&0x0ff0000) + ((x)<<24))
+#else
+#define FOUR_CHAR_CODE(x) (x)
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define AcroColorHFTNAME "AcroColorHFT"
+
+#ifdef __cplusplus
+
+/**
+ A string value type for use with AcroColor functions.
+ @see ACEngineInfo
+ @see ACGetSettingsString
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACMakeString
+ @see ACPresetFileToName
+ @see ACProfileDescription
+ @see ACProfileFromDescription
+ @see ACProfileListItemDescription
+ @see ACStringASCII
+ @see ACStringLocalized
+ @see ACStringUnicode
+ @see ACUnReferenceString
+*/
+ class ACString;
+
+typedef ACString *AC_String;
+
+#else
+
+typedef struct ACString *AC_String;
+
+#endif
+
+#ifdef __cplusplus
+
+/**
+ An opaque object representing a list of device color profiles.
+ @see ACMakeProfileList
+ @see ACProfileListCount
+ @see ACProfileListItemCode
+ @see ACProfileListItemDescription
+ @see ACUnReferenceProfileList
+*/
+class ACProfileList;
+typedef ACProfileList *AC_ProfileList;
+
+#else
+
+typedef struct ACProfileList *AC_ProfileList;
+
+#endif
+
+#ifdef __cplusplus
+
+/** An opaque object representing a color tranformation.
+ @see ACApplyTransform
+ @see ACMakeColorTransform
+ @see ACUnReferenceTranform
+*/
+class ACTransform;
+
+typedef ACTransform *AC_Transform;
+
+#else
+
+typedef struct ACTransform *AC_Transform;
+
+#endif
+
+#ifdef __cplusplus
+
+/**
+ An opaque object representing the settings for the AcroColor engine (ACE).
+ @see ACGetSettingsProfile
+ @see ACGetSettingsString
+ @see ACGetSettingsUnsigned32
+ @see ACLoadSettings
+ @see ACMakeSettings
+ @see ACUnReferenceSettings
+*/
+class ACSettings;
+
+typedef ACSettings *AC_Settings;
+
+#else
+
+typedef struct ACSettings *AC_Settings;
+
+#endif
+
+#ifdef __cplusplus
+
+/**
+ An opaque object representing a device color profile.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACMakeColorTransform
+ @see ACMonitorProfile
+ @see ACProfileColorSpace
+ @see ACProfileData
+ @see ACProfileDescription
+ @see ACProfileFromCode
+ @see ACProfileFromDescription
+ @see ACProfileSize
+ @see ACProfilesMatch
+ @see ACUnReferenceProfile
+*/
+class ACProfile;
+
+typedef ACProfile *AC_Profile;
+
+#else
+
+typedef struct ACProfile *AC_Profile;
+
+#endif
+
+#ifdef __cplusplus
+/**
+ An opaque object representing a preset list. A preset list is a list of predefined color settings
+ that specify the source and destination working color profiles to be used for color
+ conversion.
+ @see ACMakePresetList
+ @see ACPresetListCount
+ @see ACPresetListItemFile
+ @see ACUnReferencePresetList
+*/
+class ACPresetList;
+
+typedef ACPresetList *AC_PresetList;
+
+#else
+
+typedef struct ACPresetList *AC_PresetList;
+
+#endif
+
+
+/** Constants that specify the types of device profiles to include in a profile list.
+ @see ACMakeProfileList
+*/
+typedef enum
+{
+
+ /** Standard (recommended) RGB profiles. These profiles are always
+ bidirectional. */
+ AC_Selector_RGB_Standard = FOUR_CHAR_CODE ('rStd'),
+
+
+ /** RGB profiles that can be used as a source. These profiles may or
+ may not be usable as a destination. This constant does not include profiles selected
+ by AC_Selector_RGB_Standard. */
+ AC_Selector_RGB_OtherInputCapable = FOUR_CHAR_CODE ('rInp'),
+
+ /** RGB profiles that can be used as a destination. These profiles are
+ also usable as a source. This constant does not include profiles selected
+ by AC_Selector_RGB_Standard. */
+ AC_Selector_RGB_OtherOutputCapable = FOUR_CHAR_CODE ('rOut'),
+
+ /** Standard (recommended) CMYK profiles that can be used as a source.
+ These profiles may or may not be usable as a destination. */
+ AC_Selector_CMYK_StandardInput = FOUR_CHAR_CODE ('cSIn'),
+
+ /** Standard (recommended) CMYK profiles that can be used as a destination.
+ These profiles are also usable as a source. */
+ AC_Selector_CMYK_StandardOutput = FOUR_CHAR_CODE ('cStd'),
+
+ /** CMYK profiles that can be used as a source. These profiles may or
+ may not be usable as a destination. This constant does not include profiles selected
+ by AC_Selector_CMYK_StandardInput or AC_Selector_CMYK_StandardOutput. */
+ AC_Selector_CMYK_OtherInputCapable = FOUR_CHAR_CODE ('cInp'),
+
+ /** CMYK profiles that can be used as a destination. These profiles are
+ also usable as a source. This constant does not include profiles selected
+ by AC_Selector_CMYK_StandardOutput. */
+ AC_Selector_CMYK_OtherOutputCapable = FOUR_CHAR_CODE ('cOut'),
+
+ /** Standard (recommended) grayscale profiles. These profiles are always
+ bidirectional. */
+ AC_Selector_Gray_Standard = FOUR_CHAR_CODE ('gStd'),
+
+ /** Grayscale profiles that can be used as a source. These profiles may
+ or may not be usable as a destination. This constant does not include profiles selected
+ by AC_Selector_Gray_Standard. */
+ AC_Selector_Gray_OtherInputCapable = FOUR_CHAR_CODE ('gInp'),
+
+ /** Grayscale profiles that can be used as a destination. These profiles
+ are also usable as a source. This constant does not include profiles selected
+ by AC_Selector_Gray_Standard. */
+ AC_Selector_Gray_OtherOutputCapable = FOUR_CHAR_CODE ('gOut'),
+
+ /** Standard dot gain profiles. This constant is used by Photoshop to represent a single
+ ink's dot gain curve, and is stored as an ICC gray output profile. */
+ AC_Selector_DotGain_Standard = FOUR_CHAR_CODE ('dStd'),
+
+ /** Other grayscale printer profiles. This constant does not include profiles selected by
+ AC_Selector_DotGain_Standard, and does not include grayscale display
+ profiles. */
+ AC_Selector_DotGain_Other = FOUR_CHAR_CODE ('dOth'),
+
+ /** PhotoYCC profiles that can be used as a source. */
+ AC_Selector_PhotoYCC_InputCapable = FOUR_CHAR_CODE ('iYCC'),
+
+ /** This constant forces the enum to be 32 bits wide. */
+ AC_Selector_MaxEnum = 0xFFFFFFFFL
+ } AC_SelectorCode;
+
+
+/**
+ Error codes returned by AcroColor functions.
+*/
+typedef enum
+{
+
+ /** No error. */
+ AC_Error_None = 0,
+
+ /** Other error. */
+ AC_Error_General = FOUR_CHAR_CODE ('gen '),
+
+ /** Bad parameters to an API call. */
+ AC_Error_Param = FOUR_CHAR_CODE ('parm'),
+
+ /** Application and ACE library mismatch. */
+ AC_Error_Version = FOUR_CHAR_CODE ('ver '),
+
+ /** The user aborted the operation. Returned by ACE when the
+ client progress callback returns <code>false</code>. */
+ AC_Error_UserAbort = FOUR_CHAR_CODE ('abrt'),
+
+ /** Out of memory. */
+ AC_Error_Memory = FOUR_CHAR_CODE ('memF'),
+
+ /** Out of stack space. */
+ AC_Error_StackFull = FOUR_CHAR_CODE ('stkF'),
+
+ /** Client callback ran out of scratch space. */
+ AC_Error_ScratchFull = FOUR_CHAR_CODE ('scrF'),
+
+ /** String does not fit in supplied buffer. */
+ AC_Error_StringOverflow = FOUR_CHAR_CODE ('strO'),
+
+ /** String does not contain ASCII data. */
+ AC_Error_NoASCII = FOUR_CHAR_CODE ('noA '),
+
+ /** String does not contain Unicode data. */
+ AC_Error_NoUnicode = FOUR_CHAR_CODE ('noU '),
+
+ /** String does not contain localized data. */
+ AC_Error_NoLocalized = FOUR_CHAR_CODE ('noL '),
+
+ /** Data is not correctly byte aligned. */
+ AC_Error_BadAlignment = FOUR_CHAR_CODE ('alig'),
+
+ /** Invalid profile description. */
+ AC_Error_BadDescription = FOUR_CHAR_CODE ('bDes'),
+
+ /** Unable to concatenate transforms. */
+ AC_Error_BadConcat = FOUR_CHAR_CODE ('bCat'),
+
+ /** Unable to merge transforms. */
+ AC_Error_BadMerge = FOUR_CHAR_CODE ('bMrg'),
+
+ /** Invalid profile. */
+ AC_Error_BadProfile = FOUR_CHAR_CODE ('bPro'),
+
+ /** Unsupported CMS. */
+ AC_Error_UnsupCMS = FOUR_CHAR_CODE ('uCMS'),
+
+ /** Unsupported ACE option. */
+ AC_Error_UnsupOption = FOUR_CHAR_CODE ('uOpt'),
+
+ /** Unsupported packing code. */
+ AC_Error_UnsupPacking = FOUR_CHAR_CODE ('uPac'),
+
+ /** Unsupported profile version. */
+ AC_Error_UnsupProfile = FOUR_CHAR_CODE ('uPro'),
+
+ /** Unsupported profile code. */
+ AC_Error_UnsupProfileCode = FOUR_CHAR_CODE ('uPrC'),
+
+ /** Unsupported color space. */
+ AC_Error_UnsupSpace = FOUR_CHAR_CODE ('uSpc'),
+
+ /** Unsupported query code. */
+ AC_Error_UnsupQuery = FOUR_CHAR_CODE ('uQry'),
+
+ /** A profile was missing from the disk. */
+ AC_Error_MissingProfile = FOUR_CHAR_CODE ('misP'),
+
+ /** The profile on disk has been modified. */
+ AC_Error_ModifiedProfile = FOUR_CHAR_CODE ('modP'),
+
+ /** File is missing from disk. */
+ AC_Error_FileNotFound = FOUR_CHAR_CODE ('fnf '),
+
+ /** End of file error. */
+ AC_Error_EOF = FOUR_CHAR_CODE ('eof '),
+
+ /** File locked error. */
+ AC_Error_FileLocked = FOUR_CHAR_CODE ('flck'),
+
+ /** Disk I/O error. */
+ AC_Error_DiskIO = FOUR_CHAR_CODE ('io '),
+
+ /** A problem using ColorSync. */
+ AC_Error_ColorSync = FOUR_CHAR_CODE ('csE '),
+
+ /** A problem using ICM. */
+ AC_Error_ICM = FOUR_CHAR_CODE ('icmE'),
+
+ /** The color settings does not contain this key. */
+ AC_Error_MissingKey = FOUR_CHAR_CODE ('mKey'),
+
+ /** The color settings file is invalid. */
+ AC_Error_InvalidSettings = FOUR_CHAR_CODE ('iSet'),
+
+ /** The color settings file is an incompatible version. */
+ AC_Error_SettingsVersion = FOUR_CHAR_CODE ('vSet'),
+
+ /** The function is not implemented (subsetted library). */
+ AC_Error_NotImplemented = FOUR_CHAR_CODE ('nImp'),
+
+ /** This constant forces the <code>enum</code> to be 32 bits wide. */
+ AC_Error_MaxEnum = 0xFFFFFFFFL
+
+} AC_Error;
+
+/** Constants that describe the type of a device color profile.
+ @see ACProfileFromCode
+ @see ACProfileListItemCode
+*/
+typedef enum
+{
+
+ /** A <code>NULL</code> result, indication that a profile is not a built-in profile. */
+ AC_Profile_Null = 0,
+
+ /** Adobe's standard Lab profile. It has a white point of D50, and
+ exactly matches the ICC's Lab PCS space. */
+ AC_Profile_Lab_D50 = FOUR_CHAR_CODE ('LD50'),
+
+ /** An XYZ profile that exactly matches the ICC's XYZ PCS space. */
+ AC_Profile_PCS_XYZ = FOUR_CHAR_CODE ('pXYZ'),
+
+ /** An XYZ profile with a flat white point encoding (<code>X = Y = Z = 1.0</code>).
+ Photoshop uses this as an intermediate space in its display loop. */
+ AC_Profile_Flat_XYZ = FOUR_CHAR_CODE ('fXYZ'),
+
+ /** HP's sRGB profile. The default Windows monitor profile. */
+ AC_Profile_sRGB = FOUR_CHAR_CODE ('sRGB'),
+
+ /** Default RGB space using by Photoshop 4.0 and earlier. The
+ default Mac OS monitor profile. */
+ AC_Profile_AppleRGB = FOUR_CHAR_CODE ('aRGB'),
+
+ /** A wider gamut RGB space recommended by Adobe. */
+ AC_Profile_AdobeRGB1998 = FOUR_CHAR_CODE ('AS98'),
+
+ /** A simplified version of Radius' ColorMatch RGB space, without
+ Radius' non-zero black point. */
+ AC_Profile_ColorMatchRGB = FOUR_CHAR_CODE ('cmat'),
+
+ /** Grayscale display profile with a gamma of 18. */
+ AC_Profile_Gamma18 = FOUR_CHAR_CODE ('GG18'),
+
+ /** Grayscale display profile with a gamma of 22. */
+ AC_Profile_Gamma22 = FOUR_CHAR_CODE ('GG22'),
+
+ /** Grayscale printer profile with a dot gain of 10. */
+ AC_Profile_DotGain10 = FOUR_CHAR_CODE ('DG10'),
+
+ /** Grayscale printer profile with a dot gain of 15. */
+ AC_Profile_DotGain15 = FOUR_CHAR_CODE ('DG15'),
+
+ /** Grayscale printer profile with a dot gain of 20. */
+ AC_Profile_DotGain20 = FOUR_CHAR_CODE ('DG20'),
+
+ /** Grayscale printer profile with a dot gain of 25. */
+ AC_Profile_DotGain25 = FOUR_CHAR_CODE ('DG25'),
+
+ /** Grayscale printer profile with a dot gain of 30. */
+ AC_Profile_DotGain30 = FOUR_CHAR_CODE ('DG30'),
+
+ /** The system "Monitor RGB" profile, which is the same profile as that
+ returned by AC_MainMonitorProfile. */
+ AC_Profile_MonitorRGB = FOUR_CHAR_CODE ('mRGB'),
+
+ /** The system default profiles for RGB color space. (Currently a ColorSync 3.0 only feature.) */
+ AC_Profile_SystemRGB = FOUR_CHAR_CODE ('sysR'),
+
+ /** The system default profiles for CMYK color space. (Currently a ColorSync 3.0 only feature.) */
+ AC_Profile_SystemCMYK = FOUR_CHAR_CODE ('sysC'),
+
+ /** The system default profiles for Gray color space. (Currently a ColorSync 3.0 only feature.) */
+ AC_Profile_SystemGray = FOUR_CHAR_CODE ('sysG'),
+
+ /** The system default profiles for input device type. (Currently a ColorSync 3.0 only feature.) */
+ AC_Profile_SystemInput = FOUR_CHAR_CODE ('sysI'),
+
+ /** The system default profiles for output device type. (Currently a ColorSync 3.0 only feature.) */
+ AC_Profile_SystemOutput = FOUR_CHAR_CODE ('sysO'),
+
+ /** The system default profiles for proofer device type. (Currently a ColorSync 3.0 only feature.) */
+ AC_Profile_SystemProofer = FOUR_CHAR_CODE ('sysP'),
+
+ /** The application working (RGB) color space profiles. (For use as
+ abstact values only, since ACE does not keep track of these
+ profiles, and thus cannot make profiles from these codes.) */
+ AC_Profile_WorkingRGB = FOUR_CHAR_CODE ('wRGB'),
+
+ /** The application working (CMYK) color space profiles. (For use as
+ abstact values only, since ACE does not keep track of these
+ profiles, and thus cannot make profiles from these codes.) */
+ AC_Profile_WorkingCMYK = FOUR_CHAR_CODE ('wCMY'),
+
+ /** The application working (gray) color space profiles. (For use as
+ abstact values only, since ACE does not keep track of these
+ profiles, and thus cannot make profiles from these codes.) */
+ AC_Profile_WorkingGray = FOUR_CHAR_CODE ('wGry'),
+
+ /** This constant forces the enum to be 32 bits wide. */
+ AC_Profile_MaxEnum = 0xFFFFFFFFL
+
+} AC_ProfileCode;
+
+
+/**
+ Constants that specify the packing used in a color transformation.
+*/
+typedef enum
+{
+
+ /** 8-bit RGB (or grayscale destination), with a leading pad byte.
+ When grayscale is output in this format, the gray value is replicated
+ into to the R, G, and B values.
+ <p><code>R, G, B = 0</code> is black.</p>
+ <p><code>R, G, B = 255</code> is white.</p>
+ <p>Data must be 32-bit aligned.</p> */
+ AC_Packing_pRGB8 = FOUR_CHAR_CODE ('prgb'),
+
+ /** Same as AC_Packing_pRGB8, without the leading pad byte.
+ Data need only be 8-bit aligned. */
+ AC_Packing_RGB8 = FOUR_CHAR_CODE ('rgb '),
+
+ /** 15+ bit RGB (or grayscale destination), with a leading pad word.
+ When grayscale is output in this format, the gray value is replicated
+ into to the R, G, and B values.
+ <p><code>R, G, B = 0</code> is black.</p>
+ <p><code>R, G, B = 32768</code> is white.</p>
+ <p>Values greater than <code>32768</code> are invalid.</p>
+ <p>Data must be 64-bit aligned.</p> */
+ AC_Packing_pRGB15 = FOUR_CHAR_CODE ('PRGB'),
+
+ /** 8-bit CMYK.
+ <p><code>C, M, Y, K = 0</code> is 100% ink.</p>
+ <p><code>C, M, Y, K = 255</code> is 0% ink.</p>
+ <p>Data must be 32-bit aligned.</p> */
+ AC_Packing_CMYK8_Black0 = FOUR_CHAR_CODE ('cmyk'),
+
+ /** Same as AC_Packing_CMYK8_Black0 with inverse encoding. */
+ AC_Packing_CMYK8_White0 = FOUR_CHAR_CODE ('cmyw'),
+
+ /** 15+ bit CMYK.
+ <p><code>C, M, Y, K = 0</code> is 100% ink.</p>
+ <p><code>C, M, Y, K = 32768</code> is 0% ink.</p>
+ <p>Values greater than <code>32768</code> are invalid.</p>
+ <p>Data must be 64-bit aligned.</p> */
+ AC_Packing_CMYK15_Black0 = FOUR_CHAR_CODE ('CMYK'),
+
+ /** 8-bit LAB, with a leading pad byte.
+ <p><code>L = 0</code> means <code>L* = 0.0</code></p>
+ <p><code>L = 255</code> means <code>L* = 100.0</code></p>
+ <p><code>a, b = 0</code> means <code>a*, b* = -128.0</code></p>
+ <p><code>a, b = 128</code> means <code>a*, b* = 0.0</code></p>
+ <p><code>a, b = 255</code> means <code>a*, b* = +127.0</code></p>
+ <p>Data must be 32-bit aligned.</p> */
+ AC_Packing_pLab8 = FOUR_CHAR_CODE ('plab'),
+
+ /** Same as AC_Packing_pLab8, without the leading pad byte.
+ <p>Data need only be 8-bit aligned.</p> */
+ AC_Packing_Lab8 = FOUR_CHAR_CODE ('lab '),
+
+ /** 15+ bit LAB, with a leading pad word.
+ <p><code>L = 0</code> means <code>L* = 0.0</code></p>
+ <p><code>L = 32768</code> means <code>L* = 100.0</code></p>
+ <p><code>a, b = 0</code> means <code>a*, b* = -128.0</code></p>
+ <p><code>a, b = 16384</code> means <code>a*, b* = 0.0</code></p>
+ <p><code>a, b = 32768</code> means <code>a*, b* = +128.0</code></p>
+ <p>Values greater than <code>32768</code> are invalid.</p>
+ <p>Data must be 64-bit aligned.</p> */
+ AC_Packing_pLab15 = FOUR_CHAR_CODE ('PLAB'),
+
+ /** 8-bit grayscale or gamut test results, no padding.
+ <p><code>G = 0</code> is 100% ink or black or fully out of gamut.</p>
+ <p><code>G = 255</code> is 0% ink or white or fully in gamut.</p>
+ <p>When used for gamut test results, any value greater than or equal to <code>128</code> should be
+ considered to be in gamut.</p> */
+ AC_Packing_Gray8_Black0 = FOUR_CHAR_CODE ('g8k0'),
+
+ /** Same as AC_Packing_Gray8_Black0 with inverse encoding. */
+ AC_Packing_Gray8_White0 = FOUR_CHAR_CODE ('g8w0'),
+
+ /** 15+ bit grayscale or gamut test results, no padding.
+ <p><code>G = 0</code> is 100% ink or black or fully out of gamut.</p>
+ <p><code>G = 32768</code> is 0% ink or white or fully in gamut.</p>
+ <p>Values greater than <code>32768</code> are invalid.</p>
+ <p>Data must be 16-bit aligned.</p> */
+ AC_Packing_Gray15_Black0 = FOUR_CHAR_CODE ('G15K'),
+
+ /** 16-bit XYZ, with a leading pad word.
+ <p><code>X, Y, Z = 0</code> means <code>X, Y, Z = 0.0</code></p>
+ <p><code>X, Y, Z = 32768</code> means <code>X, Y, Z = 1.0</code></p>
+ <p><code>X, Y, Z = 65535</code> means <code>X, Y, Z = 1.9999694824</code>.</p>
+ <p>Data must be 64-bit aligned.</p> */
+ AC_Packing_pXYZ16 = FOUR_CHAR_CODE ('PXYZ'),
+
+ /** Generic padded 3-component 8-bit packing.
+ Data must be 32-bit aligned. */
+ AC_Packing_pABC8 = FOUR_CHAR_CODE ('pabc'),
+
+ /** Same as AC_Packing_pABC8, without the leading pad byte.
+ Data need only be 8-bit aligned. */
+ AC_Packing_ABC8 = FOUR_CHAR_CODE ('abc '),
+
+ /** Generic padded 3-component 15+ bit packing.
+ Data must be 64-bit aligned. */
+ AC_Packing_pABC15 = FOUR_CHAR_CODE ('pABC'),
+
+ /** Generic 4-component 8-bit packing.
+ Data must be 32-bit aligned. */
+ AC_Packing_ABCD8 = FOUR_CHAR_CODE ('abcd'),
+
+ /** Generic 4-component 15+ bit packing.
+ Data must be 64-bit aligned. */
+ AC_Packing_ABCD15 = FOUR_CHAR_CODE ('ABCD'),
+
+ /** Packing codes for native 64-bit (gray) ColorSync formats (type "CMColor").
+ ICM2 also uses these packings formats (type "COLOR").
+ See the Apple ColorSync documentation for the details of these
+ formats. These are mostly intended for internal use by ACE,
+ and are not intended for use by most ACE clients.
+ Data must be 16-bit aligned. */
+ AC_Packing_CS64_Gray = FOUR_CHAR_CODE ('CS01'),
+
+ /** Packing codes for native 64-bit (RGB) ColorSync formats (type "CMColor").
+ ICM2 also uses these packings formats (type "COLOR").
+ See the Apple ColorSync documentation for the details of these
+ formats. These are mostly intended for internal use by ACE,
+ and are not intended for use by most ACE clients.
+ Data must be 16-bit aligned. */
+ AC_Packing_CS64_RGB = FOUR_CHAR_CODE ('CS02'),
+
+ /** Packing codes for native 64-bit (CMYK) ColorSync formats (type "CMColor").
+ ICM2 also uses these packings formats (type "COLOR").
+ See the Apple ColorSync documentation for the details of these
+ formats. These are mostly intended for internal use by ACE,
+ and are not intended for use by most ACE clients.
+ Data must be 16-bit aligned. */
+ AC_Packing_CS64_CMYK = FOUR_CHAR_CODE ('CS03'),
+
+ /** Packing codes for native 64-bit (Lab) ColorSync formats (type "CMColor").
+ ICM2 also uses these packings formats (type "COLOR").
+ See the Apple ColorSync documentation for the details of these
+ formats. These are mostly intended for internal use by ACE,
+ and are not intended for use by most ACE clients.
+ Data must be 16-bit aligned. */
+ AC_Packing_CS64_Lab = FOUR_CHAR_CODE ('CS04'),
+
+ /** Packing codes for native 64-bit (xyz) ColorSync formats (type "CMColor").
+ ICM2 also uses these packings formats (type "COLOR").
+ See the Apple ColorSync documentation for the details of these
+ formats. These are mostly intended for internal use by ACE,
+ and are not intended for use by most ACE clients.
+ Data must be 16-bit aligned. */
+ AC_Packing_CS64_XYZ = FOUR_CHAR_CODE ('CS05'),
+
+ /** Packing codes for native 64-bit (abc) ColorSync formats (type "CMColor").
+ ICM2 also uses these packings formats (type "COLOR").
+ See the Apple ColorSync documentation for the details of these
+ formats. These are mostly intended for internal use by ACE,
+ and are not intended for use by most ACE clients.
+ Data must be 16-bit aligned. */
+ AC_Packing_CS64_ABC = FOUR_CHAR_CODE ('CS06'),
+
+ /** Packing codes for native 64-bit (abcd)ColorSync formats (type "CMColor").
+ ICM2 also uses these packings formats (type "COLOR").
+ See the Apple ColorSync documentation for the details of these
+ formats. These are mostly intended for internal use by ACE,
+ and are not intended for use by most ACE clients.
+ Data must be 16-bit aligned. */
+ AC_Packing_CS64_ABCD = FOUR_CHAR_CODE ('CS07'),
+
+ /** <code>NULL</code> data, for use with data in AC_Space_Null. */
+ AC_Packing_Null = FOUR_CHAR_CODE ('null'),
+
+ /** None of the above; use the general packing specification. */
+ AC_Packing_General = 0,
+
+ /** This constant forces the <code>enum</code> to be 32 bits wide. */
+ AC_Packing_MaxEnum = 0xFFFFFFFFL
+
+} AC_PackingCode;
+
+
+/** Constants that specify a standard ICC rendering intent for a device color profile. The
+ rendering intent specifies the color translation method for colors that are outside the
+ gamut of the color profile.
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+*/
+typedef enum
+{
+
+ /** Tries to preserve the visual relationship between colors in
+ a way that is perceived as natural to the human eye,
+ although the color values themselves may change. This is
+ the same as the Image intent in Adobe PageMaker and
+ Illustrator. This option is suitable for photographic,
+ continuous tone images.
+ */
+ AC_Perceptual = 0,
+
+ /** The same as absolute colorimetric, except that it
+ compares the white point of the source color space to
+ that of the destination color space and shifts all other
+ colors accordingly, rather than comparing individual
+ colors.
+ */
+ AC_RelColorimetric = 1,
+
+ /** Tries to create vivid color at the expense of accurate
+ color. It scales the source gamut to the destination
+ gamut, but preserves relative saturation instead of hue,
+ so that when scaling to a smaller gamut, hues may shift.
+ This is the same as the Graphics intent in Adobe
+ PageMaker and Illustrator. This option is suitable for
+ business graphics and charts, where the exact
+ relationship between colors is not as important as having
+ bright saturated colors.
+ */
+ AC_Saturation = 2,
+
+ /** Tries to maintain color accuracy at the expense of
+ preserving relationships between colors. It leaves colors
+ that fall inside the destination gamut unchanged. When
+ translating to a smaller gamut, two colors that are
+ distinct in the source space may be mapped to the same
+ color in the destination space. This type of rendering can
+ be more accurate than AC_RelColorimetric if the color
+ profile of the image contains correct white point
+ (extreme highlight) information.
+ */
+ AC_AbsColorimetric = 3,
+
+ /** Use the source profile's rendering intent. */
+ AC_UseProfileIntent = 0xFFFFFFFFL
+} AC_RenderIntent;
+
+
+#ifdef WIN_ENV
+#define kACMaxPathLength 260
+#else
+#define kACMaxPathLength 256
+#endif
+
+
+/**
+ Contains a platform-specific version of a file specification. This is an FSSpec on
+ Mac OS, or a full path name on other platforms.
+ @see ACLoadSettings
+ @see ACPresetFileToName
+ @see ACPresetListItemFile
+*/
+typedef struct _t_AC_FileSpec
+{
+ #ifdef MAC_ENV
+
+ /** On Mac OS, use an FSSpec. */
+ FSSpec spec;
+
+ #else
+
+ /** Use a full path name when not using Mac OS. */
+ char path [kACMaxPathLength];
+
+ #endif
+
+} AC_FileSpec;
+
+/* color types */
+
+/** Floating-point XYZ color. A pure black would be encoded as <code>0.0, 0.0, 0.0</code>,
+ while a D50-based pure white would be encoded as <code>0.9642, 1.0, 0.8249</code>.
+ @see ACCalCMYK
+ @see ACCalGray
+ @see ACCalLab
+ @see ACCalRGB
+*/
+typedef struct _t_ACXYZColor
+{
+ /** X-component of a floating-point XYZ color. */
+ double X;
+
+ /** Y-component of a floating-point XYZ color. */
+ double Y;
+
+ /** Z-component of a floating-point XYZ color. */
+ double Z;
+} AC_XYZColor;
+
+/******************************************************************************/
+
+
+/** Floating-point xy chromaticity coordinate. These can be computed from XYZ
+ colors using <code>x = X / (X + Y + Z)</code> and <code>y = Y / (X + Y + Z)</code>. */
+typedef struct _t_ACXYColor
+ {
+ double x;
+ double y;
+ } AC_XYColor;
+
+
+
+/** A tone curve value for use in a calibrated CMYK color space specification.
+ @see ACCalCMYK
+*/
+typedef struct _t_ACToneCurve
+ {
+ /** The number of bytes per value (1 or 2). */
+ ASUns32 bytesPerValue;
+ /** Number of samples (often 256). */
+ ASUns32 count;
+ /** A pointer to the samples. */
+ void *data;
+ } AC_ToneCurve;
+
+/******************************************************************************/
+
+
+/** <p>A simple 16-patch calibrated CMYK color space specification.</p>
+ <p>The 16 <code>AC_XYZColor</code> values are the absolute XYZ values of all 16 CMYK ink combinations, including
+ paper white. The illuminant is assumed to be D50.</p>
+ <p>The <code>AC_ToneCurve</code> values represent the dot gain curves for each ink.
+ Each one maps from ink percentage to the dot area percentage.</p>
+*/
+typedef struct _t_ACCalCMYK
+ {
+
+ /** Absolute XYZ value of a CMYK ink combination: paper white. */
+ AC_XYZColor w;
+
+ /** Absolute XYZ value of a CMYK ink combination: K. */
+ AC_XYZColor k;
+
+ /** Absolute XYZ value of a CMYK ink combination: C. */
+ AC_XYZColor c;
+
+ /** Absolute XYZ value of a CMYK ink combination: M. */
+ AC_XYZColor m;
+
+ /** Absolute XYZ value of a CMYK ink combination: Y. */
+ AC_XYZColor y;
+
+ /** Absolute XYZ value of a CMYK ink combination: CM. */
+ AC_XYZColor cm;
+
+ /** Absolute XYZ value of a CMYK ink combination: CY. */
+ AC_XYZColor cy;
+
+ /** Absolute XYZ value of a CMYK ink combination: CK. */
+ AC_XYZColor ck;
+
+ /** Absolute XYZ value of a CMYK ink combination: MY. */
+ AC_XYZColor my;
+
+ /** Absolute XYZ value of a CMYK ink combination: MK. */
+ AC_XYZColor mk;
+
+ /** Absolute XYZ value of a CMYK ink combination: YK. */
+ AC_XYZColor yk;
+
+ /** Absolute XYZ value of a CMYK ink combination: CMY. */
+ AC_XYZColor cmy;
+
+ /** Absolute XYZ value of a CMYK ink combination: CMK. */
+ AC_XYZColor cmk;
+
+ /** Absolute XYZ value of a CMYK ink combination: CYK. */
+ AC_XYZColor cyk;
+
+ /** Absolute XYZ value of a CMYK ink combination: MYK. */
+ AC_XYZColor myk;
+
+ /** Absolute XYZ value of a CMYK ink combination: CMYK. */
+ AC_XYZColor cmyk;
+
+ /** Dot gain curve for the cyan ink. */
+ AC_ToneCurve cTRC;
+
+ /** Dot gain curve for the magenta ink. */
+ AC_ToneCurve mTRC;
+
+ /** Dot gain curve for the yellow ink. */
+ AC_ToneCurve yTRC;
+
+ /** Dot gain curve for the black ink. */
+ AC_ToneCurve kTRC;
+
+ /** Adds a gamma curve to the output XYZ values,
+ after the CLUT. This was used by old versions of Photoshop,
+ and is now obsolete. It should always be set to <code>1.0</code>. */
+ double opticalGamma;
+
+ /** The absolute XYZ value of paper white. It should be a duplicate of the
+ <code>w</code> entry. */
+ AC_XYZColor white;
+
+ /** The absolute XYZ value of a legal (within total ink limits) four-color CMYK black. It is currently ignored. */
+ AC_XYZColor black;
+ } ACCalCMYK;
+
+
+/******************************************************************************/
+
+
+/** Floating-point Lab color. Pure white is encoded as <code>100.0, 0.0, 0.0</code>. The
+ usual <code>a</code> and <code>b</code> range is <code>-128.0</code> to <code>+127.0</code>, but this structure supports any
+ <code>a</code> and <code>b</code> range.
+ @see ACMakeCalLab
+*/
+typedef struct _t_AC_LabColor
+{
+ double L;
+ double a;
+ double b;
+ } AC_LabColor;
+
+/******************************************************************************/
+
+
+/** A calibrated grayscale space specification.
+ @see ACMakeCalGray
+*/
+typedef struct _t_ACCalGray
+ {
+ /** Gamma value. Normal values are greater than or equal to <code>1.0</code>. */
+
+ double gamma;
+
+ /** Absolute XYZ value of a monitor white point (illuminant). The Y-value
+ should be equal to <code>1.0</code>. */
+
+ AC_XYZColor white;
+
+ /** Absolute XYZ value of a monitor black point. */
+
+ AC_XYZColor black;
+ } ACCalGray;
+
+/******************************************************************************/
+
+
+/** A calibrated RGB space specification.
+ The <code>red</code>, <code>green</code>, and <code>blue</code> members represent columns
+ of the matrix used to convert between RGB values and XYZ values.
+ Normally, red + green + blue should exactly equal white (even if the
+ monitor black point is non-zero). This means that, unless the monitor
+ black point is zero, these entries are not equal to the absolute
+ XYZ values of the pure RGB components (due to non-zero offsets in the
+ other two components). This interpretation of these entries is used to
+ maximize compatibility with the PDF <code>CalRGB</code> color space, which is defined
+ using a matrix (rather than component XYZ values).
+ @see ACMakeCalRGB
+*/
+typedef struct _t_ACCalRGB
+ {
+
+ /** Red gamma value for each component. Normal values are greater than or
+ equal to <code>1.0</code>. */
+ double redGamma;
+
+ /** Green gamma value for each component. Normal values are greater than or
+ equal to <code>1.0</code>. */
+ double greenGamma;
+
+ /** Blue gamma value for each component. Normal values are greater than or
+ equal to <code>1.0</code>. */
+ double blueGamma;
+
+ /** Red column of the matrix used to convert between RGB values and XYZ values. */
+ AC_XYZColor red;
+
+ /** Green column of the matrix used to convert between RGB values and XYZ values. */
+ AC_XYZColor green;
+
+ /** Blue column of the matrix used to convert between RGB values and XYZ values. */
+ AC_XYZColor blue;
+
+ /** The absolute XYZ value of the monitor white point (illuminant). The Y-value
+ shall be equal to <code>1.0</code>. See <i>CalRGB Color Spaces</i> in the <i>PDF Reference</i>. */
+ AC_XYZColor white;
+
+ /** The absolute XYZ value of the monitor black point. */
+ AC_XYZColor black;
+ } ACCalRGB;
+
+/******************************************************************************/
+
+
+/**
+ A calibrated Lab color space specification. The usual <code>min</code> and <code>max</code> values for <code>rangeA</code> and
+ <code>rangeB</code> are <code>-128</code> and <code>+127</code>.
+ @see ACMakeCalLab
+*/
+typedef struct _t_ACCalLab
+ {
+
+ /** Color space white point. The Y value should be equal to <code>1.0</code>. */
+
+ AC_XYZColor white;
+
+ /** Color space black point. It is currently ignored by ACE when creating
+ profiles, and is always set to zero when extracting from profiles. */
+
+ AC_XYZColor black;
+
+ /** Range limits for the <code>a*</code> component. Values outside this
+ range are clipped to this range. */
+
+ struct
+ {
+ /** The usual value is <code>-128</code>. */
+ ASInt32 min;
+ /** The usual value <code>+127</code>. */
+ ASInt32 max;
+ } rangeA;
+
+ /** Range limits for the <code>b*</code> component. Values outside this
+ range are clipped to this range. */
+
+ struct
+ {
+ /** The usual value is <code>-128</code>. */
+ ASInt32 min;
+ /** The usual value <code>+127</code>. */
+ ASInt32 max;
+ } rangeB;
+ } ACCalLab;
+
+/** Constant key values for an <code>AC_Settings</code> object.
+ @see ACGetSettingsProfile
+ @see ACGetSettingsString
+ @see ACGetSettingsUnsigned32
+*/
+typedef enum
+ {
+ /** Settings file name string (if different than the file name). */
+ AC_Key_Name = FOUR_CHAR_CODE ('name'),
+
+ /** Settings file description string. */
+ AC_Key_Description = FOUR_CHAR_CODE ('desc'),
+
+ /** Name of application to write this settings file. */
+ AC_Key_WriterName = FOUR_CHAR_CODE ('wNam'),
+
+ /** Working RGB profile. */
+ AC_Key_WorkingRGB = FOUR_CHAR_CODE ('wRGB'),
+
+ /** Working CMYK profile. */
+ AC_Key_WorkingCMYK = FOUR_CHAR_CODE ('wCMY'),
+
+ /** Working gray profile. */
+ AC_Key_WorkingGray = FOUR_CHAR_CODE ('wGry'),
+
+ /** Working spot profile. */
+ AC_Key_WorkingSpot = FOUR_CHAR_CODE ('wSpt'),
+
+ /** RGB color management policy (AC_Policy <code>enum</code>). */
+ AC_Key_PolicyRGB = FOUR_CHAR_CODE ('pRGB'),
+
+ /** CMYK color management policy (AC_Policy <code>enum</code>). */
+ AC_Key_PolicyCMYK = FOUR_CHAR_CODE ('pCMY'),
+
+ /** Gray color management policy (AC_Policy <code>enum</code>). */
+ AC_Key_PolicyGray = FOUR_CHAR_CODE ('pGry'),
+
+ /** Ask about profile mismatches when opening (<code>0</code> = no, <code>1</code> = yes). */
+ AC_Key_MismatchAskOpening = FOUR_CHAR_CODE ('mAsk'),
+
+ /** Ask about profile mismatches when pasting (<code>0</code> = no, <code>1</code> = yes). */
+ AC_Key_MismatchAskPasting = FOUR_CHAR_CODE ('pAsk'),
+
+ /** Ask about missing profile when opening (<code>0</code> = no, <code>1</code> = yes). */
+ AC_Key_MissingAskOpening = FOUR_CHAR_CODE ('misA'),
+
+ /** Conversion engine CMS code (4-char code, stored as <code>unsigned32</code>). */
+ AC_Key_EngineCMS = FOUR_CHAR_CODE ('eCMS'),
+
+ /** Conversion engine CMM code (4-char code, stored as <code>unsigned32</code>). */
+ AC_Key_EngineCMM = FOUR_CHAR_CODE ('eCMM'),
+
+ /** Conversion intent (standard ICC integer encoding). */
+ AC_Key_Intent = FOUR_CHAR_CODE ('cInt'),
+
+ /** Conversion black point compensation (<code>0</code> = no, <code>1</code> = yes). */
+ AC_Key_KPC = FOUR_CHAR_CODE ('kpc '),
+
+ /** Dither conversions between 8-bit color spaces (<code>0</code> = no, <code>1</code> = yes). */
+ AC_Key_Dither = FOUR_CHAR_CODE ('dith'),
+
+ /** Enable or disable monitor compression (<code>0</code> = off, <code>1</code> = on). */
+ AC_Key_CompressionEnabled = FOUR_CHAR_CODE ('mce '),
+
+ /** Monitor compression percent (in percent). */
+ AC_Key_CompressionPercent = FOUR_CHAR_CODE ('mcp '),
+
+ /** Enable or disable RGB blending gamma (<code>0</code> = off, <code>1</code> = on). */
+ AC_Key_BlendGammaEnabled = FOUR_CHAR_CODE ('bge '),
+
+ /** RGB blending gamma value (<code>100</code> = gamma 1.00). */
+ AC_Key_BlendGammaValue = FOUR_CHAR_CODE ('bgv '),
+
+ /** Proof type (AC_ProofType <code>enum</code>). */
+ AC_Key_ProofType = FOUR_CHAR_CODE ('pTyp'),
+
+ /** Proof profile. */
+ AC_Key_ProofProfile = FOUR_CHAR_CODE ('pPrf'),
+
+ /** Display simulation (AC_Simulate <code>enum</code>). */
+ AC_Key_Simulate = FOUR_CHAR_CODE ('dSim'),
+
+ /** This constant forces the <code>enum</code> to be 32 bits wide. */
+ AC_Key_MaxEnum = 0xFFFFFFFFL
+
+} AC_SettingsKey;
+
+
+/** Constant values that determine the type of an AC_Settings object.
+ @see ACMakePresetList
+ @see ACMakeSettings
+*/
+typedef enum
+{
+ /** Used to hold global color settings, such as working spaces. */
+ AC_SettingsType_Color = FOUR_CHAR_CODE ('AsCs'),
+
+ /** Used to specify the parameters for proofing a document.
+ The Proof Setup Files generally control a per-window setting. */
+ AC_SettingsType_Proof = FOUR_CHAR_CODE ('AsPs'),
+
+ /** This constant forces the <code>enum</code> to be 32 bits wide. */
+ AC_SettingsType_MaxEnum = 0xFFFFFFFFL
+} AC_SettingsType;
+
+/**
+ Constant values for ICC color space signatures.
+ @see ACProfileColorSpace
+*/
+typedef enum
+{
+
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_XYZ = FOUR_CHAR_CODE ('XYZ '),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_Lab = FOUR_CHAR_CODE ('Lab '),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_RGB = FOUR_CHAR_CODE ('RGB '),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_Gray = FOUR_CHAR_CODE ('GRAY'),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_CMYK = FOUR_CHAR_CODE ('CMYK'),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_Luv = FOUR_CHAR_CODE ('Luv '),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_YCbCr = FOUR_CHAR_CODE ('YCbr'),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_HSV = FOUR_CHAR_CODE ('HSV '),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_HLS = FOUR_CHAR_CODE ('HLS '),
+ /**
+ @ingroup StdICCColorSpaceSignatures
+ */
+ AC_Space_CMY = FOUR_CHAR_CODE ('CMY '),
+
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_2Component = FOUR_CHAR_CODE ('2CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_3Component = FOUR_CHAR_CODE ('3CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_4Component = FOUR_CHAR_CODE ('4CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_5Component = FOUR_CHAR_CODE ('5CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_6Component = FOUR_CHAR_CODE ('6CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_7Component = FOUR_CHAR_CODE ('7CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_8Component = FOUR_CHAR_CODE ('8CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_9Component = FOUR_CHAR_CODE ('9CLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_10Component = FOUR_CHAR_CODE ('ACLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_11Component = FOUR_CHAR_CODE ('BCLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_12Component = FOUR_CHAR_CODE ('CCLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_13Component = FOUR_CHAR_CODE ('DCLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_14Component = FOUR_CHAR_CODE ('ECLR'),
+ /**
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_15Component = FOUR_CHAR_CODE ('FCLR'),
+ /** Kodak's PhotoYCC space is stored as a generic 3-component space.
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_PhotoYCC = AC_Space_3Component,
+ /** A null color space. Used to represent spot-only color spaces.
+ @ingroup GenericICCColorSpaceSignatures
+ */
+ AC_Space_Null = 0,
+
+ /** This constant forces the enum to be 32 bits wide. */
+ AC_Space_MaxEnum = 0xFFFFFFFFL
+
+} AC_ColorSpace;
+
+
+/** Constants that specify the color space of working profiles.
+ This enumeration is added for the purpose of ACGetWorkingSpaceProfile().
+ The profile returned by this function must be unreferenced by the caller.
+ @see ACGetWorkingSpaceProfile
+ */
+typedef enum
+{
+ /** Grayscale profile. */
+ kACWorkingGray = 0,
+ /** RGB profile. */
+ kACWorkingRGB = 1,
+ /** CMYK profile. */
+ kACWorkingCMYK = 2,
+ /** Working spaces. */
+ kACWorkingSpaces = 3
+}ACWorkingSpace;
+
+#ifdef WIN_ENV
+#define kACEMaxPathLength 260
+#else
+#define kACEMaxPathLength 256
+#endif
+
+//typedef struct _t_PDColorConvertParamsRec *PDColorConvertParams;
+
+/* Object Attributes: these are arranged as a bitmap. In order to */
+/* match, one must satisfy all ON bits. There are obviously combinations */
+/* that are redundant or don't make sense. */
+#define _FLG(n) (1 << n)
+
+/** Object attributes: these are arranged as a bitmap. */
+typedef enum
+{
+ /** Object is an image. */
+ kColorConvObj_Image = _FLG(0),
+
+ /** Object is a JPEG image. */
+ kColorConvObj_JPEG = _FLG(1),
+
+ /** Object is a JPEG2000 image. */
+ kColorConvObj_JPEG2000 = _FLG(2),
+
+ /** Image is in a lossy space. */
+ kColorConvObj_Lossy = _FLG(3),
+
+ /** Image is in a non-lossy space. */
+ kColorConvObj_Lossless = _FLG(4),
+
+ /** Object is text. */
+ kColorConvObj_Text = _FLG(5),
+
+ /** Object is line-art (fill, stroke). */
+ kColorConvObj_LineArt = _FLG(6),
+
+ /** Object is a smooth shade. */
+ kColorConvObj_Shade = _FLG(7),
+
+ /** Object is not opaque. */
+ kColorConvObj_Transparent = _FLG(8),
+
+ /** Object overprints. */
+ kColorConvObj_Overprinting = _FLG(9),
+
+ /** Overprint mode (OPM) is set to <code>1</code>. */
+ kColorConvObj_OverprintMode = _FLG(10),
+
+ /** Any object. */
+ kColorConvObj_AnyObject = (_FLG(0)|_FLG(5)|_FLG(6)|_FLG(7)),
+
+ /** Maximum enum value. */
+ kColorConvObj_MaxEnum = 0xFFFFFFFFL
+
+} PDColorConvertObjectAttributeFlags;
+typedef ASUns32 PDColorConvertObjectAttributes;
+
+
+/** Color Space attributes: these are arranged as a bitmap. */
+typedef enum
+{
+ /** Device color space. */
+ kColorConvDeviceSpace = _FLG(0),
+
+ /** Calibrated color space. */
+ kColorConvCalibratedSpace = _FLG(1),
+
+ /** Alternate color space. */
+ kColorConvAlternateSpace = _FLG(3), /* This is an alternate color space */
+
+ /** Base of an indexed space. */
+ kColorConvBaseSpace = _FLG(4), /* Base of an indexed space */
+
+ /** Indexed color space. */
+ kColorConvIndexedSpace = _FLG(5),
+
+ /** Separation color space. */
+ kColorConvSeparationSpace = _FLG(6),
+
+ /** DeviceN color space. */
+ kColorConvDeviceNSpace = _FLG(7),
+
+ /** NChannel color space. */
+ kColorConvNChannelSpace = _FLG(8),
+
+ /** RGB color space. This should only be set if either Device space (unless Lab) or Calibrated space is set. */
+ kColorConvRGBSpace = _FLG(9),
+
+ /** CMYK color space. This should only be set if either Device space (unless Lab) or Calibrated space is set. */
+ kColorConvCMYKSpace = _FLG(10),
+
+ /** Gray color space. This should only be set if either Device space (unless Lab) or Calibrated space is set. */
+ kColorConvGraySpace = _FLG(11),
+
+ /** Lab color space. */
+ kColorConvLabSpace = _FLG(12),
+
+ /** Any color space. */
+ kColorConvAnySpace = (_FLG(0)|_FLG(1)|_FLG(2)|_FLG(3)|_FLG(4)|_FLG(5)|_FLG(6)|_FLG(7)|_FLG(8)|_FLG(9)|_FLG(10)|_FLG(11)|_FLG(12)),
+
+ /** Maximum enum value. */
+ kColorConvSpace_MaxEnum = 0xFFFFFFFFL
+} PDColorConvertSpaceTypeFlags;
+typedef ASUns32 PDColorConvertSpaceType;
+
+/** Action types: these specify what to do when an object is matched. */
+typedef enum
+{
+ /** Do nothing but handle ink aliases. */
+ kColorConvPreserve,
+
+ /** Convert to target space. */
+ kColorConvConvert,
+
+ /** Convert calibrated space to device space. */
+ kColorConvDecalibrate,
+
+ /** Convert NChannel space to DeviceN space. */
+ kColorConvDownConvert,
+
+ /** Maximum enum value. */
+ kColorConvMaxEnum = 0xFFFFFFFFL
+} PDColorConvertActionType;
+
+/**
+Defines a color conversion action for a combination
+of attributes, color space/family, and rendering intent. If all three
+match, the actions in the action list will be executed for any given
+object.
+*/
+typedef struct
+{
+ /** Object attribute. The flags must all match for a match. */
+ PDColorConvertObjectAttributes mMatchAttributesAll;
+
+ /** Object attribute. The flags will allow any match. */
+ PDColorConvertObjectAttributes mMatchAttributesAny;
+
+ /** Type of color space. The flags must all match for a match. */
+ PDColorConvertSpaceType mMatchSpaceTypeAll;
+
+ /** Type of color space. The flags will allow any match. */
+ PDColorConvertSpaceType mMatchSpaceTypeAny;
+
+ /** The rendering intent of the object. If this is <code>AC_UseProfileIntent</code>, this action applies to any intent. */
+ AC_RenderIntent mMatchIntent;
+
+ /** Defines the action, indicating what to do when an object matches this record. */
+ PDColorConvertActionType mAction;
+
+ /** If converting, use this intent to override the object's intent for performing color conversion.
+ <code>AC_UseProfileIntent</code> means that the intent of the object must not be overridden. */
+ AC_RenderIntent mConvertIntent;
+
+
+ /** The target profile for the conversion. If the output intent is embedded, this should be the output intent profile. */
+ AC_Profile mConvertProfile;
+
+ /** If <code>true</code>, embed the target profile. If <code>false</code> the resulting color is Device, if possible. */
+ ASBool mEmbed;
+
+ /** If <code>true</code>, perform a black-preserving transform when converting. */
+ ASBool mPreserveBlack;
+
+ /* (todo: perhaps there should be a "use current settings" option in */
+ /* addition to true/false) */
+ /** If <code>true</code>, turn on black point compensation for color conversions. */
+ ASBool mUseBlackPointCompensation;
+
+ /** For ink actions (which describe a single colorant, whether used in
+ Separation or DeviceN, and which are not matched using the above
+ matching fields) this describes the colorant of the ink.
+ */
+ ASAtom mColorantName;
+
+ /** Ink alias; this only applies to ink actions. */
+ ASAtom mAlias;
+
+ /** <code>true</code> if this ink is a process ink. */
+ ASBool mIsProcessColor;
+
+ /** For internal use. */
+ void * mInternal;
+
+} PDColorConvertActionRec, *PDColorConvertAction;
+
+
+/**
+The list of actions in <code>PDColorConvertParams</code> is analogous
+to the list of filters in most email clients: each object is
+compared against the selection criteria for each of the actions,
+in order, until a matching action is found. The action is then
+executed on the object. Note that actions do not chain, except
+in the case of aliased ink definitions.
+*/
+typedef struct //_t_PDColorConvertParamsRec
+{
+ /** The number of color conversion actions. */
+ ASInt32 mNumActions;
+
+ /** The actions, arranged sequentially in memory. */
+ PDColorConvertAction mActions;
+
+ /** The number of specific inks supplied. */
+ ASInt32 mNumInks;
+
+ /** The list of ink actions, arranged sequentially in memory. */
+ PDColorConvertAction mInks;
+
+} PDColorConvertParamsRec, *PDColorConvertParams;
+
+/* Added min/max text size and promote gray to CMYK flag. */
+/**
+ Defines a color conversion action for a combination
+ of attributes, color space/family, and rendering intent. If all three
+ match, actions in the action list will be executed for any given
+ object.
+*/
+typedef struct
+{
+ /** The size (in bytes) of this structure. */
+ ASSize_t mSize;
+
+ /** The object attributes. The flags must all match for a match. */
+ PDColorConvertObjectAttributes mMatchAttributesAll;
+
+ /** The object attributes. The flags will allow any match. */
+ PDColorConvertObjectAttributes mMatchAttributesAny;
+
+ /** The type of color space. The flags must all match for a match. */
+ PDColorConvertSpaceType mMatchSpaceTypeAll;
+
+ /** The type of color space. The flags will allow any match. */
+ PDColorConvertSpaceType mMatchSpaceTypeAny;
+
+ /** The rendering intent of the object. If this is <code>AC_UseProfileIntent</code>, this action applies to any intent. */
+ AC_RenderIntent mMatchIntent;
+
+ /** The font size to match for text objects. */
+ double mMatchMinFontSize, mMatchMaxFontSize;
+
+ /** Defines the action, specifying what to do when an object matches this record. */
+ PDColorConvertActionType mAction;
+
+ /** If converting, use this intent to override the object's intent for performing color conversion.
+ <code>AC_UseProfileIntent</code> means that the intent of the object must not be overridden. */
+ AC_RenderIntent mConvertIntent;
+
+ /** The target profile for the conversion. If the output intent is embedded, this should be the output intent profile. */
+ AC_Profile mConvertProfile;
+
+ /** If <code>true</code>, embed the target profile. If <code>false</code>, the resulting color is Device, if possible. */
+ ASBool mEmbed;
+
+ /** If <code>true</code>, perform a black-preserving transform when converting. */
+ ASBool mPreserveBlack;
+
+ /** If <code>true</code>, promote DeviceGray objects to DeviceCMYK with <code>K = 1.0 - gray value</code>. */
+ ASBool mPromoteGrayToCMYK;
+
+ /* (todo: perhaps there should be a "use current settings" option in */
+ /* addition to true/false) */
+ /** If <code>true</code>, turn on black point compensation for color conversions. */
+ ASBool mUseBlackPointCompensation;
+
+ /** For ink actions (which describe a single colorant, whether used in
+ Separation or DeviceN, and which are not matched using the above
+ matching fields) this describes the colorant of the ink.
+ */
+ ASAtom mColorantName;
+
+ /** Ink alias; this only applies to ink actions. */
+ ASAtom mAlias;
+
+ /** <code>true</code> if this ink is a process ink. */
+ ASBool mIsProcessColor;
+
+ /** If <code>true</code>, use a primary-preserving CMYK to CMYK transform. */
+ ASBool mPreserveCMYKPrimaries;
+
+ /** For internal use. */
+ void * mInternal;
+
+} PDColorConvertActionRecEx, *PDColorConvertActionEx;
+
+
+/**
+The list of actions in <code>PDColorConvertParams</code> is analogous
+to the list of filters in most email clients: each object is
+compared against the selection criteria for each of the actions,
+in order, until a matching action is found. The action is then
+executed on the object. Note that actions do not chain, except
+in the case of aliased ink definitions.
+This is the <i>Extended</i> structure, which supports additional elements
+in the <code>PDColorConvertActionRecEx</code> action.
+*/
+typedef struct //_t_PDColorConvertParamsRecEx
+{
+ /** The size of this data structure. */
+ ASSize_t mSize;
+
+ /** The number of color conversion actions. */
+ ASInt32 mNumActions;
+
+ /** The actions, arranged sequentially in memory. */
+ PDColorConvertActionEx mActions;
+
+ /** The number of specific inks supplied. */
+ ASInt32 mNumInks;
+
+ /** The list of ink actions, arranged sequentially in memory. */
+ PDColorConvertActionEx mInks;
+
+} PDColorConvertParamsRecEx, *PDColorConvertParamsEx;
+
+// Callback completion code
+/** Callback completion code. */
+typedef enum
+{
+ /** Success. */
+ PDCompletionSuccess,
+
+ /** Continue. */
+ PDCompletionContinue,
+
+ /** Abort. */
+ PDCompletionAbort
+} PDCompletionCode;
+
+/** Callback reason code. */
+typedef enum
+{
+ /** None. */
+ PDReasonNone,
+
+ /** None implemented. */
+ PDReasonNotImplemented
+} PDReasonCode;
+
+/* Callback type for report proc */
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDColorConvertReportProc)(
+ PDColorConvertObjectAttributes objectType,
+ PDColorConvertSpaceType colorSpaceType,
+ PDColorConvertActionType action,
+ PDCompletionCode completionCode,
+ PDReasonCode reasonCode,
+ void *userData);
+
+
+/* Swatchbook API types */
+/** Swatchbook database object. */
+typedef void* ACSwatchBookDB;
+
+/** Swatchbook object. */
+typedef void* ACSwatchBook;
+
+#ifdef __cplusplus
+}
+#endif
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_AcroColorExpT */
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorHFT.h
new file mode 100644
index 0000000..0c141bf
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorHFT.h
@@ -0,0 +1,78 @@
+/*
+** AcroColorHFT.h
+**
+** The Acrobat color Function Table
+**
+** (c) Copyright 2002-2006, Adobe Systems, Inc. All Rights Reserved.
+** Author: Mark Donohoe
+*/
+
+#ifndef _H_AcroColorHFT
+#define _H_AcroColorHFT
+
+#if PLUGIN
+
+#include "AcroColorExpT.h"
+
+#else
+#include "HFTTypes.h"
+
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NPROC /* may be already defined */
+#undef NPROC
+#endif
+
+/* Enumerate the selectors */
+#define PROC(returnType, name, params) \
+ name##SEL,
+#define NPROC PROC
+#define ANPROC NPROC
+#define SPROC(returnType, name, params, stubProc) PROC(returnType, name, params)
+#define NOPROC(name) PROC(ignored, DONOTUSE_##name, ignored)
+#define UPROC PROC
+#define UNPROC NPROC
+#define USPROC SPROC
+enum {
+ AcroColorBAD_SELECTOR,
+ #include "AcroColorProcs.h"
+ AcroColorNUMSELECTORSplusOne
+};
+
+#define AcroColorNUMSELECTORS (AcroColorNUMSELECTORSplusOne - 1)
+
+#undef PROC
+#undef NPROC
+#undef ANPROC
+#undef SPROC
+#undef NOPROC
+#undef UPROC
+#undef UNPROC
+#undef USPROC
+
+#define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+#define ANPROC NPROC
+#define PROC NPROC
+#define SPROC(returnType, name, params, stubProc) PROC(returnType, name, params)
+#define NOPROC(name)
+ #include "AcroColorProcs.h"
+#undef PROC
+#undef NPROC
+#undef ANPROC
+#undef SPROC
+#undef NOPROC
+
+extern HFT gAcroColorHFT;
+
+void SetUpAcroColorHFTServer(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_AcroColorHFT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorProcs.h
new file mode 100644
index 0000000..f10dd53
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorProcs.h
@@ -0,0 +1,1038 @@
+/*
+** AcroColorProcs.h
+**
+** (c) Copyright 2002,2004,2006 Adobe Systems, Inc. All Rights Reserved.
+** Exposure to ACE functions
+**
+*/
+
+#if !EXTERNAL_ACROCOLORPROCS_USER /* External user of this header file, e.g. PISDK */
+#if CAN_EDIT && !READER /* Restore X Macros -- was CAN_EDIT */
+#define XNPROC(returnType, name, params) NPROC(returnType, name, params)
+#define XPROC(returnType, name, params) PROC(returnType, name, params)
+#define XSPROC(returnType, name, params, stubProc) SPROC(returnType, name, params, stubProc)
+#else
+#define XNPROC(returnType, name, params) NOPROC(name)
+#define XPROC(returnType, name, params) NOPROC(name)
+#define XSPROC(returnType, name, params, stubProc) NOPROC(name)
+#endif /* CAN_EDIT && !READER */
+
+#endif /* EXTERNAL_AcroColorPROCS_USER */
+
+/**
+ Gets the number of Color Management System/Color Management
+ Module (CMS/CMM) choices available for the AcroColor engine
+ (ACE).
+ @param count (Filled by the method) A pointer to the count
+ value.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACEngineInfo
+ @see ACSetEngine
+*/
+XNPROC(AC_Error, ACEngineCount, (ASUns32 *count))
+
+/**
+ Gets information for a CMS/CMM in the AcroColor engine (ACE)
+ by index. The CMS and CMM identifiers specify an engine
+ to the ACE. Engine names should only
+ be used as the text for popup menus. It is better to store
+ the identifiers in settings files (rather than names), because
+ they are independent of localization.
+ @param index The zero-based index of the CMS/CMM. The highest
+ legal value is <code>AC_EngineCount - 1</code>.
+ @param name (Filled by the method) Optional. If it is not <code>NULL</code>,
+ the parameter returns the name of the CMS/CMM.
+ @param cmsID (Filled by the method) Returns the CMS identifier.
+
+ @param cmmID (Filled by the method) Returns the CMM identifier.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACEngineCount
+ @see ACSetEngine
+
+*/
+XNPROC(AC_Error, ACEngineInfo, (ASUns32 index, AC_String *name, ASUns32 *cmsID, ASUns32 *cmmID))
+
+/**
+ Sets the AcroColor engine (ACE) for the system, changing
+ the global default CMS/CMM choice.
+
+ <p>This method rebuilds all existing transforms using the new
+ engine. </p>
+
+ <p>If the user aborts the process, or if the ACE runs out of
+ resources during the rebuilding process, an error code is
+ returned and some existing transforms may still use the
+ previous engine choice. Everything will still work, since
+ multiple engines can be used at once. Call the method again
+ to restart the transform rebuilding process. </p>
+
+ @param cmsID The Color Management System identifier
+ for the new engine default, as returned by ACEngineInfo().
+
+ @param cmmID The Color Management Module identifier
+ for the new engine default, as returned by ACEngineInfo().
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACEngineCount
+ @see ACEngineInfo
+*/
+XNPROC(AC_Error, ACSetEngine, (ASUns32 cmsID, ASUns32 cmmID))
+
+
+/**
+ Creates a list of device color profiles of a given type.
+
+ <p>Builds a list of those profiles from the database that meet
+ the criterion of the specified selector. If the profile
+ database has never been built, it will be automatically
+ built without a progress callback. Clients should call
+ ACUnReferenceProfileList() when done with the profile list. </p>
+
+ @param list (Filled by the method) A pointer to the new
+ profile list object.
+ @param selector The code for the type of device profile
+ to include in the list.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACProfileListCount
+ @see ACProfileListItemCode
+ @see ACProfileListItemDescription
+ @see ACUnReferenceProfileList
+
+*/
+XNPROC(AC_Error, ACMakeProfileList,(AC_ProfileList *list, AC_SelectorCode selector ))
+
+/**
+ Gets the number of profiles in a device color profile list.
+
+ @param list The profile list.
+ @param count (Filled by the method) A pointer to the number
+ of profiles in the list.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeProfileList
+ @see ACProfileListItemCode
+ @see ACProfileListItemDescription
+
+*/
+XNPROC(AC_Error, ACProfileListCount, (AC_ProfileList list, ASUns32 *count) )
+
+/**
+ Returns the description string of a specified profile in
+ a list. The returned description string always contains
+ both ASCII and Unicode data, even if the profile itself
+ only contains an ASCII version. You can store only the Unicode
+ data in settings files if you wish; the ACProfileFromDescription()
+ method finds the correct profile when passed the Unicode-only
+ string.
+ @param list The profile list.
+ @param index The index for the profile in the list.
+ @param description (Filled by the method) A pointer to
+ the profile description string.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeProfileList
+ @see ACMakeString
+ @see ACProfileFromDescription
+ @see ACProfileListCount
+ @see ACProfileListItemCode
+
+*/
+XNPROC(AC_Error, ACProfileListItemDescription, (AC_ProfileList list, ASUns32 index, AC_String *description ))
+
+/**
+ Gets the profile code of a specified profile in a profile
+ list.
+
+ <p>While this routine is not absolutely required, since the
+ description string is always a unique reference, profile
+ codes have the advantage that they are localization-independent. </p>
+
+ @param list The profile list.
+ @param index The index for the profile in the list.
+ @param code (Filled by the method) A pointer to the profile
+ code. If the specified profile does not have a code, this method returns AC_Profile_Null.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeProfileList
+ @see ACProfileListCount
+ @see ACProfileListItemDescription
+*/
+XNPROC(AC_Error, ACProfileListItemCode,(AC_ProfileList list, ASUns32 index, AC_ProfileCode *code ))
+
+/**
+ Decrements the reference count of a device color profile
+ list object. If this causes the object's reference count
+ to reach zero, the method deletes it.
+ @param list The profile list object.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeProfileList
+*/
+XNPROC(AC_Error, ACUnReferenceProfileList, (AC_ProfileList list))
+
+
+/**
+ Creates a list of preset AcroColor engine (ACE) settings
+ of the specified type. Clients should call ACUnReferencePresetList()
+ when done with the preset list.
+
+ <p>A preset list is a list of predefined color settings that
+ specifies the source and destination working color profiles
+ to be used for color conversion. </p>
+
+ @param list (Filled by the method) A pointer to the new
+ preset list object.
+ @param type The settings type (AC_SettingsType_Color or AC_SettingsType_Proof).
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACPresetListCount
+ @see ACPresetListItemFile
+ @see ACUnReferencePresetList
+*/
+XNPROC(AC_Error, ACMakePresetList, (AC_PresetList *list, AC_SettingsType type))
+
+/**
+ Gets the number of predefined color settings, as listed
+ in the color management settings in
+ the Acrobat user interface.
+ @param list The preset list object.
+ @param count (Filled by the method) A pointer to the number
+ of settings in the list.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakePresetList
+ @see ACPresetListItemFile
+ @see ACUnReferencePresetList
+*/
+XNPROC(AC_Error, ACPresetListCount, (AC_PresetList list, ASUns32 *count))
+
+/**
+ Gets the file specification for a preset settings item in
+ a preset list.
+ @param list The preset list object.
+ @param index The item index in the list.
+ @param file (Filled by the method) A pointer to the file
+ specification for the item.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACLoadSettings
+ @see ACMakePresetList
+ @see ACPresetFileToName
+ @see ACPresetListCount
+ @see ACUnReferencePresetList
+
+*/
+XNPROC(AC_Error, ACPresetListItemFile, (AC_PresetList list, ASUns32 index, AC_FileSpec* file))
+
+/**
+ Translates a preset settings file specification to a name
+ ready to be displayed in menus (with directory paths and
+ file extensions removed). The client should call ACUnReferenceString()
+ when done with the name.
+ <ul>
+ <li> If the file contains an internal name tag, the returned
+ string is created from the internal name.</li>
+ <li> If the file does not contain an internal name tag, the
+ returned string is built from the file name. In this case,
+ the method assumes that the file name and the ASCII data of the returned string are in the local script
+ code.</li>
+ </ul>
+ @param file A pointer to the preset file specification.
+ @param name (Filled by the method) A pointer to the display name string.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACPresetListItemFile
+ @see ACUnReferenceString
+
+*/
+XNPROC(AC_Error, ACPresetFileToName, (const AC_FileSpec* file, AC_String* name))
+
+/**
+ Decrements the reference count of a preset list object.
+ If this causes the object's reference count to reach zero,
+ the method deletes it.
+ @param list The preset list object.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakePresetList
+*/
+XNPROC(AC_Error, ACUnReferencePresetList, (AC_PresetList list))
+
+
+/**
+ Gets the current color profile for a given key from the
+ AcroColor engine (ACE) <code>settings</code> object.
+ <ul>
+ <li> If the settings file contains a profile entry with the
+ specified key, that profile is returned.</li>
+ <li> If the settings file contains a special <code>NULL</code> entry with
+ the key, a <code>NULL</code> profile is returned.</li>
+ <li> If the settings file contains a string with this key rather
+ than an embedded profile, this method returns an installed profile whose
+ description matches the string, if found. </li>
+ <li> In all other cases, AC_Error_MissingKey is returned.</li>
+ </ul>
+ The method does not check for known keys or legal key values.
+ It is up to the client to write only legal key values, and
+ to verify key values when reading.
+ @param settings The <code>settings</code> object from which the profile
+ is obtained.
+ @param key The value key constant.
+ @param profile (Filled by the method) A pointer to the
+ current color profile value of the given key.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsString
+ @see ACGetSettingsUnsigned32
+ @see ACLoadSettings
+ @see ACMakeSettings
+ @see ACUnReferenceProfile
+ @see ACUnReferenceSettings
+*/
+XNPROC(AC_Error, ACGetSettingsProfile, (AC_Settings settings, AC_SettingsKey key, AC_Profile *profile))
+
+/**
+ Creates an AcroColor engine (ACE) <code>settings</code> object of a given
+ type, with no entries. When done with all operations, call
+ ACUnReferenceSettings() to free the <code>settings</code> object.
+ @param settings (Filled by the method) A pointer to the
+ new <code>settings</code> object.
+ @param type The settings type (AC_SettingsType_Color or AC_SettingsType_Proof).
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetSettingsString
+ @see ACGetSettingsUnsigned32
+ @see ACLoadSettings
+ @see ACUnReferenceSettings
+*/
+XNPROC(AC_Error, ACMakeSettings, (AC_Settings *settings, AC_SettingsType type))
+
+/**
+ Loads the AcroColor engine (ACE) settings from a file.
+
+ <p>This method reads the settings entries from the specified file and stores
+ them in the <code>settings</code> object, including entries with unknown
+ keys or data formats. As a general rule, the client should
+ keep the <code>settings</code> object around so these unknown keys are
+ preserved when the settings are saved out. The only time
+ the client should start with a fresh <code>settings</code> object is
+ when performing another settings load. </p>
+
+ @param settings (Filled by the method) The <code>settings</code> object.
+
+ @param file A pointer to the file specification for the
+ file containing the settings.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetSettingsString
+ @see ACGetSettingsUnsigned32
+ @see ACMakeSettings
+ @see ACPresetListItemFile
+ @see ACUnReferenceSettings
+*/
+XNPROC(AC_Error, ACLoadSettings, (AC_Settings settings, AC_FileSpec *file))
+
+/**
+ Gets the current string value for a given key from the AcroColor
+ engine (ACE) <code>settings</code> object.
+ <ul>
+ <li> If the settings file contains a string entry with the
+ specified key, the method returns the entry.</li>
+ <li> If the settings file contains a special <code>NULL</code> entry with
+ the key, the method returns a <code>NULL</code> string.</li>
+ <li> In all other cases, the method returns AC_Error_MissingKey.</li>
+ </ul>
+ @param settings The <code>settings</code> object from which the string
+ is obtained.
+ @param key The value key constant.
+ @param string (Filled by the method) A pointer to the
+ current string value of the given key.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetSettingsUnsigned32
+ @see ACLoadSettings
+ @see ACMakeSettings
+ @see ACUnReferenceSettings
+ @see ACUnReferenceString
+
+*/
+XNPROC(AC_Error, ACGetSettingsString, (AC_Settings settings, AC_SettingsKey key, AC_String *string))
+
+/**
+ Gets the current numeric value for a given key from the
+ AcroColor engine (ACE) <code>settings</code> object.
+ <ul>
+ <li> If the settings file contains an unsigned 32-bit numeric
+ entry with the specified key, the method returns the entry.</li>
+ <li> In all other cases, the method returns AC_Error_MissingKey. </li>
+ </ul>
+ @param settings The <code>settings</code> object from which the value
+ is obtained.
+ @param key The value key constant.
+ @param value (Filled by the method) A pointer to the current
+ numeric value of the given key.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetSettingsString
+ @see ACLoadSettings
+ @see ACMakeSettings
+ @see ACUnReferenceSettings
+*/
+XNPROC(AC_Error, ACGetSettingsUnsigned32, (AC_Settings settings, AC_SettingsKey key, ASUns32 *value))
+
+/**
+ Decrements the reference count of an AcroColor engine <code>settings</code>
+ object. If this causes the object's reference count to reach
+ zero, the method deletes it.
+ @param settings The <code>settings</code> object.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeSettings
+
+*/
+XNPROC(AC_Error, ACUnReferenceSettings, (AC_Settings settings))
+
+
+/**
+ Gets the description of a device profile. The returned description
+ string contains both ASCII and Unicode data, even if the
+ profile itself only contains ASCII data.
+ @param profile The device color profile.
+ @param description (Filled by the method) A pointer to
+ the description string.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeString
+ @see ACProfileColorSpace
+ @see ACProfileData
+ @see ACProfileListItemDescription
+ @see ACProfileFromDescription
+*/
+XNPROC(AC_Error, ACProfileDescription, (AC_Profile profile, AC_String *description))
+
+/**
+ Finds a profile matching the description string in the database.
+ The client should call ACUnReferenceProfile() when done with
+ the profile.
+ <ul>
+ <li> If the description string contains Unicode text, the Unicode
+ text is used to find the profile. </li>
+ <li> If the description string contains only ASCII text, the
+ method tries to find a match. However, the AcroColor engine
+ requires only Unicode descriptions to be unique, so this
+ might return the wrong profile is in some rare cases. Use
+ ASCII-only description strings only when Unicode description
+ string are unavailable. </li>
+ </ul>
+ @param profile (Filled by the method) A pointer to the
+ device color profile object.
+ @param description The description string.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACMakeString
+ @see ACMonitorProfile
+ @see ACProfileFromCode
+ @see ACProfileListItemDescription
+ @see ACUnReferenceProfile
+*/
+XNPROC(AC_Error, ACProfileFromDescription, (AC_Profile *profile, AC_String description))
+
+/**
+ Creates a device profile from a device profile type code.
+ The client should call ACUnReferenceProfile() when done with
+ the profile.
+ @param profile (Filled by the method) A pointer to the
+ device color profile object.
+ @param code The profile type code.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACMonitorProfile
+ @see ACProfileFromDescription
+ @see ACUnReferenceProfile
+
+*/
+XNPROC(AC_Error, ACProfileFromCode, (AC_Profile *profile, AC_ProfileCode code))
+
+/**
+ Gets a device color profile for a specific monitor device.
+ The returned profile may be either RGB or grayscale. If
+ no profile is specified by the system, the method returns a default
+ platform profile (sRGB on Windows, Apple RGB on Mac OS).
+ The client should call ACUnReferenceProfile() when done with
+ the returned profile.
+ @param profile (Filled by the method) A pointer to the
+ profile object.
+ @param monitorID A pointer to the platform-specific monitor
+ device identifier. On Windows, this is a <code>NULL</code>-terminated ASCII string
+ containing the monitor's device name (for example, <code>"Display"</code>)
+ On Mac OS, this is the monitor's AVID.
+
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACProfileFromCode
+ @see ACProfileFromDescription
+ @see ACUnReferenceProfile
+*/
+XNPROC(AC_Error, ACMonitorProfile, (AC_Profile *profile, void *monitorID))
+
+/**
+ Creates a device color profile object from a data buffer
+ containing the raw ICC profile data. The method copies the data, so
+ the client can dispose of the source data. The client should
+ call ACUnReferenceProfile() when done with the profile.
+ @param profile (Filled by the method) The device profile.
+
+ @param data The buffer containing the device profile data.
+
+ @param dataSize The size in bytes of the data buffer.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACMonitorProfile
+ @see ACProfileFromCode
+ @see ACProfileFromDescription
+ @see ACUnReferenceProfile
+
+*/
+XNPROC(AC_Error, ACMakeBufferProfile, (AC_Profile *profile, void *data, ASUns32 dataSize))
+
+
+/**
+ Creates a device color profile object from a calibrated
+ RGB color space, with the specified rendering intent and
+ descriptive string. The client should call ACUnReferenceProfile()
+ when done with the profile.
+ @param profile (Filled by the method) A pointer to the
+ new device color profile.
+ @param spec The calibrated RGB color space specification.
+
+ @param intent The rendering intent.
+ @param description The description of the new profile. If it is non-<code>NULL</code>, the description must contain ASCII data, and may contain
+ Unicode data also. If it is <code>NULL</code>, a hard-coded default description
+ is used.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMonitorProfile
+ @see ACProfileFromCode
+ @see ACProfileFromDescription
+ @see ACUnReferenceProfile
+*/
+XNPROC(AC_Error, ACMakeCalRGB, (AC_Profile *profile, ACCalRGB *spec, AC_RenderIntent intent, AC_String description))
+
+/**
+ Creates a device color profile object from a calibrated
+ grayscale color space with the specified rendering intent
+ and description string. The client should call ACUnReferenceProfile()
+ when done with the profile.
+ @param profile (Filled by the method) A pointer to the
+ new device color profile.
+ @param spec A pointer to the calibrated grayscale color
+ space specification.
+ @param intent The rendering intent.
+ @param description The description of the new profile.
+ If it is non-<code>NULL</code>, it must contain ASCII data, and may contain
+ Unicode data also. If <code>NULL</code>, a hard-coded default description
+ is used.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACMonitorProfile
+ @see ACProfileFromCode
+ @see ACProfileFromDescription
+ @see ACUnReferenceProfile
+*/
+XNPROC(AC_Error, ACMakeCalGray, (AC_Profile *profile, ACCalGray *spec, AC_RenderIntent intent, AC_String description))
+
+/**
+ Creates a device color profile object from a calibrated
+ Lab color space with the specified rendering intent and
+ description string. The client should call ACUnReferenceProfile()
+ when done with the profile.
+ @param profile (Filled by the method) A pointer to the
+ new device color profile.
+ @param spec The calibrated Lab color space specification.
+
+ @param intent The rendering intent.
+ @param description The description of the new profile.
+ If it is non-<code>NULL</code>, it must contain ASCII data, and may contain
+ Unicode data also. If it is <code>NULL</code>, a hard-coded default description
+ is used.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalGray
+ @see ACMakeCalRGB
+ @see ACMonitorProfile
+ @see ACProfileFromCode
+ @see ACProfileFromDescription
+ @see ACUnReferenceProfile
+
+*/
+XNPROC(AC_Error, ACMakeCalLab, (AC_Profile *profile, ACCalLab *spec, AC_RenderIntent intent, AC_String description))
+
+/**
+ Gets the color space for a device profile.
+ @param profile The device color profile.
+ @param space (Filled by the method) A pointer to the color
+ space.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACProfileData
+ @see ACProfileDescription
+*/
+XNPROC(AC_Error, ACProfileColorSpace, (AC_Profile profile, AC_ColorSpace *space))
+
+/**
+ Gets the size in bytes of the raw ICC profile data in
+ a device profile.
+ @param profile The device color profile object.
+ @param size (Filled by the method) A pointer to the profile
+ data size.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACProfileData
+*/
+XNPROC(AC_Error, ACProfileSize, (AC_Profile profile, ASUns32 *size))
+
+/**
+ Gets the data for a device profile. Copies the raw ICC profile
+ data into a supplied buffer.
+ @param profile The device color profile.
+ @param data (Filled by the method) A pointer to the color
+ profile data.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACProfileColorSpace
+ @see ACProfileDescription
+ @see ACProfileSize
+
+*/
+XNPROC(AC_Error, ACProfileData, (AC_Profile profile, void *data))
+
+/**
+ Decrements the reference count of a device color profile
+ object. If this causes the object's reference count to reach
+ zero, the method deletes it.
+ @param profile The profile object.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACMakeBufferProfile
+ @see ACMakeCalGray
+ @see ACMakeCalLab
+ @see ACMakeCalRGB
+ @see ACMonitorProfile
+ @see ACProfileFromCode
+ @see ACProfileFromDescription
+ @see ACProfileFromDescription
+
+*/
+XNPROC(AC_Error, ACUnReferenceProfile, (AC_Profile profile))
+
+
+/**
+ Creates a color transformation object.
+
+ <p>The client can dispose of the source and destination profiles
+ as soon as the transform is created. If the source profile
+ is a device link or abstract profile, then the destination
+ profile must be <code>NULL</code>; otherwise it must be non-<code>NULL</code>. </p>
+
+ @param transform (Filled by the method) A pointer to the
+ new color transformation object.
+ @param srcProfile The source profile from which to transform
+ color data.
+ @param dstProfile The destination profile to which to
+ transform color data.
+ @param intent The rendering intent for colors outside
+ the gamut of the destination profile.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACApplyTransform
+ @see ACUnReferenceTransform
+
+*/
+XNPROC(AC_Error, ACMakeColorTransform, (AC_Transform *transform, AC_Profile srcProfile, AC_Profile dstProfile, AC_RenderIntent intent /* options */))
+
+/**
+ Applies a color conversion or gamut test transformation.
+ It processes the number of colors specified by <code>count</code>, using
+ the memory formats for the source and destination data specified
+ in <code>srcPacking</code> and <code>dstPacking</code>. The source data and destination
+ data can point to the same block of memory if the source
+ and destination packing formats use the same number of bits
+ per color.
+ @param transform The color conversion or tranformation
+ to apply.
+ @param srcData The source data to tranform.
+ @param dstData The destination for the transformed data.
+
+ @param count The number of colors to transform.
+ @param srcPacking The packing type used in the source
+ data.
+ @param dstPacking The packing type to use in the destination
+ data.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeColorTransform
+
+*/
+XNPROC(AC_Error, ACApplyTransform, (AC_Transform transform, const void* srcData, void* dstData, ASUns32 count, AC_PackingCode srcPacking, AC_PackingCode dstPacking /* options */))
+
+/**
+ Decrements the reference count of a color transformation
+ object. If this causes the object's reference count to reach
+ zero, the method deletes it.
+ @param transform The tranform object.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeColorTransform
+*/
+XNPROC(AC_Error, ACUnReferenceTransform, (AC_Transform transform))
+
+
+/**
+ Creates an AcroColor string from a <code>NULL</code>-terminated ASCII
+ string or a <code>NULL</code>-terminated Unicode string, or both. If
+ both ASCII and Unicode data are specified, the AC_String
+ object keeps track of both in parallel, returning the ASCII
+ data when asked for ASCII, and the Unicode data when asked
+ for Unicode.
+
+ <p>These dual-encoded strings are useful as description strings
+ for ICC profiles, which can store both ASCII and Unicode
+ data in their description tags. The ICC profile standard
+ requires that the ASCII version of the description string be
+ limited to 7-bit ASCII characters. The AcroColor engine
+ requires only the Unicode descriptions to be unique among
+ profile descriptions. </p>
+
+ @param string (Filled by the method) A pointer to the
+ new string object.
+ @param ascii The ASCII data. It should be limited to 7-bit
+ ASCII characters for use in profile descriptions.
+ @param unicode The Unicode data. All Unicode characters
+ are two byte characters, in native byte order, including
+ the trailing <code>NULL</code>.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACProfileFromDescription
+ @see ACProfileListItemDescription
+ @see ACStringASCII
+ @see ACStringLocalized
+ @see ACStringUnicode
+ @see ACUnReferenceString
+
+*/
+XNPROC(AC_Error, ACMakeString, (AC_String* string, const char* ascii, const ASUTF16Val* unicode))
+
+/**
+ Copies the ASCII version of a string into a supplied buffer.
+ Either the <code>buffer</code> or the <code>count</code> can be <code>NULL</code>.
+
+ <p>The ICC profile standard requires that ASCII version of
+ the profile description string be limited to 7-bit ASCII
+ characters. </p>
+
+ <p>Depending on the API, operating system, file contents, and so on, the
+ method can return strings in the local script code (8 bit
+ single byte or 8 bit encoded multi-byte). Clients
+ should always assume that the ASCII data is in the local
+ script code (of which the 7-bit ASCII characters are a subset). </p>
+
+ @param string The AcroColor string containing ASCII data.
+ If the string does not contain an ASCII version, the method
+ returns AC_Error_NoASCII.
+ @param buffer (Filled by the method) A buffer to contain
+ a copy of the ASCII data.
+ @param count (Filled by the method) A pointer to the size
+ of <code>buffer</code> in bytes, including the trailing <code>NULL</code> character.
+
+ @param maxCount The maximum size of <code>buffer</code> in bytes. If
+ the length of the string is longer than this value, the method
+ copies a truncated string to the <code>buffer</code> and returns AC_Error_StringOverflow.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeString
+ @see ACStringLocalized
+ @see ACStringUnicode
+ @see ACUnReferenceString
+
+*/
+XNPROC(AC_Error, ACStringASCII, (AC_String string, char* buffer, ASUns32* count, ASUns32 maxCount))
+
+/**
+ Copies the localized Unicode version of a string into a
+ supplied buffer. Either the <code>buffer</code> or the <code>count</code> can be <code>NULL</code>.
+
+ <p>The settings file format and ICC profiles later than version
+ 2 can contain text in multiple languages or countries.
+ When the AcroColor engine (ACE) create strings from these
+ files or profiles, it uses the current language and country
+ codes to create strings with a third fork: a localized Unicode
+ version. These localized versions are intended for user
+ display only and should not be stored in preferences files
+ or action scripts, since they vary from country to country
+ and are not portable. </p>
+
+ @param string The AcroColor string containing localized
+ Unicode data. If the string does not contain a localized
+ Unicode version, the method returns AC_Error_NoLocalized.
+
+ @param buffer (Filled by the method) A buffer to contain
+ a copy of the localized Unicode data.
+ @param count (Filled by the method) A pointer to the size (in bytes)
+ of the <code>buffer</code>, including the trailing <code>NULL</code> character.
+
+ @param maxCount The maximum size of the <code>buffer</code> in bytes. If
+ the length of the string is longer than this value, the method
+ copies a truncated string to the <code>buffer</code> and returns AC_Error_StringOverflow.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeString
+ @see ACStringASCII
+ @see ACStringUnicode
+ @see ACUnReferenceString
+*/
+XNPROC(AC_Error, ACStringLocalized, (AC_String string, ASUTF16Val* buffer,ASUns32* count, ASUns32 maxCount))
+
+
+/**
+ Copies the Unicode version of a string into a supplied buffer.
+ Either the <code>buffer</code> or the <code>count</code> can be <code>NULL</code>.
+ @param string The AcroColor string containing localized
+ Unicode data. If the string does not contain a Unicode version,
+ the method returns AC_Error_NoUnicode.
+ @param buffer (Filled by the method) A buffer to contain
+ a copy of the Unicode data.
+ @param count (Filled by the method) A pointer to the size
+ of <code>buffer</code> in bytes, including the trailing <code>NULL</code> character.
+
+ @param maxCount The maximum size of <code>buffer</code> in bytes. If
+ the length of the string is longer than this value, the method
+ copies a truncated string to the <code>buffer</code> and returns AC_Error_StringOverflow.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeString
+ @see ACStringASCII
+ @see ACStringLocalized
+ @see ACUnReferenceString
+
+*/
+XNPROC(AC_Error, ACStringUnicode, (AC_String string, ASUTF16Val* buffer, ASUns32* count, ASUns32 maxCount))
+
+/**
+ Decrements the reference count of a string object. If this
+ causes the object's reference count to reach zero, the method
+ deletes it.
+ @param string The string object.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACMakeString
+*/
+XNPROC(AC_Error, ACUnReferenceString, (AC_String string))
+
+
+/**
+ Gets a working color profile in a specified color space.
+
+ @param space The type of color space of the profile to
+ obtain.
+ @param workingProfile (Filled by the method) A pointer
+ to the working profile. When done with this object, dereference
+ it using ACUnReferenceProfile().
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACProfilesMatch
+ @see ACUnReferenceProfile
+*/
+XNPROC(AC_Error, ACGetWorkingSpaceProfile, (ACWorkingSpace space, AC_Profile *workingProfile))
+
+/**
+ Compares the working device profile with the document device
+ profile to determine if they are the same. This comparison
+ ignores rendering intents, and is <i>fuzzy</i>, allowing very
+ close, but not exactly the same, profiles to match. Equivalent
+ profiles always match, but some non-equivalent profiles
+ may also match.
+ @param workingProfile The working device color profile.
+
+ @param documentProfile The document's device color profile.
+
+ @param match (Filled by the method) A pointer to the result:
+ <code>true</code> if the profiles match, <code>false</code> otherwise.
+ @return <code>0</code> if successful, a non-zero error code otherwise.
+ @see ACGetSettingsProfile
+ @see ACGetWorkingSpaceProfile
+ @see ACUnReferenceProfile
+
+*/
+XNPROC(AC_Error, ACProfilesMatch, (AC_Profile workingProfile, AC_Profile documentProfile, ASBool *match))
+
+
+/**
+ Converts the colors (in place) on a page, as specified by the <code>params</code> block.
+
+ @param doc The document in which to convert a page.
+ @param params The parameter block that describes how color conversions are to be performed.
+ @param pageNum The page number of the page to convert.
+ @param progMon The progress monitor callback. This call will set the duration of the monitor to the number of elements in the top-level content stream, and will update the value as the elements are converted. If this parameter is zero, no progress monitor callback is called.
+ @param progMonData The data element to be passed into progress monitor calls.
+ @param reportProc The reporting callback; it reports the attributes and action of each object converted to the callback. Passing in a zero reporting callback means that no reporting will be done.
+ @param reportProcData The data element to be passed into <code>reportProc</code>.
+ @return <code>true</code> if the conversion was aborted or failed.
+ @exception asGenErrBadParm The <code>params</code> block is malformed (for example, a reference or alias to a non-existent ink, or a circular alias).
+*/
+ XNPROC(ASBool, PDDocColorConvertPage, (PDDoc doc, PDColorConvertParams params, ASInt32 pageNum, ASProgressMonitor progMon, void *progMonData, PDColorConvertReportProc reportProc, void *reportProcData, ASBool *changed))
+
+/**
+ Convert the colors (in place) in a page as specified by the <code>params</code> block.
+ Takes an extended parameters block.
+
+ @param doc The document in which to convert a page.
+ @param params The parameters block that describes how color conversions are to be performed.
+ @param pageNum The page number of the page to convert.
+ @param progMon The progress monitor callback. This call will set the duration of the monitor to the number of elements in the top-level content stream, and will update the value as the elements are converted. If this parameter is zero, no progress monitor callback is called.
+ @param progMonData The data element to be passed into progress monitor calls.
+ @param reportProc The reporting callback; it reports the attributes and action of each object converted to the callback. Passing in a zero reporting callback means that no reporting will be done.
+ @param reportProcData The data element to be passed into <code>reportProc</code>.
+ @return <code>true</code> if the conversion was aborted or failed.
+ @exception asGenErrBadParm The <code>params</code> block is ill-formed (for example, a reference or alias to a non-existent ink, or a circular alias).
+*/
+ XNPROC(ASBool, PDDocColorConvertPageEx, (PDDoc doc, PDColorConvertParamsEx paramsEx, ASInt32 pageNum, ASProgressMonitor progMon, void *progMonData, PDColorConvertReportProc reportProc, void *reportProcData, ASBool *changed))
+
+/**
+ Embeds an output intent into a document.
+
+ @param doc The document in which to embed the output intent.
+ @param params The parameters block from which to get the output intent, described as the target space.
+*/
+
+ XNPROC(void, PDDocColorConvertEmbedOutputIntent, (PDDoc doc, AC_Profile OIProfile))
+
+/**
+ Converts a PDEElement to the supplied color space.
+
+ @param doc The document in which the element is located.
+ @param elem The element to convert.
+ @param targetProfile The ICC profile to which the color should be converted.
+ @param intent The rendering intent to use for the conversion. AC_UseProfileIntent can be passed in order
+ to use the default intent. (Note that it is not actually using the profile intent, but is using the
+ current intent in the PDF graphics state).
+ @param embed If <code>true</code>, embed the color space and make the object calibrated. If it is <code>false</code> and the
+ target profile is CMYK, RGB, or Gray, the colors space of the resulting object, after conversion, will
+ be DeviceCMYK, DeviceRGB, or DeviceGray, respectively.
+ @returns A PDEElement containing the converted data. Note that the source element is copied and its
+ reference count is not decremented, so the caller should decrement the source element's reference count
+ if it is no longer needed.
+*/
+ XNPROC(PDEElement, PDColorConvertPDEElement, (PDDoc doc, PDEElement elem, AC_Profile targetProfile, AC_RenderIntent intent, ASBool embed))
+
+/* Swatchbook API */
+
+
+/**
+ Retrieves an <code>ACSwatchBookDB</code> database object, containing the swatchbooks found by searching the folders given.
+ The folders are usually determined by using the <code>AVAcquireSpecialFolderPathName</code>. This always scans
+ the swatchbook directories, so this should be called every time one is going to make a list of the
+ swatchbooks, in case a user installed a swatchbook in the user directory while the application was open.
+ PDF library clients must pass in whatever folder location is appropriate.
+ @param count The number of folders in the folders array.
+ @param folders A pointer to an array of path names for the folders to search.
+ @returns A swatchbook database object. Call <code>ACSwatchBookDBDestroy()</code> when this is no longer needed.
+*/
+ XNPROC(ACSwatchBookDB, ACSwatchBooksFind, (ASUns32 count, ASFileSys fs, ASPathName *folders))
+
+/**
+ Retrieves the number of swatchbooks available in the swatchbook database that was returned by <code>ACSwatchBookFind()</code>.
+ @param dbp A pointer to the swatchbook database object.
+ @returns The number of swatchbooks in the database.
+*/
+ XNPROC(ASUns32, ACSwatchBookCount, (ACSwatchBookDB dbp))
+
+/**
+ Retrieves the title of a swatchbook.
+ @param dbp A pointer to the swatchbook database object.
+ @param ix The index of the swatchbook item. Its value is in the range <code>[0, swatchBookCount-1]</code>.
+ @returns The title of the swatchbook.
+*/
+ XNPROC(ASText, ACSwatchBookTitle, (ACSwatchBookDB dbp, ASUns32 ix))
+
+/**
+ Retrieves the description string for a swatchbook.
+ @param dbp A pointer to the swatchbook database object.
+ @param ix The index of the swatchbook item. Its value is in the range <code>[0, swatchBookCount-1]</code>.
+ @returns The description string for the swatchbook.
+*/
+ XNPROC(ASText, ACSwatchBookDescription, (ACSwatchBookDB dbp, ASUns32 ix))
+
+/**
+ Destroys the swatchbook database and frees any memory associated with it.
+ @param dbp A pointer to the swatchbook database object to be destroyed.
+*/
+ XNPROC(void, ACSwatchBookDBDestroy, (ACSwatchBookDB dbp))
+
+/**
+ Retrieves an opaque <code>ACSwatchBook</code> object for the nth swatchbook.
+ This loads the swatchbook into memory. Zero will be returned if there was an error.
+ @param dbp The swatchbook database.
+ @param n The index of swatchbook to load. Its value is in the range <code>[0, swatchBookCount-1]</code>.
+ @returns The swatchbook object. Call <code>ACSwatchBookDestroy()</code> when it is no longer needed.
+*/
+ XNPROC(ACSwatchBook, ACSwatchBookLoad, (ACSwatchBookDB dbp, ASUns32 ix))
+/**
+ Retrieves an opaque <code>ACSwatchBook</code> object using the specified path.
+ This loads the swatchbook into memory. Zero will be returned if there was an error.
+ @param dbp The swatchbook database.
+ @param path The path to the swatchbook file.
+ @returns The swatchbook object. Call <code>ACSwatchBookDestroy()</code> when it is no longer needed.
+*/
+ XNPROC(ACSwatchBook, ACSwatchBookLoadFromPath, (ACSwatchBookDB dbp, ASPathName path))
+
+/**
+ Destroys the swatchbook and frees any memory associated with it.
+ @param dbp A pointer to the swatchbook object to be destroyed.
+*/
+ XNPROC(void, ACSwatchBookDestroy, (ACSwatchBook bp))
+
+/**
+ Retrieves the number of color swatches in the swatchbook.
+ @param dbp A pointer to the swatchbook object.
+ @returns The number of swatches in the swatchbook.
+*/
+ XNPROC(ASUns32, ACSwatchBookNumberOfColors, (ACSwatchBook bp))
+
+/**
+ Retrieves the color space of the swatches in the swatchbook.
+ @param dbp A pointer to the swatchbook object.
+ @returns The color space of the swatchbook object (for example, all swatches are in this space).
+*/
+ XNPROC(AC_ColorSpace, ACSwatchBookColorSpace, (ACSwatchBook bp))
+
+/**
+ Determines whether the swatchbook is for a process color mode.
+ @param dbp A pointer to the swatchbook object.
+ @returns <code>true</code> if the swatchbook is for a process color mode, <code>false</code> if it is for spot.
+*/
+ XNPROC(ASBool, ACSwatchBookIsProcess, (ACSwatchBook bp))
+
+/**
+ Retrieves the name of a color swatch.
+ @param dbp A pointer to the swatchbook object.
+ @param ix The index of the swatch. Its value is in the range <code>[0, swatchCount-1]</code>.
+ @returns The name of the color swatch.
+*/
+ XNPROC(ASText, ACSwatchBookGetSwatchName, (ACSwatchBook bp, ASUns32 ix))
+
+/**
+ Retrieves the color values associated with a color swatch.
+ @param dbp A pointer to the swatchbook object.
+ @param ix The index of the swatch. Its value is in the range <code>[0, swatchCount-1]</code>.
+ @param values Values that are filled in by this call.
+*/
+ XNPROC(void, ACSwatchBookGetSwatchValues, (ACSwatchBook bp, ASUns32 ix, float *values))
+
+#undef XSPROC
+#undef XNPROC
+#undef XPROC
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorVers.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorVers.h
new file mode 100644
index 0000000..6c1a50c
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroColorVers.h
@@ -0,0 +1,15 @@
+/*
+** AcroColorVers.h -- Acrobat Color header file
+**
+** HFT names and versions
+**
+** This file is furnished to you by Adobe Systems Incorporated under the terms of the
+** Acrobat (r) Plug-ins Software Development Kit License Agreement.
+** Copyright (C) 2002-2006 Adobe Systems Inc. All Rights Reserved.
+ */
+
+#ifndef _H_AcroColorVers
+#define _H_AcroColorVers
+
+
+#endif /* _H_AcroColorVers */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroErr.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroErr.h
new file mode 100644
index 0000000..9f02905
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/AcroErr.h
@@ -0,0 +1,3096 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ AcroErr.h
+
+ - Error codes are used in the ASRaise/DURING/HANDLER mechanism
+ established in Except.h and also as error code return values from
+ certain lower-level routines that do not raise. Error codes are
+ 32-bit integers (ASInt32). An error code can be built using the
+ ErrBuildCode macro.
+
+ - An error flag has three components:
+
+ Severity: none, warning, severe ; 4 bits => 16 severities
+ System: Cos, PDDoc, etc. ; 8 bits => 256 systems
+ Error: FileOpen, Syntax, etc. ; 16 bits => 65535 errors
+
+*********************************************************************/
+
+#ifndef _H_AcroErr
+#define _H_AcroErr
+
+#include "CoreExpT.h"
+
+/* These are used so frequently they have their own macro */
+#define ERR_GENERAL 1
+#define ERR_NOMEMORY 2
+
+#define ERR_SEVERITY_MASK 0xf0000000 /* upper four bits */
+#define ERR_UNUSED_MASK 0x0f000000 /* reserved */
+#define ERR_SYSTEM_MASK 0x00ff0000
+#define ERR_ERROR_MASK 0x0000ffff /* put this last to access it fastest */
+
+#define ERR_SEVERITY_SHIFT 28
+#define ERR_SYSTEM_SHIFT 16
+#define ERR_ERROR_SHIFT 0
+
+/* Errors but not severities or systems may be negative */
+/**
+ Builds an error code for the specified severity, system, and error number. Error codes are used in exception handling.
+ The ASRaise() method takes an error code for its argument; ASRegisterErrorString() returns an error code.
+
+ An error code has three components:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Component</TH><TH>Description</TH><TH>Size</TH></TR>
+ <TR><TD>Severity</TD><TD>none, warning, severe</TD><TD>4 bits</TD></TR>
+ <TR><TD>System</TD><TD>Cos, PDDoc, and so on</TD><TD>8 bits</TD></TR>
+ <TR><TD>Error</TD><TD>FileOpen, Syntax, and so on</TD><TD>16 bits</TD></TR>
+ </TABLE>
+
+ @param xseverity The severity of the error. It must be one of ErrorSeverities.
+ @param xsys The error system. It must be one of ErrorSystems.
+ @param xerror The error number in the error system.
+
+ @example <code>myErrorCode = ErrBuildCode(ErrAlways, ErrSysAcroView, avErrActionRestricted);</code>
+
+ @see ErrGetCode
+ @see ErrGetSeverity
+ @see ErrGetSignedCode
+ @see ErrGetSystem
+ @see ASRaise
+ @see ASRegisterErrorString
+ @ref ErrorSeverities
+ @ref ErrorSystems
+*/
+#define ErrBuildCode(xseverity,xsys,xerror) \
+ ( \
+ (((ASUns32) (xseverity)) << ERR_SEVERITY_SHIFT) | \
+ (((ASUns32) (xsys)) << ERR_SYSTEM_SHIFT) | \
+ ((((ASUns32) (xerror)) << ERR_ERROR_SHIFT) & ERR_ERROR_MASK) \
+ )
+
+/* ErrGetCode will return a value between 0 & 65535 inclusive.
+ * If the platform considers errors to be signed, use ErrGetSignedCode.
+ */
+/**
+ Gets the error severity from an error code. It returns one of ErrorSeverities.
+
+ @param xcode The error code.
+
+ @example <code>errorSeverity = ErrGetSeverity(errorCode);</code>
+
+ @see ErrBuildCode
+ @see ErrGetCode
+ @see ErrGetSignedCode
+ @see ErrGetSystem
+ @see ASGetErrorString
+ @see ASGetExceptionErrorCode
+ @see ASRegisterErrorString
+ @ref ErrorSeverities
+*/
+#define ErrGetSeverity(xcode) ((((ASUns32) (xcode)) & ERR_SEVERITY_MASK) >> ERR_SEVERITY_SHIFT)
+/**
+ Gets the error system from an error code. It returns one of ErrorSystems.
+
+ @param xcode The error code.
+
+ @example <code>errorSystem = ErrGetSystem(errorCode);</code>
+
+ @see ErrBuildCode
+ @see ErrGetCode
+ @see ErrGetSeverity
+ @see ErrGetSignedCode
+ @see ASGetErrorString
+ @see ASGetExceptionErrorCode
+ @see ASRegisterErrorString
+ @ref ErrorSystems
+*/
+#define ErrGetSystem(xcode) ((((ASUns32) (xcode)) & ERR_SYSTEM_MASK) >> ERR_SYSTEM_SHIFT)
+/**
+ Gets the error number from an error code.
+
+ @param xcode The error code.
+
+ @example <code>errorNumber = ErrGetCode(errorCode);</code>
+
+ @see ErrBuildCode
+ @see ErrGetSeverity
+ @see ErrGetSignedCode
+ @see ErrGetSystem
+ @see ASGetErrorString
+ @see ASGetExceptionErrorCode
+ @see ASRegisterErrorString
+*/
+#define ErrGetCode(xcode) ((((ASUns32) (xcode)) & ERR_ERROR_MASK) >> ERR_ERROR_SHIFT)
+/**
+ Gets a signed error number from an error code.
+
+ @param xcode The error code.
+
+ @example <code>errorSignedNumber = ErrGetSignedCode(errorCode);</code>
+
+ @see ErrBuildCode
+ @see ErrGetCode
+ @see ErrGetSeverity
+ @see ErrGetSystem
+ @see ASGetErrorString
+ @see ASGetExceptionErrorCode
+ @see ASRegisterErrorString
+*/
+#define ErrGetSignedCode(xcode) ((ASInt16) ErrGetCode(xcode))
+
+/* Error severity */
+enum {
+ /**
+ No error occurred.
+ @ingroup ErrorSeverities
+ */
+ ErrNoError = 0,
+ /**
+ Display a warning.
+ @ingroup ErrorSeverities
+ */
+ ErrWarning,
+ /**
+ Display a message if the user has not suppresed errors.
+ @ingroup ErrorSeverities
+ */
+ ErrSuppressable,
+ /**
+ Never display a message.
+ @ingroup ErrorSeverities
+ */
+ ErrSilent,
+ /**
+ Always display a message, even if others are suppressed.
+ @ingroup ErrorSeverities
+ */
+ ErrAlways
+};
+
+typedef ASEnum8 ErrSeverity;
+
+/* Systems */
+enum {
+ /**
+ General error and out of memory errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysNone = 0,
+ /**
+ CosStore, filters errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysCos,
+ /**
+ Cos syntax errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysCosSyntax,
+ /**
+ PDDoc and family, Page tree, outlines errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPDDoc,
+ /**
+ PDPage and family, thumbs, annotations errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPDPage,
+ /**
+ Global PD errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPDModel,
+ /**
+ AcroView errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysAcroView,
+ /**
+ Page parsing and RIPping errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPage,
+ /**
+ Font Server errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysFontSvr,
+ /**
+ Rasterizer errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysRaster,
+ /**
+ ASFile I/O errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysASFile,
+ /**
+ Extension Manager errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysXtnMgr,
+ /**
+ <i>New</i> error codes added by extensions.
+ @ingroup ErrorSystems
+ */
+ ErrSysXtn,
+ /**
+ Platform-specific system errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysMDSystem,
+ /**
+ Platform-specific application errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysMDApp,
+ /**
+ PDFX-specific errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPDFX,
+ /**
+ PDFEdit errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPDFEdit,
+ /**
+ PDSEdit (structure) errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPDSEdit,
+ /**
+ XAP Metadata errors.
+ @ingroup ErrorSystems
+ */
+ ErrSysPDMetadata,
+
+ ErrSysLast /* no more than 256 systems allowed */
+};
+
+typedef ASEnum8 ErrSystem;
+
+/* Macros for building system specific codes.
+** Use these macros with the errors defined here.
+** For example: ASRaise(PDDocError(pdErrTooManyPagesForOpen));
+*/
+
+#define GenError(e) ErrBuildCode(ErrAlways, ErrSysNone, e)
+#define CosError(e) ErrBuildCode(ErrSuppressable, ErrSysCos, e)
+#define CosErrorAlways(e) ErrBuildCode(ErrAlways, ErrSysCos, e)
+#define CosSyntaxError(e) ErrBuildCode(ErrSuppressable, ErrSysCosSyntax, e)
+#define PDDocError(e) ErrBuildCode(ErrSuppressable, ErrSysPDDoc, e)
+#define PDDocErrorAlways(e) ErrBuildCode(ErrAlways, ErrSysPDDoc, e)
+#define PDPageError(e) ErrBuildCode(ErrSuppressable, ErrSysPDPage, e)
+#define PDPageErrorAlways(e) ErrBuildCode(ErrAlways, ErrSysPDPage, e)
+#define PDPageErrorSilent(e) ErrBuildCode(ErrSilent, ErrSysPDPage, e)
+#define PDModelError(e) ErrBuildCode(ErrAlways, ErrSysPDModel, e)
+#define AcroViewError(e) ErrBuildCode(ErrAlways, ErrSysAcroView, e)
+#define PageError(e) ErrBuildCode(ErrSuppressable, ErrSysPage, e)
+#define PageErrorSilent(e) ErrBuildCode(ErrSilent, ErrSysPage, e)
+#define FontSvrError(e) ErrBuildCode(ErrAlways, ErrSysFontSvr, e)
+#define RasterError(e) ErrBuildCode(ErrAlways, ErrSysRaster, e)
+#if !defined(WEBBUY_LIB)
+#define ASFileError(e) ErrBuildCode(ErrAlways, ErrSysASFile, e)
+#endif
+#define XtnMgrError(e) ErrBuildCode(ErrAlways, ErrSysXtnMgr, e)
+#define XtnError(e) ErrBuildCode(ErrAlways, ErrSysXtn, e)
+#define MDSysError(e) ErrBuildCode(ErrAlways, ErrSysMDSystem, e)
+#define MDAppError(e) ErrBuildCode(ErrAlways, ErrSysMDApp, e)
+#define PDFXError(e) ErrBuildCode(ErrAlways, ErrSysPDFX, e)
+#define PDFEditError(e) ErrBuildCode(ErrAlways, ErrSysPDFEdit, e)
+#define PDSEditError(e) ErrBuildCode(ErrAlways, ErrSysPDSEdit, e)
+#define PDMetadataError(e) ErrBuildCode(ErrAlways, ErrSysPDMetadata, e)
+
+
+/* General Errors */
+enum
+{
+ /**
+ No error.
+ @ingroup GeneralErrors
+ */
+ genErrNoError,
+ /**
+ An internal error occurred.
+ @ingroup GeneralErrors
+ */
+ genErrGeneral,
+ /**
+ Out of memory.
+ @ingroup GeneralErrors
+ */
+ genErrNoMemory,
+ /**
+ Bad parameter.
+ @ingroup GeneralErrors
+ */
+ genErrBadParm,
+ /**
+ Operation or data is too complex.
+ @ingroup GeneralErrors
+ */
+ genErrListOverflow,
+ /**
+ Attempt to release an unlocked object.
+ @ingroup GeneralErrors
+ */
+ genErrBadUnlock,
+ /**
+ Exception stack overflow.
+ @ingroup GeneralErrors
+ */
+ genErrExceptionStackOverflow,
+ /**
+ Failed to load an application resource (internal error).
+ @ingroup GeneralErrors
+ */
+ genErrResourceLoadFailed,
+ /**
+ Attempt to register an object with a name already in use.
+ @ingroup GeneralErrors
+ */
+ genErrNameAlreadyRegistered,
+ /**
+ Attempt to call a method that has not been implemented.
+ @ingroup GeneralErrors
+ */
+ genErrMethodNotImplemented,
+ /**
+ The user cancelled the operation.
+ @ingroup GeneralErrors
+ */
+ genErrCanceled,
+ /**
+ No valid Acrobat serial number was found. Acrobat will now quit.
+ @ingroup GeneralErrors
+ */
+ genErrNoValidSerialNoFound
+};
+
+/* General Cos Errors */
+enum
+{
+ /**
+ No error.
+ @ingroup GeneralCosErrors
+ */
+ cosErrNoError,
+ /**
+ Read error.
+ @ingroup GeneralCosErrors
+ */
+ cosErrReadError,
+ /**
+ Write error.
+ @ingroup GeneralCosErrors
+ */
+ cosErrWriteError,
+ /**
+ Syntax error.
+ @ingroup GeneralCosErrors
+ */
+ cosErrBadSyntax,
+ /**
+ The file needs to be repaired.
+ @ingroup GeneralCosErrors
+ */
+ cosErrNeedRebuild,
+ /**
+ Could not repair file.
+ @ingroup GeneralCosErrors
+ */
+ cosErrRebuildFailed,
+ /**
+ A temporary file could not be opened.
+ @ingroup GeneralCosErrors
+ */
+ cosErrCantOpenTempFile,
+ /**
+ The temporary file is full or nearly full. Close or save any modified documents.
+ @ingroup GeneralCosErrors
+ */
+ cosErrTempFileFull,
+ /**
+ The stream source is shorter than specified length.
+ @ingroup GeneralCosErrors
+ */
+ cosErrStreamTooShort,
+ /**
+ A stream specifies an unknown filter.
+ @ingroup GeneralCosErrors
+ */
+ cosErrBadFilterName,
+ /**
+ The operation or data is too complex.
+ @ingroup GeneralCosErrors
+ */
+ cosErrListOverflow,
+ /**
+ The Cos document table is full.
+ @ingroup GeneralCosErrors
+ */
+ cosErrDocTableFull,
+ /**
+ A number is out of range.
+ @ingroup GeneralCosErrors
+ */
+ cosErrInt16OutOfRange,
+ /**
+ A <code>NULL</code> object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedNull,
+ /**
+ A dictionary object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedDict,
+ /**
+ An array object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedArray,
+ /**
+ A number object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedNumber,
+ /**
+ A boolean object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedBoolean,
+ /**
+ A name object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedName,
+ /**
+ A string object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedString,
+ /**
+ A stream object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedStream,
+ /**
+ This direct object already has a container.
+ @ingroup GeneralCosErrors
+ */
+ cosErrInvalidAssignment,
+ /**
+ Implementation failure: this document is now invalid.
+ @ingroup GeneralCosErrors
+ */
+ cosErrAfterSave,
+ /**
+ The desired operation cannot be performed on this object.
+ @ingroup GeneralCosErrors
+ */
+ cosErrInvalidObj,
+ /**
+ Array out-of-bounds error.
+ @ingroup GeneralCosErrors
+ */
+ cosErrArrayBounds,
+ /**
+ The dictionary key must be a name object.
+ @ingroup GeneralCosErrors
+ */
+ cosErrDictKeyNotName,
+ /**
+ This file must be saved with a full save.
+ @ingroup GeneralCosErrors
+ */
+ cosErrNeedFullSave,
+ /**
+ Error in the encryption filter.
+ @ingroup GeneralCosErrors
+ */
+ cosErrEncryptionErr,
+ /**
+ Error in the JPEG data filter.
+ @ingroup GeneralCosErrors
+ */
+ cosErrDCTError,
+ /**
+ Error in the CCITT fax data filter.
+ @ingroup GeneralCosErrors
+ */
+ cosErrCCFError,
+ /**
+ Error in the LZW data filter.
+ @ingroup GeneralCosErrors
+ */
+ cosErrLZWError,
+ /**
+ A direct object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedDirect,
+ /**
+ Obsolete linearized (optimized for the Web) format.
+ @ingroup GeneralCosErrors
+ */
+ cosErrOldLinFormat,
+ /**
+ The temporary file was unexpectedly short.
+ @ingroup GeneralCosErrors
+ */
+ cosErrTempTooShort,
+ /**
+ The Save operation was cancelled.
+ @ingroup GeneralCosErrors
+ */
+ cosErrCancelSave,
+ /**
+ Encryption and decryption are not supported.
+ @ingroup GeneralCosErrors
+ */
+ cosErrEncryptionNotSupported,
+ /**
+ An encryption key is not supplied for a stream.
+ @ingroup GeneralCosErrors
+ */
+ cosErrNoEncryptionKeySupplied,
+
+ /* Defined for Acrobat 6.0 */
+ /**
+ A filter with the same name is already registered.
+ @ingroup GeneralCosErrors
+ */
+ cosErrDuplicateFilterName,
+ /**
+ Attempted to decode without the associated filter.
+ @ingroup GeneralCosErrors
+ */
+ cosErrNoDecodeFilter,
+ /**
+ Attempted to encode without the associated filter.
+ @ingroup GeneralCosErrors
+ */
+ cosErrNoEncodeFilter,
+ /**
+ Decryption authorization failed during data access.
+ @ingroup GeneralCosErrors
+ */
+ cosErrCryptAuthFailed,
+ /**
+ An object stream was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedObjectStream,
+ /**
+ An indirect object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedIndirect,
+ /**
+ A procedure was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedProc,
+ /**
+ An object collection was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrExpectedCollection,
+ /**
+ A compressed object was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrNotCompressed,
+ /**
+ An object that was not compressed was expected.
+ @ingroup GeneralCosErrors
+ */
+ cosErrCompressed,
+
+ /* Skip four "message" codes. */
+ /**
+ An acquired object was already released.
+ @ingroup GeneralCosErrors
+ */
+ cosErrBadRefcount = 51,
+ /**
+ An object has been replaced or destroyed.
+ @ingroup GeneralCosErrors
+ */
+ cosErrObjFreed,
+ /**
+ Internal error in the memory manager.
+ @ingroup GeneralCosErrors
+ */
+ cosErrMemMgrError,
+ /**
+ This file requires a cross-reference stream (PDF 1.5).
+ @ingroup GeneralCosErrors
+ */
+ cosErrNeedXrefStm
+};
+
+/* Cos Syntax Errors */
+enum
+{
+ /**
+ No syntax error.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrNoError,
+ /**
+ File does not begin with <code>'%PDF-'</code>.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrNoHeader,
+ /**
+ Missing <code>%%EOF</code>.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrNoEOF,
+ /**
+ Could not find <code>startxref</code> address.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrNoStartXRef,
+ /**
+ The value of <code>startxref</code> address is not an integer.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrNoStartAddress,
+ /**
+ Missing <code>'xref'</code>.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadXref,
+ /**
+ <code>Xref</code> header should be two integers.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadXrefHeader,
+ /**
+ Error reading <code>xref</code> entry.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadXrefEntry,
+ /**
+ The trailer dictionary start is missing <code>'<<'</code>.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadTrailerStart,
+ /**
+ The object label is badly formatted.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadObjectLabel,
+ /**
+ Unrecognized object name.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrUnknownName,
+ /**
+ Unrecognized token type.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrUnknownTokenType,
+ /**
+ Missing endstream.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrNoEndStream,
+ /**
+ Unexpected endstream.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExtraEndStream,
+ /**
+ Unterminated string.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrUnterminatedString,
+ /**
+ The string is too long.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrStringTooLong,
+ /**
+ The token is too long.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrTokenTooLong,
+ /**
+ There is a non-hex character in a hex string.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadCharInHexString,
+ /**
+ Unexpected token type.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrUnexpectedType,
+ /**
+ End of image was not found.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrImageNeverEnded,
+ /**
+ Unexpected end of dictionary.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrUnexpectedDict,
+ /**
+ Unexpected end of array.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrUnexpectedArray,
+ /**
+ There was an error reading the dictionary.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadDict,
+ /**
+ There was an error reading the object.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadObject,
+ /**
+ Expected a dictionary or array.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadArrayDict,
+ /**
+ Bad foreign object reference.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadFRef,
+ /**
+ There was a parse stack underflow while reading the object.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrPStackUnderflow,
+ /**
+ There was an error reading the linearized hint data.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadLinearized,
+ /**
+ There was a non-hex character after <code>#</code> in a name.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadHexCharInName,
+ /**
+ There are illegal characters in a name.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadName,
+ /**
+ An object reference is invalid.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadObjectRef,
+
+ /* Defined for Acrobat 6.0 */
+ /**
+ There is an error in the <code>XRef</code> stream.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadXrefStream,
+ /**
+ Unexpected end of file.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrPrematureEOF,
+ /**
+ Expected <code>CR</code> and/or <code>LF</code> after <code>'stream'</code>.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadStreamStart,
+ /**
+ There is an error in the object stream.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrBadObjStream,
+ /**
+ Dictionary keys must be direct name objects.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrDictKeyNotName,
+ /**
+ The <code>NULL</code> object was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedNull,
+ /**
+ A number was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedNumber,
+ /**
+ An integer was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedInteger,
+ /**
+ A real number was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedReal,
+ /**
+ A non-negative integer was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedUnsigned,
+ /**
+ <code>true</code> or <code>false</code> was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedBoolean,
+ /**
+ A name integer was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedName,
+ /**
+ A string was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedString,
+ /**
+ A dictionary was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedDict,
+ /**
+ An array was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedArray,
+ /**
+ A stream was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedStream,
+ /**
+ A stream was found in an illegal context.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrIllegalStream,
+ /**
+ The stream is missing a <code>Length</code> key.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrNoLength,
+ /**
+ An indirect object was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedIndirect,
+ /**
+ A direct object was expected.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrExpectedDirect,
+ /**
+ Illegal indirect reference.
+ @ingroup CosSyntaxErrors
+ */
+ cosSynErrIllegalIndRef
+};
+
+/* PDDoc Errors */
+enum
+{
+ /**
+ No error.
+ @ingroup PDDocErrors
+ */
+ pdErrNoError,
+ /**
+ Bad font object or font descriptor object.
+ @ingroup PDDocErrors
+ */
+ pdErrBadFont,
+ /**
+ An error occurred while trying to embed a font.
+ @ingroup PDDocErrors
+ */
+ pdErrEmbeddingFont,
+ /**
+ The root object is missing or invalid.
+ @ingroup PDDocErrors
+ */
+ pdErrBadRootObj,
+ /**
+ The base pages object is missing or invalid.
+ @ingroup PDDocErrors
+ */
+ pdErrBadBaseObj,
+ /**
+ The outlines object is missing or invalid.
+ @ingroup PDDocErrors
+ */
+ pdErrBadOutlineObj,
+ /**
+ There are invalid or corrupt font metrics in the resource file.
+ @ingroup PDDocErrors
+ */
+ pdErrBadResMetrics,
+ /**
+ A page object is missing or invalid.
+ @ingroup PDDocErrors
+ */
+ pdErrBadPageObj,
+ /**
+ An error occurred while processing a thumbnail.
+ @ingroup PDDocErrors
+ */
+ pdErrThumbError,
+ /**
+ Invalid annotation object.
+ @ingroup PDDocErrors
+ */
+ pdErrBadAnnotation,
+ /**
+ The document's page tree contains an invalid node.
+ @ingroup PDDocErrors
+ */
+ pdErrBadPageTree,
+ /**
+ The information needed to print a page is unavailable.
+ @ingroup PDDocErrors
+ */
+ pdErrUnknownProcsets,
+ /**
+ This file could not be opened.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToOpenDoc,
+ /**
+ Unable to open the file for writing. It may be locked or unavailable.
+ @ingroup PDDocErrors
+ */
+ pdErrIsFileLocked,
+ /**
+ Unable to write the file.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToWrite,
+ /**
+ Unable to rename the temporary file to the Save As name.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToRenameTemp,
+ /**
+ Unable to recover the original file.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToRecover,
+ /**
+ Unable to read the file.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToRead,
+ /**
+ This is not a valid PDF document. It cannot be opened.
+ @ingroup PDDocErrors
+ */
+ pdErrUnknownFileType,
+ /**
+ This file is already open.
+ @ingroup PDDocErrors
+ */
+ pdErrAlreadyOpen,
+ /**
+ This file cannot be opened because it contains too many pages.
+ @ingroup PDDocErrors
+ */
+ pdErrTooManyPagesForOpen,
+ /**
+ There is not enough temporary disk space for this operation.
+ @ingroup PDDocErrors
+ */
+ pdErrNotEnoughSpaceForTempFile,
+ /**
+ Inserting this file would result in a document with too many pages.
+ @ingroup PDDocErrors
+ */
+ pdErrTooManyPagesForInsert,
+ /**
+ There is an error in the bookmarks.
+ @ingroup PDDocErrors
+ */
+ pdErrBookmarksError,
+ /**
+ Cannot open more bookmarks.
+ @ingroup PDDocErrors
+ */
+ pdErrCannotOpenMoreBkMark,
+ /**
+ Unable to extract embedded font.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToExtractFontErr,
+ /**
+ An error occurred while creating the document notes file.
+ @ingroup PDDocErrors
+ */
+ pdErrCannotOpenNotes,
+ /**
+ This document has no notes.
+ @ingroup PDDocErrors
+ */
+ pdErrNoNotes,
+ /**
+ The copy of a page failed.
+ @ingroup PDDocErrors
+ */
+ pdErrCopyPageFailed,
+ /**
+ This file is damaged.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedRebuild,
+ /**
+ The font contains bad /Flags.
+ @ingroup PDDocErrors
+ */
+ pdErrBadFontFlags,
+ /**
+ The font contains a bad /BBox.
+ @ingroup PDDocErrors
+ */
+ pdErrBadFontBBox,
+ /**
+ The font contains bad /Widths.
+ @ingroup PDDocErrors
+ */
+ pdErrBadFontWidths,
+ /*
+ OBSOLETE.
+ */
+ pdErrOldCosFileOBSOLETE,
+ /**
+ This file can only be saved using Save As.
+ @ingroup PDDocErrors
+ */
+ pdErrTrySaveAs,
+ /**
+ Creation of the notes file was cancelled.
+ @ingroup PDDocErrors
+ */
+ pdErrAbortNotes,
+ /**
+ One or more pages are in use and could not be deleted.
+ @ingroup PDDocErrors
+ */
+ pdErrPagesLockedNotDeleted,
+ /**
+ There is not enough memory available to open the document.
+ @ingroup PDDocErrors
+ */
+ pdErrNotEnoughMemoryToOpenDoc,
+ /**
+ Unable to close the document due to outstanding references.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToCloseDueToRefs,
+ /**
+ This document requires a password.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedPassword,
+ /**
+ This operation is not permitted.
+ @ingroup PDDocErrors
+ */
+ pdErrOpNotPermitted,
+ /**
+ The security plug-in required by this command is unavailable.
+ @ingroup PDDocErrors
+ */
+ pdErrNoCryptHandler,
+ /**
+ Invalid article object.
+ @ingroup PDDocErrors
+ */
+ pdErrBadThread,
+ /**
+ Invalid article element.
+ @ingroup PDDocErrors
+ */
+ pdErrBadBead,
+ /**
+ An error occurred while processing articles.
+ @ingroup PDDocErrors
+ */
+ pdErrThreadProcessing,
+ /**
+ Unknown action type.
+ @ingroup PDDocErrors
+ */
+ pdErrUnknownAction,
+ /**
+ Invalid action object.
+ @ingroup PDDocErrors
+ */
+ pdErrBadAction,
+ /**
+ This file contains information not understood by the viewer. It cannot be used for this operation.
+ @ingroup PDDocErrors
+ */
+ pdErrCantUseNewVersion,
+ /**
+ This viewer cannot decrypt this document.
+ @ingroup PDDocErrors
+ */
+ pdErrOldEncryption,
+ /**
+ Unable to extract the embedded font. Some characters may not display or print correctly.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToExtractFont,
+ /**
+ Unable to find or create the font. Some characters may not display or print correctly.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToFindFont,
+ /**
+ Invalid annotation color (only RGB colors are allowed).
+ @ingroup PDDocErrors
+ */
+ pdErrBadAnnotColor,
+ /**
+ Cannot execute this command on an unsecured document.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedCryptHandler,
+ /**
+ The font contains bad /FontDescriptor metrics.
+ @ingroup PDDocErrors
+ */
+ pdErrBadFontDescMetrics,
+ /**
+ There was an error while inserting or extracting pages and another error while trying to recover.
+ @ingroup PDDocErrors
+ */
+ pdErrWhileRecoverInsertPages,
+ /**
+ Invalid bookmark object.
+ @ingroup PDDocErrors
+ */
+ pdErrBadBookmark,
+ /**
+ Invalid file specification object.
+ @ingroup PDDocErrors
+ */
+ pdErrBadFileSpec,
+ /**
+ This document was successfully saved, but an error occurred after saving the document. Please close and reopen the document.
+ @ingroup PDDocErrors
+ */
+ pdErrAfterSave,
+ /**
+ Some text in the font and character could not be displayed or printed correctly. The font could not be reencoded.
+ @ingroup PDDocErrors
+ */
+ pdErrUnableToXlateText,
+
+ /* Defined after Acrobat 2.1 */
+ /**
+ Not enough bytes are in the text string for the multibyte character code.
+ @ingroup PDDocErrors
+ */
+ pdErrTextStringTooShort,
+ /**
+ A font contains a bad CMap /Encoding.
+ @ingroup PDDocErrors
+ */
+ pdErrBadCMap,
+ /**
+ The font cannot be displayed with the installed version of Adobe Type Manager.
+ @ingroup PDDocErrors
+ */
+ pdErrOldATMVersion,
+ /**
+ This file cannot be opened because it has no pages.
+ @ingroup PDDocErrors
+ */
+ pdErrZeroPageFile,
+ /**
+ Adobe Type Manager is running out of memory. The text in the font may not render properly.
+ @ingroup PDDocErrors
+ */
+ pdErrATMMemory,
+ /**
+ There is not enough memory to optimize this file.
+ @ingroup PDDocErrors
+ */
+ pdErrOptMemory,
+ /**
+ The Save operation was cancelled.
+ @ingroup PDDocErrors
+ */
+ pdErrCancelSave,
+
+ /* vvv previously missing vvv */
+ /**
+ These documents contain subset fonts that have the same name and cannot be merged.
+ @ingroup PDDocErrors
+ */
+ pdErrCannotMergeWithSubsetFonts,
+ /**
+ This document was successfully saved, but an error occurred after saving the document. Please close and reopen the document.
+ @ingroup PDDocErrors
+ */
+ pdErrCannotReopenDoc,
+ /**
+ No PDDoc is associated with the CosDoc.
+ @ingroup PDDocErrors
+ */
+ pdErrNoPDDocForCosDoc,
+ /**
+ The application has not set the host encoding.
+ @ingroup PDDocErrors
+ */
+ pdErrHostEncodingNotSet,
+ /**
+ An invalid font was removed from the document.
+ @ingroup PDDocErrors
+ */
+ pdErrInvalidEmbeddedFont,
+
+ /* Defined for and after Acrobat 5.0 */
+ /**
+ You cannot delete all pages. At least one page must remain.
+ @ingroup PDDocErrors
+ */
+ pdErrCannotDeleteAllPages,
+ /**
+ The starting page number must be less than or the same as the ending page number.
+ @ingroup PDDocErrors
+ */
+ pdErrStartLessThanEnd,
+ /**
+ There is no page with such a number in this document.
+ @ingroup PDDocErrors
+ */
+ pdErrNotValidPage,
+ /**
+ The page number cannot be left blank.
+ @ingroup PDDocErrors
+ */
+ pdErrCannotBeBlankPage,
+ /**
+ Invalid page number.
+ @ingroup PDDocErrors
+ */
+ pdErrInvalidPageNumber,
+ /**
+ Exceeds support encryption key length.
+ @ingroup PDDocErrors
+ */
+ pdErrExceedEncryptionLength,
+ /**
+ This version of encryption is not supported.
+ @ingroup PDDocErrors
+ */
+ pdErrExceedEncryptionVersion,
+ /**
+ Only Adobe certified Acrobat plug-ins are allowed while viewing this document.
+ @ingroup PDDocErrors
+ */
+ pdErrRequireTrustedMode,
+ /**
+ Unable to find a substitution font with all the characters used by the font. Some characters may not be displayed or printed.
+ @ingroup PDDocErrors
+ */
+ pdErrMissingGlyphs,
+ /**
+ An error has occurred that may be fixed by installing the latest version of the Traditional Chinese Language Support package.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedTradChinese,
+ /**
+ An error has occurred that may be fixed by installing the latest version of the Traditional Chinese Language Support package.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedSimpChinese,
+ /**
+ An error has occurred that may be fixed by installing the latest version of the Korean Language Support package.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedKorean,
+ /**
+ An error has occurred that may be fixed by installing the latest version of the Japanese Language Support package.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedJapanese,
+ /**
+ A font required for font substitution is missing.
+ @ingroup PDDocErrors
+ */
+ pdErrMissingSubsetFont,
+ /**
+ The encoding (CMap) specified by a font is missing.
+ @ingroup PDDocErrors
+ */
+ pdErrCMapNotFound,
+ /**
+ The implementation limit was exceeded.
+ @ingroup PDDocErrors
+ */
+ pdErrLimitcheck = 92,
+ /**
+ There is insufficient disk space for the print job spool file to hold the entire print job. Try freeing up disk space on the startup volume and print the remaining pages of the document again.
+ @ingroup PDDocErrors
+ */
+ pdErrPrintAsImageSpoolFileFull,
+ /**
+ Invalid MediaBox.
+ @ingroup PDDocErrors
+ */
+ pdErrInvalidMediaBox,
+
+ /* Defined for Acrobat 6.0 */
+ /**
+ The enumeration process was cancelled by the callback function.
+ @ingroup PDDocErrors
+ */
+ pdEnumCanceled = 97,
+ /**
+ Could not embed the font.
+ @ingroup PDDocErrors
+ */
+ pdErrFontEmbeddingFailed,
+ /**
+ Font embedding was cancelled.
+ @ingroup PDDocErrors
+ */
+ pdErrFontEmbeddingCanceled = 101,
+ /**
+ The operation could not be performed because the objects belong to different documents.
+ @ingroup PDDocErrors
+ */
+ pdErrMultipleDocuments,
+ /**
+ Invalid type or value in an Optional Content object.
+ @ingroup PDDocErrors
+ */
+ pdErrBadOCObject,
+ /**
+ The operation could not be performed because the image is inline.
+ @ingroup PDDocErrors
+ */
+ pdErrNoInlineImage,
+ /**
+ The required Crypt Filter is not registered by the security handler plug-in.
+ @ingroup PDDocErrors
+ */
+ pdErrNoCryptFilterHandler,
+ /**
+ Bad encryption dictionary.
+ @ingroup PDDocErrors
+ */
+ pdErrBadEncryptDict,
+ /**
+ The permission handler required by this command is unavailable.
+ @ingroup PDDocErrors
+ */
+ pdErrNoPermHandler = 108,
+ /**
+ The permission handler has already been added for this document.
+ @ingroup PDDocErrors
+ */
+ pdErrDuplicatePermHandler,
+ /**
+ The maximum number of permission handlers has been reached for this document.
+ @ingroup PDDocErrors
+ */
+ pdErrExceedMaxPermHandlers,
+ /**
+ The font contains an invalid encoding. Some characters may not display.
+ @ingroup PDDocErrors
+ */
+ pdErrBadEncoding = 112,
+ /**
+ The implementation limit was exceeded. Try decreasing the magnification level.
+ @ingroup PDDocErrors
+ */
+ pdErrMatrixTooBig,
+
+ /* Defined for Acrobat 7.0 */
+ /**
+ An error has occurred that may be fixed by installing the latest version of the Extended Language Support package.
+ @ingroup PDDocErrors
+ */
+ pdErrNeedExtendedLang = 120,
+ /**
+ This file is encrypted with an unsupported cryptograhpic algorithm. A later version of Acrobat may be needed in order to open this document.
+ @ingroup PDDocErrors
+ */
+ pdErrUnknownCryptFilter,
+ /**
+ An error has occurred that may be fixed by installing the latest version of the 3D Support package.
+ @ingroup PDDocErrors
+ */
+ pdErrNeed3D
+};
+
+/* PDPage Errors */
+enum
+{
+ /**
+ No error.
+ @ingroup PDPageErrors
+ */
+ pdPErrNoError,
+ /**
+ The dimensions of this page are out of range.
+ @ingroup PDPageErrors
+ */
+ pdPErrPageDimOutOfRange,
+ /**
+ Invalid Type 3 font.
+ @ingroup PDPageErrors
+ */
+ pdPErrBadType3Font,
+ /**
+ The Type 3 font is too complex to print.
+ @ingroup PDPageErrors
+ */
+ pdPErrType3TooComplex,
+ /**
+ The form is too complex to print.
+ @ingroup PDPageErrors
+ */
+ pdPErrFormTooComplex,
+ /**
+ The creation of a raster port failed.
+ @ingroup PDPageErrors
+ */
+ pdPErrUnableToCreateRasterPort
+};
+
+/* Other PDModel errors */
+enum
+{
+ /**
+ No error.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNoError,
+ /**
+ Unable to initialize the font encoding tables.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrEncTablesFailed,
+ /**
+ A security plug-in with this name is already registered.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrDuplicateCryptName,
+ /**
+ A permission handler with this name is already registered.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrDuplicatePermName,
+ /**
+ This navigator file cannot be read. Ensure that the mimetype file exists and is the first file in the package.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrBadNavigator,
+ /**
+ This navigator requires a new version of Acrobat.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNewNavigator,
+ /**
+ This navigator does not have a valid file extension. The only valid file extension for a navigator is either \"nav\" or \"swf\".
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavUnknownExtension,
+ /**
+ This navigator has an invalid mimetype file. The navigator mimetype must be \"application/vnd.adobe.pdf-navigator\".
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavInvalidMimeType,
+ /**
+ This navigator is missing its swf file. Check the spelling of the file name (it is case sensitive).
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavMissingSwf,
+ /**
+ This navigator is missing its navigator xml file.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavMissingNavigatorXML,
+ /**
+ This navigator is missing its locales xml file. Check the spelling of the file name (it is case sensitive).
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavMissingLocalesXML,
+ /**
+ This navigator is missing one or more of its localization xml files. Check the spelling of the file name (it is case sensitive).
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavMissingStringsXML,
+ /**
+ This navigator's navigator xml file is malformed. Verify that your xml file is valid per the navigator schema.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavInvalidNavigatorXML,
+ /**
+ This navigator's locales xml file is malformed. Verify that your xml file is valid per the navigator schema.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavInvalidLocalesXML,
+ /**
+ One or more of this navigator's localization xml files is malformed. Verify that your xml file is valid per the navigator schema.
+ @ingroup OtherPDModelErrors
+ */
+ pdModErrNavInvalidStringsXML
+};
+
+/* AcroView errors */
+enum
+{
+ /**
+ No error.
+ @ingroup AcroViewErrors
+ */
+ avErrNoError,
+ /**
+ No more than ten documents can be opened at a time.
+ @ingroup AcroViewErrors
+ */
+ avErrCantOpenMoreThanTenDocs,
+ /**
+ There are too many pages to print.
+ @ingroup AcroViewErrors
+ */
+ avErrPrintJobTooBig,
+ /**
+ There is too much text to display. No more than 32,000 characters can be displayed.
+ @ingroup AcroViewErrors
+ */
+ avErrTooManyChars,
+ /**
+ There is no text.
+ @ingroup AcroViewErrors
+ */
+ avErrNoText,
+
+ /* previously missing */
+ /**
+ Acrobat cannot open this file. There is a modal dialog box open.
+ @ingroup AcroViewErrors
+ */
+ avErrCantOpenDialog,
+ /**
+ This action cannot be performed from within an external window.
+ @ingroup AcroViewErrors
+ */
+ avErrActionExternal,
+ /**
+ This action cannot be performed during full screen mode.
+ @ingroup AcroViewErrors
+ */
+ avErrActionFullScreen,
+ /**
+ This action cannot be performed.
+ @ingroup AcroViewErrors
+ */
+ avErrActionRestricted,
+ /**
+ Acrobat cannot open this file while printing another document.
+ @ingroup AcroViewErrors
+ */
+ avErrCantOpenPrinting,
+
+ /* new for 3.1 */
+ /**
+ Unregistered copy proc for the annotation object.
+ @ingroup AcroViewErrors
+ */
+ avErrBadAnnotationCopy,
+ /**
+ Unregistered copy proc for the action object.
+ @ingroup AcroViewErrors
+ */
+ avErrBadActionCopy,
+ /**
+ Unable to determine if a new update for this product exists.
+ @ingroup AcroViewErrors
+ */
+ avErrUpdateInternalError,
+ /**
+ Unable to access the Internet.
+ @ingroup AcroViewErrors
+ */
+ avErrUpdateInternetError,
+ /**
+ Web services are currently not available.
+ @ingroup AcroViewErrors
+ */
+ avErrUpdateNoWebServices,
+ /**
+ Unable to read the article because it is damaged or missing.
+ @ingroup AcroViewErrors
+ */
+ avErrBadThreadLinkError,
+ /**
+ Invalid page range.
+ @ingroup AcroViewErrors
+ */
+ avInvalidPageRange,
+
+ /* Defined for Acrobat 6.0 */
+ /**
+ Unable to download the Adobe Reader Help file.
+ @ingroup AcroViewErrors
+ */
+ avErrDownloadHelpError,
+ /**
+ Insufficient permission for this operation.
+ @ingroup AcroViewErrors
+ */
+ avSAInsufficientPermission,
+ /**
+ The operation failed due to the presence of 128-bit encryption in the PDF file.
+ @ingroup AcroViewErrors
+ */
+ avSA128EncryptionPresent
+};
+
+/* Page Contents errors */
+enum
+{
+ /**
+ No error.
+ @ingroup PageContentsErrors
+ */
+ pageErrNoError,
+ /**
+ Too few operands.
+ @ingroup PageContentsErrors
+ */
+ pageErrTooFewOps,
+ /**
+ Wrong operand type.
+ @ingroup PageContentsErrors
+ */
+ pageErrWrongOpType,
+ /**
+ The operand is too large.
+ @ingroup PageContentsErrors
+ */
+ pageErrOpTooLarge,
+ /**
+ The page contents object has the wrong type.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadContents,
+ /**
+ Expected a number while parsing an image.
+ @ingroup PageContentsErrors
+ */
+ pageErrImageExpectedNumber,
+ /**
+ Expected the end of color space.
+ @ingroup PageContentsErrors
+ */
+ pageErrExpectedEndOfColor,
+ /**
+ Expected an <code>AsciiHex</code> or <code>Ascii85</code> string.
+ @ingroup PageContentsErrors
+ */
+ pageErrExpectedHexOrASC85,
+ /**
+ There was an error while trying to parse an image.
+ @ingroup PageContentsErrors
+ */
+ pageErrErrorParsingImage,
+ /**
+ Bad object type within a text operator array.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadTypeInXTextArray,
+ /**
+ An unexpected operator was found in the display list.
+ @ingroup PageContentsErrors
+ */
+ pageErrUnexpectedOpInDisplay,
+ /**
+ Invalid restore.
+ @ingroup PageContentsErrors
+ */
+ pageErrInvalidGRestore,
+ /**
+ The font has not been set.
+ @ingroup PageContentsErrors
+ */
+ pageErrFontNotSet,
+ /**
+ There are too few operands in the path.
+ @ingroup PageContentsErrors
+ */
+ pageErrTooFewPathOps,
+ /**
+ The image in the form or Type 3 font is too big.
+ @ingroup PageContentsErrors
+ */
+ pageErrImageTooBig,
+ /**
+ An error occurred while parsing a form or Type 3 font.
+ @ingroup PageContentsErrors
+ */
+ pageErrParseContextError,
+ /**
+ Invalid Type 3 font.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadType3Font,
+ /**
+ A font is not in the Resources dictionary.
+ @ingroup PageContentsErrors
+ */
+ pageErrFontNotInResources,
+ /**
+ Dash arguments are invalid.
+ @ingroup PageContentsErrors
+ */
+ pageErrInvalidDash,
+ /**
+ The array length is out of range.
+ @ingroup PageContentsErrors
+ */
+ pageErrArrayLenWrong,
+ /**
+ A number value is out of range.
+ @ingroup PageContentsErrors
+ */
+ pageErrNumberOutOfRange,
+ /**
+ A color value is out of range.
+ @ingroup PageContentsErrors
+ */
+ pageErrColorOutOfRange,
+ /**
+ There is an illegal operator inside a text outline object.
+ @ingroup PageContentsErrors
+ */
+ pageErrIllegalOpInTextOutline,
+ /**
+ A curve operator has the wrong number of operands.
+ @ingroup PageContentsErrors
+ */
+ pageErrWrongNumOpsInCurve,
+ /**
+ There were several parsing errors on this page.
+ @ingroup PageContentsErrors
+ */
+ pageErrSeveralParsingErrors,
+ /**
+ Wrong operand type. Another type was expected.
+ @ingroup PageContentsErrors
+ */
+ pageErrWrongOperand,
+ /**
+ Could not find a font in the Resources dictionary; using Helvetica instead.
+ @ingroup PageContentsErrors
+ */
+ pageErrFontNotInResDict,
+ /**
+ Could not find the XObject.
+ @ingroup PageContentsErrors
+ */
+ pageErrXObjectNotFound,
+ /**
+ Could not find the form.
+ @ingroup PageContentsErrors
+ */
+ pageErrFormNotFound,
+ /**
+ Unknown XObject type.
+ @ingroup PageContentsErrors
+ */
+ pageErrUnknownXObjectType,
+ /**
+ Less image data was read than expected.
+ @ingroup PageContentsErrors
+ */
+ pageErrReadLessImageData,
+ /**
+ An unrecognized token was found.
+ @ingroup PageContentsErrors
+ */
+ pageErrUnrecognizedToken,
+ /**
+ The token type was not recognized.
+ @ingroup PageContentsErrors
+ */
+ pageErrTokenTypeNotRec,
+ /**
+ There were too few arguments.
+ @ingroup PageContentsErrors
+ */
+ pageErrTooFewArgs,
+ /**
+ There were too many arguments.
+ @ingroup PageContentsErrors
+ */
+ pageErrTooManyArgs,
+ /**
+ An operand is too large.
+ @ingroup PageContentsErrors
+ */
+ pageErrOperandTooLarge,
+ /**
+ There was an error reading the page near the contents.
+ @ingroup PageContentsErrors
+ */
+ pageErrErrorReadingPage,
+ /**
+ Expected <code>'EI'</code> while parsing an image.
+ @ingroup PageContentsErrors
+ */
+ pageErrImageExpectedEI,
+ /**
+ Unknown filter name.
+ @ingroup PageContentsErrors
+ */
+ pageErrUnknownFilterName,
+ /**
+ Bad decode array.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadDecodeArray,
+ /**
+ Illegal operation inside a path.
+ @ingroup PageContentsErrors
+ */
+ pageErrIllegalOpInPath,
+ /**
+ Illegal operation inside a text object.
+ @ingroup PageContentsErrors
+ */
+ pageErrIllegalOpInTextObj,
+ /**
+ Less image color data was read than expected.
+ @ingroup PageContentsErrors
+ */
+ pageErrReadLessImageColor,
+ /**
+ The wrong number of arguments were used for a <code>setcolor</code> operator.
+ @ingroup PageContentsErrors
+ */
+ pageErrWrongArgsForSetColor,
+ /**
+ Unknown ColorSpace.
+ @ingroup PageContentsErrors
+ */
+ pageErrUnknownColorSpace,
+ /**
+ Could not find the ColorSpace.
+ @ingroup PageContentsErrors
+ */
+ pageErrColorSpaceNotFound,
+ /**
+ Invalid form.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadForm,
+ /**
+ Illegal operation outside the text object.
+ @ingroup PageContentsErrors
+ */
+ pageErrIllegalTextOp,
+ /**
+ The form type is not supported.
+ @ingroup PageContentsErrors
+ */
+ pageErrFormTypeNotAvailable,
+ /*
+ OBSOLETE.
+ */
+ pageErrOBSOLETE,
+ /**
+ Internal error: the machine was called recursively.
+ @ingroup PageContentsErrors
+ */
+ pageErrRecursiveMachine,
+
+ /**
+ An image is specified as an image mask with more than 1 bit per pixel.
+ @ingroup PageContentsErrors
+ */
+ pageErrInvalidImageMaskDepth,
+
+ /* Defined after Acrobat 2.1 */
+ /**
+ Invalid Pattern.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadPattern,
+ /**
+ The Pattern type is not supported.
+ @ingroup PageContentsErrors
+ */
+ pageErrPatternTypeNotAvailable,
+ /**
+ Could not find the Pattern.
+ @ingroup PageContentsErrors
+ */
+ pageErrPatternNotFound,
+ /**
+ Invalid color space.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadColorSpace,
+ /**
+ A resource is missing.
+ @ingroup PageContentsErrors
+ */
+ pageErrMissingResource,
+ /**
+ The dictionary is missing the key.
+ @ingroup PageContentsErrors
+ */
+ pageErrMissingKey,
+ /**
+ Could not find the Extended Graphics State.
+ @ingroup PageContentsErrors
+ */
+ pageErrEGStateNotFound,
+ /**
+ Invalid Extended Graphics State.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadEGS,
+ /**
+ Invalid Function resource.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadFunction,
+
+ /* Defined after Acrobat 3.0 */
+ /**
+ An image uses a color space which will not separate correctly in some applications.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadEPSColorSpace,
+ /**
+ There is an error in the Shading dictionary.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadShading,
+ /**
+ There is an error in the Masked Image.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadMaskImage,
+ /**
+ There were too many color components.
+ @ingroup PageContentsErrors
+ */
+ pageErrTooManyComps,
+ /**
+ A feature requires PostScript 3.
+ @ingroup PageContentsErrors
+ */
+ pageErrNotLevel3,
+ /**
+ Invalid alternate image for the XObject.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadAltXObject,
+
+ /* Defined after Acrobat 5.0 */
+ /**
+ Invalid transparency group.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadTGroup,
+ /**
+ Invalid soft mask.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadSoftMask,
+ /**
+ Invalid halftone.
+ @ingroup PageContentsErrors
+ */
+ pageErrBadHalftone,
+ /**
+ A color operator was used where it is not permitted.
+ @ingroup PageContentsErrors
+ */
+ pageErrIllegalColorOp
+};
+
+/* Font Server Errors */
+enum
+{
+ /**
+ No error.
+ @ingroup FontServerErrors
+ */
+ fsErrNoError,
+ /**
+ Initialization of the font server module failed.
+ @ingroup FontServerErrors
+ */
+ fsErrInitFailed,
+ /**
+ No Multiple Master fonts were found.
+ @ingroup FontServerErrors
+ */
+ fsErrNoMMFonts,
+ /**
+ Adobe Type Manager was not found.
+ @ingroup FontServerErrors
+ */
+ fsErrNoATM,
+ /**
+ A new version of Adobe Type Manager is required.
+ @ingroup FontServerErrors
+ */
+ fsErrNeedNewATM,
+ /**
+ The Type 1 font <i>'ZapfDingbats'</i> must be installed.
+ @ingroup FontServerErrors
+ */
+ fsErrNoT1ZapfDingbats,
+ /**
+ The font download failed.
+ @ingroup FontServerErrors
+ */
+ fsErrDownloadFailed,
+ /**
+ The font download aborted.
+ @ingroup FontServerErrors
+ */
+ fsErrDownloadAborted,
+ /**
+ A bad parameter was passed to the font server.
+ @ingroup FontServerErrors
+ */
+ fsErrBadParameter,
+ /**
+ No <i>ZapfDingbats</i> or Multiple Master fonts were found.
+ @ingroup FontServerErrors
+ */
+ fsErrMissingFont
+};
+
+/* Rasterizer errors */
+enum
+{
+ /**
+ No error.
+ @ingroup RasterizerErrors
+ */
+ rasErrNoError,
+ /**
+ Initialization of the rasterizer module failed.
+ @ingroup RasterizerErrors
+ */
+ rasErrInitFailed,
+ /**
+ Creation of the rasterizer port failed.
+ @ingroup RasterizerErrors
+ */
+ rasErrCreatePort,
+ /**
+ A rasterizer error occurred.
+ @ingroup RasterizerErrors
+ */
+ rasErrDraw
+};
+
+/* ASFile errors */
+enum
+{
+ /**
+ No error.
+ @ingroup ASFileErrors
+ */
+ fileErrNoErr,
+ /**
+ A file error has occurred.
+ @ingroup ASFileErrors
+ */
+ fileErrGeneral,
+ /*
+ OBSOLETE.
+ */
+ fileErrObsolete,
+ /**
+ The directory is full.
+ @ingroup ASFileErrors
+ */
+ fileErrDirFull,
+ /**
+ The document's disk or the disk used for temporary files is full.
+ @ingroup ASFileErrors
+ */
+ fileErrDiskFull,
+ /**
+ The disk containing this file is not available.
+ @ingroup ASFileErrors
+ */
+ fileErrNSV,
+ /**
+ A file I/O error has occurred.
+ @ingroup ASFileErrors
+ */
+ fileErrIO,
+ /**
+ A file read error has occurred.
+ @ingroup ASFileErrors
+ */
+ fileErrRead,
+ /**
+ A file write error has occurred.
+ @ingroup ASFileErrors
+ */
+ fileErrWrite,
+ /**
+ The end of file was reached unexpectedly.
+ @ingroup ASFileErrors
+ */
+ fileErrEOF,
+ /**
+ This file is locked.
+ @ingroup ASFileErrors
+ */
+ fileErrLocked,
+ /**
+ This disk is locked and cannot be written to.
+ @ingroup ASFileErrors
+ */
+ fileErrVLocked,
+ /**
+ This file is busy and cannot be deleted.
+ @ingroup ASFileErrors
+ */
+ fileErrBusy,
+ /**
+ Another file already exists under the same name.
+ @ingroup ASFileErrors
+ */
+ fileErrExists,
+ /**
+ This file is already open or in use by another application.
+ @ingroup ASFileErrors
+ */
+ fileErrAlreadyOpen,
+ /**
+ You do not have access to this file.
+ @ingroup ASFileErrors
+ */
+ fileErrPerm,
+ /**
+ You do not have permission to write to this file.
+ @ingroup ASFileErrors
+ */
+ fileErrWrPerm,
+ /**
+ This file cannot be found.
+ @ingroup ASFileErrors
+ */
+ fileErrFNF,
+ /**
+ File open failed.
+ @ingroup ASFileErrors
+ */
+ fileErrOpenFailed,
+
+ /* The following are new in 2.2 */
+ /**
+ The bytes are not ready.
+ @ingroup ASFileErrors
+ */
+ fileErrBytesNotReady,
+ /**
+ The user requested a stop.
+ @ingroup ASFileErrors
+ */
+ fileErrUserRequestedStop,
+ /**
+ A file I/O error has occurred. The file connection timed out.
+ @ingroup ASFileErrors
+ */
+ fileErrIOTimeout,
+ /**
+ A file I/O error has occurred. The file is blocked while reading.
+ @ingroup ASFileErrors
+ */
+ fileErrReadBlocked,
+ /**
+ This operation can only be performed on a folder.
+ @ingroup ASFileErrors
+ */
+ fileErrNotADir,
+ /**
+ A uniquely named temporary file could not be created. Please restart the application and try again.
+ @ingroup ASFileErrors
+ */
+ fileErrTempCreate,
+
+ /* Acrobat 7.0 */
+ /**
+ This file is too big for the current operation.
+ @ingroup ASFileErrors
+ */
+ fileErrTooBig
+};
+
+/* Extension-Manager errors */
+enum
+{
+ /**
+ No error.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrNoError,
+ /**
+ The plug-in was compiled with an out-of-date HFT.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrOutOfDateHFT,
+ /**
+ The plug-in lacks a <code>PLUG</code> resource of <code>ID 1</code>.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrNoPLUGResource,
+ /**
+ The plug-in is incompatible with this version of the viewer.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrPluginIncompatible,
+ /**
+ The plug-in failed to initialize.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrInitializationFailed,
+ /**
+ Two plug-ins are attempting to register with the same name.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrDuplicatePluginName,
+ /**
+ There was an attempt to replace an unreplaceable selector.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrCannotReplaceSelector,
+ /**
+ An unimplemented function was called.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrCalledObsoleteProc,
+ /**
+ The plug-in failed to load.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrPluginLoadFailed,
+ /**
+ Adobe Reader cannot load this plug-in.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrNotPrivileged,
+ /**
+ Only the 68K Viewer can load this plug-in.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErr68KOnly,
+ /**
+ Only the PowerPC Viewer can load this plug-in.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrPPCOnly,
+ /**
+ This is not a trusted plug-in.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrPlugInNotTrusted,
+ /**
+ This plugin cannot load on Mac OS X.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrPlugInNotCarbonized,
+ /**
+ The currently selected language resources are not supported by this plugin.
+ @ingroup ExtensionManagerErrors
+ */
+ xmErrPluginResourceMismatch
+};
+
+/* PDFX specific errors */
+enum
+{
+ /**
+ No error.
+ @ingroup PDFXSpecificErrors
+ */
+ pdfxErrNoError,
+ /**
+ The size of the passed callbacks <code>struct</code> is wrong (version).
+ @ingroup PDFXSpecificErrors
+ */
+ pdfxErrWrongCallbacks,
+ /**
+ There was an attempt to call a <code>PDFXInstance</code> function during a callback proc.
+ @ingroup PDFXSpecificErrors
+ */
+ pdfxErrDuringCallback,
+ /**
+ PDFX could not launch Acrobat.
+ @ingroup PDFXSpecificErrors
+ */
+ pdfxErrCannotLaunchAcrobat,
+ /**
+ Could not find the External Window Handler plug-in.
+ @ingroup PDFXSpecificErrors
+ */
+ pdfxErrCannotFindEWH
+};
+
+/* PDFEdit specific errors */
+enum
+{
+ /**
+ No error.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrNoError,
+ /**
+ Unknown PDEColorSpace value.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrUnknownPDEColorSpace,
+ /**
+ Incorrect PDEObject type.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrWrongPDEObjectType,
+ /**
+ Unknown PDEObject resource type.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrUnknownResType,
+ /**
+ PDFEdit parse stack underflow while reading object.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrPStackUnderflow,
+ /**
+ Unable to create embedded font subset.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrCantCreateFontSubset,
+ /**
+ Bad block header for Type 1 embedded stream.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrBadBlockHeader,
+ /**
+ Unable to get attributes for the font.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrCantGetAttrs,
+ /**
+ Unable to get widths for the font.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrCantGetWidths,
+ /**
+ Unable to find the font to embed on this system.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrFontToEmbedNotOnSys,
+ /**
+ This font is licensed and cannot be embedded.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrCantEmbedFont,
+ /**
+ Unable to get the image dictionary.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrCantGetImageDict,
+ /**
+ Unable to read the image data.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrCantReadImage,
+ /**
+ Unable to get the shading resource.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrCantGetShading,
+ /**
+ Wrong operand type.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrWrongOpType,
+ /**
+ There were too few operands in the path.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrTooFewPathOps,
+ /**
+ There was an error while trying to parse an image.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrErrorParsingImage,
+ /**
+ Less image color data was read than expected.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrReadLessImageColor,
+ /**
+ Less image data was read than expected.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrReadLessImageData,
+ /**
+ There are invalid or corrupt font metrics in the resource file.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrBadResMetrics,
+ /**
+ Invalid Type 3 font.
+ @ingroup PDFEditSpecificErrors
+ */
+ peErrBadType3Font
+};
+
+/* PDSEdit (structure) specific errors */
+enum
+{
+ /**
+ A required field was missing from a dictionary.
+ @ingroup PDSEditSpecificErrors
+ */
+ pdsErrRequiredMissing,
+ /**
+ An incorrect structure was found in the PDF file.
+ @ingroup PDSEditSpecificErrors
+ */
+ pdsErrBadPDF,
+ /**
+ The dictionary entry has the wrong Cos type.
+ @ingroup PDSEditSpecificErrors
+ */
+ pdsErrWrongTypeEntry,
+ /**
+ The wrong type parameter was supplied to a <code>PDS</code> procedure.
+ @ingroup PDSEditSpecificErrors
+ */
+ pdsErrWrongTypeParameter,
+ /**
+ There is already a table entry with the same name.
+ @ingroup PDSEditSpecificErrors
+ */
+ pdsErrAlreadyExists,
+ /**
+ Some software required to perform this operation is not present in this version of Acrobat.
+ @ingroup PDSEditSpecificErrors
+ */
+ pdsErrCantDo
+};
+
+/* PDMetadata (XAP Metadata API) specific errors */
+enum
+{
+ /**
+ The given metadata was not in the XAP format.
+ @ingroup PDMetadataSpecificErrors
+ */
+ pdMetadataErrBadXAP,
+ /**
+ XAP metadata processing found a syntax error in the PDF.
+ @ingroup PDMetadataSpecificErrors
+ */
+ pdMetadataErrBadPDF,
+ /**
+ An internal representation of the XAP metadata could not be created.
+ @ingroup PDMetadataSpecificErrors
+ */
+ pdMetadataErrCouldntCreateMetaXAP,
+ /**
+ An internal error occurred while processing the XAP metadata.
+ @ingroup PDMetadataSpecificErrors
+ */
+ pdMetadataErrInternalError
+};
+
+#if MAC_PLATFORM
+/* Macintosh System errors */
+enum
+{
+ /**
+ No error (<code>noErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacNoErr = 0,
+ /**
+ The directory is full (<code>dirFulErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacdirFulErr = -33,
+ /**
+ The document's disk or the disk used for temporary files is full (<code>dskFulErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacdskFulErr = -34,
+ /**
+ There is no such volume available (<code>nsvErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacnsvErr = -35,
+ /**
+ A file I/O error has occurred (<code>ioErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacioErr = -36,
+ /**
+ The end of file was reached unexpectedly (<code>eofErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMaceofErr = -39,
+ /**
+ This file is locked (<code>fLckdErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacfLckdErr = -45,
+ /**
+ This volume is locked and cannot be written to (<code>vLckdErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacvLckdErr = -46,
+ /**
+ This file is busy and cannot be deleted (<code>fBsyErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacfBsyErr = -47,
+ /**
+ Another file already exists under the same name (<code>dupFNErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacdupFNErr = -48,
+ /**
+ This file is already open or in use by another application (<code>opWrErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacopWrErr = -49,
+ /**
+ This file's volume is not available (<code>volOffLinErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacvolOffLinErr = -53,
+ /**
+ You do not have permission to open this file (<code>permErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacpermErr = -54,
+ /**
+ This disk is not a Macintosh disk (<code>noMacDskErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacnoMacDskErr = -57,
+ /**
+ You do not have permission to write to this file (<code>wrPermErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacwrPermErr = -61,
+ /**
+ Out of memory (<code>-26</code>). (<code>dsMemFullErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacdsMemFullErr = -26,
+ /**
+ Out of memory (<code>-108</code>). (<code>memFullErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacmemFullErr = -108,
+ /**
+ Tried to get a nonexistent resource (<code>-192</code>). (<code>resNotFound</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacresNotFound = -192,
+ /**
+ PostScript error (<code>-8133</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacGenPSErr = -8133,
+ /**
+ An I/O error has occurred (<code>-27</code>). (<code>iIOAbort</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMaciIOAbort = -27 ,
+ /**
+ Error saving print file (<code>-1</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMaciPrSavPFil = -1,
+ /**
+ This file's server connection has closed down (<code>aspParamErr</code>).
+ @ingroup MacintoshSystemErrors
+ */
+ cfMacServerLostConnection = -1070 /* This file's server connection has closed down. (<code>aspParamErr</code>). */
+};
+
+/* Macintosh Application errors */
+enum
+{
+ /**
+ No error.
+ @ingroup MacintoshApplicationErrors
+ */
+ mdAppErrNoError,
+ /**
+ Cannot print to Acrobat PDFWriter.
+ @ingroup MacintoshApplicationErrors
+ */
+ mdAppCantPrintToPDFWriter,
+ /**
+ Please close all Desk Accessories before printing.
+ @ingroup MacintoshApplicationErrors
+ */
+ mdAppNoDAsWhilePrint,
+ /**
+ Printing is not possible until you have chosen a Printer using the Chooser.
+ @ingroup MacintoshApplicationErrors
+ */
+ mdAppNoPrinter,
+ /**
+ Background printing is not possible with the Assistant Toolbox system extension and loadable ATM.
+ @ingroup MacintoshApplicationErrors
+ */
+ mdAppAsstToolboxActive,
+ /**
+ Some data in the embedded font was invalid. Some characters may not display or print correctly.
+ @ingroup MacintoshApplicationErrors
+ */
+ mdAppIncorrectTTEmbed
+};
+#endif
+
+#if WIN_PLATFORM
+enum
+{
+ /**
+ The file does not exist.
+ @ingroup WindowsErrors
+ */
+ WinBadFileErr = 2,
+ /**
+ The path does not exist.
+ @ingroup WindowsErrors
+ */
+ WinBadPathErr = 3,
+ /**
+ There are too many open files.
+ @ingroup WindowsErrors
+ */
+ WinTooManyErr = 4,
+ /**
+ Access denied.
+ @ingroup WindowsErrors
+ */
+ WinAccessErr = 5,
+ /**
+ Bad file handle.
+ @ingroup WindowsErrors
+ */
+ WinBadHdlErr = 6,
+ /**
+ Not enough memory.
+ @ingroup WindowsErrors
+ */
+ WinMemErr = 8,
+ /**
+ Badly formatted disk.
+ @ingroup WindowsErrors
+ */
+ WinBadDiskErr = 11,
+ /**
+ Invalid drive.
+ @ingroup WindowsErrors
+ */
+ WinBadDriveErr = 15,
+ /**
+ You do not have write permission.
+ @ingroup WindowsErrors
+ */
+ WinWrPermErr = 19,
+ /**
+ Not an MS-DOS disk.
+ @ingroup WindowsErrors
+ */
+ WinNotDosErr = 26,
+ /**
+ General failure.
+ @ingroup WindowsErrors
+ */
+ WinGeneralErr = 31,
+ /**
+ Sharing violation.
+ @ingroup WindowsErrors
+ */
+ WinShareErr = 32,
+ /**
+ Lock violation.
+ @ingroup WindowsErrors
+ */
+ WinLockErr = 33,
+ /**
+ Device does not exist.
+ @ingroup WindowsErrors
+ */
+ WinDeviceErr = 39,
+ /**
+ File already exists.
+ @ingroup WindowsErrors
+ */
+ WinExistsErr = 80
+};
+#endif
+
+#if OS2_PLATFORM
+enum
+{
+ /**
+ The file does not exist.
+ @ingroup OS2Errors
+ */
+ OS2BadFileErr = 2,
+ /**
+ The path does not exist.
+ @ingroup OS2Errors
+ */
+ OS2BadPathErr = 3,
+ /**
+ Too many open files.
+ @ingroup OS2Errors
+ */
+ OS2TooManyErr = 4,
+ /**
+ Access denied.
+ @ingroup OS2Errors
+ */
+ OS2AccessErr = 5,
+ /**
+ Bad file handle.
+ @ingroup OS2Errors
+ */
+ OS2BadHdlErr = 6,
+ /**
+ Not enough memory.
+ @ingroup OS2Errors
+ */
+ OS2MemErr = 8,
+ /**
+ Badly formatted disk.
+ @ingroup OS2Errors
+ */
+ OS2BadDiskErr = 11,
+ /**
+ Invalid drive.
+ @ingroup OS2Errors
+ */
+ OS2BadDriveErr = 15,
+ /**
+ You do not have write permission.
+ @ingroup OS2Errors
+ */
+ OS2WrPermErr = 19,
+ /**
+ Not an MS-DOS disk.
+ @ingroup OS2Errors
+ */
+ OS2NotDosErr = 26,
+ /**
+ General failure.
+ @ingroup OS2Errors
+ */
+ OS2GeneralErr = 31,
+ /**
+ Sharing violation.
+ @ingroup OS2Errors
+ */
+ OS2ShareErr = 32,
+ /**
+ Lock violation.
+ @ingroup OS2Errors
+ */
+ OS2LockErr = 33,
+ /**
+ The device does not exist.
+ @ingroup OS2Errors
+ */
+ OS2DeviceErr = 39,
+ /**
+ The file already exists.
+ @ingroup OS2Errors
+ */
+ OS2ExistsErr = 80
+};
+#endif
+
+#if UNIX_PLATFORM
+
+#include <errno.h>
+
+/* Unix System errors */
+enum
+{
+ /**
+ No error.
+ @ingroup UnixSystemErrors
+ */
+ mdSysNoErr = 0,
+ /**
+ The math argument is out of the domain of the function.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEDOM = EDOM,
+ /**
+ The math result cannot be represented.
+ @ingroup UnixSystemErrors
+ */
+ mdSysERANGE = ERANGE,
+ /**
+ Not the super user.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEPERM = EPERM,
+ /**
+ No such file or directory.
+ @ingroup UnixSystemErrors
+ */
+ mdSysENOENT = ENOENT,
+ /**
+ No such process.
+ @ingroup UnixSystemErrors
+ */
+ mdSysESRCH = ESRCH,
+ /**
+ The system call was interrupted.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEINTR = EINTR,
+ /**
+ I/O error.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEIO = EIO,
+ /**
+ No such device or address.
+ @ingroup UnixSystemErrors
+ */
+ mdSysENXIO = ENXIO,
+ /**
+ Bad file number.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEBADF = EBADF,
+ /**
+ No more processes allowed.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEAGAIN = EAGAIN,
+ /**
+ Not enough core memory.
+ @ingroup UnixSystemErrors
+ */
+ mdSysENOMEM = ENOMEM,
+ /**
+ Permission is denied.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEACCES = EACCES,
+ /**
+ The file exists.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEEXIST = EEXIST,
+ /**
+ Not a directory.
+ @ingroup UnixSystemErrors
+ */
+ mdSysENOTDIR = ENOTDIR,
+ /**
+ Is a directory.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEISDIR = EISDIR,
+ /**
+ File table overflow.
+ @ingroup UnixSystemErrors
+ */
+ mdSysENFILE = ENFILE,
+ /**
+ Too many open files.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEMFILE = EMFILE,
+ /**
+ No space is left on the device.
+ @ingroup UnixSystemErrors
+ */
+ mdSysENOSPC = ENOSPC,
+ /**
+ Read-only file system.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEROFS = EROFS,
+ /**
+ Too many links.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEMLINK = EMLINK,
+#ifdef EDQUOT
+ /**
+ The disk quota was exceeded.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEDQUOT = EDQUOT,
+#endif
+#ifdef ELOOP
+ /**
+ There are too many levels of symbolic links.
+ @ingroup UnixSystemErrors
+ */
+ mdSysELOOP = ELOOP,
+#endif
+#ifdef EMULTIHOP
+ /**
+ A multihop was attempted.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEMULTIHOP = EMULTIHOP,
+#endif
+#ifdef ENOLINK
+ /**
+ Inactive link to a remote machine.
+ @ingroup UnixSystemErrors
+ */
+ mdSysNOLINK = ENOLINK,
+#endif
+#ifdef EOVERFLOW
+ /**
+ Stat buffer overflow.
+ @ingroup UnixSystemErrors
+ */
+ mdSysOVERFLOW = EOVERFLOW,
+#endif /* EOVERFLOW */
+ /**
+ The file name was too long.
+ @ingroup UnixSystemErrors
+ */
+ mdSysENAMETOOLONG = ENAMETOOLONG,
+ /**
+ Illegal address.
+ @ingroup UnixSystemErrors
+ */
+ mdSysEFAULT = EFAULT
+};
+
+/* Unix Application errors */
+enum
+{
+ /**
+ No error.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppErrNoError,
+ /**
+ Open Message partially failed.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppOpenMsgPartFailed,
+ /**
+ Open Message failed.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppOpenMsgFailed,
+ /**
+ Modal window is open.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppModalWindowOpen,
+ /**
+ Bad <code>Property</code> format.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppBadPropertyFormat,
+ /**
+ <code>GetProperty</code> error.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppGetPropertyError,
+ /**
+ Bad AVWindow Platform Thing.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppBadPlatformThing,
+ /**
+ A bus error was caught.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppSIGBUS,
+ /**
+ An illegal instruction was caught.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppSIGILL,
+ /**
+ A segmentation violation was caught.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppSIGSEGV,
+ /**
+ An unknown signal was caught.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppSIGUnknown,
+ /**
+ The print job terminated.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppLPTERM,
+ /**
+ The print job stopped.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppLPSTOP,
+ /**
+ Bad temporary directory resource.
+ @ingroup UnixApplicationErrors
+ */
+ mdAppBadTmpDir
+};
+#endif /* UNIX_PLATFORM */
+
+#endif /* _H_AcroErr */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CAVAlert.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CAVAlert.h
new file mode 100644
index 0000000..1ac5225
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CAVAlert.h
@@ -0,0 +1,181 @@
+/*************************************************************************
+* CAVAlert.h
+* ___________________
+*
+* Copyright 2001-2006 Adobe Systems Incorporated
+* All Rights Reserved.
+*
+* NOTICE: Adobe permits you to use, modify, and distribute this file
+* in accordance with the terms of the Adobe license agreement
+* accompanying it. If you have received this file from a source other
+* than Adobe, then your use, modification, or distribution of it
+* requires the prior written permission of Adobe.
+**************************************************************************/
+
+#ifndef __CAVALERT_H__
+#define __CAVALERT_H__
+
+#if defined(PI_ACROVIEW_VERSION) && (PI_ACROVIEW_VERSION >= AcroViewHFT_VERSION_5)
+#if defined(PI_ASEXTRA_VERSION) && (PI_ASEXTRA_VERSION >= ASExtraHFT_VERSION_5)
+
+#include "AVCalls.h"
+#include "ASExtraCalls.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+// Typedefs for enumeration used within the class
+typedef ASEnum16 AVAlertResult;
+// enumeration for the return values
+enum
+{
+ kAVAlertError = 0,
+ kAVAlertOk,
+ kAVAlertCancel,
+ kAVAlertYes,
+ kAVAlertNo
+};
+
+class CAVAlert
+{
+public:
+ // Constructor and Destructor
+ CAVAlert(AVDoc pDoc = NULL)
+ {
+ SetDoc(pDoc);
+ // Zero out the AVAlertWithParams structure
+ memset( &m_cAlertParams, 0, sizeof(m_cAlertParams) );
+ };
+ virtual ~CAVAlert()
+ {
+ }
+ // Exports
+ static AVAlertResult Display(ASInt32 iconType, AVAlertType alertType, ASConstText pMsg, ASBool beep = false, AVDoc pDoc = NULL)
+ {
+ CAVAlert cAlert;
+ cAlert.SetDoc(pDoc);
+ return cAlert.IDisplay(iconType, alertType, pMsg, beep);
+ }
+ AVAlertResult IDisplay(ASInt32 iconType, AVAlertType alertType, ASConstText pMsg, ASBool beep = false)
+ {
+ return IDisplay(iconType, alertType, pMsg, NULL, NULL, NULL, beep);
+ }
+ // Exported APIs for easy migration
+ static void DisplayNote( ASConstText pMsg, ASBool beep = false)
+ {
+ CAVAlert cAlert;
+ cAlert.IDisplay(ALERT_NOTE, kAVAlertTypeOk, pMsg, NULL, NULL, NULL, false);
+ }
+ static ASBool DisplayOkCancel( ASConstText pMsg, ASBool beep = false)
+ {
+ CAVAlert cAlert;
+ return (cAlert.IDisplay(ALERT_CAUTION, kAVAlertTypeOkCancel, pMsg, NULL, NULL, NULL, false) == kAVAlertOk);
+ }
+ /* unix_newport_changes:sdash: if type is bool it better be set to false for C++ */
+ static AVAlertResult DisplayYesNo(ASInt32 IconType, ASConstText pMsg, bool bCancel = false, ASBool beep = false)
+ {
+ CAVAlert cAlert;
+ return cAlert.IDisplay(IconType, (bCancel)? kAVAlertTypeYesNoCancel: kAVAlertTypeYesNo, pMsg, NULL, NULL, NULL, false);
+ }
+ AVAlertResult IDisplay(ASInt32 iconType, AVAlertType alertType, ASConstText pMsg
+ , ASConstText aButton1, ASConstText aButton2, ASConstText aButton3
+ , ASBool beep = false)
+ {
+ AVAlertResult alertResult = kAVAlertError;
+ ASInt32 nResult = IDisplayOld(iconType, alertType, pMsg, aButton1, aButton2, aButton3, beep);
+ switch (alertType)
+ {
+ case kAVAlertTypeOk:
+ alertResult = ((nResult == 1)? kAVAlertOk: kAVAlertError);
+ break;
+ case kAVAlertTypeOkCancel:
+ alertResult = (nResult == 1)? kAVAlertOk: ((nResult == 2)? kAVAlertCancel: kAVAlertError);
+ break;
+ case kAVAlertTypeYesNo:
+ alertResult = (nResult == 1)? kAVAlertYes: ((nResult == 2)? kAVAlertNo: kAVAlertError);
+ break;
+ case kAVAlertTypeYesNoCancel:
+ alertResult = (nResult == 1)? kAVAlertYes: ((nResult == 2)? kAVAlertNo: ((nResult == 3)? kAVAlertCancel: kAVAlertError));
+ break;
+ default:
+ break;
+ }
+ return alertResult;
+ }
+ ASInt32 IDisplayOld(ASInt32 iconType, AVAlertType alertType, ASConstText pMsg
+ , ASConstText aButton1 = NULL, ASConstText aButton2 = NULL, ASConstText aButton3 = NULL
+ , ASBool beep = false)
+ {
+ ASInt32 nResult = 0;
+ DURING
+ {
+ /* Don't memset m_cAlertParams here, we just stomp over the AVAlertCheckBoxInfo data.
+ * The expectation is that if you are using the checkbox, you manage that state through
+ * CAVAlert::ShowCheckBox. */
+// memset( &m_cAlertParams, 0, sizeof(m_cAlertParams) );
+ m_cAlertParams.size = sizeof(m_cAlertParams);
+ m_cAlertParams.iconType = iconType;
+ m_cAlertParams.alertType = alertType;
+ m_cAlertParams.beep = beep;
+ m_cAlertParams.message = const_cast< ASText >( pMsg );
+ m_cAlertParams.parentDoc = m_pDoc;
+ m_cAlertParams.button1.title = const_cast< ASText >( aButton1 );
+ m_cAlertParams.button2.title = const_cast< ASText >( aButton2 );
+ m_cAlertParams.button3.title = const_cast< ASText >( aButton3 );
+ nResult = AVAlertWithParams( &m_cAlertParams );
+ }
+ HANDLER
+ {
+ }
+ END_HANDLER;
+ return nResult;
+ }
+ void ShowCheckBox(ASBool bCheckbox = true, ASBool bValue = false, ASConstText aTitle = NULL)
+ {
+ m_cAlertParams.checkbox.show = bCheckbox;
+ m_cAlertParams.checkbox.value = bValue;
+ m_cAlertParams.checkbox.title = const_cast< ASText >( aTitle );
+ };
+ ASBool IsChecked()
+ {
+ return m_cAlertParams.checkbox.value;
+ }
+ void SetDoc(AVDoc pDoc)
+ {
+ m_pDoc = pDoc;
+ }
+ // APIs that should be used for debug purposes or places where
+ // translation is not an issue
+ static void DisplayNote(const char* pMsg, ASBool beep = false)
+ {
+ DURING
+ {
+ ASText pText = ASTextFromEncoded(pMsg, AVAppGetLanguageEncoding());
+ DisplayNote(pText, beep);
+ ASTextDestroy(pText);
+ }
+ HANDLER
+ {
+ }
+ END_HANDLER;
+ }
+protected:
+ AVDoc m_pDoc;
+ // Using AVAlertWithParams to enable the right type of icon
+ AVAlertParamsRec m_cAlertParams;
+};
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif // defined(PI_ASEXTRA_VERSION) && (PI_ASEXTRA_VERSION >= ASExtraHFT_VERSION_5)
+#endif // defined(PI_ACROVIEW_VERSION) && (PI_ACROVIEW_VERSION >= AcroViewHFT_VERSION_5)
+#endif // __CAVALERT_H__
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsExpT.h
new file mode 100644
index 0000000..ad621c9
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsExpT.h
@@ -0,0 +1,370 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ConsExpT.h
+
+*********************************************************************/
+
+#ifndef __CONSEXPT_H__
+#define __CONSEXPT_H__
+
+#include "ASExpT.h"
+#include "CosExpT.h"
+#include "ConsObTp.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+/**
+ A type corresponding to the <code>enum</code> defined in <code>ConsObTp.h</code>. This
+ type is used to refer to specific object types in PDF. It is specifically used by Agents to make
+ object requests of the framework, and is used by the framework
+ to report the types of objects found.
+ @see PDFObjTypeGetSuperclass
+ @see ConsAgentObjFoundCallback
+*/
+
+typedef ASUns32 PDFObjType;
+
+/**
+ An opaque traversal stack object. The <code>ConsStackXXX</code> methods
+ allow retrieval of individual members of the <code>PDFObjType</code>
+ and <code>CosObj</code> stacks associated with a Consultant object.
+ @see ConsStackGetCount
+ @see ConsStackIndexGetArrayIndex
+ @see ConsStackIndexGetDictKey
+ @see ConsStackIndexGetObj
+ @see ConsStackIndexGetTypeAt
+ @see ConsStackIndexGetTypeCount
+ @see ConsStackIndexIsArray
+ @see ConsStackIndexIsDict
+ @see ConsAgentObjFoundCallback
+*/
+typedef struct tagConsStack* ConsStack;
+
+/**
+ The opaque type to allow programs to retain handles to create
+ PDF Consultant and Accessibility Checker objects.
+ @see numerous
+*/
+
+typedef struct tagConsultant* Consultant;
+
+
+/** Bit flags that instruct the Consultant about how to handle a found object.
+ A logical <code>OR</code> of these values should be returned by the <code>ObjFound</code> callback.
+ @see ConsAgentObjFoundCallback
+*/
+
+enum tagConsultantAgentAction
+{
+ /** The Consultant makes no changes to the current object. Use
+ this if the Agent is only gathering information or if the Agent
+ is in charge of making all the modifications itself.
+ */
+ AC_NOCHANGE = 0,
+ /** Instructs the Consultant to replace this occurence of the
+ current object in the document with the one retured via the
+ <code>pObjToReturn</code> parameter to the <code>ObjFound</code> callback. You
+ can optionally combine this with <code>AC_REVISIT</code> or
+ <code>AC_CHANGEALL</code>.
+ */
+ AC_REPLACE = 1,
+ /** Instructs the Consultant to remove this occurence of the
+ current object in the document. You can optionally combine
+ this with <code>OD_REVISIT</code> or <code>OD_CHANGEALL</code>.
+ */
+ AC_REMOVE = 2,
+ /** Instructs the Consultant to visit this object again if it is
+ encountered again. You can combine this with any flag except
+ <code>OD_NEVERREVISIT</code> or <code>OD_CHANGEALL</code>.
+ */
+ AC_REVISIT = 4,
+ /** Instructs the Consultant that under no circumstances should
+ the object be revisited, regardless of whether it is reclassified
+ when encountered again. It is only applicable in the mode in
+ which the Consultant pays attention to object classification
+ when determining whether an obect has already been visited.
+ */
+ AC_NEVERREVISIT = 8,
+ /** You must use this in conjunction with either <code>OD_REPLACE</code> or
+ <code>OD_REMOVE</code>. It instructs the Consultant to silently perform the
+ desired operation on all instances of the current object,
+ without calling the <code>ObjFound</code> callback again for this object.
+ */
+ AC_CHANGEALL = 16
+};
+
+typedef ASUns32 ConsultantAgentAction;
+
+/**
+ The Consultant calls this method when it is ready to finish
+ a cycle. You should perform any document modifications assigned
+ to your Agent at this point.
+*/
+
+typedef void ( *ConsAgentPostProcessCallback )( struct tagConsultantAgent* );
+
+
+/**
+ Returns a set of flags instructing the Consultant as to
+ how to handle the current object. The Consultant calls this
+ method when it recognizes the current object as a type which
+ an Agent has declared to be <i>interesting</i>.
+ @param agent The agent containing the callback.
+ @param hObj The object the Consultant has just encountered,
+ which has matched one of the types in any of the registered
+ Agent's array of interesting types.
+ @param pObjTypeHierarchy A list of the object type classifications
+ this object met. The array runs from index <code>0</code>, the most specific
+ object classification, to index <code>iSizeObjHierarchy</code>, the most
+ general.
+ @param iSizeObjHierarchy The size of the type array.
+ @param Stack A reference to the Consultant's traversal
+ stack, which allows read-only access to parents of the current
+ object as well as their respective types.
+ @param pObjToReturn If present, an object the Consultant
+ uses to replace the current object in the document.
+ @return A logical <code>OR</code> of bit flags that instruct the Consultant how
+ to handle the current object (for example, remove it, replace it, ignore
+ it, and so on).
+*/
+
+typedef ConsultantAgentAction ( *ConsAgentObjFoundCallback )( struct tagConsultantAgent*, CosObj, const PDFObjType*, ASUns32, ConsStack, CosObj* );
+
+
+/** The Consultant calls this method with progress updates. It can display a progress bar.
+ @param fPercentDone A number between <code>0</code> and <code>100</code>, indicating the percent of the current
+ document that the Consultant has processed so far.
+*/
+
+typedef void ( *ConsAgentPercentDoneCallback )( ASReal fPercentDone );
+
+
+/**
+ During traversal, the Consultant checks the Agent's list
+ of object types of interest to see if the Agent is interested
+ in the current object, and it calls the callback function
+ pointers when objects of interest are found and when traversal
+ is complete.
+
+ <p>All Agents should be C++ classes derived from the <code>ConsultantAgentObj</code>
+ class (found in agentobj.h) which can be converted (via
+ a C++ cast operator) to a pointer to this structure type.
+ Wherever the Consultant HFT calls for a <code>(struct Agent*)</code>,
+ you can pass the class with no conversion. </p>
+ @see ConsultantRegisterAgent
+ @see ConsAgentObjFoundCallback
+*/
+
+typedef struct tagPDFObjID
+{
+ CosID objID;
+ CosGeneration objGen;
+} PDFObjID;
+
+typedef struct tagConsultantAgent
+{
+ /** The size of the data structure. Set it to <code>sizeof(Agent)</code>. */
+ ASSize_t Size;
+ /** An array of object types of interest. */
+ const PDFObjType* pFindObjects;
+ /** The number of object types in the <code>pFindObjects</code> array. */
+ ASUns32 NumFindObjects;
+ /** A callback procedure for post-processing. */
+ ConsAgentPostProcessCallback PostProcess;
+ /** A callback procedure for when an object is found. */
+ ConsAgentObjFoundCallback ObjFound;
+ /** Indicates if the Agent also wants to be called
+ back for subclasses of types in <code>pFindObjects</code>.
+ */
+ ASBool WantSubclasses;
+ const CosObj* pFindObjectIDs; /* List of objects of interest*/
+ ASUns32 NumFindObjectIDs; /* Count of above list */
+ ConsAgentObjFoundCallback ObjIDFound; /* Callback when object of a specific ID is found */
+} ConsultantAgent;
+
+
+#ifdef __cplusplus
+
+/** When PDF Consultant Agent code is written in C++, it is strongly recommended
+ that the class below be used as an interface definition for the Agent itself.
+ The functionality is provided within this base class to cast to the simple
+ C-callable Agent class above, so this class simply provides a cleaner
+ way to implement an Agent. */
+class ConsultantAgentObj
+{
+ protected:
+ /* The "shell" in which a C-calling convention can actually pass
+ around an instance of the class. Via the overloaded
+ (Agent) cast operator, the class can make itself look like
+ the ConsultantAgent struct defined above, while maintaining
+ all of its class/instance information */
+ typedef struct tagAgentShell
+ {
+ ConsultantAgent BaseAgent;
+ ConsultantAgentObj* pAgentClass;
+
+ } AgentShell;
+
+ AgentShell m_AgentShell;
+
+ public:
+ /** Called by the Consultant when it has completed its traversal. */
+ virtual void PostProcess( void ) = 0;
+
+
+ /**
+ Bit flags that instruct the Consultant about how to handle
+ a found object. A logical <code>OR</code> of these values should be returned
+ by the <code>ObjFound</code> callback.
+ */
+ virtual ConsultantAgentAction ObjFound( CosObj Obj, const PDFObjType* pObjTypeHierarchy,
+ const ASUns32 iSizeObjHierarchy, ConsStack Stack, CosObj* pObjRet ) = 0;
+
+ /** The constructor initializes the internal structure so that it is available
+ for outside access. The array of requested objects is <i>copied</i> into the
+ member storage variables. This is to ease the burden of constructing
+ an Agent. */
+ ConsultantAgentObj( const PDFObjType* pRequestedObjs, ASUns32 iNumRequestedObjs, ASBool bWantSubclasses = true )
+ {
+ m_AgentShell.pAgentClass = this;
+ m_AgentShell.BaseAgent.Size = sizeof( m_AgentShell.BaseAgent );
+ m_AgentShell.BaseAgent.pFindObjects = pRequestedObjs;
+ m_AgentShell.BaseAgent.NumFindObjects = iNumRequestedObjs;
+ m_AgentShell.BaseAgent.PostProcess = ( ConsAgentPostProcessCallback )DoPostProcess;
+ m_AgentShell.BaseAgent.ObjFound = ( ConsAgentObjFoundCallback )DoObjFound;
+ m_AgentShell.BaseAgent.WantSubclasses = bWantSubclasses;
+ m_AgentShell.BaseAgent.pFindObjectIDs = NULL;
+ m_AgentShell.BaseAgent.NumFindObjectIDs = 0;
+ m_AgentShell.BaseAgent.ObjIDFound = NULL;
+
+ };
+
+ /** The destructor for the class. */
+ virtual ~ConsultantAgentObj( void ) { };
+
+ /** Provides automatic conversion to a C-language and hence C-callable <code>struct</code> (for HFT's and so on). */
+ operator const ConsultantAgent* ( void ) const { return ( const ConsultantAgent* )&m_AgentShell; }
+ operator ConsultantAgent* ( void ) const { return ( ConsultantAgent* )&m_AgentShell; }
+
+ /** Functions that do not depend on the class' <code>this</code> pointer being present. So,
+ these can be called from C or from an HFT. Hence, they require an
+ active agent as a parameter. */
+ static void DoPostProcess( ConsultantAgent* pAgent ) { ( ( AgentShell* )pAgent )->pAgentClass->PostProcess(); };
+
+ /** A callback called when an object is found. */
+ static ASInt32 DoObjFound( ConsultantAgent* pAgent, CosObj Obj, const PDFObjType* pObjTypeHierarchy,
+ const ASUns32 iSizeObjHierarchy, ConsStack Stack, CosObj* pObjRet )
+ {
+ return ( ( AgentShell* )pAgent )->pAgentClass->ObjFound( Obj, pObjTypeHierarchy, iSizeObjHierarchy, Stack, pObjRet );
+ };
+
+};
+
+/* 7/14/2008 - Change from PDFObjID to CosObj in the RequestedObjID list */
+class ConsultantObjIDAgentObj : public ConsultantAgentObj
+{
+ public:
+ /* Called by the Consultant when it finds an object whose identifier is of interest to the agent. */
+ virtual ConsultantAgentAction ObjIDFound( CosObj Obj, const PDFObjType* pObjTypeHierarchy,
+ const ASUns32 iSizeObjHierarchy, ConsStack Stack, CosObj* pObjRet ) = 0;
+
+ ConsultantObjIDAgentObj( const PDFObjType* pRequestedObjs, ASUns32 iNumRequestedObjs,
+ const CosObj* pRequestedObjIDs, ASUns32 iNumRequestedObjIDs,
+ ASBool bWantSubclasses = true )
+ :ConsultantAgentObj(pRequestedObjs, iNumRequestedObjs, bWantSubclasses)
+ {
+ m_AgentShell.BaseAgent.pFindObjectIDs = pRequestedObjIDs;
+ m_AgentShell.BaseAgent.NumFindObjectIDs = iNumRequestedObjIDs;
+ m_AgentShell.BaseAgent.ObjIDFound = ( ConsAgentObjFoundCallback )DoObjIDFound;
+ };
+
+ static ASInt32 DoObjIDFound( ConsultantAgent* pAgent, CosObj Obj, const PDFObjType* pObjTypeHierarchy,
+ const ASUns32 iSizeObjHierarchy, ConsStack Stack, CosObj* pObjRet )
+ {
+ return ( (ConsultantObjIDAgentObj*) ( ( AgentShell* )pAgent )->pAgentClass)->ObjIDFound( Obj, pObjTypeHierarchy, iSizeObjHierarchy, Stack, pObjRet );
+ };
+};
+
+#endif /* __cplusplus */
+
+
+/** Modes that an agent <i>must</i> pass to the PDF Consultant to define behavior
+ when the <code>RegisterAgent</code> function is called.
+
+ <p>It is important to note that the Consultant framework can only be in
+ one mode at a time. If multiple agents register with different modes,
+ the last mode to be assigned is the one that is eventually used. As always,
+ group similar agents together to avoid conflicts such as this. </p>
+*/
+
+#define REQUIRES_CLASSIFY 128 /* A bit set for all modes that require
+ the Consultant to keep track of object
+ type classification. */
+
+/**
+ Constants that specify an operation mode for the Consultant. This value determines
+ whether and how often the Consultant should revisit objects that have been previously
+ encountered.
+*/
+enum tagRegAgentFlag
+{
+ /** Revisit unknown objects only. Once the object is of a known type,
+ that object is no longer visited. Visit all objects of known types
+ only once (unless an agent returns <code>OD_REVISIT</code> for the object). */
+ REG_ONLYREVISITUNKNOWN = 0,
+
+ /** Do not revisit objects of any type, whether or not they are
+ later encountered with a new classification at some point.
+ Only revisit an object if an agent returns <code>OD_REVISIT</code> for
+ the object. */
+ REG_REVISITNONE,
+
+ /** Revisit an object whenever it is encountered again with a new
+ classification (regardless of whether the new classification is
+ as an unknown type). */
+ REG_REVISITRECLASS_ALL = REQUIRES_CLASSIFY, /* From here on in the enum,
+ all modes require that the
+ Consultant save object type
+ classification info. */
+
+ /** Revisit an object whenever it is encountered again with a new
+ classification, but always revisit objects classified as
+ <i>unknown</i> (even if the object has previously been encountered and
+ classified as unknown). */
+ REG_REVISITRECLASS_ALWAYSUNKNOWN,
+
+ /* Revisit all objects at least once, and more if client returns <code>AC_REVISIT</code>. At least one node in the
+ Cos graph rooted at a certain <code>CosObj</code> must return <code>AC_REVISIT</code> if that <code>CosObj</code> is to be revisited. It makes
+ sense only in the <code>POSTORDER</code> scrubber traversal mode.
+ It avoids infinite cycles by making sure that the node that is about to be visited is not already
+ on the traversal stack. */
+ REG_REVISIT_ONDEMAND = 0x00000100
+};
+
+typedef ASUns32 RegAgentFlag;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* __CONSEXPT_H__ */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFT.h
new file mode 100644
index 0000000..8753fc4
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFT.h
@@ -0,0 +1,103 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ ConsHFT.h
+
+ - Catalog of functions exported by PDF Consultant.
+
+*********************************************************************/
+
+#ifndef __CONSHFT_H__
+#define __CONSHFT_H__
+
+
+#include "ConsExpT.h"
+//#include "ASCalls.h"
+
+//#include "CoreExpT.h"
+//#include "PDExpT.h"
+#include "ASExpT.h"
+#include "AVExpT.h"
+
+
+/* ****************************** HFT Stuff ************************************** */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern HFT gConsultantHFT;
+
+#define PDFCONSULTANT_HFT_NAME "PDFConsultant"
+#define PDFCONSULTANT_REAL_HFT_NAME ("$"PDFCONSULTANT_HFT_NAME)
+#define PDFCONSULTANT_HFT_VER_1 0x00010000
+#define PDFCONSULTANT_HFT_VER_2 0x00020000
+#define PDFCONSULTANT_HFT_VER_3 0x00030000
+#define PDFCONSULTANT_HFT_LATEST PDFCONSULTANT_HFT_VER_3
+
+#define Init_PDFConsultantHFT ASExtensionMgrGetHFT( ASAtomFromString( PDFCONSULTANT_HFT_NAME ), PDFCONSULTANT_HFT_LATEST )
+
+
+#if PDFCONSULTANT_HFT_LATEST != 0
+
+
+// ------------ Create the enum ---------------
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+enum
+{
+ ConsultantBAD_SELECTOR = 0,
+ #include "ConsHFTProcs.h"
+ ConsultantNUMSELECTORSPlusOne
+};
+#undef PIPROC
+
+#define ConsultantNUMSELECTORS ( ConsultantNUMSELECTORSPlusOne - 1 )
+
+
+// ------------ Create the Prototypes ---------------
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+ #include "ConsHFTProcs.h"
+#undef PIPROC
+
+#define ConsultantCreate ( *( ( ConsultantCreate_SELPROTO )( gConsultantHFT[ ConsultantCreate_SEL ] ) ) )
+#define ConsultantDestroy ( *( ( ConsultantDestroy_SELPROTO )( gConsultantHFT[ ConsultantDestroy_SEL ] ) ) )
+#define ConsultantTraverseFrom ( *( ( ConsultantTraverseFrom_SELPROTO )( gConsultantHFT[ ConsultantTraverseFrom_SEL ] ) ) )
+#define ConsultantSuspend ( *( ( ConsultantSuspend_SELPROTO )( gConsultantHFT[ ConsultantSuspend_SEL ] ) ) )
+#define ConsultantResume ( *( ( ConsultantResume_SELPROTO )( gConsultantHFT[ ConsultantResume_SEL ] ) ) )
+#define ConsultantRegisterAgent ( *( ( ConsultantRegisterAgent_SELPROTO )( gConsultantHFT[ ConsultantRegisterAgent_SEL ] ) ) )
+#define ConsultantSetStart ( *( ( ConsultantSetStart_SELPROTO )( gConsultantHFT[ ConsultantSetStart_SEL ] ) ) )
+#define ConsultantNextObj ( *( ( ConsultantNextObj_SELPROTO )( gConsultantHFT[ ConsultantNextObj_SEL ] ) ) )
+#define ConsultantGetPercentDone ( *( ( ConsultantGetPercentDone_SELPROTO )( gConsultantHFT[ ConsultantGetPercentDone_SEL ] ) ) )
+#define ConsultantGetNumDirectVisited ( *( ( ConsultantGetNumDirectVisited_SELPROTO )( gConsultantHFT[ ConsultantGetNumDirectVisited_SEL ] ) ) )
+#define ConsultantGetNumIndirectVisited ( *( ( ConsultantGetNumIndirectVisited_SELPROTO )( gConsultantHFT[ ConsultantGetNumIndirectVisited_SEL ] ) ) )
+#define ConsultantGetNumUniqueIndirectsVisited ( *( ( ConsultantGetNumUniqueIndirectsVisited_SELPROTO )( gConsultantHFT[ ConsultantGetNumUniqueIndirectsVisited_SEL ] ) ) )
+#define ConsStackGetCount ( *( ( ConsStackGetCount_SELPROTO )( gConsultantHFT[ ConsStackGetCount_SEL ] ) ) )
+#define ConsStackIndexGetTypeCount ( *( ( ConsStackIndexGetTypeCount_SELPROTO )( gConsultantHFT[ ConsStackIndexGetTypeCount_SEL ] ) ) )
+#define ConsStackIndexGetTypeAt ( *( ( ConsStackIndexGetTypeAt_SELPROTO )( gConsultantHFT[ ConsStackIndexGetTypeAt_SEL ] ) ) )
+#define ConsStackIndexGetObj ( *( ( ConsStackIndexGetObj_SELPROTO )( gConsultantHFT[ ConsStackIndexGetObj_SEL ] ) ) )
+#define ConsStackIndexIsDict ( *( ( ConsStackIndexIsDict_SELPROTO )( gConsultantHFT[ ConsStackIndexIsDict_SEL ] ) ) )
+#define ConsStackIndexIsArray ( *( ( ConsStackIndexIsArray_SELPROTO )( gConsultantHFT[ ConsStackIndexIsArray_SEL ] ) ) )
+#define ConsStackIndexGetDictKey ( *( ( ConsStackIndexGetDictKey_SELPROTO )( gConsultantHFT[ ConsStackIndexGetDictKey_SEL ] ) ) )
+#define ConsStackIndexGetArrayIndex ( *( ( ConsStackIndexGetArrayIndex_SELPROTO )( gConsultantHFT[ ConsStackIndexGetArrayIndex_SEL ] ) ) )
+#define PDFObjTypeGetSuperclass ( *( ( PDFObjTypeGetSuperclass_SELPROTO )( gConsultantHFT[ PDFObjTypeGetSuperclass_SEL ] ) ) )
+// Version 3
+#define ConsultantNeverVisitObj ( *( ( ConsultantNeverVisitObj_SELPROTO )( gConsultantHFT[ ConsultantNeverVisitObj_SEL ] ) ) )
+
+#endif /* PDFCONSULTANT_HFT_LATEST != 0 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONSHFT_H__ */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFTProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFTProcs.h
new file mode 100644
index 0000000..ce97883
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsHFTProcs.h
@@ -0,0 +1,361 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+
+/**
+ Allocates and intializes a new Consultant object. Use the
+ returned object to call the other Consultant API functions.
+ When you are finished with this object, you must destroy
+ it using the ConsultantDestroy() function.
+ <p>An Acrobat exception is raised on failure. </p>
+ @param pPercentDoneCallBack A function pointer to be called back with progress
+ updates. It may be <code>NULL</code>.
+ @return The Consultant object that was created.
+ @see ConsultantDestroy
+*/
+PIPROC ( Consultant, ConsultantCreate, ( ConsAgentPercentDoneCallback pPercentDoneCallBack ), pPercentDoneCallBack)
+
+/* ConsultantDestroy
+
+ Halts traversal by the given Consultant, detatches all Agents, and destroys it.
+ Must be called on all Consultants created via ConsultantCreate.
+
+ Raises on failure.
+*/
+/**
+ Detaches all Agents and destroys the given Consultant object,
+ invalidating its handle. You must never call this on a Consultant
+ that is currently running.
+ <p>An Acrobat exception is raised on failure. </p>
+ @param hConsultantToDestroy A valid Consultant object
+ handle as returned by ConsultantCreate(). The handle is invalid
+ after the call returns.
+*/
+PIPROC ( void, ConsultantDestroy, ( Consultant hConsultantToDestroy ), hConsultantToDestroy)
+
+/**
+ Starts the given Consultant object traversing at the given
+ Cos object. It traverses and processes all objects beneath
+ <code>obj</code>, classifying the types of objects based on the fact that
+ <code>obj</code> is of the given <code>ObjType</code>.
+
+ <p>It is never allowed to destroy a Consultant object that is
+ currently executing a call to ConsultantTraverseFrom(). To
+ properly destroy a running Consultant, you must first call ConsultantSuspend().
+ ConsultantTraverseFrom() raises an exception under
+ any other conditions, and may also raise an exception as
+ the result of a registered Agent's raising an exception
+ during the operation.</p>
+
+ <p>An Acrobat exception is raised if the Consultant has been started
+ and is not in a suspended state.</p>
+
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate(). It is the Consultant with which the Agent
+ will be registered.
+ @param hObj The object at which to start traversal.
+ @param kObjType The object type of the specified start
+ object. It may be <code>PT_NULL</code>, in which case the Consultant attempts
+ to determine the type of the object itself. You should specify
+ a value other than <code>PT_NULL</code> whenever possible.
+
+*/
+PIPROC ( void, ConsultantTraverseFrom, ( Consultant hConsultant, CosObj hObj, PDFObjType kObjType ), hConsultant, hObj, kObjType )
+
+/**
+ Registers the given agent with the given consultant, so
+ that the agent is called when the consultant encounters
+ objects of interest.
+
+ <p>An Acrobat exception is raised if the Consultant has been started
+ and is not in a suspended state. </p>
+
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate(). It is the Consultant with which the Agent
+ will be registered.
+ @param pAgent The Agent to register, of a
+ type derived from the <code>ConsultantAgentObj</code> base class.
+ @param kFlag A flag indicating the mode in which the Consultant
+ should operate.
+*/
+PIPROC ( void, ConsultantRegisterAgent, ( Consultant hConsultant, const ConsultantAgent* pAgent, RegAgentFlag kFlag ), hConsultant, pAgent, kFlag )
+
+/**
+ Resets the suspended Consultant and starts a new traversal
+ from the given starting object.
+
+ <p>If you do not know the type of the object, the Consultant
+ will attempt to determine it. This function does not return
+ until the entire path beneath the starting object has been
+ traversed. The Consultant passes to the registered Agents
+ all objects it encounters that have been registered as <i>interesting</i>. </p>
+
+ <p>An Acrobat exception is raised if the Consultant has been started
+ and is not in a suspended state. </p>
+
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate(). It is the Consultant with which the Agent
+ will be registered.
+ @param hObjStart The object at which to restart traversal.
+ Usually, for traversing an entire document, this is the
+ Catalog.
+ @param kInitType The object type of the specified start
+ object. It may be <code>PT_NULL</code>, in which case the Consultant attempts
+ to determine the type of the object itself. You should specify
+ a value other than <code>PT_NULL</code> whenever possible In most cases,
+ for traversing the entire document, the starting object
+ is the Catalog so the type is <code>PT_CATALOG</code>.
+*/
+PIPROC ( void, ConsultantSetStart, ( Consultant hConsultant, CosObj hObjStart, PDFObjType kInitType ), hConsultant, hObjStart, kInitType )
+
+/**
+ Instructs the Consultant to process the next object in the
+ current traversal. It assumes that the Consultant has been
+ suspended and reset with calls to ConsultantSuspend() and
+ ConsultantSetStart(). This function does not un-suspend a Consultant,
+ so you can call it repeatedly. It returns after all registered
+ Agents have processed the object.
+
+ <p>An Acrobat exception is raised if you call it on a running
+ Consultant. </p>
+
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+ @return <code>true</code> if the process is done or there has been a problem,
+ <code>false</code> otherwise.
+*/
+PIPROC ( ASBool, ConsultantNextObj, ( Consultant hConsultant ), hConsultant)
+
+/**
+ Returns an estimate (from <code>0</code> to <code>100</code>) of what percentage of
+ the current document has been processed by the Consultant.
+ You can call this function at any time.
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+ @return A number from <code>0</code> to <code>100</code>.
+*/
+PIPROC ( ASReal, ConsultantGetPercentDone, ( Consultant hConsultant ), hConsultant)
+
+/**
+ Returns the number of direct objects that the Consultant
+ has processed so far. This count may include some objects
+ twice, depending on revisitation of objects. This count is
+ reset on calls to ConsultantTraverseFrom() and ConsultantSetStart().
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+ @return The number of direct objects the Consultant has visited
+ so far.
+*/
+PIPROC ( ASUns32, ConsultantGetNumDirectVisited, ( Consultant hConsultant ), hConsultant)
+
+/**
+ Returns the number of indirect objects that the Consultant
+ has processed so far. This count may include some objects
+ twice, depending on revisitation of objects. This count is
+ reset on calls to ConsultantTraverseFrom() and ConsultantSetStart().
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+ @return The number of indirect objects the Consultant has visited
+ so far.
+*/
+PIPROC ( ASUns32, ConsultantGetNumIndirectVisited, ( Consultant hConsultant ), hConsultant)
+
+/**
+ Suspends the Consultant, even if it is currently executing
+ a call to ConsultantCreate() or ConsultantResume(). This function
+ causes currently executing calls to ConsultantTraverseFrom()
+ to return. It is allowed to call this function from within
+ the ScrubPercentDoneCallback() passed to the Consultant on
+ ConsultantCreate(). Calls to ConsultantTraverseFrom() that are
+ currently in progress will return when ConsultantSuspend()
+ is called.
+
+ <p>To resume, call ConsultantResume(). </p>
+
+ <ul>
+ <li>You can call ConsultantNextObj() on a suspended Consultant,
+ which removes the suspension and causes the Consultant to
+ process the next object. </li>
+ <li>You can destroy a Consultant that has been suspended. </li>
+ <li>If you call ConsultantTraverseFrom() on a suspended Consultant,
+ it will reset the operation of the Consultant, but the Consultant
+ will remain in a suspended state and will not process the
+ document further. </li>
+ </ul>
+
+ <p>This function does nothing if you call it on a Consultant
+ object that is already suspended, or if it was never started. </p>
+
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+*/
+PIPROC ( void, ConsultantSuspend, ( Consultant hConsultant ), hConsultant )
+
+/**
+ Resumes a previously suspended Consultant at the point in
+ the traversal where it stopped. This function does not return
+ from traversing and notifying Agents until the traversal
+ is complete or ConsultantSuspend() is called. The function
+ does nothing if the Consultant object is already running
+ or has not been started.
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+*/
+PIPROC ( void, ConsultantResume, ( Consultant hConsultant ), hConsultant )
+
+/**
+ Returns the number of objects currently on Consultant's
+ traversal stack. The stack includes the objects that the
+ Consultant has visited on its path to the current object,
+ meaning all parents of the current object but
+ not the object itself.
+
+ <p>An Acrobat exception is raised on error. </p>
+
+ @param hConsultant The Consultant's traversal stack.
+ @return The number of objects on the Consultant.'s traversal stack.
+*/
+PIPROC ( ASUns32, ConsStackGetCount, ( ConsStack hConsultant ), hConsultant)
+
+/**
+ Gets the the Cos object at the given index into the stack.
+
+ @param hConsultant The Consultant's traversal stack.
+ @param iIndex The point at which to find the object.
+ @return The object at the specified point in the Consultant's traversal
+ stack.
+*/
+PIPROC ( CosObj, ConsStackIndexGetObj, ( ConsStack hConsultant, ASUns32 iIndex ), hConsultant, iIndex )
+
+/**
+ Gets the size of the type hierarchy at the given index into
+ the stack.
+ @param hConsultant The Consultant's traversal stack.
+ @param iIndex The object in question.
+ @return The size of the type hierarchy.
+ It tests whether the given index into the stack is a <code>CosArray</code>.
+ @return <code>true</code> if the object found at the index point is an array,
+ <code>false</code> otherwise.
+*/
+PIPROC ( ASUns32, ConsStackIndexGetTypeCount, ( ConsStack hConsultant, ASUns32 iIndex ), hConsultant, iIndex)
+
+/**
+ Gets a type from the type array at each index in the stack.
+ Since there are potentially multiple types for each object,
+ you can access the type classifications one at a time.
+ @param hConsultant The Consultant's traversal stack.
+ @param iIndex The position in the stack of the object in
+ question.
+ @param iTypeIndex The type classification of the object.
+ <code>0</code> is the most specific type classification. The higher the
+ number, the more general the type classification.
+ @return One type of an object at a particular location in the traversal
+ stack.
+*/
+PIPROC ( PDFObjType, ConsStackIndexGetTypeAt, ( ConsStack hConsultant, ASUns32 iIndex, ASUns32 iTypeIndex ), hConsultant, iIndex, iTypeIndex )
+
+/**
+ Tests whether the object at the given index into the stack
+ is a <code>CosDict</code> object.
+ @param hConsultant The Consultant's traversal stack.
+ @param iIndex The index in the stack where the object in question
+ is located.
+ @return <code>true</code> if the object found at the index point is a dictionary,
+ <code>false</code> otherwise.
+*/
+PIPROC ( ASBool, ConsStackIndexIsDict, ( ConsStack hConsultant, ASUns32 iIndex ), hConsultant, iIndex )
+
+/**
+ Tests whether the given index into the stack is a <code>CosArray</code>.
+
+ @param hConsultant The Consultant's traversal stack.
+ @param iIndex The index in the stack where the object in question
+ is located.
+ @return <code>true</code> if the object found at the index point is an array,
+ <code>false</code> otherwise.
+*/
+PIPROC ( ASBool, ConsStackIndexIsArray, ( ConsStack hConsultant, ASUns32 iIndex ), hConsultant, iIndex )
+
+/**
+ Gets the key string atom of the object at the given index
+ into the stack (that is, the key that led from the given
+ object to the next object in the traversal). It is only
+ valid to call this function on an index if ConsStackIndexIsDict()
+ returns <code>true</code> for that index.
+
+ <p>An Acrobat exception is raised on error. </p>
+
+ @param hConsultant The Consultant's traversal stack.
+ @param iIndex The index in the stack where the object in question
+ is located.
+ @return The key that led from the object at the given index in the
+ stack to the next object in the Consultant's traversal path.
+*/
+PIPROC ( ASAtom, ConsStackIndexGetDictKey, ( ConsStack hConsultant, ASUns32 iIndex ), hConsultant, iIndex )
+
+/**
+ Gets the array index of the object at the given index into
+ the stack (that is, the index that led from the given object
+ to the next object in the traversal). It is only valid to
+ call this function on an index if ConsStackIndexIsArray()
+ returns <code>true</code> for that index.
+ @param hConsultant The Consultant's traversal stack.
+ @param iIndex The index in the stack where the object in question
+ is located.
+ @return The array index that led from the object at the given index
+ in the stack to the next object in the Consultant's traversal
+ path.
+*/
+PIPROC ( ASUns32, ConsStackIndexGetArrayIndex, ( ConsStack hConsultant, ASUns32 iIndex ), hConsultant, iIndex )
+
+/**
+ Gets the superclass, if any, of the given <code>PDFObjType</code>.
+ @param kType The type that might have a superclass.
+ @return The superclass of the given type, or <code>DT_NULL</code> if no superclass
+ exists.
+*/
+PIPROC ( PDFObjType, PDFObjTypeGetSuperclass, ( PDFObjType kType ), kType )
+
+/**
+ Returns the number of unique indirect objects that the Consultant
+ has processed so far. This count is reset on calls to ConsultantTraverseFrom()
+ and ConsultantSetStart(). Visited objects are not counted
+ more than once, if an object is revisited, the count is
+ not incremented.
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+ @return The number of unique indirect objects the Consultant has
+ visited so far.
+*/
+PIPROC ( ASUns32, ConsultantGetNumUniqueIndirectsVisited, ( Consultant hConsultant ), hConsultant)
+
+// Version 3
+/**
+ Instructs the Consultant to never walk through the supplied object.
+ This function can (should) be called before traversing, so that you
+ can ignore subtrees (such as the StructTree).
+ This function does not un-suspend a Consultant, so you can call it
+ repeatedly. It marks the object as Visited and NeverRevisit.
+ This is a pre-traverse call, since marking an object as AC_NEVERREVISIT
+ only occurs AFTER the object has been visited in post-order modes.
+
+ @param hConsultant A valid Consultant object handle as returned
+ by ConsultantCreate().
+*/
+PIPROC ( void, ConsultantNeverVisitObj, ( Consultant hConsultant, CosObj hObj ), hConsultant, hObj)
+
+
+
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsObTp.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsObTp.h
new file mode 100644
index 0000000..c7ec3a8
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ConsObTp.h
@@ -0,0 +1,541 @@
+/***********************************************************************************
+*
+* (c) Copyright 2000-2006, Adobe Systems Inc.
+* All Rights Reserved.
+*
+* NOTICE: This file is furnished to you by Adobe Systems Incorporated under the
+* terms of the Acrobat (tm) Plug-ins SDK Confidential Information Agreement and
+* the Acrobat Plug-ins Software Development Kit License Agreement.
+*
+************************************************************************************/
+
+#ifndef __TYPES_OUTFILE__
+#define __TYPES_OUTFILE__
+
+enum tagPDFObjType
+{
+ PT_AADICTIONARY = 0,
+ PT_ACROFORMSPAGESTREE,
+ PT_ACROFORMSTEMPLATESTREE,
+ PT_ACTION,
+ PT_ACTIONSARRAY,
+ PT_AFPAGESCHILDREN,
+ PT_AFPAGESINTNODE,
+ PT_AFPAGESLEAFNODE,
+ PT_AFPAGESNAMEDCHILDREN,
+ PT_AFTEMPLATESCHILDREN,
+ PT_AFTEMPLATESINTNODE,
+ PT_AFTEMPLATESLEAFNODE,
+ PT_AFTEMPLATESNAMEDCHILDREN,
+ PT_ANNOTATION,
+ PT_ANNOTSARRAY,
+ PT_APPEARANCEDICT,
+ PT_BEAD,
+ PT_BLENDMODELIST,
+ PT_BOXCOLORINFO,
+ PT_CALGRAYATTRIBUTES,
+ PT_CALGRAYCOLORSPACE,
+ PT_CALRGBATTRIBUTES,
+ PT_CALRGBCOLORSPACE,
+ PT_CATALOG,
+ PT_CHARPROCS,
+ PT_CHOICEFIELD,
+ PT_COLORANTSDICT,
+ PT_COLORSPACEATTRIBUTES,
+ PT_COLORSPACELIST,
+ PT_CONTENTSARRAY,
+ PT_DESTINATION,
+ PT_DEVICENCOLORSPACE,
+ PT_DOWNAPPEARANCEDICT,
+ PT_EMBEDOBJCHILDREN,
+ PT_EMBEDOBJINTNODE,
+ PT_EMBEDOBJLEAFNODE,
+ PT_EMBEDOBJNAMEDCHILDREN,
+ PT_EMBEDOBJTREE,
+ PT_EXPONENTIALFUNCTION,
+ PT_EXTGSTATE,
+ PT_EXTGSTATELIST,
+ PT_FIELD,
+ PT_FIELDCHILDREN,
+ PT_FONT,
+ PT_FONTDESCRIPTOR,
+ PT_FONTDIFFERENCES,
+ PT_FONTENCODING,
+ PT_FONTRESOURCELIST,
+ PT_FORM,
+ PT_FORMCALCORDER,
+ PT_FORMSDICT,
+ PT_FUNCTION,
+ PT_FUNCTIONARRAY,
+ PT_GOTOACTION,
+ PT_ICCBASEDATTRIBUTES,
+ PT_ICCBASEDCOLORSPACE,
+ PT_IMAGE,
+ PT_INDEXEDCOLORSPACE,
+ PT_JAVASCRIPTACTION,
+ PT_LABATTRIBUTES,
+ PT_LABCOLORSPACE,
+ PT_LINKANNOTATION,
+ PT_MARKEDCONTENTREF,
+ PT_MMTYPE1FONT,
+ PT_NAMEDAPPEARCHILDREN,
+ PT_NAMEDAPPEARINTNODE,
+ PT_NAMEDAPPEARLEAFNODE,
+ PT_NAMEDAPPEARNAMEDCHILDREN,
+ PT_NAMEDAPPEARTREE,
+ PT_NAMEDDESTDICT,
+ PT_NAMEDDESTLIST,
+ PT_NAMEDDESTSCHILDREN,
+ PT_NAMEDDESTSINTNODE,
+ PT_NAMEDDESTSLEAFNODE,
+ PT_NAMEDDESTSNAMEDCHILDREN,
+ PT_NAMEDDESTSTREE,
+ PT_NAMEDJAVASCRIPTTREE,
+ PT_NAMEDJSCHILDREN,
+ PT_NAMEDJSINTNODE,
+ PT_NAMEDJSLEAFNODE,
+ PT_NAMEDJSNAMEDCHILDREN,
+ PT_NAMESCHILDREN,
+ PT_NAMESDICT,
+ PT_NAMESINTNODE,
+ PT_NAMESLEAFNODE,
+ PT_NAMESNAMEDCHILDREN,
+ PT_NAMESTREE,
+ PT_NORMALAPPEARANCEDICT,
+ PT_OBJECTREF,
+ PT_OUTLINEENTRY,
+ PT_OUTLINETREE,
+ PT_PAGE,
+ PT_PAGESARRAY,
+ PT_PAGESEPARATIONS,
+ PT_PAGESNODE,
+ PT_PATTERNCOLORSPACE,
+ PT_POSTSCRIPT,
+ PT_PRINTERMARKANNOTATION,
+ PT_PRINTERMARKAPPEARANCE,
+ PT_RECTANGLE,
+ PT_RESOURCEDICT,
+ PT_ROLLOVERAPPEARANCEDICT,
+ PT_ROOTFIELDSLIST,
+ PT_SAMPLEDFUNCTION,
+ PT_SEPARATIONCOLORSPACE,
+ PT_SEPARATIONINFO,
+ PT_SOFTMASKDICT,
+ PT_STITCHINGFUNCTION,
+ PT_STITCHINGINPUTFUNCTIONS,
+ PT_STPARENTCHILDREN,
+ PT_STPARENTINTNODE,
+ PT_STPARENTLEAFNODE,
+ PT_STPARENTNUMBEREDCHILDREN,
+ PT_STRUCTELEMATTRARRAY,
+ PT_STRUCTELEMENT,
+ PT_STRUCTELEMLIST,
+ PT_STRUCTIDCHILDREN,
+ PT_STRUCTIDINTNODE,
+ PT_STRUCTIDLEAFNODE,
+ PT_STRUCTIDNAMEDCHILDREN,
+ PT_STRUCTIDTREE,
+ PT_STRUCTPARENTTREE,
+ PT_STRUCTTREEROOT,
+ PT_THREAD,
+ PT_THREADSLIST,
+ PT_TRANSPARENCYGROUP,
+ PT_TRUETYPEFONT,
+ PT_TYPE1FONT,
+ PT_TYPE3FONT,
+ PT_WEBCAPCOMMAND,
+ PT_WEBCAPCOMMANDLIST,
+ PT_WEBCAPCOMMANDSETTINGS,
+ PT_WEBCAPCONTENTSET,
+ PT_WEBCAPIDSCHILDREN,
+ PT_WEBCAPIDSINTNODE,
+ PT_WEBCAPIDSLEAFNODE,
+ PT_WEBCAPIDSNAMEDCHILDREN,
+ PT_WEBCAPIDSTREE,
+ PT_WEBCAPIMAGESET,
+ PT_WEBCAPIMAGESETARRAY,
+ PT_WEBCAPINFO,
+ PT_WEBCAPPAGESET,
+ PT_WEBCAPPAGESETARRAY,
+ PT_WEBCAPSOURCEINFO,
+ PT_WEBCAPURLALIASDICT,
+ PT_WEBCAPURLCHAIN,
+ PT_WEBCAPURLSCHILDREN,
+ PT_WEBCAPURLSINTNODE,
+ PT_WEBCAPURLSLEAFNODE,
+ PT_WEBCAPURLSNAMEDCHILDREN,
+ PT_WEBCAPURLSTREE,
+ PT_WIDGETANNOTATION,
+ PT_XOBJECTLIST,
+ PT_ABRANGE,
+ PT_ACTUALTEXT,
+ PT_ALTERNATETEXT,
+ PT_ANNOTATIONBORDER,
+ PT_ANNOTATIONBORDERSTYLE,
+ PT_ANNOTATIONCOLOR,
+ PT_ANNOTATIONLOC,
+ PT_APPEARANCE,
+ PT_ARTBOXSTYLE,
+ PT_BEADSARRAY,
+ PT_BG2FUNCTION,
+ PT_BGFUNCTION,
+ PT_BLACKPOINT,
+ PT_BLEEDBOXSTYLE,
+ PT_BLENDMODE,
+ PT_BOUNDINGBOX,
+ PT_BOXSTYLE,
+ PT_BUTTONFIELD,
+ PT_CHARPROC_STREAM,
+ PT_CHOICEFIELDOPTIONS,
+ PT_CHOICEFIELDVALUE,
+ PT_CIDTYPE0FONT,
+ PT_CIDTYPE2FONT,
+ PT_CIRCLEANNOTATION,
+ PT_OBSOLETE3,
+ PT_COLORANTNAMES,
+ PT_COLORSPACE,
+ PT_COLORSPACETYPE,
+ PT_CONTENTSSTREAM,
+ PT_CROPBOX,
+ PT_CROPBOXSTYLE,
+ PT_DASHPATTERN,
+ PT_DATE,
+ PT_DEFAULTFUNCTION,
+ PT_DEFAULTHALFTONE,
+ PT_DEFRESOURCEDICT,
+ PT_DEVICECMYKCOLORSPACE,
+ PT_DEVICEGRAYCOLORSPACE,
+ PT_DEVICERGBCOLORSPACE,
+ PT_OBSOLETE4,
+ PT_DOWNAPPEARANCE,
+ PT_EMBEDDEDFONTSTREAM,
+ PT_EMBEDDEDOBJDICT,
+ PT_OBSOLETE5,
+ PT_OBSOLETE6,
+ PT_EXPONENTIAL0RESULT,
+ PT_EXPONENTIAL1RESULT,
+ PT_FILEATTACHANNOTATION,
+ PT_FONTBBOX,
+ PT_FONTMATRIX,
+ PT_FONTTABLEENTRY,
+ PT_FONTWIDTHS,
+ PT_OBSOLETE7,
+ PT_FORMIMPORTACTION,
+ PT_OBSOLETE0,
+ PT_FORMRESETACTION,
+ PT_FORMSUBMITACTION,
+ PT_FREETEXTANNOTATION,
+ PT_FUNCTIONDOMAIN,
+ PT_FUNCTIONNAME,
+ PT_FUNCTIONRANGE,
+ PT_GOTORACTION,
+ PT_GROUPATTRIBUTES,
+ PT_GSTATEFONT,
+ PT_HALFTONE,
+ PT_HALFTONEPHASE,
+ PT_HIDEACTION,
+ PT_HIGHLIGHTANNOTATION,
+ PT_ICCRANGE,
+ PT_IDENTITYFUNCTION,
+ PT_INDEXEDLOOKUP,
+ PT_INKANNOTATION,
+ PT_JAVASCRIPT,
+ PT_OBSOLETE8,
+ PT_LANGUAGESPEC,
+ PT_LASTMODIFIED,
+ PT_LAUNCHACTION,
+ PT_LEVEL1POSTSCRIPT,
+ PT_LINEANNOTATION,
+ PT_MARKEDPDFINFODICT,
+ PT_MEDIABOX,
+ PT_METADATASTREAM,
+ PT_MOVIEACTION,
+ PT_MOVIEANNOTATION,
+ PT_NAMEDACTION,
+ PT_NAMEDOBJECT,
+ PT_NAMEDOBJECTNAME,
+ PT_NOPACTION,
+ PT_NORMALAPPEARANCE,
+ PT_OBSOLETE9,
+ PT_OBSOLETE1,
+ PT_OBSOLETE2,
+ PT_PAGELABELTREE,
+ PT_PIECEINFO,
+ PT_POPUPANNOTATION,
+ PT_POSTSCRIPTFUNCTION,
+ PT_PREVIOUSACTION,
+ PT_PROCSET,
+ PT_RECTPOINT,
+ PT_REFERENCEDPDF,
+ PT_RGBGAMMA,
+ PT_RGBGAMMAMATRIX,
+ PT_ROLLOVERAPPEARANCE,
+ PT_SAMPLEDFUNCTIONDECODE,
+ PT_SAMPLEDFUNCTIONENCODE,
+ PT_SAMPLEDFUNCTIONSIZE,
+ PT_SETSTATEACTION,
+ PT_SIGNATUREDICT,
+ PT_SIGNATUREFIELD,
+ PT_SOFTMASKIMAGE,
+ PT_SOFTMASKNAME,
+ PT_SOUNDACTION,
+ PT_SOUNDANNOTATION,
+ PT_SQUAREANNOTATION,
+ PT_STAMPANNOTATION,
+ PT_STITCHINGFUNCTIONBOUNDS,
+ PT_STITCHINGFUNCTIONENCODE,
+ PT_STRIKEOUTANNOTATION,
+ PT_STRUCTCLASSMAP,
+ PT_STRUCTELEMATTR,
+ PT_STRUCTROLEMAP,
+ PT_TEXTANNOTATION,
+ PT_TEXTFIELD,
+ PT_THREADACTION,
+ PT_THREADINFO,
+ PT_THUMBNAIL,
+ PT_TINTTRANSFORM,
+ PT_TR2FUNCTION,
+ PT_TRANSITION,
+ PT_TRAPNETANNOTATION,
+ PT_TRFUNCTION,
+ PT_TRIMBOXSTYLE,
+ PT_TRUETYPEFONTSTREAM,
+ PT_TYPE0FONT,
+ PT_TYPE1FONTSTREAM,
+ PT_TYPE1UNICODEMAP,
+ PT_UCR2FUNCTION,
+ PT_UCRFUNCTION,
+ PT_UNDERLINEANNOTATION,
+ PT_OBSOLETE10,
+ PT_URIACTION,
+ PT_URIDICT,
+ PT_URL,
+ PT_OBSOLETE11,
+ PT_VIEWERPREFERENCES,
+ PT_WEBCAPCONTENTNAME,
+ PT_WEBCAPENGINESETTINGS,
+ PT_WEBCAPGLOBALSETTINGS,
+ PT_WEBCAPID,
+ PT_WEBCAPIMAGEREFCOUNTS,
+ PT_WHITEPOINT,
+ PT_XUID,
+ PT_BUILTINTYPES,
+ PT_COSNULL,
+ PT_COSINTEGER,
+ PT_COSFIXED,
+ PT_COSBOOLEAN,
+ PT_COSNAME,
+ PT_COSSTRING,
+ PT_COSDICT,
+ PT_COSARRAY,
+ PT_COSSTREAM,
+ PT_NULL,
+ PT_UNKNOWN,
+ PT_ALL,
+ PT_PATTERNLIST,
+ PT_PATTERN,
+ PT_SHADINGPATTERN,
+ PT_TILINGPATTERN,
+ PT_TILINGPATTERNBBOX,
+ PT_PATTERNMATRIX,
+ PT_SHADING,
+ PT_TYPE1SHADING,
+ PT_TYPE2SHADING,
+ PT_TYPE3SHADING,
+ PT_TYPE4SHADING,
+ PT_TYPE5SHADING,
+ PT_TYPE6SHADING,
+ PT_TYPE7SHADING,
+ PT_SHADINGBBOX,
+ PT_SHADINGBACKGROUND,
+ PT_SHADINGDOMAIN,
+ PT_SHADINGMATRIX,
+ PT_SHADINGCOORDS,
+ PT_SHADINGDECODEARRAY,
+ PT_TRUETYPEUNICODEMAP,
+ PT_TYPE3UNICODEMAP,
+ PT_CIDSYSTEMINFO,
+ PT_CIDGLYPHWIDTHS,
+ PT_CIDDEFAULTVERTICALMETRICS,
+ PT_CIDVERTICALWIDTHS,
+ PT_TYPE0UNICODEMAP,
+ PT_INKANNOTINKLIST,
+ PT_INKANNOTINKLISTITEM,
+ PT_APPEARCHARACTERISTICS,
+ PT_APPEARCHARBOARDERCOLOR,
+ PT_APPEARCHARBACKGRNDCOLOR,
+ PT_PAGELABELSCHILDREN,
+ PT_PAGELABELSNAMEDCHILDREN,
+ PT_PAGELABELSINTNODE,
+ PT_PAGELABELSLEAFNODE,
+ PT_PAGELABELDICT,
+ PT_OPIVERSIONDICT,
+ PT_OPI_1_3_DICT,
+ PT_OPI_2_0_DICT,
+ PT_MARKEDCONTENTLIST,
+ PT_WEBCAPSOURCEINFOLIST,
+ PT_SOFTMASKBACKGRNDCOLOR,
+ PT_SHADINGLIST,
+ PT_MARKEDCONTENTDICT,
+ PT_ALTERNATEIMAGESARRAY,
+ PT_ALTERNATEIMAGEDICT,
+ PT_ALTERNATEIMAGE,
+ PT_FONTTOUNICODEMAP,
+ PT_FILESPEC,
+ PT_FILESPECID,
+ PT_FILESPECEMBEDDEDFILEDICT,
+ PT_EMBEDDEFILESTRMPARAMSDICT,
+ PT_EMBEDDEDFILESTRMRESFORK,
+ PT_EMBEDDEFILESTRMMACPARAMS,
+ PT_EMBEDDEFILESTREAM,
+ PT_JOBTICKET,
+ PT_JTACCOUNTINGOBJ,
+ PT_JTADDRESSOBJLIST,
+ PT_JTANALYSISOBJECT,
+ PT_JTANALYSISOBJLIST,
+ PT_JTAUDITOBJECT,
+ PT_JTAUDITOBJECTLIST,
+ PT_JTCOLORANTALIASOBJ,
+ PT_JTCOLORANTALIASOBJLIST,
+ PT_JTCOLORANTCONTROLOBJ,
+ PT_JTCOLORSPACESUBOBJ,
+ PT_JTCOLORSPACESUBOBJLIST,
+ PT_JTCONTENTLIST,
+ PT_JTCONTENTOBJECT,
+ PT_JTDELIVERYOBJ,
+ PT_JTDELIVERYOBJLIST,
+ PT_JTDOCOBJECT,
+ PT_JTDOCOBJLIST,
+ PT_JTFILEOBJECT,
+ PT_JTFILEOBJECTFILESDICT,
+ PT_JTFILESLIST,
+ PT_JTFINISHINGOBJ,
+ PT_JTFINISHINGOBJLIST,
+ PT_JTINSERTPAGESOBJ,
+ PT_JTINSERTSHEETOBJ,
+ PT_JTINVENTORYOBJ,
+ PT_JTLAYOUTOBJ,
+ PT_JTMEDIAOBJ,
+ PT_JTMEDIASOURCEOBJ,
+ PT_JTPAGERANGELIST,
+ PT_JTPAGERANGEOBJ,
+ PT_JTPLACEDOBJECT,
+ PT_JTPLACEDOBJLIST,
+ PT_JTPLANEORDEROBJ,
+ PT_JTPLANEORDEROBJLIST,
+ PT_JTPREFLIGHTCONSTRAINTLIST,
+ PT_JTPREFLIGHTDETAILOBJ,
+ PT_JTPREFLIGHTDETAILOBJLIST,
+ PT_JTPREFLIGHTINSTANCE,
+ PT_JTPREFLIGHTINSTANCELIST,
+ PT_JTPREFLIGHTOBJECT,
+ PT_JTPREFLIGHTRESULTSOBJ,
+ PT_JTPRINTLAYOUTOBJ,
+ PT_JTPROFILEOBJECT,
+ PT_JTPROFILEOBJLIST,
+ PT_JTRENDERINGOBJ,
+ PT_JTRESOURCEALIASLIST,
+ PT_JTRESOURCEALIASOBJ,
+ PT_JTSHEETOBJ,
+ PT_JTSHEETOBJLIST,
+ PT_JTSIGNATUREOBJ,
+ PT_JTSIGNATUREOBJLIST,
+ PT_JTSLIPSHEETOBJ,
+ PT_JTSOURCECLIPPATH,
+ PT_JTSURFACEOBJECT,
+ PT_JTTILINGOBJ,
+ PT_JTTILINGOBJLIST,
+ PT_JTTRAPPINGOBJ,
+ PT_JTTRAPPINGPARAMOBJ,
+ PT_JTTRAPREGIONOBJ,
+ PT_JTTRAPREGIONSLIST,
+ PT_JTRESOURCELIST,
+ PT_JTADDRESSOBJECT,
+ PT_JTDETAILSOBJECT,
+ PT_JTCOLORANTALIASES,
+ PT_JTCOLORANTORDER,
+ PT_JTCOLORANTPARAMS,
+ PT_JTCOLORANTDETAILSOBJ,
+ PT_JTDEVICECOLORANTOBJ,
+ PT_JTTARGETCOLORANTNAMES,
+ PT_BLEEDBOX,
+ PT_JTFONTPOLICYOBJ,
+ PT_JTMEDIAUSAGEOBJ,
+ PT_JTSCHEDULINGOBJ,
+ PT_JTFILEDECODEPARAMSLIST,
+ PT_JTFILEOBJECTFILTERS,
+ PT_JTFINISHINGDETAILSOBJ,
+ PT_JTSURFACECONTENTSBOX,
+ PT_JTMEDIAOBJDIMENSIONS,
+ PT_JTPAGERANGEWHICH,
+ PT_JTCLIPBOX,
+ PT_JTCOORDTRANSFORMMATRIX,
+ PT_JTCOLORANTPLANESARRAY,
+ PT_JTPREFLIGHTCONSTRAINTOBJ,
+ PT_JTPREFLIGHTDETAILOBJPAGES,
+ PT_JTPREFLIGHTINSTANCEPAGES,
+ PT_JTPREFLIGHTINSTANCEDETAIL,
+ PT_RENDERINGRESOLUTION,
+ PT_JTDEVICERENDERINGINFO,
+ PT_JTPOSTRENDERINGINFO,
+ PT_JTPRERENDERINGINFO,
+ PT_JTSHEETALIGNMENT,
+ PT_JTSLIPSHEETALIGNMENT,
+ PT_JTSOURCECLIPPATHPOINT,
+ PT_JTMARKEDREFSARRAY,
+ PT_JTTRAPPINGORDER,
+ PT_JTCOLORANTZONEDETAILSOBJ,
+ PT_JTTRAPZONE,
+ PT_JTTRAPZONELIST,
+ PT_JTTRAPPINGPARAMOBJLIST,
+ PT_JTTRAPPINGDETAILSOBJ,
+ PT_JTCOORDTRANSFORMDICT,
+ PT_AFTEMPLATE,
+ PT_SOUNDSTREAM,
+ PT_SCREENANNOT,
+ PT_RENDITIONACTION,
+ PT_RENDITION,
+ PT_MEDIARENDITION,
+ PT_SELECTORRENDITION,
+ PT_RENDITIONSLIST,
+ PT_ALTERNATEPRESCHILDREN,
+ PT_ALTERNATEPRESINTNODE,
+ PT_ALTERNATEPRESLEAFNODE,
+ PT_ALTERNATEPRESNAMEDCHILDREN,
+ PT_SLIDESHOW,
+ PT_ALTERNATEPRESTREE,
+ PT_OCGSARRAY,
+ PT_OCPROPERTIES,
+ PT_OCCONFIGSARRAY,
+ PT_OCGUSAGE,
+ PT_OCG,
+ PT_OCCONFIGDICT,
+ PT_OCASARRAY,
+ PT_OCUSAGEAPPLICATION,
+ PT_OCMD,
+ PT_SETOCGSTATEACTION,
+ PT_MEDIACRITERIA,
+ PT_MEDIACLIP,
+ PT_MEDIACLIPDATA,
+ PT_MEDIAPERMSDICT,
+ PT_MEDIAPLAYERS,
+ PT_MEDIAPLAYPARAMS,
+ PT_MEDIASCREENPARAMS,
+ PT_MEDIACLIPSECTION,
+ PT_MEDIAPLAYINFOARRAY,
+ PT_MEDIAPLAYINFO,
+ PT_FONTENCODINGSDICT,
+ PT_STRUCTELEMATTRBBOX,
+ PT_3DANNOTATION,
+ PT_3DSTREAM,
+ PT_3DREF,
+
+ /* DO NOT USE ANYTHING BELOW HERE */
+
+ PT_BOGUS_NO_SUCH_TYPE = 0x7FFFFFFF
+};
+
+#define iNumPDFObjTypes 515
+
+#endif /* __TYPES_OUTFILE__ */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorCalls.h
new file mode 100644
index 0000000..95183bd
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorCalls.h
@@ -0,0 +1,759 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ CorCalls.h
+
+ - Exception handling methods (ASPushExceptionFrame and
+ ASPopExceptionFrame) should typically be accessed through the
+ DURING/HANDLER/END_HANDLER macros.
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_CorCalls
+#define _H_CorCalls
+
+#include "acroassert.h"
+
+/* This header includes templates and hence would not compile if
+ included inside of a extern "C" block. Hence CorCalls.h must
+ not be included inside of a extern "C" block */
+#include "EReturnValidator.h"
+
+/* for Adobe use only */
+#define _CoreHFT_LATEST_VERSION 0x00050000
+#define _CoreHFT_LAST_BETA_COMPATIBLE_VERSION 0x00050000
+#define _CoreHFT_IS_BETA 0
+
+/* for public use */
+#define CoreHFT_LATEST_VERSION (_CoreHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _CoreHFT_LATEST_VERSION) : _CoreHFT_LATEST_VERSION)
+
+#define CoreHFT_VERSION_2 0x00020000
+#define CoreHFT_VERSION_4 0x00040000
+#define CoreHFT_VERSION_5 0x00050000 /* note: version 5 is same as 4. Provided to support old plugins that erroneously required 5 */
+
+#ifndef _CORVERSION_ID_ONLY
+#include "PIExcept.h"
+#include "CoreExpT.h"
+#include "ASExpT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS)
+ #if MAC_PLATFORM
+ #define USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS 1
+ #elif UNIX_PLATFORM
+ #define USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS 1
+ #else
+ #define USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS 0
+ #endif
+#endif
+
+#if USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS
+#ifdef __cplusplus
+
+ /* The C++ version of the exception frame structure contains only the
+ information necessary to execute a successful throw. The exception
+ error code and message are tracked in a separate class defined
+ here. */
+
+ struct _miExceptionInfo {
+ _miExceptionInfo() {}
+ int dummy;
+ };
+
+ /* This routine knows how to take an exception and 'throw' it to
+ a C++ DURING frame.
+ */
+ extern void miThrowExceptionToHandler(void *asEnviron);
+
+#endif /* __cplusplus */
+#endif /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#if ACROBAT_LIBRARY
+/* Toolkit specific Error-handling function prototypes */
+
+/* RestorePlugInFrame
+** This is a function that the plug-in must provide (if you are using the
+** standard government-issue PIMain.c, this function is implemented there.)
+** It takes a jmp_buf as registered through ASPushExceptionFrame and restores
+** state based on that jmp_buf, usually through using longjmp.
+*/
+extern ACCB1 void ACCB2 RestorePlugInFrame(void *environ);
+typedef ACCBPROTO1 void (ACCBPROTO2 *ACRestoreEnvironProc)(void *excEnviron);
+
+extern ACCB1 void ACCB2 ACPushExceptionFrame(void *excEnviron, ACRestoreEnvironProc restoreFunc);
+extern ACCB1 void ACCB2 ACPopExceptionFrame(void);
+extern ACCB1 ASInt32 ACCB2 ACGetExceptionErrorCode(void);
+
+#if USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS
+#ifdef __cplusplus
+
+struct _miExceptionPushPop {
+ _miExceptionPushPop() { ACPushExceptionFrame(NULL, (ACRestoreEnvironProc)&miThrowExceptionToHandler); }
+ ~_miExceptionPushPop() { ACPopExceptionFrame(); }
+};
+
+/**
+ Begins the section of code where Acrobat APIs may throw an exception. After calling an Acrobat API method, execution may jump into the <code>HANDLER</code> clause.
+ This macro is similar to the <code>try</code> clause in the C++ language.
+
+ @see END_HANDLER
+ @see E_RETURN
+ @see E_RTRN_VOID
+ @see HANDLER
+*/
+#define DURING { \
+ try { \
+ _miExceptionPushPop __exceptionPushPop;
+
+#define _E_RESTORE /*int _E_RESTORE__BogusLocalDoesNothing = 0*/
+#define _E_HANDLER } catch (_miExceptionInfo Exception) {
+
+/**
+ Follows a <code>DURING</code> macro. Code inserted between <code>HANDLER</code> and <code>END_HANDLER</code> macros will be executed only if an Acrobat function or other function
+ throws an exception. This macro is similar to the <code>catch</code> clause in the C++ language.
+
+ @see END_HANDLER
+ @see DURING
+ @see E_RTRN_VOID
+ @see E_RETURN
+*/
+#define HANDLER _E_RESTORE; _E_HANDLER _E_RESTORE;
+/**
+ Ends a <code>DURING/HANDLER/END_HANDLER</code> clause.
+
+ @see DURING
+ @see END_HANDLER
+ @see E_RETURN
+ @see HANDLER
+*/
+#define END_HANDLER }}
+
+#else /* __cplusplus */
+
+#define DURING DURING usage must be compiled with C++
+#define HANDLER HANDLER usage must be compiled with C++
+#define END_HANDLER END_HANDLER usage must be compiled with C++
+
+#endif /* __cplusplus */
+#else /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#if MAC_PLATFORM
+#error Mac Xcode should no longer use this
+#endif
+
+#if UNIX_PLATFORM
+#error Unix should no longer use this
+#endif
+
+/**
+ Begins the section of code where Acrobat APIs may throw an exception. After calling an Acrobat API method, execution may jump into the <code>HANDLER</code> clause.
+ This macro is similar to the <code>try</code> clause in the C++ language.
+
+ @see END_HANDLER
+ @see E_RETURN
+ @see E_RTRN_VOID
+ @see HANDLER
+*/
+#define DURING { \
+ ACROjmp_buf ASException; \
+ ACPushExceptionFrame(&ASException, (ACRestoreEnvironProc)&RestorePlugInFrame); \
+ if (!ACROsetjmp(ASException)) {
+
+#define _E_RESTORE ACPopExceptionFrame()
+
+/**
+ Follows a <code>DURING</code> macro. Code inserted between <code>HANDLER</code> and <code>END_HANDLER</code> macros will be executed only if an Acrobat function or other function
+ throws an exception. This macro is similar to the <code>catch</code> clause in the C++ language.
+
+ @see END_HANDLER
+ @see DURING
+ @see E_RTRN_VOID
+ @see E_RETURN
+*/
+#define HANDLER _E_RESTORE; } else { _E_RESTORE;
+/**
+ Ends a <code>DURING/HANDLER/END_HANDLER</code> clause.
+
+ @see DURING
+ @see END_HANDLER
+ @see E_RETURN
+ @see HANDLER
+*/
+#define END_HANDLER }}
+
+#endif /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+/**
+ A macro defined to call ASGetExceptionErrorCode(). It returns an ASInt32 object containing an exception error code.
+
+ @see DURING
+ @see END_HANDLER
+ @see E_RTRN_VOID
+ @see HANDLER
+*/
+#define ERRORCODE (ACGetExceptionErrorCode())
+
+/**
+ Returns a value from an enclosing function when nested inside a DURING/HANDLER clause.
+
+ @see DURING
+ @see END_HANDLER
+ @see E_RTRN_VOID
+ @see HANDLER
+*/
+#define E_RETURN(x) { _E_RESTORE; return(x); }
+
+/**
+ Returns from an enclosing function when nested inside a DURING/HANDLER clause, without returning a value.
+
+ @see ErrGetCode
+ @see ErrGetSeverity
+ @see ErrGetSignedCode
+ @see ErrGetSystem
+*/
+#define E_RTRN_VOID { _E_RESTORE; return; }
+
+#else /* ACROBAT_LIBRARY */
+
+#define ACRestoreEnvironProc restoreEnvironProc
+
+#if !STATIC_HFT
+#define ACPushExceptionFrame ASPushExceptionFrame
+#define ACPopExceptionFrame ASPopExceptionFrame
+#define ACGetExceptionErrorCode ASGetExceptionErrorCode
+#endif /* STATIC_HFT */
+
+#endif /* ACROBAT_LIBRARY */
+
+#ifdef NPROC /* may be defined in sys/procs.h */
+#undef NPROC
+#endif /* NPROC */
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define SPROC(returnType, name, params, stubProc) \
+ extern ACEX1 returnType ACEX2 stubProc params;
+ #define ANPROC NPROC
+
+ #include "CorProcs.h"
+
+ #undef NPROC
+ #undef ANPROC
+ #undef SPROC
+
+ #define ASCallbackCreateProto(proto, proc) (proc)
+ #define ASCallbackCreate(proc) (proc)
+ #define ASCallbackDestroy(proc)
+
+ /* These functions have a different name internally */
+ #define ASPushExceptionFrame ACPushExceptionFrame
+ #define ASPopExceptionFrame ACPopExceptionFrame
+ #define ASGetExceptionErrorCode ACGetExceptionErrorCode
+ #define ASExtensionMgrGetHFT ASGetHFTByNameAndVersion
+#endif /* !PLUGIN */
+
+#if PLUGIN
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define SPROC(returnType, name, params, stubProc) \
+ name##SEL,
+
+ #define ANPROC NPROC
+ enum {
+ CoreBAD_SELECTOR,
+ #include "CorProcs.h"
+ CoreNUMSELECTORSplusOne
+ };
+
+ #define CoreNUMSELECTORS (CoreNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef ANPROC
+ #undef SPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define SPROC(returnType, name, params, stubProc) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+
+ #define ANPROC NPROC
+ #include "CorProcs.h"
+ #undef NPROC
+ #undef ANPROC
+ #undef SPROC
+
+#if PI_CORE_VERSION != 0
+
+#ifdef THREAD_SAFE_PDFL
+ #define gCoreHFT (GetHFTLocations()->coreHFT)
+ #define gCoreVersion (GetHFTLocations()->coreVersion)
+#include "PDFLInitHFT.h"
+#else
+ extern HFT gCoreHFT;
+ extern ASUns32 gCoreVersion;
+#endif
+
+#include "PICommon.h"
+#include "PIExcept.h"
+
+#if !STATIC_HFT
+
+/* Exception-handling functions */
+
+/* ASRaise
+** Raises an exception. Subsequent calls to ASGetExceptionErrorCode() will
+** return the error value passed in to this function.
+** This function is called directly by the macro RERAISE().
+*/
+#define ASRaise (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASRaiseSELPROTO)(gCoreHFT[ASRaiseSEL])))
+
+/* ASPushExceptionFrame
+**
+** Push an exception frame buffer and a frame-restoration callback onto the stack.
+** The restoreFunc should be a function matching the following prototype:
+**
+** ACCB1 void ACCB2 RestorePlugInFrame(void *asEnviron);
+**
+** You will probably never call ASPushExceptionFrame() directly; use the DURING
+** macro instead.
+*/
+#define ASPushExceptionFrame (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASPushExceptionFrameSELPROTO)(gCoreHFT[ASPushExceptionFrameSEL])))
+
+/* ASPopExceptionFrame
+** Pop and exception frame off the stack.
+** You will probably never call ASPopExceptionFrame() directly; it is called for
+** you as appropriate from within the HANDLER, E_RETURN and E_RTRN_VOID macros.
+*/
+#define ASPopExceptionFrame (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASPopExceptionFrameSELPROTO)(gCoreHFT[ASPopExceptionFrameSEL])))
+
+/* ASGetExceptionErrorCode
+** Returns the value of the error parameter as passed in to the most
+** recent call to ASRaise(). You might then pass this value to ASGetErrorString()
+** in order to report the exception to the user.
+*/
+#define ASGetExceptionErrorCode (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASGetExceptionErrorCodeSELPROTO)(gCoreHFT[ASGetExceptionErrorCodeSEL])))
+
+/* ASAtom management */
+
+/* ASAtomFromString
+** Returns the ASAtom associated with the given string. You can compare
+** ASAtoms directly, rather than passing their associated strings to
+** strcmp().
+*/
+#define ASAtomFromString (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASAtomFromStringSELPROTO)(gCoreHFT[ASAtomFromStringSEL])))
+
+/* ASAtomExistsForString
+** Returns true if and only if there already exists an ASAtom for the
+** given string. You might use this to prevent capricious overpopulation
+** of the internal ASAtom table (a non-renewable resource!)
+*/
+#define ASAtomExistsForString (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASAtomExistsForStringSELPROTO)(gCoreHFT[ASAtomExistsForStringSEL])))
+
+/* ASAtomGetString
+** Returns the char * associated with the given ASAtom. This routine
+** permanently allocates storage for new strings, so don't call this function
+** unnecessarily!
+*/
+#define ASAtomGetString (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASAtomGetStringSELPROTO)(gCoreHFT[ASAtomGetStringSEL])))
+
+/* ASCallbackCreate
+** Takes a pointer to a function and returns an ASCallback--a universally
+** entrant function pointer which can be called from any globals context.
+*/
+/**
+ Deprecated in Acrobat 8.0.
+*/
+#define ASCallbackCreate(x) (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASCallbackCreateSELPROTO)(gCoreHFT[ASCallbackCreateSEL])))(gExtensionID, (void *)(x))
+
+/* ASCallbackCreateProto
+** Type-checking callback creation. Will cause a compiler error if the
+** proc is not of the given function-type. DEBUG must be on for checking to occur.
+** Requires four bytes of scratch global space in which to make a bogus
+** assignment; this is declared in PIMain.c.
+*/
+/**
+ Deprecated in Acrobat 8.0.
+*/
+#if DEBUG
+#define ASCallbackCreateProto(funcType, proc) \
+ ((funcType)ASCallbackCreate((CHECKTYPE(funcType, proc))))
+#else
+#define ASCallbackCreateProto(funcType, proc) \
+ ((funcType)ASCallbackCreate(((void*)proc)))
+#endif
+
+/* ASCallbackDestroy
+** De-allocates memory associated with an ASCallback. Use this if you're
+** sure you're completely done with an ASCallback.
+*/
+/**
+ Deprecated in Acrobat 8.0.
+*/
+#define ASCallbackDestroy (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASCallbackDestroySELPROTO)(gCoreHFT[ASCallbackDestroySEL])))
+
+/* ASExtensionMgrGetHFT
+** Get an HFT object with the given name and version number.
+*/
+#define ASExtensionMgrGetHFT (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASExtensionMgrGetHFTSELPROTO)(gCoreHFT[ASExtensionMgrGetHFTSEL])))
+
+/* ASGetConfiguration
+** Returns a void * based on the ASAtom passed in. The void *
+** may be cast to a meaningful value based on the input parameter:
+**
+** key result return type
+** Product Name of product type const char *
+** (Exchange, Reader, etc.)
+** CanEdit Whether or not editing ASBool
+** is allowed
+** <<anything else>> UNDEFINED_CONFIGURATION_SELECTOR
+*/
+#define ASGetConfiguration (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_2), *((ASGetConfigurationSELPROTO)(gCoreHFT[ASGetConfigurationSEL])))
+
+
+/* begin PI_CORE_VERSION >= 0x00040000 */
+
+/* ASEnumExtensions */
+#define ASEnumExtensions (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_4), *((ASEnumExtensionsSELPROTO)(gCoreHFT[ASEnumExtensionsSEL])))
+
+/* ASExtensionGetFileName */
+#define ASExtensionGetFileName (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_4), *((ASExtensionGetFileNameSELPROTO) (gCoreHFT[ASExtensionGetFileNameSEL])))
+
+/* ASExtensionGetRegisteredName */
+#define ASExtensionGetRegisteredName (ACROASSERT(gCoreVersion >=CoreHFT_VERSION_4), *((ASExtensionGetRegisteredNameSELPROTO) (gCoreHFT[ASExtensionGetRegisteredNameSEL])))
+
+/* end PI_CORE_VERSION >= 0x00040000 */
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* !STATIC_HFT */
+
+/* Exception-handling macros */
+/**
+ Re-raises the most recently raised exception and passes it to the next exception handler in the stack.
+
+ @see ErrGetCode
+ @see ErrGetSeverity
+ @see ErrGetSignedCode
+ @see ErrGetSystem
+ @see ASRaise
+*/
+#define RERAISE() ASRaise(ERRORCODE)
+
+#if USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS
+#ifdef __cplusplus
+
+struct _miExceptionPushPop {
+ _miExceptionPushPop() { ACPushExceptionFrame(NULL, (ACRestoreEnvironProc)&miThrowExceptionToHandler); }
+ ~_miExceptionPushPop() { ACPopExceptionFrame(); }
+};
+
+#endif /* __cplusplus */
+#else /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#if MAC_PLATFORM
+#error Mac Xcode should no longer use this
+#elif UNIX_PLATFORM
+#error Unix should no longer use this
+#endif
+ /* RestorePlugInFrame
+** This is a function that the plug-in must provide (if you are using the
+** standard government-issue PIMain.c, this function is implemented there.)
+** It takes a jmp_buf as registered through ASPushExceptionFrame and restores
+** state based on that jmp_buf, usually through using longjmp.
+*/
+extern ACCB1 void ACCB2 RestorePlugInFrame(void *asEnviron);
+
+#define _E_RESTORE ASPopExceptionFrame()
+
+#endif /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#if DEBUG
+
+/* **ER - 11/29/1997
+
+ For debug builds, the macros below enable compile-time checking of common problems
+ with DURING and HANDLER blocks (in order of frequency):
+
+ 1. "normal" return statements inside DURING blocks
+ 2. E_RETURN or E_RTRN_VOID statements outside any DURING block
+ 3. E_RETURN or E_RTRN_VOID statements in HANDLER blocks
+ 4. HANDLER without matching DURING
+ 5. HANDLER without matching END_HANDLER
+*/
+
+/* Declaration of global integer used below. This variable needs to be defined
+ somewhere in the plug-in. If you are using the standard government-issue PIMain.c,
+ it will already be defined there. */
+extern int gBadReturnCatcher;
+
+struct _BadReturnCatcherStruct {
+ int E_RETURNOutsideDURINGBlock; /* This name chosen so it rings a bell if you
+ see it in the compiler output */
+};
+
+/* What's the point of this? Since E_RETURN and E_RTRN_VOID need to actually
+ call return, we need to redefine gBadReturnCatcher as an integer in the
+ scope around the actual call to return so our macro-replaced version of
+ return will work. Otherwise, when the "return" in the E_RETURN macro
+ (for example), was replaced by our redefined macro, it'd fail to compile
+ just as if return was placed inside the DURING block */
+#define DO_RETURN(x) { int gBadReturnCatcher; return(x); }
+#define DO_RETURN_NO_ARGS { int gBadReturnCatcher; return; }
+
+#if USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS
+#ifdef __cplusplus
+
+#define DURING { \
+ try { \
+ _miExceptionPushPop __exceptionPushPop; \
+ struct _BadReturnCatcherStruct gBadReturnCatcher;
+
+#define _E_RESTORE /*int _E_RESTORE__BogusLocalDoesNothing = 0*/
+#define _E_HANDLER } catch (_miExceptionInfo Exception) {
+
+#else /* __cplusplus */
+
+#define DURING DURING usage must be compiled with C++
+#define _E_RESTORE HANDLER usage must be compiled with C++
+#define _E_HANDLER HANDLER usage must be compiled with C++
+
+#endif /* __cplusplus */
+#else /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#if MAC_PLATFORM
+#error Mac Xcode should no longer use this
+#elif UNIX_PLATFORM
+#error Unix should no longer use this
+#endif
+
+/* This definition of DURING includes a struct with the same name as the global
+ integer above. The struct must be declared inside the inner scope of the DURING
+ so it is NOT defined in the HANDLER! */
+#define DURING { \
+ ACROjmp_buf ASException; \
+ ASPushExceptionFrame(&ASException, &RestorePlugInFrame); \
+ if (!ACROsetjmp(ASException)) { \
+ struct _BadReturnCatcherStruct gBadReturnCatcher;
+
+#define _E_HANDLER } else {
+
+#endif /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#if DO_ADDITIONAL_RAISEAWARE_CHECKS
+
+/* Make sure that ASRaiseAware classes are not returned as part of the E_RETURN
+ mechanism as it leaves the wrong handler on the top of the exception stack.*/
+#define E_RETURN(x) { IsNotRaiseAwareClassHelperFunction( x ); gBadReturnCatcher.E_RETURNOutsideDURINGBlock = 1; _E_RESTORE; DO_RETURN(x); }
+
+#else
+
+/* Return calls which are legal inside a DURING block attempt
+ to modify the member field of the gBadReturnCatcher struct in the local
+ scope. This will cause a compile-time error if there is no such struct
+ (and thus, the return call is not enclosed by a DURING block) */
+#define E_RETURN(x) { gBadReturnCatcher.E_RETURNOutsideDURINGBlock = 1; _E_RESTORE; DO_RETURN(x); }
+
+#endif
+
+#define E_RTRN_VOID { gBadReturnCatcher.E_RETURNOutsideDURINGBlock = 1; _E_RESTORE; DO_RETURN_NO_ARGS; }
+
+/* returns which are illegal inside a DURING block attempt
+ to modify the global integer gBadReturnCatcher. This will cause a
+ compile-time error if the return is inside a DURING block because
+ it will actually be an attempt to modify the local-scope struct of the
+ same name. The = operator is not defined for assigning constant integers to structs.
+
+ Why are we using a for loop? Here are the considerations involved in choosing
+ this macro:
+
+ 1. It must support return statements of the forms "return;", "return <expr>;", and
+ "return( <expr> );". This is why "return" is present at the end of the macro
+ 2. We must use only 1 statement in replacing return. Why? Consider this code:
+
+ if ( <expr> )
+ return;
+ else {
+ ...
+ }
+
+ In order to support this case, we must not replace the "return" statement with
+ more than one statement, because this will cause the "else" statement to become
+ untied from the "if" statement. The following code snippet is an example of
+ the above code snippet after a macro expansion where return is defined as multiple
+ statements.
+
+ if ( <expr> )
+ gBadReturnCatcher = 1;
+ return;
+ else {
+ ...
+ }
+ 3. If we are constrained to replace the "return" statement with only one statement,
+ there may only be one path of control, and it must reach the return statement
+ at the end of the macro (so that it can pick up its arguments, if there are any)
+
+ The do-nothing for loop below meets these criteria.
+*/
+#define return for( gBadReturnCatcher = 1;; ) return
+
+/* Why is HANDLER redefined?
+ 1. So you can't put a HANDLER in without a matching DURING. This would likely be caught
+ by the compiler anyhow, since there'd likely be an "else" without a matching "if"
+ 2. To facilitate catching END_HANDLERs without matching HANDLERs
+ 3) To get rid of pesky "unreferenced local variable" warnings stemming from
+ DURING blocks which don't contain E_RETURN or E_RTRN_VOID and thus don't
+ reference the local gBadReturnCatcher structure. */
+#define HANDLER _E_RESTORE; gBadReturnCatcher.E_RETURNOutsideDURINGBlock = 1; _E_HANDLER int ENDHANDLEROutsideHANDLER; _E_RESTORE;
+
+/* END_HANDLER is redefined to modify the BadEndHandlerCatcher variable defined by the HANDLER
+ macro. This will prevent END_HANDLERs without matching HANDLERs (unless, of course,
+ multiple END_HANDLER statements are found inside the same HANDLER, END_HANDLER block */
+#define END_HANDLER ENDHANDLEROutsideHANDLER = 1; }}
+
+#else /* !DEBUG */
+
+#if USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS
+#ifdef __cplusplus
+
+#define DURING { \
+ try { \
+ _miExceptionPushPop __exceptionPushPop;
+
+#define _E_RESTORE /*int _E_RESTORE__BogusLocalDoesNothing = 0*/
+#define _E_HANDLER } catch (_miExceptionInfo Exception) {
+
+#define HANDLER _E_RESTORE; _E_HANDLER _E_RESTORE;
+#define END_HANDLER }}
+
+#else /* __cplusplus */
+
+#define DURING DURING usage must be compiled with C++
+#define HANDLER HANDLER usage must be compiled with C++
+#define END_HANDLER END_HANDLER usage must be compiled with C++
+
+#endif /* __cplusplus */
+#else /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#if MAC_PLATFORM
+#error Mac Xcode should no longer use this
+#elif UNIX_PLATFORM
+#error Unix should no longer use this
+#endif
+
+#define DURING { \
+ ACROjmp_buf ASException; \
+ ASPushExceptionFrame(&ASException, &RestorePlugInFrame); \
+ if (!ACROsetjmp(ASException)) {
+
+#define HANDLER _E_RESTORE; } else { _E_RESTORE;
+#define END_HANDLER }}
+
+#endif /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+#define E_RETURN(x) { _E_RESTORE; return(x); }
+#define E_RTRN_VOID { _E_RESTORE; return; }
+
+#endif /* DEBUG */
+
+#define ERRORCODE (ASGetExceptionErrorCode())
+
+#endif /* PI_CORE_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _CORVERSION_ID_ONLY */
+#endif /* !defined(_H_CorCalls) */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorProcs.h
new file mode 100644
index 0000000..bd1dd94
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CorProcs.h
@@ -0,0 +1,299 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ CorProcs.h
+
+ - Catalog of the "core" expored functions; this table is handed off
+ to the plug-in at initialization time,
+
+*********************************************************************/
+
+
+/**
+ Raises an exception. Plug-ins can raise any exception defined
+ in the AcroErr.h header file using the <code>ErrBuildCode</code> macro,
+ or can define their own exceptions using ASRegisterErrorString().
+ See Errors for a list of predefined exceptions.
+
+ <p>If the code that calls ASRaise() gets control as a result
+ of a non-Acrobat event (such as a drag and drop event on
+ some platforms), this method fails since there is no Acrobat
+ viewer code in the stack to handle the exception. </p>
+ @param error An error code for the exception to raise. Error
+ codes have three parts: severity, system, and error number.
+ Use <code>ErrBuildCode</code> to build an error code for an existing
+ error.
+ @see ASGetErrorString
+ @see ASRegisterErrorString
+ @see RERAISE
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(void, ASRaise, (ASErrorCode error))
+#if !ACROBAT_LIBRARY
+
+/**
+ Pushes an exception frame buffer and a frame-restoration
+ callback onto the stack. The <code>restoreFunc</code> should be a function
+ matching the following prototype.
+ @param asEnviron IN/OUT Represents a stack environment that is
+ restored if an exception occurs. On Windows and Mac OS,
+ this is a <code>jmp_buf</code>, which is an array of integers.
+ @param restoreFunc IN/OUT Should be a function matching the following
+ prototype: <code>ACCB1 void ACCB2 RestorePlugInFrame( void* asEnviron)</code>
+
+ @note You will probably never call ASPushExceptionFrame()
+ directly; use the <code>DURING</code> macro instead.
+
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(void, ASPushExceptionFrame, (void *asEnviron, ACRestoreEnvironProc restoreFunc), ACPushExceptionFrame)
+
+/**
+ Pops an exception frame off the stack.
+
+ @note You will probably never call ASPopExceptionFrame() directly;
+ it is called for you as appropriate from within the <code>HANDLER</code>,
+ <code>E_RETURN</code> and <code>E_RTRN_VOID</code> macros.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(void, ASPopExceptionFrame, (void), ACPopExceptionFrame)
+
+/**
+ Gets the error code for the most recently raised exception.
+ See Error Systems for a list of predefined exceptions.
+ @return Exception error code.
+ @see ASRaise
+ @see ASGetErrorString
+ @see ASRegisterErrorString
+ @ref ErrorSystems
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(ASErrorCode, ASGetExceptionErrorCode, (void), ACGetExceptionErrorCode)
+#endif
+
+
+/**
+ Gets the ASAtom for the specified string. You can also use
+ this method to create an ASAtom, since it creates one for
+ the string if one does not already exist.
+
+ <p>If an ASAtom already exists for <code>nameStr</code>, the existing ASAtom
+ is returned. Thus, ASAtom objects may be compared for equality of
+ the underlying string.</p>
+
+ <p>Because ASAtom objects cannot be deleted, they are useful for strings
+ that are used many times in an Acrobat viewer session, but
+ are not recommended for strings that have a short lifetime.
+ For the same reason, it is not a good idea to create large
+ numbers of ASAtom objects. </p>
+ @param nameStr The string for which an ASAtom is created.
+ @return The ASAtom corresponding to <code>nameStr</code>.
+ @see ASAtomExistsForString
+ @see ASAtomGetCount (Only available with the PDF Library SDK)
+ @see ASAtomGetString
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, ASAtomFromString, (const char *nameStr))
+
+/**
+ Tests whether an ASAtom exists for the specified string.
+
+ @param nameStr The string to test.
+ @param atom (Filled by the method, may be <code>NULL</code>) If the ASAtom corresponding
+ to <code>nameStr</code> already exists, it is returned in atom. Pass
+ <code>NULL</code> to simply check whether the ASAtom already exists.
+ @return <code>true</code> if an ASAtom already exists for <code>nameStr</code>, <code>false</code> otherwise.
+
+ @see ASAtomFromString
+ @see ASAtomGetCount (Only available with PDF Library SDK)
+ @see ASAtomGetString
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(ASBool, ASAtomExistsForString, (const char *nameStr, ASAtom *atom))
+
+/**
+ Gets the string associated with the specified ASAtom.
+ @param atm The ASAtom whose string is obtained.
+ @return The string corresponding to <code>atom</code>. It returns an empty string
+ if <code>atom == ASAtomNull</code>, or <code>NULL</code> if the atom has not been defined.
+
+ @see ASAtomExistsForString
+ @see ASAtomFromString
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+NPROC(const char *, ASAtomGetString, (ASAtom atm))
+
+
+/**
+ <p>Deprecated as of Acrobat 8.0.</p>
+
+ <p>Creates a callback that allows the Acrobat viewer to call
+ a function in a plug-in. All plug-in functions that are
+ called by the Acrobat viewer must be converted to callbacks
+ before being passed to the viewer. </p>
+
+ <p>Whenever possible, plug-ins should not call ASCallbackCreate()
+ directly, but should use the macros ASCallbackCreateProto(),
+ ASCallbackCreateNotification(), and ASCallbackCreateReplacement().
+ These macros (which eventually call ASCallbackCreate()) have
+ two advantages: </p>
+ <ul>
+ <li> They allow compilers to perform type checking, eliminating
+ one extremely common source of plug-in bugs. </li>
+ <li> They handle <code>extensionID</code> automatically. </li>
+ </ul>
+
+ <p>Plug-ins must use ASCallbackCreate() directly, for example,
+ when calling a Mac toolbox routine that expects a
+ <code>ProcPtr</code>. </p>
+ @param extensionID IN/OUT The <code>gExtensionID</code> extension that calls
+ <code>proc</code>.
+ @param proc IN/OUT The user-supplied procedure for which a callback
+ is created.
+ @return The newly-created callback.
+ @see ASCallbackDestroy
+ @see AVAppRegisterNotification
+ @see AVAppUnregisterNotification
+ @see ASCallbackDestroy
+ @see ASCallbackCreateReplacement
+ @see ASCallbackCreateProto
+ @see ACCB1
+ @see ACCB2
+ @see DEBUG
+ @see ASCallbackCreate
+
+ @note If you call ASCallbackCreate() directly, you are actually
+ invoking the ASCallbackCreate() macro, not this HFT routine.
+ The ASCallbackCreate() macro takes only one parameter, the
+ <code>proc</code>, and passes that information into this underlying HFT
+ routine as the second argument. The first argument is always
+ set to <code>gExtensionID</code>, which should be the extension identifier of
+ your plug-in.
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+ANPROC(ASCallback, ASCallbackCreate, (ASExtension extensionID, void *proc))
+
+/**
+ <p>Deprecated as of Acrobat 8.0.</p>
+
+ <p>Destroys a callback. </p>
+ @param callback IN/OUT The callback to destroy.
+ @see ASCallbackCreate
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+ANPROC(void, ASCallbackDestroy, (ASCallback callback))
+
+/**
+ Gets the specified version of the Host Function Table (HFT)
+ that has the specified name. If you want to get one of the
+ Acrobat viewer's built-in HFTs, use the predefined global
+ variables for the HFT Values instead of this method.
+ @param name The name of the HFT to obtain.
+ @param version The version number of the HFT to obtain.
+ @return The specified HFT, or <code>NULL</code> if the HFT does not exist.
+ @see HFTReplaceEntry
+ @see HFTReplaceEntryEx
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+SPROC(HFT, ASExtensionMgrGetHFT, (ASAtom name, ASVersion version), ASGetHFTByNameAndVersion)
+
+/**
+ <p>Gets information about the Acrobat viewer application under
+ which the plug-in is running. Use this method if your plug-in's
+ functionality depends on the Acrobat viewer that is running.</p>
+
+ <p>The method can return a product name, or check whether the
+ current product allows editing. Do not rely on the product
+ name to determine whether the product can edit files, as
+ product names and feature sets may vary; use the <code>CanEdit</code>
+ selector to do this. </p>
+ @param key The key determines whether the method tests
+ editability, or finds which product configuration is running.
+ Its values are:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>CanEdit</code></TD><TD>Checks whether editing is allowed in the current environment (regardless of the product name).</TD></TR>
+ <TR><TD><code>Product</code></TD><TD>Checks which Acrobat application is running.</TD></TR>
+ </TABLE>
+
+ @return The return value's type depends on the request key. Cast
+ the return value to the type you are expecting, based on
+ the key you pass in:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Return type</TH></TR>
+ <TR><TD><code>CanEdit</code></TD><TD>An ASBool value: <code>true</code> if the current application allows editing, <code>false</code> otherwise.</TD></TR>
+ <TR><TD><code>Product</code></TD><TD>A <code>const char*</code> value, one of the following strings:
+ <ul>
+ <li><code>"Reader"</code>: Adobe Reader</li>
+ <li><code>"Exchange"</code>: Acrobat Standard</li>
+ <li><code>"Exchange-Pro"</code>: Acrobat Professional</li>
+ <li><code>"Acrobat PDF LIbrary"</code>: Acrobat PDF Library</li>
+ </ul></TD></TR>
+ </TABLE>
+
+ @exception UNDEFINED_CONFIGURATION_SELECTOR is returned if an unknown value is passed as <code>key</code> (see CoreExpT.h).
+
+ @since PI_ACROSUPPORT_VERSION >= 0x00020000
+*/
+ANPROC(void *, ASGetConfiguration, (ASAtom key))
+
+/* Acrobat 4.0 additions */
+
+/**
+ Enumerates all ASExtension objects (valid plug-ins).
+ @param proc A user-supplied callback to call for each plug-in.
+ Enumeration halts if <code>proc</code> returns <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @param onlyLivingExtensions If <code>true</code>, ASExtension objects that
+ have been unloaded or otherwise deactivated are not enumerated.
+ If <code>false</code>, all ASExtension objects are enumerated.
+ @return If <code>proc</code> returned <code>false</code>, the last ASExtension that was enumerated is returned, <code>NULL</code> otherwise.
+ @see ASExtensionGetFileName
+ @see ASExtensionGetRegisteredName
+ @ingroup Enumerators
+ @since PI_ACROSUPPORT_VERSION >= 0x00040000
+*/
+NPROC(ASExtension, ASEnumExtensions, (ASExtensionEnumProc proc, void *clientData,
+ ASBool onlyLivingExtensions))
+
+/**
+ Gets the file name of an ASExtension.
+ @param extension IN/OUT The ASExtension whose file name is obtained.
+
+ @param buffer IN/OUT (Filled by the method, may be <code>NULL</code>) A pointer
+ to a buffer for the file name. Pass <code>NULL</code> to have this method
+ return the length of the file name (excluding a terminating
+ <code>NULL</code> character).
+ @param bufSize IN/OUT The number of bytes in <code>buffer</code>. It is ignored if <code>buffer</code>
+ is <code>NULL</code>.
+ @return The number of characters written into <code>buffer</code>, excluding
+ the <code>NULL</code> character.
+ @see ASExtensionGetRegisteredName
+ @since PI_ACROSUPPORT_VERSION >= 0x00040000
+*/
+NPROC(ASTArraySize, ASExtensionGetFileName, (ASExtension extension, char *buffer, ASTArraySize bufSize))
+
+/**
+ Gets the registered name associated with a plug-in.
+ @param extension IN/OUT The ASExtension whose name is obtained.
+
+ @return An ASAtom representing the plug-in name, or <code>NULL</code> if the
+ name could not be identified.
+ @see ASExtensionGetFileName
+ @since PI_ACROSUPPORT_VERSION >= 0x00040000
+*/
+NPROC(ASAtom, ASExtensionGetRegisteredName, (ASExtension extension))
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CoreExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CoreExpT.h
new file mode 100644
index 0000000..a419514
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CoreExpT.h
@@ -0,0 +1,407 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ CoreExpT.h
+
+ - Types, macros, structures, etc. required to use the Core HFT.
+
+*********************************************************************/
+
+#ifndef _H_CoreExpT
+#define _H_CoreExpT
+
+#include "Environ.h"
+
+#if UNIX_PLATFORM || MAC_PLATFORM
+#include <sys/types.h>
+#endif
+
+#if WIN_PLATFORM
+/* This header defines the inttypes intptr_t and uintptr_t on Windows */
+#include <stddef.h>
+#else
+#include <inttypes.h>
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+/* integer types */
+/**
+ 1-byte <code>signed char</code> value.
+*/
+typedef signed char ASInt8, *ASInt8P;
+/**
+ 2-byte <code>signed short</code> numeric value.
+*/
+typedef short int ASInt16, *ASInt16P;
+
+#if POINTER_64_BITS
+/**
+ 4-byte <code>signed long</code> numeric value.
+*/
+ typedef int ASInt32, *ASInt32P;
+#else
+ typedef long int ASInt32, *ASInt32P;
+#endif
+
+/* CodeWarrior, gcc, and VC 7 (1330) support "long long". VC 6 uses __int64. */
+#if ! defined(_MSC_VER) || _MSC_VER >= 1330
+ typedef signed long long int ASInt64;
+#elif defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64
+ typedef signed __int64 ASInt64;
+#else
+/**
+ 4-byte <code>signed long</code> numeric value.
+*/
+ #error 64-bit integer type not supported
+#endif
+
+/** */
+#define ASMAXInt8 ((ASInt8)0x7F)
+/** */
+#define ASMINInt8 ((ASInt8)0x80)
+/** */
+#define ASMAXInt16 ((ASInt16)0x7FFF)
+/** */
+#define ASMINInt16 ((ASInt16)0x8000)
+/** */
+#define ASMAXInt32 ((ASInt32)0x7FFFFFFF)
+/** */
+#define ASMINInt32 ((ASInt32)0x80000000)
+/** */
+#define ASMAXInt64 ((ASInt64)0x7FFFFFFFFFFFFFFFLL)
+/** */
+#define ASMINInt64 ((ASInt64)0x8000000000000000LL)
+
+
+/* cardinal types */
+/**
+ 1-byte <code>unsigned char</code> value.
+*/
+typedef unsigned char ASUns8, *ASUns8P;
+/**
+ 2-byte unsigned short numeric value.
+*/
+typedef unsigned short int ASUns16, *ASUns16P;
+
+#if POINTER_64_BITS
+/**
+ 4-byte <code>unsigned long</code> numeric value.
+*/
+ typedef unsigned int ASUns32, *ASUns32P;
+#else
+ typedef unsigned long int ASUns32, *ASUns32P;
+#endif
+
+#if ! defined(_MSC_VER) || _MSC_VER >= 1330
+ typedef unsigned long long int ASUns64;
+#elif defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64
+ typedef unsigned __int64 ASUns64;
+#else
+/**
+ 4-byte <code>unsigned long</code> numeric value.
+*/
+ #error 64-bit integer type not supported
+#endif
+
+/** */
+typedef intptr_t ASIntOrPtr;
+/** */
+typedef uintptr_t ASUnsOrPtr;
+
+/** */
+#define ASMAXUns8 ((ASUns8)0xFF)
+/** */
+#define ASMINUns8 ((ASUns8)0x00)
+/** */
+#define ASMAXUns16 ((ASUns16)0xFFFF)
+/** */
+#define ASMINUns16 ((ASUns16)0x0000)
+/** */
+#define ASMAXUns32 ((ASUns32)0xFFFFFFFF)
+/** */
+#define ASMINUns32 ((ASUns32)0x00000000)
+/** */
+#define ASMAXUns64 ((ASUns64)0xFFFFFFFFFFFFFFFFLL)
+/** */
+#define ASMINUns64 ((ASUns64)0x0000000000000000LL)
+
+
+/** ASBool */
+typedef ASUns16 ASBool;
+
+/* for converting from ASBool to bool */
+#define ASBoolToBool(boolval) (boolval != FALSE)
+
+/* These types have been introduced to give us explicit control over
+** the sizes of various enums we exported as such through our 2.0 plug-in
+** API. Enums are not sized the same way on the two platforms.
+*/
+#if WIN_PLATFORM
+
+/**
+ 1-byte enumeration with values from <code>0</code> to <code>127</code>, used in data
+ structures.
+*/
+typedef ASInt16 ASEnum8;
+/**
+ 2-byte enumeration with values from <code>0</code> to <code>32,767</code>, used in
+ data structures.
+*/
+typedef ASInt16 ASEnum16;
+
+/** */
+#define kASMAXEnum8 ASMAXInt16
+/** */
+#define kASMAXEnum16 ASMAXInt16
+
+#else
+
+/** */
+typedef ASInt8 ASEnum8;
+/**
+ 2-byte enumeration with values from <code>0</code> to <code>32,767</code>, used in
+ data structures.
+*/
+typedef ASInt16 ASEnum16;
+
+/** */
+#define kASMAXEnum8 ASMAXInt8
+/** */
+#define kASMAXEnum16 ASMAXInt16
+
+#endif
+
+#if PLUGIN || ACROBAT_LIBRARY
+#include "AcroErr.h"
+#endif
+
+#if defined(__cplusplus)
+#define HAS_BOOL_SUPPORT 1
+#else
+#define HAS_BOOL_SUPPORT 0
+#endif
+
+#if !HAS_BOOL_SUPPORT
+ #ifndef true
+ #define true 1
+ #endif
+ #ifndef false
+ #define false 0
+ #endif
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ASSize_t - canonical type for sizes of things in bytes. */
+/** */
+typedef size_t ASSize_t;
+
+/* Generic pointers */
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+/* Opaque basetypes */
+typedef ASInt32 OPAQUE_32_BITS;
+typedef struct OPAQUE_64_BITS
+{
+ OPAQUE_32_BITS a, b;
+}
+OPAQUE_64_BITS;
+
+/* HugePtr definition
+** This is required for Intel processors when
+** running in a segmented mode. The HUGETYPE specifies
+** whatever keyword is required to make a pointer
+** valid when accessing blocks of memory greater than 64K.
+** For non-Intel machines, it is defined as nothing.
+*/
+#ifndef HUGEPTRTYPE
+#define HUGEPTRTYPE
+#endif
+#define HugePtr char HUGEPTRTYPE *
+
+/*------------------------------------------------------------------------
+ typedef of ASAtom object
+------------------------------------------------------------------------*/
+#ifndef HAS_32BIT_ATOMS
+#if TOOLKIT || ACROBAT_LIBRARY || PDFLPI || PDFL_EXTENSION
+#define HAS_32BIT_ATOMS 1
+#else
+#define HAS_32BIT_ATOMS 0
+#endif
+#endif
+
+#if HAS_32BIT_ATOMS
+typedef ASUns32 ASAtom; /* PDFLib uses 32bit ASAtom :-) */
+#define ASAtomNull ASMAXUns32
+#else
+typedef ASUns16 ASAtom; /* this could be an ASUns32. See RecLst.h */
+#define ASAtomNull ASMAXUns16
+#endif
+
+
+/**
+ Uniquely identifies an entry within an HFT.
+ It is simply the integer offset of the entry from the start of the HFT.
+*/
+typedef ASInt32 Selector;
+#define BAD_SELECTOR 0
+
+
+/**
+ An HFTEntry may be cast to a pointer to a function whose prototype must
+ be provided by the HFT's description file.
+*/
+typedef void *HFTEntry;
+
+/**
+ An object that describes a set of exported functions.
+ It is an array of function pointers, where the first element is unused.
+
+ @note An HFT object may be cast to an <code>(HFTEntry *)</code>; you may then
+ index directly into this object by a selector to obtain a pointer to
+ a function.
+*/
+#if !defined(HFT_IMPL) || !HFT_IMPL
+typedef HFTEntry *HFT;
+#endif
+/* bit to set for beta versions */
+#define kHFT_IN_BETA_FLAG 0x80000000
+
+
+/**
+ A flag that specifies whether an HFT entry is replaceable:
+ <ul>
+ <li> If the flag is set, the new entry can be replaced. Clients should
+ generally use this value, allowing other clients to subsequently
+ replace the method again. </li>
+ <li> If the flag is not set, the new entry cannot be replaced. </li>
+ </ul>
+ @see HFTReplaceEntry
+*/
+#define HFTEntryReplaceable (0x00000001)
+
+
+/**
+ An opaque pointer to an object that identifies a specific loaded plug-in. A unique
+ ASExtension object is created for each plug-in when it is loaded. If the plug-in fails
+ to initialize, the ASExtension remains but is marked as inactive.
+ @see ASEnumExtensions
+*/
+typedef struct _t_ASExtension *ASExtension;
+/** */
+typedef ASExtension ExtensionID ;
+/** */
+typedef void *ASCallback;
+
+
+/** This constant is returned by ASGetConfiguration() when the selector
+ passed in is unknown to the application.
+*/
+#define UNDEFINED_CONFIGURATION_SELECTOR ((void *)-1)
+
+
+/**
+ Environment-restoration functions are called when an exception is raised.
+ @param asEnviron The environment to restore.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *restoreEnvironProc)(void *asEnviron);
+
+/* not documenting these as they are obsolete. */
+#define ASUSE_OBSOLETE_TYPES 1 /* XXX - temp */
+#if ASUSE_OBSOLETE_TYPES
+#define Int8 ASInt8
+#define Int8P ASInt8P
+#define Int16 ASInt16
+#define Int16P ASInt16P
+#define Int32 ASInt32
+#define Int32P ASInt32P
+
+#define Uns8 ASUns8
+#define Uns8P ASUns8P
+#define Uns16 ASUns16
+#define Uns16P ASUns16P
+#define Uns32 ASUns32
+#define Uns32P ASUns32P
+
+#define MAXInt8 ASMAXInt8
+#define MINInt8 ASMINInt8
+#define MAXInt16 ASMAXInt16
+#define MINInt16 ASMINInt16
+#define MAXInt32 ASMAXInt32
+#define MINInt32 ASMINInt32
+
+#define MAXUns8 ASMAXUns8
+#define MINUns8 ASMINUns8
+#define MAXUns16 ASMAXUns16
+#define MINUns16 ASMINUns16
+#define MAXUns32 ASMAXUns32
+#define MINUns32 ASMINUns32
+
+#ifndef _WIN32 /* We cannot do this for WIN32 since it has a different size for boolean */
+#define boolean ASBool
+#endif
+
+#define os_size_t ASSize_t
+#endif /* ASUSE_OBSOLETE_TYPES */
+
+#define FixedPointP ..Use.ASFixedPointP.instead..
+#define FixedRectP ..Use.ASFixedRectP.instead..
+#define FixedQuad ..Use.ASFixedQuad.instead..
+#define FixedQuadP ..Use.ASFixedQuadP.instead..
+#define FixedMatrix ..Use.ASFixedMatrix.instead..
+#define FixedMatrixP ..Use.ASFixedMatrixP.instead..
+
+
+
+/**
+ Enumeration function for ASEnumExtensions().
+ @param extension The ASExtension for a client.
+ @param clientData User-supplied data that was passed in
+ the call to ASEnumExtensions().
+ @return If <code>false</code>, enumeration halts and the ASExtension on which
+ enumeration halted is returned. If <code>true</code>, enumeration continues.
+
+ @see ASEnumExtensions
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *ASExtensionEnumProc)(
+ ASExtension extension,
+ void *clientData);
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_CoreExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosCalls.h
new file mode 100644
index 0000000..00d0a46
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosCalls.h
@@ -0,0 +1,494 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ CosCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_CosCalls
+#define _H_CosCalls
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _CosHFT_LATEST_VERSION 0x00090000
+#define _CosHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _CosHFT_IS_BETA 0
+
+/* for public use */
+#define CosHFT_LATEST_VERSION (_CosHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _CosHFT_LATEST_VERSION) : _CosHFT_LATEST_VERSION)
+
+#define CosHFT_VERSION_2 0x00020000
+#define CosHFT_VERSION_3 0x00020002
+#define CosHFT_VERSION_4 0x00040000
+#define CosHFT_VERSION_4_5 0x00040005
+#define CosHFT_VERSION_5 0x00050000
+#define CosHFT_VERSION_5_1 0x00050001
+#define CosHFT_VERSION_6 0x00060000
+#define CosHFT_VERSION_7 0x00070000
+#define CosHFT_VERSION_8 0x00080000
+#define CosHFT_VERSION_9 CosHFT_LATEST_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "CosExpT.h"
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif /* NPROC */
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define NOPROC(name)
+
+ #include "CosProcs.h"
+
+ #undef NPROC
+ #undef NOPROC
+#endif /*!PLUGIN */
+
+#if PLUGIN
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+
+ #define NOPROC(name) \
+ name##SEL,
+ enum {
+ COSBAD_SELECTOR,
+ #include "CosProcs.h"
+ COSNUMSELECTORSplusOne
+ };
+
+ #define COSNUMSELECTORS (COSNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef NOPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define NOPROC(name)
+ #include "CosProcs.h"
+ #undef NOPROC
+ #undef NPROC
+
+
+
+#if PI_COS_VERSION != 0
+
+#ifdef THREAD_SAFE_PDFL
+ #define gCosHFT (GetHFTLocations()->cosHFT)
+ #define gCosVersion (GetHFTLocations()->cosVersion)
+#else
+ extern HFT gCosHFT;
+ extern ASUns32 gCosVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+#if !STATIC_HFT
+/* CosObjEqual */
+#define CosObjEqual (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosObjEqualSELPROTO)(gCosHFT[CosObjEqualSEL])))
+
+/* CosObjGetType */
+#define CosObjGetType (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosObjGetTypeSELPROTO)(gCosHFT[CosObjGetTypeSEL])))
+
+/* CosObjIsIndirect */
+#define CosObjIsIndirect (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosObjIsIndirectSELPROTO)(gCosHFT[CosObjIsIndirectSEL])))
+
+/* CosObjEnum */
+#define CosObjEnum (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosObjEnumSELPROTO)(gCosHFT[CosObjEnumSEL])))
+
+/* CosObjGetDoc */
+#define CosObjGetDoc (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosObjGetDocSELPROTO)(gCosHFT[CosObjGetDocSEL])))
+
+/* CosNewNull */
+#define CosNewNull (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewNullSELPROTO)(gCosHFT[CosNewNullSEL])))
+
+/* CosNewInteger */
+#define CosNewInteger (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewIntegerSELPROTO)(gCosHFT[CosNewIntegerSEL])))
+
+/* CosNewFixed */
+#define CosNewFixed (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewFixedSELPROTO)(gCosHFT[CosNewFixedSEL])))
+
+/* CosNewBoolean */
+#define CosNewBoolean (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewBooleanSELPROTO)(gCosHFT[CosNewBooleanSEL])))
+
+/* CosNewName */
+#define CosNewName (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewNameSELPROTO)(gCosHFT[CosNewNameSEL])))
+
+/* CosNewString */
+#define CosNewString (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewStringSELPROTO)(gCosHFT[CosNewStringSEL])))
+
+/* CosNewArray */
+#define CosNewArray (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewArraySELPROTO)(gCosHFT[CosNewArraySEL])))
+
+/* CosNewDict */
+#define CosNewDict (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewDictSELPROTO)(gCosHFT[CosNewDictSEL])))
+
+/* CosNewStream */
+#define CosNewStream (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNewStreamSELPROTO)(gCosHFT[CosNewStreamSEL])))
+
+/* CosObjDestroy */
+#define CosObjDestroy (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosObjDestroySELPROTO)(gCosHFT[CosObjDestroySEL])))
+
+/* CosIntegerValue */
+#define CosIntegerValue (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosIntegerValueSELPROTO)(gCosHFT[CosIntegerValueSEL])))
+
+/* CosFixedValue */
+#define CosFixedValue (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosFixedValueSELPROTO)(gCosHFT[CosFixedValueSEL])))
+
+/* CosBooleanValue */
+#define CosBooleanValue (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosBooleanValueSELPROTO)(gCosHFT[CosBooleanValueSEL])))
+
+/* CosNameValue */
+#define CosNameValue (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosNameValueSELPROTO)(gCosHFT[CosNameValueSEL])))
+
+/* CosStringValue */
+#define CosStringValue (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosStringValueSELPROTO)(gCosHFT[CosStringValueSEL])))
+
+/* CosDictGet */
+#define CosDictGet (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosDictGetSELPROTO)(gCosHFT[CosDictGetSEL])))
+
+/* CosDictPut */
+#define CosDictPut (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosDictPutSELPROTO)(gCosHFT[CosDictPutSEL])))
+
+/* CosDictRemove */
+#define CosDictRemove (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosDictRemoveSELPROTO)(gCosHFT[CosDictRemoveSEL])))
+
+/* CosDictKnown */
+#define CosDictKnown (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosDictKnownSELPROTO)(gCosHFT[CosDictKnownSEL])))
+
+/* CosArrayGet */
+#define CosArrayGet (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosArrayGetSELPROTO)(gCosHFT[CosArrayGetSEL])))
+
+/* CosArrayPut */
+#define CosArrayPut (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosArrayPutSELPROTO)(gCosHFT[CosArrayPutSEL])))
+
+/* CosArrayInsert */
+#define CosArrayInsert (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosArrayInsertSELPROTO)(gCosHFT[CosArrayInsertSEL])))
+
+/* CosArrayRemove */
+#define CosArrayRemove (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosArrayRemoveSELPROTO)(gCosHFT[CosArrayRemoveSEL])))
+
+/* CosArrayLength */
+#define CosArrayLength (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosArrayLengthSELPROTO)(gCosHFT[CosArrayLengthSEL])))
+
+/* CosStreamLength */
+#define CosStreamLength (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosStreamLengthSELPROTO)(gCosHFT[CosStreamLengthSEL])))
+
+/* CosStreamDict */
+#define CosStreamDict (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosStreamDictSELPROTO)(gCosHFT[CosStreamDictSEL])))
+
+/* CosStreamOpenStm */
+#define CosStreamOpenStm (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosStreamOpenStmSELPROTO)(gCosHFT[CosStreamOpenStmSEL])))
+
+/* CosStreamPos */
+#define CosStreamPos (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosStreamPosSELPROTO)(gCosHFT[CosStreamPosSEL])))
+
+/* CosDocGetRoot */
+#define CosDocGetRoot (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosDocGetRootSELPROTO)(gCosHFT[CosDocGetRootSEL])))
+
+/* CosDocGetInfoDict */
+#define CosDocGetInfoDict (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosDocGetInfoDictSELPROTO)(gCosHFT[CosDocGetInfoDictSEL])))
+
+/* CosDecryptData */
+#define CosDecryptData (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosDecryptDataSELPROTO)(gCosHFT[CosDecryptDataSEL])))
+
+/* CosEncryptData */
+#define CosEncryptData (ACROASSERT(gCosVersion >=CosHFT_VERSION_2), *((CosEncryptDataSELPROTO)(gCosHFT[CosEncryptDataSEL])))
+
+/* Acrobat 3.0 additions */
+#if PI_COS_VERSION >= 0x00020002
+
+/* CosDocOpenWithParams */
+#define CosDocOpenWithParams (ACROASSERT(gCosVersion >=CosHFT_VERSION_3), *((CosDocOpenWithParamsSELPROTO)(gCosHFT[CosDocOpenWithParamsSEL])))
+
+/* CosDocClose */
+#define CosDocClose (ACROASSERT(gCosVersion >=CosHFT_VERSION_3), *((CosDocCloseSELPROTO)(gCosHFT[CosDocCloseSEL])))
+
+/* CosDocCreate */
+#define CosDocCreate (ACROASSERT(gCosVersion >=CosHFT_VERSION_3), *((CosDocCreateSELPROTO)(gCosHFT[CosDocCreateSEL])))
+
+/* CosDocSaveToFile */
+#define CosDocSaveToFile (ACROASSERT(gCosVersion >=CosHFT_VERSION_3), *((CosDocSaveToFileSELPROTO)(gCosHFT[CosDocSaveToFileSEL])))
+
+/* CosDocSetDirty */
+#define CosDocSetDirty (ACROASSERT(gCosVersion >=CosHFT_VERSION_3), *((CosDocSetDirtySELPROTO)(gCosHFT[CosDocSetDirtySEL])))
+
+
+#endif /* PI_COS_VERSION 0x00020002 */
+
+
+/* Acrobat 4.0 additions */
+
+/* CosObjGetID */
+#define CosObjGetID (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosObjGetIDSELPROTO)(gCosHFT[CosObjGetIDSEL])))
+
+/* CosObjGetGeneration */
+#define CosObjGetGeneration (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosObjGetGenerationSELPROTO)(gCosHFT[CosObjGetGenerationSEL])))
+
+/* CosDocGetObjByID */
+#define CosDocGetObjByID (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosDocGetObjByIDSELPROTO)(gCosHFT[CosDocGetObjByIDSEL])))
+
+/* CosDocSaveWithParams */
+#define CosDocSaveWithParams (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosDocSaveWithParamsSELPROTO)(gCosHFT[CosDocSaveWithParamsSEL])))
+
+
+/* CosDocEnumEOFs */
+#define CosDocEnumEOFs (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosDocEnumEOFsSELPROTO)(gCosHFT[CosDocEnumEOFsSEL])))
+
+/* CosStringSetHexFlag */
+#define CosStringSetHexFlag (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosStringSetHexFlagSELPROTO) (gCosHFT[CosStringSetHexFlagSEL])))
+
+/* CosStringGetHexFlag */
+#define CosStringGetHexFlag (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosStringGetHexFlagSELPROTO) (gCosHFT[CosStringGetHexFlagSEL])))
+
+/* CosObjHash */
+#define CosObjHash (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosObjHashSELPROTO) (gCosHFT[CosObjHashSEL])))
+
+/* CosObjCopy */
+#define CosObjCopy (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosObjCopySELPROTO) (gCosHFT[CosObjCopySEL])))
+
+/* CosArrayRemove */
+#define CosArrayRemoveNth (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosArrayRemoveNthSELPROTO)(gCosHFT[CosArrayRemoveNthSEL])))
+
+/* CosDocEnumIndirect */
+#define CosDocEnumIndirect (ACROASSERT(gCosVersion >=CosHFT_VERSION_4), *((CosDocEnumIndirectSELPROTO)(gCosHFT[CosDocEnumIndirectSEL])))
+
+
+/* Acrobat 4.01 additions */
+
+/* CosCryptGetVersion */
+#define CosCryptGetVersion (ACROASSERT(gCosVersion >=CosHFT_VERSION_4_5), *((CosCryptGetVersionSELPROTO) (gCosHFT[CosCryptGetVersionSEL])))
+
+/* CosDecryptGetMaxKeyBytes */
+#define CosDecryptGetMaxKeyBytes (ACROASSERT(gCosVersion >=CosHFT_VERSION_4_5), *((CosDecryptGetMaxKeyBytesSELPROTO)(gCosHFT[CosDecryptGetMaxKeyBytesSEL])))
+
+/* CosEncryptGetMaxKeyBytes */
+#define CosEncryptGetMaxKeyBytes (ACROASSERT(gCosVersion >=CosHFT_VERSION_4_5), *((CosEncryptGetMaxKeyBytesSELPROTO)(gCosHFT[CosEncryptGetMaxKeyBytesSEL])))
+
+
+/* Acrobat 5.0 additions */
+
+/* CosStringValueCopy */
+#define CosCopyStringValue (ACROASSERT(gCosVersion >=CosHFT_VERSION_5), *((CosCopyStringValueSELPROTO)(gCosHFT[CosCopyStringValueSEL])))
+
+/* CosStringValueSafe */
+#define CosStringValueSafe (ACROASSERT(gCosVersion >=CosHFT_VERSION_5), *((CosStringValueSafeSELPROTO)(gCosHFT[CosStringValueSafeSEL])))
+
+/* CosDocGetID */
+#define CosDocGetID (ACROASSERT(gCosVersion >=CosHFT_VERSION_5), *((CosDocGetIDSELPROTO)(gCosHFT[CosDocGetIDSEL])))
+
+/* CosObjCmp */
+#define CosObjCmp (ACROASSERT(gCosVersion >=CosHFT_VERSION_5), *((CosObjCmpSELPROTO)(gCosHFT[CosObjCmpSEL])))
+
+/* PDFLib 5.01 additions */
+/* CosSetMaxDocStorage */
+#define CosSetMaxDocStorage (ACROASSERT(gCosVersion >=CosHFT_VERSION_5_1), *((CosSetMaxDocStorageSELPROTO)(gCosHFT[CosSetMaxDocStorageSEL])))
+
+/* Acrobat 6 additions */
+/* CosDocObjIsWithinRange */
+#define CosDocObjIsWithinRange (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosDocObjIsWithinRangeSELPROTO)(gCosHFT[CosDocObjIsWithinRangeSEL])))
+
+/* CosObjIsCompressed */
+#define CosObjIsCompressed (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjIsCompressedSELPROTO)(gCosHFT[CosObjIsCompressedSEL])))
+
+/* CosNewObjCollection */
+#define CosNewObjCollection (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosNewObjCollectionSELPROTO)(gCosHFT[CosNewObjCollectionSEL])))
+
+/* CosObjCollectionIsNull */
+#define CosObjCollectionIsNull (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjCollectionIsNullSELPROTO)(gCosHFT[CosObjCollectionIsNullSEL])))
+
+/* CosObjGetCollection */
+#define CosObjGetCollection (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjGetCollectionSELPROTO)(gCosHFT[CosObjGetCollectionSEL])))
+
+/* CosObjAddToCollection */
+#define CosObjAddToCollection (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjAddToCollectionSELPROTO)(gCosHFT[CosObjAddToCollectionSEL])))
+
+/* CosObjRemoveFromCollection */
+#define CosObjRemoveFromCollection (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjRemoveFromCollectionSELPROTO)(gCosHFT[CosObjRemoveFromCollectionSEL])))
+
+/* CosObjSetCompressibility */
+#define CosObjSetCompressibility (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjSetCompressibilitySELPROTO)(gCosHFT[CosObjSetCompressibilitySEL])))
+
+/* CosObjGetCompressibility */
+#define CosObjGetCompressibility (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjGetCompressibilitySELPROTO)(gCosHFT[CosObjGetCompressibilitySEL])))
+
+/* CosObjCollectionSize */
+#define CosObjCollectionSize (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjCollectionSizeSELPROTO)(gCosHFT[CosObjCollectionSizeSEL])))
+
+/* CosObjCollectionEqual */
+#define CosObjCollectionEqual (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjCollectionEqualSELPROTO)(gCosHFT[CosObjCollectionEqualSEL])))
+
+/* CosObjCollectionEnum */
+#define CosObjCollectionEnum (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjCollectionEnumSELPROTO)(gCosHFT[CosObjCollectionEnumSEL])))
+
+/* CosObjRefreshAfterLinearizedSave */
+#define CosObjRefreshAfterLinearizedSave (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosObjRefreshAfterLinearizedSaveSELPROTO)(gCosHFT[CosObjRefreshAfterLinearizedSaveSEL])))
+
+/* CosDocHasFullCompression */
+#define CosDocHasFullCompression (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosDocHasFullCompressionSELPROTO)(gCosHFT[CosDocHasFullCompressionSEL])))
+
+/* CosDocHasPartialCompression */
+#define CosDocHasPartialCompression (ACROASSERT(gCosVersion >=CosHFT_VERSION_6), *((CosDocHasPartialCompressionSELPROTO)(gCosHFT[CosDocHasPartialCompressionSEL])))
+
+
+/* Acrobat 7 additions */
+
+#define CosCallMacro(fname, version) (ACROASSERT(gCosVersion >=CosHFT_VERSION_##version), *((fname##SELPROTO)(gCosHFT[fname##SEL])))
+
+/* 64-bit integers */
+#define CosNewInteger64 CosCallMacro(CosNewInteger64, 7)
+#define CosInteger64Value CosCallMacro(CosInteger64Value, 7)
+
+/* IEEE floats */
+#define CosNewFloat CosCallMacro(CosNewFloat, 7)
+#define CosFloatValue CosCallMacro(CosFloatValue, 7)
+
+/* "Key as object" versions of CosDictGet et al. */
+#define CosDictGetKey CosCallMacro(CosDictGetKey, 7)
+#define CosDictPutKey CosCallMacro(CosDictPutKey, 7)
+#define CosDictRemoveKey CosCallMacro(CosDictRemoveKey, 7)
+#define CosDictKnownKey CosCallMacro(CosDictKnownKey, 7)
+
+/* "Key as string" versions of CosDictGet et al. */
+#define CosDictGetKeyString CosCallMacro(CosDictGetKeyString, 7)
+#define CosDictPutKeyString CosCallMacro(CosDictPutKeyString, 7)
+#define CosDictRemoveKeyString CosCallMacro(CosDictRemoveKeyString,7)
+#define CosDictKnownKeyString CosCallMacro(CosDictKnownKeyString, 7)
+
+/* Weak references */
+#define CosDictSetWeakReference CosCallMacro(CosDictSetWeakReference, 7)
+#define CosDictIsWeakReference CosCallMacro(CosDictIsWeakReference, 7)
+
+#define CosArraySetWeakReference CosCallMacro(CosArraySetWeakReference, 7)
+#define CosArrayIsWeakReference CosCallMacro(CosArrayIsWeakReference, 7)
+
+/* Strong references */
+#define CosObjAcquire CosCallMacro(CosObjAcquire, 7)
+#define CosObjRelease CosCallMacro(CosObjRelease, 7)
+
+/* Names from strings */
+#define CosNewNameFromString CosCallMacro(CosNewNameFromString, 7)
+#define CosCopyNameStringValue CosCallMacro(CosCopyNameStringValue,7)
+
+/* Support for 64-bit file positions */
+#define CosDocEnumEOFs64 CosCallMacro(CosDocEnumEOFs64, 7)
+
+/* Support for numerical type-checking */
+#define CosNumberIsWithinASInt32Range CosCallMacro(CosNumberIsWithinASInt32Range, 7)
+#define CosNumberIsWithinASFixedRange CosCallMacro(CosNumberIsWithinASFixedRange, 7)
+
+#define CosDocObjIsWithinRange64 CosCallMacro(CosDocObjIsWithinRange64, 7)
+#define CosNewStream64 CosCallMacro(CosNewStream64, 7)
+#define CosStreamLength64 CosCallMacro(CosStreamLength64, 7)
+#define CosStreamPos64 CosCallMacro(CosStreamPos64, 7)
+
+/* Acrobat 9 additions */
+
+/* IEEE double-precision floats */
+#define CosNewDouble CosCallMacro(CosNewDouble, 9)
+#define CosNewDoubleEx CosCallMacro(CosNewDoubleEx, 9)
+#define CosDoubleValue CosCallMacro(CosDoubleValue, 9)
+
+/* Extensions / ADBE version support */
+#define CosDocGetAdobeExtensionLevel CosCallMacro(CosDocGetAdobeExtensionLevel, 9)
+#define CosDocSetAdobeExtensionLevel CosCallMacro(CosDocSetAdobeExtensionLevel, 9)
+#define CosDocHasISOExtensions CosCallMacro(CosDocHasISOExtensions, 9)
+
+//#undef CosCallMacro
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* !STATIC_HFT */
+#endif /* PI_COS_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(_H_CosCalls) */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosExpT.h
new file mode 100644
index 0000000..cf560b1
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosExpT.h
@@ -0,0 +1,349 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ CosExpT.h
+
+ - Types, macros, structures, etc. required to use the Cos HFT.
+
+*********************************************************************/
+
+#ifndef _H_CosExpT
+#define _H_CosExpT
+
+#include "ASExpT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** */
+typedef ASInt32 CosCryptVersion;
+/** */
+typedef ASUns16 CosGeneration;
+/** */
+typedef ASUns32 CosID;
+/** <code>0</code> is not valid. */
+typedef ASUns32 CosHashCode;
+/** */
+typedef ASInt32 CosStreamStartAndCode;
+/** <code>-1</code> for none, error, or other special meaning */
+typedef ASInt32 CosByteMax;
+/**
+ Used for an array of bytes in CosDocGetID().
+ @see CosDocGetID
+*/
+typedef ASUns8 CosByte; /* used for arrays of bytes */
+
+/* Type codes for Cos objects */
+
+enum {
+ /** A <code>NULL</code> object or an invalid object. */
+ CosNull = 0,
+ /** An integer object. */
+ CosInteger = 1,
+ /** A fixed number object. It is a deprecated type-name for real numbers. */
+ CosFixed = 2,
+ /** A preferred type-name for real numbers. */
+ CosReal = 2,
+ /** An ASBool object. */
+ CosBoolean = 3,
+ /** A name object. */
+ CosName = 4,
+ /** A string object. */
+ CosString = 5,
+ /** A dictionary object. */
+ CosDict = 6,
+ /** An array object. */
+ CosArray = 7,
+ /** A stream object. */
+ CosStream = 8
+};
+
+/**
+ Constants that specify a Cos object's type (string, number,
+ dictionary, and so on).
+
+ @see CosObjGetType
+*/
+typedef ASInt32 CosType;
+
+/* Opaque. It represents an Acrobat document. */
+/** */
+typedef struct _t_CosDoc *CosDoc;
+
+/* COSSRCIMPL must be defined only when this header file is included
+ to construct the COS implementation. Client code that includes this
+ header file must not define COSSRCIMPL */
+#ifndef COSSRCIMPL
+
+ #if PLUGIN || ACROBAT_LIBRARY
+ typedef OPAQUE_64_BITS CosObj;
+ #else
+ typedef struct _t_CosObj {ASInt32 a,b;} CosObj;
+ #endif
+
+ typedef OPAQUE_64_BITS CosObjCollection;
+
+#endif
+
+
+/**
+ A callback for CosObjEnum(), CosDocEnumIndirect(), and PDDocEnumOCGs().
+ It is called once for each component of a composite Cos object
+ (dictionary, array, and stream).
+ @param obj Possible values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>Dictionary</code></TD><TD>A key.</TD></TR>
+ <TR><TD><code>Array</code></TD><TD>An array element.</TD></TR>
+ <TR><TD><code>Stream</code></TD><TD>The stream's dictionary (the whole thing, not one key at a time).</TD></TR>
+ </TABLE>
+
+ @param value Possible values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>Dictionary</code></TD><TD>The value associated with the Key.</TD></TR>
+ <TR><TD><code>Array</code></TD><TD>A <code>NULL</code> Cos object.</TD></TR>
+ <TR><TD><code>Stream</code></TD><TD>A <code>NULL</code> Cos object.</TD></TR>
+ </TABLE>
+
+ <p>For CosDocEnumIndirect() and PDDocEnumOCGs(), this is always
+ the <code>NULL</code> Cos object. </p>
+
+ @param clientData User-supplied data that was passed in
+ the call to CosObjEnum(), CosDocEnumIndirect(), or PDDocEnumOCGs().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see CosObjEnum
+ @see CosDocEnumIndirect
+ @see PDDocEnumOCGs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *CosObjEnumProc)(
+ CosObj obj, CosObj value, void *clientData);
+
+ /* The data in a CosStream may be filtered and encrypted.
+ If CosOpenRaw is specified to CosStreamOpenStm, the data will
+ be delivered by the returned ASStm as it is in the source ASStm,
+ neither filtered nor decrypted.
+ If CosOpenUnfiltered is specified, the data will be decrypted
+ but not filtered.
+ If CosOpenFiltered is specified, the data will be both
+ decrypted and filtered. (This is the usual case.)
+ */
+enum {
+ /** The data will be decrypted but not filtered.
+
+*/
+ cosOpenRaw,
+ /**
+*/
+ cosOpenUnfiltered,
+ /** The data will be both decrypted and filtered. (This is the
+ usual case.) */
+ cosOpenFiltered,
+ /** */
+ cosOpenRawIgnoreFKey,
+ /** */
+ cosOpenUnfilteredIgnoreFKey,
+ /** */
+ cosOpenFilteredIgnoreFKey
+};
+/**
+ Constants that specify whether filters and decryption should
+ be applied to the stream's data.
+ @see CosStreamOpenStm
+*/
+typedef ASEnum8 CosStreamOpenMode;
+
+/* CosDocOpenParams.openFlags bitfield values */
+/** */
+#define kCosDocOpenDoRepair 0x0001
+
+/* CosDocOpenParams
+** Used in the call to CosDocOpenWithParams.
+*/
+/**
+ Parameters used when saving a file using CosDocOpenWithParams().
+
+ @see CosDocOpenWithParams
+*/
+typedef struct _t_CosDocOpenParams {
+ /** The size of this <code>struct</code>. */
+ ASSize_t size;
+ /** A bitfield of kCosDocOpen flags. */
+ ASFlagBits openFlags;
+ /** May be <code>NULL</code> if using the default file system. */
+ ASFileSys fileSys;
+ /** Must be provided. */
+ ASPathName pathName;
+ /** An expected header string (for example, <code>"%ADF-"</code>). If it is <code>NULL</code>, <code>"%PDF-"</code> is the assumed value. */
+ const char *headerString;
+ } CosDocOpenParamsRec, *CosDocOpenParams;
+
+/* Flags for CosDocCreate createFlags parameter */
+/** */
+#define cosDocCreateInfoDict 0x01
+
+/* Flags for CosDocSave saveFlags parameter */
+/** Delete unreferenced objects before save. */
+#define cosSaveGarbageCollect 0x01
+/** Write all objects, not just changes. */
+#define cosSaveFullSave 0x02
+/** Do NOT use the newly saved file as new store, stay with the current one */
+#define cosSaveCopy 0x04
+/** It is ok to store binary data in the file. */
+#define cosSaveBinaryOK 0x08
+/** If there are any object streams, write them
+ in a way that is hidden from PDF 1.4
+ (and earlier) viewers. This is used for
+ hybrid files, for example. */
+#define cosSaveConcealObjStreams 0x10
+/** */
+typedef ASFlagBits CosDocSaveFlags;
+
+/* CosDocSaveParams
+** Used in call to CosDocSaveToFile */
+/**
+ Parameters used when saving a file using CosDocSaveToFile()
+ and CosDocSaveWithParams().
+ @see CosDocSaveToFile
+ @see CosDocSaveWithParams
+*/
+typedef struct _t_CosDocSaveParams {
+ /** The size of this <code>struct</code>. */
+ ASSize_t size;
+ /** A complete header string, such as <code>"%ADF-1.0"</code>. */
+ char *header;
+ /** The encryption key to pass into the PDCryptHandler
+ if security has been set on the document. */
+ char *cryptData;
+ /** The length of the encryption key in bytes.
+ Cannot be greater than 5. */
+ ASTArraySize cryptDataLen;
+ /** The progress monitor. Use AVAppGetDocProgressMonitor()
+ to obtain the default progress monitor. */
+ ASProgressMonitor mon;
+ /** A pointer to user-supplied data to
+ pass to <code>mon</code> each time it is called. */
+ void *monClientData;
+ /** The Cos cryptographic version - the
+ version of the algorithm that is used to encrypt and decrypt
+ document data. <code>cryptVersion</code> equal to <code>0</code> is treated as <code>cryptVersion</code>
+ equal to <code>1</code>, to maintain backward compatibility. */
+ CosCryptVersion cryptVersion;
+} CosDocSaveParamsRec, *CosDocSaveParams;
+
+
+/**
+ A callback for CosDocEnumEOFs(). It is called once for each position in a CosDoc
+ after a <code>%%EOF</code> keyword that marks the end of either a main cross-reference
+ section, or an update cross-reference section that corresponds
+ to an incremental save. See CosDocEnumEOFs() for more details.
+ @param cosDoc The CosDoc in which the EOF is found.
+ @param fileOffset The 31-bit offset into the file directly following
+ the <code>%%EOF</code> keyword. If the procedure is called more than
+ once, the file positions passed to it are in decreasing
+ order (that is, the EOF positions are treated as <i>rollback
+ points</i>).
+ @param clientData User-supplied data that was passed in
+ the call to CosDocEnumEOFs().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt the enumeration.
+
+ @see CosDocEnumEOFs
+ @see CosDocEnumEOFsProc64
+
+ @note The precise value passed to the procedure
+ is not defined. It is at least one byte past the <code>%%EOF</code> keyword,
+ but may include one or more white space characters. When
+ the procedure is called only once, there is no guarantee
+ that <code>fileOffset</code> is the same as the length of the file.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *CosDocEnumEOFsProc)(CosDoc cosDoc,
+ ASFileOffset fileOffset, void *clientData);
+
+typedef ASInt64 ASFileOffset64;
+
+/**
+ A callback for CosDocEnumEOFs64(). It is called once for each position in a CosDoc
+ after a <code>%%EOF</code> keyword that marks the end of either a main cross-reference
+ section, or an update cross-reference section that corresponds
+ to an incremental save. See CosDocEnumEOFs() for more details.
+ This is similar to CosDocEnumEOFsProc(), except that the
+ <code>fileOffset</code> parameter is a 64-bit value instead of a 31-bit value.
+ @param cosDoc The CosDoc in which the EOF is found.
+ @param fileOffset The 64-bit offset into the file directly following
+ the <code>%%EOF</code> keyword.
+ @param clientData User-supplied data that was passed in
+ the call to CosDocEnumEOFs64().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt the enumeration.
+
+ @see CosDocEnumEOFs64
+ @see CosDocEnumEOFsProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *CosDocEnumEOFsProc64)(CosDoc cosDoc,
+ ASFileOffset64 fileOffset, void *clientData);
+
+/**
+ A callback for PDDocSaveParams() used by PDDocSaveWithParams().
+ Use this to get information about Cos objects of interest
+ while a PDDoc is being saved.
+ @param obj IN/OUT The CosObj found.
+ @param fileOffset IN/OUT The offset of <code>obj</code> into the PDF file.
+
+ @param length IN/OUT The length of <code>obj</code>.
+ @param clientData IN/OUT A pointer to user-supplied data passed
+ in the <code>offsetProcClientData</code> parameter of the PDDocSaveParams
+ structure.
+ @see PDDocSaveWithParams
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *CosObjOffsetProc)(
+ CosObj obj, ASFilePos fileOffset, ASArraySize length, void *clientData);
+
+typedef ACCBPROTO1 void (ACCBPROTO2 *CosObjOffsetProc64)(
+ CosObj obj, ASFilePos64 fileOffset, ASUns64 length, void *clientData);
+
+/**
+ A callback in PDDocPreSaveInfo(), which is used by the PDDocPreSaveProc()
+ callback. Use this callback to set a flag in each CosObj
+ that you care about, so that your callback will be called back during
+ the PDDoc's save and will be given the Cos object's offset and length.
+ After a PDF file is saved, the Cos objects previously obtained
+ are no longer valid.
+ @param obj IN/OUT The CosObj marked.
+ @param set IN/OUT <code>true</code> to set the flag to be called back during
+ the save, <code>false</code> otherwise.
+ @see PDDocSaveWithParams
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *CosObjSetCallbackFlagProc)(
+ CosObj obj, ASBool set);
+
+/** A prototype for the string encryption/decryption callback. This is part of the Crypt Filter mechanism. */
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *CosCryptStringProc)(CosDoc dP, ASAtom filterName, char *dest, char *src,
+ ASInt32 dstSize, ASInt32 srcLength, ASUns32 genNumber, ASUns32 objNumber);
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_CosExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenE.h
new file mode 100644
index 0000000..1e74048
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenE.h
@@ -0,0 +1,19 @@
+/* CosGenE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "CosGenEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenEASF.h
new file mode 100644
index 0000000..10fea82
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosGenEASF.h
@@ -0,0 +1,132 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(cosErrNoError, "No error")
+
+DefineErr(cosErrReadError, "Read error.")
+
+DefineErr(cosErrWriteError, "Write error.")
+
+DefineErr(cosErrBadSyntax, "Syntax error.")
+
+DefineErr(cosErrNeedRebuild, "The file needs to be repaired.")
+
+DefineErr(cosErrRebuildFailed, "The file is damaged and could not be repaired.")
+
+DefineErr(cosErrCantOpenTempFile, "A temporary file could not be opened.")
+
+DefineErr(cosErrTempFileFull, "The temporary file is full or nearly full. Close or save any modified documents.")
+
+DefineErr(cosErrStreamTooShort, "Stream source is shorter than specified length.")
+
+DefineErr(cosErrBadFilterName, "A stream specifies an unknown filter.")
+
+DefineErr(cosErrListOverflow, "Operation or data is too complex.")
+
+DefineErr(cosErrDocTableFull, "Cos document table full.")
+
+DefineErr(cosErrInt16OutOfRange, "A number is out of range.")
+
+DefineErr(cosErrExpectedNull, "Expected a null object.")
+
+DefineErr(cosErrExpectedDict, "Expected a dict object.")
+
+DefineErr(cosErrExpectedArray, "Expected an array object.")
+
+DefineErr(cosErrExpectedNumber, "Expected a number object.")
+
+DefineErr(cosErrExpectedBoolean, "Expected a boolean object.")
+
+DefineErr(cosErrExpectedName, "Expected a name object.")
+
+DefineErr(cosErrExpectedString, "Expected a string object.")
+
+DefineErr(cosErrExpectedStream, "Expected a stream object.")
+
+DefineErr(cosErrInvalidAssignment, "This direct object already has a container.")
+
+DefineErr(cosErrAfterSave, "Implementation failure: this document is now invalid.")
+
+DefineErr(cosErrInvalidObj, "Desired operation cannot be performed on this object.")
+
+DefineErr(cosErrArrayBounds, "Array out-of-bounds error.")
+
+DefineErr(cosErrDictKeyNotName, "Dict key must be a name object.")
+
+DefineErr(cosErrNeedFullSave, "This file must be saved with a full save.")
+
+DefineErr(cosErrEncryptionErr, "Error in encryption filter.")
+
+DefineErr(cosErrDCTError, "Error in JPEG data filter.")
+
+DefineErr(cosErrCCFError, "Error in CCITT fax data filter.")
+
+DefineErr(cosErrLZWError, "Error in LZW data filter.")
+
+DefineErr(cosErrFlateError, "Error in Flate data filter.")
+
+DefineErr(cosErrExpectedDirect, "Expected a direct object.")
+
+DefineErr(cosErrBadIndex, "Bad master index.")
+
+DefineErr(cosErrOldLinFormat, "Obsolete format: treating file as non-linearized")
+
+DefineErr(cosErrTempTooShort, "Temp file unexpectedly short.")
+
+DefineErr(cosErrCancelSave, "The Save operation was cancelled.")
+
+DefineErr(cosErrEncryptionNotSupported, "Encryption and decryption are not supported.")
+
+DefineErr(cosErrNoEncryptionKeySupplied, "Encryption key is not supplied for a stream.")
+
+DefineErr(cosErrDuplicateFilterName, "A filter with the same name is already registered.")
+
+DefineErr(cosErrNoDecodeFilter, "Attempted to decode without associated filter.")
+
+DefineErr(cosErrNoEncodeFilter, "Attempted to encode without associated filter.")
+
+DefineErr(cosErrCryptAuthFailed, "Decryption authorization failed during data access.")
+
+DefineErr(cosErrExpectedObjectStream, "Expected an object stream.")
+
+DefineErr(cosErrExpectedIndirect, "Expected an indirect object.")
+
+DefineErr(cosErrExpectedProc, "Expected a procedure.")
+
+DefineErr(cosErrExpectedCollection, "Expected an object collection.")
+
+DefineErr(cosErrNotCompressed, "Expected a compressed object.")
+
+DefineErr(cosErrCompressed, "Expected an object that was not compressed.")
+
+DefineErr(cosMsgCopyngFile, "Copying file")
+
+DefineErr(cosMsgLinSave, "Saving for Fast Web Viewing")
+
+DefineErr(cosMsgIncrSave, "Updating file")
+
+DefineErr(cosMsgSavingFile, "Saving file")
+
+DefineErr(cosErrBadRefcount, "An acquired object was already released.")
+
+DefineErr(cosErrObjFreed, "An object has been replaced or destroyed.")
+
+DefineErr(cosErrMemMgrError, "Internal error in the memory manager.")
+
+DefineErr(cosErrNeedXrefStm, "This file requires a cross-reference stream (PDF 1.5)")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosProcs.h
new file mode 100644
index 0000000..e1d2593
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosProcs.h
@@ -0,0 +1,2408 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ CosProcs.h
+
+ - Catalog of functions exported by Cos.
+
+*********************************************************************/
+
+/**
+ Tests whether two Cos objects are equal. Cos objects are
+ equal when all of the following conditions are true:
+ <ul>
+ <li> They are either both direct or both indirect. </li>
+ <li> They have the same type. </li>
+ <li> If they are indirect, they have the same generation number. </li>
+ <li> If they are scalars, they have the same value. (Two <code>NULL</code>
+ objects are equal.) </li>
+ <li> If they are non-scalar, they reference the same value. </li>
+ </ul>
+
+ <p>The last condition implies that the comparison is <i>shallow</i>.
+ For example: </p>
+
+ <p><code>CosObj a, b, c; a = CosNewString (doc, "XYZ"); b = CosNewString(doc, "XYZ"); c = b; </code></p>
+
+ <p>In this case, <code>CosObjEqual(a,b)</code> is <code>false</code>, but <code>CosObjEqual(b,c)</code>
+ is <code>true</code>. </p>
+ @param obj1 An object to compare with <code>obj2</code>.
+ @param obj2 An object to compare with <code>obj1</code>.
+ @return <code>true</code> if <code>obj1</code> and <code>obj2</code> are equal, <code>false</code> otherwise.
+ @see CosObjCmp
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASBool, CosObjEqual, (CosObj obj1, CosObj obj2))
+
+/**
+ Gets an object's type.
+ @param obj The object whose type is obtained.
+ @return The object's type.
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosType, CosObjGetType, (CosObj obj))
+
+/**
+ Tests whether an object is indirect.
+ @param obj The object to test.
+ @return <code>true</code> if <code>obj</code> is indirect, <code>false</code> if <code>obj</code> is direct.
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(ASBool, CosObjIsIndirect, (CosObj obj))
+
+/**
+ Enumerates the elements of a Cos object by calling a user-supplied
+ procedure for each component of the object.
+ @param obj The object whose elements are enumerated.
+ <ul>
+ <li> For scalars or strings, the <code>proc</code> is not called, and CosObjEnum()
+ returns <code>true</code>.</li>
+ <li> For dictionaries, <code>proc</code> is called for each key-value pair. The order in
+ which the key-value pairs are enumerated is undefined.</li>
+ <li> For arrays, <code>proc</code> is called with each element as the first paramater to <code>proc</code>,
+ and the <code>NULL</code> object as the second parameter. Array elements
+ are enumerated in ascending order of index.</li>
+ <li> For streams, <code>proc</code> is called once,
+ with the stream's dictionary as the first parameter to the
+ <code>proc</code> and the <code>NULL</code> object as the second parameter.</li>
+ </ul>
+ @param proc A user-supplied callback to call for each element
+ of <code>obj</code>.
+ Neither <code>proc</code> nor any routine called by <code>proc</code> may modify
+ <code>obj</code>. Doing so can produce undefined results or errors. For
+ example, if <code>obj</code> is an array, <code>proc</code> must not call CosArrayRemove();
+ if <code>obj</code> is a dictionary, <code>proc</code> must not call CosDictPut().
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @return Returns <code>true</code> if every call to <code>proc</code> returned <code>true</code>.
+ As soon as any call to <code>proc</code> returns <code>false</code>, the enumeration stops
+ and CosObjEnum() returns <code>false</code>.
+ @see CosArrayGet
+ @see CosDictGet
+ @see CosDocEnumEOFs
+ @see CosDocEnumIndirect
+ @ingroup Enumerators
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASBool, CosObjEnum, (CosObj obj, CosObjEnumProc proc, void *clientData))
+
+/**
+ Gets the CosDoc containing the specified object. This is
+ defined only for indirect or non-scalar objects.
+ @param obj The object whose CosDoc is obtained.
+ @return The object's CosDoc.
+ @exception cosErrInvalidObj is raised if the object is a direct scalar
+ object.
+ @see PDDocGetCosDoc
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosDoc, CosObjGetDoc, (CosObj obj))
+
+/**
+ <p>Returns a direct object of type CosNull. This <code>NULL</code> object
+ is said to be invalid. You can compare an object to <code>NULL</code>
+ using either of the following methods (the second is more
+ efficient):</p>
+
+ <p><code>CosObjEqual(obj, CosNewNull()); </code></p>
+ <p><code>CosObjGetType(obj) == CosNull; </code></p>
+
+ <p>In general, use CosNewNull() only to initialize a local variable
+ or pass a parameter. <code>NULL</code> objects may be stored as array
+ elements, but not as dictionary values. The following statements
+ are equivalent: </p>
+
+ <p><code>CosDictPut(dict, key, CosNewNull()); </code></p>
+ <p><code>CosDictRemove(dict, key); </code></p>
+
+ @return A <code>NULL</code> Cos object.
+ @see CosObjGetType
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewNull, (void))
+
+/**
+ Creates a new 32-bit integer object associated with the specified
+ document and having the specified value.
+ @param dP IN The document in which the integer is used.
+ @param indirect IN If <code>true</code>, it creates the integer object as
+ an indirect object, and sets the document <code>dP</code> object's <code>PDDocNeedsSave</code>
+ flag (see PDDocFlags). If <code>false</code>, it creates the integer as
+ a direct object.
+ @param value IN The value, represented as a 32-bit integer.
+ @return An object of type CosInteger.
+ @see CosIntegerValue
+ @see CosNewFixed
+ @see CosNewFloat
+ @see CosObjDestroy
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewInteger, (CosDoc dP, ASBool indirect, ASInt32 value))
+
+/**
+ Creates a new real-number object from a fixed-point number
+ associated with the specified document.
+ @param dP The document in which the number is used.
+
+ @param indirect If <code>true</code>, it creates the real-number object
+ as an indirect object, and sets the document (<code>dP</code>) object's <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocFlags</code>). If <code>false</code>, it creates the number
+ as a direct object.
+ @param value The real number, represented as a fixed-point number.
+ @return A Cos object of type <code>CosReal</code> (<code>CosFixed</code>).
+ @see CosFixedValue
+ @see CosNewInteger
+ @see CosNewFloat
+ @see CosObjDestroy
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewFixed, (CosDoc dP, ASBool indirect, ASFixed value))
+
+/**
+ Creates a new boolean object associated with the specified
+ document and having the specified value.
+ @param dP IN The document in which the boolean is used.
+ @param indirect IN If <code>true</code>, it creates the boolean object as
+ an indirect object, and sets the document (<code>dP</code>) object's <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocFlags</code>). If <code>false</code>, it creates the boolean object as
+ a direct object.
+ @param value IN The value the new boolean object will have.
+ @return A Cos boolean object.
+ @see CosBooleanValue
+ @see CosObjDestroy
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewBoolean, (CosDoc dP, ASBool indirect, ASBool value))
+
+
+/**
+ Creates a new name object associated with the specified
+ document and having the specified value.
+ @param dP The document in which the new name is used.
+ @param indirect If <code>true</code>, it creates the name as an indirect
+ object, and sets the document's <code>PDDocNeedsSave</code> flag (see
+ <code>PDDocFlags</code>) flag. If <code>false</code>, it creates the name as a direct
+ object.
+ @param name The <code>ASAtom</code> corresponding to the name to create.
+ A C string can be converted to an <code>ASAtom</code> using <code>ASAtomFromString()</code>.
+ Note that a name object can be created directly from a C string,
+ without creating an <code>ASAtom</code>, by using <code>CosNewNameFromString()</code>.
+ @return The newly created name Cos object.
+ @see CosNameValue
+ @see CosNewNameFromString
+ @see CosCopyNameStringValue
+ @see CosObjDestroy
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewName, (CosDoc dP, ASBool indirect, ASAtom name))
+
+
+/**
+ Creates and returns a new Cos string object.
+ @param dP The document in which the string is used.
+ @param indirect If <code>true</code>, it creates the string as an indirect
+ object, and sets the document (<code>dP</code>) object's <code>PDDocNeedsSave</code> flag (see
+ <code>PDDocFlags</code>). If <code>false</code>, it creates the string as a direct object.
+
+ @param str The value that the new string will have. It
+ is not a C string, since Cos strings can contain <code>NULL</code> characters.
+ The data in <code>str</code> is copied; that is, if <code>str</code> was dynamically
+ allocated, it can be freed after this call.
+ @param nBytes The length of <code>str</code>.
+ @return The newly created string Cos object.
+ @see CosStringValue
+ @see CosObjDestroy
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewString, (CosDoc dP, ASBool indirect, char *str, ASTArraySize nBytes))
+
+
+/**
+ Creates and returns a new array Cos object.
+ @param dP The document in which the array is used.
+ @param indirect If <code>true</code>, it creates the array as an indirect
+ Cos object, and sets the document's <code>PDDocNeedsSave</code> flag
+ (see <code>PDDocSetFlags</code>). If <code>false</code>, it creates the array as a direct
+ object.
+ @param nElements The number of elements that will be in
+ the array. <code>nElements</code> is only a hint; Cos arrays grow dynamically
+ as needed.
+ @return The newly created array Cos object.
+ @see CosObjDestroy
+ @see CosArrayGet
+ @see CosArrayInsert
+ @see CosArrayLength
+ @see CosArrayPut
+ @see CosArrayRemove
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewArray, (CosDoc dP, ASBool indirect, ASTArraySize nElements))
+
+
+/**
+ <p>Creates a new dictionary. </p>
+
+ <p>See the <i>PDF Reference</i> for information on dictionary objects
+ that are in standard PDF files, such as annotations or page
+ objects. </p>
+ @param dP The document in which the dictionary is used.
+
+ @param indirect If <code>true</code>, it creates the dictionary as an
+ indirect Cos object, and sets the <code>dP</code> object's <code>PDDocNeedsSave</code> flag (see
+ <code>PDDocFlags</code>). If <code>false</code>, it creates the dictionary as a direct
+ object.
+ @param nEntries The number of entries in the dictionary. This
+ value is only a hint; Cos dictionaries grow dynamically as
+ needed.
+ @return The newly created dictionary Cos object.
+ @see CosDictGet
+ @see CosDictKnown
+ @see CosDictPut
+ @see CosDictRemove
+ @see CosObjDestroy
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewDict, (CosDoc dP, ASBool indirect, ASTArraySize nEntries))
+
+
+/**
+ <p>Creates a new Cos stream, using data from an existing <code>ASStm</code>.
+ The data is copied, so the source stream may be closed after
+ CosNewStream returns.</p>
+
+ <p>This method creates a Cos stream object by writing its PDF
+ representation to an intermediate file, in the format specified
+ in the <i>PDF Reference</i>:</p>
+
+ <code>
+ <p>&lt;&lt;/Length ... /Filter ... /DecodeParms ...&gt;&gt;</p>
+ <p>stream</p>
+ <p>... data, possibly encoded ...</p>
+ <p>endstream</p>
+ </code>
+
+ <p>This occurs in four steps: </p>
+
+ <p><b>Step 1: Writing the attribute dictionary </b></p>
+
+ <p>If <code>attributesDict</code> is a valid Cos dictionary, the method
+ writes that dictionary to the intermediate file. Otherwise,
+ it creates a new direct dictionary, determining a <code>Length</code>
+ key according to the <code>sourceLength</code> value:</p>
+ <ul>
+ <li> If <code>sourceLength</code> is negative, or if the source data is to
+ be encoded (see below), the value of the <code>Length</code> key is a reference to a
+ new indirect object, whose value will be set in <b>Step 4</b>. </li>
+ <li> Otherwise, <code>Length</code> is a direct scalar representing <code>sourceLength</code>. </li>
+ </ul>
+
+ <p>The dictionary that is written becomes the new stream's
+ attribute dictionary. </p>
+
+ <p><b>Step 2: Reading the data </b></p>
+
+ <p><code>sourceStart</code> determines where in the source stream to begin
+ reading, and whether the source is seekable.</p>
+
+ <ul>
+ <li> If <code>sourceStart</code> is a negative number, the source is assumed to be non-seekable
+ but positioned at the point where reading should start. </li>
+ <li> Otherwise, the source is assumed to be seekable, and reading
+ starts at the position indicated by <code>sourceStart</code>. If <code>sourceStart</code>
+ is zero, data is read from the beginning of the source stream.
+ Positive values for <code>sourceStart</code> may be used, for instance,
+ to skip over initial data in the stream. </li>
+ </ul>
+
+ <p><b>Step 3: Encoding the data </b></p>
+
+ <p>If <code>attributesDict</code> is a valid Cos dictionary,
+ it contains a <code>Filter</code> key, and <code>encodeTheSourceData</code> is <code>true</code>,
+ the method encodes the data after reading it from the source
+ stream and before writing it to the intermediate file. </p>
+
+ <p>The <code>attributesDict</code> is used as the new stream's dictionary.
+ The <code>Filter</code> entry in this dictionary indicates how the data
+ in the resulting Cos stream object will be subsequently
+ decoded; the value may be the name of a decoding filter
+ or an array of such names. Specify multiple filters in the
+ order they should be applied to decode the data (if parameters
+ are needed to decode the data, they are specified as the
+ value of the <code>DecodeParms</code> key in <code>attributesDict</code>. See the
+ <i>PDF Reference</i> for details). For each decoding filter, there
+ is a corresponding encoding filter, which the method applies
+ to the source data during this step. </p>
+
+ <p>If parameters are needed to encode the data, they must be
+ specified in the call by <code>encodeParms</code> (the encoding
+ parameters are often different from the decoding parameters).
+ The <code>encodeParms</code> parameter is optional for all encoding filters
+ except <code>DCTDecode</code> and <code>JBIG2Decode</code>. See the <code>encodeParms</code> field
+ of <code>PDEFilterSpec</code>. </p>
+
+ <p>If an array of filters is supplied, and at least one of
+ them requires encoding parameters, then a corresponding
+ array of encoding parameters is also required. Use the <code>NULL</code>
+ object to represent default parameters for filters that
+ have defaults.</p>
+
+ <p>In any other case, the method copies the
+ source data directly into the Cos stream with no encoding.
+ If <code>sourceLength</code> is negative, it reads bytes until the source
+ reaches its EOF. Otherwise, <code>sourceLength</code> indicates how many
+ bytes to read from the source, and an exception is raised
+ if the source reaches EOF before that. </p>
+
+ <p><b>Step 4: Writing the data</b></p>
+
+ <p>After the data is written, if the value of the <code>Length</code> key
+ in the attributes dictionary was an indirect reference (either
+ because it was supplied that way in <code>attributesDict</code>, or because
+ it was created that way in <b>Step 1</b>, the value of that indirect
+ object is set to the number of bytes actually written (that
+ is, the encoded length if the data was encoded). An indirect
+ <code>Length</code> key is useful for one-pass writing, when the size
+ of the written data is not known in advance, either because
+ the data was to be encoded, or because there was no way
+ to know how much data there would be before the source reached
+ its EOF. </p>
+
+ <p>An exception is raised if <code>attributesDict</code> is neither the <code>NULL</code>
+ object nor a direct Cos dictionary, <code>sourceStart</code> is nonnegative but the
+ source is not seekable, or if <code>sourceLength</code> is nonnegative but the
+ source stream reaches EOF before that many bytes have been read. </p>
+
+ @param dP The Cos document in which the newly created
+ stream will be used.
+ @param indirect Must always be <code>true</code>, specifying that the
+ Cos stream is created as an indirect object (all streams
+ are indirect). This also sets the document's <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocFlags</code>).
+ @param stm The source stream containing the data to copy
+ into the new stream. The caller is responsible for closing
+ <code>stm</code> after <code>CosNewStream()</code> returns. The source stream can be
+ any readable <code>ASStm</code>. Typical sources are:
+ <ul>
+ <li> Files (<code>ASFileStmRdOpen()</code>) or memory (<code>ASMemStmRdOpen()</code>). These streams are always
+ seekable.</li>
+ <li> Arbitrary procedures (<code>ASProcStmRdOpen()</code> or
+ <code>ASProcStmRdOpenEx()</code>), or other Cos streams (<code>CosStreamOpenStm()</code>).
+ These streams are always non-seekable.</li>
+ </ul>
+ @param sourceStart The byte offset into <code>stm</code> from which
+ data reading starts for a seekable stream. If the value
+ is negative, it specifies that the stream is not seekable.
+
+ @param encodeTheSourceData Determines whether the data in <code>stm</code> should
+ be encoded using filters specified in <code>attributesDict</code> before
+ it is written to the Cos stream. See the description of
+ the encoding step above. If <code>attributesDict</code> is a <code>NULL</code> object
+ or if the dictionary has no <code>Filter</code> key, this value is ignored.
+
+ @param attributesDict Either the <code>NULL</code> Cos object, or a
+ direct Cos dictionary containing stream attributes, such
+ as the length of the Cos stream data and a list of decoding
+ filters and parameters to apply to the data, as defined
+ in Section 3.2.7 in the <i>PDF Reference</i>. See the encoding
+ step in the description above.
+ @param encodeParms The parameters to be used by the filters
+ if the source data is encoded before it is written to the
+ file. The parameters follow the structure for the value
+ of the <code>DecodeParms</code> stream attribute described in Table 3.4
+ in the <i>PDF Reference</i>. See the encoding step in the description
+ above. If no encoding parameters are needed, this value
+ is ignored.
+ @param sourceLength The amount of data to be read from
+ the source. If negative (typically <code>-1</code>), data is read from
+ the source until it reaches its EOF. See <b>Step 1</b> in the description
+ above.
+ @return The newly created stream Cos object.
+ @see CosObjDestroy
+ @see CosNewStream64
+
+ @note CosNewStream() sets the document <code>PDDocNeedsSave</code> flag
+ (see PDDocFlags).
+
+ @note You cannot call <code>CosStreamPos()</code> on a stream created with
+ <code>CosNewStream()</code> until the file has been saved.
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosNewStream, (CosDoc dP, ASBool indirect, ASStm stm, CosStreamStartAndCode sourceStart, ASBool encodeTheSourceData, CosObj attributesDict, CosObj encodeParms, CosByteMax sourceLength))
+
+/**
+ Destroys a Cos object. This method does nothing if <code>obj</code> is
+ a direct scalar object, such as the <code>NULL</code> object.
+
+ <p>If a composite object (an array, dictionary or stream) is destroyed: </p>
+ <ul>
+ <li>All the direct objects in it are automatically destroyed. </li>
+ <li>The indirect objects in it are not destroyed. </li>
+ </ul>
+ @param obj The object to destroy.
+ @see CosNewArray
+ @see CosNewBoolean
+ @see CosNewDict
+ @see CosNewFixed
+ @see CosNewInteger
+ @see CosNewName
+ @see CosNewStream
+ @see CosNewString
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosObjDestroy, (CosObj obj))
+
+/**
+ Gets the 32-bit integer value of a specified number object.
+ @param obj The object whose integer value is obtained.
+ It must have type <code>CosInteger</code> or <code>CosReal</code> (<code>CosFixed</code>). If it is <code>CosReal</code>,
+ its value is rounded to the nearest integer. The result
+ is undefined if the real value is outside the range of <code>ASInt32</code>
+ numbers.
+ <p>An exception is raised if the given object has the wrong Cos type. </p>
+ @return The 32-bit integer value of <code>obj</code>.
+ @see CosNewInteger
+ @see CosNewFixed
+ @see CosNewFloat
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, CosIntegerValue, (CosObj obj))
+
+/**
+ Gets the value of <code>obj</code> as a fixed-point real number.
+ @param obj The object whose value is obtained. It must
+ have type <code>CosInteger</code> or <code>CosReal</code> (<code>CosFixed</code>). The result is undefined
+ if the real value is outside the range of <code>ASFixed</code> numbers.
+
+ <p>An exception is raised if the given object has the wrong Cos type. </p>
+
+ @return The numeric value of <code>obj</code>, represented as a fixed-point number.
+ @see CosIntegerValue
+ @see CosNewFixed
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASFixed, CosFixedValue, (CosObj obj))
+
+/**
+ Gets the value of the specified boolean object.
+ <p>An exception is raised if <code>obj</code> has the wrong Cos type. </p>
+
+ @param obj The boolean Cos object whose value is obtained.
+ @return The value of <code>obj</code>.
+ @see CosNewBoolean
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASBool, CosBooleanValue, (CosObj obj))
+
+
+/**
+ Gets the value of a name object.
+ @param obj The object of type <code>CosName</code> whose value is obtained.
+ @return The <code>ASAtom</code> corresponding to the specified name object. An <code>ASAtom</code>
+ can be converted to a string using <code>ASAtomGetString()</code>.
+ Note that <code>CosCopyNameStringValue()</code> can be used to obtain the name as a
+ string, without creating an <code>ASAtom</code> (<code>ASAtom</code> objects consume global memory
+ that is not deallocated).
+ <p>An exception is raised if <code>obj</code> has the wrong type, if storage
+ is exhausted, or if file access fails. </p>
+ @see CosNewName
+ @see CosNewNameFromString
+ @see CosCopyNameStringValue
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, CosNameValue, (CosObj obj))
+
+/**
+ Gets the value of a string Cos object, and the string's length.
+
+ <p>An exception is raised if the type of <code>obj</code> is not a <code>CosString</code>. </p>
+
+ @note The pointer returned from this method is not guaranteed
+ to remain valid if <code>CosStringValue()</code> is called again. It is
+ recommended that you use <code>CosStringValueSafe()</code> or <code>CosCopyStringValue()</code>
+ instead; these methods place the string into a user-allocated
+ buffer.
+ @param obj IN The object whose value is obtained.
+ @param nBytes OUT (Filled by the method) The length of the
+ string, in bytes. It must be a non-<code>NULL</code> pointer.
+ @return The value of <code>obj</code>.
+
+ @see CosNewString
+ @see CosCopyStringValue
+
+ @note The caller must immediately copy the returned string.
+ The memory pointed to be the return value may become invalid
+ if any memory-allocating calls are made. In particular,
+ consider the sequence:
+
+ <code>
+ <p>str1 = CosStringValue(...); </p>
+ <p>str2 = CosStringValue(...); </p>
+ </code>
+
+ <p>In this case, the contents of <code>str1</code>
+ may be invalid by the time the second CosStringValue() call
+ returns. </p>
+
+ @note The returned value is not a C-style string. Cos string
+ objects can contain <code>NULL</code> bytes. Standard C string-handling
+ functions may not work as expected.
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(char *, CosStringValue, (CosObj obj, ASTCount *nBytes))
+
+
+/**
+ Gets the value of the specified key in the specified dictionary.
+ If it is called with a stream object instead of a dictionary object,
+ this method gets the value of the specified key from the
+ stream's attributes dictionary.
+
+ @param dict The dictionary or stream from which a value
+ is obtained.
+ @param key The key whose value is obtained, repesented as an ASAtom.
+ See the <i>PDF Reference</i> to obtain the names of keys in dictionary objects
+ that are part of standard PDF, such as annotations or page
+ objects (for example, <code>CosDictGet(dict, ASAtomFromString("Length"))</code> ).
+
+ <p>Note that strings can be used directly as keys, by calling
+ <code>CosDictGetKeyString()</code> (for example, <code>CosDictGetKeyString(dict, "Length") </code>).
+ This method is preferred, because it avoids the creation of new ASAtom objects.</p>
+
+ <p><b>Key Names:</b> Even though key names in a PDF file are written with
+ a leading slash (e.g., <code>&lt;&lt;/Length 42&gt;&gt;</code>), the slash is omitted
+ when creating an <code>ASAtom</code> to be used as a key, or when using the
+ string directly as a key, as in the examples above.</p>
+
+ <p>Cos name objects can also be used as keys, by calling <code>CosDictGetKey()</code>.
+ This method will also avoid the creation of new <code>ASAtom</code> objects and is often
+ more convenient than using <code>ASAtom</code> objects or strings.</p>
+
+ @return The object associated with the specified key. If <code>key</code> is
+ not present or if its value is <code>NULL</code> (which is equivalent), it returns
+ a <code>NULL</code> Cos object (a Cos object of type <code>CosNull</code>.)
+ @see CosDictGetKey
+ @see CosDictGetKeyString
+ @see CosDictPut
+ @see CosDictPutKey
+ @see CosDictPutKeyString
+ @see CosDictKnown
+ @see CosDictKnownKey
+ @see CosDictKnownKeyString
+ @see CosStreamDict
+
+ @note Use CosObjEnum() to list all key-value pairs in a dictionary.
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosDictGet, (CosObj dict, ASAtom key))
+
+/**
+ <p>Sets the value of a dictionary key, adding the key to the
+ dictionary if it is not already present. Sets the <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocSetFlags</code>) of the <code>dict</code> object's <code>CosDoc</code> if <code>dict</code> is indirect
+ or is a direct object with an indirect composite object
+ at the root of its container chain. </p>
+
+ <p>This method can also be used with a stream object. In that
+ case, the key-value pair is added to the stream's attributes
+ dictionary. </p>
+
+ <p>It is not safe to call <code>CosDictPut()</code> during a call to <code>CosObjEnum()</code>
+ on that same dictionary (for example, from within the callback procedure).</p>
+
+ <p>An exception is raised if <code>val</code> is a direct non-scalar object
+ that is already contained in another dictionary, array, or stream,
+ or if <code>dict</code> and <code>val</code> belong to different documents.</p>
+
+ @param dict The dictionary or stream in which a value
+ is set.
+ @param key The key whose value is set, represented as an <code>ASAtom</code>.
+ See the <i>PDF Reference</i> to obtain the names of keys in dictionary objects that are
+ part of standard PDF, such as annotations or page objects (see <code>CosDictGet()</code> for <b>Key Names</b>).
+
+ <p>Note that strings can be used directly as keys, by calling
+ <code>CosDictPutKeyString()</code> (for example, <code>CosDictPutKeyString(dict, "Length", lenObj) </code>).
+ This method is preferred, because it avoids the creation of new <code>ASAtom</code> objects.</p>
+
+ <p>Cos name objects can also be used as keys, by calling <code>CosDictPutKey()</code>.
+ This method will also avoid the creation of new <code>ASAtom</code> objects and is often
+ more convenient than using ASAtom objects or strings.</p>
+
+ @param val The value to set.
+
+ @see CosDictGet
+ @see CosDictGetKey
+ @see CosDictGetKeyString
+ @see CosDictPutKey
+ @see CosDictPutKeyString
+ @see CosDictKnown
+ @see CosDictKnownKey
+ @see CosDictKnownKeyString
+ @see CosStreamDict
+
+ @note A dictionary entry whose value is <code>NULL</code> is equivalent
+ to an absent entry; using <code>CosDictPut()</code> to put a <code>NULL</code> value
+ in a dictionary has the same effect as calling <code>CosDictRemove()</code>
+ to remove it from the dictionary.
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosDictPut, (CosObj dict, ASAtom key, CosObj val))
+
+/**
+ <p>Removes a key-value pair from a dictionary. Sets the <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocSetFlags</code>) of the <code>dict</code> object's <code>CosDoc</code> if the dictionary
+ is indirect or has an indirect composite object at the root
+ of its container chain.</p>
+
+ <p>If it is called with a stream object instead of a dictionary object,
+ this method removes the value of the specified key from the
+ stream's attributes dictionary. </p>
+
+ <p>It is not safe to call <code>CosDictRemove()</code> during a call to <code>CosObjEnum()</code>
+ on that same dictionary (for example, from within the callback procedure).</p>
+
+ <p>If the key is not present in the dictionary, <code>CosDictRemove()</code> has no effect.</p>
+
+ @param dict The dictionary from which the key-value pair is removed.
+ @param key The key to remove, represented as an ASAtom.
+ See the <i>PDF Reference</i> to obtain the names of keys in dictionary objects that are
+ part of standard PDF, such as annotations or page objects (see <code>CosDictGet()</code> for <b>Key Names</b>).
+
+ <p>Note that strings can be used directly as keys, by calling
+ CosDictRemoveString() (for example, <code>CosDictRemoveString(dict, "Length") </code>).
+ This method is preferred, because it avoids the creation of new <code>ASAtom</code> objects.</p>
+
+ <p>Cos name objects can also be used as keys, by calling <code>CosDictRemoveKey()</code>.
+ This method will also avoid the creation of new <code>ASAtom</code> objects and is often
+ more convenient than using <code>ASAtom</code> objects or strings.</p>
+
+ @see CosDictGet
+ @see CosDictGetKey
+ @see CosDictGetKeyString
+ @see CosDictPut
+ @see CosDictPutKey
+ @see CosDictPutKeyString
+ @see CosDictKnown
+ @see CosDictKnownKey
+ @see CosDictKnownKeyString
+ @see CosDictRemoveKey
+ @see CosDictRemoveKeyString
+ @see CosStreamDict
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosDictRemove, (CosObj dict, ASAtom key))
+
+/**
+ <p>Tests whether a specific key is found in the specified dictionary.
+ Calling this method is equivalent to checking if the value
+ returned from <code>CosDictGet()</code> is a <code>NULL</code> Cos object. </p>
+
+ <p>If it is called with a stream object instead of a dictionary object,
+ this method tests whether the specified key is found in the
+ stream's attributes dictionary. </p>
+
+ @param dict The dictionary or stream in which to look for <code>key</code>.
+ @param key The key to find. See the <i>PDF Reference</i> to obtain
+ the names of keys in dictionary objects that are part of
+ standard PDF, such as annotations or page objects (see <code>CosDictGet()</code> for <b>Key Names</b>).
+
+ <p>Note that strings can be used directly as keys, by calling
+ <code>CosDictKnownKeyString()</code> (for example, <code>CosDictKnownKeyString(dict, "Length") </code>).
+ This method is preferred, because it avoids the creation of new <code>ASAtom</code> objects.</p>
+
+ <p>Cos name objects can also be used as keys, by calling <code>CosDictKnownKey()</code>.
+ This method will also avoid the creation of new <code>ASAtom</code> objects and is often
+ more convenient than using <code>ASAtom</code> objects or strings.</p>
+
+ @return <code>true</code> if the value of a key is known (exists and is not <code>NULL</code>)
+ in <code>dict</code>, <code>false</code> otherwise.
+ @see CosDictGet
+ @see CosDictGetKey
+ @see CosDictGetKeyString
+ @see CosDictPut
+ @see CosDictPutKey
+ @see CosDictPutKeyString
+ @see CosDictKnownKey
+ @see CosDictKnownKeyString
+ @see CosStreamDict
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASBool, CosDictKnown, (CosObj dict, ASAtom key))
+
+/**
+ Gets the specified element from an array.
+ @param array The array from which an element is obtained.
+
+ @param index The array element to obtain. The first element
+ in an array has an index of zero.
+ @return The Cos object occupying the <code>index</code> element of <code>array</code>. It returns
+ a <code>NULL</code> Cos object if <code>index</code> is outside the array bounds.
+
+ @see CosArrayLength
+ @see CosArrayPut
+ @see CosArrayInsert
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosArrayGet, (CosObj array, ASTArraySize index))
+
+
+/**
+ <p>Puts the specified object into the specified location in
+ an array. The array is extended as much as necessary and
+ <code>NULL</code> objects are stored in empty slots. It sets the <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocSetFlags</code>) flag of the <code>array</code> object's CosDoc if <code>array</code>
+ is indirect or is a direct object with an indirect composite
+ object at the root of its container chain.</p>
+
+ <p>It is not safe to call <code>CosArrayPut()</code> during a call to <code>CosObjEnum()</code>
+ on that same array (for example, from within the callback procedure), if
+ doing so would extend the length of the array.</p>
+
+ <p>An exception is raised if the object to insert is a direct object
+ that is already contained in another object, or if the object to insert belongs to another document. </p>
+
+ @param array The array in which <code>obj</code> is stored.
+ @param index The location in <code>array</code> to store <code>obj</code>. The first
+ element of an array has an index of zero.
+ @param obj The Cos object to insert into <code>array</code>.
+
+ @see CosArrayLength
+ @see CosArrayGet
+ @see CosArrayInsert
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosArrayPut, (CosObj array, ASTArraySize index, CosObj obj))
+
+/**
+ <p>Inserts an object into an array. </p>
+
+ <p>An exception is raised if the object to insert is a direct object
+ that is already contained in another object, or if the object to insert belongs to another document. </p>
+
+ @param array The array into which the object is inserted.
+
+ @param pos The location in the array to insert the object.
+ The object is inserted before the specified location. The
+ first element in an array has a pos of zero. If <code>pos >= CosArrayLength(array)</code>,
+ <code>obj</code> is added at the end of the array. The length of the
+ array always increases by <code>1</code>.
+
+ <p>It is not safe to call <code>CosArrayInsert()</code> during a call to <code>CosObjEnum()</code>
+ on that same array (for example, from within the callback procedure).</p>
+
+ @param obj The object to insert.
+
+ @see CosArrayLength
+ @see CosArrayRemove
+ @see CosArrayGet
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosArrayInsert, (CosObj array, ASTArraySize pos, CosObj obj))
+
+/**
+ <p>Finds the first element, if any, equal to the specified
+ object and removes it from the array. <code>CosObjEqual()</code> is used
+ to determine whether an array element is equal to the specified
+ object. </p>
+
+ <p>The array is compressed after removing the element. The
+ compression is accomplished by moving each element following
+ the deleted element to the slot with the next smaller index
+ and decrementing the array's length by <code>1</code>. </p>
+
+ <p>It is not safe to call <code>CosArrayRemove()</code> during a call to <code>CosObjEnum()</code>
+ on that same dictionary (for example, from within the callback procedure).</p>
+
+ @param array The array from which <code>obj</code> is removed.
+ @param obj The object to remove.
+ @see CosArrayInsert
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosArrayRemove, (CosObj array, CosObj obj))
+
+/**
+ Gets the number of elements in <code>array</code>.
+ @param array IN/OUT The array for which the number of elements
+ is determined.
+ @return The number of elements in <code>array</code>.
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASTArraySize, CosArrayLength, (CosObj array))
+
+
+/**
+ <p>Gets the length of a Cos stream from the <code>Length</code> key in the
+ stream's attributes dictionary. This specifies the length
+ of the undecoded data, which is the number of bytes in the
+ stream before the <code>Filter</code> (if any) is applied.</p>
+
+ <p>This has the same effect as calling
+ <code>CosIntegerValue(CosDictGetKeyString(stream, "Length"))</code>.</p>
+
+ <p>An exception is raised if the <code>Length</code> key is not found in the
+ attributes dictionary, if its value is not an integer, or if its value is outside the
+ range of 32-bit integers.</p>
+
+ @param stream The stream whose length is obtained.
+ @return The length of the stream.
+ @see CosStreamDict
+ @see CosStreamPos
+ @see CosStreamLength64
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASTArraySize, CosStreamLength, (CosObj stream))
+
+/**
+ Gets a stream's attributes dictionary.
+ @param stream IN/OUT The stream whose attributes dictionary is
+ obtained.
+ @return The stream's attributes dictionary Cos object.
+ @see CosStreamLength
+ @see CosStreamPos
+ @see CosDictGet
+ @see CosDictPut
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosStreamDict, (CosObj stream))
+
+/**
+ Creates a new, non-seekable <code>ASStm</code> for reading data from
+ a Cos stream. The data in the Cos stream may be filtered
+ and encrypted. After opening the Cos stream, data can be
+ read from it into memory using <code>ASStmRead()</code>. When reading is
+ completed, close the stream using <code>ASStmClose()</code>.
+ @param stream The Cos stream object for which an <code>ASStm</code>
+ is opened.
+ @param mode This must be one of the <code>CosStreamOpenMode</code> values.
+ @return The newly-opened <code>ASStm</code>.
+ @see ASStmRead
+ @see ASStmWrite
+ @see CosNewStream
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASStm, CosStreamOpenStm, (CosObj stream, CosStreamOpenMode mode))
+
+/**
+ <p>Gets the byte offset of the start of a Cos stream's data
+ in the PDF file (which is the byte offset of the beginning
+ of the line following the <code>stream</code> token). Use this method
+ to obtain the file location of any private data in a stream
+ that you need to read directly rather than letting it pass
+ through the normal Cos mechanisms. For example, this could apply to a QuickTime
+ video embedded in a PDF file. </p>
+
+ <p><code>CosStreamPos()</code> is only valid when called on a stream that
+ is already stored in a PDF document. If the stream was created
+ using <code>CosNewStream()</code>, the new stream is stored in the document's
+ temp file, and you cannot invoke <code>CosStreamPos()</code> on it. After
+ the file has been saved, you can use <code>CosStreamPos()</code> on the
+ stream.</p>
+ @param stream The stream whose current position is obtained.
+ @return The byte offset of the start of the Cos stream's data in
+ the PDF file.
+ @exception cosErrInvalidObj is raised if the stream object has not yet
+ been saved to the PDF file. In other words, before you can call <code>CosStreamPos()</code> on a newly
+ created stream, you must first save the PDF file.
+ @see CosStreamDict
+ @see CosStreamLength
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(ASTCount, CosStreamPos, (CosObj stream))
+
+/**
+ Gets the <code>Catalog</code> (the root object) for the specified document.
+ See Section 3.6.1 in the <i>PDF Reference</i> for a description
+ of the <code>Catalog</code>.
+ @param dP IN/OUT The document whose <code>Catalog</code> is obtained.
+ @return The document's <code>Catalog</code> dictionary Cos object.
+ @see CosDocGetInfoDict
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosDocGetRoot, (CosDoc dP))
+
+/**
+ Gets the specified document's <code>Info</code> dictionary. In general,
+ access the document's <code>Info</code> dictionary using PDDocGetInfo()
+ and <code>PDDocSetInfo()</code> wherever possible.
+ @param dP IN/OUT The document whose <code>Info</code> dictionary is obtained.
+
+ @return The document's <code>Info</code> dictionary Cos object.
+ @see CosDocGetRoot
+ @see PDDocGetInfo
+ @see PDDocSetInfo
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(CosObj, CosDocGetInfoDict, (CosDoc dP))
+
+/* The following method APIs are in PICrypt.h. */
+
+/**
+ <p>Decrypts data in a buffer using the specified encryption
+ key. The standard Acrobat viewer encryption/decryption algorithm
+ (RC4 from RSA Data Security, Inc.) is used. </p>
+
+ <p>An exception is raised if encryption encounters an internal
+ error.</p>
+
+ @param src The buffer containing the data to decrypt.
+
+ @param len The number of bytes in <code>src</code>.
+ @param dst (Filled by the method) The buffer into which
+ the decrypted data will be placed. This may point to the
+ same location as <code>src</code>.
+ @param cryptData The encryption key.
+ @param cryptDataLen The length of the encryption key in bytes.
+ It cannot be greater than <code>5</code>.
+ @see CosEncryptData
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosDecryptData, (void *src, ASTArraySize len, void *dst, char *cryptData, ASTArraySize cryptDataLen))
+
+/**
+ <p>Encrypts data in a buffer using the specified encryption
+ key. The standard Acrobat viewer encryption/decryption algorithm
+ (RC4 from RSA Data Security, Inc.) is used. </p>
+
+ <p>An exception is raised if encryption encounters an internal
+ error.</p>
+
+ @param src The buffer containing the data to encrypt.
+
+ @param len The number of bytes in <code>src</code>.
+ @param dst (Filled by the method) The buffer into which
+ the encrypted data will be placed. This may point to the
+ same location as <code>src</code>.
+ @param cryptData The encryption key.
+ @param cryptDataLen Length of the encryption key, in bytes.
+ It cannot be greater than <code>5</code>.
+ @see CosDecryptData
+ @since PI_COS_VERSION >= 0x00020000
+*/
+NPROC(void, CosEncryptData, (void *src, ASTArraySize len, void *dst, char *cryptData, ASTArraySize cryptDataLen))
+
+/* Acrobat 3.0 additions */
+
+/**
+ <p>Opens a Cos document. The document does not need to be a
+ PDF document. In <code>params</code>, the client specifies a file system
+ and path name from which to open the document. The client
+ may also specify a header string other than <code>"%PDF-"</code>. For
+ example, a client might want to open a private file type,
+ such as <code>"%FDF-"</code>. </p>
+
+ <p>Various exceptions may be raised.</p>
+
+ <p>If the <code>doRepair</code> flag is set in the open flags, a minimal
+ document can be opened. A minimal document contains the
+ header string and a trailer dictionary. It may contain indirect
+ objects before the trailer dictionary, and the trailer dictionary
+ can refer to those objects, as shown in the following example:</p>
+
+
+ <p><code>%FDF-1.0</code></p>
+ <p><code>1 0 obj</code></p>
+ <p><code>&lt;&lt; /Version /1.5</code></p>
+ <p><code>/FDF &lt;&lt; /F 20 0 R /JavaScript 5 0 R &gt;&gt;</code></p>
+ <p><code>&gt;&gt;</code></p>
+ <p><code>trailer</code></p>
+ <p><code>&lt;&lt;</code></p>
+ <p><code>/Root 1 0 R</code></p>
+ <p><code>&gt;&gt; </code></p>
+
+
+ @param params Specifies how to open the document.
+ @return A Cos document.
+ @see CosDocClose
+ @since PI_COS_VERSION >= 0x00020002
+*/
+NPROC(CosDoc, CosDocOpenWithParams, (CosDocOpenParams params))
+
+/**
+ Closes a Cos document. You should only call this method
+ with a document obtained via <code>CosDocOpenWithParams()</code> to release
+ resources used by the Cos document.
+ @param cosDoc IN/OUT The document to close.
+ @see CosDocOpenWithParams
+ @since PI_COS_VERSION >= 0x00020002
+*/
+NPROC(void, CosDocClose, (CosDoc cosDoc))
+
+/**
+ Creates an empty Cos document.
+ @param createFlags An inclusive OR of bit flags that specify
+ the attributes of a CosDoc when created by <code>CosDocCreate()</code>.
+ The only flag currently defined is <code>cosDocCreateInfoDict (0x01)</code>, which creates an Info dictionary for the document.
+ @return An empty Cos document.
+ @see CosDocSaveToFile
+ @since PI_COS_VERSION >= 0x00020002
+*/
+NPROC(CosDoc, CosDocCreate, (ASFlagBits createFlags))
+
+/**
+ Saves a Cos document to a file handle. <code>CosDocSaveToFile()</code>
+ will not generate an cross-reference table in the saved file. If you
+ want the cross-reference to be generated, then you have to use <code>CosDocSaveWithParams()</code>,
+ which generates the cross-reference table by default.
+ @param cosDoc IN/OUT The document to save.
+ @param asFile IN/OUT The file to which the document is written; it must
+ be open in write mode. This file is not necessarily position-able.
+ @param saveFlags IN/OUT An <code>OR</code> of the values listed in <code>CosDocSave</code>
+ Flags specifying how to save the document.
+ @param saveParams IN/OUT Optional parameters for use when saving
+ a document, as described in CosDocSaveParams().
+ @exception cosErrAfterSave
+ @exception cosErrNeedFullSave
+ @exception genErrBadParm
+ @see CosDocCreate
+ @see CosDocSaveWithParams
+ @since PI_COS_VERSION >= 0x00020002
+*/
+#if READER || READER_PLUGIN
+NOPROC(CosDocSaveToFile)
+#else
+
+/**
+ Saves a Cos document to a file. <code>CosDocSaveToFile()</code> will not
+ generate a cross-reference index (table or stream) in the
+ saved file. If you want the index to be generated, then
+ you must use <code>CosDocSaveWithParams()</code>, which generates it
+ by default.
+ @param cosDoc The document to save.
+ @param asFile The file to which the document is written; it must
+ be open in write mode. This file is not necessarily position-able.
+
+ @param saveFlags An <code>OR</code> of the <code>CosDocSaveFlags</code> bit flag
+ values specifying how to save the document.
+ @param saveParams Optional parameters for use when saving
+ a document, as described in <code>CosDocSaveParams()</code>.
+ @exception cosErrAfterSave
+ @exception cosErrNeedFullSave
+ @exception genErrBadParm
+ @see CosDocCreate
+ @see CosDocSaveWithParams
+ @since PI_COS_VERSION >= 0x00020002
+*/
+NPROC(void, CosDocSaveToFile, (CosDoc cosDoc, ASFile asFile, CosDocSaveFlags saveFlags, CosDocSaveParams saveParams))
+
+#endif
+
+/**
+ Sets a Cos document's <code>dirty</code> flag to a given boolean value.
+ If this flag is <code>true</code> when the document is closed, it indicates
+ that the document must be saved to preserve changes.
+ @param cosDoc The Cos document whose <code>dirty</code> flag is set.
+
+ @param isDirty <code>true</code> if dirty, <code>false</code> otherwise.
+ @see CosDocSaveToFile
+ @see CosDocSaveWithParams
+ @since PI_COS_VERSION >= 0x00020002
+*/
+NPROC(void, CosDocSetDirty, (CosDoc cosDoc, ASBool isDirty))
+
+/* Acrobat 4.0 additions */
+
+/**
+ Gets the local master index for an indirect object. For
+ indirect objects, the local master index is the same as
+ the indirect object index that appears in the PDF file.
+
+ @param obj IN/OUT The indirect <code>CosObj</code> for which the ID is obtained.
+ A <code>CosObj</code> can be determined to be indirect using <code>CosObjIsIndirect()</code>.
+
+ @return The ID of <code>obj</code>.
+ @exception cosErrInvalidObj is raised if the object is not valid or is
+ not indirect.
+ @see CosDocGetObjByID
+ @see CosObjGetGeneration
+ @see CosObjIsIndirect
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(CosID, CosObjGetID,(CosObj obj))
+
+/**
+ Gets the generation number of an indirect Cos object. See
+ Section 3.2.9 in the <i>PDF Reference</i> for more information.
+
+ @param obj IN/OUT The indirect <code>CosObj</code> for which the generation
+ number is obtained. A <code>CosObj</code> can be determined to be indirect
+ using <code>CosObjIsIndirect()</code>.
+ @return The generation number of <code>cosObj</code>.
+ @exception cosErrInvalidObj is raised if the object is not valid or is
+ not indirect.
+ @see CosObjGetID
+ @see CosObjIsIndirect
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(CosGeneration, CosObjGetGeneration, (CosObj obj))
+
+/**
+ Gets the indirect <code>CosObj</code> with the latest generation number.
+
+ @param dP The <code>CosDoc</code> to search for the matching Cos object.
+
+ @param objNum The local master index for the indirect
+ Cos object to return.
+ @return The <code>CosObj</code> with the latest generation number whose ID (object
+ number) equals <code>objNum</code>, or the <code>NULL</code> object if there is no
+ object with this ID.
+ @see CosObjGetID
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(CosObj, CosDocGetObjByID, (CosDoc dP, CosID objNum))
+
+/**
+ Saves a Cos document, optionally to a new file handle. It generates
+ an cross-reference table by default.
+ @param cosDoc IN/OUT The <code>CosDoc</code> for the document to save.
+ @param asFile IN/OUT (Optional) If saving to the same file, do
+ not pass in an <code>ASFile</code>. If saving to a different file, specify
+ the file to which the document is written; it must be open
+ in write mode. If <code>NULL</code>, this method saves to the ASFile
+ originally associated with the CosDoc.
+ @param saveFlags IN/OUT A bit field composed of the <code>CosDocSaveFlags</code>
+ specifying how to save the document.
+ @param saveParams IN/OUT (Optional) <code>CosDocSaveParams</code> parameters
+ for use when saving the <code>CosDoc</code> document.
+ @exception cosErrAfterSave
+ @exception cosErrNeedFullSave
+ @exception genErrBadParm
+ @see CosDocCreate
+ @see CosDocSaveToFile
+ @since PI_COS_VERSION >= 0x00040000
+*/
+#if READER || READER_PLUGIN
+NOPROC(CosDocSaveWithParams)
+#else
+
+/**
+ Saves a Cos document, optionally to a new file. It generates
+ a cross-reference index (table or stream) by default.
+ @param cosDoc The <code>CosDoc</code> for the document to save.
+ @param asFile The file to which the document will be written.
+ This file must already be open in write mode. If you pass
+ <code>NULL</code>, <code>cosDoc</code> is saved to the file with which it was originally
+ associated.
+ @param saveFlags An <code>OR</code> of the <code>CosDocSaveFlags</code> bit flag
+ values specifying how to save the document.
+ @param saveParams <code>CosDocSaveParams</code> parameters for use
+ when saving the <code>CosDoc</code> document.
+ @exception cosErrAfterSave
+ @exception cosErrNeedFullSave
+ @exception genErrBadParm
+ @see CosDocCreate
+ @see CosDocSaveToFile
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(void, CosDocSaveWithParams, (CosDoc cosDoc, ASFile asFile, CosDocSaveFlags saveFlags, CosDocSaveParams saveParams))
+
+#endif
+
+/**
+ Calls the specified procedure for each EOF in a given <code>CosDoc</code>,
+ where the EOF is a position in a PDF file after a <code>%%EOF</code>
+ keyword that marks the end of either a main cross-reference
+ section, or an update cross-reference section that corresponds
+ to an incremental save. Not every <code>%%EOF</code> keyword fits these
+ criteria. For example, the first <code>%%EOF</code> in a linearized (optimized for the web) file
+ does not, so its position is not be passed to <code>proc</code>.
+
+ <p>If <code>cosDoc</code> was created in memory (using CosDocCreate()), or
+ if it was damaged and needed to be repaired, the procedure
+ is not called at all. </p>
+ @param cosDoc The <code>CosDoc</code> in which the EOF's are enumerated.
+
+ @param proc The <code>CosDocEnumEOFsProc()</code> to call for each EOF.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @return <code>true</code> if all of the calls to <code>proc</code> return <code>true</code>. <code>false</code> as soon
+ as a call to <code>proc</code> returns <code>false</code>.
+ @see CosDocEnumIndirect
+ @see CosDocEnumEOFs64
+ @ingroup Enumerators
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(ASBool, CosDocEnumEOFs, (CosDoc cosDoc, CosDocEnumEOFsProc proc, void * clientData))
+
+/**
+ Sets the hex flag of the <code>CosString</code>. The hex flag specifies
+ whether the <code>CosString</code> should be written out as hex when
+ writing the Cos Object to file.
+ @param cosObj The <code>CosString</code> for which the hex flag is
+ set.
+ @param setHex The value to set for the flag.
+ @return The value of <code>setHex</code>.
+ @exception cosErrExpectedString
+ @see CosStringGetHexFlag
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(ASBool, CosStringSetHexFlag, (CosObj cosObj, ASBool setHex))
+
+/**
+ Gets the hex flag of the <code>CosString</code>. The hex flag specifies
+ whether the <code>CosString</code> should be written out as hex when
+ writing the Cos Object to file.
+ @param cosObj IN/OUT The <code>CosString</code> for which the hex flag is obtained.
+
+ @return The current value of the flag.
+ @exception cosErrExpectedString
+ @see CosStringSetHexFlag
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(ASBool, CosStringGetHexFlag, (CosObj cosObj))
+
+/**
+ Gets a 32-bit hash code for the given <code>CosObj</code>.
+
+ <p>Two <code>CosObj</code> objects with equal hash codes are not necessarily
+ equal, however. Use <code>CosObjEqual()</code> to determine the equality
+ of Cos objects. </p>
+ @param obj The <code>CosObj</code> for which to obtain a hash code.
+ @return 32-bit hash code for the given <code>CosObj</code>, or <code>CosNewNull()</code> if
+ there is no object with this ID.
+ @see CosObjEqual
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(CosHashCode, CosObjHash, (CosObj obj))
+
+/**
+ Copies a <code>CosObj</code> from one document to another (or the same
+ document).
+ @param srcObj The <code>CosObj</code> to copy.
+ @param destDoc The <code>CosDoc</code> for the document into which
+ the <code>CosObj</code> is copied.
+ @param copyIndirect <code>true</code> if all indirectly referenced
+ objects from <code>srcObj</code> are copied to <code>destDoc</code>, <code>false</code> otherwise.
+ @return The <code>CosObj</code> which has been copied to the destination document.
+
+ @see CosObjEqual
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(CosObj, CosObjCopy, (CosObj srcObj, CosDoc destDoc, ASBool copyIndirect))
+
+/**
+ Checks whether the position is within the array bounds,
+ removes it from the array, moves each subsequent
+ element to the slot with the next smaller index, and decrements
+ the array's length by <code>1</code>. It sets the <code>dirty</code> flag of the <code>array</code> object's
+ <code>CosDoc</code>.
+ @param array IN/OUT The <code>CosArray</code> from which to remove the member.
+ @param pos IN/OUT The index for the array member to remove. Array
+ indices start at <code>0</code>.
+ @see CosArrayRemove
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(void, CosArrayRemoveNth, (CosObj array, ASTArraySize pos))
+
+/**
+ <p>Enumerates all the indirect objects of a given <code>CosDoc</code>. </p>
+
+ <p>The objects are enumerated in no particular order. Successive
+ enumerations of the same Cos document are not guaranteed
+ to enumerate objects in the same order.</p>
+
+ <p>This method does not enumerate invalid objects, which include
+ objects that are defined as <code>NULL</code>, objects that are not defined
+ at all (those having no cross-reference entry), and objects
+ that are on the free list (see the <i>PDF Reference</i>). </p>
+
+ <p>This re-raises any exception that <code>proc</code> raises. </p>
+
+ @param dP The <code>CosDoc</code> whose indirect objects are enumerated.
+
+ @param proc A user-supplied callback to call for each indirect
+ object in <code>dP</code>. Enumeration ends when <code>proc</code> returns <code>false</code> or
+ all indirect objects have been enumerated. The value parameter
+ returned in <code>proc</code> is always the <code>NULL</code> Cos object.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @return <code>true</code> if all of the calls to <code>proc</code> returned <code>true</code>. It returns <code>false</code> as
+ soon as a call to <code>proc</code> returns <code>false</code>.
+ @see CosObjEnum
+ @ingroup Enumerators
+ @since PI_COS_VERSION >= 0x00040000
+*/
+NPROC(ASBool, CosDocEnumIndirect, (CosDoc dP, CosObjEnumProc proc, void * clientData))
+
+/* Acrobat 4.05 additions */
+
+/**
+ Gets the current version number of the encryption algorithm
+ supported.
+ @return The current version number of the encryption supported.
+ @see CosDecryptGetMaxKeyBytes
+ @see CosEncryptGetMaxKeyBytes
+ @since PI_COS_VERSION >= 0x00040005
+*/
+NPROC(ASTVersion, CosCryptGetVersion, ())
+
+/**
+ Gets the maximum number of the decryption key length, in
+ bytes, for the specified <code>cryptVersion</code>.
+ @param cryptVersion IN/OUT The Cos crypt version, which is the version
+ of the algorithm that is used to encrypt and decrypt document
+ data. <code>cryptVersion</code> equal to <code>0</code> is treated as <code>cryptVersion</code>
+ equal to <code>1</code> to maintain backward compatibility.
+ @return The maximum number of key length, in bytes, for the specified
+ <code>cryptVersion</code>. If <code>cryptVersion</code> is not currently supported,
+ it returns <code>-1</code>.
+ @see CosCryptGetVersion
+ @see CosEncryptGetMaxKeyBytes
+ @since PI_COS_VERSION >= 0x00040005
+*/
+NPROC(CosByteMax, CosDecryptGetMaxKeyBytes, (ASTVersion cryptVersion))
+
+/**
+ Gets the maximum number of the encryption key length, in
+ bytes, for the specified <code>cryptVersion</code>.
+ @param cryptVersion IN/OUT The Cos crypt version, which is the version
+ of the algorithm that is used to encrypt and decrypt document
+ data. <code>cryptVersion</code> equal to <code>0</code> is treated as <code>cryptVersion</code>
+ equal to <code>1</code> to maintain backward compatibility.
+ @return The maximum number of key length, in bytes, for the specified
+ <code>cryptVersion</code>. If <code>cryptVersion</code> is not currently supported,
+ it returns <code>-1</code>.
+ @see CosCryptGetVersion
+ @see CosDecryptGetMaxKeyBytes
+ @since PI_COS_VERSION >= 0x00040005
+*/
+NPROC(CosByteMax, CosEncryptGetMaxKeyBytes, (ASTVersion cryptVersion))
+
+/* Acrobat 5.0 additions */
+
+/**
+ <p>Returns a newly allocated buffer containing a copy of the
+ Cos object's string value. Upon return, <code>nBytes</code> contains the
+ number of bytes in the original Cos string. <code>CosCopyStringValue()</code>
+ never returns <code>NULL</code>; it raises an exception if the allocation
+ fails. The client is responsible for freeing the result
+ by calling <code>ASfree()</code>.</p>
+
+ <p><code>CosCopyStringValue()</code> allocates extra memory past the end of
+ the string and writes zeros into these extra bytes to ensure
+ that the string is <code>NULL</code>-terminated whether viewed as a UTF-16
+ (Unicode) string or as a C string (these bytes are not
+ included in the number returned in <code>nBytes</code>). If the Cos string
+ has <code>0</code> length, <code>nBytes</code> will be <code>0</code>, and a pointer to newly allocated
+ memory containing some zero bytes is returned (that is,
+ <code>CosCopyStringValue()</code> still returns a <code>NULL</code>-terminated string
+ but with zero length). </p>
+
+ <p>An out-of-memory exception is raised if insufficient memory
+ is available. It can also raise any exception that CosStringValue() can raise. </p>
+
+ @note In general, the returned value is not a <code>NULL</code>-terminated
+ C string. Cos string objects are binary and can contain
+ arbitrary byte sequences, including <code>NULL</code> characters. Standard
+ C string handling functions may not work as expected.
+ @param obj IN The Cos object whose string value is copied
+ and returned.
+ @param nBytes OUT (Filled by the method) The length of the
+ original Cos string in bytes. It can be <code>NULL</code> if you do not care
+ how many bytes were in the original string.
+ @return A copy of the Cos object's string value.
+ @see CosStringValueSafe
+ @since PI_COS_VERSION >= 0x00050000
+*/
+NPROC(char *, CosCopyStringValue, (CosObj obj, ASTCount *nBytes))
+
+/**
+ <p>Copies at most <code>bufferLen</code> bytes from the <code>obj</code> parameter's string value into
+ <code>buffer</code>, and stores the actual length of the Cos string in
+ <code>*nBytes</code>. If <code>bufferLen</code> is greater than the length of the
+ Cos string, the remaining bytes in <code>buffer</code> have undefined
+ values upon return. </p>
+
+ <p>A bad-parameter exception is raised if <code>bufferLen</code> is less
+ than <code>0</code> or <code>nBytes</code> is <code>NULL</code>. It can also raise any exception that <code>CosStringValue()</code> can raise. </p>
+
+ @note In general, the returned value is not a <code>NULL</code>-terminated
+ C string. Cos string objects are binary data and can contain
+ any arbitrary byte sequence, including embedded <code>NULL</code> characters.
+ Standard C string handling functions may not work as expected.
+ @param obj The Cos object whose string value is copied.
+ @param buffer The buffer into which the Cos string value
+ is copied, or <code>NULL</code>.
+ @param bufferSize The length of <code>buffer</code> or <code>0</code>.
+ @param nBytes (Filled by the method) The length of the
+ original Cos string in bytes (which may be more than <code>bufferLen</code>).
+ It must be a non-<code>NULL</code> pointer.
+ @return A copy of the Cos string value or an exception. It will never
+ return <code>NULL</code>.
+
+ @see CosCopyStringValue
+ @since PI_COS_VERSION >= 0x00050000
+*/
+NPROC(char *, CosStringValueSafe, (CosObj obj, char *buffer, ASTArraySize bufferSize, ASTCount *nBytes))
+
+
+/**
+ Returns two ID byte arrays identifying the CosDoc. The client
+ should copy these arrays before making the next call to
+ Acrobat.
+ @param dP IN/OUT The CosDoc whose ID byte arrays are returned.
+
+ @param pInstanceID IN/OUT (Filled by the method) The instance
+ ID.
+ @param pPermaID IN/OUT (Filled by the method) The permanent ID.
+
+ @param instIDLength IN/OUT The length of <code>pInstanceID</code> in bytes.
+
+ @param permIDLength IN/OUT The length of <code>pPermaID</code> in bytes.
+ @return <code>true</code> if the ID is returned, <code>false</code> otherwise.
+ @since PI_COS_VERSION >= 0x00050000
+*/
+NPROC(ASBool, CosDocGetID, (CosDoc dP, CosByte **pInstanceID, CosByte **pPermaID, ASTCount *instIDLength, ASTCount *permIDLength))
+
+/**
+ <p>Compares the two <code>CosObj</code> objects. The result is <code>0</code> only if
+ <code>CosObjEqual(obj1, obj2)</code> is <code>true</code>. Otherwise, the result is
+ either <code>-1</code> or <code>1</code>. The result is useful for ordering or sorting
+ Cos objects. No other significance should be attached to
+ the result. In particular, a nonzero result indicates nothing
+ about the type of either object. </p>
+
+ <p>The result is valid only within a single instance of the
+ document. That is, if CosObjCmp() returns a nonzero value
+ and the document is closed and then reopened, there is no
+ guarantee that it will return the same nonzero value for
+ those same objects. </p>
+
+ <p>The following conditions apply: </p>
+ <ul>
+ <li> If <code>CosObjCmp(a, b) == 0</code>, then <code>CosObjCmp(b, a) == 0</code>. </li>
+ <li> If <code>CosObjCmp(a, b) > 0</code>, then <code>CosObjCmp(b, a) < 0</code>. </li>
+ <li> If <code>CosObjCmp(a, b) < 0</code>, then <code>CosObjCmp(b, a) > 0</code>. </li>
+ <li> If <code>CosObjCmp(a, b) == 0</code> and <code>CosObjCmp(b, c) == 0</code>, then
+ <code>CosObjCmp ( a, c ) == 0</code>. </li>
+ <li> If <code>CosObjCmp(a, b) > 0</code> and <code>CosObjCmp(b, c) > 0</code>, then
+ <code>CosObjCmp (a, c) > 0</code>. </li>
+ <li> If <code>CosObjCmp(a, b) < 0</code> and <code>CosObjCmp(b, c) < 0</code>, then
+ <code>CosObjCmp(a, c) < 0</code>. </li>
+ </ul>
+ @param obj1 The first <code>CosObj</code> to compare.
+ @param obj2 The second <code>CosObj</code> to compare.
+ @return Returns zero if the two objects are equal, <code>-1</code> if <code>obj1</code> is
+ less than <code>obj2</code>, <code>1</code> if <code>obj1</code> is greater than <code>obj2</code>.
+ @see CosObjEqual
+ @since PI_COS_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, CosObjCmp, (CosObj obj1, CosObj obj2))
+
+/**
+ Puts a limit on the amount of memory (RAM) that can be used to store Cos
+ objects. The default limit is 2 MB, and this method can be used only to
+ increase the limit. Beyond the limit, Cos objects may be stored on disk.
+ @note The limit applies only to fixed-size data in Cos objects, not to
+ variable data stored in strings, arrays, dictionaries and streams. In some
+ cases, objects may need to stay in memory, even if the limit is exceeded.
+ @param maxMemory The maximum amount of RAM (in bytes) that will be used to
+ store fixed-size Cos objects.
+ @since PI_COS_VERSION >= 0x00050001
+*/
+NPROC(void, CosSetMaxDocStorage, (ASInt32 maxMemory))
+
+/* Acrobat 6.0 additions */
+
+/**
+ <p>Tests whether the definition of a specified Cos object,
+ in the file associated with the object's CosDoc, begins
+ within any of a set of byte ranges. The test is inclusive;
+ that is the object may begin at the first or last byte of
+ a range. </p>
+
+ <p>An exception is raised if <code>obj</code> is a direct object or <code>numEntries</code>
+ is an odd number. </p>
+
+ @param obj The Cos object (must be indirect).
+ @param byteRanges An array containing pairs of byte offsets
+ within the document. Each pair is a start and end offset
+ from the beginning of the document.
+ @param numEntries The number of byte offsets (not pairs)
+ in the <code>byteRanges</code> array.
+ @return <code>true</code> if the object begins within any of the given ranges
+ and has not been modified, <code>false</code> otherwise.
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosDocObjIsWithinRange, (CosObj obj, ASInt32 byteRanges[], ASInt32 numEntries))
+
+/**
+ Tests whether an object is compressed (part of a CosObjCollection).
+ @param obj The object to test.
+ @return <code>true</code> if <code>obj</code> is compressed, <code>false</code> otherwise.
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosObjIsCompressed, (CosObj obj))
+
+/**
+ Creates a new object collection for objects in a document.
+
+ @param dP The document whose objects are collected, or
+ <code>NULL</code> to create a <code>NULL</code> collection (a <code>NULL</code> collection is
+ not associated with a document and cannot store objects;
+ it is generally used only as an initial value for a variable
+ of type CosObjCollection).
+ @return The newly created Cos object collection.
+ @see CosObjAddToCollection
+ @see CosObjCollectionEnum
+ @see CosObjGetCollection
+ @see CosObjCollectionIsNull
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(CosObjCollection, CosNewObjCollection, (CosDoc dP))
+
+/**
+ Tests whether an object collection is <code>NULL</code>. A <code>NULL</code> collection
+ is not associated with a document and cannot store objects;
+ it is generally used only as an initial value for a variable
+ of type <code>CosObjCollection</code>.
+ @param coll The object collection to test.
+ @return <code>true</code> if <code>coll</code> is <code>NULL</code>, <code>false</code> otherwise.
+ @see CosNewObjCollection
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosObjCollectionIsNull, (CosObjCollection coll))
+
+/**
+ <p>Gets the <code>CosObjCollection</code> containing the specified object.
+ If the object is not in a collection, the method raises
+ an exception. </p>
+
+ <p>An error is raised if <code>obj</code> is not in a collection.</p>
+
+ @param obj The object whose <code>CosObjCollection</code> is obtained.
+ @return The <code>CosObjCollection</code> to which the object belongs.
+ @see CosObjAddToCollection
+ @see CosObjIsCompressed
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(CosObjCollection, CosObjGetCollection, (CosObj obj))
+
+/**
+ <p>Adds a Cos object to a collection; see <code>CosObjCollection</code>
+ for requirements of these collections. This method sets
+ the dirty flag of the collection's Cos document. </p>
+
+ <p>An exception is raised if the collection and the object belong to different Cos documents. </p>
+
+ @param coll The Cos object collection.
+ @param item The object to add.
+ @return <code>true</code> if <code>obj</code> was successfully added to the collection, <code>false</code>
+ otherwise.
+ @see CosObjGetCompressibility
+ @see CosObjIsCompressed
+ @see CosObjRemoveFromCollection
+ @see CosObjSetCompressibility
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosObjAddToCollection, (CosObjCollection coll, CosObj item))
+
+/**
+ <p>Removes a Cos object from the <code>CosObjCollection</code> to which
+ it belongs. </p>
+
+ <p>An exception is raised if the object is not in the collection. </p>
+
+ @param obj The object to remove.
+ @see CosObjAddToCollection
+ @see CosObjGetCompressibility
+ @see CosObjIsCompressed
+ @see CosObjSetCompressibility
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(void, CosObjRemoveFromCollection, (CosObj obj))
+
+/**
+ <p>Controls whether a Cos object can be compressed. A compressible
+ object can be added to a CosObjCollection. </p>
+
+ <p>If you set the compressibility to <code>false</code>, calling <code>CosObjAddToCollection()</code>
+ on that object has no effect. If the object is already compressed,
+ it is removed from the object collection to which it belongs
+ and then marked as incompressible. </p>
+
+ <p>This method does nothing if applied to a direct object,
+ a stream, or an object whose generation number is not zero.
+ Objects of these types are never compressible. </p>
+ @param obj The object whose compressibility is set.
+ @param compressible <code>true</code> if the object can be made part
+ of a <code>CosObjCollection</code>, <code>false</code> otherwise.
+ @return <code>true</code> if <code>obj</code> is marked as compressible, <code>false</code> otherwise.
+
+ @see CosObjAddToCollection
+ @see CosObjGetCompressibility
+ @see CosObjIsCompressed
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(void, CosObjSetCompressibility, (CosObj obj, ASBool compressible))
+
+/**
+ Tests whether an object is <i>compressible</i>. A compressible
+ object can be added to a <code>CosObjCollection</code>.
+
+ <p>An object is compressible only if all of the following conditions are true: </p>
+ <ul>
+ <li> It is indirect. </li>
+ <li> It has a generation number of zero. </li>
+ <li> It is not a stream. </li>
+ <li> It has not been marked as incompressible by <code>CosObjSetCompressibility()</code>. </li>
+ </ul>
+
+ @param obj The object to test.
+ @return <code>true</code> if <code>obj</code> is compressible, <code>false</code> otherwise.
+ @see CosObjIsCompressed
+ @see CosObjSetCompressibility
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosObjGetCompressibility, (CosObj obj))
+
+/**
+ Gets the number of objects in an object collection. The
+ size of a <code>NULL</code> collection is zero.
+ @param coll The object collection whose size is obtained.
+ @return The number of objects in the collection.
+ @see CosObjAddToCollection
+ @see CosObjRemoveFromCollection
+ @see CosObjCollectionEnum
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASUns32, CosObjCollectionSize, (CosObjCollection coll))
+
+/**
+ Tests whether two Cos object collections are the same collection.
+ Two <code>NULL</code> collections are always equal (a <code>NULL</code> collection
+ is not associated with a document and cannot store objects;
+ it is generally used only as an initial value for a variable
+ of type <code>CosObjCollection</code>).
+ @param c1 An object collection to compare.
+ @param c2 An object collection to compare.
+ @return <code>true</code> if <code>c1</code> and <code>c2</code> are the same collection, <code>false</code> otherwise.
+
+ @see CosNewObjCollection
+ @see CosObjGetCollection
+ @see CosObjCollectionIsNull
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosObjCollectionEqual, (CosObjCollection c1, CosObjCollection c2))
+
+/**
+ Enumerates the members of a Cos object collection, calling
+ a user-supplied procedure for each member object. The order
+ in which the objects are enumerated is undefined.
+ @param coll The object collection whose members are enumerated.
+
+ @param proc A user-supplied callback to call for each member
+ object of <code>coll</code>. Enumeration ends if <code>proc</code> returns <code>false</code>.
+ The callback must not modify the collection (for example, by adding or
+ removing objects). Doing so produces undefined
+ results or errors.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @return Returns the value that <code>proc</code> returned (meaning that it returns <code>true</code>
+ if all the member objects were enumerated, <code>false</code> if enumeration
+ was terminated at the request of <code>proc</code>).
+ @see CosObjGetCollection
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosObjCollectionEnum, (CosObjCollection coll, CosObjEnumProc proc,
+ void *clientData))
+
+/**
+ <p>In Acrobat 6.0, this method
+ updates an indirect Cos object after a linearized save operation.
+ Linearizing renumbers all indirect objects; this function
+ returns the new renumbered Cos object, which should be used
+ from this point on. This call is only valid from within
+ notification callbacks responding to the PDDocDidSave() notification.
+ If called from outside this context, or if the passed Cos
+ object is direct, the function does not modify the object.</p>
+
+ <p>In Acrobat 7.0 and later, linearizing does not renumber objects,
+ and this method has no effect.</p>
+
+ @param obj A pointer to the object to refresh. The object
+ is updated by the method.
+ @param doc The document that was saved.
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(void, CosObjRefreshAfterLinearizedSave, (CosObj *obj, CosDoc doc))
+
+/**
+ <p>Tests whether the Cos document is fully compressed. In a
+ fully compressed document, most objects are stored in object
+ streams, which are normally Flate-encoded to reduce the
+ size of the PDF file. Cross-reference information for these
+ objects is stored in cross-reference streams, which are
+ also normally Flate-encoded. See the <i>PDF Reference</i>. </p>
+
+ @note Fully compressed files are not compatible with PDF
+ 1.4 and earlier viewers.
+ @param doc The document whose compression is checked.
+ @return <code>true</code> if the document is fully compressed, <code>false</code> otherwise.
+
+ @see CosDocHasPartialCompression
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosDocHasFullCompression, (CosDoc doc))
+
+/**
+ <p>Tests whether the Cos document is partially compressed.
+ In a partially compressed file, the size of the logical
+ structure information is reduced; however, this information
+ is unavailable to pre-PDF 1.5 viewers, while the document
+ can still be viewed and printed. PDF 1.5 viewers (such as
+ Acrobat 6 and later) have full access to the structure information. </p>
+
+ <p>In a partially compressed document, objects related to logical
+ structure are stored in object streams, which are normally
+ Flate-encoded to compress the document. Their cross-reference
+ information is stored twice: in a cross-reference stream,
+ to which there is a reference in the trailer of an update
+ section, and in the main cross-reference table, which indicates
+ that the objects are on the free list. See the <i>PDF Reference</i>. </p>
+
+ @param doc The document whose compression is checked.
+ @return <code>true</code> if the document is partially compressed, <code>false</code> otherwise.
+
+ @see CosDocHasFullCompression
+ @since PI_COS_VERSION >= 0x00060000
+*/
+NPROC(ASBool, CosDocHasPartialCompression, (CosDoc doc))
+
+/**
+ Acrobat 7 additions
+*/
+
+/**
+ Creates a new 64-bit integer object associated with the specified
+ document and having the specified value.
+ @param dP IN The document in which the integer is used.
+ @param indirect IN If <code>true</code>, it creates the integer object as
+ an indirect object, and sets the document <code>dP</code> object's <code>PDDocNeedsSave</code>
+ flag (see PDDocFlags). If <code>false</code>, it creates the integer as
+ a direct object.
+ @param value IN The value, represented as a 64-bit integer.
+ @return An object of type CosInteger.
+ @see CosInteger64Value
+ @see CosNewInteger
+ @see CosNewFixed
+ @see CosNewFloat
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(CosObj, CosNewInteger64, (CosDoc dP, ASBool indirect, ASInt64 value))
+
+/**
+ <p>Gets the 64-bit integer value of a specified number object. </p>
+
+ <p>An exception is raised if the given object has the wrong Cos type. </p>
+
+ @param obj The object whose integer value is obtained.
+ It must have type <code>CosInteger</code> or <code>CosReal</code> (<code>CosFixed</code>). If it is <code>CosReal</code>,
+ its value is rounded to the nearest integer. The result
+ is undefined if the real value is outside the range of <code>ASInt64</code>
+ numbers.
+ @return The 64-bit integer value of <code>obj</code>.
+ @see CosNewInteger64
+ @see CosIntegerValue
+ @see CosFixed Value
+ @see CosFloatValue
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASInt64, CosInteger64Value, (CosObj obj))
+
+/**
+ Creates a new real-number object from a single-precision floating-point number
+ associated with the specified document.
+ @param dP The document in which the number is used.
+
+ @param indirect If <code>true</code>, it creates the real-number object
+ as an indirect object, and sets the document <code>dP</code> object's <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocFlags</code>). If <code>false</code>, it creates the number
+ as a direct object.
+ @param value The real number, represented as a single-precision floating-point number.
+ @return A Cos object of type <code>CosReal</code> (<code>CosFixed</code>).
+ @see CosFloatValue
+ @see CosNewInteger
+ @see CosNewInteger64
+ @see CosNewFixed
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(CosObj, CosNewFloat, (CosDoc dP, ASBool indirect, float value))
+
+/**
+ Gets the value of <code>obj</code> as a single-precision floating-point real number.
+
+ <p>An exception is raised if the given object has the wrong Cos type.</p>
+
+ @param obj The object whose value is obtained. It must
+ have type <code>CosInteger</code> or <code>CosReal</code> (<code>CosFixed</code>). The result is undefined
+ if the real value is outside the range of floating-point numbers.
+ @return The numeric value of <code>obj</code>, represented as a floating-point number.
+ @see CosNewFloat
+ @see CosIntegerValue
+ @see CosInteger64Value
+ @see CosFixedValue
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(float, CosFloatValue, (CosObj obj))
+
+/**
+ Gets the value of the specified key in the specified dictionary. For more details, see <code>CosDictGet()</code>.
+
+ @param dict The dictionary or stream from which a value is obtained.
+ @param key The key whose value is obtained, represented as a Cos name object.
+ @return The object associated with the specified key. If <code>key</code> is
+ not present, it returns a <code>NULL</code> Cos object.
+ @see CosDictGet
+ @see CosDictGetKeyString
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( CosObj, CosDictGetKey, (CosObj dict, CosObj key))
+
+/**
+ Tests whether a specific key is found in the specified dictionary.
+ Calling this method is equivalent to checking if the value
+ returned from <code>CosDictGetKey()</code> is a <code>NULL</code> Cos object. For more details, see CosDictKnown().
+
+ @param dict The dictionary or stream in which to look for <code>key</code>.
+ @param key The key to find, represented as a Cos name object.
+
+ @return <code>true</code> if the value of a key is known (exists and is not <code>NULL</code>)
+ in <code>dict</code>, <code>false</code> otherwise.
+ @see CosDictKnownKey
+ @see CosDictKnownKeyString
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( ASBool, CosDictKnownKey, (CosObj dict, CosObj key))
+
+/**
+ <p>Sets the value of a dictionary key, adding the key to the
+ dictionary if it is not already present. For more details, see <code>CosDictPut()</code>.</p>
+
+ <p>It is not safe to call <code>CosDictPutKey()</code> during a call to <code>CosObjEnum()</code>
+ on that same dictionary (for example, from within the callback procedure)</p>
+
+ <p>An exception is raised if <code>val</code> is a direct non-scalar object
+ that is already contained in another dictionary, array, or stream,
+ or if <code>dict</code> and <code>val</code> belong to different documents.</p>
+
+ @param dict The dictionary or stream in which a value is set.
+ @param key The key whose value is set, represented as a Cos name object.
+
+ @param val The value to set.
+
+ @see CosDictPut
+ @see CosDictPutKeyString
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( void, CosDictPutKey, (CosObj dict, CosObj key, CosObj val))
+
+/**
+ Removes a key-value pair from a dictionary. For more details, see <code>CosDictRemove()</code>.
+
+ @param dict The dictionary from which the key-value pair
+ is removed.
+ @param key The key to remove, represented as a Cos name object.
+
+ @see CosDictRemove
+ @see CosDictRemoveKeyString
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( void, CosDictRemoveKey,(CosObj dict, CosObj key))
+
+/**
+ Gets the value of the specified key in the specified dictionary. For more details, see <code>CosDictGet()</code>.
+
+ @param dict The dictionary or stream from which a value is obtained.
+ @param key The key whose value is obtained, represented as a string.
+ @return The object associated with the specified key. If key is
+ not present, returns a <code>NULL</code> Cos object.
+ @see CosDictGet
+ @see CosDictGetKey
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( CosObj, CosDictGetKeyString, (CosObj dict, const char* key))
+
+/**
+ Tests whether a specific key is found in the specified dictionary.
+ Calling this method is equivalent to checking if the value
+ returned from <code>CosDictGetKeyString()</code> is a <code>NULL</code> Cos object. For more details, see <code>CosDictKnown()</code>.
+
+ @param dict The dictionary or stream in which to look for key.
+ @param key The key to find, represented as a string.
+
+ @return <code>true</code> if the value of a key is known (exists and is not <code>NULL</code>)
+ in <code>dict</code>, <code>false</code> otherwise.
+ @see CosDictKnownKey
+ @see CosDictKnownKeyString
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( ASBool, CosDictKnownKeyString, (CosObj dict, const char* key))
+
+/**
+ <p>Sets the value of a dictionary key, adding the key to the
+ dictionary if it is not already present. For more details, see <code>CosDictPut()</code>.</p>
+
+ <p>It is not safe to call <code>CosDictPutKey()</code> during a call to <code>CosObjEnum()</code>
+ on that same dictionary (for example, from within the callback procedure).</p>
+
+ <p>An exception is raised if <code>val</code> is a direct non-scalar object
+ that is already contained in another dictionary, array, or stream,
+ or if <code>dict</code> and <code>val</code> belong to different documents.</p>
+
+ @param dict The dictionary or stream in which a value is set.
+ @param key The key whose value is set, represented as a string.
+ @param val The value to set.
+
+ @see CosDictPut
+ @see CosDictPutKey
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( void, CosDictPutKeyString, (CosObj dict, const char* key, CosObj val))
+
+/**
+ Removes a key-value pair from a dictionary. For more details, see <code>CosDictRemove()</code>.
+
+ @param dict The dictionary from which the key-value pair is removed.
+ @param key The key to remove, represented as a string.
+
+ @see CosDictRemove
+ @see CosDictRemoveKey
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC( void, CosDictRemoveKeyString, (CosObj dict, const char* key))
+
+
+/**
+ <p><i>Weak</i> and <i>strong</i> references.</p>
+
+ <p>When a Cos document is saved in full-save mode, objects that are
+ not accessible from the root of the document are destroyed. This
+ process uses a mark-and-sweep garbage collector: the root is marked,
+ and then every object to which it refers is marked, and so on. At
+ the end of this marking phase, objects that are not marked are
+ destroyed.</p>
+
+ <p>A so-called weak reference changes this policy: during the marking
+ phase, a reference that has been declared to be weak will not be
+ marked. For example, when a dictionary is marked, all its keys and
+ values are normally also marked. But if a certain key has been set as a weak
+ reference, then the corresponding value will not be marked. Consequently, if there
+ are no other references to that value, it will be destroyed.</p>
+
+ <p>A so-called strong reference also changes this policy, but in the
+ opposite direction. An object for which there is a strong reference
+ will be marked (and therefore will not be garbage-collected), even if
+ there is no path to the object from the root of the document, and even
+ if a weak reference exists for it.</p>
+
+ <p><code>CosDictSetWeakReference()</code> establishes or removes a weak reference from a dictionary.</p>
+
+ @param dict The dictionary containing the weak reference.
+ @param key The name of a key in the dictionary.
+ @param isWeak If <code>true</code>, the object stored in <code>dict</code> under <code>key</code> at the time
+ of every subsequent full-save garbage collection will not be marked as a component of the
+ dictionary. If there is no
+ other path to that object from the root of the document, then it will be garbage-
+ collected (destroyed) by garbage collection.
+ <p>It is not an error if there is no such value at the time of garbage collection or
+ at the time of the call to this function.</p>
+
+ <p>If <code>isWeak</code> is <code>false</code> (the default condition), then there is no such behavior,
+ and the value, if any, will be marked in the normal manner.
+ The case where <code>isWeak</code> is specified as <code>false</code> is intended primarily to reverse the
+ effect of a previous call in which <code>isWeak</code> was <code>true</code>.</p>
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(void, CosDictSetWeakReference, (CosObj dict, const char* key, ASBool isWeak))
+
+/**
+ Gets the state of a weak reference. For details, see <code>CosDictSetWeakReference()</code>.
+ @param dict A dictionary.
+ @param key The name of a key.
+ @return Returns the value of the <code>isWeak</code> parameter in the most recent call
+ to CosDictSetWeakReference() with these parameters, or <code>false</code> if there has been
+ no such call.
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASBool, CosDictIsWeakReference, (CosObj dict, const char* key))
+
+/**
+ Establishes or removes a weak reference from an array. For a description of weak references, see <code>CosDictSetWeakReference()</code>.
+
+ @param array An array.
+ @param n The index of the element that is the weak reference. Note
+ that the weak reference <i>travels</i> with the element; that is, if
+ an item is marked as a weak reference, and an item is subsequently
+ inserted before that item, the weak reference applies to the same
+ element as it did previously.
+ @param isWeak Sets a weak reference for an array.
+ @since PI_COS_VERSION >= 0x00070000
+
+*/
+NPROC(void, CosArraySetWeakReference, (CosObj array, ASInt32 n, ASBool isWeak))
+
+/**
+ Return the state of a weak reference in an array. See <code>CosDictIsWeakReference()</code> for details.
+ @param array An array.
+ @param n The index of an item in the array.
+ @return Returns the value of the <code>isWeak</code> parameter in the most recent call
+ to <code>CosArraySetWeakReference()</code> with these parameters, or <code>false</code> if there
+ has been no such call.
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASBool, CosArrayIsWeakReference, (CosObj array, ASInt32 n))
+
+/**
+ Create a strong reference for an object. For a description of strong references, see <code>CosDictSetWeakReference()</code>.
+
+ <p>For indirect objects and direct nonscalars, <code>CosObjAcquire()</code> increments an internal
+ reference count for <code>obj</code>. The reference count is used
+ by the garbage collector, which is invoked during a full-save of the document.
+ If the reference count is positive at the time of garbage collection (it is initially <code>0</code>), then the object
+ will not be garbage-collected, regardless of whether the object is accessible from
+ the root of the document.</p>
+ @param obj A Cos object.
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(void, CosObjAcquire, (CosObj obj))
+
+/**
+ <p>Removes a strong reference for an object. For a description of strong references, see <code>CosDictSetWeakReference()</code>.</p>
+
+ <p>For indirect objects and direct nonscalars, <code>CosObjRelease()</code> decrements an internal
+ reference count for <code>obj</code>. The reference count is used
+ by the garbage collector, which is invoked during a full-save of the document.
+ If the reference count is positive at the time of garbage collection (it is initially <code>0</code>), then the object
+ will not be garbage-collected, regardless of whether the object is accessible from
+ the root of the document.</p>
+ @param obj A Cos object.
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(void, CosObjRelease, (CosObj obj))
+
+/**
+ Creates a new name object associated with the specified
+ document and having the specified value.
+ @param dP The document in which the new name is used.
+ @param indirect If <code>true</code>, it creates the name as an indirect
+ object, and sets the document's <code>PDDocNeedsSave</code> flag (see
+ <code>PDDocFlags</code>) flag. If <code>false</code>, it creates the name as a direct
+ object.
+ @param namestring The name to create.
+ This routine will not create an <code>ASAtom</code> corresponding to <code>namestring</code>
+ and is generally more efficient than <code>CosNewName()</code>.
+ (<code>ASAtom</code> objects consume global memory that is not deallocated.)
+ @return The newly created name Cos object.
+ @see CosNewName
+ @see CosNameValue
+ @see CosCopyNameStringValue
+ @see CosObjDestroy
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(CosObj, CosNewNameFromString, (CosDoc dP, ASBool indirect, const char* namestring))
+
+/**
+ <p>Returns a newly allocated buffer containing a copy of the
+ Cos object's name as a <code>NULL</code>-terminated string. Upon return, <code>nBytes</code> contains the
+ number of bytes in the string. <code>CosCopyNameStringValue()</code>
+ never returns <code>NULL</code>; it raises an exception if the allocation
+ fails. The client is responsible for freeing the result
+ by calling <code>ASfree()</code>. </p>
+
+ <p>Unlike Cos strings, the strings corresponding to Cos names are
+ <code>NULL</code>-terminated.</p>
+
+ This routine will avoid creating an <code>ASAtom</code> corresponding to the object's
+ name and is generally more efficient than copying the value returned by
+ <code>ASAtomGetString(CosNameValue(obj))</code>. (<code>ASAtom</code> objects consume global memory that is not deallocated.)
+
+ <p>An out-of-memory exception is raised if insufficient memory is available.</p>
+
+ @param obj IN A Cos name object.
+ @param nBytes OUT The length of the name
+ of the Cos object, and therefore the length of the returned
+ string. <code>nBytes</code> may be <code>NULL</code> if you do not care
+ how many bytes are in the name.
+ @return A copy of the Cos object's name, as a <code>NULL</code>-terminated string.
+ @see CosNewName
+ @see CosNewNameFromString
+ @see CosNameValue
+ @see CosCopyStringValue
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(char *, CosCopyNameStringValue, (CosObj obj, ASTCount *nBytes))
+
+
+
+/**
+ Calls the specified procedure for each EOF in a given <code>CosDoc</code>.
+ For details, see <code>CosDocEnumEOFs()</code>. This is the same as <code>CosDocEnumEOFs()</code>,
+ except that the callback proc takes a
+ 64-bit file position instead of a 32-bit file position.
+ @param cosDoc The <code>CosDoc</code> in which the EOF's are enumerated.
+
+ @param proc The <code>CosDocEnumEOFsProc64()</code> to call for each EOF.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @return <code>true</code> if all of the calls to <code>proc</code> return <code>true</code>, <code>false</code> as soon
+ as a call to <code>proc</code> returns <code>false</code>.
+ @see CosDocEnumIndirect
+ @see CosDocEnumEOFs
+ @ingroup Enumerators
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASBool, CosDocEnumEOFs64, (CosDoc cosDoc, CosDocEnumEOFsProc64 proc, void * clientData))
+
+
+/**
+ <p>Tests whether the value of a Cos number is inside the range of 32-bit integers,
+ <code>[-2147483648, +2147483647]</code>. </p>
+ <p>If so, the 32-bit value may be obtained by calling <code>CosIntegerValue()</code>.</p>
+ <p>If not, the 64-bit value may be obtained by calling <code>CosIntegerValue64()</code>.</p>
+
+ <p>It raises an exception if <code>obj</code> is not a number (<code>CosInteger</code> or <code>CosReal</code>).</p>
+ @param obj A Cos integer or real number.
+ @return <code>true</code> if the value of the number is in the range of 32-bit integers,
+ <code>false</code> otherwise.
+ @see CosIntegerValue
+ @see CosIntegervalue64
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASBool, CosNumberIsWithinASInt32Range, (CosObj obj))
+
+
+/**
+ <p>Tests whether the value of a Cos number is inside the range of <code>ASFixed</code> numbers,
+ <code>[-32768.0, +32768.0)</code>. </p>
+ <p>If so, the <code>ASFixed</code> value may be obtained by calling CosFixedValue().</p>
+ <p>If not, the floating-point value may be obtained by calling CosFloatValue().</p>
+
+ It raises an exception if <code>obj</code> is not a number (<code>CosInteger</code> or <code>CosReal</code>).
+ @param obj A Cos integer or real number.
+ @return <code>true</code> if the value of the number is in the range of <code>ASFixed</code>,
+ <code>false</code> otherwise.
+ @see CosFixedValue
+ @see CosFloatValue
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASBool, CosNumberIsWithinASFixedRange, (CosObj obj))
+
+
+/**
+ Tests whether the definition of a specified Cos object,
+ in the file associated with the object's <code>CosDoc</code>, begins
+ within any of a set of byte ranges. For details, see <code>CosDocObjIsWithinRange()</code>.
+ This is the same as <code>CosDocObjIsWithinRange()</code>, except that the byte ranges are
+ 64-bit file positions instead of a 32-bit file positions.
+
+ <p>An exception is raised if <code>obj</code> is a direct object or <code>numEntries</code> is an odd number. </p>
+
+ @param obj The Cos object (must be indirect).
+ @param byteRanges An array containing pairs of byte offsets
+ within the document. Each pair is a start and end offset
+ from the beginning of the document.
+ @param numEntries The number of byte offsets (not pairs)
+ in the <code>byteRanges</code> array.
+ @return <code>true</code> if the object begins within any of the given ranges
+ and has not been modified, <code>false</code> otherwise.
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASBool, CosDocObjIsWithinRange64, (CosObj obj,
+ ASFilePos64 byteRanges[],
+ ASInt32 numEntries))
+
+/**
+ <p>Creates a new Cos stream, using data from an existing <code>ASStm</code>. For details, see <code>CosNewStream()</code>.</p>
+
+ <p>This is the same as <code>CosNewStream()</code>, except that <code>decodeLength</code> is a
+ 64-bit value instead of a 32-bit value, and <code>allowDelayedRead</code> enables
+ the implementation to avoid making an intermediate copy of the stream data.
+ This is useful when creating very large streams of data.</p>
+
+ @param dP The Cos document in which the newly created stream will be used.
+ @param indirect Must always be <code>true</code>, specifying that the
+ Cos stream is created as an indirect object.
+ @param stm The source stream containing the data to copy
+ into the new stream.
+ @param stmStartPos Starting position for the stream. Its default is <code>0</code>.
+ @param stmDataIsDecoded A boolean value indicating whether the data in <code>stm</code> should
+ be encoded using filters specified in <code>attributesDict</code>.
+ @param attributesDict Either the <code>NULL</code> Cos object, or a
+ direct Cos dictionary containing stream attributes.
+ @param encodeParms The parameters to be used by the filters
+ if the source data is to be encoded.
+ @param sourceLength The amount of data to be read from the source.
+ @param allowDelayedRead If this is
+ <code>true</code> and <code>stm</code> permits seek operations, then the data from <code>stm</code> will not be read during
+ this call, but rather at a subsequent time, and it may be read more
+ than once.
+
+ <p><b>Important:</b> In this case, the caller must not close <code>stm</code> until it is established, through
+ some independent mechanism, that the data will not be read again (see <code>ASProcStmRdOpenEx()</code> for further details on this feature).</p>
+
+ <p>If <code>allowDelayedRead</code> is <code>false</code>, the source data is copied during this call,
+ so the source stream may be closed after <code>CosNewStream64()</code> returns.</p>
+
+ @return The newly created stream Cos object.
+ @see CosNewStream
+ @see ASProcStmRdOpenEx
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(CosObj, CosNewStream64, (CosDoc dP,
+ ASBool indirect,
+ ASStm stm,
+ ASInt64 stmStartPos,
+ ASBool stmDataIsDecoded,
+ CosObj attributesDict,
+ CosObj encodeParms,
+ ASInt64 sourceLength,
+ ASBool allowDelayedRead))
+
+/**
+ <p>Gets the length of a Cos stream from the <code>Length</code> key in the
+ stream's attributes dictionary. See <code>CosStreamLength()</code> for details.
+ This is the same as <code>CosStreamLength()</code>, except that the return value is a
+ 64-bit integer instead of a 32-bit integer.</p>
+
+ <p>This has the same effect as calling
+ <code>CosInteger64Value(CosDictGetKeyString(stream, "Length"))</code></p>
+
+ <p>An exception is raised if the Length key is not found in the attributes dictionary, or if its value is not an integer.</p>
+
+ @param stream The stream whose length is obtained.
+ @return The length of the stream.
+ @see CosStreamDict
+ @see CosStreamLength
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASInt64, CosStreamLength64, (CosObj stream))
+
+/**
+ Gets the byte offset of the start of a Cos stream's data
+ in the PDF file. For details, see <code>CosStreamPos()</code>.
+ This is the same as <code>CosStreamPos()</code>, except that the return value is a
+ 64-bit file position instead of a 32-bit file position.
+ @param stream The stream whose current position is obtained.
+ @return The byte offset of the start of the Cos stream's data in
+ the PDF file.
+ @exception cosErrInvalidObj is raised if the stream object has not yet
+ been saved to the PDF file.
+ @see CosStreamPos
+ @see CosStreamLength
+ @since PI_COS_VERSION >= 0x00070000
+*/
+NPROC(ASFilePos64, CosStreamPos64, (CosObj stream))
+
+/**
+ Creates a new real-number object from a double-precision floating-point number
+ associated with the specified document.
+ @param dP The document in which the number is used.
+
+ @param indirect If <code>true</code>, it creates the real-number object
+ as an indirect object, and sets the document <code>dP</code> object's <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocFlags</code>). If <code>false</code>, it creates the number
+ as a direct object.
+ @param value The real number, represented as a double-precision floating-point number.
+ @return A Cos object of type <code>CosReal</code> (<code>CosFixed</code>).
+ @see CosDoubleValue
+ @see CosFloatValue
+ @see CosNewFloat
+ @see CosNewInteger
+ @see CosNewInteger64
+ @see CosNewFixed
+ @since PI_COS_VERSION >= 0x00090000
+*/
+NPROC(CosObj, CosNewDouble, (CosDoc dP, ASBool indirect, double value))
+
+/**
+ Creates a new real-number object from a double-precision floating-point number
+ associated with the specified document.
+ @param dP The document in which the number is used.
+
+ @param indirect If <code>true</code>, it creates the real-number object
+ as an indirect object, and sets the document <code>dP</code> object's <code>PDDocNeedsSave</code>
+ flag (see <code>PDDocFlags</code>). If <code>false</code>, it creates the number
+ as a direct object.
+ @param value The real number, represented as a double-precision floating-point number.
+ @param value The maximum number of significant digits to use when this object is written to a file.
+ Legal values are 6-13 for direct objects, 6-16 for indirect objects
+ @return A Cos object of type <code>CosReal</code> (<code>CosFixed</code>).
+ @see CosDoubleValue
+ @see CosFloatValue
+ @see CosNewFloat
+ @see CosNewInteger
+ @see CosNewInteger64
+ @see CosNewFixed
+ @since PI_COS_VERSION >= 0x00090000
+*/
+NPROC(CosObj, CosNewDoubleEx, (CosDoc dP, ASBool indirect, double value, ASUns8 numSigDigs))
+
+/**
+ <p>Gets the value of <code>obj</code> as a double-precision floating-point real number. </p>
+
+ <p>An exception is raised if the given object has the wrong Cos type.</p>
+
+ @param obj The object whose value is obtained. It must
+ have type <code>CosInteger</code> or <code>CosReal</code> (<code>CosFixed</code>). The result is undefined
+ if the real value is outside the range of floating-point numbers.
+ @return The numeric value of <code>obj</code>, represented as a floating-point number.
+ @see CosNewFloat
+ @see CosNewDouble
+ @see CosFloatValue
+ @see CosIntegerValue
+ @see CosInteger64Value
+ @see CosFixedValue
+ @since PI_COS_VERSION >= 0x00090000
+*/
+NPROC(double, CosDoubleValue, (CosObj obj))
+
+/**
+ <p>Tests whether the supplied <code>CosDoc</code> contains as extensions to ISO 32000 (aka ISO PDF) </p>
+
+ @param dP The Cos document to test.
+ @return <code>true</code> if the file contains an ISO 32000 Extensions dictionary, <code>false</code> otherwise.
+ @see CosDocGetAdobeExtensionLevel
+ @see CosDocSetAdobeExtensionLevel
+ @since PI_COS_VERSION >= 0x00090000
+*/
+NPROC(ASBool, CosDocHasISOExtensions, (CosDoc dP))
+
+/**
+ <p>Tests whether the supplied <code>CosDoc</code> contains Adobe extensions to ISO 32000 (aka ISO PDF),
+ and if so, returns the BaseVersion and ExtensionLevel</p>
+
+ @param dP IN The Cos document to test.
+ @param baseVersion OUT The PDF version on which the extensions are based (will be of type <code>CosName</code>).
+ @param extension OUT The level of the extension expressed as a monotonically increasing integer.
+ @return <code>true</code> if the file contains Adobe's ISO 32000 Extensions dictionary, <code>false</code> otherwise.
+ @see CosDocHasISOExtensions
+ @see CosDocSetAdobeExtensionLevel
+ @since PI_COS_VERSION >= 0x00090000
+*/
+NPROC(ASBool, CosDocGetAdobeExtensionLevel, (CosDoc dP, CosObj *baseVersion, ASUns32 *extension))
+
+/**
+ <p>Adds the necessary data structures to the supplied <code>CosDoc</code> to identify it as containing
+ Adobe extensions to ISO 32000 (aka ISO PDF)</p>
+
+ @param dP The Cos document to set.
+ @param baseVersion The PDF version on which the extensions are based (will be of type <code>CosName</code>).
+ @param extension The level of the extension expressed as a monotonically increasing integer.
+ @see CosDocHasISOExtensions
+ @see CosDocGetAdobeExtensionLevel
+ @since PI_COS_VERSION >= 0x00090000
+*/
+NPROC(void, CosDocSetAdobeExtensionLevel, (CosDoc dP, CosObj baseVersion, ASUns32 extension))
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynE.h
new file mode 100644
index 0000000..d7ee3e8
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynE.h
@@ -0,0 +1,19 @@
+/* CosSynE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "CosSynEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynEASF.h
new file mode 100644
index 0000000..d55f428
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/CosSynEASF.h
@@ -0,0 +1,122 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(cosSynErrNoError, "No syntax error.")
+
+DefineErr(cosSynErrNoHeader, "File does not begin with '%PDF-'.")
+
+DefineErr(cosSynErrNoEOF, "Missing %%EOF.")
+
+DefineErr(cosSynErrNoStartXRef, "Could not find startxref address.")
+
+DefineErr(cosSynErrNoStartAddress, "Value of startxref address not an integer.")
+
+DefineErr(cosSynErrBadXref, "Missing 'xref'.")
+
+DefineErr(cosSynErrBadXrefHeader, "Xref header should be two integers.")
+
+DefineErr(cosSynErrBadXrefEntry, "Error reading xref entry.")
+
+DefineErr(cosSynErrBadTrailerStart, "Trailer dictionary start missing '<<'.")
+
+DefineErr(cosSynErrBadObjectLabel, "Object label badly formatted.")
+
+DefineErr(cosSynErrUnknownName, "Unrecognized object name.")
+
+DefineErr(cosSynErrUnknownTokenType, "Unrecognized token type.")
+
+DefineErr(cosSynErrNoEndStream, "Missing endstream.")
+
+DefineErr(cosSynErrExtraEndStream, "Unexpected endstream.")
+
+DefineErr(cosSynErrUnterminatedString, "Unterminated string.")
+
+DefineErr(cosSynErrStringTooLong, "String too long.")
+
+DefineErr(cosSynErrTokenTooLong, "Token too long.")
+
+DefineErr(cosSynErrBadCharInHexString, "Non-hex character in a hex string.")
+
+DefineErr(cosSynErrUnexpectedType, "Unexpected token type.")
+
+DefineErr(cosSynErrImageNeverEnded, "End of image not found.")
+
+DefineErr(cosSynErrUnexpectedDict, "Unexpected end of dictionary.")
+
+DefineErr(cosSynErrUnexpectedArray, "Unexpected end of array.")
+
+DefineErr(cosSynErrBadDict, "Error reading dictionary.")
+
+DefineErr(cosSynErrBadObject, "Error reading object.")
+
+DefineErr(cosSynErrBadArrayDict, "Expected dictionary or array.")
+
+DefineErr(cosSynErrBadFRef, "Bad foreign object reference.")
+
+DefineErr(cosSynErrPStackUnderflow, "Parse stack underflow while reading object.")
+
+DefineErr(cosSynErrBadLinearized, "Error reading linearized hint data")
+
+DefineErr(cosSynErrBadHexCharInName, "Non-hex character after # in a name.")
+
+DefineErr(cosSynErrBadName, "Illegal characters in a name.")
+
+DefineErr(cosSynErrBadObjectRef, "An object reference is invalid.")
+
+DefineErr(cosSynErrBadXrefStream, "Error in XRef stream.")
+
+DefineErr(cosSynErrPrematureEOF, "Unexpected end of file.")
+
+DefineErr(cosSynErrBadStreamStart, "Expected CR and/or LF after 'stream'.")
+
+DefineErr(cosSynErrBadObjStream, "Error in object stream.")
+
+DefineErr(cosSynErrDictKeyNotName, "Dictionary keys must be direct name objects.")
+
+DefineErr(cosSynErrExpectedNull, "Expected the null object.")
+
+DefineErr(cosSynErrExpectedNumber, "Expected a number.")
+
+DefineErr(cosSynErrExpectedInteger, "Expected an integer.")
+
+DefineErr(cosSynErrExpectedReal, "Expected a real number.")
+
+DefineErr(cosSynErrExpectedUnsigned, "Expected a non-negative integer.")
+
+DefineErr(cosSynErrExpectedBoolean, "Expected true or false.")
+
+DefineErr(cosSynErrExpectedName, "Expected a name.")
+
+DefineErr(cosSynErrExpectedString, "Expected a string.")
+
+DefineErr(cosSynErrExpectedDict, "Expected a dictionary.")
+
+DefineErr(cosSynErrExpectedArray, "Expected an array.")
+
+DefineErr(cosSynErrExpectedStream, "Expected a stream.")
+
+DefineErr(cosSynErrIllegalStream, "Stream found in an illegal context.")
+
+DefineErr(cosSynErrNoLength, "Stream is missing a Length key.")
+
+DefineErr(cosSynErrExpectedIndirect, "Expected an indirect object")
+
+DefineErr(cosSynErrExpectedDirect, "Expected a direct object")
+
+DefineErr(cosSynErrIllegalIndRef, "Illegal indirect reference")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFT.h
new file mode 100644
index 0000000..ed7affb
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFT.h
@@ -0,0 +1,2021 @@
+/*************************************************************************
+ * DigSigHFT.h
+ *
+ * Copyright (c) 1998-2006 Adobe Systems Inc. All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains the
+ * property of Adobe Systems Incorporated and its suppliers, if any.
+ * The intellectual and technical concepts contained herein are
+ * proprietary to Adobe Systems Incorporated and its suppliers and may
+ * be covered by U.S. and Foreign Patents, patents in process, and are
+ * protected by trade secret or copyright law. Adobe permits you to
+ * use, modify, and distribute this file in accordance with the terms
+ * of the Adobe license agreement accompanying it. If you have
+ * received this file from a source other than Adobe, then your use,
+ * modification, or distribution of it requires the prior written
+ * permission of Adobe.
+ *
+ * Description:
+ *
+ * Digital Signature interface for Acrobat Digital Signature handlers.
+ * Handlers can register as <code>DigSig</code> handlers to provide digital
+ * signature services. Handlers can also call back into the DigSigHFT
+ * for various services.
+ *
+ * Update History: (most recent first)
+ * 21-Mar-2003 - Last known edit for Acrobat 6.0 SDK
+ * 05-Feb-2003 - Cleanup for Acrobat 6.0 SDK
+ * 10-Jan-2003 - Added handlerName parameter to some new calls
+ * 16-Dec-2002 - Acrobat 6.0 cleanup
+ * 31-Aug-2001 - Added SigSeedValue object
+ * 25-Aug-2000 - Add DigSigAP helper routines
+ * 01-Jul-2000 - Introduce EScript support
+ * 12-Nov-1998 - Export Compare Pages/Words to allow scripting
+ * 20-Mar-1998 - Created
+ ************************************************************************/
+
+
+/*************************************************************************
+ * OVERVIEW OF USAGE
+ *
+ * Digital signatures use a generic DigSig plugin supplied by Adobe, and one
+ * or more specific method plugins supplied by Adobe and third parties. This
+ * file defines the interface between DigSig and a specific method plugin,
+ * XxxxSig.
+ *
+ * Note that enriched support for public key digital signatures and encryption
+ * is available using the PubSecHFT, introduced in Acrobat 6.0.
+ * Developers are encouraged to use the PubSecHFT rather then DigSigHFT.
+ * The PubSec code uses DigSig for digital signature operations, but provides
+ * many additional benefits.
+ *
+ * The reader is assumed to be familiar with the Acrobat SDK Plug-in Guide.
+ *
+ * Upon startup of Acrobat, there is a 3-step initialization sequence,
+ * consisting of
+ * 1) all plug-ins export Host Function tables (HFTs)
+ * 2) all plug-ins import HFTs
+ * 3) all plug-ins perform initialization
+ * This sequence allows plugins to establish communication among themselves
+ * without being dependent on the order of loading. For digital signatures,
+ * the sequence is:
+ *
+ * 1) DigSig exports its HFT under the name "DigSigHFT"
+ * 2) XxxxSig imports the DigSig HFT
+ * YyyySig imports the DigSig HFT
+ * 3) XxxxSig calls DigSigRegisterFilter to handle signatures of
+ * type /Xxxx:PPK
+ * YyyySig calls DigSigRegisterFilter to handle signatures of
+ * type /Yyyy:Finger
+ * These registrations include passing to DigSig a struct of
+ * callback routines and other information.
+ * ...
+ * Eventually, the user opens a document.
+ * DigSig calls XxxxSig and YyyySig to notify them of the new document;
+ * they might allocate some storage or choose to automatically validate
+ * any of their respective signatures in the document. Note that auto-
+ * validation may encounter significant delays if it requires reading
+ * the entirety of a large document off a CD-ROM or over a network, or
+ * it requires accessing some signature registry or authority over a
+ * network; Adobe software will only access signatures at user request.
+ * 4) DigSig calls XxxxSig.docOpen()
+ * DigSig calls YyyySig.docOpen()
+ *
+ * If the user creates a signature field and does not specify a default
+ * signing method, DigSig handles that with no communication to the method
+ * plugins.
+ * DigSig creates the signature field dictionary
+ * DigSig creates the signature annotation dictionary
+ * DigSig creates the (blank) signature appearance dictionary
+ *
+ * Signaturre fields can also be created by the Forms plugin.
+ *
+ * If the user deletes a signature field, DigSig handles that with no
+ * communication to the method plugins.
+ *
+ * If the user creates a signature field and specifies a default method, that
+ * plugin is called to fill in default values:
+ * DigSig creates the signature field dictionary
+ * DigSig creates the signature annotation dictionary
+ * DigSig creates the (blank) signature appearance dictionary
+ * 5) DigSig calls XxxxSig.defaultValue
+ * XxxxSig creates the default signature value dictionary
+ * XxxxSig creates /DV in the signature field dictionary
+ * pointing to this
+ *
+ * If the user asks to sign a specific signature field using method XxxxSig,
+ * DigSig sequences the interaction. This sequence is now a four-step process
+ * (the routine names are all different so that you can write transitional code
+ * that includes both the old and new style interaction). The new interaction
+ * looks like this:
+ *
+ * Call XxxxSig.dsNewSigData -- Do any dialogs, gather
+ * signature, save in memory
+ * YOU MAY USE THE DV (default value)
+ * part of sigfield if sigfield is not COSNULL
+ * if !cancel
+ * Call XxxxSig.dsUnValidateSig on each signature
+ * Calculate /Changes
+ * Do save-as dialog for file name and OK/Cancel
+ * if !cancel
+ * Call XxxxSig.dsCommitSign -- Alter document in memory
+ * if !cancel
+ * Do any side effects on other fields
+ * Insert /Changes -- Save document on disk
+ * Do actual save -- Save document on disk
+ * if !cancel
+ * Call XxxxSig.dsFinishSign -- Update document on disk
+ * Call XxxxSig.dsFreeSigData -- Free up memory
+ *
+ * 6a) DigSig calls XxxxSig.dsNewSigData
+ * XxxxSig interacts with the user, and allows Cancel
+ * XxxxSig acquires the signature itself in a method-specific
+ * way. All information is saved in memory, without altering
+ * the document itself. This allows a later backout.
+ * 6b) If dsNewSigData does not cancel, DigSig prepares the document
+ * for saving. It first calls dsUnValidateSig on every
+ * signature in the document to put any over/underprinting in
+ * cannonical form. It then counts how many pages and fields
+ * have changed since any prior signature and records this.
+ * 6c) For a first signature, DigSig does the save-as dialog,
+ * allowing the user to select filename, optimization, and
+ * encryption. Or the user may cancel. Other than fatal errors
+ * such as out-of-disk-space, this is the point of no return.
+ *
+ * 6d) If the user does not cancel, DigSig calls XxxxSig.dsCommitSign
+ * to update the document with the actual signature.
+ * XxxxSig creates the signature dictionary, possibly using
+ * information in the signature field /DV dictionary; some
+ * portions have dummy values, at least including the /ByteRange
+ * and /Contents keys
+ * XxxxSig points /V in the signature field dictionary to this
+ * XxxxSig creates the /AP /N value in the signature annotation
+ * dictionary, using a method-specific visible representation of
+ * the signature, including a symbol signifying "unvalidated
+ * signature"
+ * XxxxSig may allocate dynamic storage for a marked array
+ * XxxxSig returns an array of "marked" COS objects that it
+ * cares about; this array includes at least the /ByteRange and
+ * /Contents value objects
+ * 7a) DigSig inserts the /Changes array from 6b.
+ * 7b) DigSig saves the PDF document to a file. For each Cos object in
+ * the marked array, DigSig records the objects byte offset and
+ * length in the file as written. The saved file may have objects
+ * encrypted by the Acrobat standard encryption handler, if the user
+ * so chooses.
+ * The very first time a document is signed, this save may rename
+ * the file and may invoke the Optimizer, Linearizer, and Garbage
+ * Collector. Upon return from the save, all COS objects are invalid,
+ * including those in the marked array. Also, all PD-level objects
+ * except the PDDoc are invalid. Signing methods must not depend on
+ * saving any such state between dsCommitSign and dsFinishSign. In
+ * particular, the byte offsets and lengths in the marked array are
+ * valid upon entry to doSign, but the COS objects are not. The order
+ * of entries is unchanged, however.
+ * [these COS objects will be rewritten by DigSig as
+ * CosNull before calling dsFinishSign.]
+ * 7c) DigSig calls XxxxSig.dsFinishSign, passing back in the marked array
+ * XxxxSig calculates the /ByteRange that it desires, using the
+ * byte offsets and lengths in the marked array.
+ * XxxxSig overwrites the marked /ByteRange value in the saved
+ * file, using the DigSigOverwriteIntArray or
+ * DigSigOverwriteBytes callback
+ * XxxxSig overwrites any other marked Cos objects it wants to
+ * XxxxSig calculates any document digest that it desires, using
+ * the DigSigFileGetEOF, DigSigFileSetPos, and DigSigFileRead
+ * callbacks; or it may use the DigSigMD5ByteRange callback
+ * XxxxSig obscures or encrypts this digest in a method-specific
+ * way
+ * XxxxSig overwrites the marked /Contents value in the saved
+ * file, using DigSigOverwriteHexstring or DigSigOverwriteBytes
+ * XxxxSig may delete dynamic storage for the marked array
+ * XxxxSig returns
+ * 8) DigSig calls XxxxSig.dsFreeSigData, which may free up any
+ * remaining storage
+ *
+ * If the user asks to validate one or more signature fields, DigSig sequences
+ * though them one at a time:
+ * 9) DigSig calls XxxxSig.validateSign
+ * XxxxSig re-calculates any document digest that it desires,
+ * using the DigSigFileGetEOF, DigSigFileSetPos, and
+ * DigSigFileRead callbacks; or it may use the DigSigMD5ByteRange
+ * callback
+ * XxxxSig compares this result to the stored one, and does any
+ * other method-specific checks it desires.
+ * XxxxSig optionally does a validation against some stored
+ * (network) registry.
+ * XxxxSig updates the /AP /N value in the signature annotation
+ * dictionary to show doublechecked/pass/fail symbol
+ * XxxxSig returns doublechecked/pass/fail
+ *
+ * The user may open more than one document at a time, and may switch between
+ * open documents at will.
+ *
+ * The user may ask to show a signature panel containing summary information
+ * for each signature in an open document. If multiple documents are open,
+ * there may be multiple panels, or a single panel may be repainted as the
+ * user switches between documents. DigSig manages updating the panel(s), but
+ * may call the respective method plugin for each signature to get information
+ * to display on the panel. For each signature, the signature panel has two
+ * levels of detail:
+ * 10a) CLOSED displays a doublechecked/pass/fail/unknown/blank icon and
+ * a line of text for each signature field in the document. The
+ * default text is the name of the person signing and the date and
+ * time of signing, displayed in a language-independent way.
+ * DigSig calls XxxxSig.validState to choose which icon to show
+ *
+ * 10b) OPEN displays an icon and line of text for each signature, then
+ * indented lines of further text, currently consistingof the name
+ * of the signer, date and time of signing, location of signing,
+ * reason for signing, and signing method
+ * DigSig calls XxxxSig.validState to choose which icon to show
+ *
+ * A method plugin may wish to asynchronously have the signature panel for
+ * a document updated (it might be doing validation as a background or
+ * idle-loop task). To do this, XxxxSig calls back to DigSigUpdatePanel
+ *
+ * Eventually, the user closes a document.
+ * 11) DigSig calls XxxxSig.docClose()
+ * DigSig calls YyyySig.docClose()
+ *
+ * Whenever a signature is created or verified, the method plugin may
+ * optionally alter the appearance of the signature in the document, for
+ * the purpose of displaying or printing. For example, it could change
+ * an overprinted question mark on an unverified signature to an underprinted
+ * logo for a verified signature. To help with this, DigSig provides an HFT
+ * callback DigSigGetStdXObj that returns an XObject for for a blank appearance,
+ * a queston mark, or a cross. These are suitable as targets of the Do operator
+ * in a signatures appearance stream.
+ *
+ * To avoid saving a signature to a file with an appearance of valid (rather
+ * than unvalidated), just before each file save DigSig loops through all the
+ * signature fields and calls the specific methods dsUnValidateSig entry. This
+ * routine may choose to restore the signatures appearance to the unvalidated
+ * state.
+ *
+ * The purpose of the /Changes array is to pre-calculate at each save whether
+ * any changes (other than the signature being applied) have been made to the
+ * document since the prior signature. This allows at subsequent document-open
+ * time the quick display of a warning symbol on the Signatures panel if the
+ * document was changed between any two signatures. The user may choose to
+ * roll back to the document to just before such a change and study the
+ * difference between that document and the final one. This warning was a strong
+ * customer request.
+ *
+ * There is now a constraint on the values in the /ByteRange array. This
+ * constraint allows DigSig to implement rollback to prior signatures:
+ * The largest offset + length value in the /ByteRange array
+ * for a given signature must be equal to the length of the PDF file
+ * containing that signature; i.e. it must equal offset + 1 of the
+ * "F" in the %%EOF at the end of the file.
+ * In addition, the following constraints are strongly encouraged:
+ * 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]
+ *
+ * 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 annotaiton by tabbing to it or by clicking it with
+ * the mouse, and that annotation is for a signature field, AcroForms calls
+ * DigSigDraw. bIsSelected is <code>true</code> if the anotaiton is selected.
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef _H_DigSigHFT
+#define _H_DigSigHFT
+
+#include "AF_ExpT.h" // Acroforms HFT
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/************************************************************************************
+ * DigSigHFT globals
+ ***********************************************************************************/
+/* ---- Global typedefs, consts, and enums ---- */
+#define DIGSIG_HFT_NAME "DigSigHFT"
+#define DIGSIG_HFT_LATEST_VERSION (0x00010000) //Not currently in use
+
+extern HFT gDigSigHFT;
+
+
+/** ESObject is an EScript object that is supported as of Acrobat 5.0
+ by the escript plug-in. The EScript HFT has not been exposed to
+ third party developers, thus you should use or assume <code>NULL</code> for
+ ESObject parameters. Signature support for EScript is available
+ only when using the PubSecHFT for public-key signatures.
+*/
+typedef struct _s_ESObjectRec ESObjectRec, *ESObject;
+
+/** Return values of <code>DS</code> calls (DSRetCode, or ASInt32). All negative
+ return values are considered exceptions. If the value is kDSException,
+ exception text should be available from the called routine. If
+ this exception text is <code>NULL</code>, it should be considered an unknown error.
+*/
+typedef ASInt32 DSRetCode;
+
+/**
+ Get the exception string. When this is returned,
+ the exception text should be available from the called
+ routine. If the exception text is <code>NULL</code>, it is
+ considered to be an unknown error.
+*/
+#define kDSException -2
+/**
+ Error in a parameter to the function call. There is no
+ exception string.
+*/
+#define kDSParameterError -1
+/** A boolean return value. */
+#define kDSFalse 0
+/** A boolean return value. */
+#define kDSTrue 1
+/** Success. */
+#define kDSOk 1
+
+/*************************************************************************
+ * SigInfo properites
+ * These are common properties found in the sigInfo ASCab
+ * Plug-ins that want to add their own properties to this object
+ * should do so within their own namespace (eg. 'Acme:contactInfo').
+ ************************************************************************/
+
+/* EScript SigInfo object name */
+#define SIGINFO_OBJ "SigInfo"
+/* Private data name of ASCab entry in sigInfo ESObject */
+#define ESOBJ_SigInfo "signatureInfo"
+
+/* ASText properties */
+#define PROP_SigInfo_Name "name"
+#define PROP_SigInfo_Reason "reason"
+#define PROP_SigInfo_Location "location"
+#define PROP_SigInfo_Date "date" /* in PDF date format */
+#define PROP_SigInfo_VerifyDate "verifyDate" /* in PDF date format, new in A7 */
+#define PROP_SigInfo_StatusText "statusText"
+#define PROP_SigInfo_Subfilter "subFilter"
+#define PROP_SigInfo_Handler "handlerName" /* name specifed by /Filter */
+#define PROP_SigInfo_HandlerUIName "handlerUIName"
+#define PROP_SigInfo_HandlerUserName "handlerUserName" /* same as handlerUIName */
+#define PROP_SigInfo_VerifyHandler "verifyHandlerName" /* name of handler used to validate signature */
+#define PROP_SigInfo_VerifyHandlerUIName "verifyHandlerUIName"
+#define PROP_SigInfo_MDP "mdp"
+
+/* ASText properties used only for Public key signatures */
+#define PROP_SigInfo_ContactInfo "contactInfo"
+#define PROP_SigInfo_Appearance "appearance" /* write-only */
+#define PROP_SigInfo_Password "password" /* write-only */
+#define PROP_SigInfo_SignFormat "subFilter"
+#define PROP_SigInfo_TimeStamp "timeStamp"
+#define PROP_SigInfo_HashAlgo "digestMethod"
+
+/* ASInt32 properties */
+#define PROP_SigInfo_Revision "revision"
+#define PROP_SigInfo_NumRevisions "numRevisions"
+#define PROP_SigInfo_Status "status"
+#define PROP_SigInfo_NumPagesAltered "numPagesAltered"
+#define PROP_SigInfo_NumFieldsAltered "numFieldsAltered"
+#define PROP_SigInfo_NumFieldsFilledIn "numFieldsFilledIn"
+#define PROP_SigInfo_ByteRange "byteRange" /* array of ASInt32 */
+#define PROP_SigInfo_docValidity "docValidity" /* result of byte range test (value is DSSigValState) */
+#define PROP_SigInfo_objValidity "objValidity" /* result of MDP test (value is DSSigValState) */
+#define PROP_SigInfo_idValidity "idValidity" /* result of id validity test (value is DSValidState) */
+#define PROP_SigInfo_idPrivValidity "idPrivValidity" /* result of handler id validity test (value is handler specific) */
+#define PROP_SigInfo_trustFlags "trustFlags" /* contains a PSSigTrust, which is defined in PubSecHFT.h */
+
+/* ESObjects properties. Implemented in PubSec. */
+#define PROP_SigInfo_Certificates "certificates"
+#define PROP_SigInfo_BuildInfo "buildInfo"
+
+/* Values for the mdp property of a SigInfo Object. See PSSigMDPType enum. */
+#define PROP_MDPType_AllowAll "allowAll"
+#define PROP_MDPType_AllowNone "allowNone"
+#define PROP_MDPType_Default "default"
+#define PROP_MDPType_DefaultAndComments "defaultAndComments"
+
+/* Ubiquity Rights array of ASText. See PDF Reference. */
+#define PROP_SigInfo_AppRightsDoc "appRightsDocument"
+#define PROP_SigInfo_AppRightsForm "appRightsForm"
+#define PROP_SigInfo_AppRightsSignature "appRightsSignature"
+#define PROP_SigInfo_AppRightsAnnots "appRightsAnnots"
+#define PROP_SigInfo_AppRightsFormEx "appRightsFormEx"
+#define PROP_SigInfo_AppRightsAnnotsEx "appRightsAnnotsEx"
+#define PROP_SigInfo_AppRightsEF "appRightsEF"
+
+/* ASBool properties */
+#define PROP_SigInfo_DateTrusted "dateTrusted" /* boolean indicating if date is from a trusted source, new in A7 */
+
+/* binary properties */
+#define PROP_SigInfo_SigValue "sigValue"
+
+#define PROP_SigInfo_RevInfo "revInfo"
+#define PROP_SigInfo_RevInfo_OCSP "OCSP"
+#define PROP_SigInfo_RevInfo_CRL "CRL"
+
+/* LockDocument properties */
+#define PROP_LockValue_False "false"
+#define PROP_LockValue_True "true"
+#define PROP_LockValue_Auto "auto"
+
+/** Enum of all possible PROP_SigInfo_docValidity and PROP_SigInfo_objValidity values (document/data/object hash validity states). */
+typedef enum {
+ /** Validity is not yet determined. */
+ kDSSigValUnknown=0,
+ /** Validity could not be determined because of error. */
+ kDSSigValUnknownTrouble,
+ /** Validity could not be determined because all bytes are not ready. */
+ kDSSigValUnknownBytesNotReady,
+ /** Validation has been attempted, but there were errors that meant the signature
+ could not be validated, with the conclusion that the result is invalid. */
+ kDSSigValInvalidTrouble,
+ /** Validity for this digest is not used (for example, there is no document validity if there is no byte range). */
+ kDSSigValUnused,
+ /** The signature was just signed, so it is implicitly valid. */
+ kDSSigValJustSigned,
+ /** The signature document/object digest is invalid. */
+ kDSSigValFalse,
+ /** The signature document/object digest is valid. */
+ kDSSigValTrue,
+ /** The size of the <code>DSSigValState</code> enumeration. */
+ kDSSigValEnumSize
+} DSSigValState;
+
+
+/*************************************************************************
+ * SigSeedValue properites
+ * These are common properties found in the seedValue ASCab
+ * This ASCab is destroyed when the seedValue object is destroyed,
+ * so plug-ins should uses this object whenever adding private data.
+ * Plug-ins that want to add their own properties to this object
+ * should do so within their own namespace (eg. 'PPKAcme:issuerDN').
+ * See the Acrobat JavaScript guide for a more complete description
+ * of these properties.
+ ************************************************************************/
+
+/** The private data name of the ASCab entry in the seed value ESObject. */
+#define ESOBJ_SigSeedValue "sigSeedValue"
+
+/** An ASAtom giving the name of the required handler to use when signing. */
+#define PROP_SigSeedValue_Filter "filter"
+/** An ASAtom array giving the names of acceptable signing formats. */
+#define PROP_SigSeedValue_SubFilter "subFilter"
+/** A string specifying the hashing algorithm. */
+#define PROP_SigSeedValue_DigestMethod "digestMethod"
+/** A <code>double</code> indicating the required revision of the handler. */
+#define PROP_SigSeedValue_Version "version"
+/** An ASText array of reasons for signing. */
+#define PROP_SigSeedValue_Reasons "reasons" /* array */
+/** A string giving the Modification Detection and Prevention (MDP) parameters. */
+#define PROP_SigSeedValue_MDP "mdp"
+/** An ASText array of legal attestations for MDP signing. */
+#define PROP_SigSeedValue_Attestations "legalAttestations" /* array */
+/** Lock properties. */
+#define PROP_SigSeedValue_Lock "lockDocument" /* boolean */
+/** Appearance filter. */
+#define PROP_SigSeedValue_AppearanceFilter "appearanceFilter" /* string */
+/** <code>ASInt32</code> flags. */
+#define PROP_SigSeedValue_Flags "flags"
+
+/*************************************************************************
+ * GetSigDictProp properites
+ * These are common properties found in the ASCab that is returned
+ * by GetSigDictProp. These values are used by DigSig for display
+ * purposes (eg AVPanel, tooltips, or whatever). If a value
+ * is not present then DigSig will determine the value on its own,
+ * using alternate mechanisms. For example if PROP_DSSigProp_Date is not present then DigSig
+ * looks in the /M field of the SigDict to get the date. The ASCab
+ * should be cached by the <code>DigSig</code> handler
+ ************************************************************************/
+
+/* ASText properties */
+#define PROP_DSSigProp_Date "M" /* PDF Date format, time of signing */
+#define PROP_DSSigProp_VerifyDate "VerifyDate" /* PDF Date format, time of verification, new in Acrobat 7 */
+#define PROP_DSSigProp_Name "Name" /* Common name of signer */
+#define PROP_DSSigProp_IssuerCN "IssuerCN" /* Common name of issuer */
+#define PROP_DSSigProp_SubjectOrg "SubjectOrg" /* Organisation of signer */
+#define PROP_DSSigProp_SigValTextSummary "SigValTextTop" /* Summary signature validity text, to append to AVPanel sig title */
+#define PROP_DSSigProp_SigValTextDetail "SigValTextDetail" /* Sig validity detail title line */
+#define PROP_DSSigProp_SigValTextDetails "SigValTextDetails" /* ASCab array of ASText sig validity details */
+#define PROP_DSSigProp_SigValTextTooltip "SigValTextTooltip" /* Signature validity text to show in tooltip */
+#define PROP_DSSigProp_ErrText "ErrorText" /* Error text, present only if there was error while validating,
+ new in Acrobat 7 */
+#define PROP_DSSigProp_SigValue "sigValue"
+#define PROP_DSSigProp_RevInfo "revInfo"
+#define PROP_DSSigProp_RevInfo_CRL "CRL"
+#define PROP_DSSigProp_RevInfo_OCSP "OCSP"
+
+#define PROP_DSSigProp_HashAlgo "digestMethod" /* Hashing algorithm used to hash the document. Can be empty, new in Acrobat 8 */
+
+/* ASBool properties */
+#define PROP_DSSigProp_TrustedDate "Trusted_M" /* indicates whether the signing time was from a trusted time
+ source or not. If the key is not present, its assumed it
+ was from an untrusted (e.g. system) source, new in Acrobat 7 */
+
+#define PROP_DSSigProp_IconState "ADBE:sigIconState" /* If you want to put this entry in your plugins' signature properties cab please make sure
+ you use the DSSigPropIconState enum below for its values. This will ensure that DigSig use the
+ appropriate icons (in sync with your plugins') to represent the signature's state.
+ If you do not provide this value, DigSig will use validity icons according to what
+ it thinks is the validity status of the signature. */
+#define PROP_DSSigProp_DisplayOnPageIcon "ADBE:sigDisplayOnPageIcon" /* only use the values enumerated below. Default is kDSDisplayOnPageIconAlways. */
+typedef enum {
+ kDSDisplayOnPageIconAlways = 0,
+ kDSDisplayOnPageIconExceptWhenValid,
+ kDSDisplayOnPageIconNever,
+ kDSDisplayOnPageIconEnumSize
+} DSSigPropDisplayOnPageIcon;
+
+
+typedef enum {
+ kDSSigIconBlank=0, // sig field is unsigned
+ kDSSigIconSigUnknown, // sig field is signed but not validated
+ kDSSigIconSigInvalid, // sig field is signed and failed validate
+ kDSSigIconSigValidIdUnknown, // sig field is signed and doc is valid, but identity is unknown or not trusted
+ kDSSigIconSigValidIdUnknownModAfter, // sig field is signed, but identity is unknown or not trusted and mods have been made since sig applied
+ kDSSigIconSigValid, // sig field is signed and double-checked valid
+ kDSSigIconSigValidModAfter, // sig field is signed and double check valid, but mods have been made since sig applied
+ kDSSigIconSigValidTrailingModsAfter, // sig field is signed and double check valid, but mods have been made since sig applied -- *AND* sig is the last sig in the document
+ kDSSigIconAuthUnknown, // sig field is auth signed but not validated
+ kDSSigIconAuthInvalid, // sig field is auth signed and failed validate
+ kDSSigIconAuthValidIdUnknown, // sig field is auth signed and doc is valid, but identity is unknown or not trusted
+ kDSSigIconAuthValidIdUnknownModAfter, // sig field is auth signed, but identity is unknown or not trusted and mods have been made since sig applied
+ kDSSigIconAuthValid, // sig field is auth signed and double-check valid
+ kDSSigIconAuthValidModAfter, // sig field is auth signed and double check valid, but mods have been made since sig applied
+ kDSSigIconEnumSize
+} DSSigPropIconState;
+
+/*************************************************************************
+ * DigSigOffset record
+ * Used to tell XxxxSig where objects landed in saved file
+ ************************************************************************/
+/**
+ A structure that indicates the location of objects in a saved
+ PDF document.
+ @see DSClearSigProc
+ @see DSFinishSignProc
+ @see DigSigCosObjOverwrite
+ @see DigSigOverwriteBytes
+ @see DigSigOverwriteHexstring
+ @see DigSigOverwriteIntArray
+*/
+typedef struct _t_DigSigOffsetRec {
+ /** The CosObj whose byte offset/length is desired. */
+ CosObj cosObj;
+ /** The byte offset in the saved PDF file. Its range is <code>0</code> to <code>2147483647</code>. */
+ ASInt32 byteOffset;
+ /** The length in the saved PDF file. Its range is <code>0</code> to <code>2147483647</code>. */
+ ASInt32 byteLength;
+} DigSigOffsetRec, *DigSigOffset;
+
+
+/** A signature annotation bounding box.
+ @see DSNewSigDataProc
+*/
+typedef struct _t_DigSigBBoxRec {
+ /** The width of the signature bounding box. */
+ ASFixed bbWidth;
+ /** The height of the signature bounding box. */
+ ASFixed bbHeight;
+} DigSigBBoxRec, *DigSigBBox;
+
+
+/** A validity state constant for a signature field, resulting from verification.
+ @see DigSigVerifySig
+ @see DSGetValidStateProc
+ @see DSValidateSigProc
+*/
+typedef enum {
+ /** The signature field is unsigned. */
+ DSSigBlank=0,
+ /** The signature field is signed but not validated. */
+ DSSigUnknown,
+ /** The signature field is signed but failed validation. */
+ DSSigInvalid,
+ /** The signature field is signed and valid. */
+ DSSigValid,
+ /** The signature field is signed and double-checked as valid. */
+ DSSigDoubleChecked,
+ /**
+ A validity state constant for a signature field, resulting
+ from verification.
+*/
+ DSSigValidStateEnumSize
+} DSValidState;
+
+/** A structure describing the appearance of a digital signature.
+ @see DSUnValidateSigProc
+ @see DigSigGetStdXObj
+*/
+typedef enum {
+ /** Blank appearance. */
+ DSBlankXObj=0,
+ /** Signed but not validated appearance. */
+ DSUnknownXObj,
+ /** Signed and failed validation appearance. */
+ DSInvalidXObj,
+ /** Signed and valid, but the identity is not verified. */
+ DSValidXObj,
+ /** Signed and valid, and the identity is verified. */
+ DSDoubleCheckedXObj
+} DSXObjType;
+
+/** A return type for the DigSig and PubSec callbacks.
+ @see DSNewSigDataExProc
+ @see DSNewSigDataWithParamsProc
+*/
+typedef enum {
+ /** Do not proceed with signing. */
+ DSSignCancel=0,
+ /** Save over old file. */
+ DSSignSave,
+ /** Save into new file. */
+ DSSignSaveAs,
+ /** No save option is specified (new in Acrobat 6). */
+// DSSignNone,
+ /** The size of the <code>DSSaveType</code> enumeration. */
+ DSSaveTypeEnumSize
+} DSSaveType;
+
+/** Constants that specify the method to use for creating a signature digest. */
+typedef enum {
+ /** */
+ kDSDigestNone=0,
+ /** */
+ kDSDigestMD5,
+ /** */
+ kDSDigestSHA1,
+ /** */
+ kDSDigestSHA256, // Support added in Acrobat 7.0
+ /** */
+ kDSDigestSHA384, // Support added in Acrobat 8.0
+ /** */
+ kDSDigestSHA512, // Support added in Acrobat 8.0
+ /** */
+ kDSDigestRIPEMD160, // Support added in Acrobat 8.0
+ /** The size of the <code>DSDigestMethod</code> enumeration. */
+ kDSDigestEnumSize
+} DSDigestMethod;
+
+/** Signature value encodings for public key signatures.
+ It is a parameter to DigSigDataSigSign() and DigSigDataSigValidate().
+ @see DigSigDataSigSign
+ @see DigSigDataSigValidate
+*/
+typedef enum {
+ /** Not specified. */
+ kDSSigEncodeNone=0,
+ /** PKCS#1 encoding. */
+ kDSSigEncodePKCS1,
+ /** PKCS#7 encoding. This will apply the signature to an SHA1 digest of the data..
+ This is now deprecated. Use <code>kDSSigEncodePKCS7Detached</code> instead.
+ */
+ kDSSigEncodePKCS7,
+ /** The digest is directly encrypted.
+ This has never worked before and is now deprecated.
+ */
+ kDSSigEncodeRawSig,
+ /** PKCS#7 encoding. Unlike <code>kDSSigEncodePKCS7</code>, the signature is directly applied
+ to the data.
+ */
+ kDSSigEncodePKCS7Detached,
+ /** The size of the <code>DSSigEncode</code> enumeration. */
+ kDSSigEncodeEnumSize
+} DSSigEncode;
+
+/** Modification, detection, and prevention (MDP) options.
+*/
+typedef enum {
+ /** No MDP. The document does not have a signature. In versions earlier than Acrobat 9.0,
+ this status is returned for a document that does not have an author signature, but does have an ordinary signature.
+ In Acrobat 9.0 and later, any signature will invoke MDP analysis of all subsequent changes. */
+ kDSMDPNone = -1,
+ /** Allow any changes (disables the MDP feature). */
+ kDSMDPAllowAll=0,
+ /** Allow no changes. */
+ kDSMDPAllowNone,
+ /** Only allow <i>natural</i> changes (form field fill-in, page spawning). */
+ kDSMDPDefault,
+ /** Allow all comment types and edit/modify/delete operations, in addition to default changes. */
+ kDSMDPCommentsAndDefault,
+ /** The size of the <code>DSMDPType</code> enumeration. */
+ kDSMDPEnumSize
+} DSMDPType;
+
+/** Boolean properties of a <code>DigSigHandler</code>, obtained with <code>DSGetBoolPropertyProc()</code>,
+ that show whether the handler supports specific functionality.
+ @see DSGetBoolPropertyProc
+*/
+typedef enum {
+ /** When <code>true</code>, the handler supports author signatures. */
+ kDSHandlerCanDocAuthSign=0,
+ /** When <code>true</code>, the handler supports ordinary visible signatures. */
+ kDSHandlerCanDocPDDocSignVisible,
+ /** When <code>true</code>, the handler supports EScript. */
+ kDSHandlerEScriptAware,
+ /** The size of the <code>DSHandlerProperty</code> enumeration. */
+ kDSHandlerPropEnumSize
+} DSHandlerProperty;
+
+/** Constants that specify what dialog box to show.
+*/
+typedef enum {
+ /** Do not show the signature properties dialog box. */
+ kDSPropNone=0,
+ /** Show the general signature properties dialog box. */
+ kDSPropSignature,
+ /** Show the legal notice dialog box. */
+ kDSPropLegal,
+ /** Show the signature rollback (it will actually roll back to this signature). */
+ kDSPropViewVersion,
+ /** The size of the <code>DSPropertyType</code> enumeration. */
+ kDSPropTypeEnumSize
+} DSPropertyType;
+
+/** Parameters for <code>DSNewSigDataWithParamsProc()</code>.
+ @see DSNewSigDataWithParamsProc
+*/
+typedef struct _t_DigSigNewSigDataParamsRec {
+ /** The size of the data structure. It must be set to
+ <code>sizeof(DigSigNewSigDataParamsRec)</code>. */
+ ASSize_t size;
+
+ /** The PDF document that is being signed. */
+ PDDoc pdDoc;
+ /** The signature form field that is being signed. */
+ CosObj sigField;
+ /** The signature annotation that is being signed (it is usually equivalent to <code>sigField</code>). */
+ CosObj sigAnnot;
+ /** The bounding box of the signature appearance. */
+ DigSigBBox bb;
+
+ /** The name of the selected handler to use when signing. */
+ ASAtom filter;
+ /** Used internally. If specified, then use it to sign; otherwise use the engine that belongs to the default user interface. */
+ ESObject esSigEngine;
+ /** Used internally. If specified, it provides parameters to use when signing. */
+ ESObject esSigParams;
+ /** Used internally. If it is not <code>NULL</code> and there is an error that needs reporting for EScript, set it here and return DSSignCancel. */
+ ASText esErrorText;
+ /** If <code>true</code>, prompt to sign, otherwise be silent (it can be <code>true</code> with Escript.) */
+ ASBool bUI;
+ /** When <code>true</code>, the document is being signed with an author signature. */
+ ASBool bDocAuthSig;
+ /** Legal PDF scrubber warnings, populated only when signing a document author signature.*/
+ CosObj legalPDFDict;
+ /** Modification, detection, and prevention (MDP) setting, populated
+ only when signing a document author signature. It has one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>kDSMDPAllowAll</code></TD><TD>Allow all changes (disables MDP).</TD></TR>
+ <TR><TD><code>kDSMDPAllowNone</code></TD><TD>Allow no changes.</TD></TR>
+ <TR><TD><code>kDSMDPDefault</code></TD><TD>Allow only <i>natural</i> changes (form field filling, page spawning).</TD></TR>
+ <TR><TD><code>kDSMDPCommentsAndDefault</code></TD><TD>Allow all comment types and edit/modify/delete, in addition to default changes.</TD></TR>
+ </TABLE>
+ */
+ DSMDPType mdpSetting;
+ /** Signifies whether user rights are being applied to the document. It is mutually exclusive with <code>bDocAuthSig</code>. */
+ ASBool bUBSig;
+ /* Parameters for signing with user rights. */
+ CosObj urdDict;
+} DigSigNewSigDataParamsRec, *DigSigNewSigDataParams;
+
+
+/** The type of <code>CosDoc</code> signature. */
+typedef enum {
+ /** A CosDoc signature. */
+ kDSObjCosDoc=0,
+ /** Usage rights. */
+ kDSObjUbiquity,
+ /** The size of the <code>DSCosDocSigObjType</code> enumeration. */
+ kDSObjEnumSize
+} DSCosDocSigObjType;
+
+/** Parameters passed in to <code>DSCosDocSigSign()</code> and <code>DSCosDocSigValidate()</code> procs.
+ Certain parameters vary depending on what <code>DSCosDocSigObjType</code> <code>objSigType</code> is set to.
+
+ <p>If <code>objSigType</code> is <code>kDSObjCosDoc</code>:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Parameter</TH><TH>Description</TH></TR>
+ <TR><TD><code>objSignParams</code></TD><TD>None.</TD></TR>
+ <TR><TD><code>pdDoc</code></TD><TD>Used for window parenting when available, otherwise it is <code>NULL</code> (this would be the active document, and not necessarily the document to which the <code>CosDoc</code> belongs).</TD></TR>
+ <TR><TD><code>cosDoc</code></TD><TD>The CosDoc that is to be signed.</TD></TR>
+ </TABLE>
+
+
+ <p>If <code>objSigType</code> is <code>kDSObjUbiquity</code>:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Parameter</TH><TH>Description</TH></TR>
+ <TR><TD><code>objSignParams</code></TD><TD>A CosDict containing the usage rights sub-options for form filling, annotation changes, page template spawning, and so on. Look at the URD specification in the <i>PDF Reference</i> 1.5, section 8.7.2 for the precise syntax of CosDict and the keys within.</TD></TR>
+ <TR><TD><code>pdDoc</code></TD><TD>Indicates the <code>PDDoc</code> to which usage rights are applied.</TD></TR>
+ <TR><TD><code>cosDoc</code></TD><TD>Ignored.</TD></TR>
+ </TABLE>
+
+ @see DSCosDocSigSign
+ @see DSCosDocSigValidate
+*/
+typedef struct _t_DigSigCosDocSigParamsRec {
+ /** The size of this <code>struct</code>. */
+ ASSize_t size;
+ /** The associated PDDoc, if needed. See DigSigCosDocSigParamsRec
+ for more details.
+ */
+ PDDoc pdDoc;
+ /** The CosDoc to be signed, if needed. See DigSigCosDocSigParamsRec
+ for more details.
+ */
+ CosDoc cosDoc;
+
+ /** The name of the selected handler to use when signing or validating. */
+ ASAtom filter;
+ /** If specified, then use it to sign, otherwise use the engine that belongs to the default user interface. */
+ ESObject esSigEngine;
+ /** If specified, then provides parameters to use when signing. */
+ ASCab sigParamsCab;
+ /** If <code>0</code> then be silent, otherwise prompt the user to sign (it can be <code>true</code> even with escript). If <code>1</code> then use a simple user interface, otherwise use a complex user interface. */
+ ASInt32 uiType;
+
+ /** Dialog title to use when signing. The object is owned by <code>DigSig</code>. */
+ ASText signDialogTitle;
+ /** The message to use when acquiring resources for signing. The object is owned by <code>DigSig</code>. */
+ ASText promptMessage;
+ /** If an exception occurs, this returns the exception string. The caller must call <code>ASTextDestroy()</code>. */
+ ASText asTextError;
+
+ /** The type of <code>CosDoc</code> signature. */
+ DSCosDocSigObjType objSigType;
+ /** The associated <code>objSigParams</code>, if needed. See DigSigCosDocSigParamsRec
+ for more details.
+ */
+ void *objSigParams;
+} DigSigCosDocSigParamsRec, *DigSigCosDocSigParams;
+
+typedef struct _t_DigSigDataParamsRec {
+ /** The size of this <code>struct</code>. */
+ ASSize_t size;
+ /** A pointer to the data to be processed. */
+ ASUns8* inDataPtr;
+ /** The size of the data to be processed. */
+ ASUns32 inDataSize;
+ /** The resulting object value, to be freed using <code>ASfree()</code> by the caller. */
+ ASUns8* outDataPtr;
+ /** The size of the resulting object. */
+ ASUns32 outDataSize;
+ /** If an exception occurs, this returns the exception string. The caller must call <code>ASTextDestroy()</code>. */
+ ASText outASTextError;
+
+} DigSigDataParamsRec, *DigSigDataParams;
+
+typedef struct _t_DigSigDataBufferSigNewParamsRec {
+ /** The size of this <code>struct</code>. */
+ ASSize_t size;
+
+ /** Used for window parenting. */
+ PDDoc inPDDoc;
+ /** The name of the selected handler to use when signing. It must set to <code>ASAtomNull</code> if it is not defined.
+ Upon the signature being applied, this will be set to the name of the filter that was used to sign. */
+ ASAtom filter;
+ /** If specified, use it to sign, otherwise use the engine that belongs to the default user interface. */
+ ESObject inESSigEngine;
+ /** If specified, it provides parameters to use when signing. */
+ ESObject inESSigParams;
+ /** When signing, if it is not none, then the data is to be digested and the digest is to be signed; otherwise directly sign the data. */
+ DSDigestMethod inDigestMethod;
+ /** Specifies signature value encoding. */
+ DSSigEncode inSigValueEncoding;
+ /* Seed value information. */
+ ASCab inSeedValue;
+ /** The name of the data that is being signed. */
+ ASText inDataTitle;
+ /** The description of the data that is being signed. */
+ ASText inDataDescription;
+ /** The dialog box title to use when signing. The object is owned by <code>DigSig</code>. */
+ ASText inSignDialogTitle;
+ /** The message to use when acquiring resources for signing. The object is owned by <code>DigSig</code>. */
+ ASText inPromptMessage;
+ /** If this is greater than <code>0</code>, prompt the user to sign; otherwise be silent (it can be <code>true</code> even with EScript). */
+ ASInt32 inNUI;
+ /** The callback to display data that is being signed. */
+ void* inDataDisplayCallbackProc;
+
+ /** The certificate chain of the signer. It must be an initialized <code>ASCab</code>. It is returned by the <code>sigNew</code> call. */
+ ASCab outCertChainCab;
+ /** Signature properties. It must be an initialized <code>ASCab</code>.
+ Refer to <code>PROP_SigProp_*</code> definitions in PubSecHFT.h for defined properties.
+ It is returned by a <code>sigNew</code> call. */
+ ASCab outSigPropCab;
+ /** Signature build information. It must be an initialized <code>ASCab</code>.
+ Refer to <code>PROP_SigBuild*</code> definitions in PubSecHFT.h for defined properties.
+ It is returned by a <code>sigNew</code> call. */
+ ASCab outSigBuildCab;
+ /** If an exception occurs, this returns the exception string. The caller must call <code>ASTextDestroy()</code>. */
+ ASText outASTextError;
+
+} DigSigDataBufferSigNewParamsRec, *DigSigDataBufferSigNewParams;
+
+
+/** Callback function used to verify all references used by the data signature.
+ It is only called if the core signature is valid.
+ @return <code>true</code> if the other resources are valid. */
+typedef ASBool (VerifyRefCallbackProc)(void* callbackData);
+
+
+typedef struct _t_DigSigDataBufferSigValidateParamsRec {
+ /** The size of this <code>struct</code>. */
+ ASSize_t size;
+
+ /** Used for window parenting */
+ PDDoc inPDDoc;
+ /** The name of the selected handler to use when verifying. It must be set to ASAtomNull if it is not defined. */
+ ASAtom filter;
+ /** If specified, use it to verify; otherwise use the engine that belongs to the default user interface. */
+ ESObject inESSigEngine;
+ /** If specified, it provides parameters to use when signing. */
+ ESObject inESSigParams;
+ /** When signing, if it is not none, then the data is to be digested and the digest is to be signed, otherwise directly sign the data. */
+ DSDigestMethod inDigestMethod;
+ /** Specifies signature value encoding. */
+ DSSigEncode inSigValueEncoding;
+ /** The name of the data that is being verified. */
+ ASText inDataTitle;
+ /** The description of the data that is being verified. */
+ ASText inDataDescription;
+ /** The dialog box title to use when signing. The object is owned by <code>DigSig</code>. */
+// ASText inSignDialogTitle;
+ /** Message to use when acquiring resources for signing. The object is owned by <code>DigSig</code>. */
+// ASText inPromptMessage;
+ /** If this is greater than <code>0</code>, allow the user interface; otherwise be silent (it can be <code>true</code> even with EScript). */
+ ASInt32 inNUI;
+ /** The callback to display data that is being signed. */
+ void* inDataDisplayCallbackProc;
+
+ /** The certificate chain of the signer. It must be an initialized ASCab. It is returned by the <code>sigNew</code> call. */
+ ASCab inCertChainCab;
+
+ /** A pointer to the data to be signed. If it is <code>NULL</code>, then signing does not occur. */
+ ASUns8* inDataPtr;
+ /** The size of the data to be signed. */
+ ASUns32 inDataSize;
+ /** The resulting signature value, to be freed using ASfree() by the caller, or the signature value if verifying. */
+ ASUns8* inSigValuePtr;
+ /** The size of the resulting signature value. */
+ ASUns32 inSigValueSize;
+
+ /** If an exception occurs, this returns the exception string. The caller must call <code>ASTextDestroy()</code>. */
+ ASText outASTextError;
+
+ /** Callback function used to verify all references used by the data signature. */
+ VerifyRefCallbackProc * inVerifyReferencesCallbackProc;
+ /** Data used by <code>inVerifyReferencesCallbackProc()</code>. */
+ void * inVerifyReferencesCallbackProcData;
+
+} DigSigDataBufferSigValidateParamsRec, *DigSigDataBufferSigValidateParams;
+
+/** Notification types for the DSNotifySigProc().
+*/
+typedef enum {
+ /** No notification (not used). */
+ kDSNotifyNone=0,
+ /** Mark the validity of this signature as unknown. This should mark validity
+ caches to indicate that the signature validity is unknown. */
+ kDSNotifySetUnknown,
+ /** The document may have been modified since this signature was applied. The handler
+ should update the signature status after calling DigSigDocModifiedAfterSig().
+ This is not called as of Acrobat 6.0, but may be used in a later release. */
+ kDSNotifyModifiedAfterSig,
+ /** The size of the <code>DSNotifySigType</code> enumeration. */
+ kDSNotifySigTypeEnumSize
+} DSNotifySigType;
+
+/*************************************************************************
+ * DigSigHFT Methods
+ ************************************************************************/
+
+/**
+ A callback for <code>DigSigHandler</code>. It is called when a new document is
+ opened.
+ @param pdDoc The document that has been opened.
+ @see DSDocCloseProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSDocOpenProc)
+ (PDDoc pdDoc);
+/** A callback for <code>DigSigHandler</code>. It is called when a new document is closed.
+ @param pdDoc The document being closed.
+ @see DSDocOpenProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSDocCloseProc)
+ (PDDoc pdDoc);
+
+/** This call was used only in Acrobat 5.x when the EScript security
+ object was implemented in DigSig. It returns the existing user interface engine
+ object (ESObject) if <code>uiEngine</code> is <code>true</code>, otherwise it returns a new signature
+ engine object (ESObject). <code>handlerName</code> is the name of the handler
+ that is being asked to return the new engine. <code>vData</code> is reserved for
+ future use and is currently not used. This call is no longer
+ used. */
+typedef ACCBPROTO1 ESObject (ACCBPROTO2 *DSNewSigEngineProc)
+ ( void *context, ASAtom handlerName, ASBool uiEngine, void *vData );
+
+/** Internal use. Add your engine-specific properties to the existing <code>sigInfo</code>
+ ESObject. Any private data should be added to the ASCab that is
+ set as private data in ESOBJ_SigInfo <code>ASCab</code> (see above). This
+ should have been written to pass an <code>ASCab</code> instead of ESObject, but
+ we missed this. <code>handlerName</code> is the name of the handler that is
+ being asked to return the data (not necessarly the same as the
+ value of the <code>/Filter</code> attribute in the <code>sigDict</code>). It is for Adobe use only,
+ and subject to change. It can only be used by EScript-aware DigSig
+ handlers (for example, <code>PubSec</code>). */
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSGetSigInfoProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASAtom handlerName, ESObject sigInfo );
+
+/** Internal use. Add your engine-specific properties to the existing <code>seedValue</code> ESObject.
+ Any private data should be added to ESOBJ_SigSeedValue <code>ASCab</code> (see
+ above). It is for Adobe use only, and subject to change. It can only be used
+ by EScript-aware <code>DigSig</code> handlers (for example, <code>PubSec</code>). <code>*jsErrText</code> will
+ be <code>NULL</code>. The handler should set <code>*jsErrText</code> to a new <code>ASText</code> object,
+ which will then be destroyed by <code>DigSig</code>.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DSGetSigSeedValueProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ESObject seedValue, ASText *jsErrText );
+
+/** Internal use. Add your engine-specific properties to the existing <code>seedValue</code> ESObject.
+ Any private data should be added to ESOBJ_SigSeedValue ASCab (see
+ above). It is for Adobe use only, and subject to change. It can only be used
+ by EScript-aware <code>DigSig</code> handlers (for example, PubSec). <code>*jsErrText</code> will
+ be <code>NULL</code>. The handler should set <code>*jsErrText</code> to a new <code>ASText</code> object,
+ which will then be destroyed by <code>DigSig</code>.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DSSetSigSeedValueProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ESObject seedValue, ASText *jsErrText );
+
+/** Internal use. Validates a signature (performs an action). If <code>sigEngine</code> is not <code>NULL</code>
+ then use this engine, otherwise use the user interface engine. <code>handlerName</code> is
+ the name of the handler that is being asked to validate the
+ signature (not necessarily the same as the value of the <code>/Filter</code>
+ attribute in the <code>sigDict</code>). If <code>bUI</code> is <code>true</code>, show an alert after
+ validating. Note that this alert may be supressed depending on
+ preference settings. It is for Adobe use only, and subject to change. Itan only be
+ used by EScript aware <code>DigSig</code> handlers (for example, PubSec).
+*/
+typedef ACCBPROTO1 DSValidState (ACCBPROTO2 *DSValidateSigExProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASAtom handlerName, ESObject sigEngine, ASBool bUI );
+
+/**
+ <p>A callback for <code>DigSigHandler</code>. It is called to validate a signature.
+ It recalculates any document digest desired, possibly
+ using the <code>DigSigFileGetEOF()</code>, <code>DigSigMD5ByteRange()</code>, <code>DigSigFileRead()</code>,
+ and <code>DigSigFileSetPos()</code> methods. </p>
+
+ <p>It may compare this result to the stored one, and do any other
+ signature-specific checks desired. It optionally does a validation
+ against a stored (network) registry. If necessary, it updates
+ the AP dictionary in the signature annotation dictionary
+ to show the validation state of the signature. </p>
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot the Cos object of the signature annotation.
+ @return The validation state.
+ @see DSUnValidateSigProc
+ @see DSReValidateSigProc
+ @see DigSigFileGetEOF
+ @see DigSigMD5ByteRange
+ @see DigSigFileRead
+ @see DigSigFileSetPos
+*/
+typedef ACCBPROTO1 DSValidState (ACCBPROTO2 *DSValidateSigProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot);
+
+/**
+ A callback for <code>DigSigHandler</code>. It is called by the signature panel display
+ to choose which of the double-checked pass, fail, unknown,
+ or blank icons to show. It may call <code>DigSigUpdatePanel()</code> to update
+ the signature panel.
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+
+ @return The validation state.
+ @see DigSigUpdatePanel
+ @note Superseded in Acrobat 6.0 by DSNewSigDataWithParamsProc().
+*/
+typedef ACCBPROTO1 DSValidState (ACCBPROTO2 *DSGetValidStateProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot);
+
+/**
+ <p>This function is called to query the handler to find out
+ if it can validate this PDDoc signature field. The call
+ determines if the general signature format is supported
+ by the handler, or if the handler should be given the opportunity
+ to validate this signature. </p>
+
+ <p>If the response is <code>false</code>, the handler cannot be called to
+ validate the signature. In this event, the handler will
+ not be able to provide other information (for example, that
+ an updated version of the handler should be obtained in
+ order to validate the signature). </p>
+ @param pdDoc The document that contains the signature
+ field.
+ @param sigField The signature field.
+ @param sigAnnot The signature annotation that is being
+ verified (usually equivalent to <code>sigField</code>).
+ @param filter The name by which <code>DigSig</code> knows this handler.
+ This is not necessarily the value of <code>/Filter</code>.
+ @return <code>true</code> if the handler can validate the field signature, <code>false</code>
+ otherwise.
+ @see DigSigVerifySig
+*/
+typedef ACCBPROTO1 ASBool(ACCBPROTO2 *DSCanValidateProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASAtom filter );
+
+/**
+ Returns a string describing the status of the signature.
+ It must be <code>PDDocEncoding</code> or Unicode, where Unicode strings
+ must start with <code>0xFE</code>, <code>0xFF</code>.
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+ @param bSilent
+ @return None.
+
+ @note Superseded by DSGetSigPropProc() in Acrobat 6.0, which
+ provides better granularity for the signature status.
+*/
+typedef ACCBPROTO1 ASText (ACCBPROTO2 *DSGetStatusTextProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASBool bSilent );
+
+/**
+ A callback for <code>DigSigHandler</code>. It is called when a new signature
+ field is created. This method creates the default signature
+ value dictionary and creates a default value (DV) entry
+ in the signature field dictionary pointing to this dictionary.
+
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+ A callback for <code>DigSigHandler</code>. It is called when a new document is
+ closed.
+ @param pdDoc The document being closed.
+ @see DSDocOpenProc
+
+ @note Deprecated in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSDefaultValueProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot);
+
+/**
+ <p>A callback for <code>DigSigHandler</code>. It is called to gather signature data
+ or to cancel. It may display dialogs. It may use the default value
+ (DV) field of the signature field if it is not <code>CosNull</code>. </p>
+
+ <p>To allow for a user to cancel signing, the handler should
+ not modify the document during this callback. The handler
+ will commit the signature to the PDF file during <code>DSClearSigProc()</code>. </p>
+
+ @param pdDoc The document being signed.
+ @param bb The signature annotation bounding box.
+ @param sigData The signature data, as defined by the specific
+ signature plug-in.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+ @return <code>true</code> if the signature data is gathered, <code>false</code> if it is cancelled.
+ @see DSClearSigProc
+ @see DSNewSigDataWithParamsProc
+ @see DSFinishSignProc
+ @see DSFreeSigDataProc
+ @note Superseded in Acrobat 6.0 by DSNewSigDataWithParamsProc().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DSNewSigDataProc)
+ (PDDoc pdDoc, DigSigBBox bb, void **sigData, CosObj sigField, CosObj sigAnnot);
+
+/** Use <code>DSNewSigDataWithParamsProc()</code> instead of this call.
+ Support for this call will continue for at least the short term. */
+typedef ACCBPROTO1 DSSaveType (ACCBPROTO2 *DSNewSigDataExProc)
+ (PDDoc pdDoc, DigSigBBox bb, void **sigData, CosObj sigField, CosObj sigAnnot,
+ ASAtom filter, ESObject sigEngine, ESObject sigInfo);
+
+/**
+ A callback for <code>DigSigHandler</code>. It creates new signature data to
+ be used by Commit and Finish, and is then destroyed by <code>DSFreeSigDataProc()</code>.
+
+ <p>If a dialog box is not used (<code>bUI</code> is <code>false</code>),
+ exception strings are stored in the signature data and
+ can be retrieved with <code>DSSigDataGetErrorTextProc()</code>.</p>
+
+ @param sigParams The structure containing signing parameters.
+
+ @param sigData (Filled by the method) Signature data as defined by the specific signature plug-in.
+ @return A constant indicating the action to be performed on the
+ document; cancel signing, save to the same file name, or
+ save to a new file name.
+ @see DSCommitSignProc
+ @see DSNewSigDataProc
+ @see DSFinishSignProc
+ @see DSFreeSigDataProc
+ @see DSSigDataGetErrorTextProc
+ @note Supersedes DSNewSigDataProc() in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 DSSaveType (ACCBPROTO2 *DSNewSigDataWithParamsProc)
+ ( DigSigNewSigDataParams sigParams, void **sigData );
+
+/**
+ <p>A callback for <code>DigSigHandler</code>. It is called to put the signature into
+ the document in memory or to cancel. It modifies the signature
+ dictionary as needed. It may allocate storage for an array
+ of signature objects. </p>
+
+ <p>The signature includes a signature dictionary written to
+ the <code>/V</code> attribute of the <code>sigField</code> and an optional appearance
+ written to the <code>/AP</code> dictionary of the <code>sigAnnot</code>. </p>
+
+ <p>See <i>Section 8.7</i> in the <i>PDF Reference</i> for the format of the
+ signature dictionary. At least two objects in the signature
+ dictionary, <code>ByteRange</code> and <code>Contents</code>, will need to be overwritten
+ during the <code>DSFinishSignProc()</code> callback.</p>
+ @param pdDoc The document being signed.
+ @param sigData The signature data, as defined by the specific
+ signature plug-in.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+
+ @param offsetArray (Optional) An offset array pointing
+ to a set of <i>marked</i> Cos objects relevant to the signature type;
+ this array includes at least the <code>ByteRange</code>
+ and <code>Contents</code> value objects.
+ @param arrayCount (Optional) The number of objects in <code>offsetArray</code>,
+ if used.
+ @return <code>true</code> if the signature was successfully placed in <code>pdDoc</code>,
+ <code>false</code> otherwise.
+ @see DSFinishSignProc
+ @see DSNewSigDataProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DSCommitSignProc)
+ (PDDoc pdDoc, void *sigData, CosObj sigField, CosObj sigAnnot,
+ DigSigOffset *offsetArray, ASInt32 *arrayCount);
+
+/**
+ A callback for <code>DigSigHandler</code>. It is called to calculate the checksum
+ and update the disk copy of document. It may use information from
+ the <code>offsetArray</code> parameter.
+ @param pdDoc The document being signed.
+ @param sigData The signature data, as defined by the specific
+ signature plug-in.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+
+ @param offsetArray (Optional) An offset array pointing
+ to a set of <i>marked</i> Cos objects relevant to the signature type;
+ this array includes at least the <code>ByteRange</code>
+ and <code>Contents</code> value objects.
+ @param arrayCount (Optional) The number of objects in <code>offsetArray</code>,
+ if used.
+ @return <code>true</code> if processing is successful, <code>false</code> otherwise.
+ @see DSClearSigProc
+ @see DigSigOverwriteHexstring
+ @see DigSigOverwriteIntArray
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DSFinishSignProc)
+ (PDDoc pdDoc, void *sigData, CosObj sigField, CosObj sigAnnot,
+ DigSigOffset offsetArray, ASInt32 arrayCount);
+
+/**
+ Returns an error string to describe failure during new,
+ commit, or free steps. If it is not <code>NULL</code>, then a JavaScript general
+ exception is thrown using this string.
+
+ <p>The handler can set this procedure to <code>NULL</code> if desired. </p>
+
+ <p>The string is owned by <code>sigData</code>, so it should be freed by DSFreeSigDataProc(). </p>
+
+ @param sigData A pointer to the signature for which the
+ error string is obtained.
+ @return The error string as an <code>ASText</code>.
+ @see DSFreeSigDataProc
+ @see DSNewSigDataWithParamsProc
+*/
+typedef ACCBPROTO1 ASText (ACCBPROTO2 *DSSigDataGetErrorTextProc)
+ (void *sigData);
+
+/**
+ A callback for <code>DigSigHandler</code>. It frees signature data.
+ @param sigData The signature data, as defined by the specific
+ signature plug-in. The handler should check to see if <code>sigData</code>
+ is <code>NULL</code>.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSFreeSigDataProc)
+ (void *sigData);
+
+/**
+ A callback for <code>DigSigHandler</code>. It is called when a user selects a
+ signature and asks for its properties. It brings up the properties
+ dialog box for the signature.
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+ @param handlerName The sub-handler to use to validate,
+ in the event that the handler has more then one sub-handler
+ (as is the case with <code>PubSec</code>), and the handler is being asked
+ to validate a signature that has a different filter name
+ than its own.
+ @param sigEngine Used internally.
+ @param propType One of the <code>.DSPropertyType</code>. values. Its default is <code>kDSPropNone</code>.
+ @see DigSigUpdatePanel
+ @note Supersedes <code>DSPropertiesProc()</code>. in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSPropertiesExProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASAtom handlerName, ESObject sigEngine, DSPropertyType propType );
+
+/**
+ A callback for <code>DigSigHandler</code>. It is called when a user selects a
+ signature and asks for its properties. The handler should
+ present its own dialog box that provides details concerning
+ the signature and its validation state.
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+ @see DigSigUpdatePanel
+ @note Superseded by <code>DSPropertiesExProc()</code> in Acrobat 6.0.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSPropertiesProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot);
+
+/**
+ A callback for <code>DigSigHandler</code>. It is called to change the appearance
+ key (AP) back to the appearance that is used for the unvalidated
+ state.
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+ @see DSValidateSigProc
+ @see DSReValidateSigProc
+ @see DigSigGetStdXObj
+ @see DigSigFileGetEOF
+ @see DigSigMD5ByteRange
+ @see DigSigFileRead
+ @see DigSigFileSetPos
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSUnValidateSigProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot);
+
+/** Sends a notification for this signature. The only current notification is
+ <code>kDSNotifySetUnknown</code>, which will cause handlers to mark the validity
+ for this signature as unknown. This is done if the document
+ is dirtied or changed in a manner that would cause the current validity status
+ to no longer be valid. This is not the same as the <code>DSUnValidateProc()</code>.
+ The handler should update its cached validity values to the signature unknown state. */
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSNotifySigProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, DSNotifySigType notifyType, ASBool bUI );
+
+/* DigSig uses this callback to send a notification that it has cleared the signature. This
+ clears the local caching.
+ @param IN/OUT pdDoc The document being signed.
+ @param IN/OUT sigField The signature field.
+ @param IN/OUT sigAnnot The Cos object of the signature annotation.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSClearSigProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASBool bSilent );
+
+/**
+ Called to obtain an <code>ASCab</code> containing values that the handler
+ wants DigSig to use in the user interface. This is called only after
+ the handler is called to validate the signature.
+ @param pdDoc The document being signed.
+ @param sigField The signature field.
+ @param sigAnnot The Cos object of the signature annotation.
+
+ @param handlerName The name of the handler that is being
+ asked to return the data. This is not necessarly the same
+ as the value of the <code>/Filter</code> attribute in the signature dictionary.
+ @return An <code>ASCab</code> object containing the properties. For a list of
+ properties, see DigSigHFT.h.
+*/
+typedef ACCBPROTO1 ASCab (ACCBPROTO2 *DSGetSigPropProc)
+ (PDDoc pdDoc, CosObj sigField, CosObj sigAnnot, ASAtom handlerName );
+
+/** Signs a <code>CosDoc</code> (for example, when signing FDF). It is for Adobe use only. This call is
+ subject to change in future releases. It was introduced in Acrobat
+ 6.0. */
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *DSCosDocSigSignProc)
+ (DigSigCosDocSigParams sigParams );
+
+/** Validates a <code>CosDoc</code> signature. It returns a valid state in <code>sigInfoCab</code>.
+ <p>It should populate the following entries in this cab:</p>
+ <ul>
+ <li><code>PROP_SigInfo_Status</code></li>
+ <li><code>PROP_SigInfo_StatusText</code></li>
+ <li><code>PROP_SigInfo_HandlerName</code></li>
+ </ul>
+ It is for Adobe use only. This call is subject to change in future releases.
+ It was introduced in Acrobat 6.0. */
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *DSCosDocSigValidateProc)
+ (DigSigCosDocSigParams sigParams, ASCab sigInfoCab );
+
+/** Initiate the signing of a data buffer (for example, when signing XML data).
+ It is for Adobe use only. This call is subject to change in future releases.
+ It was introduced in Acrobat 7.0.
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *DSDataBufferSigSignNewProc)
+ (DigSigDataBufferSigNewParams sigParams, void** pOutDataSigContext );
+
+/** Finish the signing of a data buffer (for example, when signing XML data).
+ It must be called to destroy the context, whenever <code>signNew</code> returns a context.
+ It is for Adobe use only. This call is subject to change in future releases.
+ It was introduced in Acrobat 7.0.
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *DSDataBufferSigSignFinishProc)
+ ( void* dataSigContext, DigSigDataParams sigParams );
+
+/** Validate a data buffer signature. It returns a valid state in <code>sigInfoCab</code>.
+ It should populate the following entries in this cab:
+ <ul>
+ <li><code>PROP_SigInfo_Status</code></li>
+ <li><code>PROP_SigInfo_StatusText</code></li>
+ <li><code>PROP_SigInfo_HandlerName</code></li>
+ </ul>
+ It is for Adobe use only. This call is subject to change in future releases.
+ It was introduced in Acrobat 7.0.
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *DSDataBufferSigValidateProc)
+ (DigSigDataBufferSigValidateParams sigParams, ASCab sigInfoCab );
+
+/**
+ Gets the boolean value of a <code>DigSig</code> handler property. It returns
+ <code>true</code> for those properties that represent functionality your
+ handler supports, <code>false</code> if it does not support the functionality.
+ (Some properties are available directly from the <code>DigSigHandler</code>.)
+
+ @param filter The name (<code>filterKey</code> value) of the handler
+ from which the property is obtained.
+ @param property The property whose value is obtained.
+ @return The property value (<code>true</code> or <code>false</code>).
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *DSGetBoolPropertyProc)
+ ( ASAtom filter, DSHandlerProperty property);
+
+/**
+ Returns whether the current application user has the credential that
+ was used to create the signature that was passed in.
+
+ @param handlerName The name of the handler that is being queried.
+ @param pdd The <code>PDDoc</code> containing the signature field.
+ @param sigField The signature field.
+ @return One of the following values:
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>0</code></TD><TD>Unknown.</TD></TR>
+ <TR><TD><code>1</code></TD><TD>Yes.</TD></TR>
+ <TR><TD><code>2</code></TD><TD>No.</TD></TR>
+ </TABLE>
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *DSIsSignerProc)
+ ( ASAtom handlerName, PDDoc pdd, CosObj sigField );
+
+/** A data structure containing callbacks that define a signature plug-in's behavior.
+ Unused entries should be <code>NULL</code>.
+*/
+typedef struct _t_DigSigHandlerRec {
+ /** The size of the data structure. It must be set to <code>sizeof(DigSigHandlerRec)</code>. */
+ ASSize_t size;
+ /** The language-dependent name to show for signature type selection. */
+ const char *uiName;
+ /** The value of the Filter key in the signature dictionary. */
+ ASAtom filterKey;
+ /** <code>true</code> if this signature type can do no-appearance signatures, <code>false</code> otherwise. */
+ ASBool canBlindSign;
+ /** <code>true</code> if this signature type can do encrypt-and-sign, <code>false</code> otherwise. */
+ ASBool canEncrypt;
+
+ /** Called when a new document is opened. */
+ DSDocOpenProc dsDocOpen;
+ /** Called when a new document is closed. */
+ DSDocCloseProc dsDocClose;
+ /** Called when a new signature field is created. */
+ DSDefaultValueProc dsDefaultValue;
+
+ /** Called to gather the signature or cancel. */
+ DSNewSigDataProc dsNewSigData;
+ /** Called to put the signature into the document or cancel. */
+ DSCommitSignProc dsCommitSign;
+ /** Called to calculate the checksum and overwrite. */
+ DSFinishSignProc dsFinishSign;
+ /** Called to free the signature data. */
+ DSFreeSigDataProc dsFreeSigData;
+ /** Called to validate a signature. */
+ DSValidateSigProc dsValidateSig;
+ /** Gets the validity status for a signature. */
+ DSGetValidStateProc dsGetValidState;
+ /** Shows the signature properties dialog box for this signature. */
+ DSPropertiesProc dsProperties;
+ /** Called to change AP back to unvalidated. */
+ DSUnValidateSigProc dsUnValidateSig;
+
+ /** Called to change AP back to whatever it was. */
+ DSUnValidateSigProc dsReValidateSig;
+
+ /* New in Acrobat 5.0 */
+ /** A notification that the signature has been cleared. */
+ DSClearSigProc dsClearSig;
+ /** Gets a string describing the status. */
+ DSGetStatusTextProc dsStatusText;
+ /** Used internally in Acrobat 5.0. Superseded in Acrobat 6.0 by <code>dsNewSigDataWithParams()</code>.*/
+ DSNewSigDataExProc dsNewSigDataEx;
+ /** Used internally by <code>PubSec</code>. */
+ DSValidateSigExProc dsValidateSigEx;
+ /** Used internally by <code>PubSec</code>. */
+ DSGetSigInfoProc dsGetSigInfo;
+ /** Used internally by EScript in Acrobat 5.0. It is no longer used. */
+ DSNewSigEngineProc dsNewSigEngine;
+ /** Called to get a descriptive string for an error during new, commit, or free steps.*/
+ DSSigDataGetErrorTextProc dsSigDataGetErrorText;
+
+ /* New in Acrobat 6.0 */
+ /** Called to create new signature data to be used by Commit and Finish. Supersedes
+ <code>dsNewSigDataEx()</code>.
+ */
+ DSNewSigDataWithParamsProc dsNewSigDataWithParams;
+ /** Called to show the signature properties dialog box for the signature. */
+ DSPropertiesExProc dsPropertiesEx;
+ /** For internal use only.*/
+ DSCosDocSigSignProc dsCosDocSigSign;
+ /** For internal use only.*/
+ DSCosDocSigValidateProc dsCosDocSigValidate;
+
+ /** Called to determine whether the handler can validate a <code>PDDoc</code> field signature.*/
+ DSCanValidateProc dsCanValidate;
+ /** */
+ DSNotifySigProc dsNotifySig;
+ /** Used internally by <code>PubSec</code>. */
+ DSGetSigSeedValueProc dsGetSigSeedValue;
+ /** Used internally by <code>PubSec</code>. */
+ DSSetSigSeedValueProc dsSetSigSeedValue;
+ /** Called to test whether your handler supports specific functionality. */
+ DSGetBoolPropertyProc dsGetBoolProperty;
+ /** Called to get an <code>ASCab</code> containing signature properties to be used in the user interface. */
+ DSGetSigPropProc dsGetSigProp;
+
+ /* New in Acrobat 7.0 */
+ /** Determines whether the current user is the signer of the signature passed in. */
+ DSIsSignerProc dsIsSigner;
+ /** Filter alias. */
+ ASAtom filterAlias;
+
+ /* Data buffer signing and verification. For Adobe internal use only. */
+ DSDataBufferSigSignNewProc dsDataBufferSigSignNew;
+
+ /* Data buffer signing and verification. For Adobe internal use only. */
+ DSDataBufferSigSignFinishProc dsDataBufferSigSignFinish;
+
+ /* Data buffer signing and verification. For Adobe internal use only. */
+ DSDataBufferSigValidateProc dsDataBufferSigValidate;
+
+} DigSigHandlerRec, *DigSigHandler;
+
+
+
+/*****************************************************************************\
+|* *|
+|* INTERFACE TO DIGSIG <--- SPECIFIC METHODS *|
+|* *|
+\*****************************************************************************/
+
+/*****************************************************************************\
+|* DigSigHFT types *|
+\*****************************************************************************/
+
+/* The DigSigHFT allows calls from a specific method plugin to the generic plugin */
+/* Enumerate the selectors */
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+#define NOPROC(name) name##_SEL,
+
+enum
+{
+ DSDUMMYBLANKSELECTOR,
+ #include "DigSigHFTProcs.h"
+ DSNUMSELECTORSPlusOne
+};
+
+#define DigSigHFT_NUMSELECTORS (DSNUMSELECTORSPlusOne - 1)
+#undef PIPROC
+#undef NOPROC
+
+/** A linked list of text items to be merged together. */
+typedef struct _t_DSAPTextEntryRec {
+ /** The next entry in the list, or <code>NULL</code> if it is the last entry. */
+ struct _t_DSAPTextEntryRec *next;
+ /** The ratio of the height to the overall height of <code>bbox</code> (<code>0x00010000</code> is 100%). */
+ ASFixed heightRatio;
+ /** The text to render in this object. The caller owns the memory. */
+ ASText text;
+} DSAPTextEntryRec, *DSAPTextEntry;
+
+/**
+ A user-supplied callback that is passed in the call to <code>DigSigEnumSignatures()</code>.
+ <code>DigSig</code> calls this once for each existing signature.
+ @param pdDoc The document that contains the signature
+ field.
+ @param sigField The signature field.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @return <code>true</code> to continue enumeration, <code>false</code> otherwise.
+ @see DigSigEnumSignatures
+*/
+typedef ACCB1 ASBool ACCB2 (*DigSigEnumProc) ( PDDoc pdDoc, CosObj sigField, void *clientData );
+
+/** Error constants for signature reference dictionary procedures. */
+typedef enum {
+ kDSSigRefErrNone=0,
+ /** Missing the required plug-in or software module.
+ The software module is named by <code>errText</code> in
+ DSSigRefDictErrParams.
+ */
+ kDSSigRefErrMissingPlugin,
+ /** The new, unsupported version of the signature. */
+ kDSSigRefErrNewVersion,
+ /** The old, unsupported version of the signature. */
+ kDSSigRefErrOldVersion,
+ /** The size of the <code>DSSigRefErrCode</code> enumeration. */
+ kDSSigRefErrEnumSize
+} DSSigRefErrCode;
+
+/** A structure that contains information about exceptions that occurred in signature
+ reference dictionary procedures.
+*/
+typedef struct _t_DSSigRefDictErrParamsRec {
+ /** The The size of this <code>struct</code>. */
+ ASSize_t size; /* Size of this struct */
+ /** The exception code. */
+ DSSigRefErrCode errCode; /* Exception code. */
+ /** The text associated with the error code. If <code>errCode</code> is
+ <code>kDSSigRefErrMissingPlugin</code>, the text is the name of a software module.
+ It must point to an initialized <code>ASText</code> object.
+ */
+ ASText errText; /* Name of software module, if errCode == kDSSigRefErrMissingPlugin. Must point to initialized <code>ASText</code> object. */
+} DSSigRefDictErrParamsRec, *DSSigRefDictErrParams;
+
+/** Parameters used by methods that create a signature reference dictionary. See Section 8.7,
+ <i>Digital Signatures</i>, in the <i>PDF Reference</i>, for more information on signature reference
+ dictionaries.
+*/
+typedef struct _t_DSSigRefDictParamsRec {
+ /** The size of the data structure. It must be set to
+ <code>sizeof(DSSigRefDictParamsRec)</code>.
+ */
+ ASSize_t size; /* Size of this struct */
+ /** The document containing the object to be signed. */
+ CosDoc cosDoc; /* CosDoc in which to-be-signed object resides */
+ /** The root object to be signed. */
+ CosObj rootObj; /* Root object that is being signed */
+ /** The signature dictionary that this reference dictionary will be part of. */
+ CosObj sigDict; /* References will be part of this sigDict */
+ /** The transform method name. Its possible values are:
+ <ul>
+ <li><code>DocMDP</code></li>
+ <li><code>FieldMDP</code></li>
+ <li><code>UR</code></li>
+ <li><code>Identity</code></li>
+ </ul>
+ */
+ ASAtom transformMethod; /* Transform name */
+ /** The transform parameters, which are specific to each transform method. */
+ CosObj transformParams; /* Parameters to transform */
+ /** <code>true</code> if the dictionary should be indirect, <code>false</code> if it should be direct. */
+ ASBool bIndirect; /* Set <code>true</code> if refDict should be indirect */
+} DSSigRefDictParamsRec, *DSSigRefDictParams;
+
+typedef struct _t_DSAPCreateLayeredStreamExParams
+{
+ /** The document in which to include the standard XObject. */
+ CosDoc cosDoc;
+ /** A pointer to an array of XObjects for the appearance layers.*/
+ CosObj* XObjects;
+ /** A pointer to an array of positions. */
+ ASFixedMatrixP layerMatrices;
+ /** The size of the XObjects array. */
+ ASInt32 numXObjects;
+ /** The layer number for the optional validity state layer. */
+ ASInt16 layerNNum;
+ /** The border from AFPDWidgetGetBorder(). */
+ AFPDWidgetBorder border;
+ /** The color of the border. */
+ PDColorValue cBorder;
+ /** The color of the background. */
+ PDColorValue cBackGnd;
+ /** The width of the new stream object. */
+ ASFixed width;
+ /** The height of the new stream object. */
+ ASFixed height;
+ /** The rotational parameter from AFPDWidgerGetRotation(). */
+ PDRotate pdr;
+ /** An array of flag values corresponding
+ to the layers specified by XObject. A value of <code>true</code> means
+ that the corresponding layer is displayed.
+ */
+ ASBool* layerFlags;
+} DSAPCreateLayeredStreamExParamsRec, *DSAPCreateLayeredStreamExParams;
+
+/** Justification of XObjects.
+@see DigSigAPXObjectFromXObjList
+*/
+typedef enum {
+ /** Left justification. */
+ DSLeftQ = 0,
+ /**Center justification. */
+ DSCenterQ,
+ /** Right justification. */
+ DSRightQ
+} DSQuadding;
+
+/**
+ Structure used in <code>DigSigAPXObjectFromXObjList()</code>.
+ @see DigSigAPXObjectFromXObjList
+*/
+typedef struct _t_DSAPXObjEntryRec {
+ /** The next list entry. */
+ struct _t_DSAPXObjEntryRec *next;
+ /** If not <code>NULL</code>, use this XObject as the entry. */
+ CosObj xobj;
+ /** The rectangle relative to <code>bbox</code> in which to render the object. */
+ ASFixedRect rect;
+ /** If not empty, render this string (it can contain new lines). */
+ ASText text;
+ /** Font size, <code>0</code> for auto. */
+ ASFixed textSize;
+ /** Justification of the XObject (not all options supported). */
+ DSQuadding xjustify;
+ /** Justification of the XObject (not all options supported). */
+ DSQuadding yjustify;
+ /** Scale the XObject within <code>rect</code>. */
+ ASFixed scale;
+ /** If the XObject is Subtype XObject, then the XObject is merged up. */
+ ASBool bMerge;
+ /** If <code>true</code> and <code>bMerge</code> is <code>true</code> and the XObject exists, then destroy the XObject. */
+ ASBool bDestroy;
+} DSAPXObjEntryRec, *DSAPXObjEntry;
+
+typedef enum {
+ kDSMerge = 0x0001,
+ kDSForceEmbed = 0x0002
+
+} DSAPXObjectFromXObjectListFlags;
+
+/** A type of notification to register for.
+ @see DigSigRegisterObserver
+*/
+typedef enum {
+ /** The signature field is added. */
+ DSSigAdded = 0,/* Signature field is added */
+ /** The signature field is deleted. */
+ DSSigDeleted, /* Signature field got deleted */
+ /** A signature is requested (the notification procedure is
+ invoked before the signature is applied).
+ */
+ DSWillSign,
+ /** A signature is created (the notification procedure is
+ invoked when signing succeeds).
+ */
+ DSDidSign,
+ /** A signature request fails (the notification procedure is
+ invoked when signing fails).
+ */
+ DSFailSign,
+ /** A signature verification is requested. */
+ DSWillVerify,
+ /** A signature verification succeeds. */
+ DSDidVerify,
+ /** A signature verification request fails. */
+ DSFailVerify,
+ /** The clearing of a signature is requested. */
+ DSWillClear,
+ /** The clearing of a signature succeeds. */
+ DSDidClear,
+ /** The clearing of a signature fails. */
+ DSFailClear,
+ /** Number of notifications. */
+ DigSigNumNotifications /* Always last. */
+} DSNotificationType;
+
+
+/** A structure passed to the callback when a digital signature event occurs for which an
+ interest has been registered. The structure contains information about the event.
+
+ <p>These are the arguments in <code>DSNtfyParams_t</code> which are applicable:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>DSSigAdded</code></TD><TD></TD></TR>
+ <TR><TD><code>DSSigDeleted</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField</code></TD></TR>
+ <TR><TD><code>DSWillSign</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField</code></TD></TR>
+ <TR><TD><code>DSDidSign</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField, sigDict</code></TD></TR>
+ <TR><TD><code>DSFailSign</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField</code></TD></TR>
+ <TR><TD><code>DSWillVerify</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField</code></TD></TR>
+ <TR><TD><code>DSDidVerify</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField, sigDict</code></TD></TR>
+ <TR><TD><code>DSFailVerify</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField</code></TD></TR>
+ <TR><TD><code>DSWillClear</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField, sigDict</code></TD></TR>
+ <TR><TD><code>DSDidClear</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField</code></TD></TR>
+ <TR><TD><code>DSFailClear</code></TD><TD><code>size, notificationID, pdDoc, cosDoc, sigField</code></TD></TR>
+ </TABLE>
+*/
+typedef struct _t_DSNtfyParamsRec {
+ /** The size of the data structure. It must be set to
+ <code>sizeof(DSNotifyParamsRec)</code>.
+ */
+ ASSize_t size;
+ /** The event that occurred. */
+ DSNotificationType notificationID;
+ /** The PDF document for which the event occurred. */
+ PDDoc pdDoc;
+ /** The Cos document containing the object for which the event
+ occurred.
+ */
+ CosDoc cosDoc;
+ /** The signature field for which the event occurred. */
+ CosObj sigField;
+ /** The signature dictionary (used only for the events <code>DSDidSign</code>
+ and <code>DSDidClear</code>).
+ */
+ CosObj sigDict;
+} DSNtfyParamsRec, *DSNtfyParams;
+
+/**
+ A callback for the Notification Server. It is called when a digital
+ signature event occurs for which you have registered an
+ interest.
+
+ <p>This procedure is called for these events: </p>
+
+ <ul>
+ <li>Adding or deleting a signature field.</li>
+ <li>Requesting a new signature, and the success of the request. </li>
+ <li>Requesting that an existing signature be cleared, and the success of the request. </li>
+ </ul>
+
+ <p>For failure events, the server calls the DSNotificationFailureProc(). </p>
+
+ @param info Pointer to a DSNotifyParams structure containing
+ information about the event.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see DSNotificationFailureProc
+ @see DigSigRegisterObserver
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSNotificationProc)(void *info, void *clientData);
+
+/**
+ A callback for the Notification Server. It is called when a digital
+ signature event occurs for which you have registered an
+ interest.
+
+ <p>This procedure is called for these events: </p>
+
+ <ul>
+ <li>The failure of a request for a new signature. </li>
+ <li>The failure of a request for an existing signatureto be cleared. </li>
+ </ul>
+
+ <p>For field change, request, and success events, the server
+ calls the DSNotificationProc(). </p>
+ @param error The error code for the error that occured.
+
+ @param info A pointer to a DSNotifyParams structure containing
+ information about the event.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see DSNotificationProc
+ @see DigSigRegisterObserver
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DSNotificationFailureProc)(ASInt32 error, void *info, void *clientData);
+
+/** Parameters for page comparison.
+ @see DigSigComparePagesEx
+*/
+typedef struct _t_DSComparePagesParamsRec {
+ /** The size of the data structure. It must be set to
+ <code>sizeof(DSComparePagesParamsRec)</code>.
+ */
+ ASSize_t size;
+ /** The sensitivity level for the comparison. The DPI determines
+ the resolution at which each page is rendered before
+ comparing on a pixel-by-pixel basis. The values are:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>0</code></TD><TD>72 DPI.</TD></TR>
+ <TR><TD><code>1</code></TD><TD>36 DPI.</TD></TR>
+ <TR><TD><code>2</code></TD><TD>18 DPI.</TD></TR>
+ </TABLE>
+ */
+ ASInt32 sensitivityLevel;
+
+} DSComparePagesParamsRec, *DSComparePagesParams;
+
+/** Parameters for page comparison.
+ @see DigSigCompareWordsEx
+*/
+typedef struct _t_DSCompareWordsParamsRec {
+ /** The size of the data structure. It must be set to
+ <code>sizeof(DSCompareWordsParamsRec)</code>.
+ */
+ ASSize_t size;
+ /** If <code>true</code>, the font name, size, and color of each character in a word are
+ considered when matching against other words. If <code>false</code>, these
+ attributes are ignored.
+ */
+ ASBool useFont; /* Turn font comparison on or off. */
+} DSCompareWordsParamsRec, *DSCompareWordsParams;
+
+/* Create the prototypes */
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+#define NOPROC(name)
+ #include "DigSigHFTProcs.h"
+#undef PIPROC
+#undef NOPROC
+
+#define DigSigRegisterFilter (*((DigSigRegisterFilter_SELPROTO)(gDigSigHFT[DigSigRegisterFilter_SEL])))
+#define DigSigFileGetEOF (*((DigSigFileGetEOF_SELPROTO)(gDigSigHFT[DigSigFileGetEOF_SEL])))
+#define DigSigFileSetPos (*((DigSigFileSetPos_SELPROTO)(gDigSigHFT[DigSigFileSetPos_SEL])))
+#define DigSigFileRead (*((DigSigFileRead_SELPROTO)(gDigSigHFT[DigSigFileRead_SEL])))
+#define DigSigOverwriteIntArray (*((DigSigOverwriteIntArray_SELPROTO)(gDigSigHFT[DigSigOverwriteIntArray_SEL])))
+#define DigSigOverwriteHexstring (*((DigSigOverwriteHexstring_SELPROTO)(gDigSigHFT[DigSigOverwriteHexstring_SEL])))
+#define DigSigOverwriteBytes (*((DigSigOverwriteBytes_SELPROTO)(gDigSigHFT[DigSigOverwriteBytes_SEL])))
+#define DigSigMD5ByteRange (*((DigSigMD5ByteRange_SELPROTO)(gDigSigHFT[DigSigMD5ByteRange_SEL])))
+#define DigSigUpdatePanel (*((DigSigUpdatePanel_SELPROTO)(gDigSigHFT[DigSigUpdatePanel_SEL])))
+#define DigSigByteToHex (*((DigSigByteToHex_SELPROTO)(gDigSigHFT[DigSigByteToHex_SEL])))
+#define DigSigHexToByte (*((DigSigHexToByte_SELPROTO)(gDigSigHFT[DigSigHexToByte_SEL])))
+#define DigSigSignDoc (*((DigSigSignDoc_SELPROTO)(gDigSigHFT[DigSigSignDoc_SEL])))
+#define DigSigGetStdXObj (*((DigSigGetStdXObj_SELPROTO)(gDigSigHFT[DigSigGetStdXObj_SEL])))
+#define DigSigDraw (*((DigSigDraw_SELPROTO)(gDigSigHFT[DigSigDraw_SEL])))
+#define DigSigKeyDown (*((DigSigKeyDown_SELPROTO)(gDigSigHFT[DigSigKeyDown_SEL])))
+#define DigSigClick (*((DigSigClick_SELPROTO)(gDigSigHFT[DigSigClick_SEL])))
+#define DigSigRightClick (*((DigSigRightClick_SELPROTO)(gDigSigHFT[DigSigRightClick_SEL])))
+#define DigSigGetUniqueTitle (*((DigSigGetUniqueTitle_SELPROTO)(gDigSigHFT[DigSigGetUniqueTitle_SEL])))
+#define DigSigDeletedSig (*((DigSigDeletedSig_SELPROTO)(gDigSigHFT[DigSigDeletedSig_SEL])))
+#define DigSigAddedSig (*((DigSigAddedSig_SELPROTO)(gDigSigHFT[DigSigAddedSig_SEL])))
+#define DigSigComparePages (*((DigSigComparePages_SELPROTO)(gDigSigHFT[DigSigComparePages_SEL])))
+#define DigSigCompareWords (*((DigSigCompareWords_SELPROTO)(gDigSigHFT[DigSigCompareWords_SEL])))
+#define DigSigCompareWordsRecent (*((DigSigCompareWordsRecent_SELPROTO)(gDigSigHFT[DigSigCompareWordsRecent_SEL])))
+#define DigSigDoProperties (*((DigSigDoProperties_SELPROTO)(gDigSigHFT[DigSigDoProperties_SEL])))
+#define DigSigCompareWordsAndFontsRecent (*((DigSigCompareWordsAndFontsRecent_SELPROTO)(gDigSigHFT[DigSigCompareWordsAndFontsRecent_SEL])))
+#define DigSigRollbackToSig (*((DigSigRollbackToSig_SELPROTO)(gDigSigHFT[DigSigRollbackToSig_SEL])))
+#define DigSigEnumSignatures (*((DigSigEnumSignatures_SELPROTO)(gDigSigHFT[DigSigEnumSignatures_SEL])))
+#define DigSigDocModifiedAfterSig (*((DigSigDocModifiedAfterSig_SELPROTO)(gDigSigHFT[DigSigDocModifiedAfterSig_SEL])))
+#define DigSigCreateStdXObj (*((DigSigCreateStdXObj_SELPROTO)(gDigSigHFT[DigSigCreateStdXObj_SEL])))
+#define DigSigAPCreateLayeredStream (*((DSAPCreateLayeredStream_SELPROTO)(gDigSigHFT[DSAPCreateLayeredStream_SEL])))
+#define DigSigAPXObjectFromXObjList (*((DSAPXObjectFromXObjList_SELPROTO)(gDigSigHFT[DSAPXObjectFromXObjList_SEL])))
+#define DigSigAPXObjectFromLogo (*((DSAPXObjectFromLogo_SELPROTO)(gDigSigHFT[DSAPXObjectFromLogo_SEL])))
+#define DigSigAPCreateCompositeTextXObj (*((DSAPCreateCompositeTextXObj_SELPROTO)(gDigSigHFT[DSAPCreateCompositeTextXObj_SEL])))
+#define DigSigDeletedSigEx (*((DigSigDeletedSigEx_SELPROTO)(gDigSigHFT[DigSigDeletedSigEx_SEL])))
+#define DigSigAddedSigEx (*((DigSigAddedSigEx_SELPROTO)(gDigSigHFT[DigSigAddedSigEx_SEL])))
+#define DigSigUnregisterFilter (*((DigSigUnregisterFilter_SELPROTO)(gDigSigHFT[DigSigUnregisterFilter_SEL])))
+#define DigSigNewSigRefDict (*((DigSigNewSigRefDict_SELPROTO)(gDigSigHFT[DigSigNewSigRefDict_SEL])))
+#define DigSigCommitSigRefDict (*((DigSigCommitSigRefDict_SELPROTO)(gDigSigHFT[DigSigCommitSigRefDict_SEL])))
+#define DigSigFinishSigRefDict (*((DigSigFinishSigRefDict_SELPROTO)(gDigSigHFT[DigSigFinishSigRefDict_SEL])))
+#define DigSigVerifySigRefDict (*((DigSigVerifySigRefDict_SELPROTO)(gDigSigHFT[DigSigVerifySigRefDict_SEL])))
+#define DigSigClearSigRefDict (*((DigSigClearSigRefDict_SELPROTO)(gDigSigHFT[DigSigClearSigRefDict_SEL])))
+#define DigSigAPCreateLayeredStreamEx (*((DSAPCreateLayeredStreamEx_SELPROTO)(gDigSigHFT[DSAPCreateLayeredStreamEx_SEL])))
+#define DigSigIsSigSigned (*((DigSigIsSigSigned_SELPROTO)(gDigSigHFT[DigSigIsSigSigned_SEL])))
+#define DigSigRegisterObserver (*((DigSigRegisterObserver_SELPROTO)(gDigSigHFT[DigSigRegisterObserver_SEL])))
+#define DigSigUnregisterObserver (*((DigSigUnregisterObserver_SELPROTO)(gDigSigHFT[DigSigUnregisterObserver_SEL])))
+#define DigSigGetDocAuthorSignature (*((DigSigGetDocAuthorSignature_SELPROTO)(gDigSigHFT[DigSigGetDocAuthorSignature_SEL])))
+#define DigSigComparePagesEx (*((DigSigComparePagesEx_SELPROTO)(gDigSigHFT[DigSigComparePagesEx_SEL])))
+#define DigSigCompareWordsEx (*((DigSigCompareWordsEx_SELPROTO)(gDigSigHFT[DigSigCompareWordsEx_SEL])))
+#define DigSigVerifySig (*((DigSigVerifySig_SELPROTO)(gDigSigHFT[DigSigVerifySig_SEL])))
+#define DigSigClearSig (*((DigSigClearSig_SELPROTO)(gDigSigHFT[DigSigClearSig_SEL])))
+#define DigSigGetDocMDPSetting (*((DigSigGetDocMDPSetting_SELPROTO)(gDigSigHFT[DigSigGetDocMDPSetting_SEL])))
+#define DigSigGetUbiquitySig (*((DigSigGetUbiquitySig_SELPROTO)(gDigSigHFT[DigSigGetUbiquitySig_SEL])))
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_DigSigHFT */
+
+/* End of DigSigHFT.h */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFTProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFTProcs.h
new file mode 100644
index 0000000..6b0968e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DigSigHFTProcs.h
@@ -0,0 +1,981 @@
+/*************************************************************************
+ * DigSigHFTProcs.h
+ *
+ * Copyright (c) 2007 Adobe Systems Inc. All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains the
+ * property of Adobe Systems Incorporated and its suppliers, if any.
+ * The intellectual and technical concepts contained herein are
+ * proprietary to Adobe Systems Incorporated and its suppliers and may
+ * be covered by U.S. and Foreign Patents, patents in process, and are
+ * protected by trade secret or copyright law. Adobe permits you to
+ * use, modify, and distribute this file in accordance with the terms
+ * of the Adobe license agreement accompanying it. If you have
+ * received this file from a source other than Adobe, then your use,
+ * modification, or distribution of it requires the prior written
+ * permission of Adobe.
+ *
+ * Description:
+ *
+ * Digital Signature interface for Acrobat Digital Signature handlers.
+ * Handlers can register as DigSig handlers to provide digital
+ * signature services. Handlers can also call back into the DigSigHFT
+ * for various services.
+ *
+ * 10-May-2007 - Created
+ ************************************************************************/
+
+/**
+ Registers a signing method plug-in. A signing plug-in must
+ call this method before making any signatures. This object
+ should not be destroyed until after it is un-registered or
+ until exit.
+ @param owner The handler plug-in identifier, assigned
+ on initialization.
+ @param digSigHandler A structure specifying the name of
+ the filter and the functions to call to create and validate
+ signatures.
+ @see DigSigUnregisterFilter
+*/
+PIPROC(void, DigSigRegisterFilter,
+ (ExtensionID owner, DigSigHandler digSigHandler), owner, digSigHandler)
+
+
+/**
+ Gets the number of bytes in an ASFile. It serves as a wrapper
+ for the ASFileGetEOF() method.
+ @param asFile The ASFile whose length is obtained.
+ @return The number of bytes in the ASFile, or <code>0</code> if an error is encountered.
+
+ @see DigSigFileSetPos
+ @see DigSigFileRead
+ @see DigSigOverwriteIntArray
+ @see DigSigOverwriteHexstring
+ @see DigSigOverwriteBytes
+*/
+PIPROC(ASInt32, DigSigFileGetEOF,
+ (ASFile asFile), asFile)
+
+/**
+ Reopens an ASFile for reading and sets the file position.
+
+ @param asFile The ASFile to position.
+ @param pos The byte offset to a position in <code>asFile</code>.
+ @see DigSigFileGetEOF
+ @see DigSigFileRead
+ @see DigSigOverwriteIntArray
+ @see DigSigOverwriteHexstring
+ @see DigSigOverwriteBytes
+*/
+PIPROC(void, DigSigFileSetPos,
+ (ASFile asFile, ASInt32 pos), asFile, pos)
+
+/**
+ Reads from an ASFile. This is a wrapper function for the
+ ASFileRead() method.
+ @param asFile The ASFile to read.
+ @param p A pointer to a buffer.
+ @param count The number of bytes to read into the buffer.
+ @return The number of bytes read, or <code>0</code> if unsuccessful.
+ @see DigSigFileGetEOF
+ @see DigSigFileSetPos
+ @see DigSigOverwriteIntArray
+ @see DigSigOverwriteHexstring
+ @see DigSigOverwriteBytes
+*/
+PIPROC(ASInt32, DigSigFileRead,
+ (ASFile asFile, char *p, ASInt32 count), asFile, p, count)
+
+/**
+ Overwrites part of <code>asFile</code> with an integer array. It reopens
+ the file for write, positions to the specified place, formats
+ the array as characters, and writes. This method is used
+ to overwrite the <code>/ByteRange</code> entry in the signature dictionary.
+
+ @param asFile The ASFile to write to.
+ @param digSigOffset A structure specifying the byte position
+ and size to overwrite:
+ <ul>
+ <li>Writes padding blanks to the file if formatted length is less than this length.</li>
+ <li>Does not write and returns <code>0</code> if the formatted length is longer than this length.</li>
+ <li>Does not write and returns <code>0</code> if the formatted length is greater than <code>8200</code> bytes.</li>
+ </ul>
+ @param cosObj The Cos string to be written.
+ @return The number of bytes written.
+ @see DigSigCosObjOverwrite
+ @see DigSigFileGetEOF
+ @see DigSigFileSetPos
+ @see DigSigFileRead
+ @see DigSigOverwriteHexstring
+ @see DigSigOverwriteBytes
+*/
+PIPROC(ASInt32, DigSigOverwriteIntArray,
+ (ASFile asFile, const DigSigOffset digSigOffset, const CosObj cosObj), asFile, digSigOffset, cosObj)
+
+/**
+ Overwrites part of a file with a hex string. It reopens the
+ file for write, positions to the specified location, formats
+ the string as characters, and writes. This method is used
+ to overwrite the <code>/Contents</code> entry in the signature dictionary.
+
+ @param asFile The ASFile to write to.
+ @param digSigOffset A structure specifying the byte position
+ and size to overwrite:
+ <ul>
+ <li>Writes padding blanks to the file if formatted length is less than this length.</li>
+ <li>Does not write and returns <code>0</code> if the formatted length is longer than this length.</li>
+ <li>Does not write and returns <code>0</code> if the formatted length is greater than <code>8200</code> bytes.</li>
+ </ul>
+ @param cosObj The Cos string to be written.
+ @return The number of bytes written.
+ @see DigSigCosObjOverwrite
+ @see DigSigFileGetEOF
+ @see DigSigFileSetPos
+ @see DigSigFileRead
+ @see DigSigOverwriteIntArray
+ @see DigSigOverwriteBytes
+*/
+PIPROC(ASInt32, DigSigOverwriteHexstring,
+ (ASFile asFile, const DigSigOffset digSigOffset, const CosObj cosObj), asFile, digSigOffset, cosObj)
+
+/**
+ Overwrites any or all entries in a signature dictionary.
+ It reopens the file for write, positions to the specified place,
+ and writes exactly the number of bytes specified in <code>digSigOffset</code>.
+ @param asFile The ASFile to write to.
+ @param digSigOffset A structure specifying the byte position
+ and size to overwrite.
+ @param p A byte string to be written. It must be in the correct
+ format, given the type of entry as defined in Section 8.7
+ in the PDF Reference.
+ @return The number of bytes written, or <code>0</code> if unsuccessful.
+ @see DigSigCosObjOverwrite
+ @see DigSigFileGetEOF
+ @see DigSigFileSetPos
+ @see DigSigFileRead
+ @see DigSigOverwriteIntArray
+ @see DigSigOverwriteHexstring
+
+ @note To overwrite a text string entry, such as <code>/Reason</code>,
+ the string must be in the format <code>"< xxx >"</code>, not <code>"xxx"</code>.
+*/
+PIPROC(ASInt32, DigSigOverwriteBytes,
+ (ASFile asFile, const DigSigOffset digSigOffset, const char *p), asFile, digSigOffset, p)
+
+
+/**
+ Calculates the MD5 hash function over a set of byte ranges
+ in a file.
+ @param asFile The file over which the hash function is
+ calculated.
+ @param byteRange An array of pairs of integers specifying
+ the byte offset and length of one or more subsets of the file.
+ The hash function is calculated over all these subsets,
+ concatenated in order.
+ @param md5hash A pointer to a buffer that receives the
+ 16 byte hash value.
+ @return The MD5 hash function over a set of byte ranges in <code>asFile</code>.
+ It also returns the total number of bytes over which the hash
+ is calculated. It returns <code>0</code> if the byte range array has an
+ odd number of elements or if it is unsuccessful.
+*/
+PIPROC(ASInt32, DigSigMD5ByteRange,
+ (ASFile asFile, CosObj byteRange, char *md5hash), asFile,byteRange, md5hash)
+
+/**
+ Updates the signature panel, if any, associated with <code>pdDoc</code>.
+
+ @param pdDoc The document whose panel is to be updated.
+ It verifies a digital signature.
+ @param pdDoc The document.
+*/
+PIPROC(void, DigSigUpdatePanel,
+ (PDDoc pdDoc), pdDoc)
+
+
+/**
+ Converts a byte string to a PDF hex string.
+ @param byteP A pointer to the byte string.
+ @param hexP (Filled by the method) A pointer to an output
+ buffer to hold the hex string. It must be at least <code>(length * 2) + 3</code> bytes.
+ The string begins with <code>"\<"</code> and ends with
+ <code>"\>"</code>, followed by a <code>NULL</code> character. For example, the two
+ byte string <code>"A/"</code> is converted to <code>"\<412f\>\\0"</code>.
+ @param length The length of the byte string in bytes.
+ @see DigSigHexToByte
+*/
+PIPROC(void, DigSigByteToHex,
+ (unsigned char * byteP, unsigned char * hexP, ASInt32 length), byteP, hexP, length)
+
+/**
+ <p>Converts a PDF hex string to a byte string. For example,
+ the 6 byte string <code>"&lt;412f&gt;"</code> converts to the 2-byte string <code>"(A/)"</code>.</p>
+
+ <p>The first byte of the hex string is ignored. The last byte
+ of an even length hex string is ignored. </p>
+
+ <p>Middle bytes outside the ranges <code>0-9</code>, <code>a-f</code>, and <code>A-F</code> are treated
+ as <code>0</code>. Pairs of middle bytes are converted to byte values
+ <code>0-255</code> and stored in the output buffer.</p>
+ @param hexP Pointer to the hex string. The string must
+ begin with <code>'&lt;'</code> and end with <code>'&gt;'</code>, optionally followed by
+ a <code>NULL</code> character.
+ @param byteP (Filled by the method) A pointer to an output
+ buffer to hold the byte string. It must be at least <code>(length - 2) / 2</code> bytes long.
+ @param length The length of the hex string in bytes, not including
+ any trailing <code>NULL</code> character (that is, <code>strlen(hexP)</code>).
+ @see DigSigByteToHex
+*/
+PIPROC(void, DigSigHexToByte,
+ (unsigned char * hexP, unsigned char * byteP, ASInt32 length), hexP, byteP, length)
+
+/** Signs and saves a document, using the specified field and signing method. If
+ <code>sigField</code> is <code>NULL</code>, makes a field of size 0x0 points.
+ @param pdDoc IN/OUT The document to be signed.
+ @param sigField IN/OUT The field to be signed or CosNull.
+ @param filterKey IN/OUT The signing method to use.
+*/
+PIPROC(void, DigSigSignDoc,
+ (PDDoc pdDoc, CosObj sigField, ASAtom filterKey), pdDoc, sigField, filterKey)
+
+/* Return an XObject that is created and stored in the PDF file.
+ Bounding box of XObject is 100 x 100.
+ dsXObjType must be one of DSBlankXObj, DSUnknownXObj or DSInvalidXObj */
+/**
+ Gets a Cos XObject for one of the standard signature graphics:
+ blank, question mark, and cross.
+
+ <p>It creates an AcroForm dictionary if none exists in the document,
+ makes a Default Resources (DR) dictionary if none exists,
+ creates an XObject dictionary if none exists, and creates
+ three standard XObjects: DSBlankXObj, DSUnknownXObj, and
+ DSInvalidXObj if they do not exist. These objects may be
+ used to modify the appearance of a digital signature. Each
+ object has a bounding box of 100 x 100 points and an identity
+ transformation matrix. </p>
+ @param cosDoc The document in which to include the standard
+ XObject.
+ @param dsXObjType The type of object to get.
+ @return The CosObj of the desired type, or CosNewNull if
+ unsuccessful.
+*/
+PIPROC(CosObj, DigSigGetStdXObj,
+ (CosDoc cosDoc, DSXObjType dsXObjType), cosDoc, dsXObjType)
+
+/** Causes the signature to be redrawn.
+ @param pdAnnot IN/OUT The annotation the user clicked on or tabbed into.
+ @param avPV IN/OUT The page view that contains the annotation.
+ @param bIsSelected IN/OUT <code>true</code> if the annotation is selected, <code>false</code> otherwise.
+ @see DigSigHexToByte
+ @see DigSigRightClick
+*/
+PIPROC(void, DigSigDraw,
+ (PDAnnot pdAnnot, AVPageView avPV, ASBool bIsSelected), pdAnnot, avPV, bIsSelected)
+
+/**
+ The AcroForm plug-in calls this method when the user tabs
+ to a signature annotation and activates it by pressing the
+ space bar or Enter key, which is equivalent to a left-mouse
+ click. The parameters parallel those of the AVAnnotHandlerDoKeyDownProc()
+ callback. If the key pressed is an ASCII <code>\<CR\></code>, this method
+ selects the annotation.
+ @param pdAnnot The annotation the user clicked on.
+ @param avPV The current page view.
+ @param nKey The key pressed by the user.
+ @param nFlags Indicates which modifier keys are pressed,
+ if any. It must be an OR of the Modifier Keys values, which
+ are the following:
+ <ul>
+ <li>AV_COMMAND</li>
+ <li>AV_OPTION</li>
+ <li>AV_CONTROL </li>
+ <li>AV_SHIFT </li>
+ </ul>
+ @see DigSigDraw
+ @see DigSigClick
+ @see DigSigRightClick
+*/
+PIPROC(void, DigSigKeyDown,
+ (PDAnnot pdAnnot, AVPageView avPV, ASUns16 nKey, ASInt16 nFlags), pdAnnot, avPV, nKey, nFlags)
+
+/**
+ The AcroForm plug-in calls this method when a user left-clicks
+ inside a signature annotation.
+ @param pdAnnot The annotation the user clicked on.
+ @param avPV The page view that contains the annotation.
+
+ @param nX The x-coordinate of the mouse click, specified
+ in device space coordinates.
+ @param nY The y-coordinate of the mouse click, specified
+ in device space coordinates.
+ @param nFlags Indicates which modifier keys are pressed,
+ if any. It must be an OR of the Modifier Keys values, which
+ are the following:
+ <ul>
+ <li>AV_COMMAND</li>
+ <li>AV_OPTION</li>
+ <li>AV_CONTROL </li>
+ <li>AV_SHIFT </li>
+ </ul>
+ @param nClicks The number of clicks.
+ @see DigSigDraw
+ @see DigSigHexToByte
+ @see DigSigRightClick
+*/
+PIPROC(void, DigSigClick,
+ (PDAnnot pdAnnot, AVPageView avPV, ASInt16 nX, ASInt16 nY, ASInt16 nFlags, ASInt16 nClicks),
+ pdAnnot, avPV, nX, nY, nFlags, nClicks)
+
+
+/**
+ Invokes the signature-panel pull-right menu and allows the
+ user to select an action.
+ @param pdAnnot The annotation the user clicked on.
+ @param avPV The page view the annotation is within.
+ @param nX The x-coordinate of the mouse click, specified
+ in device space coordinates.
+ @param nY The y-coordinate of the mouse click, specified
+ in device space coordinates
+ @param nFlags Indicates which modifier keys are pressed,
+ if any. It must be an OR of the Modifier Keys values, which
+ are the following:
+ <ul>
+ <li>AV_COMMAND</li>
+ <li>AV_OPTION</li>
+ <li>AV_CONTROL </li>
+ <li>AV_SHIFT </li>
+ </ul>
+ @param nClicks The number of clicks.
+ @see DigSigDraw
+ @see DigSigHexToByte
+ @see DigSigClick
+*/
+PIPROC(void, DigSigRightClick,
+ (PDAnnot pdAnnot, AVPageView avPV, ASInt16 nX, ASInt16 nY, ASInt16 nFlags, ASInt16 nClicks),
+ pdAnnot, avPV, nX, nY, nFlags, nClicks)
+
+/**
+ Gets a character string that is suitable as the field name
+ for a new signature field. This is guaranteed not to duplicate
+ an existing field name. Typically, this name would be of
+ the form <code>XXXXnnn</code>, where <code>XXXX</code> is the word <code>'signature'</code> in
+ a local Latin-alphabet language, and <code>nnn</code> is a unique integer.
+
+ @param cosDoc The document that will contain the new field.
+ @return The unique field name string.
+*/
+PIPROC(char *, DigSigGetUniqueTitle,
+ (CosDoc cosDoc), cosDoc)
+
+/**
+ Recalculates the number of signature fields and redraws
+ the signature panel after any signature is deleted.
+
+ <p>It is called by the AcroForm plug-in or any agent that deletes
+ a signature field. </p>
+ @param pdDoc The document that contains a signature field.
+ @see DigSigAddedSig
+ @see DigSigDeletedSigEx
+*/
+PIPROC(void, DigSigDeletedSig,
+ (PDDoc pdDoc), pdDoc)
+
+/**
+ Recalculates the number of signature fields and redraws
+ the signature panel after any signature is added.
+
+ <p>It is called by the AcroForm plug-in or any agent that adds a
+ signature field. </p>
+ @param pdDoc The document that contains the signature
+ field.
+ @see DigSigAddedSigEx
+ @see DigSigDeletedSig
+*/
+PIPROC(void, DigSigAddedSig,
+ (PDDoc pdDoc), pdDoc)
+
+/**
+ Compares the pages of two documents, producing a third document
+ of the differences.
+
+ @param docA The first document to compare.
+ @param docB The second document to compare.
+ @param insertDiffs Not used.
+ @return <code>true</code> if the pages of the documents are identical, <code>false</code>
+ otherwise.
+ @see DigSigCompareWords
+
+ @note Superseded by DigSigComparePagesEx() in Acrobat 6.0.
+*/
+PIPROC(ASBool, DigSigComparePages,
+ (PDDoc docA, PDDoc docB, ASBool insertDiffs), docA, docB, insertDiffs)
+
+
+/**
+ Compares the words of two documents, producing a third document
+ of the differences.
+
+ @param docA The first document being compared.
+ @param docB The second document being compared.
+ @param iUseFonts If <code>true</code>, the font name, size, and color
+ of each character in a word are considered when matching
+ against other words. If <code>false</code>, these attributes are ignored.
+ @return <code>true</code> if the words of the documents are identical, <code>false</code>
+ otherwise.
+ @see DigSigComparePages
+ @see DigSigCompareWordsAndFontsRecent
+ @see DigSigCompareWordsEx
+ @see DigSigCompareWordsRecent
+
+ @note Superseded by DigSigCompareWordsEx() in Acrobat 6.0.
+*/
+PIPROC(ASBool, DigSigCompareWords,
+ (PDDoc docA, PDDoc docB, ASBool iUseFonts), docA, docB, iUseFonts)
+
+/**
+ Compares the words of two documents, producing a third document
+ of the differences.
+
+ @param docA The first document being compared.
+ @param docB The second document being compared.
+ @param iUseFonts If <code>true</code>, the font name, size, and color
+ of each character in a word are considered when matching
+ against other words. If <code>false</code>, these attributes are ignored.
+ @return <code>true</code> if the words of the documents are identical, <code>false</code>
+ otherwise.
+ @see DigSigComparePages
+ @see DigSigCompareWords
+ @see DigSigCompareWordsAndFontsRecent
+ @see DigSigCompareWordsEx
+
+ @note Superseded by DigSigCompareWordsEx() in Acrobat 6.0.
+*/
+PIPROC(void, DigSigCompareWordsRecent,
+ (PDDoc docA, PDDoc docB, ASBool iUseFonts), docA, docB, iUseFonts)
+
+/**
+ Opens the DigSig's property dialog box.
+ @param avDoc The document that contained the signature
+ field.
+ @param sigField The signature field of the document.
+*/
+PIPROC(void, DigSigDoProperties,
+ (AVDoc avDoc, CosObj sigField), avDoc, sigField)
+
+/**
+ Compares the words of two documents, taking into account
+ possible font changes, and produces a third document of
+ the differences.
+
+ @param docA The first document being compared.
+ @param docB The second document being compared.
+ @param iUseFonts If <code>true</code>, the font name, size, and color
+ of each character in a word are considered when matching
+ against other words. If <code>false</code>, these attributes are ignored.
+ @return <code>true</code> if the words of the documents are identical, <code>false</code>
+ otherwise.
+ @see DigSigComparePages
+ @see DigSigCompareWords
+ @see DigSigCompareWordsEx
+ @see DigSigCompareWordsRecent
+
+ @note Superseded by DigSigCompareWordsEx() in Acrobat 6.0.
+*/
+PIPROC(void, DigSigCompareWordsAndFontsRecent,
+ (PDDoc docA, PDDoc docB, ASBool iUseFonts), docA, docB, iUseFonts)
+
+/*************************************************************************
+ * New routines for Acrobat 5.0
+ ************************************************************************/
+
+/**
+ Creates a new temporary file that corresponds to the state
+ of the file after the specified signature was applied.
+ @param pdDoc The document that contained the signature
+ field.
+ @param sigField The signature field of the document.
+*/
+PIPROC(void, DigSigRollbackToSig,
+ (PDDoc pdDoc, CosObj sigField), pdDoc, sigField)
+
+
+/**
+ Enumerates the signature fields (signed and unsigned) in
+ the file.
+ @param pdDoc The document that contains the signature
+ field.
+ @param proc The procedure to call once for each existing
+ signature.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see DigSigEnumProc
+*/
+PIPROC(void, DigSigEnumSignatures, ( PDDoc pdDoc, DigSigEnumProc proc, void *clientData ), pdDoc, proc, clientData )
+
+/**
+ Tests whether a document has been modified since being signed
+ with the specified signature.
+ @param doc The document containing the signature field.
+ @param sigField The signature field.
+ @return ASBool <code>true</code> if the document has been modified, <code>false</code> otherwise.
+
+*/
+PIPROC(ASBool, DigSigDocModifiedAfterSig, ( PDDoc doc, CosObj sigField ), doc, sigField)
+
+/**
+ Returns a new XObject with the specified bounding box. Unlike
+ the XObject returned by DigSigGetStdXObj(), DigSig does not
+ attach the XObject returned by this function to the CosDoc.
+
+ @param cosDoc The document containing the new object.
+ @param pBBoxRec A pointer to the desired bounding box.
+ @param dsXObjType The type of object to create.
+ @return A CosObj containing the new XObject form, or CosNewNull
+ if unsuccessful.
+ @see DigSigGetStdXObj
+*/
+PIPROC(CosObj, DigSigCreateStdXObj,
+ ( const CosDoc cosDoc, const ASFixedRect* const pBBoxRec, DSXObjType dsXObjType),
+ cosDoc, pBBoxRec, dsXObjType)
+
+/**
+ Creates a stream that is composed of either four or five layers:
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Layer</TH><TH>Description</TH></TR>
+ <TR><TD><code>n0</code></TD><TD>Background, inherited from the form annotation background.</TD></TR>
+ <TR><TD><code>n1</code></TD><TD>Middle, question mark or equivalent (uses the default if the layer <code>1</code> XObject is CosNull).</TD></TR>
+ <TR><TD><code>n2</code></TD><TD>Main, text and appearance (must be provided).</TD></TR>
+ <TR><TD><code>n3</code></TD><TD>Top, blank or X (uses the default if <code>layer1XObject</code> is CosNull).</TD></TR>
+ <TR><TD><code>nN</code></TD><TD>(Optional) Very top layer, used for text showing the validity state (none if CosNull).</TD></TR>
+ </TABLE>
+
+ @note Superseded by DigSigAPCreateLayeredStreamEx() in Acrobat 6.0.
+*/
+PIPROC(CosObj, DSAPCreateLayeredStream, ( const CosDoc cosDoc,
+ const CosObj layer1XObject, ASFixedMatrixP layer1Matrix,
+ const CosObj layer2XObject, ASFixedMatrixP layer2Matrix,
+ const CosObj layer3XObject, ASFixedMatrixP layer3Matrix,
+ const CosObj layerNXObject, ASFixedMatrixP layerNMatrix, ASInt16 layerNNum,
+ AFPDWidgetBorder border,
+ PDColorValue cBorder, PDColorValue cBackGnd,
+ ASFixed width, ASFixed height,
+ PDRotate pdr ),
+ cosDoc, layer1XObject, layer1Matrix, layer2XObject, layer2Matrix,
+ layer3XObject, layer3Matrix, layerNXObject, layerNMatrix, layerNNum,
+ border, cBorder, cBackGnd, width, height, pdr)
+
+/**
+ Legacy procedure for backwards compatibility.
+*/
+PIPROC(CosObj, DSAPXObjectFromXObjListObsolete, ( CosDoc cosDoc,
+ const ASFixedRect* const bbox,
+ DSAPXObjEntry objEntry,
+ TextAppearanceP ta,
+ AFPDWidgetBorder border,
+ ASBool bMerge ),
+ cosDoc, bbox, objEntry, ta, border, bMerge)
+
+/**
+ Takes text for a stream <code>logoStr</code> with bounding box <code>logoBBox</code> and fits it precisely to
+ <code>bbox</code>. It performs uniform x and y scaling, and x-y translation. It can raise an exception. This
+ method might throw an exception, and should be wrapped in a DURING/HANDLER block.
+ @param cosDoc The document.
+ @param logoStr The stream containing the text.
+ @param logoStrSize The length of the logo string, or <code>0</code> to calculate the length automatically.
+ @param logoBBox The bounding box for <code>logoStr</code>.
+ @param bbox The bounding rectangle of the result.
+ @return A Cos object XObject that contains the logo.
+ @see DigSigAPCreateLayeredStream
+ @see DigSigAPXObjectFromXObjList
+*/
+PIPROC(CosObj, DSAPXObjectFromLogo, ( const CosDoc cosDoc,
+ const char* logoStr, const ASInt32 logoStrSize,
+ const ASFixedRect* const logoBBox,
+ const ASFixedRect* const bbox ),
+ cosDoc, logoStr, logoStrSize,logoBBox,bbox)
+
+/** Create a new XObject that consists of vertically stacked blocks of text,
+ where each block is auto-sized to fit its own bounding box.
+*/
+PIPROC(CosObj, DSAPCreateCompositeTextXObj, ( const CosDoc cosDoc,
+ const DSAPTextEntry inText,
+ const ASFixedRect* const bbox, /* already compensated for rotation and position within annot*/
+ const CosObj sigField, const CosObj sigAnnot ),
+ cosDoc, inText, bbox, sigField, sigAnnot )
+
+/*
+** New routines for Acrobat 6.0
+*/
+
+/**
+ Recalculates the number of signature fields and redraws
+ the signature panel after a specified signature is deleted.
+
+ <p>This version, added in Acrobat 6.0, is more efficient than
+ DigSigDeletedSig(), but requires that you specify the signature
+ field that is being deleted. </p>
+ @param pdDoc The document that contained the signature
+ field.
+ @param cosField The signature field that was deleted.
+ @see DigSigAddedSigEx
+ @see DigSigDeletedSig
+*/
+PIPROC(void, DigSigDeletedSigEx,
+ (PDDoc pdDoc, CosObj cosField), pdDoc, cosField)
+
+/**
+ Recalculates the number of signature fields and redraws
+ the signature panel after a specified signature field is
+ added.
+
+ <p>This version, added in Acrobat 6.0, is more efficient than
+ DigSigAddedSig(), but requires that you specify the signature
+ field that is being added. </p>
+ @param pdDoc The document that contains the signature
+ field.
+ @param cosField The signature field that was added.
+ @see DigSigAddedSig
+ @see DigSigDeletedSigEx
+*/
+PIPROC(void, DigSigAddedSigEx,
+ (PDDoc pdDoc, CosObj cosField), pdDoc, cosField)
+
+/************************************************************************************
+ * New routines for Acrobat 6.0
+ ***********************************************************************************/
+
+
+/**
+ Begins the process of creating a new signature reference
+ dictionary containing an object digest. The caller fills
+ in the values of the refParams structure.
+
+ <p>In this method, no persistent changes are made to the document;
+ therefore, it is safe to cancel the creation of the reference
+ dictionary without any cleanup. To save the file, DigSigCommitSigRefDict()
+ should be called next. </p>
+ @param refParams A structure containing information about
+ the signature reference dictionary; it must be filled in by
+ the caller.
+ @param errParams (Filled by the method) A structure containing
+ information about exceptions that occurred.
+ @return <code>kDSTrue</code> on success, <code>kDSFalse</code> on parameter errors.
+ <code>kDSException</code> means an exception occurred; information can
+ be found in <code>errParams</code>.
+ @see DigSigClearSigRefDict
+ @see DigSigCommitSigRefDict
+ @see DigSigFinishSigRefDict
+ @see DigSigVerifySigRefDict
+*/
+PIPROC(DSRetCode, DigSigNewSigRefDict,
+ ( DSSigRefDictParams refParams, DSSigRefDictErrParams errParams ), refParams, errParams)
+
+/**
+ Adds a signature reference dictionary to the document and
+ saves the document.
+
+ <p>This method uses the information that was provided in the
+ DSSigRefDictErrParams parameter block during the call to <code>DigSigNewSigRefDict.transformMethod()</code>,
+ and <code>sigDict</code> should match the values provided at that time. </p>
+
+ <p>After this operation, some of the values in the reference
+ dictionary are still dummy values, including <code>DigestValue</code>
+ and <code>DigestLocation</code> (see Section 8.7, <i>Digital Signatures</i>
+ in the <i>PDF Reference</i> for more information). DigSigFinishSigRefDict()
+ should be called next to fill in these values. </p>
+
+ <p>If signing is cancelled after this operation, DigSigClearSigRefDict()
+ should be called to remove all references to the reference
+ dictionary from the document. </p>
+ @param transformMethod The transform method.
+ @param sigDict The signature dictionary that contains
+ the signature reference dictionary.
+ @param pOutRefDict (Filled by the method) A pointer to the
+ committed signature reference dictionary.
+ @return <code>kDSTrue</code> on success, <code>kDSFalse</code> on parameter error, <code>kDSException</code>
+ for all other errors.
+ @see DigSigClearSigRefDict
+ @see DigSigFinishSigRefDict
+ @see DigSigNewSigRefDict
+ @see DigSigVerifySigRefDict
+*/
+PIPROC(DSRetCode, DigSigCommitSigRefDict,
+ ( ASAtom transformMethod, CosObj sigDict, CosObj *pOutRefDict ), transformMethod, sigDict, pOutRefDict )
+
+/**
+ Computes the digest value and stores it in the reference
+ dictionary. It should be called after DigSigCommitSigRefDict().
+
+ @param transformMethod The transform method used to calculate
+ the digest. It must match what was originally specified in DigSigNewSigRefDict().
+
+ @param sigDict The signature dictionary that contains
+ the signature reference dictionary.
+ @param refDict The reference dictionary returned from
+ the call to DigSigCommitSigRefDict().
+ @param errParams A structure containing information about
+ an exception.
+ @return <code>kDSTrue</code> on success, <code>kDSFalse</code> on parameter error. <code>kDSException</code>
+ means an exception, and the information about it can be
+ found in <code>errParams</code>.
+ @see DigSigClearSigRefDict
+ @see DigSigCommitSigRefDict
+ @see DigSigNewSigRefDict
+ @see DigSigVerifySigRefDict
+*/
+PIPROC(DSRetCode, DigSigFinishSigRefDict,
+ ( ASAtom transformMethod, CosObj sigDict, CosObj refDict, DSSigRefDictErrParams errParams ), transformMethod, sigDict, refDict, errParams )
+
+/**
+ Verifies an object signature stored in a signature reference
+ dictionary. It involves computing the object digest using
+ the transform method and comparing it to the digest value
+ stored in the reference dictionary.
+ @param transformMethod The transform method used to calculate
+ the signature. It must match the one stored in <code>refDict</code>.
+ @param sigDict The signature dictionary that contains
+ the signature reference dictionary.
+ @param refDict The signature reference dictionary that
+ was returned from a call to DigSigCommitSigRefDict().
+ @param errParams A structure containing information about
+ an exception.
+ @return <code>kDSTrue</code> on success, <code>kDSFalse</code> on parameter error. <code>kDSException</code>
+ means an exception, and the information about it can be
+ found in <code>errParams</code>.
+ @see DigSigClearSigRefDict
+ @see DigSigCommitSigRefDict
+ @see DigSigFinishSigRefDict
+ @see DigSigNewSigRefDict
+*/
+PIPROC(DSRetCode, DigSigVerifySigRefDict,
+ ( ASAtom transformMethod, CosObj sigDict, CosObj refDict, DSSigRefDictErrParams errParams ),
+ transformMethod, sigDict, refDict, errParams )
+
+/**
+ Clears the signature reference dictionary referred to by
+ <code>refDict</code> and removes any reference to it from the document.
+
+ @param transformMethod The transform method. It should
+ match the one contained in <code>sigDict</code>.
+ @param sigDict The signature dictionary containing the
+ signature reference dictionary.
+ @param refDict The signature reference dictionary.
+ @return A positive value on success.
+ @see DigSigCommitSigRefDict
+ @see DigSigFinishSigRefDict
+ @see DigSigNewSigRefDict
+ @see DigSigVerifySigRefDict
+*/
+PIPROC(DSRetCode, DigSigClearSigRefDict,
+ ( ASAtom transformMethod, CosObj sigDict, CosObj refDict ), transformMethod, sigDict, refDict )
+
+/**
+ Un-registers a signing method plug-in. The caller should
+ deallocate the DigSigHandler object after making this call.
+
+ @param digSigHandler A structure specifying the name of
+ the filter and the functions to call to create and validate
+ signatures.
+ @see DigSigRegisterFilter
+*/
+PIPROC(void, DigSigUnregisterFilter,
+ ( DigSigHandler digSigHandler ), digSigHandler)
+
+/*************************************************************************
+ * DigSigAPCreateLayeredStreamEx
+ * Creates a stream that is composed of four or five layers:
+ * layer n0 - background, inherited from form annot background
+ * layer n1 - middle, question mark or equivalent (none if CosNull)
+ * layer n2 - main, text and appearance (must be provided)
+ * layer n3 - top, blank or X (none if CosNull)
+ * layer nN - optional very top layer, used for text showing validity state (none if CosNull)
+ ************************************************************************/
+
+/**
+ Creates a signature-appearance layered stream, using a parameters structure.
+ @param params The parameter structure containing the signature appearance layer
+ information.
+ @return A new CosStream composed of different layers.
+ @see DigSigAPXObjectFromLogo
+ @see DigSigAPXObjectFromXObjList
+ @note Supersedes DigSigAPCreateLayeredStream() in Acrobat 6.0.
+*/
+PIPROC(CosObj, DSAPCreateLayeredStreamEx, (const DSAPCreateLayeredStreamExParams params), params)
+
+/**
+ Tests whether a particular signature field in a document
+ is signed.
+ @param pdDoc The document that contains the signature field.
+ @param sigField The signature field that is tested.
+ @return <code>true</code> if the signature field is signed, <code>false</code> otherwise.
+
+ @see DigSigIsDocSigned
+*/
+PIPROC(ASBool, DigSigIsSigSigned,
+ (PDDoc pdDoc, CosObj sigField), pdDoc, sigField)
+
+
+/*****************************************************************************
+ DigSig Notification Server
+*****************************************************************************/
+/**
+ Registers callbacks with the notification server, to be
+ called for specific digital signature events.
+
+ <p>The events are: </p>
+
+ <ul>
+ <li>Adding or deleting a signature field.</li>
+ <li>Requesting a new signature, and the success of the request. </li>
+ <li>Requesting that an existing signature be cleared, and the success of the request. </li>
+ </ul>
+
+ @param notificationID The type of event for which to register
+ a callback.
+ @param notifyProc The procedure to call when a field change,
+ request, or success event occurs.
+ @param notifyFailure The procedure to call when a failure
+ event occurs.
+ @param clientData A pointer to client-supplied data to
+ pass to the callback procedure.
+ @return The observer identifier, which must be provided to DigSigUnregisterObserver().
+
+ @see DigSigUnregisterObserver
+*/
+PIPROC(ASInt32, DigSigRegisterObserver,
+ (DSNotificationType notificationID, DSNotificationProc notifyProc,
+ DSNotificationFailureProc notifyFailure, void *clientData), notificationID, notifyProc,
+ notifyFailure, clientData)
+
+/**
+ Un-registers an event interest from the notification server.
+
+ @param notificationID The event for which an interest
+ has been registered, as specified in DigSigRegisterObserver().
+
+ @param observerID The observer identifier as returned
+ by DigSigRegisterObserver().
+ @see DigSigRegisterObserver
+*/
+PIPROC(void, DigSigUnregisterObserver,
+ (DSNotificationType notificationID, ASInt32 observerID),
+ notificationID, observerID)
+
+
+/**
+ Gets the author signature for a document, as a Cos object.
+
+ @param doc The document for which the author signature
+ is obtained.
+ @return The CosObj containing the author signature.
+ @see DigSigGetDocMDPSetting
+*/
+PIPROC(CosObj, DigSigGetDocAuthorSignature,
+ (PDDoc doc), doc)
+
+/**
+ Compares the pages of two documents, producing a third document
+ of the differences.
+ @param docA The first document being compared.
+ @param docB The second document being compared.
+ @param params A structure containing the sensitivity level
+ for the comparison.
+ @return <code>true</code> if the pages of the documents are identical, <code>false</code>
+ otherwise.
+ @see DigSigComparePages
+ @see DigSigCompareWords
+*/
+PIPROC(ASBool, DigSigComparePagesEx,
+ (PDDoc docA, PDDoc docB, DSComparePagesParams params), docA, docB, params)
+
+/**
+ Compares the words of two documents, producing a third document
+ of the differences.
+ @param docA The first document being compared.
+ @param docB The second document being compared.
+ @param params A structure containing the comparison parameters.
+ @return <code>true</code> if the words of the documents are identical, <code>false</code>
+ otherwise.
+ @see DigSigComparePagesEx
+ @see DigSigCompareWords
+ @see DigSigCompareWordsAndFontsRecent
+ @see DigSigCompareWordsRecent
+
+ @note Supersedes DigSigCompareWords(), DigSigCompareWordsAndFontsRecent(),
+ and DigSigCompareWordsRecent() in Acrobat 6.0.
+*/
+PIPROC(ASBool, DigSigCompareWordsEx,
+ (PDDoc docA, PDDoc docB, DSCompareWordsParams params), docA, docB, params)
+
+/**
+ Verifies a digital signature.
+ @param pdDoc The document.
+ @param sigField The signature field to verify.
+ @param bUI When <code>true</code>, it can bring up the user interface
+ dialogs if needed.
+ @return The validity state that results from verification.
+ @see DigSigClearSig
+*/
+PIPROC(DSValidState, DigSigVerifySig,
+ (PDDoc pdDoc, CosObj sigField, ASBool bUI), pdDoc, sigField, bUI)
+
+/**
+ Clears a signature field in a document. This removes the
+ signature so that the document is unsigned.
+ @param pdDoc The document.
+ @param sigField The signature field to clear.
+ @see DigSigVerifySig
+*/
+PIPROC(void, DigSigClearSig,
+ (PDDoc pdDoc, CosObj sigField), pdDoc, sigField)
+
+/**
+ Gets the Modification Detection and Prevention (MDP) setting for the author signature for the specified
+ document.
+ @param pdDoc The document for which the MDP setting is obtained.
+ @return The MDP setting of the document's author signature, or <code>kDSMDPNone</code>
+ if there is no author signature.
+ @see DigSigGetDocAuthorSignature
+*/
+PIPROC(DSMDPType, DigSigGetDocMDPSetting,
+ (PDDoc pdDoc), pdDoc)
+
+/**
+ Gets the LiveCycle Reader Extensions signature for a document, as a Cos object.
+ @param pdDoc The document for which the LiveCycle Reader Extensions signature is obtained.
+ @return The CosObj containing the LiveCycle Reader Extensions signature.
+ @see DigSigGetDocAuthorSignature
+*/
+PIPROC(CosObj, DigSigGetUbiquitySig,
+ (PDDoc pdDoc), pdDoc)
+
+ /** Creates a new XObject from the list of DSAPXObjEntry objects. Each object in the list is
+ either an existing stream or a string that will be laid out and reflowed into a new stream.
+ The streams are then turned into XObjects. Controls allow you to adjust the vertical
+ position of each stream within bbox. If <code>bMerge</code> is <code>true</code>, this method combines the
+ new XObjects into one large XObject, and the sub XObjects are destroyed. Otherwise the
+ method leaves the component XObjects intact and new XObjects are created but not
+ destroyed for the text entries. Text streams use the text attributes of <code>ta</code>.
+ @param cosDoc The document in which to include the standard XObject.
+ @param bbox The bounding box for the signature.
+ @param objEntry A list of DSAPXObjEntry objects.
+ @param ta The text appearance. For an explanation of the TextAppearanceP type, see "AcroForm
+ Declarations" in the Acrobat and PDF Language API Reference.
+ @param border The border style for the signature, as returned by AFPDWidgetGetBorder().
+ For an explanation of the AFPDWidgetBorder type, see "AcroForm Declarations" in the Acrobat and PDF Language API Reference.
+ @param bMerge When <code>false</code>, keep the sub XObjects. When <code>true</code>, combine them all into
+ one large one.
+ @return An XObject composed from the list.
+ @see DigSigAPCreateLayeredStream
+ @see DigSigAPXObjectFromLogo
+*/
+PIPROC(CosObj, DSAPXObjectFromXObjList, ( CosDoc cosDoc,
+ const ASFixedRect* const bbox,
+ DSAPXObjEntry objEntry,
+ TextAppearanceP ta,
+ size_t taSize,
+ AFPDWidgetBorder border,
+ ASUns32 flags),
+ cosDoc,bbox,objEntry,ta, taSize, border,flags)
+
+/* End of DigSigHFTProcs.h */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DirectoryHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DirectoryHFT.h
new file mode 100644
index 0000000..273b797
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/DirectoryHFT.h
@@ -0,0 +1,393 @@
+/*************************************************************************
+ * DirectoryHFT.h
+ *
+ * Copyright (c) 2000-2006 Adobe Systems Inc. All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains the
+ * property of Adobe Systems Incorporated and its suppliers, if any.
+ * The intellectual and technical concepts contained herein are
+ * proprietary to Adobe Systems Incorporated and its suppliers and may
+ * be covered by U.S. and Foreign Patents, patents in process, and are
+ * protected by trade secret or copyright law. Dissemination of this
+ * information or reproduction of this material is strictly forbidden
+ * unless prior written permission is obtained from Adobe Systems Inc.
+ *
+ * Description: Interface to Acrobat Directory Services
+ *
+ * 06-20-2002 sheretov -- Created
+ ************************************************************************/
+
+#ifndef DIR_SERVICES_HFT_H
+#define DIR_SERVICES_HFT_H
+
+#include "CoreExpT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/************************************************************************************
+ * Error handling
+ ***********************************************************************************/
+
+/** @name Error handling */
+ /*@{*/
+/** */
+typedef ASInt32 SecRetCode;
+/** */
+#define kSecTrue 1
+/** */
+#define kSecFalse 0
+/** */
+#define kSecOk 1
+/** */
+#define kSecError -1
+/*@}*/
+
+/** If a function returns <code>-1</code> or less, you can call a <code>GetLastError</code> appropriate to
+ the context and retrieve information about the last error. That call may
+ return <code>NULL</code> which basically means "Unknown Error". Note that in the presence
+ of threads, the error information may become inaccurate. */
+typedef struct _t_SecErrorInfo
+{
+ /** The size of this structure. */
+ ASSize_t size;
+ /** The description of the error. */
+ ASText text;
+ /** Adobe use only. It must be set to <code>NULL</code> by external developers. */
+ void* reserved;
+}
+SecErrorInfoRec, *SecErrorInfo;
+
+/** */
+typedef struct _t_DirConnection* DirConnection;
+/************************************************************************************
+ * Rules for out-parameters
+ ***********************************************************************************/
+
+/* Consider the following function prototypes:
+
+ void foo(ASBool* outResult);
+ void bar(void** outResult);
+ void baz(ASCab outResult);
+
+ - if(outResult==0) when the call is made, the caller is not interested in this
+ out parameter. The callee should not fail just because outResult is 0.
+
+ - if(outResult!=0 && *outResult==0) when the call is made, the callee is
+ expected to allocate the result and the caller is responsible for its
+ deallocation. One exception to this rule is when the callee wishes to
+ return an "empty value" (such as an empty ASText or ASCab), it will leave
+ *outResult==0.
+
+ - if(outResult!=0 && *outResult!=0) when the call is made, the callee will
+ deallocate the *outResult if needed and replace it with a new value.
+
+ - Raw memory and primitive structures (the ones that don't have any members that
+ require deallocation) shall be deallocated with ASFree/miFree. ASCabs ASTexts
+ and other known types shall be deallocated with their special routines
+ (ASTextDestroy(), ASCabDestroy(), etc.)
+
+ - If a call fails, *outResult remains unchanged.
+*/
+
+/************************************************************************************
+ * Directory Information format
+ ***********************************************************************************/
+
+/** A directory information structure contains configuration settings used to
+ establish a connection to a directory. Common top-level properties are
+ defined below. Note that the prefix <code>DirStdEntry_</code> is reserved for standard
+ entries and should not be used for entries specific to a particular directory.
+ Optionally, this could contain other configuration information specific to
+ the directory.
+*/
+typedef ASCab DirectoryInfo;
+
+/* The name of this directory for display purposes.
+ An example of this would be <code>"Adobe Employees"</code>.
+
+ <p>TEXT, REQUIRED.</p> */
+#define PROP_DirectoryInfo_Name "dirStdEntryName"
+
+/* The ID. It is a unique atom that identifies the directory.
+ An example of this would be <code>Adobe.PPKMS.LDAP.dir0</code>.
+ <p> ATOM, REQUIRED.</p> */
+#define PROP_DirectoryInfo_ID "dirStdEntryID"
+
+/* The language independent name of the directory handler to be used
+ when connecting to this directory. This is required when there
+ are multiple direcrtory handlers within a DSP. An example of this
+ would be <code>Adobe.PPKMS.ADSI</code>.
+
+ <p>ATOM, OPTIONAL.</p> */
+#define PROP_DirectoryInfo_DirHandlerID "dirStdEntryPrefDirHandlerID"
+
+/* The language independent name of the type of directory this represents.
+ This is required when you want to import or export entries. An example
+ of this would be <code>LDAP, ADSI</code>.
+
+ <p>ATOM, OPTIONAL.</p> */
+#define PROP_DirectoryInfo_DirType "dirStdEntryDirType"
+
+/* An integer that represent the version of the directory.
+
+ <p>Integer, OPTIONAL.</p> */
+#define PROP_DirectoryInfo_Version "dirStdEntryVersion"
+
+/************************************************************************************
+ * Directory Attributes
+ ***********************************************************************************/
+
+/* These are attribute names used in the "standard" connection functions
+ (DirSetStandardOutputOptions(), DirStandardSearch(), etc.) These attribute names
+ are used both as keys/property names (in representation of the search results) and
+ as values (in representation of output settings). The attributes are stored as
+ ASText so as to enable easy conversion from JavaScript.
+*/
+#define ATTR_DirFirstName "firstName"
+#define ATTR_DirLastName "lastName"
+#define ATTR_DirFullName "fullName"
+#define ATTR_DirEmail "email"
+#define ATTR_DirCertificates "certificates"
+#define ATTR_DirPrefEncryptionCert "defaultEncryptCert"
+
+/************************************************************************************
+ * Connection Interface.
+ ***********************************************************************************/
+
+/** Group names are represented as text in an ASCab. For example:
+ <p><code>{ ("0", "friends"), ("1", "family"), ... } </code></p>
+*/
+typedef ASCab DirGroupList;
+/** Retrieves the list of groups that this connection supports.
+
+ @return <code>kSecOk</code> is successful, <code>kSecError</code> otherwise.
+*/
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_getGroups)
+ ( DirConnection inConnection, DirGroupList outGroupList );
+
+/*-----------------------------------------------------------------------------------
+ The output options of a connection determine which directory attributes will be
+ returned when a search is performed. There are two calls for setting the output
+ options, and they differ in the way the attributes are interpreted. The default
+ behavior for a new connection if output options have not been explicitly set, is
+ as if DirSetStandardOutputOptions call with all "standard" attributes has been
+ made.
+*/
+
+/** A directory attribute collection is used to set output options of a directory
+ connection.
+
+ <p>The collection is represented in an ASCab as:</p>
+ <p><code>{ ("0", "nameOfAttribute1"), ("1", "nameOfAttribute2"), ... } </code></p>
+*/
+typedef ASCab DirAttributes;
+
+/** Special case: The <code>ATTR_Certificates</code> attribute is intended to encompass all
+ certificate attributes a directory might have. If <code>ATTR_Certificates</code> is requested,
+ it may have to be translated into several attributes depending on the directory.
+ @param inConnection The connection for which the output options are set.
+ @param inRequestedAttrs Contains only <i>standard</i> attribute names defined as <code>ATTR_</code>
+ constants above. These names will most likely need to be translated to ones
+ understood by specific directory types. For example, in the case of a generic LDAP
+ directory, <code>ATTR_LastName</code> may be interpreted as <code>"sn"</code>.
+ @param outUnsupportedAttrs Used to pass back the the names of attributes (from
+ <code>inRequestedAttrs</code>) that are not supported by the connection.
+ @return <code>kOK</code> or <code>kSecError</code>
+*/
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_setStandardOutputOptions)
+ ( DirConnection inConnection,
+ DirAttributes inRequestedAttrs, DirAttributes outUnsupportedAttrs);
+
+/** TBD
+ @param inConnection The connection for which the output options are set.
+ @param inRequestedAttrs Contains attribute names that are not translated. Any
+ attribute names can be used as long as they are supported by the target directory.
+ @param outUnsupportedAttrs Used to pass back the the names of attributes (from
+ <code>inRequestedAttrs</code>) that are not supported by the connection.
+ @return <code>kSecOk</code> or <code>kSecError</code>
+*/
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_setCustomOutputOptions)
+ ( DirConnection inConnection,
+ DirAttributes inRequestedAttrs, DirAttributes outUnsupportedAttrs);
+
+/*-----------------------------------------------------------------------------------
+ Perform a search using a connection. There are three different search functions,
+ and although all three are optional, at least one should be implemented for a
+ connection to be usable.
+*/
+
+/** Directory search criteria are represented as a set of key/value pairs where the
+ keys are attribute names and the values are search strings applied to those
+ attributes. A logical "AND" is implied when multiple search criteria are present.
+ Unrecognized search criteria are ignored.
+
+ @example <code>{ ("firstName", "John"), ("lastName", "S*") }</code> searches for people with
+ the first name "John" whose last name starts with letter 'S'.
+
+ @note Special Case: For a <i>standard</i> search, the value of the <code>ATTR_Certificates</code> search
+ criterion shall be a list of certificates. In order for a directory entry to
+ match the criterion, it must have all those certificates.
+*/
+typedef ASCab DirSearchCriteria;
+
+/** Search and enumeration results are represented as a two-dimensional ASCab where
+ each "row" is itself an ASCab that contains attributes defined by SetOutputOptions
+ calls.
+
+ @example
+ <p><code>{ ("0", { ("fullName", "John Doe"), ("email", "johndoe@yahoo.com") } ),</code></p>
+ <p><code>("1", { ("fullName", "Jane Doe"), ("email", "janedoe@hotmail.com") } ) }</code></p>
+
+
+ @note Special Case: If standard output options are used and <code>ATTR_Certificates</code> is
+ included, the <code>ATTR_Certificates</code> value in the <i>row</i> ASCab objects will be another ASCab,
+ which stores all certificates associated with that directory entry.
+
+ @example <code>
+ { ("0", { ("fullName", John Doe"), ("certificates", { ("0", encryptionCertBinaryValue), ("1", signingCertBinaryValue) } ) } ) }
+ </code>
+*/
+typedef ASCab DirResults;
+
+/** TBD
+ @param inConnection The connection that is used to perform the search.
+ @param inSearchCriteria Search criteria to be used. The only <i>standard</i> attribute
+ names defined as <code>ATTR_</code> constants above are present. These names most likely
+ will need to be translated to ones understood by specific directory types.
+ For example, in the case of a generic LDAP directory, <code>ATTR_LastName</code> may be
+ interpreted as <code>"sn"</code>.
+ @param inGroup Specifies the group, which should be searched. <code>NULL</code> means that all
+ groups should be searched.
+ @param outResults Points to the results of the search.
+ @return <code>kSecOk</code> or <code>kSecError</code>
+*/
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_standardSearch)
+ ( DirConnection inConnection,
+ DirSearchCriteria inSearchCriteria,
+ ASText inGroup,
+ DirResults outResults );
+
+/* TBD
+ @param inConnection The connection that is used to perform the search.
+ @param inSearchCriteria Search criteria to be used. The attribute names are not
+ translated. Any attribute names can be used as long as they are supported
+ by the target directory.
+ @param inGroup Specifies the group, which should be searched. <code>NULL</code> means that all
+ groups should be searched.
+ @param outResults Points to the results of the search.
+ @return <code>kSecOk</code> or <code>kSecError</code>
+*/
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_customSearch)
+ ( DirConnection inConnection,
+ DirSearchCriteria inSearchCriteria,
+ ASText inGroup,
+ DirResults outResults );
+
+/** Pops up a custom user interface that allows the user to set search criteria and execute the
+ search.
+ @param inConnection The connection that is used to perform the search.
+ @param inGroup Specifies the group, which should be searched. <code>NULL</code> means that all
+ groups should be searched.
+ @param outResults Points to the results of the search.
+ @return <code>kSecOk</code> or <code>kSecError</code>
+*/
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_customUISearch)
+ ( DirConnection inConnection,
+ ASText inGroup,
+ DirResults outResults );
+
+/** Retrieve all entries in the specified groups. If that would take too long, return
+ <code>kDirDirectoryTooLargeToList</code>. This may be used in the user interface to immediately display
+ the contents of a small directory or group, so responsiveness is important.
+ @param inConnection The connection that is used to list directory entries.
+ @param inGroup Specifies the group, which should be listed. <code>NULL</code> means that all
+ groups should be listed.
+ @param outResults Points to the results of the enumeration.
+ @return <code>kSecOk</code>, <code>kDirDirectoryTooLargeToList</code>, or <code>kSecError</code>
+*/
+
+#define kDirDirectoryTooLargeToList 2
+
+/** TBD */
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_list)
+ ( DirConnection inConnection,
+ ASText inGroup,
+ DirResults outResults );
+
+/** Closes the specified directory connection.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DirConnection_close)
+ ( DirConnection inConnection );
+
+/** Retrieves information about the directory associated with the connection.
+ @param inConnection A directory connection object.
+ @param outDirInfo A Cab file containing the directory information.
+ @return <code>kSecOk</code> or <code>kSecError</code>
+*/
+typedef ACCBPROTO1 SecRetCode (ACCBPROTO2 *DirConnection_getDirInfo)
+ ( DirConnection inConnection, DirectoryInfo outDirInfo );
+
+/** Retrieves information about the last error that occurred in the specified
+ connection.
+*/
+typedef ACCBPROTO1 SecErrorInfo (ACCBPROTO2 *DirConnection_getLastError)
+ ( DirConnection inConnection );
+
+/** A directory connection object structure.
+*/
+typedef struct _t_DirConnection
+{
+ /** The size of this data structure. */
+ ASSize_t size;
+ /** The data to be passed in. */
+ void* clientData;
+
+ /** */
+ DirConnection_close close;
+ /** */
+ DirConnection_getLastError getLastError;
+ /** */
+ DirConnection_getDirInfo getDirInfo;
+ /** */
+ DirConnection_getGroups getGroups;
+
+ /** */
+ DirConnection_setStandardOutputOptions setStandardOutputOptions;
+ /** */
+ DirConnection_setCustomOutputOptions setCustomOutputOptions;
+
+ /* Although all four of these methods are optional, at least one must be present
+ for a connection to be usable: */
+ /** */
+ DirConnection_standardSearch standardSearch;
+ /** */
+ DirConnection_customSearch customSearch;
+ /** */
+ DirConnection_customUISearch customUISearch;
+ /** */
+ DirConnection_list list;
+
+}
+DirConnectionRec, *DirConnectionHandler;
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* DIR_SERVICES_HFT_H */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h
new file mode 100644
index 0000000..6d6725b
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h
@@ -0,0 +1,61 @@
+/*********************************************************************************
+ File: EReturnValidator.h
+ Created: October 10, 2004
+ Purpose: This file contains code that makes sure ASRaiseAware objects are
+ not used inside of E_RETURN.
+
+*
+* ___________________
+*
+* (c) Copyright 2004-2006 Adobe Systems, Inc.
+* All Rights Reserved.
+*
+* NOTICE: Adobe permits you to use, modify, and distribute this file
+* in accordance with the terms of the Adobe license agreement
+* accompanying it. If you have received this file from a source other
+* than Adobe, then your use, modification, or distribution of it
+* requires the prior written permission of Adobe.
+************************************************************************************/
+#ifndef _H_ERETURNVALIDATOR
+#define _H_ERETURNVALIDATOR
+
+#ifdef __cplusplus
+
+/* These are templates that make sure ASRaiseAware clases are not used
+ inside of a E_RETURN. Returning an ASRaiseAware class inside of
+ E_RETURN will leave cause the exception frame stack to go out of
+ order leaving the wrong frame at the top of the stack. This could
+ lead to a crash in the event an ASRaise is called
+*/
+#if (defined(DEBUG) && defined(__MWERKS__) && defined(MAC_ENV) && PLUGIN)
+ #define DO_ADDITIONAL_RAISEAWARE_CHECKS 1
+#else
+ #define DO_ADDITIONAL_RAISEAWARE_CHECKS 0
+#endif
+
+#if DO_ADDITIONAL_RAISEAWARE_CHECKS
+
+template < class T >
+struct IsRaiseAwareClass
+{
+ typedef int You_Can_Not_E_Return_Raise_Aware_Objects;
+};
+
+template < class T >
+inline void IsRaiseAwareClassHelperFunction( T* pThis )
+{
+ typename IsRaiseAwareClass< T >::Raise_Aware_Classes_Must_Use_The_Macro_RAISEAWARECLASS tester = 0;
+}
+
+template < class T >
+inline void IsNotRaiseAwareClassHelperFunction( T someInstance )
+{
+ typename IsRaiseAwareClass< T >::You_Can_Not_E_Return_Raise_Aware_Objects tester = 0;
+}
+
+#endif /* DO_ADDITIONAL_RAISEAWARE_CHECKS */
+
+#endif /* __cplusplus */
+
+#endif /* _H_ERETURNVALIDATOR */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EncConvE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EncConvE.h
new file mode 100644
index 0000000..f7613a0
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EncConvE.h
@@ -0,0 +1,19 @@
+/* EncConvE.h -- error codes for the PDFCMap system.
+** Raised using Raise(PDFCMapError(pdErrSomeError)).
+** These are only valid if ErrGetSystem(err) == ErrSysPDDoc (see ASError.h)
+** Use the ErrGetCode macro to get these values from an Int32.
+** May be passed to the PDErrorMonitor.
+** For all errors which contain '%s' in the string, a value will be passed in the
+** PDErrorInfo->string field.
+**
+** NOTE: Do not remove or reorder any error codes. They are part of the API. To
+** obsolete an error, rename it by appending OBSOLETE.
+** Add all new errors at the end.
+** Changing error names will break plug-ins when they are recompiled.
+** You can change the text of errors.
+*/
+
+DefineErr(pdErrBadCMap, "The encoding (CMap) specified by a font is corrupted.")
+DefineErr(pdErrCMapNotFound, "The encoding (CMap) specified by a font is missing.")
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Environ.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Environ.h
new file mode 100644
index 0000000..a6b9c0f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Environ.h
@@ -0,0 +1,78 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ Environ.h
+
+ - This file checks for the existence of a PLATFORM macro and, if it
+ exists, #includes the file it points to. Said file should define
+ the macros listed below in accordance with the development platform,
+ runtime environment and runtime OS.
+
+ Same now applies for the PRODUCT macro.
+
+*********************************************************************/
+
+#ifndef _H_Environ
+#define _H_Environ
+
+#ifndef PLATFORM
+#ifdef WIN_ENV
+#define PLATFORM "winpltfm.h"
+#elif __OS2__
+#define PLATFORM "os2pltfm.h"
+#elif defined(unix) || defined(__unix)
+ #define PLATFORM "UnixPlatform.h"
+#else
+#error You must define the PLATFORM macro
+#endif
+#endif
+
+#include PLATFORM
+
+#define qWR 1
+
+#ifndef MAC_ENV
+#ifdef MAC_PLATFORM
+#define MAC_ENV 1 /* MAC_ENV is an archaic synonym for MAC_PLATFORM */
+#endif
+#endif
+
+#ifndef ACCB1
+#error PLATFORM failed to #define ACCB1
+#endif
+
+#ifndef ACCB2
+#error PLATFORM failed to #define ACCB2
+#endif
+
+#ifndef ACCBPROTO1
+#error PLATFORM failed to #define ACCBPROTO1
+#endif
+
+#ifndef ACCBPROTO2
+#error PLATFORM failed to #define ACCBPROTO2
+#endif
+
+#ifndef PRODUCT
+#if defined(WIN_ENV) || defined(UNIX_PLATFORM) || defined(OS2_PLATFORM)
+#define PRODUCT "Plugin.h"
+#else
+#error You must define the PRODUCT macro
+#endif
+#endif
+
+#include PRODUCT
+
+#endif
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrE.h
new file mode 100644
index 0000000..ae3f315
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrE.h
@@ -0,0 +1,19 @@
+/* FontSvrE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "FontSvrEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrEASF.h
new file mode 100644
index 0000000..0531cb6
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FontSvrEASF.h
@@ -0,0 +1,38 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(fsErrNoError, "No error.")
+
+DefineErr(fsErrInitFailed, "Initialization of the font server module failed.")
+
+DefineErr(fsErrNoMMFonts, "No Multiple Master fonts were found.")
+
+DefineErr(fsErrNoATM, "Adobe Type Manager was not found.")
+
+DefineErr(fsErrNeedNewATM, "A new version of Adobe Type Manager is required.")
+
+DefineErr(fsErrNoT1ZapfDingbats, "The Type 1 font 'ZapfDingbats' must be installed.")
+
+DefineErr(fsErrDownloadFailed, "Font download failed.")
+
+DefineErr(fsErrDownloadAborted, "Font download aborted.")
+
+DefineErr(fsErrBadParameter, "Bad parameter passed to font server.")
+
+DefineErr(fsErrMissingFont, "No ZapfDingbats or Multiple Master fonts found.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFT.h
new file mode 100644
index 0000000..ba6b459
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFT.h
@@ -0,0 +1,153 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ FormsHFT.h
+
+ - HFT definitions for Acrobat Form Plugin
+
+*********************************************************************/
+
+#ifndef _H_FormsHFT
+#define _H_FormsHFT
+
+/*****************************************************************************
+ Selectors and types for all AcroForm HFT functions
+*****************************************************************************/
+#include "AF_Sel.h"
+#include "AF_ExpT.h"
+
+#if __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+extern HFT gAcroFormHFT;
+
+#if __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#define Init_AcroFormHFT ASExtensionMgrGetHFT(ASAtomFromString(AcroFormHFT_NAME), AcroFormHFT_LATEST_VERSION)
+
+/* this is provided as a service to plug-ins which had previously used
+ the AcroForms HFT. The AF (AcroForms) prefix will need to be
+ present in future versions using the AcroForms HFT structures. */
+#if AF_HFT_COMPATIBILE
+#define PDDocLoadPDFields AFPDDocLoadPDFields
+#define PDDocEnumPDFields AFPDDocEnumPDFields
+#define PDDocGetPDFieldFromName AFPDDocGetPDFieldFromName
+#define PDFieldFromCosObj AFPDFieldFromCosObj
+#define PDFieldGetCosObj AFPDFieldGetCosObj
+#define PDFieldIsValid AFPDFieldIsValid
+#define PDFieldIsTerminal AFPDFieldIsTerminal
+#define PDFieldGetValue AFPDFieldGetValue
+#define PDFieldGetFlags AFPDFieldGetFlags
+#define PDFieldGetName AFPDFieldGetName
+#define PDFieldIsAnnot AFPDFieldIsAnnot
+#define PDFieldSetValue AFPDFieldSetValue
+#define PDFieldSetFlags AFPDFieldSetFlags
+#define PDFieldSetOptions AFPDFieldSetOptions
+#define PDFieldReset AFPDFieldReset
+#endif /* AF_HFT_COMPATIBILE */
+
+
+
+/* The following APIs are NOT availabe in Reader configuration */
+#if !READER_PLUGIN
+#define ExportAsFDF (*((ExportAsFDF_SELPROTO)(gAcroFormHFT[ExportAsFDF_SEL])))
+#define ExportAsHtml (*((ExportAsHtml_SELPROTO)(gAcroFormHFT[ExportAsHtml_SEL])))
+#define ImportAnFDF (*((ImportAnFDF_SELPROTO)(gAcroFormHFT[ImportAnFDF_SEL])))
+
+#define ExportAsFDFEx (*((ExportAsFDFEx_SELPROTO)(gAcroFormHFT[ExportAsFDFEx_SEL])))
+#define ExportAsHtmlEx (*((ExportAsHtmlEx_SELPROTO)(gAcroFormHFT[ExportAsHtmlEx_SEL])))
+#define AssembleFormAndImportFDF (*((AssembleFormAndImportFDF_SELPROTO)(gAcroFormHFT[AssembleFormAndImportFDF_SEL])))
+#define ExportAsFDFWithParams (*((ExportAsFDFWithParams_SELPROTO)(gAcroFormHFT[ExportAsFDFWithParams_SEL])))
+#define AFPDFormFromPage (*((AFPDFormFromPage_SELPROTO)(gAcroFormHFT[AFPDFormFromPage_SEL])))
+#define AFLayoutNew (*((AFLayoutNew_SELPROTO)(gAcroFormHFT[AFLayoutNew_SEL])))
+#define AFLayoutDelete (*((AFLayoutDelete_SELPROTO)(gAcroFormHFT[AFLayoutDelete_SEL])))
+
+/* AFLayoutCreateStream has been revved */
+#define AFLayoutCreateStream (*((AFLayoutCreateStream_SELPROTO)(gAcroFormHFT[AFLayoutCreateStream_SEL])))
+#define AFLayoutBorder (*((AFLayoutBorder_SELPROTO)(gAcroFormHFT[AFLayoutBorder_SEL])))
+#define AFLayoutText (*((AFLayoutText_SELPROTO)(gAcroFormHFT[AFLayoutText_SEL])))
+#define AFLayoutTextEx (*((AFLayoutTextEx_SELPROTO)(gAcroFormHFT[AFLayoutTextEx_SEL])))
+#define AFLayoutIconText (*((AFLayoutIconText_SELPROTO)(gAcroFormHFT[AFLayoutIconText_SEL])))
+#define AFImportAppearance (*((AFImportAppearance_SELPROTO)(gAcroFormHFT[AFImportAppearance_SEL])))
+#define AFDrawText (*((AFDrawText_SELPROTO)(gAcroFormHFT[AFDrawText_SEL])))
+
+#endif
+
+/* The following APIs are availabe in Reader configuration */
+
+#define IsPDDocAcroForm (*((IsPDDocAcroForm_SELPROTO)(gAcroFormHFT[IsPDDocAcroForm_SEL])))
+#define AFPDDocLoadPDFields (*((AFPDDocLoadPDFields_SELPROTO)(gAcroFormHFT[AFPDDocLoadPDFields_SEL])))
+#define AFPDDocEnumPDFields (*((AFPDDocEnumPDFields_SELPROTO)(gAcroFormHFT[AFPDDocEnumPDFields_SEL])))
+#define AFPDDocGetPDFieldFromName (*((AFPDDocGetPDFieldFromName_SELPROTO)(gAcroFormHFT[AFPDDocGetPDFieldFromName_SEL])))
+#define AFPDFieldFromCosObj (*((AFPDFieldFromCosObj_SELPROTO)(gAcroFormHFT[AFPDFieldFromCosObj_SEL])))
+#define AFPDFieldGetCosObj (*((AFPDFieldGetCosObj_SELPROTO)(gAcroFormHFT[AFPDFieldGetCosObj_SEL])))
+#define AFPDFieldIsValid (*((AFPDFieldIsValid_SELPROTO)(gAcroFormHFT[AFPDFieldIsValid_SEL])))
+#define AFPDFieldIsTerminal (*((AFPDFieldIsTerminal_SELPROTO)(gAcroFormHFT[AFPDFieldIsTerminal_SEL])))
+#define AFPDFieldGetValue (*((AFPDFieldGetValue_SELPROTO)(gAcroFormHFT[AFPDFieldGetValue_SEL])))
+#define AFPDFieldGetFlags (*((AFPDFieldGetFlags_SELPROTO)(gAcroFormHFT[AFPDFieldGetFlags_SEL])))
+#define AFPDFieldGetName (*((AFPDFieldGetName_SELPROTO)(gAcroFormHFT[AFPDFieldGetName_SEL])))
+#define AFPDFieldIsAnnot (*((AFPDFieldIsAnnot_SELPROTO)(gAcroFormHFT[AFPDFieldIsAnnot_SEL])))
+#define AFPDFieldSetValue (*((AFPDFieldSetValue_SELPROTO)(gAcroFormHFT[AFPDFieldSetValue_SEL])))
+#define AFPDFieldSetFlags (*((AFPDFieldSetFlags_SELPROTO)(gAcroFormHFT[AFPDFieldSetFlags_SEL])))
+#define AFPDFieldSetOptions (*((AFPDFieldSetOptions_SELPROTO)(gAcroFormHFT[AFPDFieldSetOptions_SEL])))
+#define AFPDFieldReset (*((AFPDFieldReset_SELPROTO)(gAcroFormHFT[AFPDFieldReset_SEL])))
+
+/* Not in Reader - ExportAsFDF */
+/* Not in Reader - ExportAsHtml */
+/* Not in Reader - ImportAnFDF */
+
+#define ResetForm (*((ResetForm_SELPROTO)(gAcroFormHFT[ResetForm_SEL])))
+#define AcroFormRegisterObserver (*((AcroFormRegisterObserver_SELPROTO)(gAcroFormHFT[AcroFormRegisterObserver_SEL])))
+#define AcroFormUnregisterObserver (*((AcroFormUnregisterObserver_SELPROTO)(gAcroFormHFT[AcroFormUnregisterObserver_SEL])))
+#define AFGetScriptingContext (*((AFGetScriptingContext_SELPROTO)(gAcroFormHFT[AFGetScriptingContext_SEL])))
+/* Not in Reader - ExportAsFDFEx */
+/* Not in Reader - ExportAsHtmlEx */
+/* Not in Reader - AssembleFormAndImportFDF */
+/* Not in Reader - ExportAsFDFWithParams */
+/* Not in Reader - AFPDFormFromPage */
+
+/* AFLayoutNew has been revved */
+#define AFLayoutNew (*((AFLayoutNew_SELPROTO)(gAcroFormHFT[AFLayoutNew_SEL])))
+#define AFLayoutDelete (*((AFLayoutDelete_SELPROTO)(gAcroFormHFT[AFLayoutDelete_SEL])))
+
+/* AFLayoutCreateStream has been revved */
+/* Not in Reader - AFLayoutCreateStream */
+/* Not in Reader - AFLayoutBorder */
+/* Not in Reader - AFLayoutText */
+/* Not in Reader - AFLayoutTextEx */
+/* Not in Reader - AFLayoutIconText */
+#define AFPDFieldValueChanged (*((AFPDFieldValueChanged_SELPROTO)(gAcroFormHFT[AFPDFieldValueChanged_SEL])))
+#define AFPDWidgetGetRotation (*((AFPDWidgetGetRotation_SELPROTO)(gAcroFormHFT[AFPDWidgetGetRotation_SEL])))
+#define AFPDFieldGetDefaultTextAppearance (*((AFPDFieldGetDefaultTextAppearance_SELPROTO)(gAcroFormHFT[AFPDFieldGetDefaultTextAppearance_SEL])))
+#define AFPDFieldSetDefaultTextAppearance (*((AFPDFieldSetDefaultTextAppearance_SELPROTO)(gAcroFormHFT[AFPDFieldSetDefaultTextAppearance_SEL])))
+/* AFPDFieldGetDefaultTextAppearanceEx and AFPDFieldSetDefaultTextAppearanceEx new in Acrobat 7.0 */
+#define AFPDFieldGetDefaultTextAppearanceEx (*((AFPDFieldGetDefaultTextAppearanceEx_SELPROTO)(gAcroFormHFT[AFPDFieldGetDefaultTextAppearanceEx_SEL])))
+#define AFPDFieldSetDefaultTextAppearanceEx (*((AFPDFieldSetDefaultTextAppearanceEx_SELPROTO)(gAcroFormHFT[AFPDFieldSetDefaultTextAppearanceEx_SEL])))
+#define AFPDWidgetGetBorder (*((AFPDWidgetGetBorder_SELPROTO)(gAcroFormHFT[AFPDWidgetGetBorder_SEL])))
+#define AFPDWidgetSetBorder (*((AFPDWidgetSetBorder_SELPROTO)(gAcroFormHFT[AFPDWidgetSetBorder_SEL])))
+#define AFPDWidgetGetAreaColors (*((AFPDWidgetGetAreaColors_SELPROTO)(gAcroFormHFT[AFPDWidgetGetAreaColors_SEL])))
+#define AFPDWidgetSetAreaColors (*((AFPDWidgetSetAreaColors_SELPROTO)(gAcroFormHFT[AFPDWidgetSetAreaColors_SEL])))
+
+/* Not in Reader - AFImportAppearance */
+/* Not in Reader - AFImportAppearanceEx */
+#define AFGetScriptingContextEx (*((AFGetScriptingContextEx_SELPROTO)(gAcroFormHFT[AFGetScriptingContextEx_SEL])))
+#define AFExecuteThisScript (*((AFExecuteThisScript_SELPROTO)(gAcroFormHFT[AFExecuteThisScript_SEL])))
+#define AFCalculateFields (*((AFCalculateFields_SELPROTO)(gAcroFormHFT[AFCalculateFields_SEL])))
+#define AFGetDefaultFieldSize (*((AFGetDefaultFieldSize_SELPROTO)(gAcroFormHFT[AFGetDefaultFieldSize_SEL])))
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFTProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFTProcs.h
new file mode 100644
index 0000000..1e2f28a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/FormsHFTProcs.h
@@ -0,0 +1,848 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+*********************************************************************/
+
+/**
+ Indicates whether a PDDoc contains an Acrobat form.
+ @param doc The PDDoc to test.
+ @return <code>true</code> if <code>doc</code> contains a form, <code>false</code> otherwise.
+ @see AFPDFieldIsValid
+*/
+PIPROC(ASBool, IsPDDocAcroForm, (PDDoc doc), doc)
+
+/**
+ Ensures that every PDField in the given PDDoc exists.
+
+ @note It is no longer necessary to call this method. It
+ still exists for backwards compatibility, but its purpose
+ is now automatically taken care of internally.
+ @param doc The PDDoc for the form whose PDField objects are loaded.
+*/
+PIPROC(void, AFPDDocLoadPDFields, (PDDoc doc), doc)
+
+/**
+ Enumerates all PDField objects that exist in a PDDoc.
+ @param doc The PDDoc whose PDField objects are enumerated.
+ @param terminals If <code>true</code>, only PDField objects without children
+ are enumerated.
+ @param parameterIgnored This parameter is no longer used (it is ignored).
+ @param proc A user-supplied callback that is called for
+ each PDField. The enumeration terminates if <code>proc</code> returns
+ false.
+ @param clientData A pointer to user-specified data that
+ is passed to <code>proc</code> each time it is called.
+*/
+PIPROC(void, AFPDDocEnumPDFields, (PDDoc doc, ASBool terminals, ASBool parameterIgnored, AFPDFieldEnumProc proc, void *clientData),doc, terminals, parameterIgnored, proc, clientData)
+
+/**
+ Retrieves a PDField with a given name from a PDDoc. (If
+ multiple fields have the same name, a change to any of them
+ affects all of them.)
+ @param doc The PDDoc containing the field.
+ @param name The name of the field to retrieve.
+ @return The PDField specified by name. It returns <code>NULL</code> if there is
+ no PDField with the given name in the PDDoc.
+ @see AFPDFieldGetName
+*/
+PIPROC(PDField, AFPDDocGetPDFieldFromName, (PDDoc doc, char* name), doc, name)
+
+/**
+ Retrieves the PDField object for which a Cos object is the
+ dictionary.
+ @param dict The Cos object for which to retrieve the corresponding
+ PDField object.
+ @return The PDField corresponding to <code>dict</code>. It returns <code>NULL</code> if the Cos
+ object is not a PDField.
+ @see AFPDFieldGetCosObj
+*/
+PIPROC(PDField, AFPDFieldFromCosObj, (CosObj dict), dict)
+
+/**
+ Retrieves the Cos object which is the field object of a
+ PDField object.
+ @param fldP The PDField object for which to retrieve the
+ corresponding Cos object.
+ @return A Cos object corresponding to the PDField object (<code>fldP</code>).
+ @see AFPDFieldGetCosObj
+ @see AFPDFieldGetDefaultTextAppearance
+ @see AFPDFieldGetName
+ @see AFPDFieldGetValue
+*/
+PIPROC(CosObj, AFPDFieldGetCosObj, (PDField fldP), fldP)
+
+/**
+ Determines whether a field is valid.
+
+ @param fldP The field to test.
+ @return <code>true</code> if <code>fldP</code> is a valid PDField, <code>false</code> otherwise.
+ @see AFPDFieldIsAnnot
+ @see AFPDFieldIsTerminal
+ @note This method is intended only to ensure that the field
+ has not been deleted, not to ensure that all necessary information
+ is present and the field has valid values.
+*/
+PIPROC(ASBool, AFPDFieldIsValid, (PDField fldP), fldP)
+
+/**
+ Determines whether a field is <i>terminal</i>, which means that the field has no
+ children or it has the same name as its children.
+ @param fldP The PDField to test.
+ @return <code>true</code> if <code>fldP</code> is valid and all its children (if any) have
+ the same name as <code>fldP</code>. Otherwise all have unique names.
+
+ @see AFPDFieldIsAnnot
+ @see AFPDFieldIsValid
+*/
+PIPROC(ASBool, AFPDFieldIsTerminal, (PDField fldP), fldP)
+
+/**
+ Retrieves the value from a PDField. The value is stored
+ in the field entry with the V key.
+
+ <p>Values can be inherited. If a PDField Cos object does not
+ have a V key, its value is inherited from a parent's V key
+ (the parent must have the same name as the PDField). For
+ example, radio buttons inherit values this way. </p>
+
+ @param fldP The PDField whose value is retrieved.
+ @return The value of the field as a CosObj. If the field has no
+ value, <code>NULL</code> is returned.
+ @see AFPDFieldGetCosObj
+ @see AFPDFieldGetDefaultTextAppearance
+ @see AFPDFieldGetName
+ @see AFPDFieldSetValue
+ @note Retrieving the value of a radio button or combo box
+ requires Cos-level programming. See the <i>PDF Reference</i> for
+ details.
+*/
+PIPROC(CosObj, AFPDFieldGetValue, (PDField fldP), fldP)
+
+/**
+ Retrieves the flags of a PDField for a given flag type.
+
+ @param fldP The PDField whose flags are obtained.
+ @param flagType The type of flags to obtain.
+ @return The value of the flags of <code>flagType</code>.
+ @see AFPDFieldGetName
+ @see AFPDFieldGetValue
+ @see AFPDFieldSetFlags
+*/
+PIPROC(ASUns32, AFPDFieldGetFlags, (PDField fldP, AF_Flags_t flagType), fldP, flagType)
+
+/**
+ Gets the name of a PDField object.
+ @param fldP The PDField whose name is retrieved.
+ @return A <code>NULL</code>-terminated string.
+
+ @see AFPDFieldGetDefaultTextAppearance
+ @see AFPDFieldGetValue
+ @note Do not modify or free this string. To use this string
+ indefinitely, copy it to a private buffer.
+*/
+PIPROC(char*, AFPDFieldGetName, (PDField fldP), fldP)
+
+/**
+ Determines whether a PDField is an annotation (PDAnnot),
+ that is, whether the field dictionary is also an annotation.
+ If this is the case, the value of Subtype is Widget.
+ @param fldP The field in question.
+ @return <code>true</code> if the PDField is an Acrobat annotation, <code>false</code> otherwise.
+
+ @see AFPDFieldIsTerminal
+ @see AFPDFieldIsValid
+*/
+PIPROC(ASBool, AFPDFieldIsAnnot, (PDField fldP), fldP)
+
+/**
+ Sets the value for a PDField. The value is stored in the
+ field entry with the V key. The method updates the display of the field
+ and its namesakes; that is, fields with the same fully qualified
+ names, if any. Changing the field dictionary's value for
+ the V entry directly does not change the appearance of the
+ field, which is represented by the AP key.
+
+ @param fldP The field whose value is set.
+ @param val The field's new value. If it is different than
+ the previous value, all previous instances of value keys
+ (V) in the field's dictionary and those of its namesakes
+ (fields with the same fully qualified name) are removed.
+ @see AFPDFieldGetValue
+ @see AFPDFieldSetFlags
+ @see AFPDFieldSetOptions
+ @note Setting the value of a radio button or combo box requires
+ Cos-level programming. See the <i>PDF Reference</i> for details.
+*/
+PIPROC(ASBool, AFPDFieldSetValue, (PDField fldP, CosObj val), fldP, val)
+
+/**
+ Sets the flags of type <code>flagType</code> for a PDField.
+
+ <p>The flags of a field's children (if any) are also set. </p>
+
+ @param fldP The PDField for which to set flags and children's
+ flags.
+ @param flagType The type of the flags to set. If its value
+ is <code>Flags_Annot</code> and the PDField is not an annotation, no
+ flags are changed.
+ @param flags The value of the flags.
+ @see AFPDFieldGetDefaultTextAppearance
+ @see AFPDFieldSetOptions
+ @see AFPDFieldSetValue
+*/
+PIPROC(void, AFPDFieldSetFlags, (PDField fldP, AF_Flags_t flagType, AFPDFieldFlags_t flags), fldP, flagType, flags)
+
+/**
+ Sets the options entry for a field. The options entry has
+ the key <code>Opt</code> and represents a list of options for a choice
+ field.
+
+ <p>If the field is not valid, remove the options entry. </p>
+
+ @param fldP The PDField whose options are set.
+ @param array The value to set in the options entry.
+ @return <code>Good</code> if the operation succeeded, <code>Bad</code> otherwise.
+ @see AFPDFieldSetFlags
+ @see AFPDFieldSetValue
+*/
+PIPROC(RetCode, AFPDFieldSetOptions, (PDField fldP, CosObj array), fldP, array)
+
+/**
+ Sets a PDField object's value to its default state. This is the
+ value associated with the DV key for the field. If there
+ is no DV key for the field, set the field's value to the
+ <code>NULL</code> Cos object; otherwise, if the field has options, the default
+ DV is the first element of the <code>Opt</code> array.
+
+ <p>A DV entry's value can be inherited from a parent (just
+ like V). </p>
+
+ <p>The PDField object's value is set only if it is terminal (check this by calling AFPDFieldIsTerminal()).</p>
+
+ @param fldP The PDField to reset.
+ @see AFPDFieldIsTerminal
+ @see ResetForm
+*/
+PIPROC(void, AFPDFieldReset, (PDField fldP), fldP)
+
+/**
+ Exports form data to a CosDoc, which can be written to an
+ FDF file. See the <i>PDF Reference</i> for a description of this
+ format.
+
+ <p>To create an FDF file from the CosDoc, call CosDocSaveToFile(). </p>
+
+ @param pdForm The PDDoc for the form for which to export the data.
+ @param rgIncExcFlds If this parameter's value is CosNewNull(), then
+ all fields are exported and <code>bIncl</code> is ignored. If this parameter
+ is a CosArray, then the array elements may be:
+
+ <ul>
+ <li>
+ Names of fields (the names may be of non-terminal fields, which
+ is a fast and easy way to cause all their children to be
+ included in the FDF file).
+ </li>
+
+ <li>
+ <p>Arrays whose first element is a field name, and the rest of whose elements are field
+ dictionary key names whose values should be exported in the FDF file. </p>
+
+ <p>For example: <code>[ (My listbox) /AP /Opt ]</code></p>
+
+ <p>This variety of <code>rgIncExcFlds</code> array element can only be used if
+ <code>bIncl</code> is <code>true</code> (see below).</p>
+ </li>
+
+ <li>
+ <p>If <code>rgIncExcFlds</code> contains a single element, which is itself an array as described
+ above, and its first element, which corresponds to the
+ field name, is <code>NULL</code>, then the FDF file will include the
+ requested field properties of all fields. </p>
+
+ <p>For example: <code>[ null /F /Ff ]</code> </p>
+ </li>
+ </ul>
+
+ @param bIncl If <code>true</code>, <code>rgIncExcFlds</code> is an array of the
+ fields to export. Otherwise, <code>rgIncExcFlds</code> is an array of
+ the fields to exclude from exporting.
+ @param bEmpty If <code>true</code>, all fields selected per the above
+ criteria are exported. If <code>false</code>, exclude fields that have
+ no value.
+ @param bMenu If <code>true</code>, suppresses saving text fields that
+ have the <i>"password"</i> flag set, and does not force filling in
+ required fields when creating an FDF file.
+ @param bLoadFields IN Not used.
+ @param fdfPath IN The path where the FDF file will be saved
+ (by the client of ExportAsFDF()) after it is produced. You need
+ this in order to create an FDF file with an F key that gives the
+ relative path to the form from the location where the FDF
+ file will be saved. Pass <code>NULL</code> if an absolute path name is desired.
+ @return The FDF CosDoc object containing the exported data.
+ @exception gAFpdErrExportFdf is raised if it cannot export field data.
+ The viewer may raise other exceptions.
+ @see ExportAsFDFEx
+ @see ExportAsFDFWithParams
+ @see ImportAnFDF
+ @see AssembleFormAndImportFDF
+ @note ExportAsFDFWithParams() provides the same functionality with additional options.
+*/
+PIPROC(CosDoc, ExportAsFDF, (PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASBool bMenu, ASBool bLoadFields, ASPathName fdfPath), pdForm, rgIncExcFlds, bIncl, bEmpty, bMenu, bLoadFields, fdfPath)
+
+/**
+ Exports data from a form to a file in HTML format.
+ @param pdForm The PDDoc for the form whose data is exported.
+ @param rgIncExcFlds If this parameter's value is CosNewNull(), then
+ all fields are exported, and <code>bIncl</code> is ignored. If it is
+ a CosArray, then the array elements must be indirect references
+ to field dictionaries.
+ @param bIncl If <code>true</code>, <code>rgIncExcFlds</code> is an array of the
+ fields to export. Otherwise, <code>rgIncExcFlds</code> is an array of
+ the fields to exclude from exporting.
+ @param bEmpty If <code>true</code>, all fields selected per the above
+ criteria are exported. If <code>false</code>, exclude fields that have
+ no value.
+ @param Hfile The file to which the HTML data is written.
+ @see ExportAsHtmlEx
+*/
+PIPROC(void, ExportAsHtml, (PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASFile Hfile),pdForm, rgIncExcFlds, bIncl, bEmpty, Hfile)
+
+/**
+ Imports data from an FDF file into a PDDoc object's form. See the
+ <i>PDF Reference</i> for a description of this format.
+ @param pdForm The PDDoc for the form into which to import the data.
+ @param cdFDF The CosDoc for the FDF file containing the data.
+ @return <code>true</code> if the fields in the FDF file only contained values
+ or flags (that is, V, F, Ff, ClrF, ClrFf, SetF, SetFf),
+ <code>false</code> if any field contained other attributes, such as appearances (AP), actions (A), and so on.
+ @exception gAFpdErrBadFdf is raised if the FDF file is invalid. An exception is also raised if memory cannot be allocated for FDF file data.
+ @see AssembleFormAndImportFDF
+ @see ExportAsFDF
+ @see ExportAsFDFEx
+ @see ExportAsFDFWithParams
+*/
+PIPROC(ASBool, ImportAnFDF, (PDDoc pdForm, CosDoc cdFDF), pdForm, cdFDF)
+
+/**
+ Resets the indicated fields of a PDDoc object's form to their default
+ values.
+
+ <p>A PDField object's value is reset only if it is terminal; you can check this by calling AFPDFieldIsTerminal(). </p>
+
+ @param pdForm The PDDoc for the form whose fields are reset.
+ @param rgIncExcFlds If this parameter's value is CosNewNull(), then
+ all fields are reset, and <code>bIncl</code> is ignored. If it is a CosArray,
+ then the array elements must be names of fields. The names
+ may be of non-terminal fields, which is a fast and easy
+ way to cause all their children to be reset.
+ @param bIncl If <code>true</code>, <code>rgIncExcFlds</code> is an array of the
+ fields to reset. Otherwise, <code>rgIncExcFlds</code> is an array of
+ the fields to exclude from resetting.
+ @see AFPDFieldSetDefaultTextAppearance
+ Callback used by AFPDDocEnumPDFields(). It is called once
+ for each PDField in a form.
+ @return <code>true</code> to continue the enumeration, <code>false</code> to halt the enumeration.
+ @see AFPDDocEnumPDFields
+*/
+PIPROC(void, ResetForm, (PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl), pdForm, rgIncExcFlds, bIncl)
+
+/** Deprecated as of Acrobat 8.0. */
+PIPROC(ASInt32, AcroFormRegisterObserver, (AF_NotificationSelector_t notificationID, AF_NotificationProc notifyProc, AF_NotificationFailureProc notifyFailure, void *clientData),notificationID, notifyProc,notifyFailure, clientData)
+
+/** Deprecated as of Acrobat 8.0. */
+PIPROC(void, AcroFormUnregisterObserver, (AF_NotificationSelector_t notificationID, ASInt32 observerID), notificationID, observerID)
+
+/** Deprecated as of Acrobat 8.0. */
+PIPROC(ASBool, AFGetScriptingContext, (void** pcx, void** pobj), pcx, pobj)
+
+/**
+ Exports form data to a CosDoc object, which can be written to an
+ FDF file. See the <i>PDF Reference</i> for a description of this
+ format.
+
+ <p>To create an FDF file from this CosDoc object, call CosDocSaveToFile(). </p>
+
+ @param pdForm A PDDoc for the form whose data is exported.
+
+ @param rgIncExcFlds If this parameter's value is CosNewNull(), then
+ all fields are exported, and <code>bIncl</code> is ignored. If it
+ is a CosArray, then the array elements may be:
+
+ <ul>
+ <li>
+ Names of fields (the names may be of non-terminal fields, which
+ is a fast and easy way to cause all their children to be
+ included in the FDF file).
+ </li>
+ <li>
+ <p>Arrays whose first element
+ is a field name, and the rest of whose elements are field
+ dictionary key names whose values should be exported in
+ the FDF file. </p>
+ <p>For example: <code>[ (My listbox) /AP /Opt ]</code> </p>
+ <p>This variety of <code>rgIncExcFlds</code> array element can only be used if
+ <code>bIncl</code> is <code>true</code> (see below).</p>
+ </li>
+ <li>
+ <p>If <code>rgIncExcFlds</code> contains a
+ single element, which is itself an array as described
+ above, and its first element, which corresponds to the
+ field name, is <code>NULL</code>, then the FDF file will include the
+ requested field properties of all fields. </p>
+ <p>For example: <code>[ null /F /Ff ]</code></p>
+ </li>
+ </ul>
+
+ @param bIncl If <code>true</code>, <code>rgIncExcFlds</code> is an array of the
+ fields to export. Otherwise, <code>rgIncExcFlds</code> is an array of
+ the fields to exclude from exporting.
+ @param bEmpty If <code>true</code>, all fields selected per the above
+ criteria are exported. If <code>false</code>, exclude fields that have
+ no value.
+ @param bMenu IN If <code>true</code>, suppresses saving text fields that
+ have the <i>"password"</i> flag set, and does not force filling-in
+ required fields when creating an FDF file.
+ @param bLoadFields IN Not used.
+ @param fdfPath IN The path where the FDF file will be saved
+ (by the client of ExportAsFDF()) after it is produced. You need
+ this in order to create an FDF file with an F key that gives
+ the relative path to the form from the location where the FDF
+ file will be saved. Pass <code>NULL</code> if an absolute path name is desired.
+ @param submitBtnName IN A <code>NULL</code>-terminated string containing
+ the name of the button used to submit. If the value passed is
+ not <code>NULL</code>, then the FDF file will include a field dictionary
+ corresponding to the submit button, which will only contain
+ one key (T).
+
+ <p>Note that this dictionary is no different than the one you get when
+ an AcroForm has an empty text field (that is, no value), and
+ parameter <code>bEmpty</code> is <code>true</code>.</p>
+
+ @return The FDF CosDoc containing the exported data.
+ @exception gAFpdErrExportFdf is raised if field data cannot be exported. The viewer may raise other exceptions.
+ @see ExportAsFDF
+ @see ExportAsFDFWithParams
+ @see ImportAnFDF
+ @see AssembleFormAndImportFDF
+ @note This method is the same as ExportAsFDF(), with the exception
+ of the additional parameter <code>submitBtnName</code>. ExportAsFDFWithParams()
+ provides the same functionality with additional options.
+*/
+PIPROC(CosDoc, ExportAsFDFEx, (PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASBool bMenu, ASBool bLoadFields, ASPathName fdfPath, const char* submitBtnName), pdForm, rgIncExcFlds, bIncl, bEmpty, bMenu, bLoadFields, fdfPath, submitBtnName)
+
+/**
+ Exports data from a form to a file in HTML format.
+
+ @param pdForm The PDDoc for the form whose data is exported.
+ @param rgIncExcFlds If this parameter's value is CosNewNull(), then
+ all fields are exported, and <code>bIncl</code> is ignored. If it is
+ a CosArray, then the array elements must be names of fields.
+ The names may be of non-terminal fields, which is a fast
+ and easy way to cause all their children to be exported.
+
+ @param bIncl If <code>true</code>, <code>rgIncExcFlds</code> is an array of the
+ fields to export. Otherwise, <code>rgIncExcFlds</code> is an array of
+ the fields to exclude from exporting.
+ @param bEmpty If <code>true</code>, all fields selected per the above
+ criteria are exported. If <code>false</code>, exclude fields that have
+ no value.
+ @param Hfile The file to which the HTML data is written.
+ @param submitBtnName A <code>NULL</code>-terminated string containing
+ the name of the button used to submit. If the value passed
+ is not <code>NULL</code>, then include <code>"...&submitBtnName=&..."</code> as part
+ of the generated x-www-form-urlencoded output.
+ <p>Note that this type of output is the same one you get when an AcroForm
+ has an empty text field (that is, no Value), and parameter <code>bEmpty</code> is <code>true</code>.</p>
+ @see ExportAsHtml
+ @see ImportAnFDF
+ @note This method is the same as ExportAsHtml(), with the
+ exception of the additional parameter <code>submitBtnName</code>.
+*/
+PIPROC(void, ExportAsHtmlEx, (PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASFile Hfile, const char* submitBtnName), pdForm, rgIncExcFlds, bIncl, bEmpty,Hfile, submitBtnName)
+
+/**
+ Constructs an Acrobat form from templates and imports an
+ FDF file.
+ @param pdCurrForm The current form being viewed, if any,
+ at the time <code>cdFDF</code> is being imported. This parameter can
+ be <code>NULL</code>; if it is not <code>NULL</code>, then <code>cdFDF</code> can refer to templates
+ in the current form by omitting the F key in the TRef dictionary.
+ Even if the F key is not <code>NULL</code>, it can be a relative path
+ (as opposed to an absolute path), as long as <code>pdCurrForm</code> is not <code>NULL</code>.
+ @param cdFDF The FDF file being imported.
+ @param bAddToCurr If <code>true</code> (and <code>pdCurrForm</code> is not <code>NULL</code>),
+ then instead of creating a new form, the templates spawn
+ pages that are appended at the end of <code>pdCurrForm</code> (and the
+ function returns <code>pdCurrForm</code>).
+ @return The PDDoc for the newly-created form (or <code>pdCurrForm</code>, if
+ <code>bAddToCurr</code> is <code>true</code>).
+ @see ExportAsFDF
+ @see ExportAsFDFEx
+ @see ExportAsFDFWithParams
+ @see ImportAnFDF
+*/
+PIPROC(PDDoc, AssembleFormAndImportFDF, (PDDoc pdCurrForm, CosDoc cdFDF, ASBool bAddToCurr), pdCurrForm, cdFDF, bAddToCurr)
+
+/**
+ Exports form data to a CosDoc, which can be written to an
+ FDF file. See the <i>PDF Reference</i> for a description of this
+ format.
+ @param params An ExportAsFDFParamsRec structure.
+ @return The FDF CosDoc containing the exported data.
+ @exception gAFpdErrExportFdf is raised if field data cannot be exported. The viewer may raise other exceptions.
+ @see ExportAsFDF
+ @see ExportAsFDFEx
+ @see ImportAnFDF
+ @see AssembleFormAndImportFDF
+ @note Call CosDocSaveToFile() to create an FDF file from this CosDoc.
+*/
+PIPROC(CosDoc, ExportAsFDFWithParams, (ExportAsFDFParams params),params)
+
+/**
+ Creates an XObject form from a PDF page. A form XObject
+ is a content stream that can be treated as a single graphics
+ object. Use this method for importing PDF graphics into
+ documents.
+ @param cd The CosDoc in which the XObject will be created.
+ @param pdp The PDPage from which to create the XObject.
+ @return A Cos object pointing to the XObject on the PDF page.
+*/
+PIPROC(CosObj, AFPDFormFromPage, (CosDoc cd, PDPage pdp), cd, pdp)
+
+/* AFLayoutNew has been revved */
+NOPROC(AFLayoutNewOBSOLETE)
+
+/**
+ Frees the layout context.
+ @param vlayout The layout of the annotation to remove.
+ @see AFLayoutNew
+ @see AFLayoutCreateStream
+*/
+PIPROC(void, AFLayoutDelete, (void* vlayout), vlayout)
+
+/* AFLayoutCreateStream has been revved */
+NOPROC(AFLayoutCreateStreamOBSOLETE)
+
+/**
+ Draws a border into the layout context.
+ @param vlayout The layout of the annotation. Use AFLayoutNew()
+ to create a new layout before calling this method.
+ @param border A pointer to a structure containing information
+ about the appearance a border.
+ @param pdcvBrdr A PDColorValue structure representing
+ the color of the annotations border.
+ @param pdcvBg A PDColorValue structure representing the
+ color of the annotations background.
+ @param bDown A boolean value specifying whether the background
+ should be drawn as it is drawn in forms while being <i>pressed</i>
+ (clicked by the mouse). If <code>true</code>, it is drawn as if it is
+ a field that is being pressed.
+ @see AFLayoutNew
+*/
+PIPROC(void, AFLayoutBorder, (void* vlayout, AFPDWidgetBorder border, PDColorValue pdcvBrdr, PDColorValue pdcvBg,ASBool bDown), vlayout, border, pdcvBrdr, pdcvBg,bDown)
+
+/**
+ Sets the text layout for the annotation.
+
+ <p>It raises an exception if the field is a radio box or button. </p>
+
+ @param vlayout The layout of the annotation.
+ @param bMultline If <code>true</code>, the text can use multiple lines
+ in a text field. Otherwise, the text is a single line.
+ @param bWrap If <code>true</code>, the text will wrap.
+ @param border The border appearance that defines the width
+ and line style of a border. The border of the annotation
+ should be the same as in your call to AFLayoutBorder().
+ @param ta A pointer to a structure containing font, point
+ size, and color information. You should initialize the structure
+ with the <code>SetDefaultTextAppearanceP</code> macro which defaults
+ to Helvetica.
+ @param cBytes The text string for the layout.
+
+ @see AFLayoutNew
+ @see AFLayoutBorder
+ @note Before calling this method, you should call AFLayoutNew()
+ to create a new layout, as well as AFLayoutBorder().
+*/
+PIPROC(void, AFLayoutText, (void* vlayout, ASBool bMultline, ASBool bWrap, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes), vlayout, bMultline, bWrap, border, ta, cBytes)
+
+/** Deprecated as of Acrobat 8.0. */
+PIPROC(void, AFPDFieldValueChanged, (PDDoc pdd, PDField fldP), pdd, fldP)
+
+
+
+/**
+ Gets the rotation of the annotation.
+ @param pdan The annotation widget.
+ @return Returns an ASAtom object representing the annotation's rotation
+ with respect to the page.
+*/
+PIPROC(PDRotate, AFPDWidgetGetRotation, (PDAnnot pdan), pdan)
+
+/**
+ This routine is deprecated: use AFPDFieldGetDefaultTextAppearanceEx() instead.
+
+ <p>Gets the default text appearance of a field. Use this method
+ to get the font, size, color, and so on (values that were
+ set through the field properties dialog box). </p>
+ @param fldP The PDField object for which to retrieve the
+ text appearance.
+ @param aP A pointer to a structure describing the text
+ appearance. It returns font, size, quadding, text color, and
+ so on up to and including the <code>nameFont</code> field in the text appearance structure.
+ The remaining fields will not be initialized.
+ @see AFPDWidgetSetAreaColors
+ @see AFPDFieldGetDefaultTextAppearanceEx
+*/
+
+PIPROC(void, AFPDFieldGetDefaultTextAppearance, (PDField fldP, TextAppearanceP aP), fldP, aP)
+
+/**
+ This routine is deprecated. Use AFPDFieldSetDefaultTextAppearanceEx() instead.
+
+ <p>Sets the default text appearance of a field. Use this method
+ to set the font, size, color, and so on. </p>
+
+ @param fldP The PDField object for which to set the text
+ appearance.
+ @param aP A pointer to a structure describing the text
+ appearance to set. This routine will use the values up to
+ and including the <code>nameFont</code> field in the text appearance structure.
+ @see AFPDWidgetSetAreaColors
+ @see AFPDFieldSetDefaultTextAppearanceEx
+*/
+PIPROC(void, AFPDFieldSetDefaultTextAppearance, (PDField fldP, TextAppearanceP aP), fldP, aP)
+
+/**
+ Gets the border of an annotation.
+ @param pdan The annotation.
+ @param pdwb (Filled by the method) A pointer to a structure
+ describing the form field appearance definitions for the
+ outside border of an annotation.
+ @return <code>true</code> if successful getting the border, <code>false</code> otherwise.
+ @see AFPDWidgetSetAreaColors
+*/
+PIPROC(ASBool, AFPDWidgetGetBorder, (PDAnnot pdan, AFPDWidgetBorder pdwb), pdan, pdwb)
+
+/**
+ Sets the border of an annotation.
+ @param pdan The annotation whose change border appearance
+ will be set.
+ @param pdwb A pointer to a structure describing the form
+ field appearance definitions for the outside border of an
+ annotation. Possible border types are solid, dashed, beveled,
+ inset, and underline.
+ @see AFPDWidgetSetAreaColors
+*/
+PIPROC(void, AFPDWidgetSetBorder, (PDAnnot pdan, AFPDWidgetBorder pdwb), pdan, pdwb)
+
+/**
+ Gets the border and background colors of an annotation.
+
+ @param pdan The annotation.
+ @param borderP (Filled by the method) A pointer to a structure
+ representing the border color of the annotation.
+ @param bkgndP (Filled by the method) A pointer to a structure
+ representing the background color of the annotation.
+ @see AFPDWidgetSetAreaColors
+*/
+PIPROC(void, AFPDWidgetGetAreaColors, (PDAnnot pdan, PDColorValue borderP, PDColorValue bkgndP), pdan, borderP, bkgndP)
+
+/**
+ Sets the border and background color of the annotation.
+
+ @param pdan The annotation.
+ @param borderP A pointer to a structure representing the
+ border color of the annotation.
+ @param bkgndP A pointer to a structure representing the
+ background color of the annotation.
+ @see AFPDWidgetGetAreaColors
+*/
+PIPROC(void, AFPDWidgetSetAreaColors, (PDAnnot pdan, PDColorValue borderP, PDColorValue bkgndP),pdan, borderP, bkgndP)
+
+/**
+ Opens the dialog box that allows the user to select a PDF
+ to use as the icon for a button.
+ @param cd The CosDoc that contains the appearance you
+ are trying to import.
+ @param coIcon If AFImportAppearance() is successful, <code>coIcon</code>
+ is a pointer to a CosObj that will contain the Cos representation
+ of the appearance.
+ @param avd The AVDoc that you want as the parent for the window. You can pass <code>NULL</code> if you do not have an AVDoc.
+
+ @param cTitle The window title of the dialog box when
+ it appears. You can pass <code>NULL</code> if you want the title of the
+ dialog box to be the same as it is when brought up through the
+ field properties dialog.
+ @return <code>true</code> if appearance was imported properly, <code>false</code> otherwise.
+
+*/
+PIPROC(ASBool, AFImportAppearance, (CosDoc cd, CosObj *coIcon, AVDoc avd, char *cTitle), cd, coIcon, avd, cTitle)
+
+
+/**
+ Sets the text layout for the annotation.
+
+ <p>It raises an exception if the field is a radio box or button. </p>
+
+ @param vlayout The layout of the annotation.
+ @param bMultline If <code>true</code>, the text can use multiple lines
+ in a text field. Otherwise, the text is a single line.
+ @param bWrap If <code>true</code>, the text will wrap.
+ @param border The border appearance that defines the width
+ and line style of a border. The border of the annotation
+ should be the same as in your call to AFLayoutBorder().
+ @param ta A pointer to a structure containing font, point
+ size, and color information. You should initialize the structure
+ with the <code>SetDefaultTextAppearanceP</code> macro which defaults
+ to Helvetica.
+ @param cBytes The text string for the layout.
+ @param fxMinFontSize The minimum font size, when using autosizing.
+ @param fxMaxFontSize The maximum font size, when using autosizing.
+
+ @see AFLayoutNew
+ @see AFLayoutBorder
+ @note Before calling this method, you should call AFLayoutNew()
+ to create a new layout, as well as AFLayoutBorder().
+
+*/
+PIPROC(void, AFLayoutTextEx, (void* vlayout, ASBool bMultline, ASBool bWrap, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes, ASFixed fxMinFontSize, ASFixed fxMaxFontSize), vlayout, bMultline, bWrap, border, ta, cBytes, fxMinFontSize, fxMaxFontSize)
+
+/** Deprecated as of Acrobat 8.0. */
+PIPROC(void, AFLayoutIconText, (void* vLayout, AFPDWidgetPosition nPosition, CosObj coIcon, AFPDWidgetBorder border, TextAppearanceP ta, char *cBytes), vLayout, nPosition, coIcon, border, ta, cBytes)
+
+/* Obsolete. */
+PIPROC(ASBool, AFGetScriptingContextEx, (ScriptingData data), data)
+
+/**
+ Executes an AcroForm JavaScript script.
+ @param pdd The PDDoc in which the script is to be executed.
+
+ @param cScript A string containing the text of the script
+ to be executed. If it is Unicode, the string must begin with <code>0xFEFF</code>
+ and end with 2 <code>NULL</code> bytes. If this is not the case, it is
+ assumed to be in the application's language encoding, as
+ returned by AVAppGetLanguageEncoding().
+ @param pRetValue To get a return value from the execution
+ of the script, pass a non-<code>NULL</code> value for this parameter.
+ If, upon return, <code>*pRetVal</code> is non-<code>NULL</code>, the caller should dispose
+ of the string by calling ASFree(). If present, the value will
+ be in host encoding.
+ @return The JavaScript value of <code>event.rc</code>. This function pre-initializes
+ it to <code>true</code>; a script may set it to <code>false</code> if desired.
+ @note The script sets this value by
+ assigning it to <code>event.value</code>. See the Acrobat JavaScript
+ documentation for more information.
+*/
+PIPROC(ASBool, AFExecuteThisScript, (PDDoc pdd, const char* cScript, char** pRetValue), pdd, cScript, pRetValue)
+
+/**
+ Creates a new layout context for annotations. Use PDAnnotGetRect()
+ to get the annotation's bounding box, then use this method
+ to define new layout context.
+ @param frBbox The bounding box of the area for text and
+ border data to flow into.
+ @param annotRotation The rotation of the annotation.
+ @param cd The CosDoc.
+ @return A new layout.
+ @see AFLayoutBorder
+ @see AFLayoutText
+ @see AFLayoutCreateStream
+*/
+PIPROC(void*, AFLayoutNew, (ASFixedRectP frBbox, PDRotate annotRotation, CosDoc cd), frBbox, annotRotation, cd)
+
+/**
+ Creates a layout stream that can be used as an annotation
+ appearance.
+ @param vlayout The layout of the annotation. Use AFLayoutNew()
+ to create a new layout before calling this method.
+ @return A stream CosObj.
+ @see AFLayoutNew
+ @see AFLayoutDelete
+*/
+PIPROC(CosObj, AFLayoutCreateStream, (void* vlayout), vlayout)
+
+/** Deprecated as of Acrobat 8.0. */
+PIPROC(ASBool, AFCalculateFields, (PDDoc pdd, ASCab asc), pdd, asc)
+
+
+/**
+ Lays out the text and creates a Cos XObject with the content stream
+ for the text and required Resources. This API supports Unicode text.
+ If required, different fonts may be used for different characters in
+ the text. It has support for western scripts, Arabic, Hebrew, Thai, Vietnamese,
+ Chinese, Japanese, and Korean. Other scripts may be added in the future.
+
+ @return A stream CosObj. If the operation fails, then CosNewNull()
+ is returned.
+
+ @param cd The CosDoc.
+ @param frBbox The bounding box of the area for text and border data to flow into.
+ @param annotRotation The rotation of the annotation.
+ @param bWrap If <code>true</code>, the text will wrap.
+ @param border The border appearance that defines the width.
+ @param fxMinFontSize The minimum font size, when using autosizing.
+ @param fxMaxFontSize The maximum font size, when using autosizing and line style of a border.
+ @param textAttrs A pointer to structure containing font, point size, color information, alignment, and writing direction.
+ @param asText The text string for the layout.
+
+*/
+PIPROC(CosObj, AFDrawText, (CosDoc cd, ASFixedRectP frBbox, PDRotate annotRotation, ASBool bWrap, AFPDWidgetBorder border, AFTextAttributesP textAttrs, ASConstText asText, ASFixed fxMinFontSize, ASFixed fxMaxFontSize), cd, frBbox, annotRotation, bWrap, border, textAttrs, asText, fxMinFontSize, fxMaxFontSize)
+
+/**
+ Gets the default text appearance of a field. Use this method
+ to get the font, size, color, and other values that were
+ set through the field properties dialog box.
+ @param fldP The PDField object for which to retrieve the
+ text appearance.
+ @param aP A pointer to a structure describing the text
+ appearance. It returns font, size, alignment, text color, and
+ so on.
+ @param size The size in bytes of the structure referenced by <code>aP</code>. Fields in the
+ structure up to this size will be initialized.
+ @see AFPDWidgetSetAreaColors
+*/
+PIPROC(void, AFPDFieldGetDefaultTextAppearanceEx, (PDField fldP, TextAppearanceP aP, size_t size),fldP, aP, size)
+
+/**
+ Sets the default text appearance of a field. Use this method
+ to set the font, size, color, and so on.
+ @param fldP The PDField object for which to set the text
+ appearance.
+ @param aP A pointer to a structure describing the text
+ appearance to set.
+ @param size The size in bytes of the structure referenced by <code>aP</code>. Fields in the
+ structure up to this size will be used. If there are additional fields after this
+ size, default values will be used.
+ @see AFPDWidgetSetAreaColors
+*/
+
+PIPROC(void, AFPDFieldSetDefaultTextAppearanceEx, (PDField fldP, TextAppearanceP aP, size_t size),fldP, aP, size)
+
+/**
+ Get the default size for a specific field type. This method
+ will get the new default value if the user changes it.
+ @param fieldType The ASAtom corresponding to the field type.
+ The string for the type can be converted to an ASAtom using
+ ASAtomFromString().
+ @param asfp (Filled by the method) A pointer to a point whose
+ coordinates correspond to width and height of the field.
+*/
+PIPROC(void, AFGetDefaultFieldSize, (ASAtom fieldType, ASFixedPoint *asfp), fieldType, asfp)
+
+
+
+
+
+
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/HFTLibrary.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/HFTLibrary.h
new file mode 100644
index 0000000..b7430e7
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/HFTLibrary.h
@@ -0,0 +1,39 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1995,2003,2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+*********************************************************************/
+
+/*
+** HFTLibrary.h
+**
+** PRODUCT file for Acrobat library definition.
+**
+*/
+
+/* This version is for clients using the HFT interface to the library */
+#ifndef _H_HFTLibrary
+#define _H_HFTLibrary
+
+#define ACRO_SDK_LEVEL 0x00090000
+#define PLUGIN 1
+#define HAS_32BIT_ATOMS 1
+#define CAN_EDIT 1
+#define CAN_ENUM_OBJECTS 1
+#define HAS_COOLTYPE 1
+#define NEW_PDFEDIT_HFTS 1
+#define ACROBAT_LIBRARY 0
+#define PDFL_EXTENSION 1
+#define PDMETADATA_HFT 1
+#define NEW_PDSEDIT_HFTS 1
+#define THREAD_SAFE_PDFL 1
+
+#endif /* _H_HFTLibrary */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Library.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Library.h
new file mode 100644
index 0000000..2d1e24b
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Library.h
@@ -0,0 +1,29 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1995,2003,2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+*********************************************************************/
+
+/*
+** Library.h
+**
+** PRODUCT file for Acrobat library definition.
+**
+** (c) Copyright 1995, 2003 Adobe Systems Inc. All Rights Reserved.
+*/
+
+#ifndef _H_Library
+#define _H_Library
+
+#define ACRO_SDK_LEVEL 0x00090000
+#define ACROBAT_LIBRARY 1
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacCalls.h
new file mode 100644
index 0000000..480ab26
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacCalls.h
@@ -0,0 +1,272 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ MacCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. in other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_MacCalls
+#define _H_MacCalls
+
+#include "acroassert.h"
+
+/* for Adobe use only */
+#define _MacintoshHFT_LATEST_VERSION 0x00020002
+#define _MacintoshHFT_IS_BETA 0
+
+/* for public use */
+#define MacintoshHFT_LATEST_VERSION (_MacintoshHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _MacintoshHFT_LATEST_VERSION) : _MacintoshHFT_LATEST_VERSION)
+
+#define MacintoshHFT_VERSION_2 0x00020000
+#define MacintoshHFT_VERSION_2_2 0x00020002
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "PIRequir.h"
+#if PI_MACINTOSH_VERSION != 0
+
+extern HFT gMacintoshHFT;
+extern ASUns32 gMacintoshVersion;
+
+/* AVRectToRect */
+#define AVRectToRectSEL 1
+
+/**
+ Converts an AVRect into a QuickDraw rectangle.
+ <p>This can throw numerous exceptions and can broadcast numerous notifications.</p>
+ @param avr IN/OUT A pointer to the AVRect to convert to a rectangle.
+
+ @param rect IN/OUT (Filled by the method) The rectangle corresponding
+ to <code>avr</code>.
+ @see RectToAVRect
+ @since PI_MACINTOSH_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVRectToRectSELPROTO)
+ (const AVRect *avr, Rect *r);
+#define AVRectToRect (ACROASSERT(gMacintoshVersion >=MacintoshHFT_VERSION_2), *((AVRectToRectSELPROTO)(gMacintoshHFT[1])))
+
+/* RectToAVRect */
+#define RectToAVRectSEL 2
+
+/**
+ Converts a Quickdraw rectangle into an AVRect.
+ @param rect IN/OUT A pointer to a rectangle to convert to an AVRect.
+
+ @param avr IN/OUT (Filled by the method) A pointer to the AVRect
+ corresponding to <code>rect</code>.
+ @see AVRectToRect
+ @since PI_MACINTOSH_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *RectToAVRectSELPROTO)
+ (const Rect *r, AVRect *avr);
+#define RectToAVRect (ACROASSERT(gMacintoshVersion >=MacintoshHFT_VERSION_2), *((RectToAVRectSELPROTO)(gMacintoshHFT[2])))
+
+/* AVAppHandleAppleEvent */
+#define AVAppHandleAppleEventSEL 3
+
+/**
+ Handles Apple events that are sent to the Acrobat viewer.
+ Plug-ins that wish to handle their own Apple events do so
+ by using HFTReplaceEntry() to replace this method. If your
+ replacement method does not wish to handle an Apple event
+ it receives, it must pass the Apple event along to the Acrobat
+ viewer by using the <code>CALL_REPLACED_PROC</code> macro.
+
+ <p>For further information, see <i>Application-Defined Routines</i>
+ in the <i>Responding to Apple Events</i> chapter of <i>Inside Macintosh:
+ Interapplication Communication</i>. </p>
+
+ <p>If a plug-in needs to get or replace any of the four required
+ Apple events, it must use Mac toolbox calls such as
+ AEGetEventHandler() or AESetEventHandler(). In addition, if a plug-in
+ needs to have its <code>'AETE'</code> resource merged with Acrobat's,
+ the plug-in needs to add <code>NSAppleScriptEnabled = TRUE</code>
+ to its <code>Info.plist</code>.</p>
+
+ <p>Plug-ins can also support AppleScript; the Acrobat viewer
+ contains an <code>'scsz'</code> resource, and plug-ins can handle the
+ <code>GetAETE</code> event to append information about scriptable events
+ they provide. </p>
+ @param appleEvent IN/OUT The Apple event that was sent to the
+ Acrobat viewer.
+ @param eventClass IN/OUT The event class of <code>appleEvent</code>.
+ @param eventID IN/OUT The event ID of <code>appleEvent</code>.
+ @param replyEvent IN/OUT An event to send back to the application
+ that sent <code>appleEvent</code>. Add parameters to this event, if appropriate.
+
+ @param err IN/OUT A value indicating whether the Apple
+ event was handled successfully. Return the value <code>noErr</code>
+ (defined by Apple, not in the Acrobat SDK) if the Apple event
+ was handled successfully. See <i>Inside Macintosh: Interapplication
+ Communication</i>. <code>err</code> is the value returned by the function
+ <code>MyEventHandler</code> in that section. In the Acrobat core API,
+ it is returned as a parameter rather than as a function's
+ return value.
+ @since PI_MACINTOSH_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAppHandleAppleEventSELPROTO)
+ (AppleEvent *appleEvent, DescType eventClass, DescType eventId, AppleEvent *replyEvent, OSErr *err);
+#define AVAppHandleAppleEvent (ACROASSERT(gMacintoshVersion >=MacintoshHFT_VERSION_2), *((AVAppHandleAppleEventSELPROTO)(gMacintoshHFT[3])))
+
+#include "AVExpT.h"
+/* AVAppEnumSystemFonts
+ Description
+ Enumerates a list of fonts that are installed in the AVApp system. These are the
+ fonts that are available for use by Acrobat. This call will NOT enumerate fonts
+ that have been extracted for fauxed by Acrobat.
+ *** As of Acrobat 3.0, this is only available on the Macintosh. ***
+ Parameters
+ flags - for future expansion - must be zero
+ enumProc - client provided method that gets called back with a systemFont
+ clientData - client data for the enumProc
+ Return value
+ none
+ Present in Reader
+ yes
+ Related methods
+ none
+*/
+
+/* AVAppEnumSystemFonts */
+#define AVAppEnumSystemFontsSEL 4
+
+/** Mac OS-specific Methods
+ <p>Enumerates a list of fonts that are installed in the system.
+ These are the fonts that are available for use by Acrobat.
+ This method does not enumerate fonts that have been extracted
+ or imitated by Acrobat. </p>
+ @param flags IN/OUT For future expansion. Must be zero.
+ @param enumProc IN/OUT A client-provided callback to call for each
+ system font.
+ @param clientData IN/OUT Client data for <code>enumProc</code>.
+ @see PDEnumSysFonts
+ @since PI_MACINTOSH_VERSION >= 0x00020002
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *AVAppEnumSystemFontsSELPROTO)
+ (ASUns32 flags, AVSystemFontEnumProc enumProc, void *clientData);
+#define AVAppEnumSystemFonts (ACROASSERT(gMacintoshVersion >=MacintoshHFT_VERSION_2_2), *((AVAppEnumSystemFontsSELPROTO)(gMacintoshHFT[AVAppEnumSystemFontsSEL])))
+
+/* AVAppGetPMPageFormat */
+#define AVAppGetPMPageFormatSEL 5
+/*
+ This function returns the Carbon Print Manager Page Format object to other clients during a print job.
+
+ @return PMPageFormat (a Carbon Print Manager type that describes the format of a page during a print job. See Carbon Print Manager API
+ documentation for more information).
+ @since PI_MACINTOSH_VERSION >= 0x00060000
+ @note The restriction on using this function is that is that it can ONLY be called after printing has started. For example, the PDDocWillPrintDoc
+ notification has already been sent.
+ @note Clients who use this function should not do anything with the PageFormat object that will interfere with Acrobat's
+ print functionality. USE IS VERY RISKY! Please use all Acrobat API's to accomplish whatever you're trying to do before
+ resorting to using this function.
+*/
+typedef ACCBPROTO1 PMPageFormat (ACCBPROTO2 *AVAppGetPMPageFormatSELPROTO)
+ (void);
+#define AVAppGetPMPageFormat (ACROASSERT(gMacintoshVersion >=MacintoshHFT_VERSION_2_2), *((AVAppGetPMPageFormatSELPROTO)(gMacintoshHFT[AVAppGetPMPageFormatSEL])))
+
+/* AVAppGetPMPrintSettings */
+#define AVAppGetPMPrintSettingsSEL 6
+/*
+ This function returns the Carbon Print Manager Print Settings object to other clients during a print job.
+
+ @return PMPrintSettings
+ This is a Carbon Print Manager type that describes the print job settings. See Carbon Print Manager API documentation
+ for more information.
+ @since PI_MACINTOSH_VERSION >= 0x00060000
+ @restrictions:
+ The restriction on using this function is that is that it can ONLY be called after printing has started. e.g. PDDocWillPrintDoc
+ notification has already been sent.
+ Also, clients who use this function should not do anything with the PrintSettings object that will interfere with Acrobat's
+ print functionality. USE IS VERY RISKY! Please use all Acrobat API's to accomplish whatever you're trying to do before
+ resorting to using this function.
+*/
+typedef ACCBPROTO1 PMPrintSettings (ACCBPROTO2 *AVAppGetPMPrintSettingsSELPROTO)
+ (void);
+#define AVAppGetPMPrintSettings (ACROASSERT(gMacintoshVersion >=MacintoshHFT_VERSION_2_2), *((AVAppGetPMPrintSettingsSELPROTO)(gMacintoshHFT[AVAppGetPMPrintSettingsSEL])))
+
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* PI_MACINTOSH_VERSION != 0 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(_H_MacCalls) */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacPlatform.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacPlatform.h
new file mode 100644
index 0000000..d5814cf
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacPlatform.h
@@ -0,0 +1,66 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ MacPlatform.h
+
+ - PLATFORM file for Macintosh development.
+
+*********************************************************************/
+
+#ifndef _H_MacPlatform
+#define _H_MacPlatform
+
+#if defined(__GNUC__)
+#define AS_LITTLEENDIAN TARGET_RT_LITTLE_ENDIAN
+#else
+#define AS_LITTLEENDIAN 0
+#endif
+#define IEEEFLOAT 0
+#define IEEESOFT 0
+#define UNSIGNEDCHARS 0
+
+#define ACCB1
+#define ACCB2
+
+#define ACEX1
+#define ACEX2
+
+#define ACCBPROTO1
+#define ACCBPROTO2
+
+/**
+ (Mac OS only, previously known as <code>MAC_ENV</code>) Defined if the client is being compiled for Mac OS, undefined otherwise.
+ MAC_PLATFORM, WIN_PLATFORM, and UNIX_PLATFORM should be used by client developers to conditionally compile platform-dependent code.
+ MAC_PLATFORM is automatically set by the header files.
+
+ @see WIN_PLATFORM
+ @see UNIX_PLATFORM
+*/
+#define MAC_PLATFORM 1
+
+/*
+// I have no idea why this code was here in the first place,
+// since I can't figure out what it could ever do. But I've
+// left it in in case someone far smarter than I can see a use
+// for it.
+
+#if DEBUG
+ #ifndef DEBUG
+ #define DEBUG 1
+ #endif
+#endif
+*/
+
+#endif /* defined(_H_MacPlatform) */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacProcs.h
new file mode 100644
index 0000000..b06c906
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/MacProcs.h
@@ -0,0 +1,127 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ MacProcs.h
+
+ - Catalog of functions exported by the Mac Viewer.
+
+*********************************************************************/
+
+
+/**
+ Converts an AVRect into a QuickDraw rectangle.
+ <p> This can throw numerous exceptions and broadcast numerous notifications. </p>
+ @param avr IN/OUT Pointer to the AVRect to convert to a rectangle.
+
+ @param r IN/OUT (Filled by the method) The rectangle corresponding
+ to <code>avr</code>.
+ @see RectToAVRect
+ @since PI_MACINTOSH_VERSION >= 0x00020000
+
+*/
+NPROC(void, AVRectToRect, (const AVRect *avr, Rect *r))
+
+/**
+ Converts a Quickdraw Rect into an AVRect.
+ @param r Pointer to a Rect to convert to an AVRect.
+
+ @param avr (Filled by the method) Pointer to the AVRect
+ corresponding to rect.
+ @see AVRectToRect
+ @since PI_MACINTOSH_VERSION >= 0x00020000
+*/
+NPROC(void, RectToAVRect, (const Rect *r, AVRect *avr))
+#if HAS_APPLE_EVENTS
+
+/**
+ Handles Apple events that are sent to the Acrobat viewer.
+ Clients that wish to handle their own Apple events do so
+ by using HFTReplaceEntry() to replace this method. If your
+ replacement method does not wish to handle an Apple event
+ it receives, it must pass the Apple event along to the Acrobat
+ viewer by using the CALL_REPLACED_PROC macro.
+
+ <p>For further information, see <i>Application-Defined Routines</i>
+ in the <i>Responding to Apple Events</i> chapter of <i>Inside Macintosh:
+ Interapplication Communication</i>. </p>
+
+ <p>If a client wishes to get or replace any of the four required
+ Apple events, it must use Mac toolbox calls such as
+ <code>AEGetEventHandler</code> and <code>AESetEventHandler</code>. </p>
+
+ <p>Clients can also support AppleScript; the Acrobat viewer
+ contains an 'scsz' resource, and clients can handle the
+ GetAETE event to append information about scriptable events
+ they provide. </p>
+ @ingroup ReplaceableMethods
+ @param appleEvent The Apple event that was sent to the
+ Acrobat viewer.
+ @param eventClass The event class of <code>appleEvent</code>.
+ @param eventId The event ID of <code>appleEvent</code>.
+ @param replyEvent An event to send back to the application
+ that sent <code>appleEvent</code>. Add parameters to this event, if appropriate.
+
+ @param err A value indicating whether the Apple event
+ was handled successfully. Return the value <code>noErr</code> (defined
+ by Apple, not in the Acrobat SDK) if the Apple event was
+ handled successfully. See <i>Inside Macintosh: Interapplication
+ Communication</i>. <code>err</code> is the value returned by the function
+ <code>MyEventHandler</code> in that section. In the Acrobat API,
+ it is returned as a parameter rather than as a function's
+ return value.
+ @since PI_MACINTOSH_VERSION >= 0x00020000
+*/
+PROC(void, AVAppHandleAppleEvent, (AppleEvent *appleEvent, DescType eventClass, DescType eventId, AppleEvent *replyEvent, OSErr *err))
+#endif
+
+/**
+ Enumerates a list of fonts that are installed in the system.
+ These are the fonts that are available for use by Acrobat.
+ This method does not enumerate fonts that have been extracted
+ or fauxed by Acrobat.
+ @param flags For future expansion. It must be zero.
+ @param enumProc A client-provided callback to call for each
+ system font.
+ @param clientData The client data for <code>enumProc</code>.
+ @see PDEnumSysFonts
+ @ingroup Enumerators
+ @since PI_MACINTOSH_VERSION >= 0x00020002
+*/
+NPROC(void, AVAppEnumSystemFonts, (Uns32 flags, AVSystemFontEnumProc enumProc, void *clientData))
+
+/**
+ This function returns the Carbon Print Manager Page Format object to other clients during a print job.
+ @note The restriction on using this function is that is that it can only be called after printing has started
+ (for example, the PDDocWillPrintDoc() notification has already been sent.
+ @note Clients who use this function should not do anything with the PageFormat object that will interfere with Acrobat's
+ print functionality. ITS USE IS VERY RISKY! Please use all Acrobat APIs to accomplish whatever you are trying to do before
+ resorting to using this function.
+ @return PMPageFormat, which is a Carbon Print Manager type that describes the format of a page during a print job. See the Carbon Print Manager API
+ documentation for more information.
+ @since PI_MACINTOSH_VERSION >= 0x00060000
+*/
+NPROC(PMPageFormat, AVAppGetPMPageFormat, (void))
+
+/**
+ This function returns the Carbon Print Manager Print Settings object to other clients during a print job.
+ @note The restriction on using this function is that is that it can only be called after printing has started
+ (for example, the PDDocWillPrintDoc() notification has already been sent.
+ @note Clients who use this function should not do anything with the PrintSettings object that will interfere with Acrobat's
+ print functionality. ITS USE IS VERY RISKY! Please use all Acrobat APIs to accomplish whatever you are trying to do before
+ resorting to using this function.
+ @return PMPrintSettings, which is a Carbon Print Manager type that describes the print job settings. See the Carbon Print Manager API documentation
+ for more information.
+ @since PI_MACINTOSH_VERSION >= 0x00060000
+*/
+NPROC(PMPrintSettings, AVAppGetPMPrintSettings, (void))
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/NSelExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/NSelExpT.h
new file mode 100644
index 0000000..3908af6
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/NSelExpT.h
@@ -0,0 +1,75 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ NSelExpT.h
+
+ - This is the list of NSelector constants and function-prototypes
+ required to register for notifications.
+
+*********************************************************************/
+
+#ifndef _H_NSelExpT
+#define _H_NSelExpT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "PIRequir.h"
+#if ACROBAT_LIBRARY || TOOLKIT || PDFL_EXTENSION
+#ifndef _T_AVDOC
+#define _T_AVDOC
+typedef struct _t_AVDoc *AVDoc;
+#endif
+#ifndef _T_AVPAGEVIEW
+#define _T_AVPAGEVIEW
+typedef struct _t_AVPageView *AVPageView;
+#endif
+#if WIN_PLATFORM
+typedef ASEnum8 AVPrefsType;
+#else
+typedef ASUns8 AVPrefsType;
+#endif
+typedef ASEnum16 AVAnnotOp;
+typedef struct _t_AVBatchContext *AVBatchContext;
+typedef struct AVRect *AVDevRectP;
+typedef struct _t_AVTool *AVTool;
+typedef struct _t_AVWindow *AVWindow;
+#else
+#include "AVExpT.h"
+#endif /* ACROBAT_LIBRARY || TOOLKIT || PDFL_EXTENSION */
+
+/* Enumerate the selectors */
+#define POKE(name, formals, formalsWithRock, actualsWithRock) name##NSEL,
+#define NOPOKE(name, formals, formsalsWithRock, actualsWithRock) OBSOLETE##name##NSEL,
+enum {
+ #include "PIPokes.h"
+ numAcroNotificationSelectors
+};
+#undef POKE
+#undef NOPOKE
+
+/* Define the prototypes */
+#define POKE(name, formals, formalsWithRock, actualsWithRock) \
+ typedef ACCBPROTO1 void (ACCBPROTO2 *name##NPROTO)formalsWithRock;
+#define NOPOKE(name, formals, formsalsWithRock, actualsWithRock)
+#include "PIPokes.h"
+#undef POKE
+#undef NOPOKE
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(_H_NSelExpT) */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBasicExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBasicExpT.h
new file mode 100644
index 0000000..693648e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBasicExpT.h
@@ -0,0 +1,160 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDBasicExpT.h
+
+ - Types required to use the PDModel HFT. ONLY handles to exported
+ types are defined in this file.
+
+*********************************************************************/
+
+#ifndef _BASIC_EXP_T_
+#define _BASIC_EXP_T_ 1
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _T_PDDOC_
+#define _T_PDDOC_
+
+/** The underlying PDF representation of a document. There is a correspondence
+ between a PDDoc and an ASFile; the PDDoc object is the hidden object behind
+ every AVDoc. An ASFile may have zero or more underlying files, so a PDF file
+ does not always correspond to a single disk file. For example, an ASFile may
+ provide access to PDF data in a database.
+
+ <p>Through PDDoc objects, your application can perform most of the menu items for pages
+ from Acrobat (delete, replace, and so on). Thumbnails can be created and deleted
+ through this object. You can set and retrieve document information fields through this
+ object as well. The first page in a PDDoc is page <code>0</code>.</p>
+ @see AVDocGetPDDoc
+ @see PDDocFromCosDoc
+ @see PDDocOpen
+ @see PDDocOpenFromASFile
+ @see PDDocOpenWithParams
+ @see PDDocCreate
+ @see PDPageGetDoc
+ @see PDFileSpecGetDoc
+ @see PDEnumDocs
+ @see PDDocClose
+ @see PDDocRelease
+ @see PDDocEnumFonts
+ @see PDDocEnumLoadedFonts
+ @see PDEnumDocs
+*/
+typedef struct _t_PDDoc *PDDoc;
+#endif
+
+#ifndef _T_PDPAGE_
+#define _T_PDPAGE_
+
+/** A single page in the PDF representation of a document. Just as PDF files are partially
+ composed of their pages, PDDoc objects are composed of PDPage objects. A page contains a
+ series of objects representing the objects drawn on the page (PDGraphic), a list of
+ resources used in drawing the page, annotations (PDAnnot), an optional thumbnail
+ image of the page, and the beads used in any articles that occur on the page. The first
+ page in a PDDoc is page <code>0</code>.
+
+ @see PDDocCreatePage
+ @see PDBeadAcquirePage
+ @see PDDocAcquirePage
+ @see AVPageViewGetPage
+ @see PDDocDeletePages
+ @see PDPageRelease
+*/
+typedef struct _t_PDPage *PDPage;
+#endif
+
+#ifndef _T_PDFONT_
+#define _T_PDFONT_
+
+/** A font that is used to draw text on a page. It corresponds to a Font Resource in a PDF
+ file. Applications can get a list of PDFont objects used on a PDPage or a range of PDPage objects.
+ More than one PDPage may reference the same PDFont object.
+ A PDFont has a number of attributes whose values can be read or set, including an
+ array of widths, the character encoding, and the font's resource name.
+
+ @see PDDocEnumFonts
+ @see PDDocEnumLoadedFonts
+ @see PDFontGetDescendant
+ @see PDStyleGetFont
+ @see PDDocEnumFonts
+ @see PDFontEnumCharProcs
+*/
+typedef struct _t_PDFont *PDFont;
+#endif
+
+#ifndef _T_PDCONTENT_
+#define _T_PDCONTENT_
+
+/** A pointer to a PDContent <code>struct</code>. */
+typedef struct _t_PDContent *PDContent;
+#endif
+
+#ifndef _T_PDTHUMB_
+#define _T_PDTHUMB__
+
+/** A thumbnail preview image of a page.
+ @see PDDocCreateThumbs
+ @see PDDocDeleteThumbs
+*/
+typedef struct _t_PDThumb *PDThumb;
+#endif
+
+#ifndef _T_PDTEXTSELECT_
+#define _T_PDTEXTSELECT_
+
+/** A pointer to a PDTextSelect <code>struct</code>. */
+typedef struct _t_PDTextSelect *PDTextSelect;
+#endif /* _T_PDTEXTSELECT_ */
+
+#ifndef _T_PDRESTRE_
+#define _T_PDRESTRE_
+
+/** A selection of text on a single page that may contain more than one disjoint group of
+words. A text selection is specified by one or more ranges of text, with each range
+containing the word numbers of the selected words. Each range specifies a start and
+end word, where <i>"start"</i> is the first of a series of selected words and <i>"end"</i> is the first
+word not in the series.
+ @see AVDocGetSelection
+ @see AVPageViewTrackText
+ @see PDDocCreateTextSelect
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreatePageHiliteEx
+ @see PDTextSelectCreateWordHilite
+ @see PDTextSelectCreateWordHiliteEx
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreateRangesEx
+ @see PDTextSelectDestroy
+ @see PDTextSelectEnumQuads
+ @see PDTextSelectEnumText
+*/
+typedef struct _t_PDResTree *PDResTree;
+#endif /* _T_PDRESTRE_ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _POQUITO_EXP_T_ */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesCalls.h
new file mode 100644
index 0000000..4173266
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesCalls.h
@@ -0,0 +1,129 @@
+/*
+** PDBatesCalls.h
+** Copyright (C) 2004, Adobe Systems, Inc. All Rights Reserved.
+*/
+
+#ifndef _H_PDBatesCalls
+#define _H_PDBatesCalls
+
+#include "PDBatesExpT.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define PDBatesHFTName "PDBates"
+
+/* for Adobe use only */
+#define _PDBATESHFT_LATEST_VERSION 0x00090000
+#define _PDBATESHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _PDBATESHFT_IS_BETA 0
+
+/* for public use */
+#define PDBATESHFT_LATEST_VERSION (_PDBATESHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDBATESHFT_LATEST_VERSION) : _PDBATESHFT_LATEST_VERSION)
+
+#define PDBATESHFT_VERSION_9 0x00090000
+
+/* Enumerate the selectors */
+#define NPROC(returnType, name, params) \
+ name##SEL,
+#define SPROC(returnType, name, params, stubProc) \
+ name##SEL,
+#define NOPROC(name) \
+ name##SEL,
+
+#define XNPROC NPROC
+#define PROC NPROC
+#define XPROC NPROC
+#define ENPROC NPROC
+ enum {
+ PDBATESBAD_SELECTOR,
+#include "PDBatesProcs.h"
+ PDBATESNUMSELECTORSplusOne
+ };
+#define PDBATESNUMSELECTORS (PDBATESNUMSELECTORSplusOne - 1)
+
+#undef NPROC
+#undef XNPROC
+#undef SPROC
+#undef PROC
+#undef XPROC
+#undef NOPROC
+#undef ENPROC
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ extern returnType name params;
+// extern ACEX1 returnType ACEX2 name params;
+ #define SPROC(returnType, name, params, stubProc) \
+ extern ACEX1 returnType ACEX2 name params;
+ #define XNPROC NPROC
+ #define PROC NPROC
+ #define XPROC NPROC
+ #define ENPROC NPROC
+ #define NOPROC(name)
+ #include "PDBatesProcs.h"
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XPROC
+ #undef ENPROC
+#else
+
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Create the prototypes */
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define SPROC(returnType, name, params, stubProc) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+
+#if READER_PLUGIN
+ /* Force Error for Exchange procs */
+ #define XPROC(returnType, name, params)
+ #define XNPROC(returnType, name, params)
+ #define UPROC(returnType, name, params)
+ #define UNPROC(returnType, name, params)
+ #define USPROC(returnType, name, params, stubProc)
+#else
+ #define XPROC NPROC
+ #define XNPROC NPROC
+ #define UPROC NPROC
+ #define UNPROC NPROC
+ #define USPROC SPROC
+
+#endif
+ #define NOPROC(name)
+ #include "PDBatesProcs.h"
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XPROC
+ #undef ENPROC
+ #include "PIRequir.h"
+
+ #include "PDBatesExpT.h"
+ #include "NSelExpT.h"
+ #include "CorCalls.h" /* For ASCallbackCreateProto */
+#ifndef THREAD_SAFE_PDFL
+ extern HFT gPDBatesHFT;
+#endif
+
+ /* PDDocAddBatesNumbering */
+ #define PDDocAddBatesNumbering (*((PDDocAddBatesNumberingSELPROTO) (gPDBatesHFT[PDDocAddBatesNumberingSEL])))
+ /* PDDocRemoveBatesNumbering */
+ #define PDDocRemoveBatesNumbering (*((PDDocRemoveBatesNumberingSELPROTO) (gPDBatesHFT[PDDocRemoveBatesNumberingSEL])))
+
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* !defined(_H_PDBatesCalls) */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesExpT.h
new file mode 100644
index 0000000..0b6512a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesExpT.h
@@ -0,0 +1,107 @@
+/*
+** PDBatesExpT.h
+** Copyright (C) 2004, Adobe Systems, Inc. All Rights Reserved.
+**
+** Types, macros, structures, etc. required to use the PD3D private HFT.
+*/
+
+#ifndef _H_PDBatesExpT
+#define _H_PDBatesExpT
+
+#include "CoreExpT.h"
+#include "ASExpT.h"
+#if !PLUGIN
+#include "ASEnv.h"
+#endif /* !PLUGIN */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+* Parameters used for describing Bates Numbering.
+* As an example, Bates Numbering with <code>start=100 nDigits=6</code> would look like <code>000100, 000101, 000102, 000103...</code>.
+* @see PDDocAddBatesNumbering
+*/
+typedef struct _t_PDDocBatesNumberingParams {
+ /** The size of the data structure.
+ */
+ ASSize_t size;
+ /** The start number of the Bates Numbering (required).
+ */
+ ASInt64 start;
+ /** The number of digits of the Bates Numbering (required).
+ */
+ ASUns8 nDigits;
+ /** Bates Numbering prefix (optional).
+ */
+ ASText prefix;
+ /** Bates Numbering suffix (optional).
+ */
+ ASText suffix;
+ /** The original page index to which Bates Numbering was added(optional).
+ */
+ ASUns8 pageIndex;
+
+} PDDocBatesNumberingParamsRec, *PDDocBatesNumberingParams;
+
+/**
+ Parameters used for adding and describing Bates Numbering.
+ @see PDDocAddBatesNumbering
+*/
+typedef struct _t_PDDocLayoutParams {
+ /** The size of the data structure.
+ */
+ ASSize_t size;
+
+ /** The page range of the document to which Bates Numbering should be added.
+ */
+ PDPageRange targetRange;
+
+ /** The margin for placement of Bates.
+ */
+ ASFixedRect margins;
+
+ /** The horizontal alignment to be used when adding Bates Numbering to a page.
+ */
+ PDHorizAlign horizAlign;
+
+ /** The vertical alignment to be used when adding Bates Numbering to a page.
+ */
+ PDVertAlign vertAlign;
+
+ /** The color setting for adding Bates Numbering to a page.
+ */
+ PDColorValueRec color;
+
+ /** The font size for adding Bates Numbering to a page.
+ */
+ double fontSize;
+
+ /** The font name for adding Bates Numbering to a page.
+ */
+ ASAtom fontName;
+
+ /** The font type for adding Bates Numbering to a page.
+ */
+ ASAtom fontType;
+
+ /** Determines whether to draw an underline to Bates Numbering in a page (optional).
+ */
+ ASBool underline;
+} PDDocLayoutParamsRec, *PDDocLayoutParams;
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_PDBatesExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesProcs.h
new file mode 100644
index 0000000..56b372f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDBatesProcs.h
@@ -0,0 +1,27 @@
+/*
+** PDBatesProcs.h
+** (c) Copyright 2004, Adobe Systems, Inc. All Rights Reserved.
+*/
+
+/**
+* Adds Bates Numbering to a PDF document.
+*
+* @param pdDoc The PDF document to which Bates Numbering is added.
+* @param batesParams Bates Numbering specific parameters, which include the start number, number of digits, prefix, and suffix.
+* @param params All layout parameters that are related to how Bates Numbering is placed on the page.
+* @return <code>true</code> if Bates Numbering was successfully added, <code>false</code> otherwise.
+* @exception pdErrBadAction
+* @see PDDocRemoveBatesNumbering
+* @since PI_PDMODEL_VERSION >= 0x00090000
+*
+**/
+XNPROC(ASBool, PDDocAddBatesNumbering, (PDDoc pdDoc, PDDocBatesNumberingParams batesParams, PDDocLayoutParamsRec params))
+/**
+* Remove Bates Numbering from a PDF document.
+* @param pdDoc The PDF document from which Bates Numbering is to be removed.
+* @return <code>true</code> if Bates Numbering was successfully removed, <code>false</code> otherwise.
+* @exception pdErrBadAction
+* @see PDDocAddBatesNumbering
+* @since PI_PDMODEL_VERSION >= 0x00090000
+*/
+XNPROC(ASBool, PDDocRemoveBatesNumbering, (PDDoc pdDoc))
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDCalls.h
new file mode 100644
index 0000000..732052c
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDCalls.h
@@ -0,0 +1,1742 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_PDCalls
+#define _H_PDCalls
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+
+/* for Adobe use only */
+#define _PDModelHFT_LATEST_VERSION 0x00090000
+#define _PDModelHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _PDModelHFT_IS_BETA 0
+
+/* for public use */
+#define PDModelHFT_LATEST_VERSION (_PDModelHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDModelHFT_LATEST_VERSION) : _PDModelHFT_LATEST_VERSION)
+
+#define PDModelHFT_VERSION_2 0x00020000
+#define PDModelHFT_VERSION_2_1 0x00020001
+#define PDModelHFT_VERSION_2_2 0x00020002
+#define PDModelHFT_VERSION_2_3 0x00020003
+#define PDModelHFT_VERSION_4 0x00040000
+#define PDModelHFT_VERSION_4_5 0x00040005
+#define PDModelHFT_VERSION_5 0x00050000
+#define PDModelHFT_VERSION_6 0x00060000
+#define PDModelHFT_VERSION_7 0x00070000
+#define PDModelHFT_VERSION_7_5 0x00070005
+#define PDModelHFT_VERSION_8 0x00080000
+#define PDModelHFT_VERSION_9 PDModelHFT_LATEST_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif
+
+#define EXTERNAL_PDPROCS_USER 1 /* External user of PDProcs.h header file */
+
+#include "PDExpT.h"
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ extern ACEX1 returnType ACEX2 name params;
+ #define SPROC(returnType, name, params, stubProc) \
+ extern ACEX1 returnType ACEX2 stubProc params;
+ #define XNPROC NPROC
+ #define PROC NPROC
+ #define XPROC NPROC
+#ifndef ENPROC
+ #define ENPROC NPROC
+#endif
+ #define NOPROC(name)
+ #define UPROC PROC
+ #define UNPROC NPROC
+ #define USPROC SPROC
+
+ #include "PDProcs.h"
+
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XPROC
+ #undef ENPROC
+ #undef XSPROC
+ #undef UPROC
+ #undef UNPROC
+ #undef USPROC
+
+ /* These functions have a different name internally */
+ #define PDDocGetWordFinder PDDocGetWordFinderHost
+ #define PDDocCreateTextSelect PDDocCreateTextSelectHost
+ #define PDTextSelectEnumQuads PDTextSelectEnumQuadsHost
+ #define PDTextSelectEnumText PDTextSelectEnumTextHost
+ #define PDTextSelectGetBoundingRect PDTextSelectGetBoundingRectHost
+ #define PDTextSelectCreatePageHilite PDTextSelectCreatePageHiliteHost
+ #define PDTextSelectCreateWordHilite PDTextSelectCreateWordHiliteHost
+ #define PDTextSelectCreateRanges PDTextSelectCreateRangesHost
+ #define PDFontGetDescendant PDFontGetDescendantInt
+ #define PDXlateToHostEx PDXlateToExtHost
+ #define PDXlateToPDFDocEncEx PDXlateToExtPDFDocEnc
+
+#endif /* !PLUGIN */
+
+#if PLUGIN
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define SPROC(returnType, name, params, stubProc) \
+ name##SEL,
+ #define NOPROC(name) \
+ name##SEL,
+
+ #define XNPROC NPROC
+ #define PROC NPROC
+ #define XPROC NPROC
+ #define ENPROC NPROC
+ #define UPROC NPROC
+ #define UNPROC NPROC
+ #define USPROC SPROC
+
+ enum {
+ PDModelBAD_SELECTOR,
+ #include "PDProcs.h"
+ PDModelNUMSELECTORSplusOne
+ };
+
+ #define PDModelNUMSELECTORS (PDModelNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef XPROC
+ #undef NOPROC
+ #undef ENPROC
+ #undef UPROC
+ #undef UNPROC
+ #undef USPROC
+
+
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define SPROC(returnType, name, params, stubProc) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+
+ #define PROC NPROC
+ #define ENPROC NPROC
+#if READER_PLUGIN
+ /* Force Error for Exchange procs */
+ #define XPROC(returnType, name, params)
+ #define XNPROC(returnType, name, params)
+ #define UPROC(returnType, name, params)
+ #define UNPROC(returnType, name, params)
+ #define USPROC(returnType, name, params, stubProc)
+#else
+ #define XPROC NPROC
+ #define XNPROC NPROC
+ #define UPROC NPROC
+ #define UNPROC NPROC
+ #define USPROC SPROC
+
+#endif
+ #define NOPROC(name)
+ #include "PDProcs.h"
+ #undef NPROC
+ #undef XNPROC
+ #undef SPROC
+ #undef PROC
+ #undef NOPROC
+ #undef XPROC
+ #undef ENPROC
+ #undef UPROC
+ #undef UNPROC
+ #undef USPROC
+
+
+#if PI_PDMODEL_VERSION != 0
+
+#ifdef THREAD_SAFE_PDFL
+ #define gPDModelHFT (GetHFTLocations()->pdModelHFT)
+ #define gPDModelVersion (GetHFTLocations()->pdModelVersion)
+#else
+ extern HFT gPDModelHFT;
+ extern ASUns32 gPDModelVersion;
+#endif
+
+#if !STATIC_HFT
+/* PDActionNew */
+#define PDActionNew (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionNewSELPROTO)(gPDModelHFT[PDActionNewSEL])))
+
+/* PDActionNewFromDest */
+#define PDActionNewFromDest (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionNewFromDestSELPROTO)(gPDModelHFT[PDActionNewFromDestSEL])))
+
+/* PDActionNewFromFileSpec */
+#define PDActionNewFromFileSpec (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionNewFromFileSpecSELPROTO)(gPDModelHFT[PDActionNewFromFileSpecSEL])))
+
+/* PDActionDestroy */
+#define PDActionDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionDestroySELPROTO)(gPDModelHFT[PDActionDestroySEL])))
+
+/* PDActionIsValid */
+#define PDActionIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionIsValidSELPROTO)(gPDModelHFT[PDActionIsValidSEL])))
+
+/* PDActionGetSubtype */
+#define PDActionGetSubtype (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionGetSubtypeSELPROTO)(gPDModelHFT[PDActionGetSubtypeSEL])))
+
+/* PDActionEqual */
+#define PDActionEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionEqualSELPROTO)(gPDModelHFT[PDActionEqualSEL])))
+
+/* PDActionGetDest */
+#define PDActionGetDest (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionGetDestSELPROTO)(gPDModelHFT[PDActionGetDestSEL])))
+
+/* PDActionGetCosObj */
+#define PDActionGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionGetCosObjSELPROTO)(gPDModelHFT[PDActionGetCosObjSEL])))
+
+/* PDActionFromCosObj */
+#define PDActionFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionFromCosObjSELPROTO)(gPDModelHFT[PDActionFromCosObjSEL])))
+
+/* PDActionGetFileSpec */
+#define PDActionGetFileSpec (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDActionGetFileSpecSELPROTO)(gPDModelHFT[PDActionGetFileSpecSEL])))
+
+/* PDAnnotNotifyWillChange */
+#define PDAnnotNotifyWillChange (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotNotifyWillChangeSELPROTO)(gPDModelHFT[PDAnnotNotifyWillChangeSEL])))
+
+/* PDAnnotNotifyDidChange */
+#define PDAnnotNotifyDidChange (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotNotifyDidChangeSELPROTO)(gPDModelHFT[PDAnnotNotifyDidChangeSEL])))
+
+/* PDPageCreateAnnot */
+#define PDPageCreateAnnot (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageCreateAnnotSELPROTO)(gPDModelHFT[PDPageCreateAnnotSEL])))
+
+/* PDAnnotIsValid */
+#define PDAnnotIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotIsValidSELPROTO)(gPDModelHFT[PDAnnotIsValidSEL])))
+
+/* PDAnnotGetSubtype */
+#define PDAnnotGetSubtype (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotGetSubtypeSELPROTO)(gPDModelHFT[PDAnnotGetSubtypeSEL])))
+
+/* PDAnnotGetRect */
+#define PDAnnotGetRect (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotGetRectSELPROTO)(gPDModelHFT[PDAnnotGetRectSEL])))
+
+/* PDAnnotSetRect */
+#define PDAnnotSetRect (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotSetRectSELPROTO)(gPDModelHFT[PDAnnotSetRectSEL])))
+
+/* PDAnnotEqual */
+#define PDAnnotEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotEqualSELPROTO)(gPDModelHFT[PDAnnotEqualSEL])))
+
+/* PDAnnotGetColor */
+#define PDAnnotGetColor (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotGetColorSELPROTO)(gPDModelHFT[PDAnnotGetColorSEL])))
+
+/* PDAnnotSetColor */
+#define PDAnnotSetColor (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotSetColorSELPROTO)(gPDModelHFT[PDAnnotSetColorSEL])))
+
+/* PDAnnotGetTitle */
+#define PDAnnotGetTitle (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotGetTitleSELPROTO)(gPDModelHFT[PDAnnotGetTitleSEL])))
+
+/* PDAnnotSetTitle */
+#define PDAnnotSetTitle (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotSetTitleSELPROTO)(gPDModelHFT[PDAnnotSetTitleSEL])))
+
+/* PDAnnotGetDate */
+#define PDAnnotGetDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotGetDateSELPROTO)(gPDModelHFT[PDAnnotGetDateSEL])))
+
+/* PDAnnotSetDate */
+#define PDAnnotSetDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotSetDateSELPROTO)(gPDModelHFT[PDAnnotSetDateSEL])))
+
+/* PDAnnotGetCosObj */
+#define PDAnnotGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotGetCosObjSELPROTO)(gPDModelHFT[PDAnnotGetCosObjSEL])))
+
+/* PDAnnotFromCosObj */
+#define PDAnnotFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotFromCosObjSELPROTO)(gPDModelHFT[PDAnnotFromCosObjSEL])))
+
+/* PDTextAnnotGetContents */
+#define PDTextAnnotGetContents (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextAnnotGetContentsSELPROTO)(gPDModelHFT[PDTextAnnotGetContentsSEL])))
+
+/* PDTextAnnotSetContents */
+#define PDTextAnnotSetContents (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextAnnotSetContentsSELPROTO)(gPDModelHFT[PDTextAnnotSetContentsSEL])))
+
+/* PDTextAnnotIsOpen */
+#define PDTextAnnotIsOpen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextAnnotIsOpenSELPROTO)(gPDModelHFT[PDTextAnnotIsOpenSEL])))
+
+/* PDTextAnnotSetOpen */
+#define PDTextAnnotSetOpen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextAnnotSetOpenSELPROTO)(gPDModelHFT[PDTextAnnotSetOpenSEL])))
+
+/* PDLinkAnnotGetBorder */
+#define PDLinkAnnotGetBorder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDLinkAnnotGetBorderSELPROTO)(gPDModelHFT[PDLinkAnnotGetBorderSEL])))
+
+/* PDLinkAnnotSetBorder */
+#define PDLinkAnnotSetBorder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDLinkAnnotSetBorderSELPROTO)(gPDModelHFT[PDLinkAnnotSetBorderSEL])))
+
+/* PDLinkAnnotSetAction */
+#define PDLinkAnnotSetAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDLinkAnnotSetActionSELPROTO)(gPDModelHFT[PDLinkAnnotSetActionSEL])))
+
+/* PDLinkAnnotGetAction */
+#define PDLinkAnnotGetAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDLinkAnnotGetActionSELPROTO)(gPDModelHFT[PDLinkAnnotGetActionSEL])))
+
+/* PDAnnotGetFlags */
+#define PDAnnotGetFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotGetFlagsSELPROTO)(gPDModelHFT[PDAnnotGetFlagsSEL])))
+
+/* PDAnnotSetFlags */
+#define PDAnnotSetFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDAnnotSetFlagsSELPROTO)(gPDModelHFT[PDAnnotSetFlagsSEL])))
+
+/* PDBookmarkAddNewSibling */
+#define PDBookmarkAddNewSibling (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkAddNewSiblingSELPROTO)(gPDModelHFT[PDBookmarkAddNewSiblingSEL])))
+
+/* PDBookmarkAddNewChild */
+#define PDBookmarkAddNewChild (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkAddNewChildSELPROTO)(gPDModelHFT[PDBookmarkAddNewChildSEL])))
+
+/* PDBookmarkAddSubtree */
+#define PDBookmarkAddSubtree (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkAddSubtreeSELPROTO)(gPDModelHFT[PDBookmarkAddSubtreeSEL])))
+
+/* PDBookmarkDestroy */
+#define PDBookmarkDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkDestroySELPROTO)(gPDModelHFT[PDBookmarkDestroySEL])))
+
+/* PDBookmarkGetByTitle */
+#define PDBookmarkGetByTitle (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetByTitleSELPROTO)(gPDModelHFT[PDBookmarkGetByTitleSEL])))
+
+/* PDBookmarkGetCount */
+#define PDBookmarkGetCount (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetCountSELPROTO)(gPDModelHFT[PDBookmarkGetCountSEL])))
+
+/* PDBookmarkAddPrev */
+#define PDBookmarkAddPrev (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkAddPrevSELPROTO)(gPDModelHFT[PDBookmarkAddPrevSEL])))
+
+/* PDBookmarkAddNext */
+#define PDBookmarkAddNext (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkAddNextSELPROTO)(gPDModelHFT[PDBookmarkAddNextSEL])))
+
+/* PDBookmarkAddChild */
+#define PDBookmarkAddChild (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkAddChildSELPROTO)(gPDModelHFT[PDBookmarkAddChildSEL])))
+
+/* PDBookmarkUnlink */
+#define PDBookmarkUnlink (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkUnlinkSELPROTO)(gPDModelHFT[PDBookmarkUnlinkSEL])))
+
+/* PDBookmarkIsValid */
+#define PDBookmarkIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkIsValidSELPROTO)(gPDModelHFT[PDBookmarkIsValidSEL])))
+
+/* PDBookmarkGetParent */
+#define PDBookmarkGetParent (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetParentSELPROTO)(gPDModelHFT[PDBookmarkGetParentSEL])))
+
+/* PDBookmarkGetFirstChild */
+#define PDBookmarkGetFirstChild (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetFirstChildSELPROTO)(gPDModelHFT[PDBookmarkGetFirstChildSEL])))
+
+/* PDBookmarkGetLastChild */
+#define PDBookmarkGetLastChild (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetLastChildSELPROTO)(gPDModelHFT[PDBookmarkGetLastChildSEL])))
+
+/* PDBookmarkGetNext */
+#define PDBookmarkGetNext (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetNextSELPROTO)(gPDModelHFT[PDBookmarkGetNextSEL])))
+
+/* PDBookmarkGetPrev */
+#define PDBookmarkGetPrev (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetPrevSELPROTO)(gPDModelHFT[PDBookmarkGetPrevSEL])))
+
+/* PDBookmarkGetIndent */
+#define PDBookmarkGetIndent (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetIndentSELPROTO)(gPDModelHFT[PDBookmarkGetIndentSEL])))
+
+/* PDBookmarkGetTitle */
+#define PDBookmarkGetTitle (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetTitleSELPROTO)(gPDModelHFT[PDBookmarkGetTitleSEL])))
+
+/* PDBookmarkSetTitle */
+#define PDBookmarkSetTitle (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkSetTitleSELPROTO)(gPDModelHFT[PDBookmarkSetTitleSEL])))
+
+/* PDBookmarkHasChildren */
+#define PDBookmarkHasChildren (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkHasChildrenSELPROTO)(gPDModelHFT[PDBookmarkHasChildrenSEL])))
+
+/* PDBookmarkIsOpen */
+#define PDBookmarkIsOpen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkIsOpenSELPROTO)(gPDModelHFT[PDBookmarkIsOpenSEL])))
+
+/* PDBookmarkSetOpen */
+#define PDBookmarkSetOpen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkSetOpenSELPROTO)(gPDModelHFT[PDBookmarkSetOpenSEL])))
+
+/* PDBookmarkGetAction */
+#define PDBookmarkGetAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetActionSELPROTO)(gPDModelHFT[PDBookmarkGetActionSEL])))
+
+/* PDBookmarkSetAction */
+#define PDBookmarkSetAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkSetActionSELPROTO)(gPDModelHFT[PDBookmarkSetActionSEL])))
+
+/* PDBookmarkEqual */
+#define PDBookmarkEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkEqualSELPROTO)(gPDModelHFT[PDBookmarkEqualSEL])))
+
+/* PDBookmarkGetCosObj */
+#define PDBookmarkGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkGetCosObjSELPROTO)(gPDModelHFT[PDBookmarkGetCosObjSEL])))
+
+/* PDBookmarkFromCosObj */
+#define PDBookmarkFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBookmarkFromCosObjSELPROTO)(gPDModelHFT[PDBookmarkFromCosObjSEL])))
+
+/* PDEnumDocs */
+#define PDEnumDocs (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDEnumDocsSELPROTO)(gPDModelHFT[PDEnumDocsSEL])))
+
+/* PDDocOpen */
+#define PDDocOpen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocOpenSELPROTO)(gPDModelHFT[PDDocOpenSEL])))
+
+/* PDDocGetOpenAction */
+#define PDDocGetOpenAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetOpenActionSELPROTO)(gPDModelHFT[PDDocGetOpenActionSEL])))
+
+/* PDDocSetOpenAction */
+#define PDDocSetOpenAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocSetOpenActionSELPROTO)(gPDModelHFT[PDDocSetOpenActionSEL])))
+
+/* PDDocCreate */
+#define PDDocCreate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocCreateSELPROTO)(gPDModelHFT[PDDocCreateSEL])))
+
+/* PDDocSave */
+#define PDDocSave (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocSaveSELPROTO)(gPDModelHFT[PDDocSaveSEL])))
+
+/* PDDocClose */
+#define PDDocClose (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocCloseSELPROTO)(gPDModelHFT[PDDocCloseSEL])))
+
+/* PDDocAcquire */
+#if UNIX_PLATFORM
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif
+#define PDDocAcquire (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocAcquireSELPROTO)(gPDModelHFT[PDDocAcquireSEL])))
+#if UNIX_PLATFORM
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+/* PDDocRelease */
+#define PDDocRelease (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocReleaseSELPROTO)(gPDModelHFT[PDDocReleaseSEL])))
+
+/* PDDocGetFlags */
+#define PDDocGetFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetFlagsSELPROTO)(gPDModelHFT[PDDocGetFlagsSEL])))
+
+/* PDDocSetFlags */
+#define PDDocSetFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocSetFlagsSELPROTO)(gPDModelHFT[PDDocSetFlagsSEL])))
+
+/* PDDocGetPageMode */
+#define PDDocGetPageMode (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetPageModeSELPROTO)(gPDModelHFT[PDDocGetPageModeSEL])))
+
+/* PDDocSetPageMode */
+#define PDDocSetPageMode (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocSetPageModeSELPROTO)(gPDModelHFT[PDDocSetPageModeSEL])))
+
+/* PDDocGetCosDoc */
+#define PDDocGetCosDoc (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetCosDocSELPROTO)(gPDModelHFT[PDDocGetCosDocSEL])))
+
+/* PDDocGetFile */
+#define PDDocGetFile (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetFileSELPROTO)(gPDModelHFT[PDDocGetFileSEL])))
+
+/* PDDocGetID */
+#define PDDocGetID (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetIDSELPROTO)(gPDModelHFT[PDDocGetIDSEL])))
+
+/* PDDocGetVersion */
+#define PDDocGetVersion (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetVersionSELPROTO)(gPDModelHFT[PDDocGetVersionSEL])))
+
+/* PDDocGetBookmarkRoot */
+#define PDDocGetBookmarkRoot (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetBookmarkRootSELPROTO)(gPDModelHFT[PDDocGetBookmarkRootSEL])))
+
+/* PDDocGetNumPages */
+#define PDDocGetNumPages (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetNumPagesSELPROTO)(gPDModelHFT[PDDocGetNumPagesSEL])))
+
+/* PDDocAcquirePage */
+#define PDDocAcquirePage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocAcquirePageSELPROTO)(gPDModelHFT[PDDocAcquirePageSEL])))
+
+/* PDDocCreatePage */
+#define PDDocCreatePage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocCreatePageSELPROTO)(gPDModelHFT[PDDocCreatePageSEL])))
+
+/* PDDocDeletePages */
+#define PDDocDeletePages (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocDeletePagesSELPROTO)(gPDModelHFT[PDDocDeletePagesSEL])))
+
+/* PDDocMovePage */
+#define PDDocMovePage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocMovePageSELPROTO)(gPDModelHFT[PDDocMovePageSEL])))
+
+/* PDDocInsertPages */
+#define PDDocInsertPages (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocInsertPagesSELPROTO)(gPDModelHFT[PDDocInsertPagesSEL])))
+
+/* PDDocReplacePages */
+#define PDDocReplacePages (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocReplacePagesSELPROTO)(gPDModelHFT[PDDocReplacePagesSEL])))
+
+/* PDDocGetNumThreads */
+#define PDDocGetNumThreads (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetNumThreadsSELPROTO)(gPDModelHFT[PDDocGetNumThreadsSEL])))
+
+/* PDDocGetThread */
+#define PDDocGetThread (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetThreadSELPROTO)(gPDModelHFT[PDDocGetThreadSEL])))
+
+/* PDDocGetThreadIndex */
+#define PDDocGetThreadIndex (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetThreadIndexSELPROTO)(gPDModelHFT[PDDocGetThreadIndexSEL])))
+
+/* PDDocAddThread */
+#define PDDocAddThread (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocAddThreadSELPROTO)(gPDModelHFT[PDDocAddThreadSEL])))
+
+/* PDDocRemoveThread */
+#define PDDocRemoveThread (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocRemoveThreadSELPROTO)(gPDModelHFT[PDDocRemoveThreadSEL])))
+
+/* PDDocEnumFonts */
+#define PDDocEnumFonts (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocEnumFontsSELPROTO)(gPDModelHFT[PDDocEnumFontsSEL])))
+
+/* PDDocEnumLoadedFonts */
+#define PDDocEnumLoadedFonts (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocEnumLoadedFontsSELPROTO)(gPDModelHFT[PDDocEnumLoadedFontsSEL])))
+
+/* PDDocCreateThumbs */
+#define PDDocCreateThumbs (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocCreateThumbsSELPROTO)(gPDModelHFT[PDDocCreateThumbsSEL])))
+
+/* PDDocDeleteThumbs */
+#define PDDocDeleteThumbs (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocDeleteThumbsSELPROTO)(gPDModelHFT[PDDocDeleteThumbsSEL])))
+
+/* PDDocGetWordFinder */
+#define PDDocGetWordFinder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetWordFinderSELPROTO)(gPDModelHFT[PDDocGetWordFinderSEL])))
+
+/** PDDocCreateWordFinder
+ @ref GlyphNames
+*/
+#define PDDocCreateWordFinder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocCreateWordFinderSELPROTO)(gPDModelHFT[PDDocCreateWordFinderSEL])))
+
+/* PDWordFinderGetNthWord */
+#define PDWordFinderGetNthWord (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFinderGetNthWordSELPROTO)(gPDModelHFT[PDWordFinderGetNthWordSEL])))
+
+/** PDWordSplitString
+ @ingroup GlyphNames
+*/
+#define PDWordSplitString (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordSplitStringSELPROTO)(gPDModelHFT[PDWordSplitStringSEL])))
+
+/* PDDocCreateTextSelect */
+#define PDDocCreateTextSelect (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocCreateTextSelectSELPROTO)(gPDModelHFT[ PDDocCreateTextSelectSEL])))
+
+/* PDDocGetInfo */
+#define PDDocGetInfo (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetInfoSELPROTO)(gPDModelHFT[PDDocGetInfoSEL])))
+
+/* PDDocSetInfo */
+#define PDDocSetInfo (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocSetInfoSELPROTO)(gPDModelHFT[PDDocSetInfoSEL])))
+
+
+/* PDDocGetSecurityData */
+#define PDDocGetSecurityData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetSecurityDataSELPROTO)(gPDModelHFT[PDDocGetSecurityDataSEL])))
+
+/* PDDocGetNewSecurityData */
+#define PDDocGetNewSecurityData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetNewSecurityDataSELPROTO)(gPDModelHFT[PDDocGetNewSecurityDataSEL])))
+
+/* PDDocAuthorize */
+#define PDDocAuthorize (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocAuthorizeSELPROTO)(gPDModelHFT[PDDocAuthorizeSEL])))
+
+/* PDDocNewSecurityData */
+#define PDDocNewSecurityData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocNewSecurityDataSELPROTO)(gPDModelHFT[PDDocNewSecurityDataSEL])))
+
+/* PDDocSetNewSecurityData */
+#define PDDocSetNewSecurityData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocSetNewSecurityDataSELPROTO)(gPDModelHFT[PDDocSetNewSecurityDataSEL])))
+
+/* PDDocSetNewCryptHandler */
+#define PDDocSetNewCryptHandler (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocSetNewCryptHandlerSELPROTO)(gPDModelHFT[PDDocSetNewCryptHandlerSEL])))
+
+/* PDDocSetNewCryptHandlerEx */
+#define PDDocSetNewCryptHandlerEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocSetNewCryptHandlerExSELPROTO)(gPDModelHFT[PDDocSetNewCryptHandlerExSEL])))
+
+/* PDDocGetNewCryptHandler */
+#define PDDocGetNewCryptHandler (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetNewCryptHandlerSELPROTO)(gPDModelHFT[PDDocGetNewCryptHandlerSEL])))
+
+/* PDDocGetNewSecurityInfo */
+#define PDDocGetNewSecurityInfo (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetNewSecurityInfoSELPROTO)(gPDModelHFT[PDDocGetNewSecurityInfoSEL])))
+
+
+/* PDDocGetPermissions */
+#define PDDocGetPermissions (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDDocGetPermissionsSELPROTO)(gPDModelHFT[PDDocGetPermissionsSEL])))
+
+/* PDRegisterCryptHandler */
+#define PDRegisterCryptHandler (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDRegisterCryptHandlerSELPROTO)(gPDModelHFT[PDRegisterCryptHandlerSEL])))
+
+/* PDXlateToPDFDocEnc */
+#define PDXlateToPDFDocEnc (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDXlateToPDFDocEncSELPROTO)(gPDModelHFT[PDXlateToPDFDocEncSEL])))
+
+/* PDXlateToHost */
+#define PDXlateToHost (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDXlateToHostSELPROTO)(gPDModelHFT[PDXlateToHostSEL])))
+
+
+/* PDFontGetName */
+#define PDFontGetName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetNameSELPROTO)(gPDModelHFT[PDFontGetNameSEL])))
+
+/** PDFontGetSubtype
+ @ref FontSubtypes
+*/
+#define PDFontGetSubtype (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetSubtypeSELPROTO)(gPDModelHFT[PDFontGetSubtypeSEL])))
+
+/* PDFontGetCharSet */
+#define PDFontGetCharSet (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetCharSetSELPROTO)(gPDModelHFT[PDFontGetCharSetSEL])))
+
+/* PDFontGetEncodingIndex */
+#define PDFontGetEncodingIndex (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetEncodingIndexSELPROTO)(gPDModelHFT[PDFontGetEncodingIndexSEL])))
+
+/* PDFontAcquireEncodingArray */
+#define PDFontAcquireEncodingArray (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontAcquireEncodingArraySELPROTO)(gPDModelHFT[PDFontAcquireEncodingArraySEL])))
+
+/* PDFontEncodingArrayRelease */
+#define PDFontEncodingArrayRelease (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontEncodingArrayReleaseSELPROTO)(gPDModelHFT[PDFontEncodingArrayReleaseSEL])))
+
+/* PDFontGetMetrics */
+#define PDFontGetMetrics (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetMetricsSELPROTO)(gPDModelHFT[PDFontGetMetricsSEL])))
+
+/* PDFontGetBBox */
+#define PDFontGetBBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetBBoxSELPROTO)(gPDModelHFT[PDFontGetBBoxSEL])))
+
+/* PDFontGetWidths */
+#define PDFontGetWidths (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetWidthsSELPROTO)(gPDModelHFT[PDFontGetWidthsSEL])))
+
+/* PDGetPDFDocEncoding */
+#define PDGetPDFDocEncoding (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDGetPDFDocEncodingSELPROTO)(gPDModelHFT[PDGetPDFDocEncodingSEL])))
+
+/* PDFontIsEmbedded */
+#define PDFontIsEmbedded (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontIsEmbeddedSELPROTO)(gPDModelHFT[PDFontIsEmbeddedSEL])))
+
+/* PDFontXlateWidths */
+#define PDFontXlateWidths (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontXlateWidthsSELPROTO)(gPDModelHFT[PDFontXlateWidthsSEL])))
+
+/* PDFontXlateString */
+#define PDFontXlateString (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontXlateStringSELPROTO)(gPDModelHFT[PDFontXlateStringSEL])))
+
+/* PDFontAcquireXlateTable */
+#define PDFontAcquireXlateTable (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontAcquireXlateTableSELPROTO)(gPDModelHFT[PDFontAcquireXlateTableSEL])))
+
+/* PDFontXlateTableRelease */
+#define PDFontXlateTableRelease (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontXlateTableReleaseSELPROTO)(gPDModelHFT[PDFontXlateTableReleaseSEL])))
+
+/* PDFontGetFontMatrix */
+#define PDFontGetFontMatrix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetFontMatrixSELPROTO)(gPDModelHFT[PDFontGetFontMatrixSEL])))
+
+/* PDFontSetMetrics */
+#define PDFontSetMetrics (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontSetMetricsSELPROTO)(gPDModelHFT[PDFontSetMetricsSEL])))
+
+/* PDFontGetCosObj */
+#define PDFontGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontGetCosObjSELPROTO)(gPDModelHFT[PDFontGetCosObjSEL])))
+
+/* PDPageNotifyContentsDidChange */
+#define PDPageNotifyContentsDidChange (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageNotifyContentsDidChangeSELPROTO)(gPDModelHFT[PDPageNotifyContentsDidChangeSEL])))
+
+/* PDPageGetNumber */
+#define PDPageGetNumber (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetNumberSELPROTO)(gPDModelHFT[PDPageGetNumberSEL])))
+
+/* PDPageRelease */
+#define PDPageRelease (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageReleaseSELPROTO)(gPDModelHFT[PDPageReleaseSEL])))
+
+/* PDPageGetDoc */
+#define PDPageGetDoc (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetDocSELPROTO)(gPDModelHFT[PDPageGetDocSEL])))
+
+/* PDPageGetCosObj */
+#define PDPageGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetCosObjSELPROTO)(gPDModelHFT[PDPageGetCosObjSEL])))
+
+/* PDPageNumFromCosObj */
+#define PDPageNumFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageNumFromCosObjSELPROTO)(gPDModelHFT[PDPageNumFromCosObjSEL])))
+
+/* PDPageGetRotate */
+#define PDPageGetRotate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetRotateSELPROTO)(gPDModelHFT[PDPageGetRotateSEL])))
+
+/* PDPageSetRotate */
+#define PDPageSetRotate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageSetRotateSELPROTO)(gPDModelHFT[PDPageSetRotateSEL])))
+
+/* PDPageGetMediaBox */
+#define PDPageGetMediaBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetMediaBoxSELPROTO)(gPDModelHFT[PDPageGetMediaBoxSEL])))
+
+/* PDPageSetMediaBox */
+#define PDPageSetMediaBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageSetMediaBoxSELPROTO)(gPDModelHFT[PDPageSetMediaBoxSEL])))
+
+/* PDPageGetCropBox */
+#define PDPageGetCropBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetCropBoxSELPROTO)(gPDModelHFT[PDPageGetCropBoxSEL])))
+
+/* PDPageSetCropBox */
+#define PDPageSetCropBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageSetCropBoxSELPROTO)(gPDModelHFT[PDPageSetCropBoxSEL])))
+
+/* PDPageGetBBox */
+#define PDPageGetBBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetBBoxSELPROTO)(gPDModelHFT[PDPageGetBBoxSEL])))
+
+/* PDPageGetDefaultMatrix */
+#define PDPageGetDefaultMatrix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetDefaultMatrixSELPROTO)(gPDModelHFT[PDPageGetDefaultMatrixSEL])))
+
+/* PDPageGetFlippedMatrix */
+#define PDPageGetFlippedMatrix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetFlippedMatrixSELPROTO)(gPDModelHFT[PDPageGetFlippedMatrixSEL])))
+
+/* PDPageDrawContentsToWindow */
+#define PDPageDrawContentsToWindow (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageDrawContentsToWindowSELPROTO)(gPDModelHFT[PDPageDrawContentsToWindowSEL])))
+
+/* PDPageGetAnnot */
+#define PDPageGetAnnot (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetAnnotSELPROTO)(gPDModelHFT[PDPageGetAnnotSEL])))
+
+/* PDPageAddNewAnnot */
+#define PDPageAddNewAnnot (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageAddNewAnnotSELPROTO)(gPDModelHFT[PDPageAddNewAnnotSEL])))
+
+/* PDPageAddAnnot */
+#define PDPageAddAnnot (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageAddAnnotSELPROTO)(gPDModelHFT[PDPageAddAnnotSEL])))
+
+/* PDPageRemoveAnnot */
+#define PDPageRemoveAnnot (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageRemoveAnnotSELPROTO)(gPDModelHFT[PDPageRemoveAnnotSEL])))
+
+/* PDPageGetAnnotIndex */
+#define PDPageGetAnnotIndex (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetAnnotIndexSELPROTO)(gPDModelHFT[PDPageGetAnnotIndexSEL])))
+
+/* PDPageGetNumAnnots */
+#define PDPageGetNumAnnots (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetNumAnnotsSELPROTO)(gPDModelHFT[PDPageGetNumAnnotsSEL])))
+
+/* PDPageGetCosResources */
+#define PDPageGetCosResources (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageGetCosResourcesSELPROTO)(gPDModelHFT[PDPageGetCosResourcesSEL])))
+
+/* PDPageAddCosResource */
+#define PDPageAddCosResource (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageAddCosResourceSELPROTO)(gPDModelHFT[PDPageAddCosResourceSEL])))
+
+/* PDPageAddCosContents */
+#define PDPageAddCosContents (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageAddCosContentsSELPROTO)(gPDModelHFT[PDPageAddCosContentsSEL])))
+
+/* PDPageRemoveCosResource */
+#define PDPageRemoveCosResource (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageRemoveCosResourceSELPROTO)(gPDModelHFT[PDPageRemoveCosResourceSEL])))
+
+/* PDPageRemoveCosContents */
+#define PDPageRemoveCosContents (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPageRemoveCosContentsSELPROTO)(gPDModelHFT[PDPageRemoveCosContentsSEL])))
+
+/* PDGraphicGetBBox */
+#define PDGraphicGetBBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDGraphicGetBBoxSELPROTO)(gPDModelHFT[PDGraphicGetBBoxSEL])))
+
+/* PDGraphicGetCurrentMatrix */
+#define PDGraphicGetCurrentMatrix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDGraphicGetCurrentMatrixSELPROTO)(gPDModelHFT[PDGraphicGetCurrentMatrixSEL])))
+
+/* PDGraphicGetState */
+#define PDGraphicGetState (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDGraphicGetStateSELPROTO)(gPDModelHFT[PDGraphicGetStateSEL])))
+
+/** PDTextEnum
+ @ingroup Enumerators
+*/
+#define PDTextEnum (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextEnumSELPROTO)(gPDModelHFT[PDTextEnumSEL])))
+
+/* PDTextGetState */
+#define PDTextGetState (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextGetStateSELPROTO)(gPDModelHFT[PDTextGetStateSEL])))
+
+/* PDPathEnum */
+#define PDPathEnum (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPathEnumSELPROTO)(gPDModelHFT[PDPathEnumSEL])))
+
+/* PDPathGetPaintOp */
+#define PDPathGetPaintOp (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPathGetPaintOpSELPROTO)(gPDModelHFT[PDPathGetPaintOpSEL])))
+
+/* PDInlineImageGetAttrs */
+#define PDInlineImageGetAttrs (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDInlineImageGetAttrsSELPROTO)(gPDModelHFT[PDInlineImageGetAttrsSEL])))
+
+/* PDInlineImageGetData */
+#define PDInlineImageGetData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDInlineImageGetDataSELPROTO)(gPDModelHFT[PDInlineImageGetDataSEL])))
+
+/* PDInlineImageColorSpaceGetIndexLookup */
+#define PDInlineImageColorSpaceGetIndexLookup (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDInlineImageColorSpaceGetIndexLookupSELPROTO)(gPDModelHFT[PDInlineImageColorSpaceGetIndexLookupSEL])))
+
+/* PDXObjectGetSubtype */
+#define PDXObjectGetSubtype (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDXObjectGetSubtypeSELPROTO)(gPDModelHFT[PDXObjectGetSubtypeSEL])))
+
+/* PDXObjectGetCosObj */
+#define PDXObjectGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDXObjectGetCosObjSELPROTO)(gPDModelHFT[PDXObjectGetCosObjSEL])))
+
+/* PDXObjectGetDataLength */
+#define PDXObjectGetDataLength (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDXObjectGetDataLengthSELPROTO)(gPDModelHFT[PDXObjectGetDataLengthSEL])))
+
+/** PDXObjectGetData
+ @ingroup Enumerators
+*/
+#define PDXObjectGetData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDXObjectGetDataSELPROTO)(gPDModelHFT[PDXObjectGetDataSEL])))
+
+/** PDXObjectEnumFilters
+ @ingroup Enumerators
+*/
+#define PDXObjectEnumFilters (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDXObjectEnumFiltersSELPROTO)(gPDModelHFT[PDXObjectEnumFiltersSEL])))
+
+/* PDImageGetAttrs */
+#define PDImageGetAttrs (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDImageGetAttrsSELPROTO)(gPDModelHFT[PDImageGetAttrsSEL])))
+
+/* PDImageColorSpaceGetIndexLookup */
+#define PDImageColorSpaceGetIndexLookup (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDImageColorSpaceGetIndexLookupSELPROTO)(gPDModelHFT[PDImageColorSpaceGetIndexLookupSEL])))
+
+/* PDFormGetFormType */
+#define PDFormGetFormType (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFormGetFormTypeSELPROTO)(gPDModelHFT[PDFormGetFormTypeSEL])))
+
+/* PDFormGetBBox */
+#define PDFormGetBBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFormGetBBoxSELPROTO)(gPDModelHFT[PDFormGetBBoxSEL])))
+
+/* PDFormGetMatrix */
+#define PDFormGetMatrix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFormGetMatrixSELPROTO)(gPDModelHFT[ PDFormGetMatrixSEL ])))
+
+/* PDFormGetXUIDCosObj */
+#define PDFormGetXUIDCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFormGetXUIDCosObjSELPROTO)(gPDModelHFT[PDFormGetXUIDCosObjSEL])))
+
+/* PDFormEnumResources */
+#define PDFormEnumResources (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFormEnumResourcesSELPROTO)(gPDModelHFT[PDFormEnumResourcesSEL])))
+
+/* PDFormEnumPaintProc */
+#define PDFormEnumPaintProc (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFormEnumPaintProcSELPROTO)(gPDModelHFT[PDFormEnumPaintProcSEL])))
+
+/* PDFontEnumCharProcs */
+#define PDFontEnumCharProcs (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFontEnumCharProcsSELPROTO)(gPDModelHFT[PDFontEnumCharProcsSEL])))
+
+/* PDCharProcEnum */
+#define PDCharProcEnum (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDCharProcEnumSELPROTO)(gPDModelHFT[PDCharProcEnumSEL])))
+
+/* PDCharProcGetCosObj */
+#define PDCharProcGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDCharProcGetCosObjSELPROTO)(gPDModelHFT[PDCharProcGetCosObjSEL])))
+
+/* PDThreadNew */
+#define PDThreadNew (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadNewSELPROTO)(gPDModelHFT[PDThreadNewSEL])))
+
+/* PDThreadDestroy */
+#define PDThreadDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadDestroySELPROTO)(gPDModelHFT[PDThreadDestroySEL])))
+
+/* PDThreadGetFirstBead */
+#define PDThreadGetFirstBead (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadGetFirstBeadSELPROTO)(gPDModelHFT[PDThreadGetFirstBeadSEL])))
+
+/* PDThreadSetFirstBead */
+#define PDThreadSetFirstBead (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadSetFirstBeadSELPROTO)(gPDModelHFT[PDThreadSetFirstBeadSEL])))
+
+/* PDThreadGetInfo */
+#define PDThreadGetInfo (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadGetInfoSELPROTO)(gPDModelHFT[PDThreadGetInfoSEL])))
+
+/* PDThreadSetInfo */
+#define PDThreadSetInfo (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadSetInfoSELPROTO)(gPDModelHFT[PDThreadSetInfoSEL])))
+
+/* PDThreadIsValid */
+#define PDThreadIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadIsValidSELPROTO)(gPDModelHFT[PDThreadIsValidSEL])))
+
+/* PDThreadGetCosObj */
+#define PDThreadGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadGetCosObjSELPROTO)(gPDModelHFT[PDThreadGetCosObjSEL])))
+
+/* PDThreadFromCosObj */
+#define PDThreadFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDThreadFromCosObjSELPROTO)(gPDModelHFT[PDThreadFromCosObjSEL])))
+
+/* PDBeadNew */
+#define PDBeadNew (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadNewSELPROTO)(gPDModelHFT[PDBeadNewSEL])))
+
+/* PDBeadDestroy */
+#define PDBeadDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadDestroySELPROTO)(gPDModelHFT[PDBeadDestroySEL])))
+
+/* PDBeadGetNext */
+#define PDBeadGetNext (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadGetNextSELPROTO)(gPDModelHFT[PDBeadGetNextSEL])))
+
+/* PDBeadGetPrev */
+#define PDBeadGetPrev (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadGetPrevSELPROTO)(gPDModelHFT[PDBeadGetPrevSEL])))
+
+/* PDBeadInsert */
+#define PDBeadInsert (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadInsertSELPROTO)(gPDModelHFT[PDBeadInsertSEL])))
+
+/* PDBeadAcquirePage */
+#define PDBeadAcquirePage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadAcquirePageSELPROTO)(gPDModelHFT[PDBeadAcquirePageSEL])))
+
+/* PDBeadSetPage */
+#define PDBeadSetPage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadSetPageSELPROTO)(gPDModelHFT[PDBeadSetPageSEL])))
+
+/* PDBeadGetRect */
+#define PDBeadGetRect (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadGetRectSELPROTO)(gPDModelHFT[PDBeadGetRectSEL])))
+
+/* PDBeadSetRect */
+#define PDBeadSetRect (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadSetRectSELPROTO)(gPDModelHFT[ PDBeadSetRectSEL])))
+
+/* PDBeadIsValid */
+#define PDBeadIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadIsValidSELPROTO)(gPDModelHFT[PDBeadIsValidSEL])))
+
+/* PDBeadGetThread */
+#define PDBeadGetThread (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadGetThreadSELPROTO)(gPDModelHFT[PDBeadGetThreadSEL])))
+
+/* PDBeadGetIndex */
+#define PDBeadGetIndex (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadGetIndexSELPROTO)(gPDModelHFT[PDBeadGetIndexSEL])))
+
+/* PDBeadEqual */
+#define PDBeadEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadEqualSELPROTO)(gPDModelHFT[PDBeadEqualSEL])))
+
+/* PDBeadGetCosObj */
+#define PDBeadGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadGetCosObjSELPROTO)(gPDModelHFT[PDBeadGetCosObjSEL])))
+
+/* PDBeadFromCosObj */
+#define PDBeadFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDBeadFromCosObjSELPROTO)(gPDModelHFT[PDBeadFromCosObjSEL])))
+
+/* PDViewDestCreate */
+#define PDViewDestCreate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDViewDestCreateSELPROTO)(gPDModelHFT[PDViewDestCreateSEL])))
+
+/* PDViewDestDestroy */
+#define PDViewDestDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDViewDestDestroySELPROTO)(gPDModelHFT[PDViewDestDestroySEL])))
+
+/* PDViewDestIsValid */
+#define PDViewDestIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDViewDestIsValidSELPROTO)(gPDModelHFT[PDViewDestIsValidSEL])))
+
+/* PDViewDestGetAttr */
+#define PDViewDestGetAttr (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDViewDestGetAttrSELPROTO)(gPDModelHFT[PDViewDestGetAttrSEL])))
+
+/* PDViewDestGetCosObj */
+#define PDViewDestGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDViewDestGetCosObjSELPROTO)(gPDModelHFT[PDViewDestGetCosObjSEL])))
+
+/* PDViewDestFromCosObj */
+#define PDViewDestFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDViewDestFromCosObjSELPROTO)(gPDModelHFT[PDViewDestFromCosObjSEL])))
+
+/* PDTextSelectDestroy */
+#define PDTextSelectDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectDestroySELPROTO)(gPDModelHFT[PDTextSelectDestroySEL])))
+
+/** PDTextSelectEnumQuads
+ @ingroup Enumerators
+*/
+#define PDTextSelectEnumQuads (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectEnumQuadsSELPROTO)(gPDModelHFT[PDTextSelectEnumQuadsSEL ])))
+
+/** PDTextSelectEnumText
+ @ingroup Enumerators
+*/
+#define PDTextSelectEnumText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectEnumTextSELPROTO)(gPDModelHFT[PDTextSelectEnumTextSEL])))
+
+/* PDTextSelectGetPage */
+#define PDTextSelectGetPage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectGetPageSELPROTO)(gPDModelHFT[PDTextSelectGetPageSEL])))
+
+/* PDTextSelectGetBoundingRect */
+#define PDTextSelectGetBoundingRect (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectGetBoundingRectSELPROTO)(gPDModelHFT[PDTextSelectGetBoundingRectSEL])))
+
+/* PDTextSelectCreatePageHilite */
+#define PDTextSelectCreatePageHilite (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectCreatePageHiliteSELPROTO)(gPDModelHFT[PDTextSelectCreatePageHiliteSEL])))
+
+/* PDTextSelectCreateWordHilite */
+#define PDTextSelectCreateWordHilite (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectCreateWordHiliteSELPROTO)(gPDModelHFT[PDTextSelectCreateWordHiliteSEL])))
+
+/* PDTextSelectGetRange */
+#define PDTextSelectGetRange (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectGetRangeSELPROTO)(gPDModelHFT[PDTextSelectGetRangeSEL])))
+
+/* PDTextSelectGetRangeCount */
+#define PDTextSelectGetRangeCount (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectGetRangeCountSELPROTO)(gPDModelHFT[PDTextSelectGetRangeCountSEL])))
+
+/* PDTextSelectCreateRanges */
+#define PDTextSelectCreateRanges (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDTextSelectCreateRangesSELPROTO)(gPDModelHFT[PDTextSelectCreateRangesSEL])))
+
+/* PDWordFinderAcquireWordList */
+#define PDWordFinderAcquireWordList (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFinderAcquireWordListSELPROTO)(gPDModelHFT[PDWordFinderAcquireWordListSEL])))
+
+/* PDWordFinderGetLatestAlgVersion */
+#define PDWordFinderGetLatestAlgVersion (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFinderGetLatestAlgVersionSELPROTO)(gPDModelHFT[PDWordFinderGetLatestAlgVersionSEL])))
+
+/* PDWordFinderReleaseWordList */
+#define PDWordFinderReleaseWordList (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFinderReleaseWordListSELPROTO)(gPDModelHFT[PDWordFinderReleaseWordListSEL])))
+
+/* PDWordFinderDestroy */
+#define PDWordFinderDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFinderDestroySELPROTO)(gPDModelHFT[PDWordFinderDestroySEL])))
+
+/* PDWordFinderEnumWords */
+#define PDWordFinderEnumWords (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFinderEnumWordsSELPROTO)(gPDModelHFT[PDWordFinderEnumWordsSEL])))
+
+/* PDWordGetLength */
+#define PDWordGetLength (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetLengthSELPROTO)(gPDModelHFT[PDWordGetLengthSEL])))
+
+/* PDWordGetString */
+#define PDWordGetString (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetStringSELPROTO)(gPDModelHFT[PDWordGetStringSEL])))
+
+/* PDWordGetAttr */
+#define PDWordGetAttr (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetAttrSELPROTO)(gPDModelHFT[PDWordGetAttrSEL])))
+
+/* PDWordGetCharacterTypes */
+#define PDWordGetCharacterTypes (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetCharacterTypesSELPROTO)(gPDModelHFT[PDWordGetCharacterTypesSEL])))
+
+/* PDWordGetCharOffset */
+#define PDWordGetCharOffset (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetCharOffsetSELPROTO)(gPDModelHFT[ PDWordGetCharOffsetSEL])))
+
+/* PDWordGetCharDelta */
+#define PDWordGetCharDelta (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetCharDeltaSELPROTO)(gPDModelHFT[PDWordGetCharDeltaSEL])))
+
+/* PDWordGetStyleTransition */
+#define PDWordGetStyleTransition (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetStyleTransitionSELPROTO)(gPDModelHFT[PDWordGetStyleTransitionSEL])))
+
+/* PDWordGetNthCharStyle */
+#define PDWordGetNthCharStyle (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetNthCharStyleSELPROTO)(gPDModelHFT[PDWordGetNthCharStyleSEL])))
+
+/* PDWordGetNumQuads */
+#define PDWordGetNumQuads (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetNumQuadsSELPROTO)(gPDModelHFT[PDWordGetNumQuadsSEL])))
+
+/* PDWordGetNthQuad */
+#define PDWordGetNthQuad (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordGetNthQuadSELPROTO)(gPDModelHFT[PDWordGetNthQuadSEL])))
+
+/* PDWordIsRotated */
+#define PDWordIsRotated (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordIsRotatedSELPROTO)(gPDModelHFT[PDWordIsRotatedSEL])))
+
+/* PDWordFilterString */
+#define PDWordFilterString (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFilterStringSELPROTO)(gPDModelHFT[PDWordFilterStringSEL])))
+
+/* PDWordFilterWord */
+#define PDWordFilterWord (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDWordFilterWordSELPROTO)(gPDModelHFT[PDWordFilterWordSEL])))
+
+/* PDStyleGetFont */
+#define PDStyleGetFont (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDStyleGetFontSELPROTO)(gPDModelHFT[PDStyleGetFontSEL])))
+
+/* PDStyleGetFontSize */
+#define PDStyleGetFontSize (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDStyleGetFontSizeSELPROTO)(gPDModelHFT[PDStyleGetFontSizeSEL])))
+
+/* PDStyleGetColor */
+#define PDStyleGetColor (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDStyleGetColorSELPROTO)(gPDModelHFT[PDStyleGetColorSEL])))
+
+/* PDFileSpecNewFromASPath */
+#define PDFileSpecNewFromASPath (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFileSpecNewFromASPathSELPROTO)(gPDModelHFT[PDFileSpecNewFromASPathSEL])))
+
+/* PDFileSpecFromCosObj */
+#define PDFileSpecFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFileSpecFromCosObjSELPROTO)(gPDModelHFT[PDFileSpecFromCosObjSEL])))
+
+/* PDFileSpecGetFileSys */
+#define PDFileSpecGetFileSys (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFileSpecGetFileSysSELPROTO)(gPDModelHFT[ PDFileSpecGetFileSysSEL])))
+
+/* PDFileSpecAcquireASPath */
+#define PDFileSpecAcquireASPath (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFileSpecAcquireASPathSELPROTO)(gPDModelHFT[PDFileSpecAcquireASPathSEL])))
+
+/* PDFileSpecGetCosObj */
+#define PDFileSpecGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFileSpecGetCosObjSELPROTO)(gPDModelHFT[PDFileSpecGetCosObjSEL])))
+
+/* PDFileSpecIsValid */
+#define PDFileSpecIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFileSpecIsValidSELPROTO)(gPDModelHFT[PDFileSpecIsValidSEL])))
+
+/* PDRegisterFileSpecHandler */
+#define PDRegisterFileSpecHandler (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDRegisterFileSpecHandlerSELPROTO)(gPDModelHFT[PDRegisterFileSpecHandlerSEL])))
+
+/* PDFileSpecGetDIPath */
+#define PDFileSpecGetDIPath (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDFileSpecGetDIPathSELPROTO)(gPDModelHFT[PDFileSpecGetDIPathSEL])))
+
+/* PDPrefSetColorCal */
+#define PDPrefSetColorCal (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPrefSetColorCalSELPROTO)(gPDModelHFT[PDPrefSetColorCalSEL])))
+
+/* PDPrefGetColorCal */
+#define PDPrefGetColorCal (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2), *((PDPrefGetColorCalSELPROTO)(gPDModelHFT[PDPrefGetColorCalSEL])))
+
+/* If you need to use PDPageNotifyContentsDidChangeEx or PDDocClearFlags
+** from within your plug-in, you will need to bump up the value of
+** PI_PDModelHFT_VERSION in PIRequir.h to 0x00020001.
+*/
+
+/* PDPageNotifyContentsDidChangeEx */
+#define PDPageNotifyContentsDidChangeEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_1), *((PDPageNotifyContentsDidChangeExSELPROTO)(gPDModelHFT[PDPageNotifyContentsDidChangeExSEL])))
+
+/* PDDocClearFlags */
+#define PDDocClearFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_1), *((PDDocClearFlagsSELPROTO)(gPDModelHFT[PDDocClearFlagsSEL ])))
+
+/* PDDrawCosObjToWindow */
+#define PDDrawCosObjToWindow (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_1), *((PDDrawCosObjToWindowSELPROTO)(gPDModelHFT[ PDDrawCosObjToWindowSEL])))
+
+
+/* If you need to use PDDocOpenFromASFile
+** from within your plug-in, you will need to bump up the value of
+** PI_PDModelHFT_VERSION in PIRequir.h to 0x00020002.
+*/
+
+/* PDDocOpenFromASFile */
+#define PDDocOpenFromASFile (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocOpenFromASFileSELPROTO)(gPDModelHFT[PDDocOpenFromASFileSEL])))
+
+/* PDFileSpecGetDoc */
+#define PDFileSpecGetDoc (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDFileSpecGetDocSELPROTO)(gPDModelHFT[PDFileSpecGetDocSEL])))
+
+/* PDFileSpecGetFileSysName */
+#define PDFileSpecGetFileSysName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDFileSpecGetFileSysNameSELPROTO)(gPDModelHFT[PDFileSpecGetFileSysNameSEL])))
+
+/* PDRegisterFileSpecHandlerByName */
+#define PDRegisterFileSpecHandlerByName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDRegisterFileSpecHandlerByNameSELPROTO)(gPDModelHFT[PDRegisterFileSpecHandlerByNameSEL])))
+
+/* PDPageStmGetToken */
+#define PDPageStmGetToken (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDPageStmGetTokenSELPROTO)(gPDModelHFT[PDPageStmGetTokenSEL])))
+
+/* PDPageStmGetInlineImage */
+#define PDPageStmGetInlineImage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDPageStmGetInlineImageSELPROTO)(gPDModelHFT[PDPageStmGetInlineImageSEL])))
+
+/* PDViewDestResolve */
+#define PDViewDestResolve (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDViewDestResolveSELPROTO)(gPDModelHFT[PDViewDestResolveSEL])))
+
+
+/* Document level transition routines */
+#define PDTransIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransIsValidSELPROTO)(gPDModelHFT[PDTransIsValidSEL])))
+
+#define PDTransNull (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransNullSELPROTO)(gPDModelHFT[PDTransNullSEL])))
+
+#define PDTransFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransFromCosObjSELPROTO)(gPDModelHFT[PDTransFromCosObjSEL])))
+
+#define PDTransGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransGetCosObjSELPROTO)(gPDModelHFT[PDTransGetCosObjSEL])))
+
+#define PDTransEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransEqualSELPROTO)(gPDModelHFT[PDTransEqualSEL])))
+
+
+/* Page level transition set/get routines. */
+#define PDPageHasTransition (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDPageHasTransitionSELPROTO)(gPDModelHFT[PDPageHasTransitionSEL])))
+
+#define PDPageGetTransition (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDPageGetTransitionSELPROTO)(gPDModelHFT[PDPageGetTransitionSEL])))
+
+#define PDPageSetTransition (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDPageSetTransitionSELPROTO)(gPDModelHFT[PDPageSetTransitionSEL])))
+
+#define PDPageGetDuration (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDPageGetDurationSELPROTO)(gPDModelHFT[PDPageGetDurationSEL])))
+
+#define PDPageSetDuration (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDPageSetDurationSELPROTO)(gPDModelHFT[PDPageSetDurationSEL])))
+
+/* Creation, set/get methods. */
+#define PDTransNewFromCosDoc (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransNewFromCosDocSELPROTO)(gPDModelHFT[PDTransNewFromCosDocSEL])))
+
+#define PDTransNew (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransNewSELPROTO)(gPDModelHFT[PDTransNewSEL])))
+
+#define PDTransGetSubtype (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransGetSubtypeSELPROTO)(gPDModelHFT[PDTransGetSubtypeSEL])))
+
+#define PDTransGetDuration (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDTransGetDurationSELPROTO)(gPDModelHFT[PDTransGetDurationSEL])))
+
+
+/* PDDocReadAhead */
+#define PDDocReadAhead (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocReadAheadSELPROTO)(gPDModelHFT[PDDocReadAheadSEL])))
+
+#define PDDocOpenEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocOpenExSELPROTO)(gPDModelHFT[PDDocOpenExSEL])))
+
+#define PDDocOpenFromASFileEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocOpenFromASFileExSELPROTO)(gPDModelHFT[PDDocOpenFromASFileExSEL])))
+
+
+/* PDRegisterCryptHandlerEx */
+#define PDRegisterCryptHandlerEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDRegisterCryptHandlerExSELPROTO)(gPDModelHFT[PDRegisterCryptHandlerExSEL])))
+
+/* PDDocGetCryptHandlerClientData */
+#define PDDocGetCryptHandlerClientData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocGetCryptHandlerClientDataSELPROTO)(gPDModelHFT[PDDocGetCryptHandlerClientDataSEL])))
+
+
+
+#define PDDocGetFullScreen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocGetFullScreenSELPROTO)(gPDModelHFT[PDDocGetFullScreenSEL])))
+
+
+
+#define PDDocSetFullScreen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocSetFullScreenSELPROTO)(gPDModelHFT[PDDocSetFullScreenSEL])))
+
+/* PDDocSaveWithParams */
+#define PDDocSaveWithParams (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDDocSaveWithParamsSELPROTO)(gPDModelHFT[PDDocSaveWithParamsSEL])))
+
+/* PDNameTreeLookup */
+#define PDNameTreeLookup (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_2), *((PDNameTreeLookupSELPROTO)(gPDModelHFT[PDNameTreeLookupSEL])))
+
+
+/* PDFontGetDescendant */
+#define PDFontGetDescendant (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDFontGetDescendantSELPROTO)(gPDModelHFT[PDFontGetDescendantSEL])))
+
+/* PDFontGetEncodingName */
+#define PDFontGetEncodingName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDFontGetEncodingNameSELPROTO)(gPDModelHFT[PDFontGetEncodingNameSEL])))
+
+/* PDFontGetCIDSystemInfo */
+#define PDFontGetCIDSystemInfo (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDFontGetCIDSystemInfoSELPROTO)(gPDModelHFT[PDFontGetCIDSystemInfoSEL])))
+
+/* PDFontGetCIDSystemSupplement */
+#define PDFontGetCIDSystemSupplement (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDFontGetCIDSystemSupplementSELPROTO)(gPDModelHFT[PDFontGetCIDSystemSupplementSEL])))
+
+/* PDXlateToHostEx */
+#define PDXlateToHostEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDXlateToHostExSELPROTO)(gPDModelHFT[PDXlateToHostExSEL])))
+
+/* PDXlateToPDFDocEncEx */
+#define PDXlateToPDFDocEncEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDXlateToPDFDocEncExSELPROTO)(gPDModelHFT[PDXlateToPDFDocEncExSEL])))
+
+/* PDHostMBLen */
+#define PDHostMBLen (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDHostMBLenSELPROTO)(gPDModelHFT[PDHostMBLenSEL])))
+
+/* PDGetHostEncoding */
+#define PDGetHostEncoding (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDGetHostEncodingSELPROTO)(gPDModelHFT[PDGetHostEncodingSEL])))
+
+/** PDDocCreateWordFinderUCS
+ @ref GlyphNames
+*/
+#define PDDocCreateWordFinderUCS (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDDocCreateWordFinderUCSSELPROTO)(gPDModelHFT[PDDocCreateWordFinderUCSSEL])))
+
+/* PDFontXlateToHost */
+#define PDFontXlateToHost (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDFontXlateToHostSELPROTO)(gPDModelHFT[PDFontXlateToHostSEL])))
+
+/* PDFontXlateToUCS */
+#define PDFontXlateToUCS (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_2_3), *((PDFontXlateToUCSSELPROTO)(gPDModelHFT[PDFontXlateToUCSSEL])))
+
+
+
+/* Acrobat 4.0 Additions */
+
+/* PDDocFromCosDoc */
+#define PDDocFromCosDoc (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocFromCosDocSELPROTO)(gPDModelHFT[PDDocFromCosDocSEL])))
+
+/* PDDocEnumResources */
+#define PDDocEnumResources (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocEnumResourcesSELPROTO)(gPDModelHFT[PDDocEnumResourcesSEL])))
+
+#define PDDocImportCosDocNotes (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocImportCosDocNotesSELPROTO)(gPDModelHFT[PDDocImportCosDocNotesSEL])))
+
+#define PDDocExportNotes (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocExportNotesSELPROTO)(gPDModelHFT[PDDocExportNotesSEL])))
+
+#define PDPageGetAnnotSequence (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageGetAnnotSequenceSELPROTO)(gPDModelHFT[PDPageGetAnnotSequenceSEL])))
+
+#define PDRegisterAnnotHandler (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDRegisterAnnotHandlerSELPROTO)(gPDModelHFT[PDRegisterAnnotHandlerSEL])))
+
+#define PDGetAnnotHandlerByName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDGetAnnotHandlerByNameSELPROTO)(gPDModelHFT[PDGetAnnotHandlerByNameSEL])))
+
+/* PDNameTree related calls */
+#define PDNameTreeNew (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeNewSELPROTO)(gPDModelHFT[PDNameTreeNewSEL])))
+
+#define PDNameTreeFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeFromCosObjSELPROTO)(gPDModelHFT[PDNameTreeFromCosObjSEL])))
+
+#define PDNameTreeGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeGetCosObjSELPROTO)(gPDModelHFT[PDNameTreeGetCosObjSEL])))
+
+#define PDNameTreeIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeIsValidSELPROTO)(gPDModelHFT[PDNameTreeIsValidSEL])))
+
+#define PDNameTreeEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeEqualSELPROTO)(gPDModelHFT[PDNameTreeEqualSEL])))
+
+#define PDNameTreePut (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreePutSELPROTO)(gPDModelHFT[PDNameTreePutSEL])))
+
+#define PDNameTreeGet (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeGetSELPROTO)(gPDModelHFT[PDNameTreeGetSEL])))
+
+#define PDNameTreeRemove (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeRemoveSELPROTO)(gPDModelHFT[PDNameTreeRemoveSEL])))
+
+#define PDNameTreeEnum (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNameTreeEnumSELPROTO)(gPDModelHFT[PDNameTreeEnumSEL])))
+
+#define PDDocGetNameTree (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocGetNameTreeSELPROTO)(gPDModelHFT[PDDocGetNameTreeSEL])))
+
+#define PDDocCreateNameTree (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocCreateNameTreeSELPROTO)(gPDModelHFT[PDDocCreateNameTreeSEL])))
+
+#define PDDocRemoveNameTree (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocRemoveNameTreeSELPROTO)(gPDModelHFT[PDDocRemoveNameTreeSEL])))
+
+
+/* PDPageLabel related calls */
+#define PDPageLabelIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelIsValidSELPROTO)(gPDModelHFT[PDPageLabelIsValidSEL])))
+
+#define PDPageLabelEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelEqualSELPROTO)(gPDModelHFT[PDPageLabelEqualSEL])))
+
+#define PDPageLabelGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelGetCosObjSELPROTO)(gPDModelHFT[PDPageLabelGetCosObjSEL])))
+
+#define PDPageLabelFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelFromCosObjSELPROTO)(gPDModelHFT[PDPageLabelFromCosObjSEL])))
+
+#define PDPageLabelGetStyle (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelGetStyleSELPROTO)(gPDModelHFT[PDPageLabelGetStyleSEL])))
+
+#define PDPageLabelGetPrefix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelGetPrefixSELPROTO)(gPDModelHFT[PDPageLabelGetPrefixSEL])))
+
+#define PDPageLabelGetStart (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelGetStartSELPROTO)(gPDModelHFT[PDPageLabelGetStartSEL])))
+
+#define PDDocGetPageLabel (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocGetPageLabelSELPROTO)(gPDModelHFT[PDDocGetPageLabelSEL])))
+
+#define PDPageLabelNew (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDPageLabelNewSELPROTO)(gPDModelHFT[PDPageLabelNewSEL])))
+
+#define PDDocSetPageLabel (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocSetPageLabelSELPROTO)(gPDModelHFT[PDDocSetPageLabelSEL])))
+
+#define PDDocRemovePageLabel (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocRemovePageLabelSELPROTO)(gPDModelHFT[PDDocRemovePageLabelSEL])))
+
+#define PDDocOpenWithParams (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocOpenWithParamsSELPROTO)(gPDModelHFT[PDDocOpenWithParamsSEL])))
+
+#define PDDocReadAheadPages (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocReadAheadPagesSELPROTO)(gPDModelHFT[PDDocReadAheadPagesSEL])))
+
+#define PDDocGetLabelForPageNum (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocGetLabelForPageNumSELPROTO)(gPDModelHFT[PDDocGetLabelForPageNumSEL])))
+#define PDDocFindPageNumForLabel (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocFindPageNumForLabelSELPROTO)(gPDModelHFT[PDDocFindPageNumForLabelSEL])))
+
+#define PDDocImportNotes (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDDocImportNotesSELPROTO)(gPDModelHFT[PDDocImportNotesSEL])))
+
+#define PDImageSelectAlternate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDImageSelectAlternateSELPROTO)(gPDModelHFT[PDImageSelectAlternateSEL])))
+#define PDImageSelGetGeoAttr (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDImageSelGetGeoAttrSELPROTO)(gPDModelHFT[PDImageSelGetGeoAttrSEL])))
+#define PDImageSelGetDeviceAttr (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDImageSelGetDeviceAttrSELPROTO)(gPDModelHFT[PDImageSelGetDeviceAttrSEL])))
+#define PDImageSelAdjustMatrix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDImageSelAdjustMatrixSELPROTO)(gPDModelHFT[PDImageSelAdjustMatrixSEL])))
+#define PDApplyFunction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDApplyFunctionSELPROTO)(gPDModelHFT[PDApplyFunctionSEL])))
+
+#define PDNumTreeNew (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeNewSELPROTO)(gPDModelHFT[PDNumTreeNewSEL])))
+#define PDNumTreeFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeFromCosObjSELPROTO)(gPDModelHFT[PDNumTreeFromCosObjSEL])))
+#define PDNumTreeGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeGetCosObjSELPROTO)(gPDModelHFT[PDNumTreeGetCosObjSEL])))
+#define PDNumTreeIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeIsValidSELPROTO)(gPDModelHFT[PDNumTreeIsValidSEL])))
+#define PDNumTreeEqual (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeEqualSELPROTO)(gPDModelHFT[PDNumTreeEqualSEL])))
+#define PDNumTreePut (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreePutSELPROTO)(gPDModelHFT[PDNumTreePutSEL])))
+#define PDNumTreeGet (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeGetSELPROTO)(gPDModelHFT[PDNumTreeGetSEL])))
+#define PDNumTreeRemove (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeRemoveSELPROTO)(gPDModelHFT[PDNumTreeRemoveSEL])))
+#define PDNumTreeEnum (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDNumTreeEnumSELPROTO)(gPDModelHFT[PDNumTreeEnumSEL])))
+
+#define PDFontFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4), *((PDFontFromCosObjSELPROTO)(gPDModelHFT[PDFontFromCosObjSEL])))
+
+
+#define PDDocCopyToFile (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_4_5), *((PDDocCopyToFileSELPROTO)(gPDModelHFT[PDDocCopyToFileSEL])))
+
+
+#define PDDocPermRequest (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDDocPermRequestSELPROTO)(gPDModelHFT[PDDocPermRequestSEL])))
+
+/* Support for Bleed, Trim, Art boxes */
+#define PDPageSetBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDPageSetBoxSELPROTO)(gPDModelHFT[PDPageSetBoxSEL])))
+#define PDPageGetBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDPageGetBoxSELPROTO)(gPDModelHFT[PDPageGetBoxSEL])))
+
+#define PDLinkAnnotRemoveAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDLinkAnnotRemoveActionSELPROTO)(gPDModelHFT[PDLinkAnnotRemoveActionSEL])))
+#define PDBookmarkRemoveAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDBookmarkRemoveActionSELPROTO)(gPDModelHFT[PDBookmarkRemoveActionSEL])))
+#define PDDocRemoveOpenAction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDDocRemoveOpenActionSELPROTO)(gPDModelHFT[PDDocRemoveOpenActionSEL])))
+#define PDNameTreeNotifyNameAdded (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDNameTreeNotifyNameAddedSELPROTO)(gPDModelHFT[PDNameTreeNotifyNameAddedSEL])))
+#define PDNameTreeNotifyNameRemoved (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDNameTreeNotifyNameRemovedSELPROTO)(gPDModelHFT[PDNameTreeNotifyNameRemovedSEL])))
+
+/* PDDocGetPageObjByNum */
+#define PDDocGetPageObjByNum (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDDocGetPageObjByNumSELPROTO)(gPDModelHFT[PDDocGetPageObjByNumSEL])))
+/** @ingroup Enumerators */
+#define PDTextSelectEnumTextUCS (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDTextSelectEnumTextUCSSELPROTO)(gPDModelHFT[PDTextSelectEnumTextUCSSEL])))
+
+/* PDPageDrawContentsToWindowEx */
+#define PDPageDrawContentsToWindowEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDPageDrawContentsToWindowExSELPROTO)(gPDModelHFT[PDPageDrawContentsToWindowExSEL])))
+
+#define PDBookmarkGetColor (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDBookmarkGetColorSELPROTO)(gPDModelHFT[PDBookmarkGetColorSEL])))
+#define PDBookmarkSetColor (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDBookmarkSetColorSELPROTO)(gPDModelHFT[PDBookmarkSetColorSEL])))
+#define PDBookmarkGetFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDBookmarkGetFlagsSELPROTO)(gPDModelHFT[PDBookmarkGetFlagsSEL])))
+#define PDBookmarkSetFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDBookmarkSetFlagsSELPROTO)(gPDModelHFT[PDBookmarkSetFlagsSEL])))
+
+#define PDDocExportSomeNotes (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDDocExportSomeNotesSELPROTO)(gPDModelHFT[PDDocExportSomeNotesSEL])))
+
+#define PDPageHasTransparency (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDPageHasTransparencySELPROTO)(gPDModelHFT[PDPageHasTransparencySEL])))
+
+#define PDTextSelectCreatePageHiliteEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDTextSelectCreatePageHiliteExSELPROTO)(gPDModelHFT[PDTextSelectCreatePageHiliteExSEL])))
+#define PDTextSelectCreateWordHiliteEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDTextSelectCreateWordHiliteExSELPROTO)(gPDModelHFT[PDTextSelectCreateWordHiliteExSEL])))
+#define PDTextSelectCreateRangesEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDTextSelectCreateRangesExSELPROTO)(gPDModelHFT[PDTextSelectCreateRangesExSEL])))
+#define PDPageGetPalette (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_5), *((PDPageGetPaletteSELPROTO)(gPDModelHFT[PDPageGetPaletteSEL])))
+
+/* Additional Wordy APIs for Acrobat 6.0 */
+#define PDDocCreateWordFinderEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocCreateWordFinderExSELPROTO)(gPDModelHFT[PDDocCreateWordFinderExSEL])))
+#define PDWordGetCharOffsetEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordGetCharOffsetExSELPROTO)(gPDModelHFT[PDWordGetCharOffsetExSEL])))
+#define PDWordGetCharQuad (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordGetCharQuadSELPROTO)(gPDModelHFT[PDWordGetCharQuadSEL])))
+#define PDWordGetNumHiliteChar (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordGetNumHiliteCharSELPROTO)(gPDModelHFT[PDWordGetNumHiliteCharSEL])))
+#define PDWordGetByteIdxFromHiliteChar (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordGetByteIdxFromHiliteCharSELPROTO)(gPDModelHFT[PDWordGetByteIdxFromHiliteCharSEL])))
+#define PDWordGetASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordGetASTextSELPROTO)(gPDModelHFT[PDWordGetASTextSEL])))
+#define PDWordGetCharEncFlags (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordGetCharEncFlagsSELPROTO)(gPDModelHFT[PDWordGetCharEncFlagsSEL])))
+#define PDWordGetAttrEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordGetAttrExSELPROTO)(gPDModelHFT[PDWordGetAttrExSEL])))
+#define PDWordCreateTextSelect (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordCreateTextSelectSELPROTO)(gPDModelHFT[PDWordCreateTextSelectSEL])))
+/** @ingroup Enumerators */
+#define PDWordFinderEnumWordsStr (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordFinderEnumWordsStrSELPROTO)(gPDModelHFT[PDWordFinderEnumWordsStrSEL])))
+
+/* Separations preview for Acrobat 6.0 */
+#define PDPageEnumInks (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDPageEnumInksSELPROTO)(gPDModelHFT[PDPageEnumInksSEL])))
+#define PDPageMakeSeparations (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDPageMakeSeparationsSELPROTO)(gPDModelHFT[PDPageMakeSeparationsSEL])))
+
+/* Routines for copying and pasting PDActions */
+#define PDRegisterActionHandler (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDRegisterActionHandlerSELPROTO)(gPDModelHFT[PDRegisterActionHandlerSEL])))
+#define PDActionCanCopy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDActionCanCopySELPROTO)(gPDModelHFT[PDActionCanCopySEL])))
+#define PDActionCopy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDActionCopySELPROTO)(gPDModelHFT[PDActionCopySEL])))
+#define PDActionCanPaste (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDActionCanPasteSELPROTO)(gPDModelHFT[PDActionCanPasteSEL])))
+#define PDActionPaste (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDActionPasteSELPROTO)(gPDModelHFT[PDActionPasteSEL])))
+#define PDActionDestroyClipboardData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDActionDestroyClipboardDataSELPROTO)(gPDModelHFT[PDActionDestroyClipboardDataSEL])))
+
+/* Routines for copying and pasting PDAnnots */
+#define PDAnnotCanCopy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDAnnotCanCopySELPROTO)(gPDModelHFT[PDAnnotCanCopySEL])))
+#define PDAnnotCopy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDAnnotCopySELPROTO)(gPDModelHFT[PDAnnotCopySEL])))
+#define PDAnnotCanPaste (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDAnnotCanPasteSELPROTO)(gPDModelHFT[PDAnnotCanPasteSEL])))
+#define PDAnnotPaste (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDAnnotPasteSELPROTO)(gPDModelHFT[PDAnnotPasteSEL])))
+#define PDAnnotDestroyClipboardData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDAnnotDestroyClipboardDataSELPROTO)(gPDModelHFT[PDAnnotDestroyClipboardDataSEL])))
+
+/* BEGIN Optional Content API calls */
+#define PDOCGCreate (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGCreateSELPROTO)(gPDModelHFT[PDOCGCreateSEL])))
+#define PDOCGCreateFromCosObj (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGCreateFromCosObjSELPROTO)(gPDModelHFT[PDOCGCreateFromCosObjSEL])))
+#define PDOCGDestroy (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGDestroySELPROTO)(gPDModelHFT[PDOCGDestroySEL])))
+#define PDOCGGetCosObj (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetCosObjSELPROTO)(gPDModelHFT[PDOCGGetCosObjSEL])))
+#define PDOCGGetFromCosObj (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetFromCosObjSELPROTO)(gPDModelHFT[PDOCGGetFromCosObjSEL])))
+#define PDOCGGetPDDoc (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetPDDocSELPROTO)(gPDModelHFT[PDOCGGetPDDocSEL])))
+#define PDOCGSetName (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGSetNameSELPROTO)(gPDModelHFT[PDOCGSetNameSEL])))
+#define PDOCGGetName (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetNameSELPROTO)(gPDModelHFT[PDOCGGetNameSEL])))
+#define PDOCGSetInitialState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGSetInitialStateSELPROTO)(gPDModelHFT[PDOCGSetInitialStateSEL])))
+#define PDOCGGetInitialState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetInitialStateSELPROTO)(gPDModelHFT[PDOCGGetInitialStateSEL])))
+#define PDOCGRemoveInitialState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGRemoveInitialStateSELPROTO)(gPDModelHFT[PDOCGRemoveInitialStateSEL])))
+#define PDOCGSetUsageDictEntry (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGSetUsageDictEntrySELPROTO)(gPDModelHFT[PDOCGSetUsageDictEntrySEL])))
+#define PDOCGHasUsageInfo (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGHasUsageInfoSELPROTO)(gPDModelHFT[PDOCGHasUsageInfoSEL])))
+#define PDOCGGetUsageEntry (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetUsageEntrySELPROTO)(gPDModelHFT[PDOCGGetUsageEntrySEL])))
+#define PDOCGSetIntent (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGSetIntentSELPROTO)(gPDModelHFT[PDOCGSetIntentSEL])))
+#define PDOCGGetIntent (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetIntentSELPROTO)(gPDModelHFT[PDOCGGetIntentSEL])))
+#define PDOCGGetCurrentState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetCurrentStateSELPROTO)(gPDModelHFT[PDOCGGetCurrentStateSEL])))
+#define PDOCGSetCurrentState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGSetCurrentStateSELPROTO)(gPDModelHFT[PDOCGSetCurrentStateSEL])))
+#define PDOCGUsedInOCContext (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGUsedInOCContextSELPROTO)(gPDModelHFT[PDOCGUsedInOCContextSEL])))
+#define PDOCGUsedInOCConfig (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGUsedInOCConfigSELPROTO)(gPDModelHFT[PDOCGUsedInOCConfigSEL])))
+#define PDOCContextApplyAutoStateChanges (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextApplyAutoStateChangesSELPROTO)(gPDModelHFT[PDOCContextApplyAutoStateChangesSEL])))
+#define PDPageEnumOCGs (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDPageEnumOCGsSELPROTO)(gPDModelHFT[PDPageEnumOCGsSEL])))
+#define PDDocEnumOCGs (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocEnumOCGsSELPROTO)(gPDModelHFT[PDDocEnumOCGsSEL])))
+#define PDPageGetOCGs (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDPageGetOCGsSELPROTO)(gPDModelHFT[PDPageGetOCGsSEL])))
+#define PDOCMDCreate (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDCreateSELPROTO)(gPDModelHFT[PDOCMDCreateSEL])))
+#define PDOCMDFindOrCreate (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDFindOrCreateSELPROTO)(gPDModelHFT[PDOCMDFindOrCreateSEL])))
+#define PDOCMDGetCosObj (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDGetCosObjSELPROTO)(gPDModelHFT[PDOCMDGetCosObjSEL])))
+#define PDOCMDGetPDDoc (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDGetPDDocSELPROTO)(gPDModelHFT[PDOCMDGetPDDocSEL])))
+#define PDOCMDGetFromCosObj (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDGetFromCosObjSELPROTO)(gPDModelHFT[PDOCMDGetFromCosObjSEL])))
+#define PDOCMDGetOCGs (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDGetOCGsSELPROTO)(gPDModelHFT[PDOCMDGetOCGsSEL])))
+#define PDOCMDGetVisPolicy (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDGetVisPolicySELPROTO)(gPDModelHFT[PDOCMDGetVisPolicySEL])))
+#define PDAnnotSetOCMD (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDAnnotSetOCMDSELPROTO)(gPDModelHFT[PDAnnotSetOCMDSEL])))
+#define PDAnnotGetOCMD (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDAnnotGetOCMDSELPROTO)(gPDModelHFT[PDAnnotGetOCMDSEL])))
+#define PDAnnotRemoveOCMD (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDAnnotRemoveOCMDSELPROTO)(gPDModelHFT[PDAnnotRemoveOCMDSEL])))
+#define PDOCMDIsCurrentlyVisible (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDIsCurrentlyVisibleSELPROTO)(gPDModelHFT[PDOCMDIsCurrentlyVisibleSEL])))
+#define PDOCMDsAreCurrentlyVisible (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDsAreCurrentlyVisibleSELPROTO)(gPDModelHFT[PDOCMDsAreCurrentlyVisibleSEL])))
+#define PDAnnotIsCurrentlyVisible (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDAnnotIsCurrentlyVisibleSELPROTO)(gPDModelHFT[PDAnnotIsCurrentlyVisibleSEL])))
+#define PDOCMDsMakeContentVisible (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCMDsMakeContentVisibleSELPROTO)(gPDModelHFT[PDOCMDsMakeContentVisibleSEL])))
+#define PDOCContextNew (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextNewSELPROTO)(gPDModelHFT[PDOCContextNewSEL])))
+#define PDOCContextFree (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextFreeSELPROTO)(gPDModelHFT[PDOCContextFreeSEL])))
+#define PDDocGetOCContext (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocGetOCContextSELPROTO)(gPDModelHFT[PDDocGetOCContextSEL])))
+#define PDOCContextGetPDDoc (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextGetPDDocSELPROTO)(gPDModelHFT[PDOCContextGetPDDocSEL])))
+#define PDOCContextInit (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextInitSELPROTO)(gPDModelHFT[PDOCContextInitSEL])))
+#define PDOCContextMakeCopy (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextMakeCopySELPROTO)(gPDModelHFT[PDOCContextMakeCopySEL])))
+#define PDOCContextNewWithOCDisabled (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextNewWithOCDisabledSELPROTO)(gPDModelHFT[PDOCContextNewWithOCDisabledSEL])))
+#define PDOCContextNewWithInitialState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextNewWithInitialStateSELPROTO)(gPDModelHFT[PDOCContextNewWithInitialStateSEL])))
+#define PDOCContextGetOCGStates (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextGetOCGStatesSELPROTO)(gPDModelHFT[PDOCContextGetOCGStatesSEL])))
+#define PDOCContextSetOCGStates (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextSetOCGStatesSELPROTO)(gPDModelHFT[PDOCContextSetOCGStatesSEL])))
+#define PDOCContextMakeCopyWithAutoStateChanges (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextMakeCopyWithAutoStateChangesSELPROTO)(gPDModelHFT[PDOCContextMakeCopyWithAutoStateChangesSEL])))
+#define PDOCContextFindAutoStateChanges (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextFindAutoStateChangesSELPROTO)(gPDModelHFT[PDOCContextFindAutoStateChangesSEL])))
+#define PDOCContextSetOCDrawEnumType (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextSetOCDrawEnumTypeSELPROTO)(gPDModelHFT[PDOCContextSetOCDrawEnumTypeSEL])))
+#define PDOCContextGetOCDrawEnumType (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextGetOCDrawEnumTypeSELPROTO)(gPDModelHFT[PDOCContextGetOCDrawEnumTypeSEL])))
+#define PDOCContextSetIntent (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextSetIntentSELPROTO)(gPDModelHFT[PDOCContextSetIntentSEL])))
+#define PDOCContextGetIntent (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextGetIntentSELPROTO)(gPDModelHFT[PDOCContextGetIntentSEL])))
+#define PDOCContextSetNonOCDrawing (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextSetNonOCDrawingSELPROTO)(gPDModelHFT[PDOCContextSetNonOCDrawingSEL])))
+#define PDOCContextGetNonOCDrawing (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextGetNonOCDrawingSELPROTO)(gPDModelHFT[PDOCContextGetNonOCDrawingSEL])))
+#define PDOCContextResetOCMDStack (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextResetOCMDStackSELPROTO)(gPDModelHFT[PDOCContextResetOCMDStackSEL])))
+#define PDOCContextPushOCMD (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextPushOCMDSELPROTO)(gPDModelHFT[PDOCContextPushOCMDSEL])))
+#define PDOCContextPopOCMD (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextPopOCMDSELPROTO)(gPDModelHFT[PDOCContextPopOCMDSEL])))
+#define PDOCContextContentIsVisible (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextContentIsVisibleSELPROTO)(gPDModelHFT[PDOCContextContentIsVisibleSEL])))
+#define PDOCContextXObjectIsVisible (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextXObjectIsVisibleSELPROTO)(gPDModelHFT[PDOCContextXObjectIsVisibleSEL])))
+#define PDOCConfigCreate (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigCreateSELPROTO)(gPDModelHFT[PDOCConfigCreateSEL])))
+#define PDOCConfigDestroy (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigDestroySELPROTO)(gPDModelHFT[PDOCConfigDestroySEL])))
+#define PDDocGetOCConfig (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocGetOCConfigSELPROTO)(gPDModelHFT[PDDocGetOCConfigSEL])))
+#define PDOCConfigGetPDDoc (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetPDDocSELPROTO)(gPDModelHFT[PDOCConfigGetPDDocSEL])))
+#define PDOCConfigGetCosObj (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetCosObjSELPROTO)(gPDModelHFT[PDOCConfigGetCosObjSEL])))
+#define PDOCConfigSetOCGOrder (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigSetOCGOrderSELPROTO)(gPDModelHFT[PDOCConfigSetOCGOrderSEL])))
+#define PDOCConfigGetOCGOrder (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetOCGOrderSELPROTO)(gPDModelHFT[PDOCConfigGetOCGOrderSEL])))
+#define PDOCConfigMakeRadioButtonGroup (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigMakeRadioButtonGroupSELPROTO)(gPDModelHFT[PDOCConfigMakeRadioButtonGroupSEL])))
+#define PDOCConfigGetRadioButtonGroupForOCG (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetRadioButtonGroupForOCGSELPROTO)(gPDModelHFT[PDOCConfigGetRadioButtonGroupForOCGSEL])))
+#define PDOCConfigGetAllRadioButtonGroups (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetAllRadioButtonGroupsSELPROTO)(gPDModelHFT[PDOCConfigGetAllRadioButtonGroupsSEL])))
+#define PDOCConfigSetInitState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigSetInitStateSELPROTO)(gPDModelHFT[PDOCConfigSetInitStateSEL])))
+#define PDOCConfigGetInitState (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetInitStateSELPROTO)(gPDModelHFT[PDOCConfigGetInitStateSEL])))
+#define PDOCConfigSetName (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigSetNameSELPROTO)(gPDModelHFT[PDOCConfigSetNameSEL])))
+#define PDOCConfigGetName (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetNameSELPROTO)(gPDModelHFT[PDOCConfigGetNameSEL])))
+#define PDOCConfigSetCreator (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigSetCreatorSELPROTO)(gPDModelHFT[PDOCConfigSetCreatorSEL])))
+#define PDOCConfigGetCreator (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetCreatorSELPROTO)(gPDModelHFT[PDOCConfigGetCreatorSEL])))
+#define PDOCConfigSetIntent (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigSetIntentSELPROTO)(gPDModelHFT[PDOCConfigSetIntentSEL])))
+#define PDOCConfigGetIntent (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCConfigGetIntentSELPROTO)(gPDModelHFT[PDOCConfigGetIntentSEL])))
+#define PDDocEnumOCConfigs (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocEnumOCConfigsSELPROTO)(gPDModelHFT[PDDocEnumOCConfigsSEL])))
+#define PDDocHasOC (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocHasOCSELPROTO)(gPDModelHFT[PDDocHasOCSEL])))
+#define PDDocGetNumOCGs (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocGetNumOCGsSELPROTO)(gPDModelHFT[PDDocGetNumOCGsSEL])))
+#define PDDocGetOCGs (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocGetOCGsSELPROTO)(gPDModelHFT[PDDocGetOCGsSEL])))
+#define PDDocReplaceOCG (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocReplaceOCGSELPROTO)(gPDModelHFT[PDDocReplaceOCGSEL])))
+#define PDOCGSetUserOverride (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGSetUserOverrideSELPROTO)(gPDModelHFT[PDOCGSetUserOverrideSEL])))
+#define PDOCGGetUserOverride (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCGGetUserOverrideSELPROTO)(gPDModelHFT[PDOCGGetUserOverrideSEL])))
+#define PDOCContextClearAllUserOverrides (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDOCContextClearAllUserOverridesSELPROTO)(gPDModelHFT[PDOCContextClearAllUserOverridesSEL])))
+#define PDPageFlattenOC (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDPageFlattenOCSELPROTO)(gPDModelHFT[PDPageFlattenOCSEL])))
+#define PDDocFlattenOC (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocFlattenOCSELPROTO)(gPDModelHFT[PDDocFlattenOCSEL])))
+/* END Optional Content API calls */
+
+/* BEGIN Extensible PD Draw / Enum calls */
+#define PDPageDrawContentsWithParams (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDPageDrawContentsWithParamsSELPROTO)(gPDModelHFT[PDPageDrawContentsWithParamsSEL])))
+#define PDDrawCosObjWithParams (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDrawCosObjWithParamsSELPROTO)(gPDModelHFT[PDDrawCosObjWithParamsSEL])))
+#define PDFormEnumPaintProcWithParams (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDFormEnumPaintProcWithParamsSELPROTO)(gPDModelHFT[PDFormEnumPaintProcWithParamsSEL])))
+#define PDCharProcEnumWithParams (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDCharProcEnumWithParamsSELPROTO)(gPDModelHFT[PDCharProcEnumWithParamsSEL])))
+/* END Extensible PD Draw / Enum calls */
+
+#define PDWordFinderAcquireVisibleWordList (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordFinderAcquireVisibleWordListSELPROTO)(gPDModelHFT[PDWordFinderAcquireVisibleWordListSEL])))
+#define PDWordIsCurrentlyVisible (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordIsCurrentlyVisibleSELPROTO)(gPDModelHFT[PDWordIsCurrentlyVisibleSEL])))
+#define PDWordMakeVisible (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordMakeVisibleSELPROTO)(gPDModelHFT[PDWordMakeVisibleSEL])))
+#define PDWordFinderEnumVisibleWords (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDWordFinderEnumVisibleWordsSELPROTO)(gPDModelHFT[PDWordFinderEnumVisibleWordsSEL])))
+
+/* PDPageGetVisibleBBox */
+#define PDPageGetVisibleBBox (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDPageGetVisibleBBoxSELPROTO)(gPDModelHFT[PDPageGetVisibleBBoxSEL])))
+
+/* Crypt Filter support */
+#define PDDocSetNewCryptFilterMethod (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocSetNewCryptFilterMethodSELPROTO)(gPDModelHFT[PDDocSetNewCryptFilterMethodSEL])))
+#define PDDocSetNewCryptFilterData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocSetNewCryptFilterDataSELPROTO)(gPDModelHFT[PDDocSetNewCryptFilterDataSEL])))
+#define PDDocSetNewDefaultFilters (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocSetNewDefaultFiltersSELPROTO)(gPDModelHFT[PDDocSetNewDefaultFiltersSEL])))
+#define PDCryptAuthorizeFilterAccess (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDCryptAuthorizeFilterAccessSELPROTO)(gPDModelHFT[PDCryptAuthorizeFilterAccessSEL])))
+
+/* PDDocRequestPages and PDDocRequestEntireFile */
+#define PDDocRequestPages (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocRequestPagesSELPROTO)(gPDModelHFT[PDDocRequestPagesSEL])))
+#define PDDocRequestEntireFile (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocRequestEntireFileSELPROTO)(gPDModelHFT[PDDocRequestEntireFileSEL])))
+
+#define PDSetHostEncoding (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDSetHostEncodingSELPROTO)(gPDModelHFT[PDSetHostEncodingSEL])))
+
+/*PDDocReadAheadEmbeddedFile */
+#define PDDocReadAheadEmbeddedFile (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocReadAheadEmbeddedFileSELPROTO)(gPDModelHFT[PDDocReadAheadEmbeddedFileSEL])))
+
+/* PDDocGetTrapped and PDDocSetTrapped */
+#define PDDocGetTrapped (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocGetTrappedSELPROTO)(gPDModelHFT[PDDocGetTrappedSEL])))
+#define PDDocSetTrapped (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_6), *((PDDocSetTrappedSELPROTO)(gPDModelHFT[PDDocSetTrappedSEL])))
+
+/* PDDocGetLabelForPageNumEx and PDDocFindPageNumForLabelEx */
+#define PDDocGetLabelForPageNumEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocGetLabelForPageNumExSELPROTO)(gPDModelHFT[PDDocGetLabelForPageNumExSEL])))
+#define PDDocFindPageNumForLabelEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDDocFindPageNumForLabelExSELPROTO)(gPDModelHFT[PDDocFindPageNumForLabelExSEL])))
+
+/* PDFontGetASTextName */
+#define PDFontGetASTextName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_6), *((PDFontGetASTextNameSELPROTO)(gPDModelHFT[PDFontGetASTextNameSEL])))
+
+/* PDPageAcquirePage */
+#define PDPageAcquirePage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDPageAcquirePageSELPROTO)(gPDModelHFT[PDPageAcquirePageSEL])))
+
+/* PDOCGGetLocked, -SetLocked, PDOCConfigGetLockedArray, -SetLockedArray */
+#define PDOCGGetLocked (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDOCGGetLockedSELPROTO)(gPDModelHFT[PDOCGGetLockedSEL])))
+#define PDOCGSetLocked (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDOCGSetLockedSELPROTO)(gPDModelHFT[PDOCGSetLockedSEL])))
+#define PDOCConfigGetLockedArray (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDOCConfigGetLockedArraySELPROTO)(gPDModelHFT[PDOCConfigGetLockedArraySEL])))
+#define PDOCConfigSetLockedArray (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDOCConfigSetLockedArraySELPROTO)(gPDModelHFT[PDOCConfigSetLockedArraySEL])))
+
+/* PDOCMDFindOrCreateEx */
+#define PDOCMDFindOrCreateEx (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDOCMDFindOrCreateExSELPROTO)(gPDModelHFT[PDOCMDFindOrCreateExSEL])))
+#define PDOCMDGetVisibilityExpression (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDOCMDGetVisibilityExpressionSELPROTO)(gPDModelHFT[PDOCMDGetVisibilityExpressionSEL])))
+
+
+/* PDPageGetUserUnitSize */
+#define PDPageGetUserUnitSize (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDPageGetUserUnitSizeSELPROTO)(gPDModelHFT[PDPageGetUserUnitSizeSEL])))
+
+/* PDPageSetUserUnitSize */
+#define PDPageSetUserUnitSize (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDPageSetUserUnitSizeSELPROTO)(gPDModelHFT[PDPageSetUserUnitSizeSEL])))
+
+#define PDDocPermRequestNoUB (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDDocPermRequestNoUBSELPROTO)(gPDModelHFT[PDDocPermRequestNoUBSEL])))
+
+/* PDPageEnumInksEx */
+#define PDPageEnumInksEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDPageEnumInksExSELPROTO)(gPDModelHFT[PDPageEnumInksExSEL])))
+
+#define PDDocAddWatermarkFromPDPage (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDDocAddWatermarkFromPDPageSELPROTO)(gPDModelHFT[PDDocAddWatermarkFromPDPageSEL])))
+#define PDDocAddWatermarkFromText (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7), *((PDDocAddWatermarkFromTextSELPROTO)(gPDModelHFT[PDDocAddWatermarkFromTextSEL])))
+
+
+
+
+/* PDDocGetLayoutMode */
+#define PDDocGetLayoutMode (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDDocGetLayoutModeSELPROTO)(gPDModelHFT[PDDocGetLayoutModeSEL])))
+
+/* PDDocSetLayoutMode */
+#define PDDocSetLayoutMode (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDDocSetLayoutModeSELPROTO)(gPDModelHFT[PDDocSetLayoutModeSEL])))
+
+/* PDDocGetCryptHandler */
+#define PDDocGetCryptHandler (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_7), *((PDDocGetCryptHandlerSELPROTO)(gPDModelHFT[PDDocGetCryptHandlerSEL])))
+
+
+/* PDFileSpecNewFromASPathEx */
+#define PDFileSpecNewFromASPathEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDFileSpecNewFromASPathExSELPROTO)(gPDModelHFT[PDFileSpecNewFromASPathExSEL])))
+
+/* PDFileSpecAcquireASPathEx */
+#define PDFileSpecAcquireASPathEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDFileSpecAcquireASPathExSELPROTO)(gPDModelHFT[PDFileSpecAcquireASPathExSEL])))
+
+/* PDFileSpecGetDIPathEx */
+#define PDFileSpecGetDIPathEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDFileSpecGetDIPathExSELPROTO)(gPDModelHFT[PDFileSpecGetDIPathExSEL])))
+
+#if !defined (_H_PDFLPrivCalls)
+/* PDThumbGetImageData */
+#define PDThumbGetImageData (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7_5), \
+ (*((PDThumbGetImageDataSELPROTO)(gPDModelHFT[PDThumbGetImageDataSEL]))))
+
+ /* PDThumbGetIndexedColorSpace */
+ #define PDThumbGetIndexedColorSpace (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_7_5), \
+ (*((PDThumbGetIndexedColorSpaceSELPROTO)(gPDModelHFT[PDThumbGetIndexedColorSpaceSEL]))))
+ #endif
+
+/* Additional ASText APIs for Acrobat 8.0 */
+
+/* Bookmark APIs */
+/* PDBookmarkAddNewChild */
+#define PDBookmarkAddNewChildASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDBookmarkAddNewChildASTextSELPROTO)(gPDModelHFT[PDBookmarkAddNewChildASTextSEL])))
+/* PDBookmarkAddNewSiblingASText */
+#define PDBookmarkAddNewSiblingASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDBookmarkAddNewSiblingASTextSELPROTO)(gPDModelHFT[PDBookmarkAddNewSiblingASTextSEL])))
+/* PDBookmarkAddSubtreeASText */
+#define PDBookmarkAddSubtreeASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDBookmarkAddSubtreeASTextSELPROTO)(gPDModelHFT[PDBookmarkAddSubtreeASTextSEL])))
+/* PDBookmarkGetTitleASText */
+#define PDBookmarkGetTitleASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDBookmarkGetTitleASTextSELPROTO)(gPDModelHFT[PDBookmarkGetTitleASTextSEL])))
+/* PDBookmarkSetTitleASText */
+#define PDBookmarkSetTitleASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDBookmarkSetTitleASTextSELPROTO)(gPDModelHFT[PDBookmarkSetTitleASTextSEL])))
+/* PDBookmarkGetByTitleASText */
+#define PDBookmarkGetByTitleASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDBookmarkGetByTitleASTextSELPROTO)(gPDModelHFT[PDBookmarkGetByTitleASTextSEL])))
+
+/* Annotation APIs */
+/* PDAnnotGetTitleASText */
+#define PDAnnotGetTitleASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDAnnotGetTitleASTextSELPROTO)(gPDModelHFT[PDAnnotGetTitleASTextSEL])))
+/* PDAnnotSetTitleASText */
+#define PDAnnotSetTitleASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDAnnotSetTitleASTextSELPROTO)(gPDModelHFT[PDAnnotSetTitleASTextSEL])))
+/* PDTextAnnotGetContentsASText */
+#define PDTextAnnotGetContentsASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDTextAnnotGetContentsASTextSELPROTO)(gPDModelHFT[PDTextAnnotGetContentsASTextSEL])))
+/* PDTextAnnotSetContentsASText */
+#define PDTextAnnotSetContentsASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDTextAnnotSetContentsASTextSELPROTO)(gPDModelHFT[PDTextAnnotSetContentsASTextSEL])))
+
+/* DocInfo APIs */
+/* PDDocGetInfoASText */
+#define PDDocGetInfoASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDDocGetInfoASTextSELPROTO)(gPDModelHFT[PDDocGetInfoASTextSEL])))
+/* PDDocSetInfoAsASText */
+#define PDDocSetInfoAsASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDDocSetInfoAsASTextSELPROTO)(gPDModelHFT[PDDocSetInfoAsASTextSEL])))
+
+
+/* PageLabel APIs */
+#define PDPageLabelGetPrefixASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPageLabelGetPrefixASTextSELPROTO)(gPDModelHFT[PDPageLabelGetPrefixASTextSEL])))
+#define PDPageLabelNewASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPageLabelNewASTextSELPROTO)(gPDModelHFT[PDPageLabelNewASTextSEL])))
+
+/* PDThread APIs */
+/* PDThreadGetInfoASText */
+#define PDThreadGetInfoASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDThreadGetInfoASTextSELPROTO)(gPDModelHFT[PDThreadGetInfoASTextSEL])))
+/* PDThreadSetInfoASText */
+#define PDThreadSetInfoASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDThreadSetInfoASTextSELPROTO)(gPDModelHFT[PDThreadSetInfoASTextSEL])))
+
+/* PDXlateToHostASText */
+#define PDXlateToHostASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDXlateToHostASTextSELPROTO)(gPDModelHFT[PDXlateToHostASTextSEL])))
+/* PDXlateToASText */
+#define PDXlateToASText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDXlateToASTextSELPROTO)(gPDModelHFT[PDXlateToASTextSEL])))
+
+/* PDPageHasOverprintExt */
+#define PDPageHasOverprintExt (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPageHasOverprintExtSELPROTO)(gPDModelHFT[PDPageHasOverprintExtSEL])))
+
+/* PDDocSetMinorVersion */
+#define PDDocSetMinorVersion (ACROASSERT(gPDModelVersion >= PDModelHFT_VERSION_8), *((PDDocSetMinorVersionSELPROTO) (gPDModelHFT[PDDocSetMinorVersionSEL])))
+
+#if ACRO_SDK_LEVEL >= 0x00080000 /* Previously in PDFL HFT */
+/* PDPrefSetUseOutputIntents */
+#define PDPrefSetUseOutputIntents (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPrefSetUseOutputIntentsSELPROTO)(gPDModelHFT[PDPrefSetUseOutputIntentsSEL])))
+
+/* PDPrefGetUseOutputIntents */
+#define PDPrefGetUseOutputIntents (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPrefGetUseOutputIntentsSELPROTO)(gPDModelHFT[PDPrefGetUseOutputIntentsSEL])))
+
+/* PDPrefSetWorkingRGB */
+#define PDPrefSetWorkingRGB (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPrefSetWorkingRGBSELPROTO)(gPDModelHFT[PDPrefSetWorkingRGBSEL])))
+
+/* PDPrefSetWorkingCMYK */
+#define PDPrefSetWorkingCMYK (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPrefSetWorkingCMYKSELPROTO)(gPDModelHFT[PDPrefSetWorkingCMYKSEL])))
+
+/* PDPrefSetWorkingGray */
+#define PDPrefSetWorkingGray (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPrefSetWorkingGraySELPROTO)(gPDModelHFT[PDPrefSetWorkingGraySEL])))
+
+/* PDPrefSetBlackPointCompensation */
+#define PDPrefSetBlackPointCompensation (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPrefSetBlackPointCompensationSELPROTO)(gPDModelHFT[PDPrefSetBlackPointCompensationSEL])))
+
+/* PDPrefGetBlackPointCompensation */
+#define PDPrefGetBlackPointCompensation (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_8), *((PDPrefGetBlackPointCompensationSELPROTO)(gPDModelHFT[PDPrefGetBlackPointCompensationSEL])))
+#endif /* if ACRO_SDK_LEVEL >= 0x00080000 */
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+/* Redaction APIs */
+/* PDDocApplyRedactions */
+#define PDDocApplyRedactions (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocApplyRedactionsSELPROTO)(gPDModelHFT[PDDocApplyRedactionsSEL])))
+/* PDPageCreateRedaction */
+#define PDDocCreateRedaction (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocCreateRedactionSELPROTO)(gPDModelHFT[PDDocCreateRedactionSEL])))
+/* PDRedactionGetProps */
+#define PDRedactionGetProps (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDRedactionGetPropsSELPROTO)(gPDModelHFT[PDRedactionGetPropsSEL])))
+/* PDRedactionGetProps */
+#define PDRedactionSetProps (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDRedactionSetPropsSELPROTO)(gPDModelHFT[PDRedactionSetPropsSEL])))
+
+/* PDDocResetInkUsage */
+#define PDDocResetInkUsage (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocResetInkUsageSELPROTO)(gPDModelHFT[PDDocResetInkUsageSEL])))
+
+/* PDDocGetNumErrors */
+#define PDDocGetNumErrors (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocGetNumErrorsSELPROTO)(gPDModelHFT[PDDocGetNumErrorsSEL])))
+/* PDDocGetNthError */
+#define PDDocGetNthError (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocGetNthErrorSELPROTO)(gPDModelHFT[PDDocGetNthErrorSEL])))
+/* PDDocGetVersionEx */
+#define PDDocGetVersionEx (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocGetVersionExSELPROTO)(gPDModelHFT[PDDocGetVersionExSEL])))
+
+#define PDFileAttachmentNewFromFile (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentNewFromFileSELPROTO)(gPDModelHFT[PDFileAttachmentNewFromFileSEL])))
+#define PDFileAttachmentUpdateFromFile (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentUpdateFromFileSELPROTO)(gPDModelHFT[PDFileAttachmentUpdateFromFileSEL])))
+#define PDFileAttachmentSaveToFile (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentSaveToFileSELPROTO)(gPDModelHFT[PDFileAttachmentSaveToFileSEL])))
+#define PDFileAttachmentFromCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentFromCosObjSELPROTO)(gPDModelHFT[PDFileAttachmentFromCosObjSEL])))
+#define PDFileAttachmentGetCosObj (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetCosObjSELPROTO)(gPDModelHFT[PDFileAttachmentGetCosObjSEL])))
+#define PDFileAttachmentOpenStream (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentOpenStreamSELPROTO)(gPDModelHFT[PDFileAttachmentOpenStreamSEL])))
+#define PDFileAttachmentGetFileSize (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetFileSizeSELPROTO)(gPDModelHFT[PDFileAttachmentGetFileSizeSEL])))
+#define PDFileAttachmentGetCreationDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetCreationDateSELPROTO)(gPDModelHFT[PDFileAttachmentGetCreationDateSEL])))
+#define PDFileAttachmentGetModDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetModDateSELPROTO)(gPDModelHFT[PDFileAttachmentGetModDateSEL])))
+#define PDFileAttachmentIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentIsValidSELPROTO)(gPDModelHFT[PDFileAttachmentIsValidSEL])))
+#define PDFileAttachmentGetFileName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetFileNameSELPROTO)(gPDModelHFT[PDFileAttachmentGetFileNameSEL])))
+#define PDFileAttachmentSetFieldText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentSetFieldTextSELPROTO)(gPDModelHFT[PDFileAttachmentSetFieldTextSEL])))
+#define PDFileAttachmentGetFieldText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetFieldTextSELPROTO)(gPDModelHFT[PDFileAttachmentGetFieldTextSEL])))
+#define PDFileAttachmentSetFieldNumber (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentSetFieldNumberSELPROTO)(gPDModelHFT[PDFileAttachmentSetFieldNumberSEL])))
+#define PDFileAttachmentGetFieldNumber (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetFieldNumberSELPROTO)(gPDModelHFT[PDFileAttachmentGetFieldNumberSEL])))
+#define PDFileAttachmentSetFieldDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentSetFieldDateSELPROTO)(gPDModelHFT[PDFileAttachmentSetFieldDateSEL])))
+#define PDFileAttachmentGetFieldDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetFieldDateSELPROTO)(gPDModelHFT[PDFileAttachmentGetFieldDateSEL])))
+#define PDFileAttachmentSetFieldPrefix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentSetFieldPrefixSELPROTO)(gPDModelHFT[PDFileAttachmentSetFieldPrefixSEL])))
+#define PDFileAttachmentGetFieldPrefix (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFileAttachmentGetFieldPrefixSELPROTO)(gPDModelHFT[PDFileAttachmentGetFieldPrefixSEL])))
+
+#define PDCollectionIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionIsValidSELPROTO)(gPDModelHFT[PDCollectionIsValidSEL])))
+#define PDDocGetPDCollection (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocGetPDCollectionSELPROTO)(gPDModelHFT[PDDocGetPDCollectionSEL])))
+#define PDDocCreatePDCollection (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocCreatePDCollectionSELPROTO)(gPDModelHFT[PDDocCreatePDCollectionSEL])))
+#define PDDocDeleteCollection (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocDeleteCollectionSELPROTO)(gPDModelHFT[PDDocDeleteCollectionSEL])))
+#define PDCollectionGetSortOrder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionGetSortOrderSELPROTO)(gPDModelHFT[PDCollectionGetSortOrderSEL])))
+#define PDCollectionSetSortOrder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSetSortOrderSELPROTO)(gPDModelHFT[PDCollectionSetSortOrderSEL])))
+#define PDCollectionGetViewData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionGetViewDataSELPROTO)(gPDModelHFT[PDCollectionGetViewDataSEL])))
+#define PDCollectionSetViewData (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSetViewDataSELPROTO)(gPDModelHFT[PDCollectionSetViewDataSEL])))
+
+#define PDCollectionSchemaAcquire (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSchemaAcquireSELPROTO)(gPDModelHFT[PDCollectionSchemaAcquireSEL])))
+#define PDCollectionSchemaDestroy (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSchemaDestroySELPROTO)(gPDModelHFT[PDCollectionSchemaDestroySEL])))
+#define PDCollectionSchemaGetLength (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSchemaGetLengthSELPROTO)(gPDModelHFT[PDCollectionSchemaGetLengthSEL])))
+#define PDCollectionSchemaGetField (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSchemaGetFieldSELPROTO)(gPDModelHFT[PDCollectionSchemaGetFieldSEL])))
+#define PDCollectionSchemaSetField (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSchemaSetFieldSELPROTO)(gPDModelHFT[PDCollectionSchemaSetFieldSEL])))
+#define PDCollectionSchemaRemoveField (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionSchemaRemoveFieldSELPROTO)(gPDModelHFT[PDCollectionSchemaRemoveFieldSEL])))
+
+#define PDFolderIsValid (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderIsValidSELPROTO)(gPDModelHFT[PDFolderIsValidSEL])))
+#define PDCollectionCreateFolder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionCreateFolderSELPROTO)(gPDModelHFT[PDCollectionCreateFolderSEL])))
+#define PDCollectionRemoveFolder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionRemoveFolderSELPROTO)(gPDModelHFT[PDCollectionRemoveFolderSEL])))
+#define PDCollectionGetFolder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDCollectionGetFolderSELPROTO)(gPDModelHFT[PDCollectionGetFolderSEL])))
+#define PDFolderGetParent (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetParentSELPROTO)(gPDModelHFT[PDFolderGetParentSEL])))
+#define PDFolderSetParent (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetParentSELPROTO)(gPDModelHFT[PDFolderSetParentSEL])))
+#define PDFolderGetFirstChild (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetFirstChildSELPROTO)(gPDModelHFT[PDFolderGetFirstChildSEL])))
+#define PDFolderGetNextSibling (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetNextSiblingSELPROTO)(gPDModelHFT[PDFolderGetNextSiblingSEL])))
+#define PDFolderSetName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetNameSELPROTO)(gPDModelHFT[PDFolderSetNameSEL])))
+#define PDFolderGetName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetNameSELPROTO)(gPDModelHFT[PDFolderGetNameSEL])))
+#define PDFolderGetID (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetIDSELPROTO)(gPDModelHFT[PDFolderGetIDSEL])))
+#define PDFolderGetPathText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetPathTextSELPROTO)(gPDModelHFT[PDFolderGetPathTextSEL])))
+#define PDFolderGetModDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetModDateSELPROTO)(gPDModelHFT[PDFolderGetModDateSEL])))
+#define PDFolderSetModDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetModDateSELPROTO)(gPDModelHFT[PDFolderSetModDateSEL])))
+#define PDFolderGetCreationDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetCreationDateSELPROTO)(gPDModelHFT[PDFolderGetCreationDateSEL])))
+#define PDFolderSetCreationDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetCreationDateSELPROTO)(gPDModelHFT[PDFolderSetCreationDateSEL])))
+#define PDFolderGetDescription (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetDescriptionSELPROTO)(gPDModelHFT[PDFolderGetDescriptionSEL])))
+#define PDFolderSetDescription (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetDescriptionSELPROTO)(gPDModelHFT[PDFolderSetDescriptionSEL])))
+#define PDFolderSetFieldText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetFieldTextSELPROTO)(gPDModelHFT[PDFolderSetFieldTextSEL])))
+#define PDFolderGetFieldText (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetFieldTextSELPROTO)(gPDModelHFT[PDFolderGetFieldTextSEL])))
+#define PDFolderSetFieldNumber (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetFieldNumberSELPROTO)(gPDModelHFT[PDFolderSetFieldNumberSEL])))
+#define PDFolderGetFieldNumber (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetFieldNumberSELPROTO)(gPDModelHFT[PDFolderGetFieldNumberSEL])))
+#define PDFolderSetFieldDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderSetFieldDateSELPROTO)(gPDModelHFT[PDFolderSetFieldDateSEL])))
+#define PDFolderGetFieldDate (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDFolderGetFieldDateSELPROTO)(gPDModelHFT[PDFolderGetFieldDateSEL])))
+
+#define ASFileAttachmentCreatePathName (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((ASFileAttachmentCreatePathNameSELPROTO)(gPDModelHFT[ASFileAttachmentCreatePathNameSEL])))
+#define ASFileAttachmentGetPDFileAttachment (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((ASFileAttachmentGetPDFileAttachmentSELPROTO)(gPDModelHFT[ASFileAttachmentGetPDFileAttachmentSEL])))
+#define ASFileAttachmentGetPDFolder (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((ASFileAttachmentGetPDFolderSELPROTO)(gPDModelHFT[ASFileAttachmentGetPDFolderSEL])))
+
+/* PDDocHasISOExtensions */
+#define PDDocHasISOExtensions (ACROASSERT(gPDModelVersion >=PDModelHFT_VERSION_9), *((PDDocHasISOExtensionsSELPROTO)(gPDModelHFT[PDDocHasISOExtensionsSEL])))
+
+#endif /* !STATIC_HFT */
+#endif /* PI_PDMODEL_VERSION != 0 */
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+#undef EXTERNAL_PDPROCS_USER
+#endif /* !defined(_H_PDCalls) */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClassDefs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClassDefs.h
new file mode 100644
index 0000000..233af1d
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClassDefs.h
@@ -0,0 +1,55 @@
+/*********************************************************************************
+ File: PDClassDefs.h
+ Created: June 16, 2003
+ Purpose: This class contains macros commonly used by all PDClasses
+*
+* ___________________
+*
+* (c) Copyright 2002,2005,2006 Adobe Systems, Inc.
+* All Rights Reserved.
+*
+* NOTICE: Adobe permits you to use, modify, and distribute this file
+* in accordance with the terms of the Adobe license agreement
+* accompanying it. If you have received this file from a source other
+* than Adobe, then your use, modification, or distribution of it
+* requires the prior written permission of Adobe.
+************************************************************************************/
+#ifndef _PDCLASSDEFS_H
+#define _PDCLASSDEFS_H
+
+#if defined (__cplusplus)
+
+/* Common macros used by classes contained within this header */
+#include "ASRaiseAware.h"
+
+/*
+ - The base class for the common C++ objects differs depending
+ on the place it is being used. The below macro defines a constant
+ BASECLASS that will contain the required base class based on the context
+
+ - INTERNAL_PLUGIN is for plugins internal to Acrobat. This define
+ allows the class to use classes that are internal to Acrobat. This is a new
+ define and needs to be added to internal plugins that use this class.
+*/
+#if (EXCHANGE || READER)
+#define BASECLASS AcroStdBase
+#elif INTERNAL_PLUGIN
+#define BASECLASS CmiAlloc
+#endif
+
+/* Way for clients of this header to define their own exception handling mechanism
+ for exception raised as a result of calls made by the class methods. A sample
+ CPPError.h file could contain the following lines
+ #define ASTRY DURING
+ #define END_ASTRY HANDLER { throw ERRORCODE; } END_HANDLER
+*/
+#if CPP_EXCEPTIONS
+#include "CPPError.h"
+#else
+#define ASTRY
+#define END_ASTRY
+#endif /* CPP_EXCEPTIONS */
+
+#endif /* __cplusplus */
+
+#endif /* _PDCLASSDEFS_H */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClasses.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClasses.h
new file mode 100644
index 0000000..132ce3b
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDClasses.h
@@ -0,0 +1,34 @@
+/*********************************************************************************
+ File: PDClasses.h
+ Created: June 16, 2003
+ Purpose: This class consolidates all the C++ wrappers for the PD Objects.
+ Client wanting to use the C++ wrappers can include this file and
+ would in turn get all the C++ class headers included.
+
+*
+* ___________________
+*
+* (c) Copyright 2002-2006 Adobe Systems, Inc.
+* All Rights Reserved.
+*
+* NOTICE: Adobe permits you to use, modify, and distribute this file
+* in accordance with the terms of the Adobe license agreement
+* accompanying it. If you have received this file from a source other
+* than Adobe, then your use, modification, or distribution of it
+* requires the prior written permission of Adobe.
+************************************************************************************/
+
+
+#ifndef _PDCLASSES_H
+#define _PDCLASSES_H
+
+#if defined (__cplusplus)
+
+/* Include common macros */
+#include "PDClassDefs.h"
+
+/* List of headers for all the exported classes */
+#include "SmartPDPage.h"
+
+#endif /* __cplusplus */
+#endif /* _PDCLASSES_H */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocE.h
new file mode 100644
index 0000000..3905474
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocE.h
@@ -0,0 +1,19 @@
+/* PDDocE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PDDocEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocEASF.h
new file mode 100644
index 0000000..83ed146
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDDocEASF.h
@@ -0,0 +1,268 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(pdErrNoError, "No error.")
+
+DefineErr(pdErrBadFont, "Bad font object or font descriptor object.")
+
+DefineErr(pdErrEmbeddingFont, "Error while trying to embed a font.")
+
+DefineErr(pdErrBadRootObj, "The root object is missing or invalid.")
+
+DefineErr(pdErrBadBaseObj, "The base pages object is missing or invalid.")
+
+DefineErr(pdErrBadOutlineObj, "The outlines object is missing or invalid.")
+
+DefineErr(pdErrBadResMetrics, "Invalid or corrupt font metrics in the resource file.")
+
+DefineErr(pdErrBadPageObj, "A page object is missing or invalid.")
+
+DefineErr(pdErrThumbError, "Error while processing thumbnail.")
+
+DefineErr(pdErrBadAnnotation, "Invalid annotation object.")
+
+DefineErr(pdErrBadPageTree, "The document's page tree contains an invalid node.")
+
+DefineErr(pdErrUnknownProcsets, "Information needed to print a page is unavailable.")
+
+DefineErr(pdErrUnableToOpenDoc, "This file could not be opened.")
+
+DefineErr(pdErrIsFileLocked, "The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder.")
+
+DefineErr(pdErrUnableToWrite, "Cannot write to this file. Please save the document with a different name or in a different folder.")
+
+DefineErr(pdErrUnableToRenameTemp, "Cannot save to this filename. Please save the document with a different name or in a different folder.")
+
+DefineErr(pdErrUnableToRecover, "Cannot recover original file.")
+
+DefineErr(pdErrUnableToRead, "Cannot read file.")
+
+DefineErr(pdErrUnknownFileType, "This is not a valid Portable Document File (PDF) document. It cannot be opened.")
+
+DefineErr(pdErrAlreadyOpen, "This file is already open.")
+
+DefineErr(pdErrTooManyPagesForOpen, "This file cannot be opened because it contains too many pages.")
+
+DefineErr(pdErrNotEnoughSpaceForTempFile, "There is not enough temporary disk space for this operation.")
+
+DefineErr(pdErrTooManyPagesForInsert, "Inserting this file would result in a document with too many pages.")
+
+DefineErr(pdErrBookmarksError, "There is an error in the bookmarks.")
+
+DefineErr(pdErrCannotOpenMoreBkMark, "Cannot open more bookmarks. ")
+
+DefineErr(pdErrUnableToExtractFontErr, "Cannot extract embedded font.")
+
+DefineErr(pdErrCannotOpenNotes, "An error occurred while creating the document notes file.")
+
+DefineErr(pdErrNoNotes, "This document has no notes.")
+
+DefineErr(pdErrCopyPageFailed, "The copy of a page failed.")
+
+DefineErr(pdErrNeedRebuild, "This file is damaged.")
+
+DefineErr(pdErrBadFontFlags, "The font '%s' contains bad /Flags.")
+
+DefineErr(pdErrBadFontBBox, "The font '%s' contains a bad /BBox.")
+
+DefineErr(pdErrBadFontWidths, "The font '%s' contains bad /Widths.")
+
+DefineErr(pdErrOldCosFileOBSOLETE, "OBSOLETE")
+
+DefineErr(pdErrTrySaveAs, "This file can only be saved using Save As.")
+
+DefineErr(pdErrAbortNotes, "Creation of the notes file was cancelled.")
+
+DefineErr(pdErrPagesLockedNotDeleted, "One or more pages are in use and could not be deleted.")
+
+DefineErr(pdErrNotEnoughMemoryToOpenDoc, "There is not enough memory available to open the document.")
+
+DefineErr(pdErrUnableToCloseDueToRefs, "Cannot close document because of outstanding references.")
+
+DefineErr(pdErrNeedPassword, "This document requires authentication (e.g. a password).")
+
+DefineErr(pdErrOpNotPermitted, "This operation is not permitted.")
+
+DefineErr(pdErrNoCryptHandler, "The security plug-in required by this command is unavailable.")
+
+DefineErr(pdErrBadThread, "Invalid article object.")
+
+DefineErr(pdErrBadBead, "Invalid article element.")
+
+DefineErr(pdErrThreadProcessing, "Error while processing articles.")
+
+DefineErr(pdErrUnknownAction, "Unknown action type.")
+
+DefineErr(pdErrBadAction, "Invalid action object.")
+
+DefineErr(pdErrCantUseNewVersion, "This file contains information not understood by Acrobat. It cannot be used for this operation.")
+
+DefineErr(pdErrOldEncryption, "Acrobat cannot decrypt this document.")
+
+DefineErr(pdErrUnableToExtractFont, "Cannot extract the embedded font '%s'. Some characters may not display or print correctly.")
+
+DefineErr(pdErrUnableToFindFont, "Cannot find or create the font '%s'. Some characters may not display or print correctly.")
+
+DefineErr(pdErrBadAnnotColor, "Invalid annotation color (only RGB colors are allowed).")
+
+DefineErr(pdErrNeedCryptHandler, "Cannot execute this command on an unsecured document.")
+
+DefineErr(pdErrBadFontDescMetrics, "The font '%s' contains bad /FontDescriptor metrics.")
+
+DefineErr(pdErrWhileRecoverInsertPages, "There was an error while inserting or extracting pages and another error while trying to recover.")
+
+DefineErr(pdErrBadBookmark, "Invalid bookmark object.")
+
+DefineErr(pdErrBadFileSpec, "Invalid file specification object.")
+
+DefineErr(pdErrAfterSave, "This document was successfully saved, but an error occurred after saving the document. Please close and reopen the document.")
+
+DefineErr(pdErrUnableToXlateText, "Some text in the font and character '%s' could not be displayed or printed correctly. The font could not be reencoded.")
+
+DefineErr(pdErrTextStringTooShort, "Not enough bytes in text string for multibyte character code.")
+
+DefineErr(pdErrBadCMap, "The encoding (CMap) specified by a font is corrupted.")
+
+DefineErr(pdErrOldATMVersion, "The font '%s' cannot be displayed with the installed version of ATM.")
+
+DefineErr(pdErrZeroPageFile, "This file cannot be opened because it has no pages.")
+
+DefineErr(pdErrATMMemory, "ATM is running out of memory. Text in font '%s' may not render properly.")
+
+DefineErr(pdErrOptMemory, "There is not enough memory to optimize this file.")
+
+DefineErr(pdErrCancelSave, "The Save operation was cancelled.")
+
+DefineErr(pdErrCannotMergeWithSubsetFonts, "These documents contain subset fonts that have the same name and cannot be merged.")
+
+DefineErr(pdErrCannotReopenDoc, "This document was successfully saved, but an error occurred after saving the document. Please close and reopen the document.")
+
+DefineErr(pdErrNoPDDocForCosDoc, "There is no PDDoc associated with this CosDoc.")
+
+DefineErr(pdErrHostEncodingNotSet, "The application has not set the host encoding.")
+
+DefineErr(pdErrInvalidEmbeddedFont, "Invalid font '%s' was removed from the document.")
+
+DefineErr(pdErrCannotDeleteAllPages, "You cannot delete all pages. At least one page must remain.")
+
+DefineErr(pdErrStartLessThanEnd, "The starting page number must be less than or the same as the ending page number.")
+
+DefineErr(pdErrNotValidPage, "There is no page numbered '%s' in this document.")
+
+DefineErr(pdErrCannotBeBlankPage, "The page number cannot be left blank.")
+
+DefineErr(pdErrInvalidPageNumber, "'%s' is an invalid page number.")
+
+DefineErr(pdErrExceedEncryptionLength, "Exceeds support encryption key length")
+
+DefineErr(pdErrExceedEncryptionVersion, "An updated version of Acrobat is needed in order to open this document.")
+
+DefineErr(pdErrRequireTrustedMode, "Only Adobe certified Acrobat plug-ins are allowed while viewing this document.")
+
+DefineErr(pdErrMissingGlyphs, "Cannot find a substitution font with all the characters used by the font named: '%s, some characters may not be displayed or printed.")
+
+DefineErr(pdErrNeedTradChinese, "An error has occurred that may be fixed by installing the latest version of the Traditional Chinese Language Support package.")
+
+DefineErr(pdErrNeedSimpChinese, "An error has occurred that may be fixed by installing the latest version of the Simplified Chinese Language Support package.")
+
+DefineErr(pdErrNeedKorean, "An error has occurred that may be fixed by installing the latest version of the Korean Language Support package.")
+
+DefineErr(pdErrNeedJapanese, "An error has occurred that may be fixed by installing the latest version of the Japanese Language Support package.")
+
+DefineErr(pdErrMissingSubsetFont, "A font required for font substitution is missing.")
+
+DefineErr(pdErrCMapNotFound, "The encoding (CMap) specified by a font is missing.")
+
+DefineErr(pdMsgOptimizingImages, "Consolidating duplicate images")
+
+DefineErr(pdMsgOptimizingGraphics, "Consolidating duplicate page backgrounds")
+
+DefineErr(pdMsgCopyingFile, "Copying file")
+
+DefineErr(pdMsgLinearizing, "Optimizing for Fast Web Viewing")
+
+DefineErr(pdMsgGarbageCollecting, "Removing unused objects and saving")
+
+DefineErr(pdMsgSavingFile, "Saving file")
+
+DefineErr(pdErrLimitcheck, "Implementation limit exceeded")
+
+DefineErr(pdErrPrintAsImageSpoolFileFull, "There is insufficient disk space for the print job spool file to hold the entire print job. Try freeing up disk space on the startup volume and print the remaining pages of the document again.")
+
+DefineErr(pdErrInvalidMediaBox, "Invalid MediaBox")
+
+DefineErr(pdMsgOptimizingFonts, "Consolidating duplicate fonts")
+
+DefineErr(pdMsgOptimizingStreams, "Optimizing streams")
+
+DefineErr(pdEnumCanceled, "Enumeration process canceled by the callback function")
+
+DefineErr(pdErrFontEmbeddingFailed, "Could not embed '%s'")
+
+DefineErr(pdMsgEmbeddingFonts, "Embedding Fonts")
+
+DefineErr(pdMsgCharacterUsage, "Determining characters used in document")
+
+DefineErr(pdErrFontEmbeddingCanceled, "Font embedding canceled")
+
+DefineErr(pdErrMultipleDocuments, "The operation could not be performed because the objects belong to different documents.")
+
+DefineErr(pdErrBadOCObject, "Invalid type or value in a Layer object.")
+
+DefineErr(pdErrNoInlineImage, "The operation could not be performed because the image is inline.")
+
+DefineErr(pdErrNoCryptFilterHandler, "The required Crypt Filter is not registed by the security handler plug-in.")
+
+DefineErr(pdErrBadEncryptDict, "Bad encrypt dictionary")
+
+DefineErr(pdMsgCompressingObjects, "Compressing objects")
+
+DefineErr(pdErrNoPermHandler, "The permission handler required by this command is unavailable.")
+
+DefineErr(pdErrDuplicatePermHandler, "The permission handler has already been added for this doc.")
+
+DefineErr(pdErrExceedMaxPermHandlers, "Have reached the max number of permission handlers for this doc.")
+
+DefineErr(pdMsgOptimizingJBIG2Dicts, "Optimizing JBIG2 Dictionaries")
+
+DefineErr(pdErrBadEncoding, "The font '%s' contains an invalid encoding. Some characters may not display.")
+
+DefineErr(pdErrMatrixTooBig, "Implementation limit exceeded. Please try decreasing magnification level.")
+
+DefineErr(pdErrProcess, "Process ")
+
+DefineErr(pdErrCyan, "Cyan")
+
+DefineErr(pdErrMagenta, "Magenta")
+
+DefineErr(pdErrYellow, "Yellow")
+
+DefineErr(pdErrBlack, "Black")
+
+DefineErr(pdErrUnknownOutputCondition, "Unknown Output Condition")
+
+DefineErr(pdErrNeedExtendedLang, "An error has occurred that may be fixed by installing the latest version of the Extended Language Support package.")
+
+DefineErr(pdErrUnknownCryptFilter, "This file is encrypted with an unsupported cryptograhpic algorithm. A later version of Acrobat may be needed in order to open this document.")
+
+DefineErr(pdErrNeed3D, "An error has occurred that may be fixed by installing the latest version of the 3D Support package.")
+
+DefineErr(pdErr3DUnsupported, "3D artwork is not supported under this operating system.")
+
+DefineErr(pdErrNonFIPSCrypt, "Use of non FIPS cryptography is not permitted while in FIPS mode.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDExpT.h
new file mode 100644
index 0000000..8fa7dc8
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDExpT.h
@@ -0,0 +1,6798 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDExpT.h
+
+ - Types, macros, structures, etc. required to use the PDModel HFT.
+
+*********************************************************************/
+
+#ifndef _H_PDExpT
+#define _H_PDExpT
+
+#include "ASExpT.h"
+#include "CosExpT.h"
+#include "PDBasicExpT.h"
+#include "ASExtraExpT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ A <code>0</code>-based page number for use in AVPageView and AVDoc methods.
+ Negative for special values.
+ @see AVDocGetPageText
+ @see AVDocGetViewDef
+ @see AVPageViewGetFirstVisiblePageNum
+ @see AVPageViewGetLastVisiblePageNum
+ @see AVPageViewGetNextView
+ @see AVPageViewGetPageNum
+ @see AVPageViewGetSelectedAnnotPageNum
+ @see AVPageViewGetVisibleAnnotPage
+ @see AVPageViewGoTo
+ @see AVPageViewPageNumIsVisible
+ @see AVPageViewSetPageNum
+ @see AVDocSelectionGetAVRectProc
+ @see AVSelectionPageRangeEnumProc
+*/
+typedef ASInt32 PDPageNumber;
+
+/**
+ A flag value for use in PDDocInsertPagesParams().
+ @see PDDocInsertPages
+*/
+typedef ASUns16 PDSmallFlagBits;
+
+/**
+ An unsigned measurement of a font characteristic (for example, width).
+*/
+typedef ASUns16 PDFontMetric;
+
+/**
+ An italic angle value in degrees, for use in PDFontMetrics.
+*/
+typedef ASInt16 PDFontAngle;
+
+/**
+ A font offset value, for use in PDFontMetrics.
+*/
+typedef ASInt16 PDFontOffset;
+
+/**
+ A font metric value (which is never negative), for use in PDFontMetrics.
+*/
+typedef ASInt16 PDiFontMetric;
+
+/**
+ A signed measurement of an image offset, for use in PDImageAttrs.
+*/
+typedef ASInt32 PDImageScalar;
+
+/** A <code>signed int</code> (which is never negative), for historical reasons. */
+typedef ASInt16 PDDocVersion;
+
+/**
+ A <code>signed int</code> (which is never negative), for historical reasons.
+ @see PDDocClearFlags
+ @see PDDocGetFlags
+ @see PDDocSetFlags
+*/
+typedef ASInt32 PDDocFlags;
+
+/** */
+typedef ASUns16 PDCharOffset;
+
+/**
+ A numeric count value for use in PDImageAttrs.
+*/
+typedef ASInt32 PDCount;
+
+
+/************************************************************************************\
+|* *|
+|* PDAction *|
+|* *|
+\************************************************************************************/
+
+/**
+ Actions are what happens when a user clicks on a link or bookmark. In addition, the
+ Acrobat viewer allows a document to have an action that is executed automatically
+ when the document is opened. Applications can also support actions in custom
+ annotation types they add.
+
+ @see PDActionNew
+ @see PDActionNewFromDest
+ @see PDActionNewFromFileSpec
+ @see PDLinkAnnotGetAction
+ @see PDBookmarkGetAction
+ @see PDDocGetOpenAction
+ @see PDActionDestroy
+*/
+typedef OPAQUE_64_BITS PDAction;
+/* Forward declarations */
+typedef struct _t_PDActionHandler *PDActionHandler;
+typedef struct _t_PDActionClipboardData *PDActionClipboardData;
+
+/**
+ Used to store PDAction data for copy and paste operations.
+
+ @see PDActionHandlerCanPasteProc
+ @see PDActionHandlerCopyProc
+ @see PDActionHandlerDestroyDataProc
+ @see PDActionHandlerPasteProc
+*/
+typedef void *PDActionHandlerData;
+
+/**
+ A callback for PDActionHandler. It returns an ASAtom indicating
+ the action type for which the handler is responsible. Types
+ are defined by the client when registering the action handler.
+
+ @param pdah The action handler whose type is returned.
+ @return The action type for which this handler is responsible.
+ @see PDRegisterActionHandler
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *PDActionHandlerGetTypeProc)(PDActionHandler pdah);
+
+/**
+ (Optional) A callback for PDActionHandler. It returns <code>true</code> if
+ the copy operation is expected to succeed. It tests, for example,
+ whether copying is allowed by document permissions.
+
+ @param pdah The action handler.
+ @param action The action object.
+ @return <code>true</code> if the action can be copied, <code>false</code> if it cannot.
+ @see PDActionHandlerCanPasteProc
+ @see PDActionHandlerCopyProc
+ @see PDActionHandlerDestroyDataProc
+ @see PDActionHandlerPasteProc
+ @see PDActionCanCopy
+ @see PDRegisterActionHandler
+
+ @note The handler is not expected to test other actions (if any) in the action chain.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDActionHandlerCanCopyProc)(
+ PDActionHandler pdah, PDAction action);
+
+/**
+ (Optional) A callback for PDActionHandler. It copies data from
+ an action object to a new data structure, from which it
+ can be pasted to a new document. The PDActionHandlerData
+ does not store any information related to a Next action.
+ Rebuilding the action chain is the responsibility of the
+ caller and can be ignored by the PDActionHandler.
+ @param pdah The action handler.
+ @param action The action object.
+ @return The new structure containing the action data.
+ @see PDActionHandlerCanCopyProc
+ @see PDActionHandlerCanPasteProc
+ @see PDActionHandlerDestroyDataProc
+ @see PDActionHandlerPasteProc
+ @see PDActionCopy
+ @see PDRegisterActionHandler
+*/
+typedef ACCBPROTO1 PDActionHandlerData(ACCBPROTO2 *PDActionHandlerCopyProc)(
+ PDActionHandler pdah, PDAction action);
+
+/**
+ (Optional) A callback for PDActionHandler. It returns <code>true</code> if
+ the paste operation is expected to succeed. It tests, for example,
+ whether pasting is allowed by document permissions.
+ @param pdah The action handler.
+ @param dest The destination document.
+ @param data The action data to test.
+ @return <code>true</code> if the action can be pasted to the document, <code>false</code>
+ if it cannot.
+ @see PDActionHandlerCanCopyProc
+ @see PDActionHandlerCopyProc
+ @see PDActionHandlerDestroyDataProc
+ @see PDActionHandlerPasteProc
+ @see PDActionCanPaste
+ @see PDRegisterActionHandler
+
+ @note The handler is not expect to test other actions (if any) in the action chain.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDActionHandlerCanPasteProc)(
+ PDActionHandler pdah, PDDoc dest, PDActionHandlerData data);
+
+/**
+ (Optional) A callback for PDActionHandler. It creates a new PDAction
+ in the destination document using data that was placed in
+ a PDActionClipboardA data structure using the PDActionCopy()
+ function, and returns the new action object.
+ @param pdah The action handler.
+ @param dest The destination document.
+ @param data The action data to paste.
+ @return The new action object containing the pasted data and associated
+ with the document.
+ @see PDActionHandlerCanCopyProc
+ @see PDActionHandlerCanPasteProc
+ @see PDActionHandlerCopyProc
+ @see PDActionHandlerDestroyDataProc
+ @see PDActionPaste
+ @see PDRegisterActionHandler
+*/
+typedef ACCBPROTO1 PDAction (ACCBPROTO2 *PDActionHandlerPasteProc)(
+ PDActionHandler pdah, PDDoc dest, PDActionHandlerData data);
+
+/**
+ A callback for PDActionHandler. It destroys data copied into
+ an action clipboard data structure after it has been successfully
+ pasted to a new document.
+ @param pdah The action handler.
+ @param data The action data to destroy.
+ @see PDActionHandlerCanCopyProc
+ @see PDActionHandlerCanPasteProc
+ @see PDActionHandlerCopyProc
+ @see PDActionHandlerPasteProc
+ @see PDActionPaste
+ @see PDRegisterActionHandler
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDActionHandlerDestroyDataProc)(
+ PDActionHandler pdah, PDActionHandlerData data);
+
+/**
+ (Optional) A callback for PDActionHandler. It destroys the action
+ handler structure when the application no longer requires
+ it. The handler should destroy any dynamic memory stored
+ in the <code>userData</code> field.
+ @param pdah The action handler to destroy.
+ @see PDRegisterActionHandler
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDActionHandlerDestroyProc)(
+ PDActionHandler pdah);
+
+/**
+ A data structure containing callbacks that implement an action
+ manager. The callbacks provide copy-and-paste functionality
+ for a particular type of action.
+ @see PDRegisterActionHandler
+*/
+typedef struct _t_PDActionHandler {
+
+ /** The size of the data structure. It must be set to <code>sizeof(PDAnnotHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** A pointer to a block of user-supplied data. */
+ void *userData;
+
+ /** */
+ PDActionHandlerGetTypeProc GetType;
+
+ /** */
+ PDActionHandlerCanCopyProc CanCopy;
+
+ /** */
+ PDActionHandlerCopyProc Copy;
+
+ /** */
+ PDActionHandlerCanPasteProc CanPaste;
+
+ /** */
+ PDActionHandlerPasteProc Paste;
+
+ /** */
+ PDActionHandlerDestroyDataProc DestroyData;
+
+ /** */
+ PDActionHandlerDestroyProc Destroy;
+} PDActionHandlerRec;
+
+/************************************************************************************\
+|* *|
+|* PDAnnot, PDTextAnnot, PDLinkAnnot *|
+|* *|
+|* Opaque designators for PDF annotation objects.
+|* You may freely copy or destroy an instance of PDAnnot.
+|* Two instances of a PDAnnot designating the same annotation are guaranteed to
+|* contain identical bits. *|
+|* *|
+\************************************************************************************/
+
+/**
+ An annotation on a page in a PDF file. Acrobat viewers have two built-in annotation
+ types: PDTextAnnot and PDLinkAnnot. Physical attributes of the annotation can
+ be set and queried. Plug-ins add movie and Widget (form field) annotations.
+ Developers can define new annotation subtypes by creating new annotation handlers.
+
+ @see AVPageViewIsAnnotAtPoint
+ @see PDAnnotFromCosObj
+ @see PDPageAddNewAnnot
+ @see PDPageCreateAnnot
+ @see PDPageGetAnnot
+ @see PDPageRemoveAnnot
+*/
+typedef OPAQUE_64_BITS PDAnnot;
+
+/**
+ A PDF text annotation on a page in a PDF file. You can use any PDAnnot method on
+ a PDTextAnnot.
+ <p>Applications can:</p>
+ <ul>
+ <li>Get and set attributes including the rectangle, textual contents, and whether
+ the annotation is open.</li>
+ <li>Create new text annotations, and delete or move existing ones using PDAnnot
+ methods.</li>
+ <li>Manipulate the behavior of text annotations by modifying the Text Annotation
+ Handler.</li>
+ </ul>
+
+ <p>To obtain a PDF text annotation, use any of the PDAnnot calls, followed by CastToPDTextAnnot(). The annotation
+ passed to CastToPDTextAnnot() must be a text annotation; it will not convert other
+ annotation types into text annotations.</p>
+
+ @see CastToPDTextAnnot
+ @see PDPageRemoveAnnot
+*/
+typedef OPAQUE_64_BITS PDTextAnnot;
+
+/**
+ A link annotation on a page in a PDF file. You can use any PDAnnot method on a
+ PDLinkAnnot.
+
+ <p>Applications can:</p>
+ <ul>
+ <li>Get and set the bounding rectangle and color using PDAnnot methods.</li>
+ <li>Get and set the action that occurs when the link is activated, and the link's border,
+ using PDLinkAnnot methods.</li>
+ <li>Create new link annotations and delete existing ones using the PDPage methods.</li>
+ </ul>
+
+ <p>To obtain a link annotation, use any of the PDAnnot calls, followed by CastToPDLinkAnnot(). The annotation passed
+ to CastToPDLinkAnnot() must be a link annotation; other annotation types are not
+ converted into link annotations.</p>
+
+ @see CastToPDLinkAnnot
+ @see PDPageRemoveAnnot
+*/
+typedef OPAQUE_64_BITS PDLinkAnnot;
+
+/** If there is no annotation handler, the annotation is invisible.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotInvisible 0x01
+
+/** The annotation is not visible and does not print.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotHidden 0x02
+
+/** The annotation prints.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotPrint 0x04
+
+/** The annotation does not zoom with the view.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotNoZoom 0x08
+
+/** The annotation does not rotate with the page.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotNoRotate 0x10
+
+/** The annotation does not view but can print.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotNoView 0x20
+
+/** The annotation does not interact with the user.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotReadOnly 0x40
+
+/** The annotation does not move or resize with the view. Currently only form fields respect this flag.
+ If the annotation is locked, the user cannot delete, move or change its associated form field's properties.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotLock 0x80
+
+/** A mouse-over or selection causes the <code>noView</code> bit to toggle.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotToggleNoView 0x100
+
+/** If the annotation is content-locked, the user can not change its content key.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotLockContents 0x200
+
+/** A place holder used only at runtime. Do not set this bit in PDF/FDF files.
+ @ingroup PDAnnotFlags
+*/
+#define pdAnnotSequenceAdjust 0x80000000
+
+
+/**
+ Casts a link annotation or a text annotation to a generic
+ annotation.
+ @param a The link annotation or text annotation to cast.
+ @see CastToPDLinkAnnot
+ @see CastToPDTextAnnot
+*/
+#define CastToPDAnnot(a) *(PDAnnot *)&(a)
+/**
+ Casts a link annotation or a generic annotation to a text
+ annotation.
+ @param a The link annotation or generic annotation to
+ cast.
+ @see CastToPDAnnot
+ @see CastToPDLinkAnnot
+*/
+#define CastToPDTextAnnot(a) *(PDTextAnnot *)&(a)
+/**
+ Casts a generic annotation or a text annotation to a link
+ annotation.
+ @param a The generic annotation or text annotation to
+ cast.
+ @see CastToPDAnnot
+ @see CastToPDTextAnnot
+*/
+#define CastToPDLinkAnnot(a) *(PDLinkAnnot *)&(a)
+
+/** It is okay to summarize annotations.
+ @ingroup AnnotationOperations
+*/
+#define PDAnnotOperationSummarize 0x0001
+
+/** It is okay to filter annotations.
+ @ingroup AnnotationOperations
+*/
+#define PDAnnotOperationFilter 0x0002
+
+/** It is okay to manage annotations.
+ @ingroup AnnotationOperations
+*/
+#define PDAnnotOperationManager 0x0004
+
+/** Allows modifying this annotation type in a write-protected document.
+ @ingroup AnnotationOperations
+*/
+#define PDAnnotIgnorePerms 0x0008
+
+/** When creating a flattened page include this annot
+ @ingroup AnnotationOperations
+*/
+#define PDAnnotOperationFlatten 0x0010
+
+/** All operations are allowed.
+ @ingroup AnnotationOperations
+*/
+#define PDAnnotOperationAll 0xFFFF
+
+/**
+ Information associated with an annotation.
+ @see PDAnnotHandlerDeleteAnnotInfoProc
+ @see PDAnnotHandlerGetAnnotInfoProc
+ @see PDRegisterAnnotHandler
+*/
+typedef struct _PDAnnotInfoRec {
+ /** The size of the data structure. It must be set to <code>sizeof(PDAnnotInfoRec)</code>. */
+ ASSize_t size;
+
+ /** The allowed operations.
+ @see AnnotationOperations
+ */
+ ASFlagBits nOperationFlags;
+
+ /** The author of this annotation. */
+ unsigned char *cAuthor;
+
+ /** The associated text for this annotation. */
+ unsigned char *cContents;
+
+ /** The modification date of this annotation. */
+ unsigned char *cDate;
+
+ /** The layer of this annotation. */
+ ASFixed fxLayer;
+} PDAnnotInfoRec, *PDAnnotInfo;
+
+/* It is assumed that the cAuthor and cContents passed back by the call
+** will be in either PDFDocEncoding or UnicodeEncoding (with the 0xFEFF
+** prefix). The date should be the standard date format as specified in
+** section 7.2, "Date", of the <i>PDF Reference</i> Manual. */
+#define PDAnnotInfoInit(x) \
+ do { \
+ ASmemset(x, 0, sizeof(PDAnnotInfoRec)); \
+ x->size = sizeof(PDAnnotInfoRec); \
+ x->fxLayer = fixedTwo; \
+ } while (0)
+
+/**
+ 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).
+
+ <p>To fully use a PDAnnotHandler, the AVAnnotHandler associated
+ with this annotation must have its AVAnnotHandlerGetInfoProc()
+ and AVAnnotHandlerDeleteInfoProc() callbacks defined.</p>
+ @see PDRegisterAnnotHandler
+*/
+typedef struct _t_PDAnnotHandler *PDAnnotHandler;
+
+/**
+ Used to store PDAnnot data for copy and paste operations.
+
+ @see PDAnnotCanPaste
+ @see PDAnnotCopy
+ @see PDAnnotDestroyClipboardData
+ @see PDAnnotPaste
+*/
+typedef struct _t_PDAnnotClipboardData *PDAnnotClipboardData;
+
+/** Opaque data used by PDAnnotHandlers. */
+typedef void *PDAnnotHandlerClipboardData;
+
+/**
+ PDAnnotPrintOp is passed to the PDAnnotHandlerGetPrintAppearanceProc()
+ callback to specify the type of print operation being performed.
+
+ @see PDAnnotHandlerGetPrintAppearanceProc
+*/
+enum {
+
+ /** A standard print operation. */
+ kPDAnnotPrintStandard = 1,
+
+ /** The user selected Form Fields Only. */
+ kPDAnnotPrintVariableData
+};
+typedef ASEnum16 PDAnnotPrintOp;
+
+/**
+ A callback for PDAnnotHandler. It gets the annotation information
+ for an annotation.
+ @param pdanh IN/OUT The annotation handler responsible for this
+ annotation.
+ @param pdan IN/OUT The annotation for which information is obtained.
+
+ @param 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 <code>NULL</code>.
+ @return The annotation information, described in a PDAnnotInfo structure.
+
+ @see AVAnnotHandlerGetInfoProc
+ @see PDAnnotHandlerDeleteAnnotInfoProc
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 PDAnnotInfo (ACCBPROTO2 *PDAnnotHandlerGetAnnotInfoProc)(
+ PDAnnotHandler pdanh, PDAnnot pdan, PDPage pdpage);
+
+/**
+ (Optional) A callback for PDAnnotHandler. It deletes information
+ associated with an annotation. It frees all the memory associated
+ with the annotation information.
+ @param pdanh IN/OUT The annotation handler responsible for this
+ annotation.
+ @param information IN/OUT Information associated with the annotation.
+
+ @see AVAnnotHandlerDeleteInfoProc
+ @see PDAnnotHandlerGetAnnotInfoProc
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDAnnotHandlerDeleteAnnotInfoProc)(
+ PDAnnotHandler pdanh, PDAnnotInfo info);
+
+/**
+ A callback for PDAnnotHandler. It gets an ASAtom indicating the
+ annotation type for which the handler is responsible. This
+ corresponds to the annotation's Subtype key in the PDF file.
+
+ @param pdanh IN/OUT The annotation handler whose type is returned.
+
+ @return The annotation type for which this handler is responsible.
+
+ @see PDAnnotHandlerGetAnnotInfoProc
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *PDAnnotHandlerGetTypeProc)(PDAnnotHandler pdanh);
+
+/**
+ A callback for PDAnnotHandler. It determines whether an annotation
+ is exported.
+
+ @param pdanh IN/OUT The annotation handler of the annotation type
+ to export.
+ @param src IN/OUT The annotation that may be exported.
+ @param dst IN/OUT A copy of <code>src</code>, which is actually exported.
+ @return <code>true</code> to export <code>dst</code>, <code>false</code> to not export <code>dst</code>.
+ @see PDAnnotWillPrintProc
+ @see PDDocWillImportAnnotProc
+ @see PDRegisterAnnotHandler
+
+ @note This is a different callback than PDDocWillImportAnnotCallback().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDDocWillExportAnnotProc)(PDAnnotHandler pdanh,
+ PDAnnot src, PDAnnot dst);
+
+/**
+ A callback for PDAnnotHandler. It determines whether an annotation
+ will be imported.
+
+ @param pdanh IN/OUT The annotation handler of the annotation type
+ to import.
+ @param doc IN/OUT The document into which annotations may be imported.
+ @param pdpage IN/OUT The page in which the annotation may be imported.
+ @param annot IN/OUT The annotation that may be imported.
+ @return <code>true</code> to import annot, <code>false</code> to not import annot.
+ @see PDAnnotWillPrintProc
+ @see PDDocWillExportAnnotProc
+ @see PDRegisterAnnotHandler
+
+ @note This is a different callback than PDDocWillImportAnnotCallback().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDDocWillImportAnnotProc)(PDAnnotHandler pdanh,
+ PDDoc doc, PDPage pdpage, PDAnnot annot);
+
+/**
+ A callback for PDAnnotHandler. This method is called to determine
+ whether an annotation is printed.
+ @param pdanh The annotation handler of the annotation
+ type to print.
+ @param annot The annotation to print.
+ @return <code>true</code> if the annotation is printed, <code>false</code> if the annotation
+ is not printed.
+ @see PDDocWillExportAnnotProc
+ @see PDDocWillImportAnnotProc
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDAnnotWillPrintProc)(PDAnnotHandler pdanh,
+ PDAnnot annot);
+
+/**
+ A callback for PDAnnotHandler. It gets the annotation handler
+ information flags, which indicate the operations allowed with annotations
+ of this type.
+ @param pdanh IN/OUT The annotation handler responsible for the
+ annotation.
+ @param pdan IN/OUT The annotation.
+ @return The operations allowed.
+ <p>The value is an OR of the following flags:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operation</TH><TH>Description</TH></TR>
+ <TR><TD><code>PDAnnotOperationSummarize</code></TD><TD>It is okay to summarize annotations.</TD></TR>
+ <TR><TD><code>PDAnnotOperationFilter</code></TD><TD>It is okay to filter annotations.</TD></TR>
+ <TR><TD><code>PDAnnotOperationManager</code></TD><TD>It is okay to manage annotations.</TD></TR>
+ <TR><TD><code>PDAnnotIgnorePerms</code></TD><TD>Allow modifying this annotation type in a write-protected document.</TD></TR>
+ <TR><TD><code>PDAnnotOperationAll</code></TD><TD>All operations are allowed.</TD></TR>
+ </TABLE>
+
+ @see PDAnnotHandlerGetAnnotInfoProc
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 ASFlagBits (ACCBPROTO2 *PDAnnotHandlerGetAnnotInfoFlagsProc)(
+ PDAnnotHandler pdanh, PDAnnot pdan);
+
+/** (Optional) A callback for PDAnnotHandler. It returns <code>true</code> if the copy operation is expected
+ to succeed. It tests, for example, whether copying is allowed by document permissions.
+ @param pdanh IN/OUT The annotation handler responsible for this annotation.
+ @param sourcePage The page the annotation is on.
+ @param pdan IN/OUT The annotation object.
+ @return <code>true</code> if the annotation can be copied, <code>false</code> if it cannot.
+
+ @see PDAnnotHandlerCanPasteProc
+ @see PDAnnotHandlerCopyProc
+ @see PDAnnotHandlerPasteProc
+ @see PDAnnotHandlerDestroyDataProc
+ @see PDAnnotCanCopy
+ @see PDRegisterAnnotHandlerCanCopy
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDAnnotHandlerCanCopyProc)(
+ PDAnnotHandler pdanh, PDPage sourcePage, PDAnnot pdan);
+
+/**
+ (Optional) A callback for PDAnnotHandler. It copies data from
+ the annotation object to a new clipboard structure, and
+ returns the clipboard structure.
+ @param pdanh The annotation handler responsible for this
+ annotation.
+ @param sourcePage The page containing the annotation to
+ be copied.
+ @param pdan The annotation object.
+ @return The clipboard structure containing the copied data.
+ @see PDAnnotHandlerCanCopyProc
+ @see PDAnnotHandlerCanPasteProc
+ @see PDAnnotHandlerCopyProc
+ @see PDAnnotHandlerDestroyDataProc
+ @see PDAnnotHandlerPasteProc
+ @see PDAnnotCopy
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 PDAnnotHandlerClipboardData(ACCBPROTO2 *PDAnnotHandlerCopyProc)(
+ PDAnnotHandler pdanh, PDPage sourcePage, PDAnnot pdan);
+
+/**
+ (Optional) A callback for PDAnnotHandler. It returns <code>true</code> 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.
+ @param pdanh The annotation handler responsible for this
+ annotation.
+ @param destPage The page to which the annotation would
+ be pasted.
+ @param center The location for the center of the annotation
+ on the destination page, or a <code>NULL</code> pointer to center the
+ annotation on the destination page's crop box.
+ @param data The copied annotation data to test.
+ @return <code>true</code> if the annotation data can be pasted, <code>false</code> otherwise.
+
+ @see PDAnnotHandlerCanCopyProc
+ @see PDAnnotHandlerCopyProc
+ @see PDAnnotHandlerPasteProc
+ @see PDAnnotHandlerDestroyDataProc
+ @see PDAnnotCanPaste
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDAnnotHandlerCanPasteProc)(
+ PDAnnotHandler pdanh, PDPage destPage, const ASFixedPoint *center, PDAnnotHandlerClipboardData data);
+
+/**
+ (Optional) A callback for PDAnnotHandler. It creates a new annotation
+ on the specified page using clipboard data generated by
+ PDAnnotCopy().
+ @param pdanh The annotation handler responsible for this
+ annotation.
+ @param destPage The page to which the annotation is pasted.
+ @param center The location for the center of the annotation
+ on the destination page, or a <code>NULL</code> pointer to center the
+ annotation in the destination page's crop box.
+ @param data The copied annotation data to paste.
+ @return The new annotation object associated with the page's document.
+
+ @see PDAnnotHandlerCanCopyProc
+ @see PDAnnotHandlerCanPasteProc
+ @see PDAnnotHandlerCopyProc
+ @see PDAnnotHandlerDestroyDataProc
+ @see PDAnnotCopy
+ @see PDAnnotPaste
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 PDAnnot (ACCBPROTO2 *PDAnnotHandlerPasteProc)(
+ PDAnnotHandler pdanh, PDPage destPage, const ASFixedPoint *center, PDAnnotHandlerClipboardData data);
+
+/**
+ (Optional) A callback for PDAnnotHandler. It destroys data from
+ an annotation that has been copied to a clipboard. This
+ callback may be executed regardless of how many times (if
+ any) the annotation was pasted.
+ @param pdanh The annotation handler responsible for this
+ annotation.
+ @param data The copied annotation data to destroy.
+ @see PDAnnotHandlerCanCopyProc
+ @see PDAnnotHandlerCanPasteProc
+ @see PDAnnotHandlerCopyProc
+ @see PDAnnotHandlerPasteProc
+ @see PDAnnotDestroyClipboardData
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDAnnotHandlerDestroyDataProc)(
+ PDAnnotHandler pdanh, PDAnnotHandlerClipboardData data);
+
+/**
+ (Optional) A callback for PDAnnotHandler. It destroys the annotation
+ handler structure when the application no longer requires
+ it. The handler should destroy any dynamic memory stored
+ in the <code>userData</code> field.
+ @param pdanh The annotation handler to destroy.
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDAnnotHandlerDestroyProc)(
+ PDAnnotHandler pdanh);
+
+/**
+ A callback for PDAnnotHandler. It gets the heel point (the focus
+ or starting point) for the annotation. For a rectangular
+ annotation, this is usually the top left corner.
+ @param pdanh The annotation handler whose heel point is
+ obtained.
+ @param pdan The annotation object.
+ @param point (Filled by the method) The heel point for
+ the annotation.
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDAnnotHandlerGetHeelPointProc)(
+ PDAnnotHandler pdanh, PDAnnot pdan, ASFixedPoint *point);
+
+/**
+ A callback for PDAnnotHandler. It is called by the host application
+ to obtain a print appearance (a Form XObject). If this callback
+ is not implemented, the default appearance (if any) is used.
+
+ @param pdanh The annotation handler whose print appearance
+ is obtained.
+ @param pdan The annotation object.
+ @param frAnnot The rectangle in user space in which the
+ annotation will be printed. The handler is free to modify
+ it.
+ @param op The print operation being performed. This is
+ kPDAnnotPrintStandard for a standard print operation, or
+ kPDAnnotPrintVariableData if the user selected Form Fields
+ Only.
+ @return The Form XObject representing the print appearance of the
+ annotation.
+ @see PDRegisterAnnotHandler
+*/
+typedef ACCBPROTO1 CosObj (ACCBPROTO2 *PDAnnotHandlerGetPrintAppearanceProc)(
+ PDAnnotHandler pdanh, PDAnnot pdan, ASFixedRect *frAnnot, PDAnnotPrintOp op);
+
+
+/**
+ 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).
+
+ <p>To fully use a PDAnnotHandler, the AVAnnotHandler associated
+ with this annotation must have its AVAnnotHandlerGetInfoProc()
+ and AVAnnotHandlerDeleteInfoProc() callbacks defined. </p>
+ @see PDRegisterAnnotHandler
+*/
+typedef struct _t_PDAnnotHandler {
+
+ /** The size of the data structure. It must be set to <code>sizeof(PDAnnotHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** A pointer to a block of user-supplied data. */
+ void* userData;
+
+ /** */
+ PDAnnotHandlerGetTypeProc GetType;
+
+ /** */
+ PDAnnotHandlerGetAnnotInfoProc GetAnnotInfo;
+
+ /** */
+ PDAnnotHandlerDeleteAnnotInfoProc DeleteAnnotInfo;
+
+ /** */
+ PDDocWillExportAnnotProc WillExportAnnot;
+
+ /** */
+ PDDocWillImportAnnotProc WillImportAnnot;
+
+ /** */
+ PDAnnotWillPrintProc WillPrintAnnot;
+
+ /** */
+ PDAnnotHandlerGetAnnotInfoFlagsProc GetAnnotInfoFlags;
+
+ /** */
+ PDAnnotHandlerCanCopyProc CanCopy;
+
+ /** */
+ PDAnnotHandlerCopyProc Copy;
+
+ /** */
+ PDAnnotHandlerCanPasteProc CanPaste;
+
+ /** */
+ PDAnnotHandlerPasteProc Paste;
+
+ /** */
+ PDAnnotHandlerDestroyDataProc DestroyData;
+
+ /** */
+ PDAnnotHandlerDestroyProc Destroy;
+
+ /** */
+ PDAnnotHandlerGetHeelPointProc GetHeelPoint;
+
+ /** */
+ PDAnnotHandlerGetPrintAppearanceProc GetPrintAppearance;
+} PDAnnotHandlerRec;
+
+
+/**
+ An enumerated data type that specifies the color space in which a color value is specified
+ (for example, RGB or grayscale).
+*/
+enum {
+
+ /** Grayscale. It requires one value entry to specify the color. */
+ PDDeviceGray,
+
+ /** Red-Green-Blue color specification. It requires three value entries to specify the color.*/
+ PDDeviceRGB,
+
+ /** Cyan-Magenta-Yellow-Black color specification. It requires four value entries to specify the color.*/
+ PDDeviceCMYK
+};
+typedef ASEnum8 PDColorSpace;
+
+/*
+** PDColorValue
+**
+** Value elements must be interpreted according to the color space.
+** PDDeviceGray - 1 value
+** PDDeviceRGB - 3 values
+** PDDeviceCMYK - 4 values
+*/
+
+/**
+ A data structure representing a color. The number of elements
+ needed in the value field depends on the color space type
+ (specified in the space field). See PDColorSpace for more
+ information.
+
+ See also AVPrefsType.
+ @see AVAppBeginFullScreen
+ @see AVPageViewGetColor
+ @see AVPageViewSetColor
+ @see PDAnnotGetColor
+ @see PDAnnotSetColor
+ @see PDStyleGetColor
+*/
+typedef struct _t_PDColorValueRec {
+
+ /** */
+ PDColorSpace space;
+
+ /** */
+ ASFixed value[4];
+} PDColorValueRec, *PDColorValue;
+
+typedef const struct _t_PDColorValueRec *PDConstColorValue;
+
+/** An enumerated data type that specifies the type of changes that occurred for the
+ PDDocPrintingTiledPage() and PDDocDidChangePages() notifications. Not all
+ <code>Did</code> notifications have corresponding <code>Will</code> notifications.
+ @see PDDocDeletePages
+ @see PDDocInsertPages
+ @see PDDocMovePage
+ @see PDPageAddCosContents
+ @see PDPageAddCosResource
+ @see PDPageRemoveCosContents
+ @see PDPageRemoveCosResource
+ @see PDPageSetRotate
+ @see PDPageSetCropBox
+ @see PDPageSetMediaBox
+*/
+enum {
+ /** Page insertion. */
+ pdOpInsertPages,
+
+ /** Page deletion. */
+ pdOpDeletePages,
+
+ /** Page replacement. */
+ pdOpReplacePages,
+
+ /** Page rearrangment. */
+ pdOpMovePages,
+
+ /** Page rotation. */
+ pdOpRotatePages,
+
+ /** Page cropping. */
+ pdOpCropPages,
+
+ /** Only PDDocDidChangePages() exists, not PDDocWillChangePages().*/
+ pdOpAddResources,
+
+ /** Only PDDocDidChangePages() exists, not PDDocWillChangePages().*/
+ pdOpRemoveResources,
+
+ /** Only PDDocDidChangePages() exists, not PDDocWillChangePages().*/
+ pdOpAddContents,
+
+ /** Only PDDocDidChangePages() exists, not PDDocWillChangePages().*/
+ pdOpRemoveContents,
+
+ /** Page media box modification. */
+ pdOpSetMediaBox,
+
+ /** Page bleed box modification. */
+ pdOpSetBleedBox,
+
+ /** Page trim box modification. */
+ pdOpSetTrimBox,
+
+ /** Page art box modification. */
+ pdOpSetArtBox,
+
+ /** Page tab order modification. */
+ pdOpSetTabOrder
+};
+typedef ASEnum8 PDOperation;
+
+/* "defines" for two old (incorrect) PDOperation names previously used in the plug-in API */
+#define pdOpRemoveResource pdOpRemoveResources
+#define pdOpAddResource pdOpAddResources
+
+#define PDAnnotMaxDashes 10
+
+/**
+ The border's dash pattern is specified by <code>dashArray</code> and
+ <code>dashArrayLen</code>. This is a normal PostScript dash pattern (an
+ array of on/off stroke lengths used cyclically) except that
+ zero is always used as the offset (<i>phase</i>) and the number
+ of array entries is limited to PDAnnotMaxDashes. The number
+ of valid dashArray entries is specified by <code>dashArrayLen</code>; a
+ <code>dashArrayLen</code> of <code>0</code> specifies a solid border.
+ @see PDLinkAnnotGetBorder
+ @see PDLinkAnnotSetBorder
+*/
+typedef struct _t_PDLinkAnnotBorder
+{
+
+ /** */
+ ASInt32 hCornerRadius;
+
+ /** */
+ ASInt32 vCornerRadius;
+
+ /** */
+ ASInt32 width;
+
+ /** */
+ ASInt32 dashArrayLen;
+
+ /** */
+ ASFixed dashArray[PDAnnotMaxDashes];
+} PDLinkAnnotBorder;
+
+/************************************************************************************\
+|* *|
+|* PDBookmark *|
+|* *|
+|* You may freely copy or destroy an instance of PDBookmark. *|
+|* Two instances of a PDBookmark designating the same bookmark are guaranteed to *|
+|* contain identical bits. *|
+|* *|
+\************************************************************************************/
+
+/**
+ A bookmark on a page in a PDF file. Each bookmark has a title that appears on
+ screen, and an action that specifies what happens when a user clicks on the
+ bookmark. Bookmarks can either be created interactively by the user through the
+ Acrobat viewer's user interface or programmatically generated. The typical action for a
+ user-created bookmark is to move to another location in the current document,
+ although any action (see PDAction) can be specified.
+
+ @see PDDocGetBookmarkRoot
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkFromCosObj
+ @see PDBookmarkGetByTitle
+ @see PDBookmarkGetParent
+ @see PDBookmarkGetFirstChild
+ @see PDBookmarkGetLastChild
+ @see PDBookmarkGetNext
+ @see PDBookmarkGetPrev
+ @see PDBookmarkDestroy
+ @see PDBookmarkUnlink
+*/
+typedef OPAQUE_64_BITS PDBookmark;
+
+/*
+ Constants that are returned from PDBookmarkGetFlags().
+ @see PDBookmarkGetFlags
+*/
+enum
+{
+ kPDBookmarkFontNormal = 0x00,
+ kPDBookmarkFontItalic = 0x01,
+ kPDBookmarkFontBold = 0x02,
+ kPDBookmarkFontBoldItalic = 0x03
+};
+typedef ASEnum8 PDBookmarkFlags;
+
+/************************************************************************************\
+|* *|
+|* PDFileSpec *|
+|* *|
+\************************************************************************************/
+
+/**
+ The PDF file specification object. It is used to specify a file in an action (see
+ PDAction). A file specification in a PDF file can take two forms:
+
+ <ul>
+ <li>A single platform-independent path.</li>
+ <li>A data structure containing one or more alternative ways to locate the file on different platforms.</li>
+ </ul>
+
+ PDFileSpec objects can be created from ASPathName objects or from Cos objects.
+
+ @see PDActionGetFileSpec
+ @see PDFileSpecNewFromASPath
+ @see PDFileSpecFromCosObj
+*/
+typedef OPAQUE_64_BITS PDFileSpec;
+
+/************************************************************************************\
+|* *|
+|* PDFileSpecHandler *|
+|* *|
+\************************************************************************************/
+
+/**
+ A callback for PDFileSpecHandler. It creates a file specification
+ from an ASPath.
+ @param fileSpecHandlerObj User-supplied data passed in
+ the call to PDRegisterFileSpecHandler().
+ @param pdDoc The PDDoc in which the file specification
+ is created.
+ @param path The ASPathName for which a corresponding file
+ specification is created.
+ @param relativeToThisPath A path name relative to which
+ path is interpreted. If <code>NULL</code>, <code>path</code> is assumed to be an absolute path,
+ not a relative path.
+ @return The file specification corresponding to the specified ASPathName.
+
+ @see PDFileSpecNewFromASPath
+*/
+typedef ACCBPROTO1 PDFileSpec (ACCBPROTO2 *PDFileSpecNewFromASPathProc)(void *fileSpecHandlerObj, PDDoc pdDoc, ASPathName path, ASPathName relativeToThisPath);
+
+/**
+ A callback for PDFileSpecHandler. It aquires the ASPath corresponding
+ to a file specification.
+ @param fileSpecHandlerObj IN/OUT User-supplied data passed in
+ the call to PDRegisterFileSpecHandler().
+ @param fileSpec IN/OUT The PDFileSpec for which an ASPath is acquired.
+
+ @param relativeToThisPath IN/OUT A path name relative to which
+ the PDFileSpec is interpreted. If <code>NULL</code>, <code>fileSpec</code> is assumed
+ to be an absolute path, not a relative path.
+ @return The ASPathName corresponding to the specified path.
+ @see PDFileSpecAcquireASPath
+*/
+typedef ACCBPROTO1 ASPathName (ACCBPROTO2 *PDFileSpecAcquireASPathProc)(void *fileSpecHandlerObj, PDFileSpec fileSpec, ASPathName relativeToThisPath);
+
+/**
+ (Optional) A callback for PDFileSpecHandler. It launches a specified
+ file. It is called when the Acrobat viewer encounters a Launch
+ (GoTo File) action. If this callback is <code>NULL</code>, no launch
+ action is performed.
+ @param fileSpecHandlerObj IN/OUT The registered PDFileSpecHandler.
+ @param pdDoc IN/OUT The document containing the Launch action.
+ @param pdAction IN/OUT The action dictionary.
+ @return <code>true</code> if the handler can perform the Launch, <code>false</code> otherwise.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDLaunchActionProc)(void *fileSpecHandlerObj, PDDoc pdDoc, PDAction pdAction);
+
+/**
+ A data structure that implements a file specification handler. It contains callbacks that
+ implement the file specification handler's functions (converting from a file specification to an
+ ASPathName, creating a new file specification from an ASPathName, and launching
+ the specified file).
+ @see PDRegisterFileSpecHandlerByName
+*/
+typedef struct _t_PDFileSpecHandler {
+ /** Must be <code>sizeof(PDFileSpecHandlerRec)</code>. */
+ ASSize_t size;
+
+ /** */
+ PDFileSpecNewFromASPathProc NewFromASPath;
+
+ /** */
+ PDFileSpecAcquireASPathProc AcquireASPath;
+
+ /** */
+ PDLaunchActionProc LaunchAction;
+
+ /** The file system that is to be used with this file specification handler. */
+ ASFileSys fileSys;
+} PDFileSpecHandlerRec, *PDFileSpecHandler;
+
+/**
+ A callback used by PDDocOpen. It is called when an encrypted
+ document is being opened to determine whether the user is
+ authorized to open the file.
+
+ <p>This callback implements whatever authorization strategy
+ you choose and calls the callbacks of the appropriate security
+ handler (the one that was used to secure the document) to
+ obtain and check authorization data. </p>
+
+ <p>The PDAuthProc() must call the security handler's PDCryptGetAuthDataProc()
+ to obtain whatever authorization data is needed (such as
+ a password), then call PDDocAuthorize() (which is mostly a
+ call to the security handler's PDCryptAuthorizeProc()) to
+ determine whether this data authorizes access to the file
+ (for example, it verifies if the user provided the correct password).
+ The PDAuthProc() must also free the authorization data by
+ calling the security handler's PDCryptFreeAuthDataProc() (or
+ ASfree(), if the handler does not have a PDCryptFreeAuthDataProc()). </p>
+
+ <p>For Acrobat 3.0 and earlier, the correct way to obtain the
+ security handler in a PDAuthProc() is to call PDDocGetNewCryptHandler(),
+ relying on the fact that it returns the security handler
+ if the document has no new security handler, and the fact
+ that at the time the file is opened, it cannot yet have
+ a new security handler (in the future, one or more new
+ methods may be added to make this procedure more straightforward). The
+ Acrobat viewer's built-in authorization procedure works
+ according to the following algorithm: </p>
+
+ <p>Call the security handler's PDCryptAuthorizeProc() with <code>NULL</code>
+ authorization data to automatically handle the case where
+ no authorization data is needed (for example, the file has
+ a <code>NULL</code> password). </p>
+
+ <p>If PDCryptAuthorizeProc() returns <code>true</code>, open the file. </p>
+
+ <p>If PDCryptAuthorizeProc() returns <code>false</code> then Loop for <code>i
+ = 1 to 3</code> {Call the security handler's PDCryptGetAuthDataProc().
+ If PDCryptGetAuthDataProc returns <code>true</code> { Call PDDocAuthorize().</p>
+
+ <p>If it returns <code>true</code> (authorized) call the security
+ handler's PDCryptFreeAuthDataProc(). Exit the loop and return
+ from PDAuthProc().} Call the security handler's PDCryptFreeAuthDataProc().}</p>
+
+ <p>If it failed to get authorization after three attempts,
+ display a dialog box indicating that user is not authorized
+ to open the file.
+ }return from PDAuthProc(). </p>
+
+ @param pdDoc The PDDoc to open.
+ @return <code>true</code> if the user is authorized to open the document, <code>false</code>
+ otherwise.
+ @see PDDocAuthorize
+ @see PDDocOpen
+ @see PDDocOpenEx
+*/
+#if !defined(__SUNPRO_CC) || !defined(_H_THREADSAFEDATA)
+//SunStudio doesn't accept multiple definition if one is under extern "C" while other is not.
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDAuthProc)(PDDoc pdDoc);
+#endif
+
+/**
+ A callback used by PDDocOpenEx(). It is called when an encrypted
+ document is opened, to determine whether the user is authorized
+ to open the file.
+
+ <p>This callback implements whatever authorization strategy
+ you choose and calls the callbacks of the appropriate security
+ handler (the one that was used to secure the document) to
+ obtain and check authorization data. </p>
+
+ <p>The PDAuthProcEx() should obtain the authorization data (usually
+ a password) and call PDDocAuthorize(). PDDocAuthorize() in turn
+ calls the document encryption handler's <code>Authorize</code> function,
+ which returns the permissions that the authorization data
+ enables. PDDocAuthorize() adds these permissions to those
+ currently allowed, and returns the new set of allowed permissions. </p>
+
+ @param pdDoc The PDDoc to open.
+ @param clientData User-supplied data that was passed in
+ the call to PDDocOpenEx().
+ @return <code>true</code> if the user is authorized to open the document, <code>false</code>
+ otherwise.
+ @see PDDocAuthorize
+ @see PDDocOpen
+ @see PDDocOpenEx
+*/
+
+#if !defined(__SUNPRO_CC) || !defined(_H_THREADSAFEDATA)
+//SunStudio doesn't accept multiple definition if one is under extern "C" while other is not.
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDAuthProcEx)(PDDoc pdDoc, void *clientData);
+#endif
+
+/** The user can open and decrypt the document.
+ @ingroup PDPermsFlags
+*/
+#define pdPermOpen 0x01
+
+/** The user can change the document's security settings.
+ @ingroup PDPermsFlags
+*/
+#define pdPermSecure 0x02
+
+/** The user can print the document. Page Setup access is unaffected
+ by this permission, since that affects Acrobat's preferences - not
+ the document's. In the Document Security dialog, this corresponds
+ to the Printing entry.
+ @ingroup PDPermsFlags
+*/
+#define pdPermPrint 0x04
+
+/** The user can edit the document more than adding or modifying
+ text notes (see also pdPermEditNotes). In the Document Security
+ dialog, this corresponds to the Changing the Document entry.
+ @ingroup PDPermsFlags
+*/
+#define pdPermEdit 0x08
+
+/** The user can copy information from the document to the clipboard.
+ In the document restrictions, this corresponds to the
+ Content Copying or Extraction entry.
+ @ingroup PDPermsFlags
+*/
+#define pdPermCopy 0x10
+
+/** The user can add, modify, and delete text notes (see also
+ pdPermEdit). In the document restrictions, this corresponds
+ to the Authoring Comments and Form Fields entry.
+ @ingroup PDPermsFlags
+*/
+#define pdPermEditNotes 0x20
+
+/** The user can perform a Save As.... If both pdPermEdit and
+ pdPermEditNotes are disallowed, Save will be disabled
+ but Save As... will be enabled. The Save As... menu item is not
+ necessarily disabled even if the user is not permitted to
+ perform a Save As....
+ @note This cannot be set by clients.
+ @ingroup PDPermsFlags
+*/
+#define pdPermSaveAs 0x40
+
+/**
+ @ingroup PDPermsFlags
+*/
+#define pdPermExt 0x80
+/* Added perm bits (PV2) used for standard security handler
+** These bits only applies to standard security handler and they are
+** used only when kenLength > 5 (40bits)
+** Note: When keyLength > 5 is specified, standard security handler willl
+** Encrypt Dict with Revision 3. Rev 3 is support by Acrobat 5.0 and up.
+*/
+
+/** Overrides other PDPerm bits. It allows the user to fill in
+ or sign existing form or signature fields.
+ @ingroup PDPermsFlags
+*/
+#define pdPrivPermFillandSign 0x100
+
+/** Overrides pdPermCopy to enable the Accessibility API.
+ If a document is saved in Rev2 format (Acrobat 4.0 compatible),
+ only the pdPermCopy bit is checked to determine the Accessibility API state.
+ @ingroup PDPermsFlags
+*/
+#define pdPrivPermAccessible 0x200
+
+/** Overrides various pdPermEdit bits and allows the following
+ operations: page insert/delete/rotate and create bookmark and thumbnail.
+ @ingroup PDPermsFlags
+*/
+#define pdPrivPermDocAssembly 0x400
+
+/** This bit is a supplement to pdPermPrint. If it is clear
+ (disabled) only low quality printing (Print As Image) is allowed. On UNIX
+ platforms where Print As Image doesn't exist, printing is disabled.
+ @ingroup PDPermsFlags
+*/
+#define pdPrivPermHighPrint 0x800
+
+/* Added perm bit (PV3) used for standard security handler
+** These bits only apply to standard security handler Revision 4
+** R4 is support by Acrobat 6.0 and up.
+*/
+
+/** The user is permitted to perform all operations, regardless of
+ the permissions specified by the document. Unless this
+ permission is set, the document's permissions will be reset to
+ those in the document after a full save.
+ @ingroup PDPermsFlags
+*/
+#define pdPermOwner 0x8000
+
+/** This should be set if the user can submit forms outside of the browser. This bit is
+ a supplement to pdPrivPermFillandSign.
+ @ingroup PDPermsFlags
+*/
+#define pdPrivPermFormSubmit 0x10000
+
+/** This should be set if the user can spawn template pages. This bit will allow
+ page template spawning even if pdPermEdit and pdPermEditNotes are clear.
+ @ingroup PDPermsFlags
+*/
+#define pdPrivPermFormSpawnTempl 0x20000
+
+/**
+ @ingroup PDPermsFlags
+*/
+#define pdPermAll 0xFFFFFFFF
+
+/** The OR of all operations that can be set by the user in the
+ security restrictions (pdPermPrint + pdPermEdit + pdPermCopy + pdPermEditNotes).
+ @ingroup PDPermsFlags
+*/
+#define pdPermSettable (pdPermPrint + pdPermEdit + pdPermCopy + pdPermEditNotes)
+
+/** All permissions.
+ @ingroup PDPermsFlags
+*/
+#define pdPermUser (pdPermAll - pdPermOpen - pdPermSecure)
+
+
+/** Constant values that specify permissions which allow operations on a document file.
+ @see AVCryptGetPassword
+ @see PDDocAuthorize
+ @see PDDocGetPermissions (obsolete)
+ @see PDDocPermRequest
+ @see PDCryptAuthorizeProc
+ @see PDCryptGetAuthDataProc
+*/
+typedef ASUns32 PDPerms;
+
+/************************************************************************************\
+|* *|
+|* PDDocSaveWithParams *|
+|* *|
+\************************************************************************************/
+
+
+/** Flags for the PDDocSave <code>saveFlags</code> parameter.
+ All undefined flags should be set to zero.
+ @see PDDocSave
+ @see PDSaveFlags2
+*/
+enum {
+ /** Save only those portions of the document that have changed.
+ This is provided only as the <i>opposite</i> of <code>PDSaveFull</code>, since there
+ is no bit value of <code>0</code>. */
+ PDSaveIncremental = 0x00,
+
+ /** Save the entire document.
+ Plug-ins that set <code>PDSaveFull</code> are also encouraged to set
+ <code>PDSaveCollectGarbage</code>.
+ */
+ PDSaveFull = 0x01,
+
+ /** Save a copy of the document (the PDDoc continues to use the old file).
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveCopy = 0x02,
+
+ /** Write the PDF file in a format that is optimized for page-served
+ remote (network) access (<i>linearized</i>).
+ This flag is ignored if <code>PDSaveFull</code> is off.
+
+ <p>Prior to Acrobat 7, linearizing a file caused Cos objects to be
+ invalidated, which required that some plug-ins use notifications to
+ release and re-acquire objects. Acrobat 7 onwards, Cos objects
+ are no longer invalidated after a linearized save.</p>
+ */
+ PDSaveLinearized = 0x04,
+
+ /** (Obsolete. In effect, it is always off). Write a PostScript header as part of the saved file.*/
+ PDSaveWithPSHeader = 0x08,
+
+ /** (Obsolete. In effect, it is always on). It is okay to store binary data in the PDF file.*/
+ PDSaveBinaryOK = 0x10,
+
+ /** Remove unreferenced objects, often reducing file
+ size. Plug-ins are encouraged to use this flag.
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveCollectGarbage = 0x20,
+
+ /** Perform an incremental save even if the save is to a
+ different file or the document's version number has
+ changed.
+ */
+ PDSaveForceIncremental = 0x40,
+
+ /** Do not update ModDate in InfoDict.*/
+ PDSaveKeepModDate = 0x80
+};
+typedef ASEnum8 PDSaveFlags;
+
+
+/** More flags for the PDDocSave() <code>saveFlags</code> parameter (<code>PDSaveFlags2</code>).
+ All undefined flags should be set to zero.
+ The first three flags, <code>PDSaveUncompressed</code>, <code>PDSaveCompressed</code>, and
+ <code>PDSaveCompressStructureOnly</code>, are mutually exclusive; they can all
+ be off, but at most one can be on.
+ @see PDDocSave
+ @see PDSaveFlags
+*/
+enum
+{
+ /** Do not use object streams when saving the document (<i>decompress</i> all objects).
+ The result is compatible with all versions of PDF and Acrobat.
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveUncompressed = 1 << 0,
+
+ /** Compress objects, without restrictions about which objects to compress.
+ The result is compatible only with PDF 1.5 (Acrobat 6) or later.
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveCompressed = 1 << 1,
+
+ /** Compress only those objects that are
+ related to logical structure (for example, tagged PDF).
+ The result is compatible with any version of PDF or Acrobat,
+ but the compressed objects are usable only in PDF 1.5 (Acrobat 6).
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveCompressStructureOnly = 1 << 2,
+
+ /** Remove ASCII85 filters from all streams.
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveRemoveASCIIFilters = 1 << 3,
+
+ /** Encode any unencoded stream with Flate, except for metadata streams,
+ which are never encoded, and for streams that would be larger if
+ encoded.
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveAddFlate = 1 << 4,
+
+ /** Replace all LZW filters with FlateEncode filters.
+ This flag is ignored if <code>PDSaveFull</code> is off.
+ */
+ PDSaveReplaceLZW = 1 << 5,
+
+ /** Merge identical forms and images, as determined by an MD5 hash of
+ their contents (it causes OptimizeXObjects() to be called).
+ */
+ PDSaveOptimizeXObjects = 1 << 6,
+
+ /** Look for common initial sub-sequences among content streams (the sequences
+ of marking operators), and generate <i>substreams</i> that can be shared (it causes OptimizeGraphics() to be called).
+ */
+ PDSaveOptimizeContentStreams = 1 << 7,
+
+ /** Merge identical font descriptors and encodings. Does not merge the top-level
+ font dictionary (it causes OptimizeFonts() to be called).
+ */
+ PDSaveOptimizeFonts = 1 << 8,
+
+ /** Delete symbols specific to deleted images from JBIG2 dictionaries that
+ could not be processed at the time of image deletion. It is currently only
+ effective after deleting pages or extracting pages (it causes OptimizeMarkedJBIG2Dictionaries() to be called).
+ */
+ PDSaveOptimizeMarkedJBIG2Dictionaries = 1 << 9,
+
+ /** (Obsolete. In effect, it is always off).
+ */
+ PDSaveEnsure7bitASCII = 1 << 10,
+
+ /** The <code>PDSaveAutoSave</code> flag is used to indicate that the save that occurred is an auto-save event.
+ It is only set when an auto-save occurs. It is a read-only flag.
+ */
+ PDSaveAutoSave = 1 << 11,
+
+ /** The <code>PDSaveOverrideCollections</code> flag controls whether <code>CosObjCollection</code> objects
+ set up prior to saving are honored when doing a non-linearized save. Linearized save
+ always uses its own rules for assigning objects to collections and object streams, so
+ this flag is only used when the <code>PDSaveLinearized</code> flag is off. Furthermore, it is only
+ used if either the <code>PDSaveCompressed</code> or <code>PDSaveCompressStructureOnly</code> flags is set.
+ If this flag is set, the <code>PDDocSave</code> will remove all <code>CosObj</code> objects from their <code>CosObjCollection</code> objects
+ and reassign objects to <code>CosObjCollection</code> objects (and object streams) using its own partitioning
+ algorithms. If the flag is not set, the partitioning algorithms will preserve <code>CosObj</code> objects'
+ existing membership in collections.
+ */
+ PDSaveOverrideCollections = 1 << 12
+};
+/**
+ This enumeration defines the flags used in the <code>saveFlags2</code> bitfield of the PDDocSaveParams structure
+ passed to PDDocSaveWithParams(). These flags are an extension to those defined by the PDSaveFlags enumeration,
+ which are stored in the <code>saveFlags</code> bitfield of the PDDocSaveParams structure.
+ @see PDDocSaveWithParams
+ @see PDDocInsertPages
+ @see PDDocSaveParams
+ @see PDSaveFlags
+*/
+typedef ASFlagBits PDSaveFlags2;
+
+/** A structure used to flag Cos objects you wish to access while a PDDoc is being saved.
+ It contains a pointer to a CosObjSetCallbackFlagProc().
+ In your pre-save callback, you can use this exposed proc to set a flag in the
+ CosObj objects that you care about, so that your callback will be called back during the save
+ and given their offset and length.
+
+ @see CosObjSetCallbackFlagProc
+ @see PDDocOpenWithParams
+*/
+typedef struct _t_PDDocPreSaveInfo {
+
+ /** The size of structure. Set it to <code>sizeof(PDDocPreSaveInfoRec)</code>. */
+ ASSize_t size;
+
+ /** */
+ CosObjSetCallbackFlagProc callbackProc;
+} PDDocPreSaveInfoRec, *PDDocPreSaveInfo;
+
+/**
+ A callback in the PDDocSaveParams structure used by PDDocSaveWithParams().
+ Use this callback to flag Cos objects you wish to access
+ while a PDDoc is being saved.
+ @param pdDoc IN/OUT The PDDoc to be saved.
+ @param preSaveInfo IN/OUT A PDDocPreSaveInfo structure containing
+ information to use during processing before the save.
+ @param clientData IN/OUT User-supplied data that was specified
+ in <code>preSaveProcClientData</code> of the PDDocSaveParams structure.
+
+ @see PDDocSaveWithParams
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDDocPreSaveProc)(
+ PDDoc pdDoc, PDDocPreSaveInfo preSaveInfo, void *clientData);
+
+/**
+ A callback in the PDDocSaveParams structure. It is invoked by PDDocSaveWithParams()
+ immediately before a PDDoc is saved to disk.
+ @param pdDoc The PDDoc to be saved.
+ @param clientData User-supplied data that was specified
+ in <code>preWriteProcClientData</code> of the PDDocSaveParams structure.
+ @see PDDocSaveWithParams
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDDocPreWriteProc)(
+ PDDoc pdDoc, void *clientData);
+
+/**
+ Parameters used when saving a file with PDDocSaveWithParams()
+ and returned by the PDDocWillSaveEx() notification. Most of
+ these parameters are the same as the parameters for PDDocSave().
+
+ @see PDDocSaveWithParams
+*/
+typedef struct _t_PDDocSaveParams {
+
+ /** Set this to be the size of this <code>struct</code>. */
+ ASSize_t size;
+
+ /** It must be one of the PDSaveFlags values.
+ @see PDSaveFlags
+ */
+ PDSaveFlags saveFlags;
+
+ /** The path to which the file is saved. A path must be
+ specified when either <code>PDSaveFull</code> or <code>PDSaveCopy</code> are
+ used for <code>saveFlags</code>. If <code>PDSaveIncremental</code> is
+ specified in <code>saveFlags</code>, then <code>newPath</code> should be
+ <code>NULL</code>.
+ <p>If <code>PDSaveFull</code> is specified and <code>newPath</code> is the same
+ as the file's original path, the new file is saved to a file
+ system determined temporary path. Then the old file is
+ deleted and the new file is renamed to <code>newPath</code>.</p>
+ */
+ ASPathName newPath;
+
+ /** The file system. If it is <code>NULL</code>, it uses the file system of the
+ document's current backing file.
+ @note Implementation restriction: Files can only be saved
+ to the same file system, thus <code>fileSys</code> must be <code>NULL</code> or
+ an error is raised.
+ */
+ ASFileSys fileSys;
+
+ /** Progress monitor. Use
+ AVAppGetDocProgressMonitor() to obtain the
+ default. It may be <code>NULL</code>.
+ @see AVAppGetDocProgressMonitor
+ */
+ ASProgressMonitor mon;
+
+ /** A pointer to user-supplied data to pass to <code>mon</code> each time it
+ is called. It must be <code>NULL</code> if <code>mon</code> is <code>NULL</code>.
+ */
+ void *monClientData;
+
+ /** A callback to test whether an operation should be cancelled. A <code>CancelProc</code>
+ is typically passed to some method that takes a long time
+ to complete. At frequent intervals, the method calls the
+ <code>CancelProc</code>. If it returns <code>true</code>, then the method cancels
+ its operation; if <code>false</code>, it continues.
+
+ @see PDFLPrintCancelProc (Only available with PDF Library SDK)
+ @see AVAppGetCancelProc
+*/
+ ASCancelProc cancelProc;
+
+ /** A pointer to user-specified data to pass to <code>cancelProc</code>
+ each time it is called. It must be <code>NULL</code> if <code>cancelProc</code> is
+ <code>NULL</code>.
+ */
+ void *cancelProcClientData;
+
+ /** A callback to flag Cos objects you wish to access while
+ the PDDoc is being saved.
+ */
+ PDDocPreSaveProc preSaveProc;
+
+ /** A pointer to user-specified data to pass to <code>preSaveProc</code>
+ each time it is called.
+ */
+ void *preSaveProcClientData;
+
+ /** A callback to get information about Cos
+ objects while the PDDoc is being saved.
+ */
+ CosObjOffsetProc offsetProc;
+
+ /** A pointer to user-specified data to pass to <code>offsetProc</code>
+ each time it is called.
+ */
+ void *offsetProcClientData;
+
+ /** The major PDF version number of the document. If <code>major</code>
+ equals <code>0</code>, both <code>major</code> and <code>minor</code> are ignored. Make
+ sure that the document conforms to the version number
+ you are setting.
+ */
+ PDDocVersion major;
+
+ /** The minor PDF version number of the document.*/
+ PDDocVersion minor;
+
+ /** If <code>true</code>, it makes the XML packet containing the
+ XMP metadata for the document read-only and
+ suppresses the generation of padding. If <code>false</code>,
+ the XML packet is made writable and the number of
+ padding bytes specified by the value of
+ the <code>XMPPacketPaddingBytes</code> field is included in
+ the XML packet.
+ */
+ ASBool XMPPacketReadOnly;
+
+ /** Specifies the number of bytes of padding to
+ include in the XML packet containing the XMP
+ metadata for the document, when
+ <code>XMPPacketReadOnly</code> is <code>false</code> (ignored when
+ <code>XMPPacketReadOnly</code> is <code>true</code>). Non-positive values
+ specify the default padding of 2048 bytes;
+ positive values specify the number of bytes of
+ padding directly.
+ */
+ ASInt32 XMPPacketPaddingBytes;
+
+ /** A callback that is called just before the document is written to disk. */
+ PDDocPreWriteProc preWriteProc;
+
+ /** Client data to pass to the pre-write proc. */
+ void *preWriteProcClientData;
+
+ /** More flags for PDDocSave(). */
+ PDSaveFlags2 saveFlags2; /* */
+
+ /** The number of incremental saves to <i>compact</i>. It will eliminate
+ the last <code>numSubFilesToCompact</code> subFiles (as opposed to the update section, which
+ does not always correspond to a valid subFile), and merge the changes in them into
+ the current append save.
+
+ <p>This parameter is taken into account only if:</p>
+
+ <ul>
+ <li>The current save operation is an incremental save AND </li>
+ <li>The current save operation is a saveAs. </li>
+ </ul>
+
+ <p>More precisely, compaction of incremental saves will only happen only if:</p>
+
+ <ul>
+ <li><code>newPath != NULL</code> AND </li>
+ <li>either <code>PDSaveForceIncremental</code> is set or the document has digital signatures in it, or both. </li>
+ </ul>
+
+ <p>Moreover, if there are any signatures added in any of the incremental saves that are compacted,
+ these signatures will be invalidated. It is up to the client to determine the incremental
+ save at which it should stop compacting to avoid this.</p>
+ */
+ ASUns32 numSubFilesToCompact;
+
+} PDDocSaveParamsRec;
+typedef struct _t_PDDocSaveParams *PDDocSaveParams;
+
+
+/**
+ A structure used to pass information to the PDDocWillInsertPagesEx()
+ and PDDocDidInsertPagesEx() notifications.
+ @see PDDocInsertPages
+*/
+typedef struct _t_PDDocInsertPagesParams {
+
+ /** The size of the data structure. It must be set to
+ <code>sizeof(PDDocInsertPagesParamsRec)</code>.
+ */
+ ASSize_t size;
+
+ /** The document into which pages are inserted. This document
+ must have at least one page.
+ */
+ PDDoc targetDoc;
+
+ /** The page number in <code>targetDoc</code> after which pages from
+ <code>srcDoc</code> are inserted. The first page is <code>0</code>. If
+ PDBeforeFirstPage (see PDExpT.h) is used, the pages are
+ inserted before the first page in <code>targetDoc</code>. Use PDLastPage
+ to insert pages after the last page in <code>targetDoc</code>.
+ */
+ PDPageNumber insertAfterThisPage;
+
+ /** The document containing the pages that are inserted into <code>targetDoc</code>.*/
+ PDDoc srcDoc;
+
+ /** The page number of the first page in <code>srcDoc</code> to insert into
+ <code>targetDoc</code>. The first page is <code>0</code>.
+ */
+ PDPageNumber srcFromPage;
+
+ /** The page number of the last page in <code>srcDoc</code> to insert into targetDoc.*/
+ PDPageNumber srcToPage;
+
+ /** Flags that determine what additional information is copied from
+ <code>srcDoc</code> into <code>targetDoc</code>. It must be an OR of the following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Flag</TH><TH>Description</TH></TR>
+ <TR><TD><code>PDInsertAll</code></TD><TD>Inserts the entire document <code>srcDoc</code> into the
+ document <code>targetDoc</code>. This operation not only inserts the
+ pages themselves, but also merges other document data from
+ <code>srcDoc</code> into <code>targetDoc</code>. In particular, the following happens:
+ <ul>
+ <li>The bookmark tree of <code>srcDoc</code> is merged into the bookmark
+ tree of <code>targetDoc</code> by copying it as a new first-level sub-tree of the
+ <code>targetDoc</code> object's bookmark tree root, of which it becomes the last
+ child. If <code>targetDoc</code> has no bookmark tree, it acquires one
+ identical to the bookmark tree from <code>srcDoc</code>.</li>
+ <li>Named destinations from <code>srcDoc</code> (of PDF 1.1 and later) are
+ copied into <code>targetDoc</code>. If there are named destinations in
+ <code>srcDoc</code> with the same name as some named destination in
+ <code>targetDoc</code>, the ones in <code>targetDoc</code> retain their names and the
+ copied named destinations are given new names based on the
+ old ones with distinguishing digits added. Actions and
+ bookmarks referring to the old names are made to refer to the
+ new names after being copied into <code>targetDoc</code>.</li>
+ <li>Document logical structure from <code>srcDoc</code> is copied into
+ <code>targetDoc</code>. The top-level children of the structure tree root of
+ <code>srcDoc</code> are copied as new top-level children of the structure
+ tree root of <code>targetDoc</code>; a structure tree root is created in
+ <code>targetDoc</code> if there was none before. The role maps of the two
+ structure trees are merged, with name conflicts resolved in favor
+ of the role mappings present in <code>targetDoc</code>. Attribute objects
+ are not copied, nor is class map information from <code>srcDoc</code>
+ merged into that for <code>targetDoc</code>.</li>
+ </ul>
+ If the <code>PDInsertAll</code> flag is not set, pages copied from <code>srcDoc</code> into
+ <code>targetDoc</code> will have their structure back-pointer information
+ stripped off.</TD></TR>
+ <TR><TD><code>PDInsertBookmarks</code></TD><TD>Inserts bookmarks as well as pages.</TD></TR>
+ <TR><TD><code>PDInsertThreads</code></TD><TD>Inserts threads as well as pages.</TD></TR>
+ </TABLE>
+
+ */
+ PDSmallFlagBits insertFlags;
+
+ /** An error code which is only valid for the PDDocDidInsertPagesEx() notification.*/
+ ASErrorCode error;
+} PDDocInsertPagesParamsRec;
+typedef struct _t_PDDocInsertPagesParams *PDDocInsertPagesParams;
+
+/**
+ A structure used by PDDocOpenWithParams() to specify file open
+ information. The parameters are very similar to those in
+ PDDocOpenEx() and PDDocOpenFromASFileEx().
+ @see PDDocOpenWithParams
+*/
+typedef struct _t_PDDocOpenParams *PDDocOpenParams;
+/**
+ A structure used by PDDocOpenWithParams() to specify file open
+ information. The parameters are very similar to those in
+ PDDocOpenEx() and PDDocOpenFromASFileEx().
+ @see PDDocOpenWithParams
+*/
+typedef struct _t_PDDocOpenParams {
+
+ /** The size of the data structure. It must be set to <code>sizeof(PDDocOpenParamsRec)</code>.*/
+ ASSize_t size;
+
+ /** The path name to the file, specified in whatever format is correct for <code>fileSys</code>.*/
+ ASFile file;
+
+ /** The path name to the file, specified in whatever format is correct for <code>fileSys</code>.*/
+ ASPathName fileName;
+
+ /** A pointer to an ASFileSysRec containing the file system in which the file resides.*/
+ ASFileSys fileSys;
+
+ /** An authorization callback, called only if the file is encrypted.
+ This callback should obtain whatever information is
+ needed to determine whether the user is
+ authorized to open the file, then call PDDocAuthorize()
+ (which returns the permissions that the authentication
+ data enables). If the file is encrypted and <code>authProcEx</code> is
+ <code>NULL</code> or returns <code>false</code>, <code>pdErrPassword</code> is raised.
+ The Acrobat viewer's built-in authorization procedure
+ requires the user to enter a password, and allows the
+ user to try three times before giving up.
+ */
+ PDAuthProcEx authProcEx;
+
+ /** A pointer to user-specified data to pass to authProcEx() each time it is called.*/
+ void *authProcClientData;
+
+ /** If <code>true</code>, attempt to repair the file if it is damaged; if <code>false</code>, do not attempt to repair the file if it is damaged.*/
+ ASBool doRepair;
+
+ /** The permissions to remove from the document.*/
+ PDPerms restrictPerms;
+} PDDocOpenParamsRec;
+
+/**
+ An enumerated data type that specifies whether thumbnail images or bookmarks are
+ shown.
+ @see AVDocGetViewMode
+ @see AVDocSetViewMode
+ @see PDDocGetPageMode
+ @see PDDocSetPageMode
+*/
+enum {
+
+ /** Leaves the view mode as is. */
+ PDDontCare,
+
+ /** Displays the document, but displays neither thumbnails nor bookmarks.*/
+ PDUseNone,
+
+ /** Displays the document plus thumbnails.*/
+ PDUseThumbs,
+
+ /** Displays the document plus bookmarks.*/
+ PDUseBookmarks,
+
+ /** Displays the document in full-screen viewing mode. This is equivalent to AVAppBeginFullScreen(). */
+ PDFullScreen,
+
+ /** */
+ PDContents,
+
+ /** */
+ PDUseOC,
+
+ /** Displays the document plus attachments. */
+ PDUseAttachments
+};
+typedef ASEnum8 PDPageMode;
+
+/**
+ A structure that defines the layout of a document. The layout can be set as the viewer's
+ <code>avpPageViewLayoutMode</code> preference (set by AVAppSetPreference()) or in a view
+ of a document by the <code>pageViewLayoutMode</code> field in AVDocViewDef (set by
+ AVDocGetViewDef()).
+ @see AVDocGetViewDef
+ @see AVPageViewGetLayoutMode
+ @see AVPageViewSetLayoutMode
+*/
+enum {
+
+ /** (Default) Use the user preference when opening the
+ file, as specified in the <code>avpPageViewLayoutMode</code>
+ preference, set by AVAppSetPreference().
+ */
+ PDLayoutDontCare,
+
+ /** Use single-page mode, as in pre-Acrobat 3.0 viewers.*/
+ PDLayoutSinglePage,
+
+ /** Use one-column continuous mode.*/
+ PDLayoutOneColumn,
+
+ /** Use two-column continuous mode with the first page on the left.*/
+ PDLayoutTwoColumnLeft,
+
+ /** Use two-column continuous mode with the first page on the right.*/
+ PDLayoutTwoColumnRight,
+
+ /** */
+ PDLayoutTwoPageLeft,
+
+ /** */
+ PDLayoutTwoPageRight
+};
+typedef ASEnum8 PDLayoutMode;
+
+/** An enumerated data type that specifies various file status attributes.
+ These flags indicate the state of the document and whether it needs
+ to be saved or deleted on close, and so on.
+ The flags are used as a bit field. More than one value may be set.
+ Some flags may be set or get only. Most can be either set or get.
+ @see PDDocClearFlags
+ @see PDDocGetFlags
+ @see PDDocSetFlags
+*/
+enum {
+
+ /** The document has been modified and needs to be saved. (get/set) */
+ PDDocNeedsSave = 0x0001,
+
+ /** The document cannot be saved incrementally;
+ when it is saved using PDDocSave(), the
+ <code>PDSaveFull</code> flag must be specified (see
+ PDSaveFlags). (get/set)
+ */
+ PDDocRequiresFullSave = 0x0002,
+
+ /** The document has been modified slightly (for example, bookmarks or text annotations have been
+ opened or closed), but not in a way that
+ warrants saving. (get only)
+ */
+ PDDocIsModified = 0x0004,
+
+ /** The document is based on a temporary file that
+ must be deleted when the document is closed
+ or saved. (get/set)
+ */
+ PDDocDeleteOnClose = 0x0008,
+
+ /** The document was repaired when it was opened. (get only) */
+ PDDocWasRepaired = 0x0010,
+
+ /** The document's major version is newer than current. (get only) */
+ PDDocNewMajorVersion = 0x0020,
+
+ /** The document's minor version is newer than current. (get only)*/
+ PDDocNewMinorVersion = 0x0040,
+
+ /** The document's version is older than current. (get only) */
+ PDDocOldVersion = 0x0080,
+
+ /** Do not display errors. (get/set) */
+ PDDocSuppressErrors = 0x0100,
+
+ /** The document is embedded in a compound document (OLE, OpenDoc). (get/set) */
+ PDDocIsEmbedded = 0x0200,
+
+ /** The document is linearized (optimized) for page-served remote (network) access. (get only) */
+ PDDocIsLinearized = 0x0400,
+
+ /** The document is optimized. If this flag is cleared,
+ the Batch Optimizer plug-in and the Adobe
+ PDF Library do not save the file optimized.
+ You can, therefore, linearize a PDF file
+ without optimizing it. Optimizing without
+ linearizing is not allowed, however. (set only)
+ */
+ PDDocIsOptimized = 0x0800,
+
+ /** The underlying file is PxDF (get/set). */
+ PDDocIsPXDF = 0x1000,
+
+ /** Compress all objects (that it can) when saving (get/set). */
+ PDDocFullObjectCompression = 0x2000
+};
+
+
+/** Used by PDDocInsertPages().
+ @see PDDOcInsertPages
+*/
+typedef enum {
+
+ /** Insert bookmarks as well as pages. */
+ PDInsertBookmarks = 0x0001,
+
+ /** Insert all Catalog and Info dictionary values as well as pages. */
+ PDInsertAll = 0x1000,
+
+ /** Insert articles as well. */
+ PDInsertThreads = 0x0002
+} PDInsertFlags;
+
+/*
+** PDPageNumber specification defines -- use where a page number or range or count
+** is required.
+*/
+#define PDBeforeFirstPage ((PDPageNumber) -1)
+#define PDLastPage ((PDPageNumber) -2)
+#define PDAllPages ((PDPageNumber) -3)
+#define PDOddPagesOnly ((PDPageNumber) -4)
+#define PDEvenPagesOnly ((PDPageNumber) -5)
+
+/************************************************************************************\
+|* *|
+|* PDFind *|
+|* *|
+\************************************************************************************/
+typedef struct _t_PDFind *PDFind;
+
+/** Passed to PDFindText(). */
+enum {
+
+ /** Find whole words only. */
+ PDFindWholeWords = 0x0001,
+
+ /** Perform a case-sensitive search. */
+ PDFindCaseSens = 0x0002,
+
+ /** Perform a reverse order search. */
+ PDFindReverse = 0x0004,
+
+ /** Return a PDTextSelect with all found words on the page. */
+ PDFindAllOnPage = 0x0008,
+
+ /** Do not perform a match of full-width/half-width Kana characters. */
+ PDFindIgnoreFH = 0x0100,
+
+ /* Ignore diacritics. */
+ PDFindIgnoreDiacritics = 0x0200,
+
+ /** Reset to the beginning of the document. */
+ PDFindReset = 0x0800
+
+};
+typedef ASEnum8 PDFindFlags;
+
+
+/************************************************************************************\
+|* *|
+|* PDFont *|
+|* *|
+\************************************************************************************/
+
+
+/*
+** These flags define the bit masks for the flags field in structure PDFontFlags.
+*/
+#define PDFONTFLAGS_USEDBYFORM 0x00000001
+
+/**
+ A data structure containing additional information about a font.
+ @see PDDocEnumFonts
+ @see PDFontEnumProc
+*/
+typedef struct _t_PDFontFlags {
+
+ /** Not used. For backward compatibility. */
+ ASInt32 notUsed;
+
+ /** It must be an OR of the <code>PDFONTFLAGS_</code> values. All unused flags must be off. */
+ ASUns32 flags;
+} PDFontFlags;
+
+/**
+ A callback used by PDDocEnumFonts() and PDDocEnumLoadedFonts().
+ It is called once for each font.
+ @param font The font currently being enumerated.
+ @param fontFlags PDFontFlags used when PDDocEnumFonts() was called.
+ @param clientData User-supplied data passed in the call
+ to PDDocEnumFonts() or PDDocEnumLoadedFonts().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDDocEnumFonts
+ @see PDDocEnumLoadedFonts
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDFontEnumProc)(PDFont font, PDFontFlags *fontFlags, void *clientData);
+
+/*
+** PSNAMESIZE is a typical maximum length for a font name.
+*/
+#define PSNAMESIZE 64
+
+/*
+** These flags define the bit masks for the flags field returned by PDFontGetFlags().
+*/
+#define PD_FIXED_WIDTH 0x00000001
+#define PD_SERIF 0x00000002
+#define PD_PI 0x00000004
+#define PD_SCRIPT 0x00000008
+#define PD_STD_ENCODING 0x00000020
+#define PD_ITALIC 0x00000040
+#define PD_ALL_CAP 0x00010000
+#define PD_SMALL_CAP 0x00020000
+#define PD_FORCE_BOLD 0x00040000
+
+
+/** An enumerated data type that specifies a font's encoding. */
+enum {
+
+ /** The encoding specified internally in the font. In the
+ case of a Type 1 or MMType 1 font, this is specified
+ by the Encoding value in the font's <code>fontdict</code>. In the
+ case of TrueType fonts, this is the encoding specified
+ by the default one-byte <code>CMap</code> for the platform.
+ */
+ PDBuiltInEncoding = -1,
+
+ /** MacRomanEncoding, as defined in Appendix D in
+ the <i>PDF Reference</i>.
+ */
+ PDMacRomanEncoding = 0,
+
+ /** MacExpertEncoding, as defined in Appendix D in
+ the <i>PDF Reference</i>.
+ */
+ PDMacExpertEncoding = 1,
+
+ /** WinAnsiEncoding, as defined in Appendix D in
+ the <i>PDF Reference</i>.
+ */
+ PDWinAnsiEncoding = 2,
+
+ /** StandardEncoding, as defined in Appendix D in
+ the <i>PDF Reference</i>.
+ */
+ PDStdEncoding = 3,
+
+ /** PDFDocEncoding, as defined in Appendix D in the
+ <i>PDF Reference</i>. This will never be returned for a
+ font; it is used internally.
+ */
+ PDFDocEncoding = 4,
+
+ /** */
+ PDLastKnownEncoding
+};
+typedef ASEnum8 PDFontEncoding;
+
+#define PDLastOneByteEncoding PDLastKnownEncoding
+#define PDUnicodeEncoding PDLastKnownEncoding
+
+/** An enumerated data type that identifies the character set of a Type 1, Multiple Master Type 1,
+ or TrueType font.
+*/
+enum {
+
+ /** The font does not use Adobe standard encoding.*/
+ PDUnknownCharSet = 0,
+
+ /** The font uses Adobe standard encoding. This is
+ determined by the <code>"Uses Adobe Standard
+ Encoding"</code> bit in the font descriptor.
+ */
+ PDStandardRomanCharSet = 1,
+
+ /** Currently unused. */
+ PDAdobeExpertCharSet = 2,
+
+ /** */
+ PDLastCharSet
+};
+
+typedef ASEnum8 PDCharSet;
+
+/* Font Embedding -- segment types */
+#define PD_SEGASCII ((ASUns8) 1)
+#define PD_SEGBINARY ((ASUns8) 2)
+#define PD_SEGEOF ((ASUns8) 3)
+
+/**
+ A data structure containing PANOSE and sFamily class values
+ for a font. It is used in the PDFontMetrics structure. See Section
+ 5.7.2 in the <i>PDF Reference</i> for more information. For additional
+ details on the PANOSE number, see the <i>Japanese TrueType Font
+ Property Selection Guidelines</i> by the TrueType Conference
+ Technical Committee.
+ @see PDFontGetMetrics
+ @see PDFontSetMetrics
+*/
+typedef struct _t_PDFontStyles {
+
+ /** A number that identifies the font family and determines the
+ meaning of the remaining PANOSE digits. The possible families
+ are Latin, Kanji, Hebrew, and so forth.
+ */
+ ASUns8 sFamilyClassID;
+
+ /** A number to identify the kind of family: text, decorative,
+ handwritten, symbols, and so on.
+ */
+ ASUns8 sFamilySubclassID;
+
+ /** A number to identify the family type: text, decorative,
+ handwritten, symbols, and so on.
+ */
+ ASUns8 bFamilyType;
+
+ /** A number that specifies the font's serif style, such as cove,
+ obtuse cove, square, bone, and so forth.
+ */
+ ASUns8 bSerifStyle;
+
+ /** A number that specifies the font's weight, such as very
+ light, heavy, black, and so on.
+ */
+ ASUns8 bWeight;
+
+ /** A number that specifies the font's proportions, such as
+ modern, expanded, condensed, mono-spaced, and so on.
+ */
+ ASUns8 bProportion;
+} PDFontStyles;
+
+/**
+ A data structure containing information about a font's metrics.
+ See Section 5.5.1 in the <i>PDF Reference</i> for more information
+ about font metrics.You also can find information about Adobe
+ Font Metrics (AFM) at http://partners.adobe.com/asn.
+ @see PDFontGetMetrics
+ @see PDFontSetMetrics
+*/
+typedef struct _t_PDFontMetrics {
+
+ /** It must be an OR of the Font Flags values. All unused flags must be off. */
+ ASFlagBits flags;
+
+ /** A font bounding box in 1000 EM units. An EM is a typographic
+ unit of measurement equal to the size of a font. In a 12-point
+ font, an EM is 12 points.
+ */
+ ASFixedRect fontBBox;
+
+ /** The width of the missing character (<code>.notdef</code>) */
+ PDiFontMetric missingWidth;
+
+ /** The vertical stem width. */
+ PDiFontMetric stemV;
+
+ /** The horizontal stem width. */
+ PDiFontMetric stemH;
+
+ /** The capital height. */
+ PDiFontMetric capHeight;
+
+ /** The X height. */
+ PDiFontMetric xHeight;
+
+ /** The maximum ascender height. */
+ PDiFontMetric ascent;
+
+ /** The maximum descender depth. */
+ PDiFontMetric descent;
+
+ /** The additional leading between lines. */
+ PDiFontMetric leading;
+
+ /** The maximum character width. */
+ PDiFontMetric maxWidth;
+
+ /** The average character width. */
+ PDiFontMetric avgWidth;
+
+ /** The italic angle in degrees, if any. */
+ PDFontAngle italicAngle;
+
+ /** The PANOSE and sFamily class values. */
+ PDFontStyles style;
+
+ /** The baseline adjustment, which is a vertical adjustment for font
+ baseline difference and writing mode 1 (vertical). This should
+ only be used for CIDFontType 2 fonts with font substitution.
+ */
+ PDFontOffset baseLineAdj;
+} PDFontMetrics, *PDFontMetricsP;
+
+/************************************************************************************\
+|* *|
+|* PDPage & Contents & Resources *|
+|* *|
+\************************************************************************************/
+
+
+/** Specifies page rotation, in degrees. It is used for routines that
+ set or get the value of a page's Rotate key.
+ @see PDPageGetRotate
+ @see PDPageSetRotate
+*/
+enum {
+ /** */
+ pdRotate0 = 0,
+
+ /** */
+ pdRotate90 = 90,
+
+ /** */
+ pdRotate180 = 180,
+
+ /** */
+ pdRotate270 = 270
+};
+typedef ASEnum16 PDRotate;
+
+/** All graphic objects that comprise page, charproc, and PDForm descriptions.
+ @see PDGraphicEnumMonitor
+ */
+typedef struct _t_PDGraphic *PDGraphic,
+ /* as well as the following subtypes of PDGraphic */
+ *PDText,
+ *PDPath,
+ *PDInlineImage;
+
+/** A superclass used for PDF XObjects. Acrobat currently uses two XObject subclasses:
+ PDImage and PDForm. You can use any PDXObject method on these three objects.
+ @see PDXObjectEnumFilters
+ @see PDXObjectGetData
+*/
+typedef struct _t_PDXObject *PDXObject; /* Note that a PDFont is really a PDXObject */
+
+/* Type 3 Font CharProc */
+typedef struct _t_PDCharProc *PDCharProc;
+
+/**
+ A path object consists of a sequence of segment operators (moveto, lineto, and so on),
+ as well as a set of operations to be performed with the path.
+ Note that the operations include doing nothing, closing, stroking, filling
+ and using the path as a clip.
+ @see PDPathPaintOp
+*/
+enum {
+ /** */
+ pdSegMoveTo,
+ /** */
+ pdSegLineTo,
+ /** */
+ pdSegCurveTo,
+ /** */
+ pdSegVCurveTo,
+ /** */
+ pdSegYCurveTo,
+ /** */
+ pdSegRect,
+ /** */
+ pdSegClosePath
+};
+typedef ASEnum8 PDPathSegmentOp;
+
+/**
+ A path object consists of a sequence of segment operators (moveto, lineto, an so on),
+ as well as a set of operations to be performed with the path.
+ Note that the operations include doing nothing, closing, stroking, filling
+ and using the path as a clip.
+ @see PDPathSegmentOp
+ @see PDPathGetPaintOp
+*/
+enum {
+ /** The path is not painted. */
+ pdPathNoPaint = 0,
+ /** The path contains a closepath operator. */
+ pdPathOpClose = 1,
+ /** The path contains a stroke operator. */
+ pdPathStroke = 2,
+ /** The path contains a fill operator. */
+ pdPathFill = 4,
+ /** The path contains an eofill operator. */
+ pdPathEOFill = 8,
+ /** The path contains a clip operator. */
+ pdPathClip = 16,
+ /** The path contains an eoclip operator. */
+ pdPathEOClip = 32
+};
+typedef ASEnum8 PDPathPaintOp;
+
+/** A data structure containing information about the current graphics state.
+ @see PDGraphicGetState
+*/
+typedef struct _t_PDGraphicState {
+ /** Current transformation matrix. */
+ ASFixedMatrix ctm;
+
+ /** Fill color. */
+ ASFixed fillColor[4];
+
+ /** Stroke color. */
+ ASFixed strokeColor[4];
+
+ /** Fill color space. */
+ ASAtom fillCSpace;
+
+ /** Stroke color space. */
+ ASAtom strokeCSpace;
+
+ /** Flatness tolerance. */
+ ASFixed flatness;
+
+ /** Line cap style. */
+ ASInt32 lineCap;
+
+ /** Dash phase. */
+ ASFixed dashPhase;
+
+ /** Length of dash array. */
+ ASTArraySize dashLen;
+
+ /** Fixed to 10. The viewer has been extended to support dashes of any length. */
+ ASFixed dashes[10];
+
+ /** Line join style. */
+ ASInt32 lineJoin;
+
+ /** Line width. */
+ ASFixed lineWidth;
+
+ /** Miter limit. */
+ ASFixed miterLimit;
+} PDGraphicState, *PDGraphicStateP;
+
+/** A data structure containing information about the current text state.
+ @see PDTextGetState
+*/
+typedef struct _t_PDTextState {
+ /** Text font. */
+ PDFont font;
+
+ /** Character spacing. */
+ ASFixed charSpacing;
+
+ /** Word spacing. */
+ ASFixed wordSpacing;
+
+ /** Horizontal scaling. */
+ ASFixed horizontalScale;
+
+ /** Leading. */
+ ASFixed leading;
+
+ /** Text rise. */
+ ASFixed textRise;
+
+ /** Text font size. */
+ ASFixed textSize;
+
+ /** Text rendering mode. */
+ ASInt32 renderMode;
+
+ /** Text matrix. */
+ ASFixedMatrix textMatrix;
+} PDTextState, *PDTextStateP;
+
+/**
+ A data structure containing information about the attributes
+ of an image. See Section 4.8 in the <i>PDF Reference</i> for more
+ information.
+ @see PDImageGetAttrs
+ @see PDInlineImageGetAttrs
+*/
+typedef struct _t_PDImageAttrs {
+ /** (Required) The width of the source image in samples. */
+ PDImageScalar width;
+ /** (Required) The height of the source image in samples. */
+ PDImageScalar height;
+ /** (Required) The number of bits used to represent each color component. */
+ PDCount bitsPerComponent;
+ /** (Optional) <code>true</code> if the image should be treated as a mask, <code>false</code> otherwise.*/
+ ASBool imageMask;
+ /** (Optional) <code>true</code> if interpolation is performed, <code>false</code> otherwise.
+ Interpolation attempts to smooth transitions between sample values.
+ */
+ ASBool interpolate;
+ /** <code>true</code> if <code>decode</code> is used, <code>false</code> otherwise.*/
+ ASBool haveDecode;
+ /** (Optional) An array of numbers specifying the mapping from
+ sample values in the image to values appropriate for the current color space.
+ */
+ ASFixed decode[8];
+ /** An ASAtom representing the color space name.*/
+ ASAtom colorSpaceName;
+ /** <code>true</code> if the color space is indexed, <code>false</code> otherwise.*/
+ ASBool isIndexed;
+ /** (Optional) This is used if <code>isIndexed</code> is <code>true</code>. Colors are specified by integers in the range <code>0</code> to <code>hival</code>.*/
+ PDCount hiVal;
+ /** (Required for images, not allowed for image masks) A Cos object of the color space used for the image samples.*/
+ CosObj colorSpace;
+ /** The length of the sample data in bytes. */
+ ASTArraySize dataLen;
+ /* Added in Acrobat 4.0 */
+ /** The number of components in <code>colorSpace</code>. For instance, <code>comps</code> is <code>3</code> for an RGB color space.*/
+ PDCount comps;
+} PDImageAttrs, *PDImageAttrsP;
+
+/**
+ A callback for PDResourceEnumMonitor. It is a procedure called for
+ font resources.
+ @param font IN/OUT The font.
+ @param name IN/OUT The name of the font as it appears in the Resources
+ dictionary.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDFormEnumResources().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see PDFormEnumResources
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDResourceEnumFontProc) (PDFont font, char *name, void *clientData);
+
+/**
+ A callback for PDResourceEnumMonitor. It is a procedure called for
+ XObject resources.
+ @param xObject IN/OUT The XObject.
+ @param name IN/OUT The name of the XObject as it appears in the
+ Resources dictionary.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDFormEnumResources().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see PDFormEnumResources
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDResourceEnumXObjectProc) (PDXObject xObject, char *name, void *clientData);
+
+/**
+ A callback for PDResourceEnumMonitor. It is a procedure called for
+ ProcSet resources.
+ @param name IN/OUT The name of the ProcSet as it appears in the
+ Resources dictionary.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDFormEnumResources().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDFormEnumResources
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDResourceEnumProcSetProc) (char *name, void *clientData);
+
+/**
+ A callback for PDResourceEnumMonitor. It is called for color
+ space resources.
+ @param name IN/OUT The color space name.
+ @param colorSpace IN/OUT The name of the color space as it appears
+ in the Resources dictionary.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDFormEnumResources().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDFormEnumResources
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDResourceEnumColorSpaceProc) (char *name, CosObj colorSpace, void *clientData);
+
+/**
+ A data structure containing callbacks used when enumerating
+ the resources of a form with PDFormEnumResources() or PDPageEnumResources().
+
+ @note PDPageEnumResources is provided only for backwards
+ compatibility. It has not been updated beyond PDF Version
+ 1.1 and may not work correctly for newly-created PDF 1.2
+ or later files. You should use the PDFEdit API to enumerate
+ page resources.
+ @see PDFormEnumResources
+*/
+typedef struct _t_PDResourceEnumMonitor *PDResourceEnumMonitor;
+/**
+ A data structure containing callbacks used when enumerating
+ the resources of a form with PDFormEnumResources() or PDPageEnumResources().
+
+ @note PDPageEnumResources() is provided only for backwards
+ compatibility. It has not been updated beyond PDF Version
+ 1.1 and may not work correctly for newly-created PDF 1.2
+ or later files. You should use the PDFEdit API to enumerate
+ page resources.
+ @see PDFormEnumResources
+*/
+typedef struct _t_PDResourceEnumMonitor {
+ /** The size of the data structure. It must be set to <code>sizeof(PDResourceEnumMonitorRec)</code>. */
+ ASSize_t size;
+ /** */
+ PDResourceEnumFontProc EnumFont;
+ /** */
+ PDResourceEnumXObjectProc EnumXObject;
+ /** */
+ PDResourceEnumProcSetProc EnumProcSet;
+ /** */
+ PDResourceEnumColorSpaceProc EnumColorSpace;
+} PDResourceEnumMonitorRec;
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every text
+ operator.
+ @param obj IN/OUT The text object.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumTextProc) (PDText obj, void *clientData);
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every path
+ operator.
+ @param obj IN/OUT The path data.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumPathProc) (PDPath obj, void *clientData);
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every image
+ operator.
+ @param obj IN/OUT Image data.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumImageProc) (PDInlineImage obj, void *clientData);
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every XObject
+ (Do) operator.
+ @param name IN/OUT The XObject's name.
+ @param bbox IN/OUT The XObject's bounding box, describing the
+ bounding box of the XObject in user space. This is only
+ the case for top-level XObjects. If a Form XObject refers
+ to another XObject, the second XObject's bounding box is
+ the 'infinity' bounding box.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumXObjectRefProc) (char *name, ASFixedRect *bbox, void *clientData);
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every Q (save)
+ operator.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumSaveProc) (void *clientData);
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every Q (restore)
+ operator.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumRestoreProc) (void *clientData);
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every d0 (<code>setcharwidth</code>) operator.
+ @param width IN/OUT Array of numbers containing the two parameters
+ passed to the d0 operator.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumCharWidthProc) (ASFixedPoint width, void *clientData);
+
+/**
+ A callback for PDGraphicEnumMonitor. It is called for every d1 (<code>setcachedevice</code>) operator.
+ @param parms IN/OUT An array of numbers containing the 6 parameters
+ passed to the d1 operator.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumCacheDeviceProc) (ASFixed *parms, void *clientData);/* Added in Acrobat 3.0 */
+
+/**
+ A callback for PDGraphicEnumMonitor. It gets the current matrix
+ for the subsequent XObject. It is called immediately before PDGraphicEnumXObjectRefProc().
+
+ @param matrix IN/OUT (Filled by the callback) The current transformation
+ matrix for the subsequent XObject whose name is obtained
+ by PDGraphicEnumXObjectRefProc().
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageEnumContents().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPageEnumContents
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGraphicEnumXObjectRefMatrixProc) (ASFixedMatrix *matrix, void *clientData);
+
+typedef struct _t_PDGraphicEnumMonitor *PDGraphicEnumMonitor;
+#if PLUGIN || ACROBAT_LIBRARY || TOOLKIT_LITE || PDFL_EXTENSION
+/**
+ An array of callbacks to pass to PDCharProcEnum(), PDFormEnumPaintProc()
+ or PDPageEnumContents(). One of the callbacks is called for
+ every renderable object in the page contents. Pass <code>NULL</code>
+ for a callback to not enumerate that type of object. Each
+ array element must be either <code>NULL</code> or a valid callback. Enumeration
+ of the page contents halts if the callback returns <code>false</code>.
+
+ @note PDPageEnumContents is provided only for backwards
+ compatibility. It has not been updated beyond PDF Version
+ 1.1 and may not work correctly for newly-created PDF 1.2
+ or later files. You should use the PDFEdit API to enumerate
+ page contents.
+
+ @note In versions at least through Acrobat 2.1, enumeration
+ does not stop even if a method returns <code>false</code>.
+ @see PDCharProcEnum
+ @see PDFormEnumPaintProc
+ @see PDPageEnumContents
+*/
+typedef struct _t_PDGraphicEnumMonitor {
+
+ /** The size of the data structure. It must be set to <code>sizeof(PDGraphicEnumMonitorRec)</code>. */
+ ASSize_t size;
+
+ /** */
+ PDGraphicEnumTextProc EnumText;
+
+ /** */
+ PDGraphicEnumPathProc EnumPath;
+
+ /** */
+ PDGraphicEnumImageProc EnumImage;
+
+ /** */
+ PDGraphicEnumXObjectRefProc EnumXObjectRef;
+
+ /** */
+ PDGraphicEnumSaveProc EnumSave;
+
+ /** */
+ PDGraphicEnumRestoreProc EnumRestore;
+
+ /** */
+ PDGraphicEnumCharWidthProc EnumCharWidth;
+
+ /** */
+ PDGraphicEnumCacheDeviceProc EnumCacheDevice;
+ /* Added in Acrobat 3.0 */
+
+ /** If non-<code>NULL</code>, <code>EnumXObjectRefMatrix</code> is called immediately before <code>EnumXObjectRef</code>.
+ It returns the current matrix for the subsequent XObject ref.
+ */
+ PDGraphicEnumXObjectRefMatrixProc EnumXObjectRefMatrix;
+} PDGraphicEnumMonitorRec;
+#endif
+
+/**
+ A callback for PDPathEnumMonitor. It is called for every m operator.
+
+ @param p1 IN/OUT The one point needed to specify the location
+ to move to.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPathEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPathEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPathMoveToProc) (ASFixedPoint *p1, void *clientData);
+
+/**
+ A callback for PDPathEnumMonitor. It is called for every l operator.
+
+ @param p1 IN/OUT The one point needed to specify the line's ending
+ point.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPathEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPathEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPathLineToProc) (ASFixedPoint *p1, void *clientData);
+
+/**
+ A callback for PDPathEnumMonitor. It is called for every c operator.
+
+ @param p1 The first point needed to specify the curve.
+ @param p2 The second point needed to specify the curve.
+ @param p3 The third point needed to specify the curve.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPathEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPathEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPathCurveToProc) (ASFixedPoint *p1, ASFixedPoint *p2, ASFixedPoint *p3, void *clientData);
+
+/**
+ A callback for PDPathEnumMonitor. It is called for every v operator.
+
+ @param p1 The first of two points needed to specify the curve.
+ @param p2 The second of two points needed to specify the curve.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPathEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPathEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPathVCurveToProc) (ASFixedPoint *p1, ASFixedPoint *p2, void *clientData);
+
+/**
+ A callback for PDPathEnumMonitor. It is called for every y operator.
+
+ @param p1 The first of two points needed to specify the curve.
+ @param p2 The second of two points needed to specify the curve.
+ @param clientData IN/OUT User-supplied data passed in the call
+ to PDPathEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPathEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPathYCurveToProc) (ASFixedPoint *p1, ASFixedPoint *p2, void *clientData);
+
+/**
+ A callback for PDPathEnumMonitor. It is called for every re operator.
+
+ @param p1 The first of two points needed to specify the rectangle.
+ @param p2 The second of two points needed to specify the rectangle.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPathEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPathEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPathRectProc) (ASFixedPoint *p1, ASFixedPoint *p2, void *clientData);
+
+/**
+ A callback for PDPathEnumMonitor. It is called for every path closing
+ operator.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPathEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDPathEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPathClosePathProc)(void *clientData);
+
+typedef struct _t_PDPathEnumMonitor *PDPathEnumMonitor;
+
+/**
+ A data structure containing callbacks used by PDPathEnum().
+ One callback is called for each path operator encountered;
+ the callback to call depends on the operator.
+ @see PDPathEnum
+*/
+typedef struct _t_PDPathEnumMonitor {
+ /** The size of the data structure. It must be set to <code>sizeof(PDPathEnumMonitorRec)</code>. */
+ ASSize_t size;
+ /** */
+ PDPathMoveToProc MoveTo;
+ /** */
+ PDPathLineToProc LineTo;
+ /** */
+ PDPathCurveToProc CurveTo;
+ /** */
+ PDPathVCurveToProc VCurveTo;
+ /** */
+ PDPathYCurveToProc YCurveTo;
+ /** */
+ PDPathRectProc Rect;
+ /** */
+ PDPathClosePathProc ClosePath;
+} PDPathEnumMonitorRec;
+
+/**
+ A callback for PDTextEnum(). It is called once for each string in
+ a text object.
+ @param font IN/OUT The font used for <code>string</code>.
+ @param string IN/OUT The string. It may be converted
+ using PDFontXlateToHost() or PDFontXlateToUCS().
+ @param stringLen IN/OUT The number of bytes in <code>string</code>.
+ @param delta IN/OUT The difference, in thousandths of an EM, from
+ the end of the previous string to the beginning of the current
+ string. An EM is a typographic unit of measurement equal
+ to the size of a font. For example, in a 12-point font,
+ an EM is 12 points. See the description of the TJ operator
+ in Section 5.3.2 in the <i>PDF Reference</i>.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDTextEnum().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDTextEnum
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDStringEnumProc)(PDFont font,
+ char *string, ASInt32 stringLen, ASFixed delta, void *clientData);
+
+/**
+ A callback for PDXObjectEnumFilters(). It is called once for each
+ filter that has been applied to an XObject's data.
+ @param filter IN/OUT The filter's name.
+ @param decodeParms IN/OUT The dictionary Cos object containing
+ the filter's decode parameters.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDXObjectEnumFilters().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDXObjectEnumFilters
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDXObjectFilterEnumProc)(char *filter,
+ CosObj decodeParms, void *clientData);
+
+/**
+ A callback for PDFontEnumCharProcs(). It is called once for
+ each character in a Type 3 font.
+ @param name IN/OUT The name of the current character.
+ @param obj IN/OUT A stream Cos object containing the PDF drawing
+ operators that draw the character.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDFontEnumCharProcs().
+ @return <code>true</code> to continue enumerating, <code>false</code> to halt enumeration.
+
+ @see PDFontEnumCharProcs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCharProcEnumProc)(char *name, PDCharProc obj,
+ void *clientData);
+
+/**
+ A callback for PDXObjectGetData(). It is passed the XObject's
+ data. Currently, the XObject's data is read 1 kB at a time
+ and passed to this callback.
+ @param data IN/OUT A buffer containing the XObject's data.
+ @param lenData IN/OUT The amount of data in data in bytes.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDXObjectGetData().
+ @return <code>true</code> to continue reading the XObject's data, <code>false</code> to halt
+ it.
+ @see PDXObjectGetData
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDGetDataProc)(char *data, ASUns32 lenData, void *clientData);
+
+
+/************************************************************************************\
+|* *|
+|* PDTextSelect *|
+|* *|
+\************************************************************************************/
+
+/**
+ A data structure representing a single entry (the starting location and length) in a highlight
+ list.
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreateWordHilite
+*/
+typedef struct _t_HiliteEntry {
+ /** */
+ PDCharOffset offset;
+ /** */
+ PDCharOffset length;
+} HiliteEntry;
+
+/*
+** PDTextSelectRange
+**
+** Word- and character-oriented text selection.
+*/
+
+/**
+ A data structure used to specify a range of text in a text
+ selection.
+
+ <p>Use <code>0</code> for <code>ofsStart</code> and <code>ofsEnd</code> for whole-word selections.
+ Nonzero values for <code>ofsStart</code> and <code>ofsEnd</code> are supported by
+ PDText but are currently ignored by the Acrobat viewer's
+ user interface code (which highlights only whole-word selections).
+ If <code>ofsEnd</code> is <code>0</code>, <code>end</code> is the first word not selected. </p>
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectGetRange
+*/
+typedef struct _t_PDTextSelectRange {
+ /** A word containing the start of the selection. */
+ ASInt32 start;
+ /** A word containing the end of the selection. */
+ ASInt32 end;
+ /** An offset into the word at the start of the selection. */
+ ASInt32 ofsStart;
+ /** An offset into the word at the end of the selection. */
+ ASInt32 ofsEnd;
+} PDTextSelectRangeRec, *PDTextSelectRange;
+
+/**
+ A callback for PDTextSelectEnumQuads(). It is called once for each
+ quad in a text selection.
+ @param procObj IN/OUT User-supplied data that was passed in the
+ call to PDTextSelectEnumQuads().
+ @param page IN/OUT The page on which the text selection is located.
+
+ @param quad IN/OUT The quad being enumerated.
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDTextSelectEnumQuads
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDTextSelectEnumQuadProc)(void *procObj,
+ ASInt32 page, ASFixedQuad *quad);
+
+/**
+ A callback for PDTextSelectEnumText() and PDTextSelectEnumTextUCS().
+ It is called once for each text run (which is text in the same font, size,
+ color, and on the same line) in a text selection.
+ @param procObj IN/OUT User-supplied data that was passed in the
+ call to PDTextSelectEnumText() or PDTextSelectEnumTextUCS().
+
+ @param font IN/OUT The text's font.
+ @param size IN/OUT The text's size in points.
+ @param color IN/OUT The text's color.
+ @param text IN/OUT The text in the current run. This string
+ is not necessarily <code>NULL</code>-terminated.
+ @param textLen IN/OUT The number of bytes in text.
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDTextSelectEnumText
+ @see PDTextSelectEnumTextUCS
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDTextSelectEnumTextProc)(void *procObj,
+ PDFont font, ASFixed size, PDColorValue color, char *text, ASInt32 textLen);
+
+/** */
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDTextSelectEnumRTFTextProc)(void *procObj,
+ PDFont font, ASFixed size, PDColorValue color, char *text, ASUns32 rtfCntFlag, ASInt32 textLen);
+
+/************************************************************************************\
+|* *|
+|* PDThread & PDBead *|
+|* *|
+\************************************************************************************/
+
+/**
+ An article in the Acrobat viewer's user interface. It contains an ordered sequence of
+ rectangles that bound the article. Each rectangle is called a bead. Threads can be
+ created either interactively, by the user, or programmatically.
+ @see PDDocGetThread
+ @see PDThreadNew
+ @see PDThreadFromCosObj
+ @see PDBeadGetThread
+ @see PDDocRemoveThread
+ @see PDThreadDestroy
+*/
+typedef OPAQUE_64_BITS PDThread;
+
+/**
+ A single rectangle in an article thread. (Article threads are known simply as articles in
+ the Acrobat viewer's user interface). A bead remains valid as long as a thread is
+ <i>current</i> and <i>active</i>.
+ @see AVPageViewGetActiveBead
+ @see AVPageViewIsBeadAtPoint
+ @see PDBeadNew
+ @see PDBeadGetNext
+ @see PDBeadGetPrev
+ @see PDThreadGetFirstBead
+ @see PDBeadDestroy
+*/
+typedef OPAQUE_64_BITS PDBead;
+
+/************************************************************************************\
+|* *|
+|* PDThumb *|
+|* *|
+\************************************************************************************/
+
+/*
+** PDThumbCreationServer
+** The create thumb server is passed in at thumb creation time.
+*/
+
+/**
+ (Optional) A callback for PDThumbCreationServer. It is called before
+ processing each page. It may be <code>NULL</code>.
+ @param pageNum IN/OUT The page for which to create a thumbnail
+ image.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDDocCreateThumbs().
+ @return <code>true</code> to continue thumbnail image creation, <code>false</code> to halt
+ thumbnail image creation.
+ @see PDDocCreateThumbs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDThumbCreationNotifyPageProc)(ASInt32 pageNum,
+ void *clientData);
+
+/**
+ (Optional) A callback for PDThumbCreationServer. It is called for
+ each page that does not currently contain a thumbnail image.
+ It may be <code>NULL</code>. If it is <code>NULL</code>, the thumbnail data is generated
+ by the default thumbnail generator.
+ @param page IN/OUT The page for which to create a thumbnail image.
+
+ @param thumbScale IN/OUT The scale to map from the page size to
+ the thumbnail size, which is either 1/8 of
+ the page size or is limited to <code>MAX_THUMBPAGE_WIDTH</code> and
+ <code>MAX_THUMBPAGE_HEIGHT</code>, whichever is smaller.
+ @param width IN/OUT The width of the thumbnail image to create.
+
+ @param height IN/OUT The height of the thumbnail image to create.
+
+ @param thumbData IN/OUT A buffer into which the thumbnail data
+ is copied. This buffer has the following values:
+ <ul>
+ <li><code>rowBytes = (width * bitsPerPixel + 7) / 8; </code></li>
+ <li><code>size = rowBytes * height; </code></li>
+ </ul>
+ <p>where <code>bitsPerPixel</code>
+ is specified as <code>numComponents * bitsPerComponent</code>. <code>numComponents</code>
+ is dependent upon the color space. For DeviceRGB, <code>numComponents</code>
+ is <code>3</code>. For an indexed color space, <code>numComponents</code> is <code>1</code>.</p>
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDDocCreateThumbs().
+ @return <code>true</code> to continue thumbnail image creation, <code>false</code> to halt
+ thumbnail image creation.
+ @see PDDocCreateThumbs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDThumbCreationGetThumbDataProc)(
+ PDPage page, ASFixed thumbScale, ASInt32 width, ASInt32 height, void *thumbData,
+ void *clientData);
+
+/**
+ (Optional) A callback for PDThumbCreationServer. It is called after
+ PDThumbCreationGetThumbDataProc() and after a PDThumb has
+ been created. It gives the server a chance to draw the thumbnail
+ image in a status window. It may be <code>NULL</code>.
+ @param thumb IN/OUT The thumbnail image to draw.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDDocCreateThumbs().
+ @see PDThumbCreationGetThumbDataProc
+ @see PDDocCreateThumbs
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDThumbCreationDrawThumbProc)(PDThumb thumb,
+ void *clientData);
+
+typedef struct _t_PDThumbCreationServer *PDThumbCreationServer;
+/**
+ A data structure containing callbacks that implement a creation server. The callbacks
+ implement the creation server functions.
+ @see PDDocCreateThumbs
+*/
+typedef struct _t_PDThumbCreationServer {
+ /** Set this field to <code>sizeof(PDThumbCreationServerRec)</code>. */
+ ASSize_t size;
+ /** */
+ PDThumbCreationNotifyPageProc NotifyPage;
+ /** */
+ PDThumbCreationGetThumbDataProc GetThumbData;
+ /** */
+ PDThumbCreationDrawThumbProc DrawThumb;
+} PDThumbCreationServerRec;
+
+/************************************************************************************\
+|* *|
+|* PDViewDestination *|
+|* *|
+|* Opaque designator for a view destination object. Note that this API does not *|
+|* export routines that construct or acquire view destination objects, just the *|
+|* definition of the object and its methods. The client may freely copy or destroy *|
+|* an instance of a PDViewDestination; two instances of a PDViewDestination *|
+|* designating the same view destination are guaranteed to contain the identical *|
+|* bits. *|
+|* *|
+\************************************************************************************/
+
+/**
+ A particular view of a page in a document. It contains a reference to a page, a
+ rectangle on that page, and information specifying how to adjust the view to fit the
+ window's size and shape. It corresponds to a PDF Dest array and can be considered
+ a special form of a PDAction.
+ @see AVPageViewToViewDest
+ @see PDActionGetDest
+ @see PDViewDestCreate
+ @see PDViewDestFromCosObj
+ @see PDViewDestResolve
+ @see PDViewDestDestroy
+*/
+typedef OPAQUE_64_BITS PDViewDestination;
+
+/*
+** Value indicating a null entry for VDXYZ destination attributes
+*/
+#define PDViewDestNULL fixedNegativeInfinity
+
+
+/************************************************************************************\
+|* *|
+|* PDWord *|
+|* *|
+\************************************************************************************/
+
+/**
+ Extracts words from a PDF file, and enumerates the words on a single page or on all
+ pages in a document.
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDDocGetWordFinder
+ @see PDWordFinderDestroy
+ @see PDWordFinderEnumWords
+*/
+typedef struct _t_PDWordFinder *PDWordFinder;
+
+/**
+ A word in a PDF file. Each word contains a sequence of characters in one or more
+ styles (see PDStyle).
+ @see PDWordFinderGetNthWord
+ @see PDWordFinderEnumWords
+ @see PDWordFinderEnumWords
+*/
+typedef struct _t_PDWord *PDWord;
+
+/**
+ Provides access to information about the fonts, font sizes, and colors used in a
+ PDWord.
+ @see PDWordGetNthCharStyle
+*/
+typedef struct _t_PDStyle *PDStyle;
+
+/**
+ A callback for PDWordFinderEnumWords. It is called once for each
+ word.
+ @param wObj IN/OUT The word finder.
+ @param wInfo IN/OUT The current word in the enumeration.
+ @param pgNum IN/OUT The page number on which <code>wInfo</code> is located.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDWordFinderEnumWords().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDWordFinderEnumWords
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDWordProc)( PDWordFinder wObj, PDWord wInfo,
+ ASInt32 pgNum, void *clientData );
+
+/**
+ PDFindTranslateStringProc() is passed to PDFindText().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDFindTranslateStringProc)(char *string,
+ ASInt32 stringLength, PDWord pdWord, void *clientData);
+
+/* Wordy Character types */
+
+/** A control code.
+ @ingroup CharacterTypeCodes
+*/
+#define W_CNTL 0x1
+
+/** A lowercase letter.
+ @ingroup CharacterTypeCodes
+*/
+#define W_LETTER 0x2
+
+/** An uppercase letter.
+ @ingroup CharacterTypeCodes
+*/
+#define W_UPPERCASE 0x4
+
+/** A digit.
+ @ingroup CharacterTypeCodes
+*/
+#define W_DIGIT 0x8
+
+/** A punctuation mark.
+ @ingroup CharacterTypeCodes
+*/
+#define W_PUNCTUATION 0x10
+
+/** A hyphen.
+ @ingroup CharacterTypeCodes
+*/
+#define W_HYPHEN 0x20
+
+/** A hyphen that is only present because a word is broken across two lines of text.
+ @ingroup CharacterTypeCodes
+*/
+#define W_SOFT_HYPHEN 0x40
+
+/** A ligature.
+ @ingroup CharacterTypeCodes
+*/
+#define W_LIGATURE 0x80
+
+/** A white space glyph.
+ @ingroup CharacterTypeCodes
+*/
+#define W_WHITE 0x100
+
+/** A comma. Commas and periods are treated separately
+ from other punctuation marks because they are used
+ both as word punctuation marks and as delimiters in
+ numbers, and need to be treated differently in the two
+ cases.
+ @ingroup CharacterTypeCodes
+*/
+#define W_COMMA 0x200
+
+/** A period.
+ @ingroup CharacterTypeCodes
+*/
+#define W_PERIOD 0x400
+
+/** An accent mark.
+ @ingroup CharacterTypeCodes
+*/
+#define W_ACCENT 0x800
+
+/** A glyph that cannot be represented in the destination font encoding.
+ @ingroup CharacterTypeCodes
+*/
+#define W_UNMAPPED 0x1000
+
+/** An end-of-phrase glyph (for example, <code>"."</code>, <code>"?"</code>, <code>"!"</code>, <code>":"</code>, and <code>";"</code>).
+ @ingroup CharacterTypeCodes
+*/
+#define W_END_PHRASE 0x2000
+
+/** A wildcard glyph (for example, <code>"*"</code> and <code>"?"</code>) that should not be treated as a normal punctuation mark.
+ @ingroup CharacterTypeCodes
+*/
+#define W_WILD_CARD 0x4000
+
+/** A glyph that acts as a delimiter between words.
+ @see GlyphNamesofWordSeparators
+ @ingroup CharacterTypeCodes
+*/
+#define W_WORD_BREAK 0x8000
+
+
+/* WEChar encoding information flags (8-bit) */
+#define WXE_ENC_UNMAPPED 0x01 /* The font has no useful encoding information. Word Finder copied
+ the original character string from the PDF content. In this case, Word Finder always assumes
+ the original string is single-byte characters. If the Word Finder is extracting the text in Unicode,
+ it inserts additional bytes, 0x00s, to form 16-bit characters. (i.e. "0x41, 0x42" a "0x00, 0x41,
+ 0x00, 0x42") A common example of this case is a Symbol font without ToUnicode table.Since there is
+ no valid Unicode values are available, during the word-finding process, these characters are treated
+ as symbolic characters and each character becomes a word. */
+#define WXE_ENC_MISSING 0x02 /* The character code is not available in the output encoding space.
+ This character is replaced by a space character. */
+#define WXE_ENC_NO_UCS 0x04 /* Word Finder is not able to find a reliable Unicode value
+ from the character. The character encoding is determined by "guessing" due to insufficient
+ encoding information available in the PDF file. */
+#define WXE_FROM_ACTUALT 0x08 /* The character comes from an ActualText, rather than the page content. */
+
+
+/* Word's Flags (Group ID = 0) */
+
+/** The word contains a character outside the range of A-Z, a-Z, 0-9.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_NONALPHANUM 0X1
+
+/** The word contains a character between A-Z or a-z.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_LETTER 0x2
+
+/** The word contains a character between A-Z.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_UPPERCASE 0x4
+
+/** One or more characters in the word are digits.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_DIGIT 0x8
+
+/** One or more characters in the word are
+ punctuation marks. Other flag bits can be
+ checked to test whether the punctuation was at
+ the beginning of the word
+ (<code>WXE_HAS_LEADING_PUNC</code>), the end of the word
+ (<code>WXE_HAS_TRAILING_PUNC</code>), or elsewhere in
+ the word.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_PUNCTUATION 0x10
+
+/** There is a hyphen in the word.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_HYPHEN 0x20
+
+/** There is a soft hyphen in the word.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_SOFT_HYPHEN 0x40
+
+/** The word contains a ligature.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_LIGATURE 0x80
+
+/** The first character in the word is a punctuation
+ mark. If this bit is set, <code>WXE_HAS_PUNCTUATION</code>
+ will also be set.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_LEADING_PUNC 0x100
+
+/** The last character in the word is a punctuation
+ mark. If this bit is set, <code>WXE_HAS_PUNCTUATION</code>
+ will also be set.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_TRAILING_PUNC 0x200
+
+/** One or more characters in the word cannot be
+ represented in the output font encoding.
+ @ingroup WordAttributes
+*/
+#define WXE_HAS_UNMAPPED_CHAR 0x400
+
+/** The character following the end of the word is a
+ space (either an explicit space character encoded
+ in a string, or one that appears implicitly because
+ the drawing point was moved).
+ @ingroup WordAttributes
+*/
+#define WXE_ADJACENT_TO_SPACE 0x800
+/* Extended wFlags */
+
+/** The writing direction of the word is not in a
+ multiple of 90 degrees, or the bounding box of the
+ text is skewed. This flag indicates that the quads
+ of the word should be used to specify the highlight
+ area correctly.
+ @ingroup WordAttributes
+*/
+#define WXE_ROTATED 0x1000
+
+/** The writing direction of the word is either 90 or
+ 180 degrees. This flag ignores the page rotation
+ parameter of the page dictionary. Therefore, if the
+ page is rotated 90 degrees, this flag will be set on
+ each word that appears horizonally on the screen.
+ @ingroup WordAttributes
+*/
+#define WXE_VERTICAL_FLOW 0x2000
+
+/**
+ @ingroup WordAttributes
+*/
+#define WXE_WBREAK_WORD 0x4000
+
+/** The word is at the end of the current text line (for example,
+ the word is followed by a line break).
+ @ingroup WordAttributes
+*/
+#define WXE_LAST_WORD_ON_LINE 0x8000
+
+/* Word's Flags (Group ID = 1) */
+#define WXE_FRONT_TAB 0x01 /* Insert a tab character before this word */
+#define WXE_ENCODING_WARNING 0x02 /* Unreliable encoding conversion happened in this word.
+ Check the encoding flags of each character for detail. */
+#define WXE_REVERSE_DIRECTION 0x04 /* The writing direction is right-left or top-down */
+#define WXE_WORD_IS_UNICODE 0x08 /* The text is in Unicode format. */
+#define WXE_EXT_CHAR_OFFSETS 0x10 /* The word has extened character offset information and
+ can be used for character based PDWord methods like
+ PDWordGetCharOffsetEx(), PDWordGetCharQuad(),
+ PDWordGetNumHiliteChar(), and PDWordGetByteIdxFromHiliteChar(). */
+/* 0x0100 ~ 0x8000 are reserved for Acrobat internal usage. */
+
+
+/* Context flags */
+/**
+*/
+#define WXE_STREAM 0x1
+
+/**
+*/
+#define WXE_PDF_ORDER 0x2
+
+/**
+*/
+#define WXE_XY_SORT 0x4
+
+/**
+*/
+#define WXE_RD_ORDER_SORT 0x8
+
+/** Used to obtain the latest available version.
+*/
+#define WF_LATEST_VERSION 0
+
+/** The version used for Acrobat 3.x, 4.x.
+*/
+#define WF_VERSION_2 2
+
+/** For Acrobat 5.0 without accessibility enabled.
+*/
+#define WF_VERSION_3 3
+
+/** For Acrobat 5.0 with accessibility enabled.
+*/
+#define WF_VERSION_4 4
+
+/**
+ A callback for PDEnumDocs(). It is called once for each open
+ PDDoc.
+ @param pdDoc IN/OUT The PDDoc currently being enumerated.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDEnumDocs().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDEnumDocs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDDocEnumProc)(PDDoc pdDoc, void *clientData);
+
+/**
+ A word finder configuration that customizes the way the
+ extraction is performed. In the default configuration, all
+ options are <code>false</code>.
+ @see PDDocCreateWordFinderEx
+*/
+typedef struct _t_PDWordFinderConfig {
+
+ /** This is always <code>sizeof(PDWordFinderConfigRec)</code>. */
+ ASSize_t recSize;
+ /** When <code>true</code>, it disables tagged PDF
+ support and treats the document as non-tagged PDF. Use this
+ to keep the word finder in legacy mode when it is created
+ with the latest algorithm version (WF_LATEST_VERSION).
+ */
+ ASBool disableTaggedPDF;
+
+ /** When <code>true</code>, it disables generating an XY-ordered
+ word list. This option replaces the sort order flags in
+ the older version of the word finder creation command (PDDocCreateWordFinder()).
+ Setting this option is equivalent to omitting the <code>WXE_XY_SORT</code>
+ flag.
+ */
+ ASBool noXYSort;
+ /** When <code>true</code>, the word finder preserves
+ space characters during word breaking. Otherwise, spaces
+ are removed from output text. When <code>false</code> (the default), you
+ can add spaces later by considering the word attribute flag
+ <code>WXE_ADJACENT_TO_SPACE</code>, but there is no way to restore the
+ exact number of consecutive space characters.
+ */
+ ASBool preserveSpaces;
+
+ /**
+ <p>When <code>true</code>, and the font has a ToUnicode table, it disables the expansion
+ of ligatures using the default ligatures. The default ligatures
+ are:</p>
+
+ <ul>
+ <li>fi</li>
+ <li>ff</li>
+ <li>fl</li>
+ <li>ffi</li>
+ <li>ffl</li>
+ <li>st</li>
+ <li>oe</li>
+ <li>OE</li>
+ </ul>
+
+ <p>When <code>noLigatureExp</code> is <code>true</code> and the font does not have a
+ ToUnicode table, the ligature is expanded based on whether there is a representation
+ of the ligature in the defined <code>codePage</code>. If there is no representation,
+ the ligature is expanded; otherwise, the ligature is not expanded.</p>
+ */
+ ASBool noLigatureExp;
+
+ /** When <code>true</code>, it disables guessing encoding
+ of fonts that have unknown or custom encoding when there
+ is no ToUnicode table. Inappropriate encoding conversions
+ can cause the word finder to mistakenly recognize non-Roman
+ single-byte fonts as Standard Roman encoding fonts and extract
+ the text in an unusable format. When this option is selected,
+ the word finder avoids such unreliable encoding conversions
+ and tries to provide the original characters without any
+ encoding conversion for a client with its own encoding handling.
+ Use the PDWordGetCharEncFlags() method to detect such characters.
+ */
+ ASBool noEncodingGuess;
+
+ /** When <code>true</code>, it assumes any font with
+ unknown or custom encoding to be Standard Roman. This option
+ overrides the <code>noEncodingGuess</code> option.
+ */
+ ASBool unknownToStdEnc;
+
+ /** When <code>true</code>, it disables converting large
+ character gaps to space characters, so that the word finder
+ reports a character space only when a space character appears
+ in the original PDF content. This option has no effect on
+ tagged PDF.
+ */
+ ASBool ignoreCharGaps;
+
+ /** When <code>true</code>, it disables treating vertical
+ movements as line breaks, so that the word finder determines
+ a line break only when a line break character or special
+ tag information appears in the original PDF content. This
+ option has no effect on tagged PDF.
+ */
+ ASBool ignoreLineGaps;
+
+ /** When <code>true</code>, it disables extracting text from
+ text annotations. Normally, the word finder extracts text
+ from the normal appearances of text annotations that are
+ inside the page crop box.
+ */
+ ASBool noAnnots;
+
+ /** When <code>true</code>, it disables finding and
+ removing soft hyphens in non-tagged PDF, so that the word
+ finder trusts hard hyphens as non-soft hyphens. This option
+ has no effect on tagged PDF files. Normally, the word finder
+ does not differentiate between soft and hard hyphen characters in
+ non-tagged PDF files, because these are often misused.
+ */
+ ASBool noHyphenDetection;
+
+ /** When <code>true</code>, it disables treating non-breaking
+ space characters as regular space characters in non-tagged
+ PDF files, so that the word finder preserves the space without
+ breaking the word. This option has no effect on tagged PDF
+ files. Normally, the word finder does not differentiate between
+ breaking and non-breaking space characters in non-tagged
+ PDF files, because these are often misused.
+ */
+ ASBool trustNBSpace;
+
+ /** When <code>true</code>, it disables generating
+ extended character offset information to improve text extraction
+ performance. The extended character offset information is
+ necessary to determine exact character offset for character-by-character
+ text selection. The beginning character offset of each word
+ is always available regardless of this option, and can be
+ used for word-by-word text selection with reasonable accuracy.
+ When a client has no need for the detailed character offset
+ information, it can use this option to improve the text
+ extraction efficiency. There is a minor difference in the
+ text extraction performance, and less memory is needed for
+ the extracted word list.
+ */
+ ASBool noExtCharOffset;
+
+ /** When <code>true</code>, it disables generating character
+ style information to improve text extraction performance
+ and memory efficiency. When you select this option, you
+ cannot use PDWordGetNthCharStyle() and PDWordGetStyleTransition()
+ with the output of the word finder.
+ */
+ ASBool noStyleInfo;
+
+ /**
+ A custom UTF-16 decomposition table.
+ This table can be used to expand Unicode ligatures not included
+ in the default ligature list. Each decomposition record
+ contains a UTF-16 character code (either a 16-bit or 32-bit
+ surrogate), a replacement UTF16 string, and the delimiter
+ <code>0x0000</code>.
+
+ @example <code>const ASUns16 myDecompTbl[] = {0x00b2, 0x0032, 0x0000, 0x00c6, 0x0061, 0x0065, 0x0000, 0xFB01, 0xFB01, 0x0000}; </code>
+ <p>This replaces superscript <code>'2'</code> with <code>'2'</code>,
+ the <code>'AE'</code> ligature with <code>'a'</code> and <code>'e'</code>, and disables the default
+ handling of the <code>'fi'</code> ligature. The word finder applies this
+ substitution after identifying the character types, so the
+ word-breaking process uses the character attributes of the
+ original, rather than the replacement characters. See <code>charTypeTble</code>
+ below. </p>
+ */
+ const ASUns16 *decomposeTbl;
+
+ /** The size of the <code>decomposeTbl</code> in bytes. */
+ ASSize_t decomposeTblSize;
+
+ /**
+ A custom character type table to enhance
+ word breaking quality. Each character type record contains
+ a region start value, a region end value, and a character
+ type flag as defined in PDExpT.h. A character code is in
+ UTF-16, and is either a 16-bit or a 32-bit surrogate.
+
+ @example <code>const ASUns16 myCharTypeTbl[] = {0x0082, 0x0082, W_CNTL+W_WORD_BREAK, 0x00b2, 0x00b3, W_DIGIT}</code>
+ <p>This identifies <code>0x0082</code> as a control-plus-word
+ break character, and <code>0x00b2</code> and <code>b3</code> as digits. If you need
+ to change a character's type along with its character code,
+ you must define the original character code in the custom
+ character type table. For example, if <code>'a'</code> is transformed
+ to <code>'1'</code> in the decomposition table, <code>'a'</code> should be transformed
+ to <code>W_DIGIT</code> here, so that the word finder can recognize the
+ replaced character, <code>'1'</code>, as a number. </p>
+ */
+ const ASUns16 *charTypeTbl;
+
+ /** The size of the <code>charTypeTbl</code> in bytes. */
+ ASSize_t charTypeTblSize;
+
+ /** When <code>true</code>, it disables detecting and removing redundant characters.
+ Some PDF pages have the same text drawn multiple times on the same spot
+ to get a special visual effect. Normally, those redundant characters are
+ removed from the word finder output.
+ <p>Since this option may leave extra characters with overlapping
+ bounding boxes, using it together with the <code>disableCharReordering</code> option
+ is recommended for more consistent text extraction results.</p>
+ */
+ ASBool preserveRedundantChars;
+
+ /** When <code>true</code>, it disables reconstructing the character orders,
+ and the word finding algorithm is applied to the characters
+ in the drawing order. By default, word finder reorders characters
+ on a single line by the relative horizontal character locations.
+ Most of the time, the character reordering feature improves
+ the text extraction quality. However, on a PDF page with heavily
+ overlapped character bounding boxes, the outcome becomes somewhat
+ unpredictable. In such case, disabling the character reordering
+ (<code>disableCharReordering = true</code>) may produce a more static result.
+ */
+ ASBool disableCharReordering;
+} PDWordFinderConfigRec, *PDWordFinderConfig;
+
+/** This is passed to PDWordFinderSetCtrlProc().
+ <p>This is the callback function called by Word Finder when its page enumeration process takes longer
+ than the specified time (in seconds). Return <code>true</code> to continue the enumeration process, or <code>false</code>
+ to stop. <code>startTime</code> is the value that was set by ASGetSecs() when the Word Finder started processing
+ the current page.</p>
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDWordFinderCtrlProc)(ASUns32 startTime, void *clientData);
+
+/*------------------------------------------------------------------------
+ Color calibration types.
+------------------------------------------------------------------------*/
+
+/**
+ A data structure containing a monitor's chromaticity, for use in displaying device-independent
+ color.
+ <p><code>x</code> and <code>y</code> are the two values needed to specify the chromaticity.</p>
+ @see PDColorCalP
+ @see PDPrefGetColorCal
+ @see PDPrefSetColorCal
+*/
+typedef struct _t_PDChromaticity
+{
+
+ /** The x-axis component of the monitor's chromaticity. It must be in [0,1). <code>x + y</code> must be less than or equal to 1.*/
+ ASFixed x;
+
+ /** The y-axis component of the monitor's chromaticity. It must be in (0,1]. <code>x + y</code> must be less than or equal 1. */
+ ASFixed y;
+} PDChromaticity;
+
+/** A data structure used to represent the characteristics of an output device; it is needed for
+ device-independent color.
+ @see PDPrefGetColorCal
+ @see PDPrefSetColorCal
+*/
+typedef struct _t_PDColorCal
+{
+ /** */
+ PDChromaticity whiteChrom;
+ /** */
+ PDChromaticity redChrom;
+ /** */
+ PDChromaticity greenChrom;
+ /** */
+ PDChromaticity blueChrom;
+ /** */
+ ASFixed redGamma;
+ /** */
+ ASFixed greenGamma;
+ /** */
+ ASFixed blueGamma;
+} PDColorCal, *PDColorCalP;
+
+/*------------------------------------------------------------------------
+ PDPageStm types
+------------------------------------------------------------------------*/
+
+#define kPDPageStmStringMax 256
+
+/* Flag values for PDPageStmGetToken */
+#define kPDPageStmSkipComments 0x0001
+
+/* Flag values for PDPageStmGetInlineImage */
+/* -- none defined yet -- */
+
+/* Flag values for PDPageStmToken */
+#define kPDPageStmTokenHexString 0x0001
+
+/**
+ A data structure used by PDPageStmGetToken(). It contains information about the
+ current page contents token.
+
+ @see PDPageStmGetToken
+*/
+typedef struct _t_PDPageStmToken {
+ /** The size of this record. It is to be filled in by the caller. */
+ ASSize_t size;
+ /** The type of token. */
+ CosType type;
+ /** Additional information about the token (for example, indicating a hex string). */
+ ASUns32 flags;
+ /** The value of the token if it is a CosInteger, ASFixed, or Name. */
+ ASInt32 iVal;
+ /** The value of the token if it is a CosString. */
+ char sVal[kPDPageStmStringMax];
+ /** The number of bytes in <code>sVal</code>. */
+ ASSize_t sValLen;
+} PDPageStmTokenRec, *PDPageStmToken;
+
+/**
+ A callback used by PDPageStmGetToken(). It is called when the
+ length of a string token exceeds <code>kPDPageStmStringMax</code> bytes
+ (see PDExpT.h) in PDPageStmGetToken().
+ @param sVal IN/OUT The string value read so far.
+ @param sValLen IN/OUT The length of <code>sVal</code> in bytes.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageStmGetToken().
+ @see PDPageStmGetToken
+*/
+
+#if !defined(__SUNPRO_CC) || !defined(_H_THREADSAFEDATA)
+//SunStudio doesn't accept multiple definition if one is under extern "C" while other is not.
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDPageStmStringOverflowProc)(char *sVal,
+ ASSize_t sValLen, void *clientData);
+#endif
+
+/**
+ A callback for PDPageStmGetInlineImage(). It should be called when
+ inline image data is encountered in PDPageStmGetToken(). This
+ method may be called multiple times for one inline image.
+ If so, each call provides sequential data for the image.
+
+ @param data IN/OUT The image data read so far.
+ @param dataLen IN/OUT The length of <code>data</code> in bytes.
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDPageStmGetInlineImage() (which may have been
+ passed in the PDPageStmGetToken() method).
+ @return <code>true</code> to continue reading the image's data, <code>false</code> to stop
+ reading.
+ @see PDPageStmGetInlineImage
+ @see PDPageStmGetToken
+*/
+
+#if !defined(__SUNPRO_CC) || !defined(_H_THREADSAFEDATA)
+//SunStudio doesn't accept multiple definition if one is under extern "C" while other is not.
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPageStmImageDataProc)(ASUns8 *data,
+ ASSize_t dataLen, void *clientData);
+#endif
+
+/**
+ A transition to a page. The Trans key in a Page dictionary specifies a Transition
+ dictionary, which describes the effect to use when going to a page and the amount of
+ time the transition should take.
+ @see PDPageGetTransition
+ @see PDTransFromCosObj
+ @see PDTransNew
+ @see PDTransNewFromCosDoc
+ @see PDTransNull
+*/
+typedef OPAQUE_64_BITS PDTrans;
+
+#define fxDefaultPageDuration -fixedOne
+#define fxDefaultTransDuration fixedOne
+
+/*------------------------------------------------------------------------
+ PDDocReadAhead types
+------------------------------------------------------------------------*/
+
+/* Flag values for PDDocReadAhead */
+/** Allows the AcroForm client to request that
+ all the AcroForm data be read <i>ahead</i>, before the viewer
+ needs it. This flag is ignored if the PDF file does not
+ contain a Forms hint table. See Section F.3.5 in the PDF
+ Reference for information about the Forms hint table.
+
+*/
+#define kPDDocReadAheadAcroForms 0x0001
+
+/** Requests that the PDF file's Forms Template data be read
+ <i>ahead</i>, before the viewer needs it. There is currently
+ no Template hint table defined, so this flag simply causes
+ the rest of the file to be read.
+
+*/
+#define kPDDocReadAheadTemplates 0x0002
+
+/** Requests that the PDF file's page label data be read <i>ahead</i>,
+ before the viewer needs it. There is currently no page label
+ hint table defined, so this flag simply causes the rest
+ of the file to be read.
+
+*/
+#define kPDDocReadAheadPageLabels 0x0004
+
+/** Requests that the PDF file's logical structure data be read
+ <i>ahead</i>, before the viewer needs it. There is currently
+ no logical structure hint table defined, so this flag simply
+ causes the rest of the file to be read.
+*/
+#define kPDDocReadAheadStructure 0x0008
+
+/**
+*/
+#define kPDDocReadAheadRenditions 0x0010
+
+/*------------------------------------------------------------------------
+ PD Related Security and Encryption: New permission methods
+------------------------------------------------------------------------*/
+
+/**
+ The set of valid PDPermRequestStatus values providing the status of
+ PDDoc-related permissions methods.
+ @see PDDocPermRequest
+ @see PDCryptAuthorizeExProc
+ @see PDCryptGetAuthDataExProc
+*/
+typedef ASInt16 PDPermReqStatus;
+/** <code>-1</code> The request was denied.*/
+#define PDPermReqDenied (PDPermReqStatus)(-1)
+/** <code>0</code> The request was granted.*/
+#define PDPermReqGranted (PDPermReqStatus)(0)
+/** <code>1</code> The object is unknown.*/
+#define PDPermReqUnknownObject (PDPermReqStatus)(1)
+/** <code>2</code> The operation is unknown.*/
+#define PDPermReqUnknownOperation (PDPermReqStatus)(2)
+/** <code>3</code> The operation is not applicable for the specified object.*/
+#define PDPermReqOperationNA (PDPermReqStatus)(3) /* Not applicable operation for specified object */
+/** The handler does not have enough information to determine an answer
+ at this point. Try again later. */
+#define PDPermReqPending (PDPermReqStatus)(4)
+
+/* The version of the PDPermReqObj and PDPermReqOpr */
+#define PDPermReqVersion 0x0003
+
+/** The document object type. The applicable operations are:
+ <ul>
+ <li><code>PDPermReqOprAll </code></li>
+ <li><code>PDPermReqOprModify</code> (Doc Info, open action, page label, modifying document)</li>
+ <li><code>PDPermReqOprCopy</code> (Copy to clipboard) </li>
+ <li><code>PDPermReqOprAccessible</code> </li>
+ <li><code>PDPermReqOprSelect</code> (Selection only) </li>
+ <li><code>PDPermReqOprOpen</code> </li>
+ <li><code>PDPermReqOprSecure</code> </li>
+ <li><code>PDPermReqOprPrintHigh</code> </li>
+ <li><code>PDPermReqOprPrintLow</code> </li>
+ <li><code>PDPermReqOprFullSave</code> </li>
+ <li><code>PDPermReqOprImport</code> (Non-PDF)</li>
+ <li><code>PDPermReqOprExport</code> (Non-PDF and text extraction API, Search & Catalog) </li>
+ <li><code>PDPermReqOprAny</code> </li>
+ </ul>
+*/
+enum {
+ /** */
+ PDPermReqObjDoc = 1,
+ /** */
+ PDPermReqObjPage,
+ /** */
+ PDPermReqObjLink,
+ /** */
+ PDPermReqObjBookmark,
+ /** */
+ PDPermReqObjThumbnail,
+ /** */
+ PDPermReqObjAnnot,
+ /** Form fields other than signature form fields. */
+ PDPermReqObjForm,
+ /** Signature form fields. */
+ PDPermReqObjSignature,
+
+ /* Acrobat 7.0 additions */
+ /** Named embedded files. */
+ PDPermReqObjEF,
+
+ /** Used for checking cache size. */
+ PDPermReqObjLast
+};
+typedef ASUns32 PDPermReqObj;
+
+/** An enumerated data type used to describe the target operation of a permissions request.
+ @see PDCryptAuthorizeExProc
+ @see PDCryptGetAuthDataExProc
+ @see PDDocPermRequest
+*/
+enum {
+ /** Check all operations. */
+ PDPermReqOprAll = 1,
+ /** Generic. */
+ PDPermReqOprCreate,
+ /** Delete. */
+ PDPermReqOprDelete,
+ /** Modify. */
+ PDPermReqOprModify,
+ /** Copy. */
+ PDPermReqOprCopy,
+ /** For accessibility use. */
+ PDPermReqOprAccessible,
+ /** For document or page, selecting (not copying) text or graphics. */
+ PDPermReqOprSelect,
+ /** For document open. */
+ PDPermReqOprOpen,
+ /** For the document: changing security settings. */
+ PDPermReqOprSecure,
+ /** For the document: regular printing. */
+ PDPermReqOprPrintHigh,
+ /** For the document: low quality printing. */
+ PDPermReqOprPrintLow,
+ /** Form fill-in, or sign the existing field. */
+ PDPermReqOprFillIn,
+ /** Rotate. */
+ PDPermReqOprRotate,
+ /** Crop. */
+ PDPermReqOprCrop,
+ /** For summarizing notes. */
+ PDPermReqOprSummarize,
+ /** Insert. */
+ PDPermReqOprInsert,
+ /** For the page. */
+ PDPermReqOprReplace,
+ /** For the page. */
+ PDPermReqOprReorder,
+ /** For the document. */
+ PDPermReqOprFullSave,
+ /** For the notes and image. */
+ PDPermReqOprImport,
+ /** For the notes. ExportPS should check print. */
+ PDPermReqOprExport,
+ /** Used for checking to see if any operation is allowed. */
+ PDPermReqOprAny,
+ /** Used for error checking. */
+ PDPermReqOprUnknownOpr,
+
+ /* Acrobat 5.1 additions. */
+ /** Submit forms outside of the browser. */
+ PDPermReqOprSubmitStandalone,
+ /** Allow the form to spawn template pages. */
+ PDPermReqOprSpawnTemplate,
+ /** This should be always the last item */
+
+ /* Acrobat 7.0 additions */
+ /** For annotations and forms: enabling online functionality. */
+ PDPermReqOprOnline,
+ /** For annotations: enabling a summary view of annotations in Adobe Reader. */
+ PDPermReqOprSummaryView,
+ /** For forms: enables form appearance to be rendered as a plain text barcode. */
+ PDPermReqOprBarcodePlaintext,
+
+ PDPermReqOprLast
+};
+typedef ASUns32 PDPermReqOpr;
+
+/*------------------------------------------------------------------------
+ PD Related Security and Encryption
+------------------------------------------------------------------------*/
+
+/* Flags used by PDDocGetNewSecurityInfo */
+
+/** The document has a user password.
+ @ingroup SecurityInfoFlags
+*/
+#define pdInfoHasUserPW pdPermOpen
+
+/** The document has an owner password.
+ @ingroup SecurityInfoFlags
+*/
+#define pdInfoHasOwnerPW pdPermSecure
+
+/** The document can be printed.
+ @ingroup SecurityInfoFlags
+*/
+#define pdInfoCanPrint pdPermPrint
+
+/** The document can be modified (for example, by adding notes, links, or bookmarks).
+ @see pdInfoCanEditNotes
+ @ingroup SecurityInfoFlags
+*/
+#define pdInfoCanEdit pdPermEdit
+
+/** The document text and graphics can be copied to the clipboard.
+ @ingroup SecurityInfoFlags
+*/
+#define pdInfoCanCopy pdPermCopy
+
+/** The document's notes, but nothing else, can be modified.
+ @see pdInfoCanEdit
+ @ingroup SecurityInfoFlags
+*/
+#define pdInfoCanEditNotes pdPermEditNotes
+
+/* This is the standard data used to fill in the Encrypt dict.
+ */
+
+#define MAX_PWCHARS 255
+
+typedef char StdPassword[MAX_PWCHARS+1];
+
+/**
+ A structure describing the data for the standard security
+ handler provided in the Acrobat viewer.
+*/
+typedef struct _t_StdSecurityData {
+ /** The size of this stucture. */
+ ASSize_t size;
+ /** <code>true</code> if the user password should be changed. */
+ ASBool newUserPW;
+ /** <code>true</code> if there is a user password. */
+ ASBool hasUserPW;
+ /** The user password. */
+ StdPassword userPW;
+ /** <code>true</code> if the owner password should be changed, <code>false</code> otherwise.*/
+ ASBool newOwnerPW;
+ /** <code>true</code> if an owner password is provided, <code>false</code> otherwise. */
+ ASBool hasOwnerPW;
+ /** The owner password. */
+ StdPassword ownerPW;
+ /** The permissions to allow. */
+ PDPerms perms;
+ /** The encryption key length in bytes. New for Acrobat 5.0. */
+ Int32 keyLength;
+ /** Indicates a /R value. New for Acrobat 6.0. */
+ Int32 revision;
+ /** A flag that indicates whether document metadata will be encrypted. */
+ ASBool encryptMetadata;
+ /** New for Acrobat 7.0.
+ <p>The method of encryption for filters to use. It is only valid if the version is 4 or greater.</p>
+ <p>The valid values are:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>CF_METHOD_RC4_V2</code></TD><TD>Use the RC4 algorithm for encryption.</TD></TR>
+ <TR><TD><code>CF_METHOD_AES_V1</code></TD><TD>Use the AES algorithm for encryption with a zero initialization vector.</TD></TR>
+ <TR><TD><code>CF_METHOD_AES_V2</code></TD><TD>Use the AES algorithm for encryption with a 16 byte random initialization vector.</TD></TR>
+ <TR><TD><code>CF_METHOD_AES_V3</code></TD><TD>Use the AES algorithm for encryption with a 4 byte random initialization vector.</TD></TR>
+ </TABLE>
+ */
+ Int32 encryptMethod;
+ /** A flag to indicate that only attachments are encrypted. <code>encryptMetadata</code> and <code>encryptAttachmentsOnly</code> cannot both be <code>true</code>. */
+ ASBool encryptAttachmentsOnly;
+ /** Indicates a /V value. New for Acrobat 9.0. */
+ Int32 version;
+} StdSecurityDataRec, *StdSecurityData;
+
+/* These values mirror values in CosCrypt.h, and must be kept in Sync - MTK (2 April 2008) */
+#define STDSEC_METHOD_RC4_V2 2 /* CF_METHOD_RC4_V2 */
+#define STDSEC_METHOD_AES_V1 5 /* CF_METHOD_AES_V1 (AES128) */
+#define STDSEC_METHOD_AES_V2 6 /* CF_METHOD_AES_V2 (AES128) */
+/** New encryption method for Acrobat 9.0 */
+#define STDSEC_METHOD_AES_V3 7 /* CF_METHOD_AES_V3 (AES256) */
+
+#define STDSEC_KEYLENGTH_RC4_V1 5 /* 40 bits */
+#define STDSEC_KEYLENGTH_RC4_V2 16 /* 128 bits */
+#define STDSEC_KEYLENGTH_AES128 16 /* 128 bits for AESV1 and AESV2 */
+/** New encryption method for Acrobat 9.0 */
+#define STDSEC_KEYLENGTH_AES256 32 /* 256 bits for AESV3 */
+
+/* Version flags */
+#define STDSEC_CryptVersionV1 1
+#define STDSEC_CryptVersionV2 2
+#define STDSEC_CryptVersionV3 3
+/* Crypt filter support is in V4 */
+#define STDSEC_CryptVersionV4 4
+/** New encryption method for Acrobat 9.0 */
+#define STDSEC_CryptVersionV5 5
+
+/* Revision flags */
+#define STDSEC_CryptRevision1 1
+#define STDSEC_CryptRevision2 2
+#define STDSEC_CryptRevision3 3
+#define STDSEC_CryptRevision4 4
+/* New Password and encryption in Acrobat 9.0
+ * 256-bit AES encryption -V5
+ * Unicode passwords -R5
+ * Password may be 127 UTF-8 bytes, no key mixing with Object ID
+ * This means that R5 and later algorithms must use an initialization
+ * vector and/or salt to mask identical strings.
+ */
+#define STDSEC_CryptRevision5 5
+
+
+/* used for GetInfoText PDCrypt callback */
+typedef enum {
+ kGCHTTipText = 1,
+ kGCHTMiniText,
+ kGCHTLargeText
+} GCHTextType;
+
+/**
+ A callback for PDCryptHandler. It is called by PDDocAuthorize() when
+ a user tries to set security for an encrypted document and
+ by a PDAuthProc() when a user tries to open a file.
+
+ <p>It must decide, based on the contents of the authorization
+ data structure, whether the user is permitted to open the
+ file, and what permissions the user has for this file. The
+ authorization data structure is available for making this
+ decision. Alternate implementations may not require authorization
+ data and may, for example, make authorization decisions
+ based on data contained in the security data structure (use
+ PDCryptNewSecurityDataProc()). </p>
+
+ <p>This callback must not obtain the authorization data (for
+ example, by displaying a user interface into which a user
+ can type a password). Obtaining authorization data is handled
+ by the security handler's PDCryptGetAuthDataProc(), which
+ must be called before this callback. Instead, PDCryptAuthorizeProc()
+ must work with whatever authorization data is passed to
+ it. </p>
+
+ <p>It is legitimate for this callback to be called with <code>NULL</code>
+ authorization data; the Acrobat viewer's built-in <code>authProc</code>
+ does this in order to support authorization methods that
+ do not require authorization data. </p>
+
+ <p>When this callback is invoked to determine whether a user
+ is permitted to open a file, <code>permWanted</code> is set to <code>pdPermOpen</code>.
+ In this case, the file's contents are not yet decrypted
+ (since this callback is being asked to permit decryption),
+ and some calls must be avoided. For example, a call that
+ causes a page to be parsed results in an error, since the
+ encrypted contents are parsed. In general, it is safe to
+ obtain information about the presence or absence of things,
+ or the number of things, and to examine any part of a document
+ at the Cos level. </p>
+ @param pdDoc The document for which authorized permissions
+ are being requested.
+ @param authData Authorization data. Its format is security
+ handler-specific; each handler can select its own authorization
+ data format.
+ @param permWanted The permissions being requested. It is
+ either <code>pdPermOpen</code> (if the file is being opened) or <code>pdPermSecure</code>
+ (if a request is being made to change the document's security
+ settings).
+ @return The permissions granted based on <code>authData</code>. For opening,
+ the permissions returned usually should be <code>pdPermOpen</code> and
+ some or all of <code>pdPermPrint</code>, <code>pdPermEdit</code>, and <code>pdPermCopy</code>.
+ For setting security, permissions returned should be <code>pdPermAll</code>.
+ However, if authorization fails, <code>0</code> should be returned.
+ @see PDCryptAuthorizeExProc
+ @see PDCryptAuthorizeFilterAccess
+ @see PDDocAuthorize
+ @see PDDocOpen
+ @see PDDocOpenEx
+*/
+typedef ACCBPROTO1 PDPerms (ACCBPROTO2 *PDCryptAuthorizeProc)(PDDoc pdDoc,
+ void *authData, PDPerms permWanted);
+
+/**
+ (Optional) A callback for PDCryptHandler. It creates a new empty
+ authorization data structure. This structure is subsequently
+ filled by PDCryptGetAuthDataProc(), then passed to PDCryptAuthorizeProc()
+ and eventually to ASfree().
+
+ <p>This callback is not called by the Acrobat viewer, but a
+ security handler may use it if it wishes. The Acrobat viewer's
+ standard security handler does not use this method. </p>
+ @param pdDoc The document for which a new authorization
+ data structure is created.
+ @return The newly created authorization data structure.
+ @see PDCryptFreeAuthDataProc
+ @see PDCryptGetAuthDataProc
+*/
+typedef ACCBPROTO1 void * (ACCBPROTO2 *PDCryptNewAuthDataProc)(PDDoc pdDoc);
+
+/**
+ A callback for PDCryptHandler. This callback is called from
+ a PDAuthProc when a file is opened after PDCryptNewSecurityDataProc()
+ is called.
+
+ <p>The callback must determine the user's authorization properties
+ for the document by obtaining authorization data, such as
+ a user interface log in or password entry. It populates
+ an authorization data structure with this data. </p>
+
+ <p>This callback may call the security handler's PDCryptNewAuthDataProc()
+ to allocate the authorization data structure. The use of an
+ authorization data structure is optional (an implementation
+ may wish to contain authorization data within the security
+ data structure). The authorization data structure is subsequently
+ used by the security handler's PDCryptAuthorizeProc() to determine
+ whether the user is authorized to open the file. </p>
+
+ <p>A security handler can specify the standard password dialog box
+ by using AVCryptGetPassword(). In this case, <code>authData</code>
+ is a <code>char*</code>. </p>
+ @param pdDoc The document to open.
+ @param permWanted Either <code>pdPermOpen</code> or <code>pdPermSecure</code>. Since
+ this value is also passed to PDCryptAuthorizeProc(), it may
+ not be necessary for this callback to use <code>permWanted</code>.
+ @param authDataP A pointer to the authorization data structure.
+ Set it to <code>NULL</code> if it is not used.
+ @return <code>true</code> unless the operation should be cancelled (for example,
+ if the user cancels a dialog), <code>false</code> otherwise.
+ @see PDCryptGetAuthDataExProc
+ @see PDCryptNewAuthDataProc
+ @see PDDocOpen
+ @see PDDocOpen
+ @see PDDocOpenEx
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptGetAuthDataProc)(PDDoc pdDoc,
+ PDPerms permWanted, void **authDataP);
+
+/**
+ (Optional) A callback for PDCryptHandler. It creates and populates
+ a new structure that contains whatever security-related
+ information the security handler requires (for example,
+ permissions, whether the file has owner and/or user passwords,
+ owner and/or user passwords, or other data used internally
+ by the security handler). If <code>encryptDict</code> is not <code>NULL</code>, the
+ structure should be populated based on the <code>encryptDict</code> parameter's contents.
+ This method is intended only to initialize the security
+ data structure.
+
+ <p>This callback is called under two circumstances:</p>
+ <ul>
+ <li>When a document is opened, it is called with encryptDict
+ set to the document's Encryption dictionary. The handler
+ should then populate the new security data structure with
+ data that is obtained from the Encryption dictionary. </li>
+ <li>When the user chooses a new encryption method, it is called
+ without an encryptDict. The handler should return a security
+ data structure with default values.</li>
+ </ul>
+
+ <p>If a security handler does not have this callback, the document's
+ <code>newSecurityData</code> field is set to <code>NULL</code>. </p>
+
+ <p>If a file is to be saved, then PDCryptUpdateSecurityDataProc()
+ is subsequently called to allow user interface modification
+ of the contents. </p>
+
+ <p>Security data is freed using PDCryptFreeSecurityDataProc().
+ If PDCryptFreeSecurityDataProc() is not defined, ASfree() is
+ used. </p>
+ @param pdDoc The document for which a new security data
+ structure is created.
+ @param encryptDict If <code>encryptDict</code> is a dictionary, this
+ callback must initialize the security data so that it corresponds
+ to the dictionary. Otherwise, it must set up default values
+ in the security data structure.
+ @return The newly created security data structure.
+ @see PDCryptFreeSecurityDataProc
+*/
+typedef ACCBPROTO1 void * (ACCBPROTO2 *PDCryptNewSecurityDataProc)(PDDoc pdDoc,
+ CosObj encryptDict);
+
+/**
+ (Optional) A callback for PDCryptHandler. It validates the security
+ data structure, which specifies the user's permissions.
+ This callback may modify the security data structure (for
+ example, because the user is not authorized to change the
+ security as they requested). A client may have called PDDocNewSecurityData()
+ to obtain a new security data structure, then modified it,
+ and then called PDDocSetNewSecurityData() to change the document
+ security. This callback should be called before actually
+ setting the document's security data.
+
+ <p>This callback is not called automatically by the Acrobat
+ viewer. It must be called, if desired, by the security handler's
+ PDCryptUpdateSecurityDataProc().</p>
+ @param pdDoc IN/OUT The document whose security data is validated.
+
+ @param secData IN/OUT (May be modified by the callback) The document's
+ security data.
+ @see PDCryptUpdateSecurityDataProc
+ @see PDDocNewSecurityData
+ @see PDDocSetNewSecurityData
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptValidateSecurityDataProc)(PDDoc pdDoc,
+ void *secData);
+
+/**
+ A callback for PDCryptHandler. It updates the security data structure
+ that was created by PDCryptNewSecurityDataProc(). This structure
+ can be obtained by calling PDDocGetNewSecurityData(). The
+ security data structure of the previously saved file can
+ be obtained with a call to PDDocGetSecurityData().
+
+ <p>The security data structure should be updated to reflect
+ the encryption parameters that will be used when saving
+ the file (this information is usually obtained via dialogs).
+ The encryption parameters are transferred to the Encrypt
+ dictionary by a subsequent callback to PDCryptFillEncryptDictProc(). </p>
+
+ <p>The security data should be allocated by ASmalloc() or a related
+ function. Security data is freed using PDCryptFreeSecurityDataProc().
+ If PDCryptFreeSecurityDataProc() is not defined, ASfree() is
+ used.</p>
+
+ <p>The callback can also update the security handler itself.
+ For example, the standard encryption handler switches to
+ no encryption if no passwords or permissions are set in
+ the security dialog box. Return ASAtomNull in <code>cryptHandler</code>
+ if no encryption is used in the saved file. </p>
+ @param pdDoc The document whose security data is updated.
+
+ @param cryptHandler The current security handler for <code>pdDoc</code>.
+ It can be modified to change the security handler. Encryption
+ is turned off if ASAtomNull is set.
+ @param secDataP (Required) A security data structure. Its
+ content and organization is up to the security handler.
+ @return <code>true</code> unless the operation should be cancelled (for example,
+ the user clicked on the Cancel button).
+ @see PDCryptValidateSecurityDataProc
+ @see PDDocGetSecurityData
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptUpdateSecurityDataProc)(PDDoc pdDoc,
+ ASAtom *cryptHandler, void **secDataP);
+
+/**
+ A callback for PDCryptHandler. It sets up the key to be passed
+ to initialize the RC4 cipher for encryption and decryption
+ of a PDF file. It is called when an encrypted document is
+ opened or saved.
+ @param pdDoc IN/OUT The document for which the key is set.
+ @param cryptData IN/OUT (Filled by the callback) The key. <code>cryptData</code>
+ must be allocated by ASmalloc() because the Acrobat viewer
+ will free it using ASfree().
+ @param cryptDataLen IN/OUT (Filled by the callback) The number
+ of bytes in cryptData. It cannot be greater than <code>5</code> bytes.
+ @see PDCryptNewAuthDataProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptNewCryptDataProc)(PDDoc pdDoc,
+ char **cryptData, ASInt32 *cryptDataLen);
+
+/**
+ A callback for PDCryptHandler. It is called when an encrypted document
+ is saved. It fills the document's Encryption dictionary with
+ whatever information the security handler wants to store
+ in the document.
+
+ <p>Normally this callback is called after PDCryptUpdateSecurityDataProc().
+ The security data structure can be obtained with a call
+ to PDDocGetNewSecurityData(), and <code>encryptDict</code> is filled
+ based on this data.</p>
+
+ <p>The sequencing of events that the viewer performs during
+ creation of the encryptDict is as follows:</p>
+ <ul>
+ <li>The viewer creates the <code>encryptDict</code>.</li>
+ <li>The viewer adds the Filter attribute to the dictionary.</li>
+ <li>The viewer calls this PDCryptFillEncryptDictProc() to allow the security
+ handler to add its own attributes to the dictionary.</li>
+ <li>The viewer calls the PDCryptNewCryptDataExProc() (the PDCryptNewCryptDataProc()
+ if unsuccessful) to get the algorithm version, key, and
+ key length.</li>
+ <li>The viewer checks if the V attribute has been added to the dictionary
+ and, if not, it sets V to the algorithm version.</li>
+ <li>The viewer sets the Length attribute if V is <code>2</code> or greater.</li>
+ <li>The viewer adds the encryptDict to the document.</li>
+ </ul>
+
+ @param pdDoc IN/OUT The document to save.
+ @param encryptDict IN/OUT A dictionary Cos object to fill with
+ whatever information the security handler wants to store
+ in the PDF file. Unlike all other strings and streams, direct
+ object elements of the <code>encryptDict</code> are not encrypted automatically.
+ If you want them encrypted, you must encrypt them before
+ inserting them into the dictionary.
+ @see PDDocSave
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptFillEncryptDictProc)(PDDoc pdDoc,
+ CosObj encryptDict);
+
+/**
+ (Optional) A callback for PDCryptHandler. It is called by PDDocGetNewSecurityInfo().
+ It extracts the security information from the security data
+ structure, and returns the security information.
+
+ <p>This function is also used after a Save As... to reset the
+ permissions according to the current document. </p>
+
+ <p>A default set of permissions is used if this callback is
+ absent: </p>
+
+ <p><code>pdInfoCanPrint|pdInfoCanEdit|pdInfoCanCopy|pdInfoCanEditNotes </code></p>
+
+ <p>See PDPerms. </p>
+ @param pdDoc The document whose security information is obtained.
+
+ @param secInfo (Filled by the callback) The document's
+ security information. The value must be an OR of the Security Info
+ Flags. All unused bits in must be set to <code>1</code>.
+ @see PDDocGetNewSecurityInfo
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptGetSecurityInfoProc)(PDDoc pdDoc,
+ ASUns32 *secInfo);
+
+/**
+ (Optional) A callback for PDCryptHandler. It is used to free security
+ data acquired via PDCryptNewSecurityDataProc(). If this callback
+ is omitted, the viewer defaults to freeing the data using
+ ASfree().
+ @param pdDoc IN/OUT The document whose security data is freed.
+
+ @param secData IN/OUT (Filled by the callback) A pointer to the
+ document's security data.
+ @see PDCryptNewSecurityDataProc
+ @see PDDocGetNewSecurityInfo
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptFreeSecurityDataProc)(PDDoc pdDoc,
+ void *secData);
+
+/**
+ (Optional) A callback for PDCryptHandler. It is used to free authorization
+ data acquired via PDCryptNewAuthDataProc(). If this callback
+ is omitted, the viewer defaults to freeing the data using
+ ASfree().
+ @param pdDoc IN/OUT The document whose authorization data is freed.
+
+ @param authData IN/OUT (Filled by the callback) A pointer to the
+ document's authorization data.
+ @see PDCryptNewAuthDataProc
+ @see PDDocGetNewSecurityInfo
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptFreeAuthDataProc)(PDDoc pdDoc, void *authData);
+
+/**
+ (Optional) A callback for PDCryptHandler. It is used to free authorization
+ data acquired via PDCryptNewCryptDataProc(). If this callback
+ is omitted, the viewer defaults to freeing the data using
+ ASfree().
+ @param pdDoc IN/OUT The document whose encryption/decryption
+ data is freed.
+ @param cryptData IN/OUT (Filled by the callback) A pointer to the
+ document's encryption/decryption data.
+ @see PDCryptNewCryptDataProc
+ @see PDDocGetNewSecurityInfo
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptFreeCryptDataProc)(PDDoc pdDoc, char *cryptData);
+
+/**
+ A callback for PDCryptHandler. It sets up the key to be passed
+ to initialize the RC4 cipher for encryption and decryption
+ of a PDF file. It is called when an encrypted document is
+ opened or saved.
+
+ <p>The key is truncated when the length is greater than the
+ viewer currently supports. Data is freed by PDCryptFreeCryptDataProc()
+ if provided. Otherwise, ASfree() is used.</p>
+ @param pdDoc IN/OUT The document for which the key is set.
+ @param cryptData IN/OUT (Filled by the callback) The key. <code>cryptData</code>
+ must be allocated by ASmalloc() because the Acrobat viewer
+ will free it using ASfree().
+ @param cryptDataLen IN/OUT (Filled by the callback) The number
+ of bytes in <code>cryptData</code>. It cannot be greater than <code>5</code> bytes.
+ @param cryptVersion IN/OUT The Cos crypt version, which is the version
+ of the algorithm that is used to encrypt and decrypt document
+ data. <code>cryptVersion</code> equal to <code>0</code> is treated as <code>cryptVersion</code>
+ equal to <code>1</code> to maintain backward compatibility.
+ @see PDCryptFreeCryptDataProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptNewCryptDataExProc)(PDDoc pdDoc,
+ char **cryptData, ASInt32 *cryptDataLen, ASInt32 *cryptVersion);
+
+/**
+ Replaces PDCryptAuthorizeProc. PDPerms are now obsolete
+ because Acrobat 5.0 introduces new permission controls.
+ However, Acrobat still supports old security handlers.
+
+ <p>It is called whenever Acrobat needs to get authorization data
+ and/or check permissions for operations. </p>
+ @param pdDoc The document for which the request is made.
+
+ @param reqObj The object type that is the focus of the request:
+ it is one of the PDPermReqObj values.
+ @param reqOpr The operation type that is the focus of the
+ request: it is one of the PDPermReqOpr values.
+ @param authData Authorization data. Its format is security
+ handler-specific.
+ @return The status of the request. It is one of the PDPermReqStatus values.
+
+ @see PDCryptAuthorizeProc
+ @see PDDocPermRequest
+*/
+typedef ACCBPROTO1 PDPermReqStatus (ACCBPROTO2 *PDCryptAuthorizeExProc)(PDDoc pdDoc, PDPermReqObj reqObj,
+ PDPermReqOpr reqOpr, void *authData);
+
+/**
+ Replaces PDCryptGetAuthDataProc(). It is called whenever Acrobat
+ needs to get authorization data and/or check permissions
+ for operations.
+
+ <p>PDPerms are now obsolete because Acrobat 5.0 introduces
+ new permission controls. However, Acrobat still supports
+ old security handlers. </p>
+ @param pdDoc The document for which the request is made.
+
+ @param reqObj The object type that is the focus of the request:
+ it is one of the PDPermReqObj values.
+ @param reqOpr The operation type that is the focus of the
+ request: it is one of the PDPermReqOpr values.
+ @param authDataP A pointer to an authorization data structure.
+ Its format is security handler-specific.
+ @return <code>true</code> unless the operation should be cancelled (for example,
+ if the user cancels a dialog), <code>false</code> otherwise.
+ @see PDCryptGetAuthDataProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptGetAuthDataExProc)(PDDoc pdDoc, PDPermReqObj reqObj,
+ PDPermReqOpr reqOpr, void **authDataP);
+
+/**
+ Called when the application needs to open a rolled back portion of the original document.
+ A <i>rolled back</i> document is the original portion of the document when it is digitally signed. This
+ functionality is used for document modification detection.
+
+ <p>A rolled back document still requires authorization data which should be identical to the original document's.
+ However, the <code>authDataP</code> structure is unique to each security handler;
+ therefore, it cannot be duplicated by the application.</p>
+
+ <p>This callback is intended for opening a rolled back document silently by asking the security handler to
+ provide authorization data for it. The security handler should be able to duplicate the security data associated
+ with the original document and supply for the rolled back document. The callee is expected to authorize
+ subsequent callbacks, including Crypt Filters.</p>
+
+ <p>If this callback is not provided, the security handler is asked for authorization data via a normal call such as PDCryptGetAuthDataExProc().
+ The side effect might include the security handler's prompting for a password for the rolled back document.</p>
+
+ @param pdDoc The document for which the request is made (a rolled back document).
+ @param encryptDict An encryption dictionary for <code>pdDoc</code>. It is here just in case the security handler might need it.
+ @param alreadyOpenedDoc The original PDDoc from which the rolled back document is extracted.
+ It is provided so that the security handler can get security data out for the rolled back document.
+ @param openedEncryptDict The encryption dictionary of the original PDDoc.
+ @param authDataP Used to return security data for the rolled back document.
+ @return <code>true</code> unless the security handler cannot provide authorization data for the requested document.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptNewSecurityDataFromOriginalDocProc)(PDDoc pdDoc, CosObj encryptDict,
+ PDDoc alreadyOpenedDoc, CosObj openedEncryptDict, void **authDataP);
+
+/**
+ Called when the security handler should bring up a document
+ (security) information dialog box with the current settings. It also
+ should return <code>true</code> when the user wants to change the settings.
+
+ <p>If this callback is not supplied, the default information dialog
+ is displayed with PDPerms bits information (an Acrobat 4.x-equivalent dialog).</p>
+ @param pdDoc IN/OUT The document whose information is displayed.
+ @param cryptHandler IN/OUT The registered name of the handler.
+
+ @return <code>true</code> if the handler wishes a callback to change the settings,
+ <code>false</code> otherwise.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptDisplaySecurityDataProc)(PDDoc pdDoc, ASAtom cryptHandler);
+
+/**
+ (Optional) A callback for PDCryptHandler. It is used by the Acrobat
+ WebBuy proprietary method of passing crypt data.
+*/
+typedef ACCBPROTO1 void * (ACCBPROTO2 *PDCryptReservedProc)(void);
+
+/**
+ (Optional) This call is used to provide PDCrypt handler interoperability.
+ When an encrypted document is being opened and the security handler
+ specified in the encryption dictionary is not present, this callback is
+ used to determine if one of the registered security handlers can be used
+ to open the document.
+
+ @param pdDoc The document being opened.
+ @param encryptDict The encryption dictionary.
+
+ @return <code>true</code> if the handler supports the format of <code>encryptDict</code>.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptCanParseEncryptDictProc)(
+ PDDoc pdDoc,
+ CosObj encryptDict);
+
+/**
+ A callback for PDCryptHandler. This function should extract
+ and return information about the document permissions to
+ display for the user: whether the user can print, edit, copy
+ text and graphics, edit notes and do form fill in and signing.
+
+ <p>The permissions returned are logically AND-ed with the document
+ permissions returned by any other permissions handlers, and
+ displayed to the user. All crypt handlers should implement
+ this call so that consolidated permissions can be displayed.
+ To display your own crypt handler's permissions, implement
+ PDCryptDisplaySecurityDataProc(). </p>
+
+ <p>If this callback is absent, Acrobat assumes that all the
+ operations on the document are allowed. </p>
+ @param pdDoc The document whose permissions are obtained.
+
+ @param perms (Filled by the callback) An array of the
+ document's permissions. For each combination of PDPermReqObj
+ and PDPermReqOpr, the value is <code>true</code> if the operation is
+ allowed for the object, <code>false</code> if it is not.
+ @param version (Filled by the callback) A pointer to the
+ version number of PDPermReqObj and PDPermReqOpr with which
+ this crypt handler is compatible (specified by the constant
+ PDPermReqVersion).
+ @see PDDocPermRequest
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptGetDocPermsProc) (
+ PDDoc pdDoc, ASBool perms[PDPermReqObjLast][PDPermReqOprLast], ASInt16 *version );
+
+/**
+ (Optional) A callback for PDCryptHandler.
+ It determines whether a document's metadata will be encrypted. If this call is not
+ implemented, the metadata is always encrypted. Note that documents with plain text
+ metadata can be opened only by Acrobat versions 6.0 and later.
+
+ @param pdDoc IN The document being encrypted.
+
+ @return <code>true</code> if document metadata should be encrypted.
+*/
+
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptEncryptDocMetadata)(PDDoc pdDoc);
+
+/**
+ (Optional) A callback for PDCryptHandler.
+ It provides information for display about document security settings.
+
+ @param pdDoc IN The document.
+ @param textType IN The text that should be used:
+
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>kGCHTTipText</code></TD><TD>Text used for a security tool tip. It should be short. Its default is <code>"This document is secured."</code></TD></TR>
+ <TR><TD><code>kGCHTMiniText</code></TD><TD>Text used for a security hover. It should be medium length. Its default is <code>"This document has been encrypted and may use..."</code></TD></TR>
+ <TR><TD><code>kGCHTLargeText</code></TD><TD>Text use for Toast on Windows. It can have a longer length. There is no default.</TD></TR>
+ </TABLE>
+
+ @return The ASText value owned by the caller. Use a default value of <code>NULL</code>.
+*/
+
+typedef ACCBPROTO1 ASText (ACCBPROTO2 *PDCryptGetInfoTextProc)(PDDoc pdDoc, GCHTextType textType);
+
+/**
+ (Optional) Used by Acrobat for Automated Permission Testing.
+*/
+typedef ACCBPROTO1 void * (ACCBPROTO2 *PDCryptReservedProc2)(PDDoc pdDoc, ASCab settings);
+
+/**
+ A callback for PDCryptBatchHandler. This callback puts up
+ a dialog box that allows a user to enter data that will be used
+ to batch secure a series of files. The data is stored in
+ an ASCab which is part of a batch sequence file. The actual
+ security data, including password(s), should be stored
+ as a pointer in the ASCab so that password information is
+ not serialized to disk. Pointers are not serialized from
+ ASCab objects, but ASText objects, ASInt32 objects, and ASBool objects are serialized.
+
+ @param settings IN/OUT An object of type ASCab.
+ @return <code>true</code> indicates success.
+*/
+
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptBatchShowDialogProc)(ASCab settings);
+
+/**
+ A callback for PDCryptBatchHandler. The developer should provide
+ information about the current batch settings for the security
+ handler. Batch settings are provided as a read-only ASCab
+ that is passed to the function. A writable ASCab is also
+ provided, which should be used to store parameter information
+ about the security handler. The description information
+ should be stored starting in the <code>paramDesc</code> ASCab using ASText
+ objects starting with key <code>" 1"</code>.
+ @example <code>key=" 1", value="Title: API Reference"</code> (ASText object)
+ @param settings IN/OUT Batch settings.
+ @param paramDesc IN/OUT Description information.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptBatchParamDescProc)(const ASCab settings, ASCab paramDesc);
+
+/**
+ A callback for PDCryptBatchHandler. It is different from the regular
+ PDCryptHandler <code>NewAuthData</code> function. It creates and returns a
+ <code>void*</code> which is the authorization data for the batch security
+ handler. This data should be used to batch both open files
+ and secure files. Therefore, make sure to provide
+ password information for both the <code>pdPermOpen</code> and <code>pdPermSecure</code>
+ cases. This data will be passed to the PDCryptBatchAuthorizeProc()
+ callback and eventually to PDCryptBatchFreeAuthDataProc()
+ to free the data. This authorization data is collected before
+ any files are opened in the batch sequence. It is permitted
+ to display a user interface at this point since the batch operation
+ has not started yet. The data applies to all files, and
+ therefore could represent one or more passwords which can
+ be enumerated in the <code>BatchAuthorize</code> function which receives
+ the batch authorization data.
+*/
+typedef ACCBPROTO1 void * (ACCBPROTO2 *PDCryptBatchNewAuthDataProc)(void);
+
+/**
+ A callback for PDCryptBatchHandler. It is called when a PDF file is
+ opened. It is first called with <code>NULL</code> <code>authData</code> for the case without
+ a user password. It is called again with authorization data provided
+ for the security handler that matches the one used in the
+ PDF file.
+
+ @note This function is called a batch operation and therefore
+ should not display any user interface. During a batch operation,
+ a file will first be opened with the <code>pdPermSecure</code> bit set.
+ It will then be opened with the <code>pdPermOpen</code> bit set.
+ @param pdDoc IN/OUT The document being opened.
+ @param reqObj IN/OUT The object type that is the focus of the request:
+ it is one of the PDPermReqObj values.
+ @param reqOpr IN/OUT The operation type that is the focus of the request:
+ it is one of the PDPermReqOpr values.
+ @param authData IN/OUT Authorization data. Its format is security
+ handler-specific.
+ @return PDPermReqStatus
+*/
+typedef ACCBPROTO1 PDPermReqStatus (ACCBPROTO2 *PDCryptBatchAuthorizeProc)(PDDoc pdDoc,
+ PDPermReqObj reqObj, PDPermReqOpr reqOpr, void *authData);
+
+/**
+ A callback for PDCryptBatchHandler. If provided, it must be used
+ to free <code>authData</code> acquired via BatchGetAuthData() or BatchNewAuthData().
+ If no BatchFreeAuthData() function is provided, a default
+ one will be used which calls ASfree() on the <code>authData</code> if it
+ is non-<code>NULL</code>.
+ @param authData IN/OUT Authorization data. Its format is security
+ handler-specific.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptBatchFreeAuthDataProc)(void *authData);
+
+/**
+ A callback for PDCryptBatchHandler. This function is called
+ at the beginning of a batch sequence before any files have
+ been opened. This allows a security handler to be called
+ back with the ASCab of settings that were filled out by
+ the BatchShowDialog() function, or by an ASCab that was read
+ in from disk. Pointers of security information are not serialized
+ to disk, and therefore a security information structure
+ may need to be regenerated based on other security information
+ in the ASCab. It is permitted for the BatchPreSequence() callback
+ to put up a user interface asking the user for more information since
+ the batch sequence has not started yet. If this function
+ returns <code>false</code>, the viewer will assume that the command cannot
+ be executed and will cancel the sequence.
+ @param settings IN/OUT Batch settings.
+ @return See above.
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptBatchPreSequenceProc)(ASCab settings);
+
+/**
+ A callback for PDCryptBatchHandler. This function is called
+ at the end of a batch sequence after all files have been
+ processed. Any memory that was allocated in the BatchPreSequence()
+ call should be cleaned up in this callback.
+ @param settings IN/OUT Batch settings.
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptBatchPostSequenceProc)(ASCab settings);
+
+/**
+ A callback for PDCryptBatchHandler. This function should update
+ the crypt handler's security data without bringing up a
+ dialog. This data is provided by a PDCryptBatchShowDialogProc().
+ The current security data can be obtained by calling PDDocGetNewSecurityData().
+
+ @note This function is called a batch operation and therefore
+ should not display any user interface.
+ @param pdDoc The document whose data is updated.
+ @param settings An object of type ASCab.
+ @param cryptHandler An object of type ASAtom.
+ @param secDataP A pointer to the document's security data.
+ @return This function should return <code>true</code> unless there is a problem
+ with the batch data for this security handler.
+
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptBatchUpdateSecurityDataProc)(
+ PDDoc pdDoc, ASCab settings, ASAtom *cryptHandler, void **secDataP);
+
+/* Call back routine prototypes for Crypt Filter support */
+
+/**
+ (Optional) A callback for PDCryptFilterHandler. Callbacks
+ that conform to this prototype are called to encrypt or
+ decrypt streams from a document.
+
+ <p>The first call to a procedure of this type must fill out
+ an ASCryptStmRec structure with pointers to callback routines
+ for various types of stream access; see ASCryptStmProcs(). </p>
+
+ @param dP The document containing the stream.
+ @param filterName The name of the security filter in use.
+
+ @param stm The security stream structure containing the
+ stream itself, access information, and an ASCryptStmRec.
+ This callback function is called upon opening the stream;
+ the first call must initialize the stream.
+ @param handOff <code>true</code> if the method should close the base
+ stream when it closes the filter, <code>false</code> otherwise.
+ @param params A Cos object containing parameters for the
+ operation, as specified for the filter.
+ @param stmLength For a decryption operation, the requested
+ number of bytes; for an encryption operation, the number
+ of bytes in the stream contained in <code>stm</code>.
+ @see PDCryptFilterAuthorizeProc
+ @see PDCryptFilterGetDataProc
+ @see PDCryptFilterStringProc
+ @see PDDocSetNewCryptFilterData
+ @see PDDocSetNewCryptFilterMethod
+ @see PDDocSetNewDefaultFilters
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDCryptFilterStreamProc)(
+ CosDoc dP, ASAtom filterName, ASCryptStm stm, ASBool handOff, CosObj params, ASInt32 stmLength);
+
+/**
+ (Optional) A callback for PDCryptFilterHandler. Acrobat's
+ security mechanism calls this method to determine whether
+ the user should have access to this filter.
+ @param dP The document for which to perform authorization.
+
+ @param filterName The name of the security filter.
+ @param encryptDict The encryption dictionary to use.
+ @param bEncrypt <code>true</code> if authorization is for an encryption
+ operation, <code>false</code> if it is for a decryption operation.
+ @param bUIAllowed <code>true</code> if the caller can bring up the
+ security dialogs as needed, <code>false</code> otherwise.
+ @return <code>true</code> if the user has access to this filter, <code>false</code> otherwise.
+
+ @see PDCryptFilterGetDataProc
+ @see PDCryptFilterStreamProc
+ @see PDCryptFilterStringProc
+ @see PDCryptAuthorizeFilterAccess
+ @see PDDocSetNewCryptFilterMethod
+ @see PDDocSetNewDefaultFilters
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDCryptFilterAuthorizeProc)(
+ CosDoc dP, ASAtom filterName, CosObj encryptDict, ASBool bEncrypt, ASBool bUIAllowed);
+
+/**
+ (Optional) A callback for PDCryptFilterHandler. Acrobat's
+ security mechanism calls this method to retrieve the encryption/decryption
+ key for this filter. It is called only when the filter's encryption
+ method is V2.
+ @param dP The document whose data is retrieved.
+ @param filterName The name of the security filter.
+ @param key (Filled by the method) A pointer to the encryption/decryption
+ key.
+ @param bNewKey <code>true</code> if you want to retrieve a new key
+ (changed since opening the file), <code>false</code> otherwise.
+ @param bUIAllowed <code>true</code> if the caller can bring up the
+ security dialogs as needed, <code>false</code> otherwise.
+ @see PDCryptFilterAuthorizeProc
+ @see PDCryptFilterStreamProc
+ @see PDCryptFilterStringProc
+ @see PDDocSetNewCryptFilterData
+ @see PDDocSetNewCryptFilterMethod
+ @see PDDocSetNewDefaultFilters
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *PDCryptFilterGetDataProc)(
+ CosDoc dP, ASAtom filterName, char **key, ASBool bNewKey, ASBool bUIAllowed);
+
+#define PDCryptFilterStringProc CosCryptStringProc
+
+/** PDCrypt Filter support:
+
+ <ul>
+ <li>Encryption callback routines are optional. However, the security handler is responsible for not allowing the application to cause a Full Save.</li>
+ <li>String encryption/decryption support is not required.</li>
+ <li>The <code>DecryptStream</code> callback can be <code>NULL</code> if the crypt filter handler does not perform encryption/decryption on its own.
+ In such cases, <code>GetDataProc</code> must be supplied.</li>
+ <li>Crypt Filter handlers are expected to return <code>0</code> length buffer (or EOF) when unauthorized access is made.</li>
+ </ul>
+
+ <p>The <code>CryptStringProcs</code> string callback is expected to return the desired buffer size (the required destination buffer length)
+ when <code>NULL</code> is passed as the destination buffer. This mechanism is to allow a different buffer length upon
+ encryption/decryption.</p>
+
+ <p>About the ASCryptStm in the callback: upon the first call (back) to Encrypt/Decrypt stream procs, the handler is expected to
+ fill out an ASCryptStmRec. ASCryptStm has pointers to callback routines for various stream access. Subsequent stream
+ access is made to these callback routines. See ASExpT.h for the ASCryptStmRec definition.</p>
+*/
+typedef struct _t_PDCryptFilterHandler {
+ /** Set this to <code>sizeof(PDCryptFilterHandlerRec)</code>. */
+ ASSize_t size;
+ /** */
+ PDCryptFilterAuthorizeProc Authorize;
+ /** Called to get crypt data when the application's built-in method is used. */
+ PDCryptFilterGetDataProc GetData;
+ /** */
+ PDCryptFilterStreamProc DecryptStream;
+ /** */
+ PDCryptFilterStreamProc EncryptStream;
+ /** */
+ PDCryptFilterStringProc DecryptString;
+ /** */
+ PDCryptFilterStringProc EncryptString;
+} PDCryptFilterHandlerRec;
+
+typedef struct _t_PDCryptFilterHandler *PDCryptFilterHandler;
+
+/**
+ Callbacks used to open secured files and to modify security
+ settings while batch processing a list of files. These
+ callbacks are not called while opening files through the
+ user interface. In addition, the regular PDCryptHandler functions are
+ not called during batch operations.
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+*/
+typedef struct _t_PDCryptBatchHandler {
+ /** Set this to <code>sizeof(PDCryptBatchHandlerRec)</code>.*/
+ ASSize_t size;
+
+ /** This function should display a dialog box that allows a user to enter data
+ that will be used to batch secure a series of files. The data is stored in an
+ ASCab which is part of a Batch sequence file. The actual security data, including
+ password(s), should be stored as a pointer in the ASCabinet so that password information
+ is not serialized to disk. Pointers are not serialized from ASCab objects, but ASText objects, ASInt32 objects,
+ and ASBool objects are serialized.
+ */
+ PDCryptBatchShowDialogProc BatchShowDialog;
+
+ /** The developer should provide information about the current batch settings for the security handler.
+ Batch settings are provided as a read-only ASCab which is passed in to the function. A
+ writeable ASCab is also provided, which should be used to store parameter information about
+ the security handler. The description information should be stored starting in the
+ <code>paramDesc</code> ASCab using ASText objects starting with key <code>"1"</code>.
+
+ @example <code>key="1", value="Title: API Reference"</code> (ASText object)
+ */
+ PDCryptBatchParamDescProc BatchParamDesc;
+
+ /** This is different from the regular PDCryptHandler <code>NewAuthData</code> function.
+ It creates and returns a <code>void*</code> which is the authorization data for the batch security handler.
+ This data should be used to batch both open files and secure files. Therefore,
+ make sure to provide password information for both the <code>pdPermOpen</code> and <code>pdPermSecure</code> cases,
+ and pass to <code>Authorize</code> and eventually to ASfree().
+
+ <p>This authorization data is collected before any files are opened in the Batch sequence.
+ It is permitted to display a user interface at this point since the Batch operation has not started yet.
+ The data applies to all files, and therefore could represent one or more passwords which
+ can be enumerated in the <code>BatchAuthorize</code> function which receives the Batch <code>authData</code>.</p>
+ */
+ PDCryptBatchNewAuthDataProc BatchNewAuthData;
+
+ /** Called when a PDF file is opened. It is first called with <code>NULL</code> <code>authData</code> for the case without a
+ user password. It is called again with authorization data provided for the security handler
+ that matches the one used in the PDF file.
+
+ During a Batch operation, a file will first be opened with the <code>pdPermSecure</code> bit set. It
+ will then be opened with the <code>pdPermOpen</code> bit set.
+
+ @note This function is called a Batch operation and therefore should not display any user interface.
+ */
+ PDCryptBatchAuthorizeProc BatchAuthorize;
+
+ /** If provided, this must be used to free the <code>authData</code> acquired via
+ <code>BatchGetAuthData</code> or <code>BatchNewAuthData</code>. If no <code>BatchFreeAuthData</code> function is provided,
+ a default one will be used which calls ASfree() on the <code>authData</code> if it is non-<code>NULL</code>.
+ */
+ PDCryptBatchFreeAuthDataProc BatchFreeAuthData;
+
+ /** This function should update the crypt handler's security data without bringing
+ up a dialog. This data is provided by a PDCryptShowBatchDialogProc().
+ The current security data can be obtained by calling PDDocGetNewSecurityData().
+ This function should return <code>true</code> unless there is a problem with the batch data
+ for this security handler.
+
+ @note This function is called a Batch operation and therefore should not display any user interface.
+ */
+ PDCryptBatchUpdateSecurityDataProc BatchUpdateSecurityData;
+
+ /** This function is called at the beginning of a Batch sequence before any files have been
+ opened. This allows a security handler to be called back with the ASCab of settings that
+ were filled out by the BatchShowDialog() function, or by an ASCabinet that was read in
+ from disk. Pointers of security information are not serialized to disk, and therefore
+ a security information structure may need to be regenerated based on other security
+ information in the ASCabinet.
+
+ <p>It is permitted for the <code>BatchPreSequence</code> callback to display a user interface asking the user for
+ more information since the Batch sequence has not started yet.</p>
+
+ <p>If this function returns <code>false</code>, the viewer will assume that the command cannot be executed,
+ and will cancel the sequence.</p>
+ */
+ PDCryptBatchPreSequenceProc BatchPreSequence;
+
+ /** This function is called at the end of a Batch sequence after all files have been
+ processed. Any memory that was allocated in the <code>BatchPreSequence</code> call should be
+ cleaned up in this callback.
+ */
+ PDCryptBatchPostSequenceProc BatchPostSequence;
+} PDCryptBatchHandlerRec;
+
+typedef struct _t_PDCryptBatchHandler *PDCryptBatchHandler;
+
+
+/**
+ A data structure containing callbacks that implement a security handler. The callbacks
+ implement the security handler functions. For example, they get authorization data such as
+ a password from the user, set permissions, read and write security-related data in a
+ PDF file, and so on.
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+*/
+typedef struct _t_PDCryptHandler {
+ /** Set this to <code>sizeof(PDCryptHandlerRec)</code>. PDRegisterCryptHandler
+ uses this to determine if the caller was compiled with an old
+ version of this structure declaration. PDRegisterCryptHandler()
+ will raise <code>genErrBadParam</code> if the size does not correspond to
+ a known size of this <code>struct</code>.
+ */
+ ASSize_t size;
+
+ /** This function will be called when a user tries to open or set
+ security for an encrypted document. <code>PermsWanted</code> will be either
+ <code>pdPermOpen</code> or <code>pdPermSecure</code>. This function should return the
+ permissions granted based on the <code>authData</code>. For opening, the
+ permissions returned usually should be <code>pdPermOpen</code> and some or
+ all of <code>pdPermPrint</code>, <code>pdPermEdit</code>, and <code>pdPermCopy</code>. For setting
+ security, permissions returned should be <code>pdPermAll</code>. However,
+ if authorization fails, <code>0</code> should be returned. The function is
+ first called with <code>authData</code> equal to <code>NULL</code>. If that fails, <code>GetAuthData</code>
+ is called and the <code>authData</code> from it is passed to <code>Authorize</code>.
+
+ <p>If this function is called to authorize Open, decryption will
+ not yet have been installed. So while any part of the document
+ may be examined, some calls must be avoided. For example, a
+ call that causes a page to be parsed will probably result in an
+ error since the encrypted contents will be parsed. In general,
+ it is safe to obtain information about the presence or absence
+ of things, or the number of things, and to examine any part of
+ a document at the Cos level.</p>
+ */
+ PDCryptAuthorizeProc Authorize;
+
+ /** Creates and returns a new <code>struct</code> that can be filled out
+ and passed to <code>Authorize</code> and eventually to ASfree().
+ This function is not called by the standard security mechanism
+ but may be called by extensions that want to gain access
+ to a protected document. This function need not be
+ implemented if clients can simply allocate data using
+ ASmalloc(). In fact, the standard CryptHandler does not.
+ */
+ PDCryptNewAuthDataProc NewAuthData;
+
+ /** This function obtains authorization data from the user. As with
+ <code>Authorize</code>, <code>permsWanted</code> will be either <code>pdPermOpen</code> or
+ <code>pdPermSecure</code>. This function should allocate <code>authData</code> to be used
+ by <code>Authorize</code>. The function
+ should return <code>true</code> unless the operation should be cancelled
+ (for example, if the user cancels a dialog).
+ A crypt handler can specify the standard password dialog box by using
+ AVCryptGetPassword(). In this case, the <code>authData</code> will be a <code>char *</code>
+ that should be freed using ASfree() after <code>Authorize</code> is called.
+ */
+ PDCryptGetAuthDataProc GetAuthData;
+
+ /** Creates a new <code>struct</code> that contains information corresponding to information
+ in the security dialog. If <code>encryptDict</code> is a dictionary, initialize
+ the security data to correspond to the dictionary. Otherwise, set up
+ defaults. This function will be called when opening a document
+ with <code>encryptDict</code> set to the document's <code>encryptDict</code>. It will also
+ be called when a user chooses new encryption.
+ */
+ PDCryptNewSecurityDataProc NewSecurityData;
+
+ /** Validates the security data, modifying it as necessary. A client
+ may have called PDDocNewSecurityData() to obtain a new security
+ data structure, then modified it, and then called
+ PDDocSetNewSecurityData() to change the document security.
+ This is called before actually setting the document's
+ security data.
+ */
+ PDCryptValidateSecurityDataProc ValidateSecurityData;
+
+ /** This function should update the crypt handler's security data,
+ usually by displaying a dialog. The current security data
+ can be obtained by calling PDDocGetNewSecurityData().
+ Like <code>GetAuthData</code>, this function should return <code>true</code> unless cancelled.
+ The security data should be created with ASmalloc() so that it can
+ later be freed by ASfree().
+ The function can also update the <code>cryptHandler</code> itself.
+ For example, the built-in encryption
+ switches to no encryption if no passwords or permissions are
+ set in the security dialog.
+ */
+ PDCryptUpdateSecurityDataProc UpdateSecurityData;
+
+ /** Sets up the key to be passed to initialize the RC4 cipher for
+ encryption and decryption. The length may not be greater than
+ <code>5</code> to satisfy the current US export control regulations.
+ Data should be allocated by ASmalloc() or a relative
+ so that it may be freed by ASfree().
+ */
+ PDCryptNewCryptDataProc NewCryptData;
+
+ /** This function should fill the encryption dictionary with whatever
+ information is to be stored in the document. Unlike all other
+ strings and streams, direct object elements of the encryption dictionary
+ are not encrypted automatically. They must be encrypted before
+ they are inserted into the dictionary.
+ */
+ PDCryptFillEncryptDictProc FillEncryptDict;
+
+ /** This function should return information about security for
+ display to the user: whether the document has owner and
+ user passwords and whether the user password enables
+ printing, editing, copying text and graphics, and editing notes.
+ See PDexpt.h for possible permissions. All other bits in <code>secInfo</code>
+ should be set to <code>1</code>.
+ This function is also used after a SaveAs to reset the
+ permissions according to the current document.
+ */
+ PDCryptGetSecurityInfoProc GetSecurityInfo;
+
+ /* New calls for Acrobat 3.0 are below. */
+
+ /** If provided, this must be used to free <code>securityData</code> acquired via
+ <code>NewSecurityData</code>.
+ */
+ PDCryptFreeSecurityDataProc FreeSecurityData;
+
+ /** If provided, must be used to free <code>authData</code> acquired via
+ <code>GetAuthData</code> or <code>NewAuthData</code>.
+ */
+ PDCryptFreeAuthDataProc FreeAuthData;
+
+ /** If provided, this must be used to free <code>cryptData</code> acquired via
+ <code>NewCryptData</code>.
+ */
+ PDCryptFreeCryptDataProc FreeCryptData;
+
+ /* New call for Acrobat 4.05 are below. */
+
+ /** Sets up the key to be passed to initialize the RC4 cipher and
+ the version of algorithm for encryption and decryption. The
+ key will be truncated when the length is greater than the viewer
+ currently supports.
+ Data will be freed by <code>FreeCryptData</code> if provided. Otherwise,
+ ASfree() is used.
+ */
+ PDCryptNewCryptDataExProc NewCryptDataEx;
+
+ /* New call for Acrobat 5.0 and later. */
+
+ /** This was added to replace PDCryptGetAuthDataProc(). There are now new permission
+ controls. PDPerms are obsolete. Yet, the viewer still supports the old security
+ handler. It is called whenever the viewer needs to get authorization data and/or check
+ permission for operation(s).
+ */
+ PDCryptAuthorizeExProc AuthorizeEx;
+
+ /** This was added to replace PDCryptGetAuthDataProc(). There are now new permission
+ controls. PDPerms are obsolete. Yet, the viewer still supports the old security
+ handler. It is called whenever the viewer needs to get authorization data and/or check
+ permission for operation(s).
+ */
+ PDCryptGetAuthDataExProc GetAuthDataEx;
+
+ /** When the security handler is called, it should pop up a dialog box with current
+ permission settings. This callback was added to provide the security handler with a
+ way to display its custom permission settings. It should return <code>true</code> if it wants
+ a callback to modify security settings. Otherwise, it should return <code>false</code>.
+ */
+ PDCryptDisplaySecurityDataProc DisplaySecurityData;
+
+ /**
+ Used for the Acrobat Web Buy proprietary method of passing encrypted data.
+ */
+ PDCryptReservedProc GetReservedData;
+
+ /** A pointer to the PDCryptBatchHandler structure. If this parameter is non-<code>NULL</code>,
+ the security handler will work in a Batch environment, either for decrypting
+ PDF files or encrypting them on Save with a new security handler.
+ */
+ PDCryptBatchHandler CryptBatchHandler;
+
+ /* New call for Acrobat 6.0 and later */
+
+ /** This call is used to provide PDCrypt handler interoperability. When an encrypted
+ ducument is being opened and the the security handler specified in the encryption
+ dictionary is not present, the viewer will call this function on existing security
+ handlers to see if one of them can be used to open the document.
+ */
+ PDCryptCanParseEncryptDictProc CanParseEncryptDict;
+
+ /** A pointer to the PDCryptFilterHandler structure. If this parameter is non-<code>NULL</code>,
+ the security handler supports the Crypt Filter.
+ */
+ PDCryptFilterHandler CryptFilterHandler;
+
+ /** This function should return information about the document permissions
+ for display to the user: whether the user can print, edit, copy text and
+ graphics, edit notes and do form fill in and signing. See PDexpt.h for
+ possible permissions.
+ */
+ PDCryptGetDocPermsProc GetDocPerms;
+
+ /** It determines whether a document's metadata will be encrypted. If this call is not
+ implemented, the metadata is always encrypted.
+ */
+ PDCryptEncryptDocMetadata EncryptDocMetadata;
+
+ /** A new call added for Acrobat 7.0, used for opening a rolled back document (the original portion of a signed document). If
+ this call is not implemented, the security handler is asked for authorization. Since
+ authorization is already requested for the document, this would be the second authorization call
+ for the rolled back part.
+ <p>The callee is expected to authorize the opening of this document using an already opened document,
+ including the subsequent callback to authorize the Crypt Filter(s).</p>
+ */
+ PDCryptNewSecurityDataFromOriginalDocProc NewSecurityDataFromOrgDoc;
+
+ /** New calls added for Acrobat 7.0.5 */
+
+ /** Used by Acrobat to display user interface information about the document.
+ */
+
+ PDCryptGetInfoTextProc GetInfoText;
+
+ /* Used by Acrobat for automated permission testing.
+ **/
+ PDCryptReservedProc2 SetTestPerms;
+
+} PDCryptHandlerRec;
+
+typedef struct _t_PDCryptHandler *PDCryptHandler;
+
+/*------------------------------------------------------------------------
+ PDNameTree
+------------------------------------------------------------------------*/
+
+/**
+ The dictionary used to store all of the Named Destinations in a PDF file. A name tree
+ is used to map Cos strings to Cos objects just as a Cos dictionary is used to map Cos
+ names to Cos objects. However, a name tree can have many more entries than a Cos
+ dictionary can. You create a PDNameTree and locate it where you think is appropriate
+ (perhaps under a page, but most often right under the catalog).
+ Name trees use Cos-style strings (not <code>NULL</code>-terminated C strings), which may use
+ Unicode encoding, and these may contain bytes with zeroes in them (high bytes of
+ ASCII characters).
+ @see PDDocCreateNameTree
+ @see PDNameTreeNew
+ @see PDNameTreeFromCosObj
+ @see PDNameTreeEnum
+*/
+typedef OPAQUE_64_BITS PDNameTree;
+
+/*------------------------------------------------------------------------
+ PDNumTree
+------------------------------------------------------------------------*/
+
+/**
+ An object that points to the root node of a number tree inside a PDF file. A number
+ tree is used to map integers to arbitrary Cos objects just as a Cos dictionary is used
+ to map Cos names to Cos objects. However, a number tree can have many more
+ entries than a Cos dictionary can.
+ @see PDNumTreeNew
+ @see PDNumTreeFromCosObj
+ @see PDNumTreeEnum
+*/
+typedef OPAQUE_64_BITS PDNumTree;
+
+/*------------------------------------------------------------------------
+ PDPageLabel
+--------------------------------------------------------------------------*/
+
+/**
+A label used to describe a page. This is used to allow for non-sequential page
+numbering or the addition of arbitrary labels for a page (such as the inclusion of
+Roman numerals at the beginning of a book). A PDPageLabel specifies the
+numbering style to use (for example, upper-case or lower-case Roman, decimal, and so
+on), the starting number for the first page, and an arbitrary prefix to be preappended
+to each number (for example, <code>"A-"</code> is used to generate <code>"A-1"</code>, <code>"A-2"</code>, <code>"A-3"</code>, and so
+on).
+@see PDDocGetPageLabel
+@see PDDocGetLabelForPageNum
+@see PDPageLabelFromCosObj
+@see PDPageLabelNew
+@see PDDocRemovePageLabel
+*/
+typedef OPAQUE_64_BITS PDPageLabel;
+
+/*------------------------------------------------------------------------
+ PDPageRange
+ Used to specify a range of pages when printing
+--------------------------------------------------------------------------*/
+
+/**
+ Specifies a range of pages in a document. Page numbers begin
+ with <code>0</code>.
+*/
+typedef struct _t_PDPageRange {
+ /** The starting page number.*/
+ ASInt32 startPage;
+ /** The ending page number.*/
+ ASInt32 endPage;
+ /** The pages in the range to print. It must be one of: PDAllPages, PDEvenPagesOnly, or PDOddPagesOnly.*/
+ ASInt32 pageSpec;
+} PDPageRange;
+
+/**
+ Passed to the PDDocWillPrintDocInMode() notification
+ to specify the type of print operation being performed.
+
+ @see PDDocWillPrintDocInMode
+*/
+enum {
+
+ /** Print only the document. */
+ PDPrintWhat_DOCUMENT,
+
+ /** Print the document and associated annotations (WYSIWYG -- the default for Acrobat 8.0 and later). */
+ PDPrintWhat_DOCUMENT_AND_COMMENTS,
+
+ /** Print the document and stamp annotations. */
+ PDPrintWhat_DOCUMENT_AND_STAMPS,
+
+ /** Print only the data within form fields. */
+ PDPrintWhat_FORM_FIELDS_ONLY,
+
+ /** */
+ PDPrintWhat_COUNT,
+
+ /** */
+ PDPrintWhat_MIN=PDPrintWhat_DOCUMENT
+};
+typedef ASEnum8 PDPrintWhat;
+
+/*------------------------------------------------------------------------
+
+ Optional Content API typedefs, defines, etc. PDF 1.5, Acrobat 6.0
+
+--------------------------------------------------------------------------*/
+/** A PDOCG represents a named object whose state can be toggled in a user interface to affect
+ changes in visibility of content.
+ */
+typedef struct _t_PDOCG *PDOCG;
+
+/** A PDOCMD is an object that is attached to content to indicate membership in
+ an OCG or group of OCGs.
+ */
+typedef struct _t_PDOCMD *PDOCMD;
+
+/** A PDOCContext is an object that keeps track the on/off states of all of the OCGs
+ in a document. There can be more than one PDOCContext object, representing
+ different combinations of OCG states. The PDDoc contains an internal PDOCContext
+ that is used for on-screen drawing and as the default state used for any other
+ drawing or content enumeration. Clients can change the states of OCGs within
+ any PDOCContext. Clients can build (and save in the PDF file) PDOCContext objects with their
+ own combination of OCG states, and issue drawing or enumeration commands using
+ their own PDOCContext instead of the document's internal PDOCContext.
+ All discussion of <i>visibility</i> of content is therefore meant to be with respect
+ to the OCG states stored in a specific PDOCContext.
+ */
+typedef struct _t_PDOCContext *PDOCContext;
+
+/** A PDOCConfig represents a set of states and other information that is saved in
+ a PDF file for future use. There is a document default configuration, saved
+ in the /D entry in the OCProperties dictionary, and a list of other client configurations,
+ saved as an array of configurations in the /Configs entry in the OCProperties dictionary.
+ PDOCConfig objects are typically used to initialize the OCG states for a client's
+ PDOCContext.
+ */
+typedef struct _t_PDOCConfig *PDOCConfig;
+
+/** PDOCMDVisPolicy represents the four legal values for the /P key in an Optional Content Membership Dictionary (OCMD) dictionary.
+ They specify the visibility of content with respect to the on/off state of the Optional Content Groups (OCGs)
+ listed in the OCMD.
+ */
+enum {
+ /** */
+ kOCMDVisibility_AllOn,
+ /** */
+ kOCMDVisibility_AnyOn,
+ /** */
+ kOCMDVisibility_AnyOff,
+ /** */
+ kOCMDVisibility_AllOff
+};
+typedef ASUns8 PDOCMDVisPolicy;
+
+/** PDOCContextInitPolicy is used to specify how to initialize the states of Optional Content Groups (OCGs)
+ when calling PDOCContextNew() or PDOCContextInit().
+ */
+enum {
+ /** */
+ kOCCInit_OFF,
+ /** */
+ kOCCInit_ON,
+ /** */
+ kOCCInit_FromOtherContext,
+ /** */
+ kOCCInit_FromConfig
+};
+typedef ASUns8 PDOCContextInitPolicy;
+
+/** PDOCBaseState enumerates the three legal values for the BaseState key in an optional
+ content configuration dictionary (PDOCConfig). When initializing a PDOCContext
+ using KOCCInit_FromConfig(), this enumeration represents the starting state of the
+ Optional Content Groups (OCGs) before the contents of the config's ON and OFF OCG lists are processed.
+ If the BaseState is Unchanged, and the PDOCConfig is just being constructed,
+ the current states of the OCGs from the PDDoc's own PDOCConfig are used.
+ */
+enum {
+ /** */
+ kPDOCBaseState_OFF,
+ /** */
+ kPDOCBaseState_ON,
+ /** */
+ kPDOCBaseState_Unchanged
+};
+typedef ASUns8 PDOCConfigBaseState;
+
+/** PDOCDrawEnumType controls drawing or enumerating the page with respect to optional content.
+ It is an enumerated type that, together with the <code>NonOCDrawing</code> value,
+ controls drawing or enumerating content on a page with optional
+ content:
+
+ <ul>
+ <li>Content that is marked as optional content is drawn or
+ not drawn according to the PDOCDrawEnumType and the visibility
+ state as determined by the Optional Content Groups (OCGs) and OCMDs. </li>
+ <li>Content that is not marked as optional content is drawn
+ when <code>NonOCDrawing</code> is <code>true</code>, and not drawn when <code>NonOCDrawing</code>
+ is <code>false</code>. </li>
+ </ul>
+
+ @see PDOCContextGetOCDrawEnumType
+ @see PDOCContextSetOCDrawEnumType
+ @see PDOCContextGetNonOCDrawing
+ @see PDOCContextSetNonOCDrawing
+*/
+enum {
+ /** Draw or enumerate optional content
+ that is visible, according to the current state of Optional Content Groups (OCGs)
+ and Optional Content Membership Dictionaries (OCMDs). This is the normal default mode.
+ */
+ kPDOC_VisibleOC = 0,
+ /** Draw or enumerate all optional content,
+ regardless of its visibility state. If the context's <code>NonOCDrawing</code>
+ is <code>true</code>, all contents of document are shown.
+ */
+ kPDOC_AllOC,
+ /** Draw or enumerate no optional content,
+ regardless of its visibility state. If the context's <code>NonOCDrawing</code>
+ is <code>false</code>, nothing is drawn, resulting in a blank page.
+ */
+ kPDOC_NoOC,
+ /** */
+ kPDOC_LastDrawEnumType = kPDOC_NoOC
+};
+typedef ASUns8 PDOCDrawEnumType;
+
+/** The optional-content group (OCG) state is changing.
+*/
+enum {
+ /** The OCGs' states are changing. */
+ kPDOCGState,
+ /** The PDOCContext object's PDDrawEnumType is changing. */
+ kPDOCContextDrawEnumType,
+ /** The PDOCContext object's non-optional content drawing is changing. */
+ kPDOCContextNonOCDrawing,
+ /** The PDOCContext object's intent is changing. */
+ kPDOCContextIntent,
+ /** The PDOCContext is being reset using PDOCContextInit(). */
+ kPDOCContextInit,
+ /** */
+ kPDOC_LastContextChangeType = kPDOCContextInit
+};
+typedef ASUns8 PDOCContextChangeType;
+
+/** PDDocOCChangeType is an enumeration of types of changes to the optional content structures
+ of a PDDoc. These types of changes may effect visibility in <i>all</i> PDOCContext objects.
+ This enumeration is used in the <code>PDDocOCWillChange()</code> and <code>PDDocOCDidChange()</code> notifications.
+ These notifications typically pass in the affected page, or <code>PDAllPages</code> if all
+ pages may be affected.
+ */
+enum {
+ /** Optional Content Groups (OCGs) created.
+ */
+ kPDOCGCreate,
+ /** OCG properties changed.
+ */
+ kPDOCGProperties,
+ /** An OCG was replaced by another.
+ */
+ kPDOCGReplace,
+ /** An OCG was destroyed.
+ */
+ kPDOCGDestroy,
+ /** Content was made optional.
+ */
+ kPDOCMDAttach,
+ /** Content was made optional.
+ */
+ kPDOCMDRemove,
+ /** An OC config was created.
+ */
+ kPDOCConfigCreate,
+ /** An OC config was changed.
+ */
+ kPDOCConfigChange,
+ /** An OC config was destroyed.
+ */
+ kPDOCConfigDestroy,
+ /** OC was removed from document.
+ */
+ kPDDocRemoveOC,
+ /**
+ */
+ kPDOC_LastDocChangeType = kPDDocRemoveOC
+};
+typedef ASUns8 PDDocOCChangeType;
+
+/* These callbacks are used for enumerating PDOCGs, PDOCMDs and PDOCConfigs.
+ * Enumeration stops when all PDOCGs (PDOCMDs, PDOCConfigs) have been enumerated,
+ * or if the callback returns <code>false</code>.
+ */
+/**
+ A callback used for enumerating optional-content groups (OCGs). Enumeration stops when
+ all OCGs have been enumerated, or when the callback returns <code>false</code>.
+ @param ocg IN/OUT The optional-content group object.
+ @param clientData IN/OUT A pointer to user-supplied data to pass to the proc each time it is called.
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+ @see PDDocEnumOCGs
+ @see PDPageEnumOCGs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDOCGEnumProc )(PDOCG ocg, void *clientData);
+/**
+ A callback used for enumerating optional-content configurations.
+ Enumeration stops when all configurations have been enumerated,
+ or when the callback returns <code>false</code>.
+ @param occonfig The optional-content configuration object.
+
+ @param clientData A pointer to user-supplied data to pass
+ to the proc each time it is called.
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDDocEnumOCConfigs
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDOCConfigEnumProc)(PDOCConfig occonfig, void *clientData);
+/* Controlling Acrobat trap presets */
+enum {
+
+/** */
+kPDJoinMiter,
+
+/** */
+kPDJoinRound,
+
+/** */
+kPDJoinBevel
+};
+typedef ASEnum8 PDJoinStyle;
+enum {
+
+/** */
+kPDEndMiter,
+
+/** */
+kPDEndOverlap
+};
+typedef ASEnum8 PDEndStyle;
+
+enum {
+kPDPlacementCenter,
+kPDPlacementChoke,
+kPDPlacementNeutralDensity,
+kPDPlacementSpread
+};
+typedef ASEnum8 PDPlacementTypes;
+
+typedef struct {
+ ASBool noTrap;
+ ASBool defaultTrap;
+ float trapWidth;
+ float blackWidth;
+ float imageTrapWidth;
+ ASUns32 trapJoinStyle;
+ ASUns32 trapEndStyle;
+ ASUns32 stepLimit;
+ ASUns32 blackColorLimit;
+ float blackDensityLimit;
+ ASUns32 slidingTrapLimit;
+ ASUns32 trapColorScaling;
+ ASUns32 trapPlacement;
+ ASBool imageToImageTrapping;
+ ASBool imageToObjectTrapping;
+ ASBool imageInternalTrapping;
+ ASBool imagemaskTrapping;
+ ASAtom trapStyleName;
+} PDTrapPresetRec, *PDTrapPreset;
+
+/*------------------------------------------------------------------------
+ Controlling acrobat-based separations
+--------------------------------------------------------------------------*/
+enum { /* options for font inclusion */
+ /** Embed no fonts.
+ */
+ kHSEmitFontNoFonts,
+ /** Emit all embedded fonts.
+ */
+ kHSEmitFontEmbeddedFonts,
+ /** Emit all fonts.
+ */
+ kHSEmitFontAllFonts
+};
+
+enum { /* Options for what to do with a plate when doing separations */
+ /**
+ */
+ kEmitPlate,
+ /**
+ */
+ kDontEmitPlate,
+ /**
+ Represents an ink used on a page.
+ @see AVPageViewGetNumVisibleInks
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewSetInkPreview
+ @see AVPageViewSetVisibleInks
+ @see PDPageEnumInks
+*/
+ kConvertToProcess
+};
+
+/** Ink types. */
+enum {
+ /** */
+ kNormal,
+ /** */
+ kTransparent,
+ /** */
+ kOpaqueInk,
+ /** */
+ kOpaqueIgnore
+};
+
+enum { /* marksStyle choices */
+ /** No flags means InDesign style printer marks. */
+ kPDDefaultMarkType = 0, /* Acrobat defaults to InDesign style marks */
+ kPDInDesignJ1MarkType, /* InDesignJ1 */
+ kPDInDesignJ2MarkType, /* InDesignJ2 */
+ kPDIllustratorMarkType, /* Illustrator */
+ kPDIllustratorJ, /* IllustratorJ */
+ kPDQuarkXPress /* QuarkXPress */
+};
+/**
+ Represents an ink used on a page.
+ @see AVPageViewGetNumVisibleInks
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewSetInkPreview
+ @see AVPageViewSetVisibleInks
+ @see PDPageEnumInks
+*/
+typedef struct _t_PDPageInkRec {
+ /** The size of the structure. It must be set to
+ <code>sizeof(PDPageInkRec)</code>.
+ */
+ ASSize_t size;
+ /** The name of the colorant from the Separation or DeviceN colorspace, or
+ the process color name.
+ */
+ ASAtom colorantName;
+ /** <code>true</code> if this is a process color, <code>false</code> if this is a spot color.
+ */
+ ASBool isProcessColor;
+ /** How to handle the colorant for a separation preview. Its value can be:
+ <ul>
+ <li>kEmitColorant</li>
+ <li>kDontEmitColorant</li>
+ <li>kConvertToProcess</li>
+ </ul>
+ */
+ ASUns8 whatToDo;
+ /** RGB values for on-screen display of a colorswatch.
+ */
+ ASUns8 r, g, b;
+ /** The frequency for this ink.
+ */
+ float frequency;
+ /** The angle for this ink.
+ */
+ float angle;
+ /** The ink type for this ink.
+ */
+ ASUns8 inkType;
+ /** The trap sequence for this ink.
+ */
+ ASInt32 trapSequence;
+ /** The neutral density for this ink.
+ */
+ /* CMYK values for spot inks, provided so that neutral density can be calculated */
+ float cyan;
+ float magenta;
+ float yellow;
+ float black;
+
+ float density;
+ /** Alias this spot to another.
+ */
+ ASAtom alias;
+
+} PDPageInkRec, *PDPageInk;
+
+/** Used for enumerating the inks on a page via PDPageEnumInks(). */
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDPageEnumInksCallback) (PDPageInk ink, void *clientData);
+
+/** Used to specify per-plate options when doing separations. */
+typedef struct _t_PDHostSepsPlateRec {
+ /** The size of the structure. It must be set to
+ <code>sizeof(PDHostSepsPlateRec)</code>.
+ */
+ ASSize_t size;
+ /** The name of the colorant from the Separation or DeviceN
+ colorspace, or a spot or process color name (Cyan,
+ Magenta, Yellow, Black).
+ */
+ ASAtom colorantName;
+ /** How to handle the colorant. Its value can be:
+ <ul>
+ <li>kEmitPlate</li>
+ <li>kDontEmitPlate</li>
+ <li>kConvertToProcess</li>
+ </ul>
+ */
+ ASUns8 whatToDo;
+ /** Set internally. It is used to determine whether marks
+ were made on this plate to aid in blank detection.
+ */
+ ASUns32 wasColorSet;
+ /** Set internally. It is the stream into which Acrobat emits
+ PostScript for this plate. It is <code>NULL</code> if <code>whatToDo</code> is not
+ set to kEmitPlate.
+ */
+ ASStm epsStm;
+ /** Set internally. It is used only when separating
+ documents, to close the file afterward.
+ */
+ ASFile file;
+ /** Set internally. It is used only when separating
+ documents, to reopen the stream on the next page.
+ */
+ ASPathName path;
+ /** The frequency for this ink. Set it to <code>-1</code> to use the default value.
+ */
+ float frequency;
+ /** The angle for this ink. Set it <code>-1</code> to use the default value.
+ */
+ float angle;
+ /** The ink type for this ink.
+ */
+ ASUns8 inkType;
+ /** The trap sequence for this ink.
+ */
+ ASInt32 trapSequence;
+ /** The neutral density for this ink.
+ */
+ float density;
+ /** Alias this spot to another.
+ */
+ ASAtom alias;
+} PDHostSepsPlateRec, *PDHostSepsPlate;
+
+/** Used to control the generation of separations from Acrobat. */
+typedef struct _t_PDHostSepsSpecRec {
+ /** The size of the structure. It must be set to
+ <code>sizeof(PDHostSepsSpecRec)</code>.
+ */
+ ASSize_t size;
+
+ /** The PostScript printing level. <code>2</code> means emit as level
+ 2, <code>3</code> means level 3.
+ <p>It is used if the <code>emitToPrinter</code> or <code>emitToFile</code>
+ print parameter is <code>true</code>.</p>
+ */
+ ASUns32 psLevel;
+ /** <code>true</code> if a binary channel to the printer is
+ supported, <code>false</code> otherwise.
+ <p>It is used if the <code>emitToPrinter</code> or <code>emitToFile</code>
+ print parameter is <code>true</code>.</p>
+ */
+ ASBool binaryOK;
+
+ /** When <code>true</code>, emit annotations.
+ */
+ ASBool emitAnnots;
+ /** When <code>true</code>, emit halftones.
+ */
+ ASBool emitHalftones;
+ /** When <code>true</code>, emit transfer functions.
+ */
+ ASBool emitTransferFuncs;
+ /** When <code>true</code>, emit separable images only.
+ */
+ ASBool emitSeparableImagesOnly;
+
+ /** When <code>true</code>, suppress CJK substitution.
+ */
+ ASBool suppressCJKSubstitution;
+ /** Font output options. Its values can be:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>kHSEmitFontNoFonts</code></TD><TD>Embed no fonts.</TD></TR>
+ <TR><TD><code>kHSEmitFontEmbeddedFonts</code></TD><TD>Emit all embedded fonts.</TD></TR>
+ <TR><TD><code>kHSEmitFontAllFonts</code></TD><TD>Emit all fonts.</TD></TR>
+ </TABLE>
+ */
+ ASEnum8 emitFontOption;
+ /** When <code>true</code>, send TrueType fonts as TrueType
+ fonts (level 3 and most level 2 PS printers). When
+ <code>false</code>, convert TrueType to T1 (typically desirable only
+ for Level 1 PS where no TrueType handling is present).
+ */
+ ASBool TTasT42;
+ /** <code>true</code> means do not include Far East fonts.
+ */
+ ASBool printerHasFarEastFonts;
+
+ /** The transparency level, which can be <code>0-100</code>.
+ */
+ ASUns32 transparencyLevel;
+
+ /** When <code>true</code>, color manage DeviceCMYK. When
+ <code>false</code>, pass it directly onto the process plates.
+ */
+ ASBool useCMYKWorkingColorspace;
+
+ /** The profile description of a valid CMYK profile, such
+ as the strings seen in the color management preferences in Acrobat (for example,
+ <code>"U.S. Web Coated (SWOP) v2"</code>).
+ */
+ char destProfile[256];
+
+ /** When <code>true</code>, use the overprint preview (OPP) for
+ converting to process, which better simulates what would
+ happen if the spot ink were really used.
+ */
+ ASBool convertToProcessUsingOPP;
+
+ /** The number of items in the <code>plates</code> array.
+ */
+ ASUns32 numPlates;
+ /** A list of the colorant names and what to do with
+ them for separations.
+ */
+ PDHostSepsPlate *plates;
+ /** The optional-content context to use for visibility
+ state information, or <code>NULL</code> to use the document's
+ current states in the default context.
+ */
+ PDOCContext ocContext;
+ /** When <code>true</code>, apply print-specific visibility state
+ settings from the optional-content group.
+ */
+ ASBool applyOCGPrintOverrides;
+ /** When <code>true</code>, invert the plate.
+ */
+ ASBool negative;
+ /** One of the following constants:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Constant</TH><TH>Value</TH></TR>
+ <TR><TD><code>kPDPrintFlipNone</code></TD><TD><code>0x01</code></TD></TR>
+ <TR><TD><code>kPDPrintFlipX</code></TD><TD><code>0x02</code></TD></TR>
+ <TR><TD><code>kPDPrintFlipY</code></TD><TD><code>0x04</code></TD></TR>
+ <TR><TD><code>kPDPrintFlipXY</code></TD><TD><code>0x08</code></TD></TR>
+ </TABLE>
+
+ <p>Mirroring is done in the PostScript output stream.</p>
+ */
+ ASEnum8 mirrorprint;
+ /** A page mark indication. It is a bit-wise OR of the
+ PDPageMarkFlags values.
+ */
+ ASUns32 whichMarks;
+ /** When <code>true</code>, use the western style for page marks.
+ */
+ ASBool western; /* obsolete */
+ ASBool doInRipTrapping; /* obsolete for Acrobat 8, use trapType */
+ ASInt32 marksStyle; /* 0 == default, indicates printer marks style to use */
+ ASInt32 trapType; /* for Acrobat 8, in-RIP or none */
+ ASPathName customMarksPath; /* if non-NULL, specifies marks schema to use when whichMarks is non-NULL */
+} PDHostSepsSpecRec, *PDHostSepsSpec;
+
+/*------------------------------------------------------------------------*/
+
+/**
+ A callback for PDDocExportNotes. It determines whether an annotation
+ is exported.
+
+ @param doc IN/OUT The document from which annotations may be exported.
+
+ @param pdpage IN/OUT The page from which the annotation may be
+ exported.
+ @param src IN/OUT The annotation that may be exported.
+ @param dict IN/OUT A copy of the annotation in a Cos object.
+ @return <code>true</code> to export the annotation, <code>false</code> to not export the annotation.
+ @see PDDocWillImportAnnotCallback
+
+ @note This is a different callback than PDDocWillExportAnnotProc().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDDocWillExportAnnotCallback)(
+ PDDoc doc, PDPage pdpage, PDAnnot src, CosObj dict);
+
+/**
+ A callback for PDDocImportCosDocNotes() and PDDocImportNotes().
+ It determines whether an annotation will be imported.
+
+ @param doc IN/OUT The document into which annotations may be imported.
+
+ @param pdPage IN/OUT The page in which the annotation may be imported.
+
+ @param annot IN/OUT The annotation that may be imported.
+ @return <code>true</code> to import the annotation, <code>false</code> to not import the annotation.
+ @see PDDocWillExportAnnotCallback
+
+ @note This is a different callback than PDDocWillImportAnnotProc().
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDDocWillImportAnnotCallback)(
+ PDDoc doc, PDPage pdPage, PDAnnot annot);
+
+/**
+ A structure used by PDDocCopyToFile() to specify file copy information.
+
+ @see PDDocCopyToFile
+*/
+typedef struct _t_PDDocCopyParams {
+
+ /** The size of the data structure. It must be set to <code>sizeof(PDDocCopyParamsRec)</code>. */
+ ASSize_t size;
+
+ /** The path name to copy to, specified in whatever format is correct for <code>fileSys</code>. */
+ ASPathName newPath;
+
+ /** A pointer to an ASFileSysRec containing the file system that does the copy. */
+ ASFileSys fileSys;
+
+ /** A progress monitor. It may be <code>NULL</code> */
+ ASProgressMonitor progMon;
+
+ /** A pointer to user-supplied data to pass to <code>progMon</code> each time it is
+ called. It must be <code>NULL</code> if <code>progMon</code> is <code>NULL</code>. */
+ void *progMonData;
+
+ /** A cancel procedure. It may be <code>NULL</code>. */
+ ASCancelProc cancelProc;
+
+ /** A pointer to user-specified data to pass to <code>cancelProc</code> each time it is called. It must be <code>NULL</code>
+ if <code>cancelProc</code> is <code>NULL</code>.
+ */
+ void *cancelProcData;
+
+ /** Determines whether changes should be saved if
+ the document is dirty. When it is <code>true</code>, if the document is dirty
+ and the product is Acrobat, save all in-memory changes to
+ the new copy. Otherwise, just copy the on-disk bytes. It is ignored
+ in Adobe Reader.
+ */
+ ASBool saveChanges;
+} PDDocCopyParamsRec, *PDDocCopyParams;
+
+
+/** Nothing.
+ @ingroup PrinterEmitFlags
+*/
+#define kPDEmitNoMarks 0
+
+/** Tile marks.
+ @ingroup PrinterEmitFlags
+*/
+#define kPDEmitWesternTileMarks 0x0001
+
+/** Tile marks.
+ @ingroup PrinterEmitFlags
+*/
+#define kPDEmitEasternTileMarks 0x0002
+
+/** Emit information about the document, name, page number, and so on.
+ @ingroup PrinterEmitFlags
+*/
+#define kPDEmitSlug 0x0004
+
+/** Printing flags
+
+@see PDDocDidPrintTiledPage
+@see PDDocPrintingTiledPage
+@see PDDocWillPrintTiledPage
+*/
+typedef struct {
+
+ /** The number of points to overlap (user interface units may be anything, clients convert to points). */
+ ASUns32 overlap;
+
+ /** Center the pages' contents on the physical paper. */
+ ASBool center;
+
+ /** Determines which printer marks to emit.
+ @see PrinterEmitFlags
+ */
+ ASInt32 marksflags;
+
+ /** The width of the paper (points). It is client-provided since the client has PPD access. */
+ ASInt32 paperWidth;
+
+ /** The height of the paper (points). */
+ ASInt32 paperHeight;
+
+ /** The title string for the slug (optional). */
+ char *docTitle;
+
+ /** The date string for the slug (optional). */
+ char *docDate;
+
+ /** The time string for the slug (optional). */
+ char *docTime;
+ /* the remaining fields are for communicating during print time
+ the current page's state; which page is being printed, etc. */
+
+ /** The current column <code>(0 - numcols-1)</code>. */
+ ASInt32 col;
+
+ /** The current row. */
+ ASInt32 row;
+
+ /** The number of columns for this page. */
+ ASInt32 numCols;
+
+ /** The number of rows for this page. */
+ ASInt32 numRows;
+
+ /** The amount to shift right. First tile to center the entire image on the sheets. */
+ ASInt32 xOffset;
+
+ /** The amount to shift down. */
+ ASInt32 yOffset;
+}PDTileRec, *PDTile;
+
+/*****************************
+** Definitions for logical page areas
+******************************/
+
+/** Different logical areas on a page. */
+enum {
+
+ /** */
+ kPDPageArea,
+
+ /** */
+ kPDClipArea,
+
+ /** */
+ kPDNumAreas
+};
+typedef ASEnum16 PDPageArea;
+
+/**
+ Used by PDDocExportSomeNotes(). It represents an array of PDAnnot objects.
+
+ @see PDDocExportSomeNotes
+*/
+typedef struct _s_PDAnnotArray
+{
+
+ /** The annotation count. */
+ ASTArraySize annotCount;
+
+ /** A pointer to an array of PDAnnots. */
+ PDAnnot *annots;
+} PDAnnotArrayRec, *PDAnnotArray;
+
+
+/************************************************************
+ ***
+ *** Drawing params for PDPageDrawWithParams, PDDrawCosObjWithParams. Acrobat 6.0
+ ***
+ ************************************************************/
+/**
+ Parameters used for optional-content drawing control. The
+ parameters are the same as those passed to the original
+ version of the method, with the addition of an optional-content
+ context that determines what contents are visible.
+ @see PDDrawCosObjWithParams
+ @see PDPageEnumContents
+*/
+typedef struct _t_PDDrawParams
+{
+ /** The size of the data structure.
+ */
+ ASUns32 size;
+ /** A pointer to a platform-dependent window object
+ (<code>HWND</code> on Windows<code>WindowPtr</code>, or <code>CWindowPtr</code> on Mac OS).
+ On Windows, to draw into an offscreen <code>DC</code>, pass <code>NULL</code> for <code>window</code>.
+ On Mac OS, to draw into an offscreen
+ <code>GWorld</code>, pass <code>NULL</code> in window and pass the
+ <code>GWorldPtr</code> in <code>displayContext</code>.
+ */
+ void *window;
+ /** A platform-dependent display context structure
+ (<code>HDC</code> on Windows, <code>GWorldPtr</code> on Mac OS). On Mac OS,
+ <code>displayContext</code> is ignored if <code>window</code> is non-<code>NULL</code>.
+ @note <code>displayContext</code> cannot be reliably used as the <code>hDC</code> for a printer device.
+ */
+ void *displayContext;
+ /** A pointer to the matrix to concatenate onto the default
+ page matrix. It is useful for converting from page to
+ window coordinates and for scaling.
+ */
+ ASFixedMatrix matrix;
+ /** See above. The only value you should use is <code>0</code>.
+ */
+ ASUns32 flags;
+ /** A rectangle represented by the coordinates of its four sides.
+ */
+ ASFixedRect updateRect;
+ /**
+ A procedure called periodically to check for the user's cancelling of
+ the drawing operation. The default cancel procedure
+ can be obtained using AVAppGetCancelProc(). It may
+ be <code>NULL</code>, in which case no cancel procedure is used.
+ */
+ CancelProc cancelProc;
+ /** A pointer to user-supplied data to pass to <code>cancelProc</code>
+ each time it is called. It should be <code>NULL</code> if <code>cancelProc</code>
+ is <code>NULL</code>.
+ */
+ void *cancelProcClientData;
+
+ /** An optional-content context that determines what
+ contents are visible. <code>NULL</code> uses the document's
+ optional-content context, as returned by
+ <code>PDDocGetOCContext(pddoc)</code>, which is equivalent
+ to calling the version of the method without optional content
+ parameters.
+ <p>This context is copied and the copy is used in drawing.
+ This allows a client to change its copy of the context
+ without raising an exception.</p>
+ */
+ PDOCContext clientOCContext;
+} PDDrawParamsRec, *PDDrawParams;
+
+/************************************************************
+ ***
+ *** Enumeration params for PDFormEnumPaintProcWithParams, PDCharProcEnumWithParams,
+ *** PDPageEnumContentsWithParams.
+ ***
+ ************************************************************/
+
+ /**
+ Enumeration parameters used for optional-content drawing
+ control in PDFormEnumPaintProcWithParams() and PDCharProcEnumWithParams().
+ The parameters are the same as those passed to the original
+ versions of these methods (PDFormEnumPaintProc() and PDCharProcEnum()),
+ with the addition of an optional-content context that determines
+ what contents are visible.
+ @see PDFormEnumPaintProcWithParams
+ @see PDCharProcEnumWithParams
+*/
+typedef struct _t_PDGraphicEnumParams {
+ /**The size of the data structure.
+ */
+ ASUns32 size;
+ /** An optional-content context that
+ determines what contents are visible. <code>NULL</code> uses the document's
+ optional-content context, as returned by <code>PDDocGetOCContext(pddoc)</code>,
+ which is equivalent to calling the version of the method
+ without optional-content parameters. This context is copied
+ and the copy is used in drawing. This allows a client to
+ change its copy of the context without raising an exception.
+ */
+ PDOCContext clientOCContext;
+
+ /** Filled by the method with the context
+ that will be used during enumeration. This is a copy of
+ the context specified by <code>clientOCContext</code>.
+ */
+ PDOCContext usedOCContext;
+
+ /** The graphic enumeration monitor.
+ */
+ PDGraphicEnumMonitor mon;
+ /** A pointer to user-supplied data to pass to the monitor.
+ */
+ void *monObj;
+} PDGraphicEnumParamsRec, *PDGraphicEnumParams;
+
+
+/************************************************************/
+/************************************************************
+ ***
+ *** Callbacks for PDDocRequestPages and PDDocRequestEntireFile
+ ***
+ ************************************************************/
+
+/** This tells the callback why it is being called. */
+enum {
+ /** The request is still being processed.
+ */
+ kPDDocRequestUnderway = 0,
+ /** The requested data has arrived.
+ */
+ kPDDocRequestComplete,
+ /** The request is cancelled because the file is being closed.
+ */
+ kPDDocRequestCancelled,
+ /** An error occurred.
+ */
+ kPDDocRequestError
+};
+typedef ASEnum8 PDDocRequestReason;
+
+/** A callback for PDDocRequestPages(). */
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *PDDocRequestPagesProc)
+(PDDoc pdDoc, ASInt32 startPage, ASInt32 nPages, PDDocRequestReason reason, void *clientData);
+
+/**
+ A callback used by PDDocRequestEntireFile. Use this callback
+ to process a document file.
+ @param pdDoc The PDDoc to be saved.
+ @param reason A constant representing the status
+ of the request. It can have one of the following values:
+ <ul>
+ <li>kPDDocRequestUnderway</li>
+ <li>kPDDocRequestComplete </li>
+ <li>kPDDocRequestCancelled</li>
+ <li>kPDDocRequestError </li>
+ </ul>
+
+ @param clientData User-supplied data passed in the PDDocRequestPages()
+ method.
+ @return <code>0</code> when successful, a non-zero error code otherwise.
+ @see PDDocRequestEntireFile
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *PDDocRequestEntireFileProc)
+(PDDoc pdDoc, PDDocRequestReason reason, void *clientData);
+
+/************************************************************/
+
+/* This typedef appears in both PDExpT.h and PEExpT.h now, so avoid multiple typedef's here */
+#ifndef _T_PDEFONT_
+#define _T_PDEFONT_
+typedef struct _t_PDEFont *PDEFont;
+#endif
+
+enum {
+ kPDHorizLeft = 0,
+ kPDHorizCenter,
+ kPDHorizRight
+};
+typedef ASEnum8 PDHorizAlign;
+
+enum {
+ kPDVertTop = 0,
+ kPDVertCenter,
+ kPDVertBottom
+};
+typedef ASEnum8 PDVertAlign;
+
+/**
+ Parameters used for describing text-based watermarks.
+ @see PDDocAddWatermarkFromText
+*/
+typedef struct _t_PDDocWatermarkTextParams {
+ /** The size of the data structure.
+ */
+ ASSize_t size;
+
+ /** The text to be used when generating a text-based watermark.
+ */
+ ASText srcText;
+
+ /** The alignment to be used when justifying a text-based watermark.
+ */
+ PDHorizAlign textAlign;
+
+ /** The PDEFont to be used when generating a text-based watermark.
+ If it is <code>NULL</code>, the font specified by <code>sysFontName</code> will be used.
+ */
+ PDEFont pdeFont;
+
+ /** The name of a system font to be used when generating a text-based
+ watermark. The font will be embedded/subsetted when possible.
+ This parameter is ignored if <code>pdeFont</code> is non-<code>NULL</code>.
+ */
+ ASAtom sysFontName;
+
+ /** The size of the font, in points, to be used when generating a text-based
+ watermark.
+ */
+ float fontSize;
+
+ /** The color to be used when generating a text-based watermark.
+ */
+ PDColorValueRec color;
+} PDDocWatermarkTextParamsRec, *PDDocWatermarkTextParams;
+
+
+/**
+ Parameters used for adding and describing watermarks.
+ @see PDDocAddWatermarkFromPDPage
+ @see PDDocAddWatermarkFromText
+*/
+typedef struct _t_PDDocAddWatermarkParams {
+ /** The size of the data structure.
+ */
+ ASSize_t size;
+
+ /** The page range of the document to which the watermark should be added.
+ */
+ PDPageRange targetRange;
+
+ /** A boolean specifying whether this watermark is a FixedPrint watermark.
+ FixedPrint watermarks maintain their size and position regardless of the
+ dimensions of the target media.
+ */
+ ASBool fixedPrint;
+
+ /** A boolean specifying where in the page z-order the watermark should be added.
+ If it is <code>true</code>, the watermark is added to the front of the page; otherwise, it is
+ added as a background.
+ <p>This parameter is ignored if <code>fixedPrint</code> is <code>true</code>, as all FixedPrint watermarks are
+ added to the front of the page.</p>
+ */
+ ASBool zOrderTop;
+
+ /** A boolean specifying whether the watermark should be visible when viewing
+ on screen.
+ */
+ ASBool showOnScreen;
+
+ /** A boolean specifying whether the watermark should be printed.
+ */
+ ASBool showOnPrint;
+
+ /** The horizontal alignment to be used when adding the watermark to a page.
+ */
+ PDHorizAlign horizAlign;
+
+ /** The vertical alignment to be used when adding the watermark to a page.
+ */
+ PDVertAlign vertAlign;
+
+ /** The horizontal offset value to be used when adding the watermark on a page. If
+ <code>percentageVals</code> is <code>true</code>, this value is a percentage of the page width,
+ with <code>1.0</code> meaning 100%. Otherwise this value is in user units.
+ */
+ float horizValue;
+
+ /** The vertical offset value to be used when adding the watermark on a page. If
+ <code>percentageVals</code> is <code>true</code>, this value is a percentage of the page height,
+ with <code>1.0</code> meaning 100%. Otherwise this value is in user units.
+ */
+ float vertValue;
+
+ /** A boolean specifying the units of <code>horizValue</code> and <code>vertValue</code>. If it is <code>true</code>,
+ <code>horizValue</code> and <code>vertValue</code> represent percentages of the page dimensions.
+ Otherwise <code>horizValue</code> and <code>vertValue</code> are in user units.
+ */
+ ASBool percentageVals;
+
+ /** The scale factor to be used when adding the watermark, with <code>1.0</code> meaning 100%.
+ */
+ float scale;
+
+ /** The counter-clockwise rotation, in degrees, to be used when adding the watermark.
+ */
+ float rotation;
+
+ /** The opacity to be used when adding the watermark, with <code>0.0</code> meaning fully
+ transparent and <code>1.0</code> meaning fully opaque.
+ */
+ float opacity;
+
+ /** The progress monitor to be updated when adding the watermark.
+ It may be <code>NULL</code>.
+ */
+ ASProgressMonitor progMon;
+
+ /** The private data to be passed to <code>progMon</code>.
+ This parameter is ignored if <code>progMon</code> is <code>NULL</code>.
+ */
+ void* progMonData;
+
+ /** The cancel procedure to be checked when adding the watermark.
+ It may be <code>NULL</code>.
+ */
+ ASCancelProc cancelProc;
+
+ /** The private data to be passed to <code>cancelProc</code>.
+ This parameter is ignored if <code>cancelProc</code> is <code>NULL</code>.
+ */
+ void* cancelProcData;
+} PDDocAddWatermarkParamsRec, *PDDocAddWatermarkParams;
+
+enum {
+ /** Display the page with Overprint Preview. */
+ kPDPageDisplayOverPrintPreviewPI = 0x00000100,
+ /** Draw annotation appearances. */
+ kPDPageUseAnnotFacesPI = 0x00000040,
+
+ /** If this is set, only consider Stamp annotations. This overrides kPDPageUseAnnotFaces. */
+ kPDPageUseStampAnnotsOnlyPI = 0x08000000
+};
+typedef ASUns32 PDPageDrawFlagsPI;
+
+/**
+ Parameters used to represent the properties for a redaction mark.
+ @see PDDocCreateRedaction
+ @see PDRedactionGetProps
+ @see PDRedactionSetProps
+*/
+typedef struct _t_PDRedactParams
+{
+ /** The size of the data structure. */
+ ASUns32 size;
+
+ /** The page number where this redaction mark is found. */
+ ASInt32 pageNum;
+
+ /** An array of <code>ASFixedQuad</code> objects representing the regions on the page to be redacted. */
+ ASFixedQuad* redactQuads;
+
+ /** The length of the array specified by <code>redactQuad</code>. */
+ ASUns32 numQuads;
+
+ /** The color of the redaction mark. This color is also used as the fill color when
+ generating the replacement form for this redaction mark. The replacement form is the content
+ that will be placed on the page when this mark is applied and the underlying content is removed.
+ */
+ PDColorValueRec* colorVal;
+
+ /** The overlay text to be used when generating the replacement form for this redaction mark.
+ The replacement form is the content that will be placed on the page when this mark is applied
+ and the underlying content is removed.
+ */
+ ASText overlayText;
+
+ /** The horizontal alignment to be used for the overlay text when generating the replacement
+ form for this redaction mark.
+ */
+ PDHorizAlign horizAlign;
+
+} PDRedactParamsRec, *PDRedactParams;
+
+/**
+ Parameters used for applying redaction marks.
+ @see PDDocApplyRedactions
+*/
+typedef struct _t_PDApplyRedactionParams
+{
+ /** The size of the data structure. */
+ ASUns32 size;
+
+ /** A pointer to a set of redaction annotations representing the redaction marks to be applied.
+ If <code>NULL</code>, then all redaction marks present in the document should be applied.
+ */
+ PDAnnot* redactionAnnots;
+
+ /** The number of redaction marks in <code>redactionAnnots</code>. This value is ignored if
+ <code>redactionAnnots</code> is <code>NULL</code>.
+ */
+ ASUns32 redactionCount;
+
+ /** A boolean value indicating that the redaction marks themselves should be not removed. */
+ ASBool keepMarks;
+
+ /** A set of callbacks for providing feedback to the caller. It may be <code>NULL</code>. */
+ ASStatusMonitorProcs statusProcs;
+
+ /** The text to be displayed for the progress monitor in <code>statusProcs</code>. It may be
+ <code>NULL</code>. This value is ignored if <code>statusProcs</code> is <code>NULL</code>.
+ */
+ ASText progressText;
+
+ /** The amount that the current value for the progress monitor in <code>statusProcs</code>
+ should be incremented during the application process. If it is less than or equal to <code>0</code>, then
+ <code>beginOperation</code> will be called, an unspecified positive duration will be
+ set, the current value will be incremented up to that duration, and
+ <code>endOperation</code> will be called.
+ This value is ignored if <code>statusProcs</code> is <code>NULL</code>.
+ */
+ ASInt32 progressDuration;
+} PDApplyRedactionParamsRec, *PDApplyRedactionParams;
+
+/************************************************************************************\
+|* *|
+|* PDFileAttachment *|
+|* *|
+\************************************************************************************/
+
+/**
+ A <code>PDFileAttachment</code> represents an embedded file stored in a PDF file, and may be
+ stored at various locations in a PDF file, including the <code>EmbeddedFiles</code> name tree,
+ <code>FileAttachment</code> annotation types, and <code>Multimedia</code> annotations.
+
+ @see PDFileAttachmentNewFromFile
+ @see PDFileAttachmentUpdateFromFile
+ @see PDFileAttachmentSaveToFile
+*/
+
+typedef OPAQUE_64_BITS PDFileAttachment;
+
+
+/************************************************************************************\
+|* *|
+|* PDCollection *|
+|* *|
+\************************************************************************************/
+
+/**
+ <p>A <code>PDCollection</code> represents a collection dictionary in a PDF file.</p>
+
+ <p>Collection view types and split types are unusual due to the way the <i>PDF
+ Reference</i> is written. A straight mapping of the View key and the Split
+ key would result in the key/value of <code>/View/H</code> being part of the view type enumeration,
+ but that would result in ambiguity when setting View to H and Split to N
+ (<code>/View/H</code> maps to "preview" in Acrobat 8, but <code>/Split/N</code> is documented to map
+ to "no split, show navigator" in Acrobat 9. Because of this, and the fact that
+ <code>/View/H</code> is really interpreted as a kind of split rather than a style of navigator,
+ Preview was moved to the split type enumeration in the API.
+ This interacts with the underlying file as follows: when a <code>/View/H</code> value is read it is mapped
+ to "Tile" and "Preview" for the navigator style and split position.
+ When the Tile/Preview combination is written out, it is recorded back to <code>/View/H</code> for consistency
+ with Acrobat 8.</p>
+
+ @see PDDocGetPDCollection
+ @see PDDocCreatePDCollection
+ @see PDDocDeleteCollection
+*/
+typedef OPAQUE_64_BITS PDCollection;
+
+/** The name of a field in a collection sort dictionary, and its associated value for ascending. */
+typedef struct _t_PDCollectionSchemaSortPair {
+ ASAtom fieldName;
+ ASBool ascending;
+} PDCollectionSchemaSortPairRec;
+
+/** Opaque object representing a collection navigator dictionary. */
+typedef OPAQUE_64_BITS PDNavigator;
+
+/** Collection view types. */
+enum {
+ /** Tile navigator. */
+ kCollectionViewTile = 0x1000,
+ /** Details navigator. */
+ kCollectionViewDetails,
+ /** Custom navigator. */
+ kCollectionViewCustom
+};
+typedef ASUns16 PDCollectionViewType;
+
+/** Collection split types. */
+enum {
+ /** Default split based on view. */
+ kCollectionSplitDefault = 0x2000,
+ /** Split vertical. */
+ kCollectionSplitHorizontal,
+ /** Split horizontal. */
+ kCollectionSplitVertical,
+ /** No split; show the navigator. */
+ kCollectionSplitNone,
+ /** No split; show the preview. */
+ kCollectionSplitPreview
+};
+typedef ASUns16 PDCollectionSplitType;
+
+/** Collection view data record. */
+typedef struct _t_PDCollectionViewDataRec {
+ /** The size of the <code>PDCollectionViewDataRec</code>. */
+ ASSize_t size;
+ /** The view type of the collection. */
+ PDCollectionViewType view;
+ /** The navigator to use with the collection. This is ignored if <code>view != custom</code>. */
+ PDNavigator navigator;
+ /** The split type of the collection. */
+ PDCollectionSplitType split;
+
+ /** A percentage from <code>0-100</code>. It is ignored if the position is not a split view.
+ If the position is a split view, <code>-1</code> indicates an application-defined position. */
+ ASInt32 splitPos;
+} PDCollectionViewDataRec;
+
+/**
+ <p>An opaque pointer to a collection schema object. </p>
+
+ <p>A <code>PDCollectionSchema</code> is ordered with the following considerations.
+ The <code>PDCollectionSchema</code> has characteristics of both a collection of named
+ fields and an array. Field names are guaranteed to be unique.
+ Indexing is guaranteed to be 0-based, in ascending order, with no gaps.
+ When repositioning a field by changing its index, the schema will be
+ re-indexed as necessary to conform to this convention. If a field is assigned
+ an out-of-bound index, the index is adjusted to be in bounds rather
+ than raising an error.</p>
+*/
+typedef struct CPDCollectionSchema *PDCollectionSchema;
+
+/** A structure corresponding to a field in the collection schema. */
+typedef struct _t_PDCollectionField {
+ /** The size of the <code>PDCollectionFieldRec</code>. */
+ ASSize_t size;
+ /** The ID of the field. */
+ ASAtom fieldName;
+ /** The 0-based index of the field in the <code>PDCollectionSchema</code>. */
+ ASInt32 index;
+ /** The subtype of the field. For example <code>/N</code> represents a number and <code>/S</code> represents a string. */
+ ASAtom subtype;
+ /** The name to use in the user interface. */
+ ASText fieldText;
+ /** Default visibility. */
+ ASBool visible;
+ /* <code>true</code> if the user may edit the field, <code>false</code> otherwise. */
+ ASBool canEdit;
+} PDCollectionFieldRec;
+
+/** An opaque object representing a collection folder dictionary.
+ Folders are used to provide grouping for files in a portable collection.
+*/
+typedef OPAQUE_64_BITS PDFolder;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_PDExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFErrorCodes.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFErrorCodes.h
new file mode 100644
index 0000000..ccbd149
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFErrorCodes.h
@@ -0,0 +1,290 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDFError.h
+
+ - PDF Error codes.
+
+*********************************************************************/
+
+
+#ifndef _H_PDFErrorTypes
+#define _H_PDFErrorTypes
+
+#if UNIX_ENV
+#include <errno.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#undef DefineErr
+#define DefineErr(name,string) name,
+
+#ifndef PDFErrorsStart
+#define PDFErrorsStart 0
+#endif
+
+#define ASFileE_Start PDFErrorsStart
+/* ASTypes.h */
+enum {
+ #include "ASFileE.h"
+ asFileErrLast
+};
+
+#define ErrGenE_Start (ASFileE_Start + asFileErrLast)
+
+/* ASGenE.h */
+enum {
+ #include "ASGenE.h"
+ asGenErrLast
+};
+
+#define CosGenE_Start (ErrGenE_Start + asGenErrLast)
+
+/* CostTypes.h */
+enum {
+ #include "CosGenE.h"
+ cosErrLast
+};
+
+#define CosSynE_Start (CosGenE_Start + cosErrLast)
+
+enum {
+ #include "CosSynE.h"
+ cosSynErrLast
+};
+
+#define EncConvE_Start (CosSynE_Start + cosSynErrLast)
+
+enum {
+ // #include "EncConvE.h"
+ encConvErrLast
+};
+
+#define FontSvrE_Start (EncConvE_Start + encConvErrLast)
+
+enum {
+ #include "FontSvrE.h"
+ fsErrLast
+};
+
+#define PageE_Start (FontSvrE_Start + fsErrLast)
+
+enum {
+ #include "PageE.h"
+ pageErrLast
+};
+
+#define PDDocE_Start (PageE_Start + pageErrLast)
+
+enum {
+ #include "PDDocE.h"
+ pdErrLast
+};
+
+#define PDFXE_Start (PDDocE_Start + pdErrLast)
+
+enum {
+ #include "PDFXE.h"
+ pdfXEErrLast
+};
+
+#define PDMetadataE_Start (PDFXE_Start + pdfXEErrLast)
+
+enum {
+ #include "PDMetadataError.h"
+ pdMetadataErrLast
+};
+
+#define PDModel_Start (PDMetadataE_Start + pdMetadataErrLast)
+
+enum {
+ #include "PDModE.h"
+ pdModErrLast
+};
+
+#define PDPageE_Start (PDModel_Start + pdModErrLast)
+
+enum {
+ #include "PDPageE.h"
+ pdPErrLast
+};
+
+#define PDSEditE_Start (PDPageE_Start + pdPErrLast)
+
+enum {
+ #include "PDSError.h"
+ pdsEditErrLast
+};
+
+#define PDFEditE_Start (PDSEditE_Start + pdsEditErrLast)
+
+enum {
+ #include "PEError.h"
+ pdfEditErrLast
+};
+
+#define RasterE_Start (PDFEditE_Start + pdfEditErrLast)
+
+enum {
+ #include "RasterE.h"
+ rasErrLast
+};
+
+#define ToolkitInitE_Start (RasterE_Start + rasErrLast)
+
+enum {
+ #include "ToolkitInitE.h"
+ tkErrLast
+};
+
+#define XtnMgrE_Start (ToolkitInitE_Start + tkErrLast)
+
+enum {
+ #include "XtnMgrE.h"
+ xmErrLast
+};
+
+#define MDSysErr_Use_DefineErr 1
+
+#define WFileErr_Start (XtnMgrE_Start + xmErrLast)
+
+enum {
+ #include "WFileErr.h"
+ wFileErrLast
+};
+
+#define MacAppE_Start (WFileErr_Start + wFileErrLast)
+
+enum {
+ #include "MacAppE.h"
+ macAppErrLast
+};
+
+#define MacSysE_Start (MacAppE_Start + macAppErrLast)
+
+enum {
+ #include "MacSysE.h"
+ macSysErrLast
+};
+
+#define UnixAppE_Start (MacSysE_Start + macSysErrLast)
+
+enum {
+ #include "UnixAppE.h"
+ unixAppErrLast
+};
+
+#define UnixSysE_Start (UnixAppE_Start + unixAppErrLast)
+
+enum {
+ #include "UnixSysE.h"
+ unixSysErrLast
+};
+
+#undef MDSysErr_Use_DefineErr
+
+#define pdfLErrLast (UnixSysE_Start + unixSysErrLast)
+
+#ifdef MDAPPERR
+
+ #if UNIX_ENV
+ #define mdAppErrLast unixAppErrLast
+ #define MDAppErr_Start UnixAppE_Start
+ #define mdAppErrNoError mdUnixAppErrNoError
+ #elif MAC_ENV
+ #define mdAppErrLast macAppErrLast
+ #define MDAppErr_Start MacAppE_Start
+ #define mdAppErrNoError mdMacAppErrNoError
+ #else
+ #define mdAppErrNoError 0
+ #define mdAppErrLast 0
+ #define MDAppErr_Start WFileErr_Start
+ #endif
+
+#else /* MDAPPERR */
+ #define mdAppErrNoError 0
+ #define mdAppErrLast 0
+ #define MDAppErr_Start WFileErr_Start
+
+#endif /* MDAPPERR */
+
+typedef struct {
+ ASInt16 sysErrNum;
+ ASUns32 errCode;
+
+} SysErrMapEntry;
+
+
+#ifdef MDSYSERR
+
+ #if UNIX_ENV
+ #define mdSysErrLast unixSysErrLast
+ #define MDSystemErr_Start UnixSysE_Start
+ #define MDGetSystemErrorCode ASErrGetCode
+ #elif MAC_ENV
+ #define mdSysErrLast macSysErrLast
+ #define MDSystemErr_Start MacSysE_Start
+ #define MDGetSystemErrorCode ASErrGetSignedCode
+ #elif WIN_ENV
+ #define mdSysErrLast wFileErrLast
+ #define MDSystemErr_Start WFileErr_Start
+ #define MDGetSystemErrorCode ASErrGetCode
+ #else
+ #define mdSysErrLast 0
+ #define MDSystemErr_Start (MDAppErr_Start + mdAppErrLast)
+ #define MDGetSystemErrorCode ASErrGetCode
+ #endif
+
+ #ifdef DefineMDSysErr
+ #undef DefineMDSysErr
+ #endif
+
+ #define DefineMDSysErr(mdNum, mdName, msg) {mdNum, mdName},
+
+ /* Define array that maps from the ids in the system erro enum to the system error numbers. */
+ static const SysErrMapEntry MDSysErrMap[] = {
+ #include MDSYSERR
+ {0, 0xffffffff /* this is an unsigned 32-bit value "-1" */}
+ };
+
+ #undef DefineMDSysErr
+
+#else /* MDSYSERR */
+ #define MDSystemErr_Start (MDAppErr_Start + mdAppErrLast)
+ #define mdSysErrLast 0
+ #define MDGetSystemErrorCode ASErrGetCode
+ static const SysErrMapEntry MDSysErrMap[] = {
+ {0, 0xffffffff /* this is an unsigned 32-bit value "-1" */}
+ };
+#endif /* MDSYSERR */
+
+
+
+
+#undef DefineErr
+#ifdef DefineMDSysErr
+ #undef DefineMDSysErr
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PDFErrorTypes */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXE.h
new file mode 100644
index 0000000..1ab6c31
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXE.h
@@ -0,0 +1,19 @@
+/* PDFXE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PDFXEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXEASF.h
new file mode 100644
index 0000000..49350a3
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDFXEASF.h
@@ -0,0 +1,28 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(pdfxErrNoError, "No error.")
+
+DefineErr(pdfxErrWrongCallbacks, "The size of the passed callbacks struct is wrong.")
+
+DefineErr(pdfxErrDuringCallback, "Tried to call a PDFXInstance function during a callback proc.")
+
+DefineErr(pdfxErrCannotLaunchAcrobat, "PDFX could not launch Acrobat.")
+
+DefineErr(pdfxErrCannotFindEWH, "Could not find the External Window Handler plug-in.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataCalls.h
new file mode 100644
index 0000000..fbdb10a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataCalls.h
@@ -0,0 +1,217 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDMetadataCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_PDMetadataCalls
+#define _H_PDMetadataCalls
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _PDMetadataHFT_LATEST_VERSION 0x00080000
+#define _PDMetadataHFT_LAST_BETA_COMPATIBLE_VERSION 0x00080000
+#define _PDMetadataHFT_IS_BETA 0
+
+/* for public use */
+#define PDMetadataHFT_LATEST_VERSION (_PDMetadataHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDMetadataHFT_LATEST_VERSION) : _PDMetadataHFT_LATEST_VERSION)
+
+#define PDMetadataHFT_VERSION_5 0x00050000
+#define PDMetadataHFT_VERSION_6 0x00060000
+#define PDMetadataHFT_VERSION_7 0x00070000
+#define PDMetadataHFT_VERSION_8 0x00080000
+
+#include "ASExpT.h"
+#include "PDMetadataHFTVers.h"
+#include "PDMetadataExpT.h"
+
+#define IN
+#define OUT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif /* NPROC */
+
+#if PLUGIN
+#define PEX1 ACCB1
+#define PEX2 ACCB2
+#endif
+
+#ifndef PEX1
+#define PEX1 ACEX1
+#define PEX2 ACEX2
+#endif
+
+#if ! PLUGIN /* ACROBAT_LIBRARY */
+ /* Implementation or static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define NOPROC(name)
+ #include "PDMetadataProcs.h"
+ #undef NPROC
+ #undef NOPROC
+
+#else
+#include "PIRequir.h"
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define XNPROC NPROC
+
+ enum {
+ PDMetadataBAD_SELECTOR,
+ #include "PDMetadataProcs.h"
+ PDMetadataNUMSELECTORSplusOne
+ };
+
+ #define PDMetadataNUMSELECTORS (PDMetadataNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef XNPROC
+
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+#if READER_PLUGIN
+ /* Force an error for Exchange procs */
+ #define XNPROC(returnType, name, params)
+#else
+ #define XNPROC NPROC
+#endif
+ #include "PDMetadataProcs.h"
+ #undef NPROC
+ #undef XNPROC
+
+#if PI_PDMETADATA_VERSION != 0
+
+#ifdef THREAD_SAFE_PDFL
+ #define gPDMetadataHFT (GetHFTLocations()->pdMetadataHFT)
+ #define gPDMetadataVersion (GetHFTLocations()->pdMetadataVersion)
+#else
+ extern HFT gPDMetadataHFT;
+ extern ASUns32 gPDMetadataVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+ /* Define the macros */
+ #define PDDocGetXAPMetadata (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_5), *((PDDocGetXAPMetadataSELPROTO)(gPDMetadataHFT[PDDocGetXAPMetadataSEL])))
+ #define PDDocSetXAPMetadata (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_5), *((PDDocSetXAPMetadataSELPROTO)(gPDMetadataHFT[PDDocSetXAPMetadataSEL])))
+ #define CosDictGetXAPMetadata (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_5), *((CosDictGetXAPMetadataSELPROTO)(gPDMetadataHFT[CosDictGetXAPMetadataSEL])))
+ #define CosDictSetXAPMetadata (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_5), *((CosDictSetXAPMetadataSELPROTO)(gPDMetadataHFT[CosDictSetXAPMetadataSEL])))
+ #define PDDocCalculateImplicitMetadata (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_5), *((PDDocCalculateImplicitMetadataSELPROTO)(gPDMetadataHFT[PDDocCalculateImplicitMetadataSEL])))
+ #define PDEContainerGetXAPMetadata (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_5), *((PDEContainerGetXAPMetadataSELPROTO)(gPDMetadataHFT[PDEContainerGetXAPMetadataSEL])))
+ #define PDEContainerSetXAPMetadata (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_5), *((PDEContainerSetXAPMetadataSELPROTO)(gPDMetadataHFT[PDEContainerSetXAPMetadataSEL])))
+
+/* new with PI_PDMETADATA_VERSION >= 0x00060000 */
+
+ #define PDDocGetXAPMetadataProperty (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_6),*((PDDocGetXAPMetadataPropertySELPROTO)(gPDMetadataHFT[PDDocGetXAPMetadataPropertySEL])))
+ #define PDDocSetXAPMetadataProperty (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_6),*((PDDocSetXAPMetadataPropertySELPROTO)(gPDMetadataHFT[PDDocSetXAPMetadataPropertySEL])))
+
+/* PI_PDMETADATA_VERSION >= 0x00060000 */
+
+/* new with PI_PDMETADATA_VERSION >= 0x00070000 */
+
+ #define PDDocGetMergedXAPKeywords (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_7),*((PDDocGetMergedXAPKeywordsSELPROTO)(gPDMetadataHFT[PDDocGetMergedXAPKeywordsSEL])))
+ #define PDDocMergeXAPKeywords (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_7),*((PDDocMergeXAPKeywordsSELPROTO)(gPDMetadataHFT[PDDocMergeXAPKeywordsSEL])))
+
+/* PI_PDMETADATA_VERSION >= 0x00070000 */
+
+/* new with PI_PDMETADATA_VERSION >= 0x00080000 */
+#define PDDocGetXAPMetadataArrayItem (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_8),*((PDDocGetXAPMetadataArrayItemSELPROTO)(gPDMetadataHFT[PDDocGetXAPMetadataArrayItemSEL])))
+#define PDDocSetXAPMetadataArrayItem (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_8),*((PDDocSetXAPMetadataArrayItemSELPROTO)(gPDMetadataHFT[PDDocSetXAPMetadataArrayItemSEL])))
+#define PDDocCountXAPMetadataArrayItems (ACROASSERT(gPDMetadataVersion >=PDMetadataHFT_VERSION_8),*((PDDocCountXAPMetadataArrayItemsSELPROTO)(gPDMetadataHFT[PDDocCountXAPMetadataArrayItemsSEL])))
+
+/* PI_PDMETADATA_VERSION >= 0x00080000 */
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* PI_PDMETADATA_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PDMetadataCalls */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataError.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataError.h
new file mode 100644
index 0000000..273f648
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataError.h
@@ -0,0 +1,19 @@
+/* PDMetadataError.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PDMetadataErrorASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataErrorASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataErrorASF.h
new file mode 100644
index 0000000..949bf71
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataErrorASF.h
@@ -0,0 +1,26 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(pdMetadataErrBadXAP, "The given metadata was not in the XMP format")
+
+DefineErr(pdMetadataErrBadPDF, "XMP metadata processing found a syntax error in PDF")
+
+DefineErr(pdMetadataErrCouldntCreateMetaXAP, "Could not create internal representation of XMP metadata")
+
+DefineErr(pdMetadataErrInternalError, "An internal error occurred while processing XMP metadata")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataExpT.h
new file mode 100644
index 0000000..a9d638f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataExpT.h
@@ -0,0 +1,108 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDMetadataExpT.h
+
+ - Types required to use the PDMetadata HFT.
+
+*********************************************************************/
+
+#ifndef _H_PDMETADATAExpT
+#define _H_PDMETADATAExpT
+
+#include "PDExpT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Calculates implicit metadata. Clients that maintain metadata
+ items that have to be recalculated should register for the
+ PDDocCalculateMetadata() notification with this callback.
+ The callback should obtain the metadata with which it is
+ concerned, change it, and put the changed metadata back
+ in the object from which it was obtained.
+ @param pdDoc The document containing the metadata.
+ @param data User-supplied data.
+ @notify PDDocCalculateMetadata
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDImplicitMetadataProc)(PDDoc pdDoc,
+ void * data);
+
+/***********************************************************************
+ * New in Acrobat 7
+ */
+
+/**
+ Receives the notification that the XMP metadata describing a document
+ as a whole has changed.
+
+ @param pdDoc The PDDoc whose describing XMP metadata has changed.
+ @param newMetadata A serialized representation of the new describing XMP metadata.
+ You do not own this.
+ @param data Notification data provided at notification registration time.
+ @notify PDDocXAPMetadataDidChange
+ */
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDDocXAPMetadataDidChangeProc)(PDDoc pdDoc,
+ ASText newMetadata,
+ void * data);
+
+/**
+ Receives the notification that the XMP metadata describing an object
+ represented by a Cos dictionary or stream has changed.
+
+ @param dict The Cos dictionary or stream representing an object whose describing XMP metadata has changed.
+ @param newMetadata A serialized representation of the new describing XMP metadata
+ You do not own this.
+ @param data Notification data provided at notification registration time.
+ @notify CosDictXAPMetadataDidChange
+
+ */
+typedef ACCBPROTO1 void (ACCBPROTO2 *CosDictXAPMetadataDidChangeProc)(CosObj dict,
+ ASText newMetadata,
+ void * data);
+
+/**
+ Receives the notification that the XMP metadata describing a marked content
+ sequence has changed.
+
+ @param container The PDEContainer representing a marked content sequence
+ whose describing XMP metadata has changed.
+ @param newMetadata A serialized representation of the new describing XMP metadata
+ You do not own this.
+ @param data Notification data provided at notification registration time.
+ @notify PDEContainerXAPMetadataDidChange
+
+ */
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDEContainerXAPMetadataDidChangeProc)(PDEContainer container,
+ ASText newMetadata,
+ void * data);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataHFTVers.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataHFTVers.h
new file mode 100644
index 0000000..bc6025a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataHFTVers.h
@@ -0,0 +1,26 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDMetadataHFTVers.h
+
+ - PDMetadata HFT name and version.
+
+*********************************************************************/
+
+#ifndef _H_PDMetadataHFTVers
+#define _H_PDMetadataHFTVers
+
+#define PDMetadataHFTName "PDMetadata"
+
+#endif /* _H_PDMetadataHFTVers */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataProcs.h
new file mode 100644
index 0000000..28fc769
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDMetadataProcs.h
@@ -0,0 +1,568 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDMetadataProcs.h
+
+*********************************************************************/
+
+/**********************************************************************
+ * PDF XAP Metadata API
+ *
+ * General remarks
+ *
+ * These procedures let you store and access descriptive metadata
+ * associated with a PDF document and with components within a PDF
+ * document. The metadata is expressed in the Adobe XAP format, which is
+ * an application of RDF (Resource Description Format) as defined by the
+ * World Wide Web Consortium (W3C).
+ *
+ * Constructing XAP metadata and accessing information within XAP
+ * metadata are the responsibility of the client. The only exception
+ * is in the case of the descriptive entries that are store in the Info
+ * dictionary in a PDF document. These entries have corresponding entries in the
+ * XAP metadata for a document, and the internals of Acrobat maintain compatibility
+ * between the two representations by copying and translating information
+ * as necessary. The implementation of the existing API calls
+ * PDDocSetMetadata and PDDocGetMetadata has been updated to maintain
+ * both copies of the information as well.
+ *
+ * The PDF XAP Metadata API consists of three pairs of setting and getting
+ * procedures, plus one notification for initiating recalculation of
+ * metadata items.
+ *
+ * PDDocGetXAPMetadata and PDDocSetMetadata deal with metadata that
+ * describes the PDF document as a whole.
+ *
+ * CosDictGetXAPMetadata and CosDictSetXAPMetadata deal with metadata
+ * that describes a particular object within a PDF document.
+ * The PDF 1.4 update to the PDF Language Reference describes which
+ * kinds of objects may have XAP metadata, but the API makes no attempt
+ * to enforce restrictions. Many objects that are actually represented
+ * as Cos dictionaries or streams (such as pages, for example), have
+ * special PD layer types that represent them more abstractly (the PDPage type
+ * in the case of pages). To use the PDF XAP metadata API on such an
+ * object, you deal with its representation as a Cos dictionary.
+ * In the case of a PDPage, you call PDPageGetCosObj to get this representation.
+ *
+ * PDEContainerGetXAPMetadata and PDEContainerSetXAPMetadata deal with
+ * metadata that describes a particular portion of graphic stream content.
+ * Inline images are an important kind of page content for which you might
+ * want to maintain a metadata description (Image XObjects are Cos dictionaries,
+ * and can have metadata attached via the CosDict procedures mentioned above).
+ * You access metadata on graphic stream content by means of the PDFEdit
+ * object type PDEContainer, which can contain other kinds of PDFEdit object.
+ * If you want to attach XAP metadata to a PDFEdit object that isn't directly
+ * contained in a PDEContainer, you use PDFEdit to create a PDEContainer
+ * and place the object within.
+ *
+ * All the XAP metadata setting procedures take ASText objects as
+ * arguments, and all the XAP metadata getting procedures return ASText
+ * objects as results. Since XAP metadata can potentially contain
+ * arbitrary Unicode character codes, you should in general extract
+ * the metadata from the ASText object as Unicode or UTF-8: other
+ * encodings may not be able to represent all the characters that can
+ * exist in XAP text.
+ *
+ * The remaining piece of the PDF XAP metadata API deals with the fact
+ * that some applications require the calculation of metadata based on
+ * the actual contents of the PDF document. Clients that maintain
+ * metadata items that have to be recalculated should register for the
+ * notification PDDocCalculateMetadata with a callback procedure of
+ * type PDImplicitMetadataProc (declared in PDMetadataExpT.h).
+ * The procedure should obtain the metadata with which it's concerned,
+ * change it, and put the changed metadata back on the object from
+ * which it was obtained.
+ *
+ * The notification PDDocCalculateMetadat is issued when a document is saved;
+ * it can also be issued explicitly via the PDF XAP metadata API procedure
+ * PDDocCalculateImplicitMetadata. A client that requires that all
+ * metadata be up-to-date at a time when the document isn't being
+ * saved should call this procedure.
+ */
+/**********************************************************************/
+#if !PLUGIN
+#undef XNPROC
+//#if !READER
+#define XNPROC NPROC
+//#else
+//#define XNPROC(returnType, name, params) NOPROC(name)
+//#endif
+#endif
+ /* Document-level metadata calls */
+
+
+/**
+ Gets the XMP metadata associated with a document.
+ It returns an ASText whose text is the XML text of the XMP
+ metadata associated with the document <code>pdDoc</code>. The ASText
+ becomes the property of the client, which is free to alter
+ or destroy it.
+
+ <p>The XMP metadata returned always represents all the properties
+ in the <code>pdDoc</code> object's Info dictionary, and can also contain properties
+ not present in the Info dictionary. This call is preferred
+ to PDDocGetInfo(), which only returns properties that are
+ in the Info dictionary (although the older function is supported
+ for compatibility). </p>
+ @param pdDoc The document containing the metadata.
+ @return An ASText object containing the XMP metadata associated
+ with the document pdDoc.
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @see PDDocGetXAPMetadataProperty
+ @see PDDocSetXAPMetadata
+ @see PDDocSetXAPMetadataProperty
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+ @since PI_PDMETADATA_VERSION >= 0x00050000
+*/
+XNPROC(ASText,
+ PDDocGetXAPMetadata, (IN PDDoc pdDoc))
+
+
+/**
+ Sets the XMP metadata associated with a document.
+ It replaces the XMP metadata associated with the document <code>pdDoc</code>
+ with the XMP metadata stored in <code>metadataASText</code>.
+
+ <p>The contents of <code>metadataASText</code> must be well-formed XML and
+ Resource Description Format (RDF), as defined by the W3C
+ (see http://www.w3.org/RDF), that also forms valid XMP. If
+ <code>metadataASText</code> is ill-formed, an error is raised. </p>
+
+ <p>The call does not destroy <code>metadataASText</code> or alter its text.
+ This method copies the textual information it needs, so
+ subsequent alteration or destruction of <code>metadataASText</code> does
+ not affect the document XMP metadata. </p>
+
+ <p>Calling PDDocSetXAPMetadata() changes the contents of the <code>pdDoc</code> object's
+ Info dictionary to reflect the values of corresponding metadata
+ properties represented in <code>metadataASText</code>. The XMP metadata
+ can also contain properties that are not reflected in the
+ Info dictionary. </p>
+ @param pdDoc The document whose metadata is to be set.
+
+ @param metadataASText An ASText object containing the
+ metadata to be stored in the document.
+ @notify PDDocXAPMetadataDidChange
+ @exception ErrSysPDModel
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @exception pdErrOpNotPermitted is raised if <code>pdDoc</code> is not writable.
+ @see PDDocGetXAPMetadata
+ @see PDDocSetXAPMetadataProperty
+ @see PDDocSetInfo
+
+
+ @note This method raises an exception if the user does not
+ have permission to change the document.
+
+ @note If you use this method to set metadata that does not
+ respect the requirement that aliased metadata items (such
+ as <code>pdf:Title</code> and <code>xap:Title</code>) be equal, then the mechanism
+ that maintains this equality when you set metadata via PDDocSetInfo()
+ is disabled.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00050000
+*/
+XNPROC(void,
+ PDDocSetXAPMetadata, (IN PDDoc pdDoc,
+ IN ASText metadataASText))
+
+/**********************************************************************/
+/* Component-level metadata calls */
+
+
+/**
+ Gets the XMP metadata associated with a Cos dictionary or
+ stream. If there is XMP metadata, it is returned as an ASText in
+ the output parameter <code>metadataASText</code>. The ASText returned
+ becomes the property of the client, which is free to alter
+ or destroy it.
+ @param obj A dictionary or stream CosObj.
+ @param metadataASText (Filled by the method) The ASText
+ object from which the XMP metadata will be obtained.
+ @return <code>true</code> if <code>obj</code> has associated XMP metadata, <code>false</code> if it does
+ not. It also returns <code>false</code> if <code>obj</code> is not a dictionary or stream.
+ It returns <code>true</code> exactly when the Cos object <code>obj</code> has XMP metadata.
+
+ @exception ErrSysPDModel
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @see CosDictSetXAPMetadata
+
+
+ @note CosDictGetXAPMetadata() will not attempt to verify that
+ <code>obj</code> is one of the objects that is specified in the PDF Reference
+ to allow XMP metadata.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00050000
+*/
+XNPROC(ASBool,
+ CosDictGetXAPMetadata, (IN CosObj obj,
+ OUT ASText * metadataASText))
+
+/**
+ Sets the XMP metadata associated with a Cos dictionary or
+ stream. It replaces the XMP metadata associated with the Cos object
+ obj with the XMP metadata stored in <code>metadataASText</code>.
+
+ <p>The contents of <code>metadataASText</code> must be well-formed XML and
+ Resource Description Format (RDF), as defined by the W3C
+ (see http://www.w3.org/RDF), that also forms valid XMP. CosDictSetXAPMetadtata()
+ will not destroy <code>metadataASText</code> or alter its text.</p>
+
+ @param obj The dictionary or stream Cos object whose associated
+ XMP metadata is to be set.
+ @param metadataASText The ASText object containing the
+ metadata to be associated with <code>obj</code>.
+ @notify CosDictXAPMetadataDidChange
+ @exception ErrSysPDModel
+ @see CosDictGetXAPMetadata
+
+
+ @note CosDictSetXAPMetadtata() will raise an exception if
+ the user does not have permission to change the document.
+
+ @note CosDictSetXAPMetadtata() will not attempt to verify
+ that <code>obj</code> is one of the objects that is specified in the
+ PDF Reference to allow XMP metadata.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00050000
+*/
+XNPROC(void,
+ CosDictSetXAPMetadata, (IN CosObj obj,
+ IN ASText metadataASText))
+
+/**********************************************************************/
+/* Implicit metadata calls */
+
+
+/**
+ Notifies all registered implicit metadata calculators to
+ run. It issues the notification PDDocCalculateMetadata(), passing
+ <code>pdDoc</code> to all registered handlers.
+ @param pdDoc The document for which implicit metadata
+ is calculated.
+ @notify PDDocCalculateMetadata
+ @see PDDocSave
+ @since PI_PDMETADATA_VERSION >= 0x00050000
+*/
+XNPROC(void,
+ PDDocCalculateImplicitMetadata, (IN PDDoc pdDoc))
+
+/**********************************************************************/
+/* Marked Content metadata calls */
+
+
+/**
+ Gets the XMP metadata associated with a PDEContainer.
+ If there is XMP metadata, it is returned as an ASText in
+ the output parameter <code>metadataASText</code>. The ASText returned
+ becomes the property of the client, which is free to alter
+ or destroy it.
+ @param pdeContainer The container whose metadata is retrieved.
+
+ @param metadataASText (Filled by the method) If there
+ is XMP metadata, it is returned as an ASText object in this
+ parameter. The ASText object returned becomes the property
+ of the client, which is free to alter or destroy it.
+ @return <code>true</code> exactly when the <code>pdeContainer</code> has XMP metadata.
+ @exception ErrSysPDModel
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @exception peErrWrongPDEObjectType
+ @exception cosErrInvalidObj
+ @see PDEContainerSetXAPMetadata
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00050000
+*/
+XNPROC(ASBool,
+ PDEContainerGetXAPMetadata, (IN PDEContainer pdeContainer,
+ OUT ASText * metadataASText))
+
+/**
+ Sets the XMP metadata associated with a PDEContainer.
+ Replaces the XMP metadata associated with <code>pdeContainer</code> with
+ the XMP metadata stored in <code>metadataASText</code>. The contents
+ of <code>metadataASText</code> must be well-formed XML and Resource Description
+ Format (RDF), as defined by the W3C (see http://www.w3.org/RDF),
+ that also forms valid XMP. PDEContainerSetXAPMetadtata() will
+ not destroy <code>metadataASText</code> or alter its text.
+ @param pdeContainer The container whose metadata is set.
+
+ @param pdDoc The document containing <code>pdeContainer</code>.
+ @param metadataASText Well-formed XML and RDF that also
+ forms valid XMP.
+ @notify PDEContainerXAPMetadataDidChange
+ @exception ErrSysPDModel
+ @exception peErrWrongPDEObjectType
+ @exception cosErrInvalidObj
+ @see PDEContainerGetXAPMetadata
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00050000
+*/
+XNPROC(void,
+ PDEContainerSetXAPMetadata, (IN PDEContainer pdeContainer,
+ IN PDDoc pdDoc,
+ IN ASText metadataASText))
+
+/***********************************************************************
+ * New in Acrobat 6
+ */
+
+/**
+ Gets the value of an XMP metadata property associated with
+ a document. It returns an ASText whose text is the XML text of the value
+ of the specified property in the XMP metadata associated
+ with the document <code>pdDoc</code>. The ASText becomes the property
+ of the client, which is free to alter or destroy it.
+
+ <p>The XMP metadata can represent all properties in the <code>pdDoc</code> object's
+ Info dictionary, as well as other properties. This call
+ is preferred to PDDocGetInfo(), which only allows access to
+ properties that are in the Info dictionary (although the
+ latter is supported for compatibility). </p>
+
+ @param pdDoc The document containing the metadata.
+ @param namespaceName The XML namespace URI for the schema
+ in which the property is to be found.
+ @param path The name of the desired simple property. Note that
+ XMP properties can have an XML substructure; this method
+ can only retrieve values from simple textual properties.
+ @return An ASText object containing the XML text of the value of
+ the specified property in the XMP metadata associated with
+ the document <code>pdDoc</code>, or an empty ASText if no such property
+ is found.
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @see PDDocSetXAPMetadataProperty
+ @see PDDocGetXAPMetadata
+ @see PDDocSetXAPMetadata
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00060000
+*/
+XNPROC(ASText,
+ PDDocGetXAPMetadataProperty, (PDDoc pdDoc,
+ ASText namespaceName,
+ ASText path))
+/**
+ Sets the value of an XMP metadata property associated with
+ a document. The XMP metadata represents all the properties in <code>pdDoc</code> object's
+ Info dictionary, and can also contain properties that are
+ not in the Info dictionary. This call is preferred to PDDocSetInfo(),
+ which only allows access to properties that are in the Info
+ dictionary (although the older function is supported for
+ compatibility).
+ @param pdDoc The document containing the metadata.
+ @param namespaceName The XML namespace URI for the schema
+ in which the property is to be found.
+ @param namespacePrefix A brief string to be used as an
+ abbreviation when creating the XML representation of the
+ property. This string must not be empty.
+ @param path The name of the simple property to be modified.
+
+ @param newValue The new XML text value for the property.
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @see PDDocGetXAPMetadataProperty
+ @see PDDocGetXAPMetadata
+ @see PDDocSetXAPMetadata
+
+ @note XMP properties can have an XML substructure; this
+ method can only set a value for simple textual properties.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00060000
+*/
+XNPROC(void,
+ PDDocSetXAPMetadataProperty, (PDDoc pdDoc,
+ ASText namespaceName,
+ ASText namespacePrefix,
+ ASText path,
+ ASText newValue))
+
+/**
+ Yields an ASText containing a semicolon-separated list of fields.
+ The first such field is the entire contents of the <code>pdf:Keywords</code>
+ property of the document XMP; the remaining fields are the contents
+ of successive items in the <code>xmp:Keywords</code> bag of keyword items.
+
+ <p> The document's metadata is not modified as a result of this call.</p>
+
+ @param pdDoc The document containing the metadata from which to
+ extract the merged list of keywords.
+ @return An ASText containing the textual representation of the merged
+ list of keywords. The ASText returned becomes the sole property of the caller.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00070000
+*/
+
+XNPROC(ASText,
+ PDDocGetMergedXAPKeywords, (PDDoc pdDoc))
+
+/**
+ Causes a string produced as by PDDocGetMergedXAPKeywords() to be
+ stored as the new value of the <code>pdf:Keywords</code> property, and the
+ former value of the <code>pdf:Keywords</code> property to be stored as an item
+ in the <code>xmp:Keywords</code> bag of keyword items.
+
+ <p>The algorithm used to compute merged keywords lists detects the case
+ in which the keywords lists have already been merged and makes no
+ changes to the XMP metadata in this case.</p>
+
+ @param pdDoc The document containing the metadata that is to be modified
+ to make the <code>pdf:Keywords</code> and <code>xmp:Keywords</code> properties conform.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00070000
+*/
+
+XNPROC(void,
+ PDDocMergeXAPKeywords, (PDDoc pdDoc))
+
+ /***********************************************************************
+ * New in Acrobat 8
+ */
+
+ /**
+ Gets the value of an XMP metadata array item, associated with
+ a document, based on an index. It returns an ASText object containing the XML text of the value
+ of the specified property in the XMP metadata array associated
+ with the document <code>pdDoc</code>. The ASText object becomes the property
+ of the client, which is free to alter or destroy it.
+
+ @param pdDoc The document containing the metadata.
+ @param namespaceName The XML namespace URI for the schema
+ in which the property is to be found.
+ @param path The name of the desired simple property.
+ @param index The index in the metadata property array associated with the property.
+ @return An ASText object containing the XML text of the value of
+ the specified property in the XMP metadata associated with
+ the document <code>pdDoc</code>, or an empty ASText object if no such property
+ is found.
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @see PDDocSetXAPMetadataProperty
+ @see PDDocGetXAPMetadata
+ @see PDDocSetXAPMetadata
+
+ @note XMP properties can have an XML substructure; this method
+ can only retrieve values from simple textual properties.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00080000
+ */
+
+XNPROC(ASText,
+ PDDocGetXAPMetadataArrayItem, (PDDoc pdDoc,
+ ASText namespaceName,
+ ASText path,
+ ASInt32 index))
+
+ /**
+ Sets the value of an XMP metadata array item, associated with
+ a document, based on an index.
+ @param pdDoc The document containing the metadata.
+ @param namespaceName The XML namespace URI for the schema
+ in which the property is to be found.
+ @param namespacePrefix A brief string to be used as an
+ abbreviation when creating the XML representation of the
+ property. This string must not be empty.
+ @param path The name of the simple property to be modified.
+ @param index The index in the metadata property array associated with the property.
+ @param newValue The new XML text value for the property.
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @see PDDocGetXAPMetadataProperty
+ @see PDDocGetXAPMetadata
+ @see PDDocSetXAPMetadata
+
+ @note XMP properties can have an XML substructure; this
+ method can only set a value for simple textual properties.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00080000
+ */
+
+XNPROC(void,
+ PDDocSetXAPMetadataArrayItem, (PDDoc pdDoc,
+ ASText namespaceName,
+ ASText namespacePrefix,
+ ASText path,
+ ASInt32 index,
+ ASText newValue))
+
+ /**
+ Returns the number of array items in a property array associated with a PDDoc.
+ @param pdDoc The document containing the metadata.
+ @param namespaceName The XML namespace URI for the schema
+ in which the property is to be found.
+ @param path The name of the simple property to be modified.
+ @return An ASInt32 which is the number of array items in the property array.
+ @exception pdMetadataErrCouldntCreateMetaXAP
+ @see PDDocGetXAPMetadataProperty
+ @see PDDocGetXAPMetadata
+ @see PDDocSetXAPMetadata
+
+ @note XMP properties can have an XML substructure; this
+ method can only set a value for simple textual properties.
+
+ @note The term <i>XAP</i> refers to an early internal code name
+ for Adobe's Extensible Metadata Platform (XMP). For more
+ information on this protocol, see the Adobe XMP specification.
+
+ @since PI_PDMETADATA_VERSION >= 0x00080000
+ */
+
+XNPROC(ASInt32,
+ PDDocCountXAPMetadataArrayItems, (PDDoc pdDoc,
+ ASText namespaceName,
+ ASText path))
+
+#undef XNPROC
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModE.h
new file mode 100644
index 0000000..9512c9a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModE.h
@@ -0,0 +1,19 @@
+/* PDModE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PDModEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModEASF.h
new file mode 100644
index 0000000..45bb2ca
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDModEASF.h
@@ -0,0 +1,48 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(pdModErrNoError, "No error.")
+
+DefineErr(pdModErrEncTablesFailed, "Unable to initialize font encoding tables.")
+
+DefineErr(pdModErrDuplicateCryptName, "A security plug-in is already registered with this name.")
+
+DefineErr(pdModErrDuplicatePermName, "A permission handler is already registered with this name.")
+
+DefineErr(pdModErrBadNavigator, "This navigator file cannot be read. Ensure that the mimetype file exists and is the first file in the package.")
+
+DefineErr(pdModErrNewNavigator, "This navigator requires a new version of Acrobat.")
+
+DefineErr(pdModErrNavUnknownExtension, "This navigator does not have a valid file extension. The only valid file extension for a navigator is either \"nav\" or \"swf\".")
+
+DefineErr(pdModErrNavInvalidMimeType, "This navigator has an invalid mimetype file. The navigator mimetype must be \"application/vnd.adobe.pdf-navigator\".")
+
+DefineErr(pdModErrNavMissingSwf, "This navigator is missing its swf file. Check the spelling of the file name (it is case sensitive).")
+
+DefineErr(pdModErrNavMissingNavigatorXML, "This navigator is missing its navigator xml file.")
+
+DefineErr(pdModErrNavMissingLocalesXML, "This navigator is missing its locales xml file. Check the spelling of the file name (it is case sensitive).")
+
+DefineErr(pdModErrNavMissingStringsXML, "This navigator is missing one or more of its localization xml files. Check the spelling of the file name (it is case sensitive).")
+
+DefineErr(pdModErrNavInvalidNavigatorXML, "This navigator's navigator xml file is malformed. Verify that your xml file is valid per the navigator schema.")
+
+DefineErr(pdModErrNavInvalidLocalesXML, "This navigator's locales xml file is malformed. Verify that your xml file is valid per the navigator schema.")
+
+DefineErr(pdModErrNavInvalidStringsXML, "One or more of this navigator's localization xml files is malformed. Verify that your xml file is valid per the navigator schema.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageE.h
new file mode 100644
index 0000000..b41b4c8
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageE.h
@@ -0,0 +1,19 @@
+/* PDPageE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PDPageEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageEASF.h
new file mode 100644
index 0000000..8624aa8
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDPageEASF.h
@@ -0,0 +1,30 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(pdPErrNoError, "No error.")
+
+DefineErr(pdPErrPageDimOutOfRange, "The dimensions of this page are out-of-range.")
+
+DefineErr(pdPErrBadType3Font, "Invalid Type 3 font.")
+
+DefineErr(pdPErrType3TooComplex, "Type 3 font is too complex to print.")
+
+DefineErr(pdPErrFormTooComplex, "Form is too complex to print.")
+
+DefineErr(pdPErrUnableToCreateRasterPort, "Creation of a raster port failed.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDProcs.h
new file mode 100644
index 0000000..18dab9a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDProcs.h
@@ -0,0 +1,12436 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDProcs.h
+
+ - Catalog of functions exported by the PDModel HFT.
+
+*********************************************************************/
+
+#if !EXTERNAL_PDPROCS_USER /* External user of this header file, e.g. PISDK */
+
+#if CAN_EDIT && !READER /* Restore X Macros -- was !CAN_EDIT */
+#define XNPROC NPROC
+#define XPROC PROC
+#define XSPROC SPROC
+#else
+#define XNPROC(returnType, name, params) NOPROC(name)
+#define XPROC(returnType, name, params) NOPROC(name)
+#define XSPROC(returnType, name, params, stubProc) NOPROC(name)
+#endif /* READER */
+
+#if CAN_ENUM_OBJECTS
+#define ENPROC NPROC
+#define EPROC PROC
+#define ESPROC SPROC
+#else
+#define ENPROC(returnType, name, params) NOPROC(name)
+#define EPROC(returnType, name, params) NOPROC(name)
+#define ESPROC(returnType, name, params, stubProc) NOPROC(name)
+#endif /* CAN_ENUM_OBJECTS */
+
+#endif
+
+/**
+ Creates a new action object.
+ @param doc The document in which the action is created.
+
+ @param type The ASAtom corresponding to the action's subtype.
+ The ASAtom can be obtained from a string using ASAtomFromString().
+ @return The newly created PDAction.
+ @see PDActionNewFromDest
+ @see PDActionNewFromFileSpec
+ @see PDActionFromCosObj
+ @see PDActionDestroy
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDAction, PDActionNew, (PDDoc doc, ASAtom type))
+
+/**
+ Creates a new action that takes the user to the specified
+ destination view. This method can only be used for destinations
+ in the same document as the source document. Cross-document
+ links must be built up from the Cos level, populating the
+ Action dictionary for the GotoR action as described in Section
+ 8.5.3 in the <i>PDF Reference</i>.
+ @param doc The document in which the action is created
+ and used.
+ @param dest The destination view.
+ @param destDoc The destination document. <code>destDoc</code> must be the
+ same as <code>doc</code>.
+ @return The newly created action.
+ @see PDActionNew
+ @see PDActionNewFromFileSpec
+ @see PDActionFromCosObj
+ @see PDActionDestroy
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDAction, PDActionNewFromDest, (PDDoc doc, PDViewDestination dest, PDDoc destDoc))
+
+/**
+ Creates an action of the specified type from a file specification.
+
+ @param containingDoc The document in which the action
+ is created and used.
+ @param type The type of action to create.
+ @param fileSpec The file specification that is made part
+ of an action.
+ @return The newly created PDAction.
+ @see PDActionNew
+ @see PDActionNewFromDest
+ @see PDActionFromCosObj
+ @see PDActionDestroy
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDAction, PDActionNewFromFileSpec, (PDDoc containingDoc, ASAtom type, PDFileSpec fileSpec))
+
+/**
+ Destroys an action object.
+ @param action IN/OUT The action to destroy.
+ @see PDActionNew
+ @see PDActionNewFromDest
+ @see PDActionNewFromFileSpec
+ @see PDActionFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDActionDestroy, (PDAction action))
+
+/**
+ Tests whether an action is valid. This method can be used
+ in the following cases:
+ <ul>
+ <li>To determine whether a PDAction returned from a method
+ is really an action. For example, calling PDLinkAnnotGetAction()
+ returns an invalid action if no action is associated with
+ the link annotation. </li>
+ <li>To ensure that an action has not been deleted.</li>
+ </ul>
+
+ @param action The action whose validity is determined.
+ @return <code>true</code> if the action is valid, <code>false</code> otherwise.
+ @see PDActionEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDActionIsValid, (PDAction action))
+
+/**
+ Gets an action's subtype.
+ @param action IN/OUT The action whose subtype is obtained.
+ @return The ASAtom corresponding to the action's subtype. The ASAtom
+ can be converted to a string using ASAtomGetString().
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, PDActionGetSubtype, (PDAction action))
+
+/**
+ Compares two actions for equality. Two actions are equal
+ only if their Cos objects are equal (see CosObjEqual()).
+
+ @param action The first actions to be compared.
+ @param action2 The second action to be compared.
+ @return <code>true</code> if the actions are equal, <code>false</code> otherwise.
+
+ @see CosObjEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDActionEqual, (PDAction action, PDAction action2))
+
+/**
+ Gets an action's destination view. This only works for actions
+ that contain a view destination; that is, actions whose subtype
+ is GoTo.
+
+ <p>For named destinations, this method may return a Cos string
+ object or a Cos name object. See Section 8.2.1 in the <i>PDF
+ Reference</i> for more information on named destinations. </p>
+
+ @param action The action whose destination is obtained.
+ @return The action's destination, which may be a PDViewDestination, or
+ for named destinations, a Cos string object or a Cos name
+ object. Use the PDViewDestResolve() method on this returned
+ value to obtain a PDViewDestination.
+ @see PDActionGetFileSpec
+ @see PDViewDestResolve
+
+ @note Since this method may not return a PDViewDestination,
+ use the PDViewDestResolve() method on the returned value to
+ obtain a PDViewDestination.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDViewDestination, PDActionGetDest, (PDAction action))
+
+/**
+ Gets the Cos object corresponding to an action. This method
+ does not copy the object, but is instead the logical equivalent
+ of a type cast.
+ @param action IN/OUT The action whose Cos object is obtained.
+
+ @return The dictionary Cos object for the action. The contents of the
+ dictionary can be enumerated using CosObjEnum().
+ @see PDActionFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(CosObj, PDActionGetCosObj, (PDAction action))
+
+/**
+ Converts a dictionary Cos object to an action and verifies
+ that the action is valid. This method does not copy the
+ object, but is instead the logical equivalent of a type
+ cast.
+ @param obj The dictionary Cos object whose action is obtained.
+ @return The PDAction corresponding to <code>obj</code>.
+ @exception pdErrBadAction is raised if the action is invalid as determined
+ by PDActionIsValid().
+ @see PDActionGetCosObj
+ @see PDActionNew
+ @see PDActionNewFromDest
+ @see PDActionNewFromFileSpec
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDAction, PDActionFromCosObj, (CosObj obj))
+
+/**
+ Gets a file specification from an action.
+
+ <p>Not all types of actions have file specifications; this
+ method only works for actions that contain a file specification.
+ See Section 8.5 in the <i>PDF Reference</i> for more information
+ on the contents of various types of actions. </p>
+
+ @param action The action whose file specification is obtained.
+ @return The action's file specification.
+ @see PDActionGetDest
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDFileSpec, PDActionGetFileSpec, (PDAction action))
+
+
+/**
+ Broadcasts a PDAnnotWillChange() notification. Clients must
+ call this method before making any change to a custom annotation.
+
+ @param annot The annotation that has changed.
+ @param key The ASAtom corresponding to the name of the
+ key in the annotation's Cos dictionary that is changing.
+ @notify PDAnnotWillChange
+ @see PDAnnotNotifyDidChange
+ @see AVAppRegisterNotification
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDAnnotNotifyWillChange, (PDAnnot annot, ASAtom key))
+
+/**
+ Broadcasts a PDAnnotDidChange() notification. Clients must
+ call this method after making any change to a custom annotation.
+
+ @param annot The annotation that has changed.
+ @param key The ASAtom corresponding to the name of the
+ key in the annotation's Cos dictionary that is changing.
+
+ @param err An error code to pass to any method registered
+ to receive the PDAnnotDidChange() notification. Pass zero
+ if the annotation was changed successfully. Pass a nonzero
+ value if an error occurred while changing the annotation.
+ @notify PDAnnotDidChange
+ @see PDAnnotNotifyWillChange
+ @see AVAppRegisterNotification
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDAnnotNotifyDidChange, (PDAnnot annot, ASAtom key, ASInt32 err))
+
+
+/**
+ Creates a new annotation, associated with the specified
+ page's CosDoc, but not added to the page. Use PDPageAddAnnot()
+ to add the annotation to the page.
+
+ <p>If you want to create an annotation that prints even if
+ the annotation handler is not present, you must provide
+ an appearance for it. To do this, add an appearance key
+ (AP) to the annotation dictionary, in which you place the
+ Forms XObject for the Normal (N), Rollover (R), and Down
+ (D) appearances; only the Normal appearance is required.
+ Also, add a flags field (F) to the annotation dictionary
+ and set the appropriate value for the bit field. A value
+ of <code>4</code>, which displays the annotation if the handler is not
+ present, shows the annotation, and allows printing it, is
+ recommended. </p>
+
+ @param aPage The page to whose PDDoc the annotation is
+ added.
+ @param subType The subtype of annotation to create.
+ @param initialLocation A pointer to a rectangle specifying
+ the annotation's bounds, specified in user space coordinates.
+ @return The newly created annotation.
+ @exception pdErrOpNotPermitted is raised if:
+ <ul>
+ <li>The annotation is of subtype Text and the document's permissions
+ do not include pdPermEditNotes (see PDPerms), or</li>
+ <li>The annotation is of any other subtype and the document's
+ permissions do not include pdPermEdit.</li>
+ </ul>
+
+ @notify PDAnnotWasCreated
+ @see PDPageAddAnnot
+ @see PDPageAddNewAnnot
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDAnnot, PDPageCreateAnnot, (PDPage aPage, ASAtom subType, const ASFixedRect *initialLocation))
+
+/**
+ Tests whether an annotation is valid. This is intended only
+ to ensure that the annotation has not been deleted, not
+ to ensure that all necessary information is present and
+ valid.
+ @param anAnnot The annotation whose validity is tested.
+ @return <code>true</code> if <code>anAnnot</code> is a valid annotation object, <code>false</code>
+ otherwise. An annotation is valid if it is a Cos dictionary
+ object and has a Rect key.
+ @see PDAnnotEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDAnnotIsValid, (PDAnnot anAnnot))
+
+/**
+ Gets an annotation's subtype.
+ @param anAnnot The annotation whose subtype is obtained.
+ @return The ASAtom for the annotation's subtype. This can be converted
+ to a string using ASAtomGetString(). The storage pointed to
+ by the return value is owned by the Acrobat viewer and should
+ be assumed to be valid only until the next call into any
+ client API method; it should be immediately copied by the
+ client if the client wants to reference it later.
+
+ @return ASAtomNull if the annotation does not have a Subtype
+ key or its value is not a name object.
+ @exception pdErrBadAnnotation
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, PDAnnotGetSubtype, (PDAnnot anAnnot))
+
+/**
+ Gets the size and location of an annotation on its page.
+
+ @param anAnnot IN/OUT The annotation whose location and size are
+ set.
+ @param boxP IN/OUT (Filled by the method) A pointer to a rectangle
+ that specifies the annotation's bounding rectangle, specified
+ in user space coordinates.
+ @exception pdErrBadAnnotation
+ @see PDAnnotSetRect
+ @see PDAnnotGetColor
+ @see PDAnnotGetDate
+ @see PDAnnotGetFlags
+ @see PDAnnotGetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDAnnotGetRect, (PDAnnot anAnnot, ASFixedRect *boxP))
+
+/**
+ Sets the size and location of an annotation on its page.
+
+ @param anAnnot IN/OUT The annotation whose location and size are
+ set.
+ @param newBox IN/OUT A pointer to a rectangle that specifies the
+ annotation's bounding rectangle, specified in user space
+ coordinates.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDAnnotGetRect
+ @see PDAnnotSetColor
+ @see PDAnnotSetDate
+ @see PDAnnotSetFlags
+ @see PDAnnotSetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDAnnotSetRect, (PDAnnot anAnnot, const ASFixedRect *newBox))
+
+/**
+ Tests whether two annotations are identical.
+ @param anAnnot The first annotation to compare.
+ @param annot2 The second annotation to compare.
+ @return <code>true</code> if the annotations are equal, <code>false</code> otherwise.
+ Two annotations are equal only if their Cos objects
+ are equal (see CosObjEqual()).
+ @exception pdErrBadAnnotation
+ @see CosObjEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDAnnotEqual, (PDAnnot anAnnot, PDAnnot annot2))
+
+/**
+ Gets a note or link annotation's color. If the annotation
+ does not specify an explicit color, a default color is returned.
+ Text annotations return <i>default yellow</i>; all others return
+ black. Only RGB color specifications are currently supported.
+
+ @param anAnnot The note or link annotation whose color
+ is obtained.
+ @param color (Filled by the method) The annotation's color,
+ which is used as follows:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Annotation</TH><TH>Use</TH></TR>
+ <TR><TD>Closed text note</TD><TD>The icon background color.</TD></TR>
+ <TR><TD>Open, un-selected text note</TD><TD>The bounding rectangle color.</TD></TR>
+ <TR><TD>Open, selected text note</TD><TD>The color of the annotation's title bar.</TD></TR>
+ <TR><TD>Link annotation</TD><TD>The link border color.</TD></TR>
+ </TABLE>
+
+ @return <code>true</code> if the annotation specifies an explicit color,
+ <code>false</code> if a default color was used.
+ @see PDAnnotSetColor
+ @see PDAnnotGetDate
+ @see PDAnnotGetFlags
+ @see PDAnnotGetRect
+ @see PDAnnotGetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDAnnotGetColor, (PDAnnot anAnnot, PDColorValue color))
+
+/**
+ Sets a note or link annotation's color. Only RGB color specifications
+ are currently supported.
+ @param anAnnot IN/OUT The note or link annotation whose color
+ is set.
+ @param color IN/OUT The annotation's color, which is used as follows:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Annotation</TH><TH>Use</TH></TR>
+ <TR><TD>Closed text note</TD><TD>The icon background color.</TD></TR>
+ <TR><TD>Open, un-selected text note</TD><TD>The bounding rectangle color.</TD></TR>
+ <TR><TD>Open, selected text note</TD><TD>The color of the annotation's title bar.</TD></TR>
+ <TR><TD>Link annotation</TD><TD>The link border color.</TD></TR>
+ </TABLE>
+
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDAnnotGetColor
+ @see PDAnnotSetDate
+ @see PDAnnotSetFlags
+ @see PDAnnotSetRect
+ @see PDAnnotSetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDAnnotSetColor, (PDAnnot anAnnot, const PDColorValue color))
+
+/**
+ Gets an annotation's label text.
+
+ @param anAnnot IN/OUT The annotation whose label is obtained.
+
+ @param buffer IN/OUT (Filled by the method) The string into which
+ the annotation's label string is copied. If the string is non-<code>NULL</code>,
+ up to <code>bufsSize</code> bytes are copied into the buffer.
+ @param bufSize IN/OUT The buffer size in bytes. Up to <code>bufSize</code> bytes
+ of the annotation label string are copied into the string
+ and an ASCII <code>NULL</code> character is appended. The caller is expected
+ to have allocated <code>bufSize + 1</code> bytes to allow for the <code>NULL</code>.
+ If <code>buffer</code> is <code>NULL</code>, it copies nothing.
+ @return If the string is non-<code>NULL</code>, it returns the number of bytes copied, not
+ counting the trailing <code>NULL</code>. If the string is <code>NULL</code>, it returns the number
+ of bytes that would be copied if the string were not <code>NULL</code>.
+ @exception pdErrBadAnnotation
+ @see PDAnnotSetTitle
+ @see PDAnnotGetColor
+ @see PDAnnotGetDate
+ @see PDAnnotGetRect
+ @see PDAnnotGetFlags
+
+ @note For Roman viewers, this text is always stored in the
+ <code>PDFDocEncoding</code>. For non-Roman character set viewers, this
+ text is stored as <code>PDFDocEncoding</code> or Unicode, depending on
+ the file's creator. Files created in a non-Roman environment
+ contain Unicode versions of these strings; in a Roman environment,
+ files contain <code>PDFDocEncoding</code> versions of these strings.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDAnnotGetTitle, (PDAnnot anAnnot, char *buffer, ASInt32 bufSize))
+
+/**
+ Sets an annotation's label text.
+
+ @param anAnnot IN/OUT The annotation whose label is set.
+ @param str IN/OUT The string containing the label to set.
+ @param nBytes IN/OUT The length of the label. The first <code>nBytes</code> bytes of <code>str</code>
+ are used as the label.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDAnnotGetTitle
+ @see PDAnnotSetColor
+ @see PDAnnotSetDate
+ @see PDAnnotSetFlags
+ @see PDAnnotSetRect
+
+ @note For Roman viewers, this text is always stored in the
+ <code>PDFDocEncoding</code>. For non-Roman character set viewers, this
+ text is stored as <code>PDFDocEncoding</code> or Unicode, depending on
+ the file's creator. Files created in a non-Roman environment
+ contain Unicode versions of these strings; in a Roman environment,
+ files contain <code>PDFDocEncoding</code> versions of these strings.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDAnnotSetTitle, (PDAnnot anAnnot, const char *str, ASInt32 nBytes))
+
+/**
+ Gets an annotation's date.
+ @param anAnnot The annotation whose date is obtained.
+
+ @param date (Filled by the method) The annotation's time
+ and date.
+ @return <code>true</code> if the annotation contains a date key and the
+ value of that key can be successfully parsed as a date string,
+ <code>false</code> otherwise.
+ @exception pdErrBadAnnotation is raised if the annotation is not valid
+ or if the value of the annotation's M (ModDate) key is not a string.
+ @exception genErrBadParm is raised if <code>date</code> is <code>NULL</code>.
+ @see PDAnnotSetDate
+ @see PDAnnotGetColor
+ @see PDAnnotGetFlags
+ @see PDAnnotGetRect
+ @see PDAnnotGetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDAnnotGetDate, (PDAnnot anAnnot, ASTimeRecP date))
+
+/**
+ Sets an annotation's date.
+ @param anAnnot IN/OUT The annotation whose date is set.
+ @param date IN/OUT The annotation's time and date.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDAnnotGetDate
+ @see PDAnnotSetColor
+ @see PDAnnotSetFlags
+ @see PDAnnotSetRect
+ @see PDAnnotSetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDAnnotSetDate, (PDAnnot anAnnot, const ASTimeRecP date))
+
+/**
+ Gets the Cos object corresponding to an annotation. This
+ method does not copy the object, but is instead the logical
+ equivalent of a type cast.
+ @param annot IN/OUT The annotation whose Cos object is obtained.
+
+ @return The dictionary Cos object for the annotation. The contents of
+ the dictionary can be enumerated using CosObjEnum(). It returns
+ a <code>NULL</code> Cos object if the annotation is not valid, as determined
+ by PDAnnotIsValid().
+ @see PDAnnotFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(CosObj, PDAnnotGetCosObj, (PDAnnot annot))
+
+/**
+ Converts a dictionary Cos object to an annotation. This
+ method does not copy the object, but is instead the logical
+ equivalent of a type cast.
+ @param obj The dictionary Cos object whose annotation
+ is obtained.
+ @return The PDAnnot corresponding to the Cos object.
+ @exception pdErrBadAnnotation is raised if the annotation is invalid,
+ as determined by PDAnnotIsValid().
+ @see PDAnnotGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDAnnot, PDAnnotFromCosObj, (CosObj obj))
+
+
+/**
+ Gets the text of a text annotation.
+
+ @param aTextAnnot The text annotation whose text is obtained.
+
+ @param buffer (Filled by the method) A buffer into which
+ the text is placed. If the text is encoded using <code>PDFDocEncoding</code>,
+ it can be converted to a platform's native encoding using
+ PDXlateToHost() or PDXlateToHostEx().
+ @param bufSize The maximum number of characters that <code>buffer</code>
+ can hold.
+ @return The number of characters written into <code>buffer</code>.
+ @see PDTextAnnotSetContents
+ @see PDXlateToPDFDocEnc
+ @see PDXlateToPDFDocEncEx
+
+ @note The contents of text annotations are encoded in <code>PDFDocEncoding</code>
+ if they are created in a Roman environment, Unicode if they are created in
+ a non-Roman environment.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDTextAnnotGetContents, (PDTextAnnot aTextAnnot, char *buffer,ASInt32 bufSize))
+
+/**
+ Sets the text of a text annotation. This method also sets the modification date of the annotation
+ to the current date and time.
+
+ @note The text must be encoded using <code>PDFDocEncoding</code> or Unicode.
+
+ @param aTextAnnot The text annotation whose text is set.
+
+ @param str A string containing the new text. The string
+ must be encoded using <code>PDFDocEncoding</code> or Unicode. The strings
+ in a platform's native encoding can be converted to <code>PDFDocEncoding</code>
+ using PDXlateToPDFDocEnc() or PDXlateToPDFDocEncEx().
+ @param nBytes The number of characters in <code>str</code>.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDTextAnnotGetContents
+ @see PDXlateToPDFDocEnc
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDTextAnnotSetContents, (PDTextAnnot aTextAnnot, const char *str,ASInt32 nBytes))
+
+/**
+ Tests whether a text annotation is open.
+
+ @note In versions later than Acrobat 4.0, this method cannot
+ always correctly determine a text annotation's open state.
+ Beginning with Acrobat 4 (PDF 1.3), text annotations (and
+ other annotations) have an associated Popup annotation which
+ maintains the open state of the popup window; the method
+ works correctly when you pass it the popup annotation itself.
+ You can use Cos-level routines to find the Popup entry in
+ the annotation dictionary, which is itself a dictionary
+ containing an Open entry.
+ @param aTextAnnot The text annotation whose open/closed
+ state is obtained.
+ @return <code>true</code> if the annotation is open, <code>false</code> otherwise.
+
+ @see PDTextAnnotSetOpen
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDTextAnnotIsOpen, (PDTextAnnot aTextAnnot))
+
+/**
+ Opens or closes a text annotation.
+
+ @note In versions later than Acrobat 4.0, this method cannot
+ always correctly set a text annotation's open state. Beginning
+ with Acrobat 4 (PDF 1.3), text annotations (and other annotations)
+ have an associated Popup annotation which maintains the
+ open state of the popup window; the method works correctly
+ when you pass it the popup annotation itself. You can use
+ Cos-level routines to find the Popup entry in the annotation
+ dictionary, which is itself a dictionary containing an Open
+ entry.
+ @param aTextAnnot The annotation to open or close.
+ @param isOpen <code>true</code> if the annotation is opened, <code>false</code>
+ if the annotation is closed.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDTextAnnotIsOpen
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDTextAnnotSetOpen, (PDTextAnnot aTextAnnot, ASBool isOpen))
+
+/**
+ Gets the border of a link annotation.
+ @param aLinkAnnot IN/OUT The link annotation whose border is obtained.
+
+ @param border IN/OUT (Filled by the method) A pointer to a structure
+ containing the link border. Link corner radii are ignored
+ by the Acrobat viewers.
+ @see PDLinkAnnotSetBorder
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDLinkAnnotGetBorder, (PDLinkAnnot aLinkAnnot, PDLinkAnnotBorder *border))
+
+/**
+ Sets a link annotation's border.
+ @param aLinkAnnot IN/OUT The link annotation whose border is set.
+
+ @param border IN/OUT A pointer to a structure containing the link
+ border. Link corner radii are ignored by the Acrobat viewers.
+
+ @exception PDAnnotDidChange
+ @exception PDAnnotWillChange
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDLinkAnnotGetBorder
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDLinkAnnotSetBorder, (PDLinkAnnot aLinkAnnot, const PDLinkAnnotBorder *border))
+
+/**
+ Sets a link annotation's action.
+ @param aLinkAnnot IN/OUT The link annotation whose action is set.
+
+ @param action IN/OUT The new action for the link annotation.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDLinkAnnotGetAction
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDLinkAnnotSetAction, (PDLinkAnnot aLinkAnnot, PDAction action))
+
+/**
+ Gets a link annotation's action. After you obtain the action,
+ you can execute it with AVDocPerformAction().
+ @param aLinkAnnot IN/OUT The link annotation whose action is obtained.
+
+ @return The link annotation's action.
+ @see AVDocPerformAction
+ @see PDLinkAnnotSetAction
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDAction, PDLinkAnnotGetAction, (PDLinkAnnot aLinkAnnot))
+
+/**
+ Gets an annotation's flags.
+ @param anAnnot IN/OUT The annotation whose flags are obtained.
+
+ @return The flags, or <code>0</code> if the annotation does not have a flags
+ key.
+ @see PDAnnotSetFlags
+ @see PDAnnotGetColor
+ @see PDAnnotGetDate
+ @see PDAnnotGetRect
+ @see PDAnnotGetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASUns32, PDAnnotGetFlags, (PDAnnot anAnnot))
+
+/**
+ Sets an annotation's flags.
+ @param anAnnot IN/OUT The annotation whose flags are set.
+ @param flags IN/OUT An <code>OR</code> of the PDAnnot Flags values.
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDAnnotGetFlags
+ @see PDAnnotSetColor
+ @see PDAnnotSetDate
+ @see PDAnnotSetRect
+ @see PDAnnotSetTitle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDAnnotSetFlags, (PDAnnot anAnnot, ASUns32 flags))
+
+
+/**
+ Adds a new bookmark to the tree containing <code>aBookmark</code>,
+ as the new right sibling.
+ @param aBookmark The bookmark that will be the left sibling
+ of the new bookmark.
+ @param initialText The new bookmark's title.
+ @return The newly created bookmark.
+ @notify PDBookmarkDidChangePosition
+ @notify PDBookmarkWasCreated
+ @see PDBookmarkAddChild
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDBookmark, PDBookmarkAddNewSibling, (PDBookmark aBookmark, char *initialText))
+
+/**
+ Adds a new bookmark to the tree containing <code>aBookmark</code>, as
+ the new last child of <code>aBookmark</code>. If <code>aBookmark</code> previously
+ had no children, it will be open after the child is added.
+
+ @param aBookmark The bookmark to which a new last child
+ is added.
+ @param initialText The new bookmark's title.
+ @return The newly created bookmark.
+ @notify PDBookmarkDidChangePosition
+ @notify PDBookmarkWasCreated
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddChild
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDBookmark, PDBookmarkAddNewChild, (PDBookmark aBookmark, char *initialText))
+
+/**
+ Adds a copy of the bookmark subtree source to <code>aBookmark</code>,
+ as a new last child of <code>aBookmark</code>. This new item will have
+ the text value <code>sourceTitle</code>, will be open, and will have
+ no destination attribute. <code>source</code> must have been previously
+ unlinked. If <code>aBookmark</code> previously had no children, it will
+ be open after the subtree is added.
+ @param aBookmark IN/OUT The bookmark to which the subtree source
+ will be added as a new last child.
+ @param source IN/OUT The bookmark subtree to add.
+ @param sourceTitle IN/OUT The new bookmark's title.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @notify PDBookmarkDidChangePosition
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddChild
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkAddSubtree, (PDBookmark aBookmark, PDBookmark source,char *sourceTitle))
+
+/**
+ Removes a bookmark subtree from the bookmark tree containing
+ it.
+ @param aBookmark IN/OUT The root bookmark of the subtree to remove.
+
+ @notify PDBookmarkWillDestroy
+ @notify PDBookmarkDidDestroy
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkFromCosObj
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkDestroy, (PDBookmark aBookmark))
+
+/**
+ Gets the first bookmark whose title is <code>aName</code>.
+
+ @param aBookmark IN/OUT The root of the bookmark subtree to search.
+ @param aname IN/OUT The text value to search for. Character codes
+ in <code>aName</code> are interpreted using the <code>PDFDocEncoding</code>.
+ @param nameLen IN/OUT The length of <code>aName</code>.
+ @param maxdepth IN/OUT The number of subtree levels to search,
+ not counting the root level:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>0</code></TD><TD>Only look at <code>aBookmark</code>, not at any of its children.</TD></TR>
+ <TR><TD><code>1</code></TD><TD>Check <code>aBookmark</code> and its children, but not any grandchildren or great grandchildren, and so on.</TD></TR>
+ <TR><TD><code>-1</code></TD><TD>Check the entire subtree.</TD></TR>
+ </TABLE>
+
+ @return The bookmark with the specified title, or a <code>NULL</code> Cos object
+ if there is no such bookmark.
+
+ @note For Roman viewers, this text is always stored in the
+ <code>PDFDocEncoding</code>. For non-Roman character set viewers, this
+ text is stored as <code>PDFDocEncoding</code> or Unicode, depending on
+ the file's creator. Files created in a non-Roman environment
+ contain Unicode versions of these strings; in a Roman environment,
+ files contain <code>PDFDocEncoding</code> versions of these strings.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDBookmarkGetByTitle, (PDBookmark aBookmark, char *aname,ASInt32 nameLen,ASInt32 maxdepth))
+
+/**
+ Gets the number of open bookmarks in a subtree.
+ @param aBookmark The root bookmark of a subtree to count.
+ @return The number of open bookmarks in the subtree (not including <code>aBookmark</code>).
+
+ @see PDBookmarkGetIndent
+ @see PDBookmarkHasChildren
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDBookmarkGetCount, (PDBookmark aBookmark))
+
+/**
+ Adds <code>newPrev</code> as the new left sibling to <code>aBookmark</code>, adjusting
+ the tree containing <code>aBookmark</code> appropriately.
+ @param aBookmark The bookmark that will receive a new
+ left sibling <code>newPrev</code>.
+ @param newPrev The bookmark to become the new left sibling
+ of <code>aBookmark</code>. <code>newPrev</code> must have been previously unlinked.
+ @notify PDBookmarkDidChangePosition
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddChild
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkAddPrev, (PDBookmark aBookmark, PDBookmark newPrev))
+
+/**
+ Adds <code>newNext</code> as the new right sibling to <code>aBookmark</code>.
+ @param aBookmark IN/OUT The bookmark that will receive a new right
+ sibling.
+ @param newNext IN/OUT The bookmark to become the new right sibling
+ of <code>aBookmark</code>. <code>newNext</code> must have been previously unlinked.
+
+ @notify PDBookmarkDidChangePosition
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddChild
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkAddNext, (PDBookmark aBookmark, PDBookmark newNext))
+
+/**
+ Adds <code>aBookmark</code> as the last child of <code>parent</code>, adjusting the
+ tree containing <code>parent</code> appropriately. If <code>parent</code> previously
+ had no children, it is open after the child is added.
+ @param parent The parent of the bookmark being added.
+
+ @param aBookmark The bookmark that will become the last
+ child of <code>aBookmark</code>. <code>aBookmark</code> must have been previously
+ unlinked.
+ @notify PDBookmarkDidChangePosition
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddNext
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkAddChild, (PDBookmark parent, PDBookmark aBookmark))
+
+/**
+ Unlinks a bookmark from the bookmark tree that contains
+ it, and adjusts the tree appropriately.
+ @param aBookmark IN/OUT The bookmark to unlink.
+ @see PDBookmarkDestroy
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkUnlink, (PDBookmark aBookmark))
+
+/**
+ Tests whether a bookmark is valid. This is intended only
+ to ensure that the bookmark has not been deleted, not to
+ ensure that all necessary information is present and valid.
+
+ @param aBookmark The bookmark whose validity is tested.
+ @return <code>true</code> if the bookmark is valid, <code>false</code> otherwise.
+
+ @see PDBookmarkEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDBookmarkIsValid, (PDBookmark aBookmark))
+
+/**
+ Gets a bookmark's parent bookmark.
+ @param aBookmark The bookmark whose parent is obtained.
+ @return The parent bookmark of <code>aBookmark</code>, or a <code>NULL</code> Cos object if <code>aBookmark</code>
+ is the root of its tree.
+ @see PDBookmarkGetFirstChild
+ @see PDBookmarkGetLastChild
+ @see PDBookmarkGetNext
+ @see PDBookmarkGetPrev
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDBookmarkGetParent, (PDBookmark aBookmark))
+
+/**
+ Gets a bookmark's first child.
+ @param aBookmark IN/OUT The bookmark whose first child is obtained.
+
+ @return The first child of <code>aBookmark</code>, or a <code>NULL</code> Cos object if <code>aBookmark</code>
+ has no children.
+ @see PDBookmarkGetParent
+ @see PDBookmarkGetLastChild
+ @see PDBookmarkHasChildren
+ @see PDBookmarkGetNext
+ @see PDBookmarkGetPrev
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDBookmarkGetFirstChild, (PDBookmark aBookmark))
+
+/**
+ Gets a bookmark's last child.
+ @param aBookmark IN/OUT The bookmark whose last child is obtained.
+
+ @return The last child of <code>aBookmark</code>, or a <code>NULL</code> Cos object if <code>aBookmark</code>
+ has no children.
+ @see PDBookmarkGetParent
+ @see PDBookmarkGetFirstChild
+ @see PDBookmarkGetNext
+ @see PDBookmarkGetPrev
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDBookmarkGetLastChild, (PDBookmark aBookmark))
+
+/**
+ Gets a bookmark's next (right) sibling.
+ @param aBookmark The bookmark whose right sibling is obtained.
+ @return The <code>aBookmark</code> object's next (right) sibling. It returns a <code>NULL</code> Cos object
+ if <code>aBookmark</code> has no next sibling (that is, it is its parent's
+ last child).
+ @see PDBookmarkGetParent
+ @see PDBookmarkGetFirstChild
+ @see PDBookmarkGetLastChild
+ @see PDBookmarkGetPrev
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDBookmarkGetNext, (PDBookmark aBookmark))
+
+/**
+ Returns a bookmark's previous (left) sibling.
+ @param aBookmark IN/OUT The bookmark whose left sibling is obtained.
+
+ @return Previous (left) sibling of <code>aBookmark</code>, or a <code>NULL</code> Cos object
+ if <code>aBookmark</code> has no previous sibling (it is its parent's
+ first child).
+ @see PDBookmarkGetParent
+ @see PDBookmarkGetFirstChild
+ @see PDBookmarkGetLastChild
+ @see PDBookmarkGetNext
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDBookmarkGetPrev, (PDBookmark aBookmark))
+
+/**
+ Returns the indentation level of a bookmark in its containing
+ tree.
+ @param aBookmark IN/OUT The bookmark whose indentation level is
+ obtained.
+ @return The indentation level of <code>aBookmark</code> in its containing tree.
+ The root and its direct children have an indentation level of zero.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDBookmarkGetIndent, (PDBookmark aBookmark))
+
+/**
+ Gets a bookmark's title.
+
+ @param aBookmark The bookmark whose title is obtained.
+
+ @param buffer (Filled by the method) The buffer into which
+ the title will be written. If <code>buffer</code> is non-<code>NULL</code>, its length
+ is assumed to be <code>bufSize + 1</code>, because a <code>NULL</code> byte is appended
+ to the title. The returned text remains valid only until the
+ next PDModel method call. The text may be converted to a
+ platform's native encoding using PDXlateToHost() or PDXlateToHostEx().
+
+ @param bufSize The size of the buffer.
+ @return The number of bytes copied into <code>buffer</code>, not counting the
+ trailing <code>NULL</code> byte. If <code>buffer</code> is <code>NULL</code>, the number of bytes
+ in the bookmark is returned.
+ @see PDBookmarkSetTitle
+ @see PDXlateToHost
+ @see PDXlateToHostEx
+
+ @note For Roman viewers, this title text is always stored
+ in <code>PDFDocEncoding</code>. For non-Roman character set viewers,
+ this text is stored as <code>PDFDocEncoding</code> or Unicode, depending
+ on the file's creator. Files created in a non-Roman environment
+ contain Unicode versions of these strings; in a Roman environment,
+ files contain <code>PDFDocEncoding</code> versions of these strings.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDBookmarkGetTitle, (PDBookmark aBookmark, char *buffer,ASInt32 bufSize))
+
+/**
+ Sets a bookmark's title.
+
+ @param aBookmark The bookmark whose title is set.
+ @param str A read-only string containing the bookmark's
+ new title. The text must be encoded using <code>PDFDocEncoding</code>.
+ Strings encoded using a platform's native encoding can be
+ converted to <code>PDFDocEncoding</code> using PDXlateToPDFDocEnc() or
+ PDXlateToPDFDocEncEx().
+ @param nBytes The number of bytes of <code>str</code> to copy.
+ @exception pdErrBookmarksError is raised if there is an error setting
+ the title.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @see PDBookmarkGetTitle
+
+ @note For Roman viewers, this title text is always stored
+ in the <code>PDFDocEncoding</code>. For non-Roman character set viewers,
+ this text is stored as <code>PDFDocEncoding</code> or Unicode, depending
+ on the file's creator. Files created in a non-Roman environment
+ contain Unicode versions of these strings; in a Roman environment,
+ files contain <code>PDFDocEncoding</code> versions of these strings.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkSetTitle, (PDBookmark aBookmark, const char *str, ASInt32 nBytes))
+
+/**
+ Tests whether a bookmark has children.
+ @param aBookmark The bookmark to test.
+ @return <code>true</code> if <code>aBookmark</code> has any children, <code>false</code> otherwise.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDBookmarkHasChildren, (PDBookmark aBookmark))
+
+/**
+ Tests whether a bookmark is open. An open bookmark shows
+ all its children.
+ @param aBookmark The bookmark to test.
+ @return <code>true</code> if the bookmark is open, <code>false</code> otherwise.
+ @see PDBookmarkSetOpen
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDBookmarkIsOpen, (PDBookmark aBookmark))
+
+/**
+ Opens or closes a bookmark. An open bookmark shows its children,
+ while a closed bookmark does not.
+ @param aBookmark IN/OUT The bookmark to open or close.
+ @param isOpen IN/OUT <code>true</code> if the bookmark is opened, <code>false</code> if
+ the bookmark is closed.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @see PDBookmarkIsOpen
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDBookmarkSetOpen, (PDBookmark aBookmark, ASBool isOpen))
+
+/**
+ Gets a bookmark's action. After you obtain the action, you
+ can execute it with AVDocPerformAction().
+ @param aBookmark IN/OUT The bookmark whose action is obtained.
+
+ @return The bookmark's action.
+ @see AVDocPerformAction
+ @see PDBookmarkSetAction
+ @see PDLinkAnnotGetAction
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDAction, PDBookmarkGetAction, (PDBookmark aBookmark))
+
+/**
+ Sets a bookmark's action.
+ @param aBookmark IN/OUT The bookmark whose action is set.
+ @param action IN/OUT The bookmark's action.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @see PDBookmarkGetAction
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkSetAction, (PDBookmark aBookmark, PDAction action))
+
+/**
+ Tests whether two bookmarks are equal. Two bookmarks are
+ equal only if their Cos objects are equal (see CosObjEqual()).
+
+ @param aBookmark The first bookmark to compare.
+ @param bookmark2 The second bookmark to compare.
+ @return <code>true</code> if the bookmarks are equal, <code>false</code> otherwise.
+
+ @see CosObjEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDBookmarkEqual, (PDBookmark aBookmark, PDBookmark bookmark2))
+
+/**
+ Gets the Cos object for a bookmark. This method does not
+ copy the object, but is instead the logical equivalent of
+ a type cast.
+ @param aBookmark IN/OUT The bookmark whose Cos object is obtained.
+
+ @return The dictionary Cos object for the bookmark. The contents of
+ the dictionary can be enumerated using CosObjEnum().
+ @see PDBookmarkFromCosObj
+ @see CosObjEnum
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(CosObj, PDBookmarkGetCosObj, (PDBookmark aBookmark))
+
+/**
+ Converts a Cos dictionary object to a bookmark and checks
+ the validity of the bookmark. This method does not copy
+ the object, but is instead the logical equivalent of a type
+ cast.
+ @param obj The dictionary Cos object whose bookmark is
+ obtained.
+ @return The bookmark corresponding to the Cos object.
+ @exception pdErrBadBookmark is raised if the bookmark is not valid as
+ determined by PDBookmarkIsValid().
+ @see PDBookmarkGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDBookmarkFromCosObj, (CosObj obj))
+
+
+/**
+ Enumerates the PDDoc objects that are currently open, calling a
+ user-supplied procedure for each open document.
+ @param proc IN/OUT A user-supplied callback to call for each open
+ PDDoc. Enumeration halts if <code>proc</code> returns <code>false</code>.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see AVAppEnumDocs
+ @see PDDocOpen
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDEnumDocs, (PDDocEnumProc proc, void *clientData))
+
+/**
+ Opens the specified document. If the document is already
+ open, it returns a reference to the already opened PDDoc. You
+ must call PDDocClose() once for every successful open. If
+ the call fails and the exception is pdErrNeedRebuild, then
+ call again with <code>doRepair</code> set to <code>true</code>. This allows the application
+ to decide whether to perform the time-consuming repair operation.
+
+ @param fileName A path name to the file, specified in whatever
+ format is correct for <code>fileSys</code>.
+ @param fileSys A pointer to an ASFileSysRec containing the
+ file system in which the file resides. If it is <code>NULL</code>, it uses the
+ default file system.
+ @param authProc An authorization callback, called only if
+ the file has been secured (that is, if the file has either
+ the user or the master password set). This callback should
+ obtain whatever information is needed to determine whether
+ the user is authorized to open the file, then call PDDocPermRequest().
+ The Acrobat viewer's built-in authorization procedure
+ requires the user to enter a password, and allows the user
+ to try three times before giving up. If the <code>authProc</code> requires
+ data, use PDDocOpenEx() instead of PDDocOpen().
+ @param doRepair If <code>true</code>, attempt to repair the file if
+ it is damaged. If <code>false</code>, do not attempt to repair the file
+ if it is damaged.
+ @return The newly-opened document.
+ @exception pdErrNeedPassword or other errors are raised if the file is encrypted and <code>authProc</code>
+ is <code>NULL</code> or returns <code>false</code>.
+ @exception pdErrNotEnoughMemoryToOpenDoc or genErrNoMemory is raised if
+ there is insufficient memory to open the document.
+ @exception pdErrNeedRebuild is raised if the document needs to be rebuilt
+ and <code>doRepair</code> is <code>false</code>.
+ @exception pdErrBadOutlineObj is raised if the Outlines object appears
+ to be invalid (if the value of the Outlines key in the Catalog is not a <code>NULL</code> or dictionary
+ object).
+ @exception pdErrBadRootObj is raised if the Catalog object (as returned
+ by CosDocGetRoot()) is not a dictionary.
+ @exception pdErrBadBaseObj is raised if the Pages tree appears to be invalid
+ (if the value of the Pages key in the Catalog is not a <code>NULL</code> or dictionary object).
+ @exception pdErrTooManyPagesForOpen is raised if the document contains
+ too many pages.
+ @exception cosSynErrNoHeader is raised if the document's header appears
+ to be bad.
+ @exception cosSynErrNoStartXRef is raised if no end-of-file line can be
+ located.
+ @exception cosErrRebuildFailed is raised if <code>doRepair</code> is <code>true</code> and rebuild
+ failed.
+ @see PDDocClose
+ @see PDDocCreate
+ @see PDDocPermRequest
+ @see PDDocOpenEx
+ @see PDDocOpenFromASFile
+ @see PDDocOpenFromASFileEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDDoc, PDDocOpen, (ASPathName fileName, ASFileSys fileSys,PDAuthProc authProc, ASBool doRepair))
+
+/**
+ Gets the value of the OpenAction key in the Catalog dictionary,
+ which is the action performed when the document is opened.
+ After you obtain the action, you can execute it with AVDocPerformAction().
+
+ @param doc IN/OUT The document whose open action is obtained.
+
+ @return The document's open action. It is invalid if there is no OpenAction
+ key in the Catalog dictionary (this can be tested with PDActionIsValid()).
+
+ @see AVDocPerformAction
+ @see PDDocSetOpenAction
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDAction, PDDocGetOpenAction, (PDDoc doc))
+
+/**
+ Sets the value of the OpenAction key in the Catalog dictionary,
+ which is the action performed when the document is opened.
+
+ @param doc The document whose open action is set.
+ @param action The open action you want to set.
+ @see PDDocGetOpenAction
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocSetOpenAction, (PDDoc doc, PDAction action))
+
+/**
+ Creates a new document. The only Cos object in the document
+ will be a Catalog. See Section 3.6 in the <i>PDF Reference</i>.
+ After the document is created, at least one page must be
+ added using PDDocCreatePage() or PDDocInsertPages() before the
+ Acrobat viewer can display or save the document.
+
+ <p>When you are done with the document, you must call PDDocClose()
+ to release the resources used by the PDDoc; do not call
+ PDDocRelease(). </p>
+
+ @return The newly created document.
+ @see PDDocClose
+ @see PDDocOpen
+ @see PDDocSave
+ @see PDDocCreatePage
+ @see PDDocInsertPages
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDDoc, PDDocCreate, (void))
+
+/**
+ Saves a document to disk. If a full save is requested to
+ the original path, the file is saved to a file system-determined
+ temporary file, the old file is deleted, and the temporary
+ file is renamed to <code>newPath</code>. You must call PDDocClose() to
+ release resources; do not call PDDocRelease().
+
+ <p>If the document was created with PDDocCreate(), at least one
+ page must be added using PDDocCreatePage() or PDDocInsertPages()
+ before Acrobat can save the document. </p>
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+
+ <p>A full save with linearization optimizes the PDF file. During
+ optimization, all objects in a PDF file are rearranged,
+ many of them acquiring not only a new file position, but
+ also a new Cos object number. At the end of the save operation,
+ Acrobat flushes its information of the PD layer and below
+ to synchronize its in-memory state with the new disk file
+ just written. </p>
+
+ <p>It is crucial that all objects that have been acquired from
+ a PDDoc be released before Acrobat attempts to flush its
+ in-memory state. This includes any object that was acquired
+ with a <code>PD*Acquire</code> method, such as PDDocAcquirePage() or PDBeadAcquirePage().
+ Failing to release these objects before the full save results
+ in a save error, and the resulting PDF file is not valid.
+ In addition, all PD level objects and Cos objects derived
+ from the PDDoc are no longer valid after the full save.
+ Attempting to use these objects after a full save produces
+ undefined results. </p>
+
+ <p>Clients and applications should register for the PDDocWillSaveEx()
+ and PDDocDidSave() notifications so that they can clean up
+ appropriately. See these notifications for more information
+ on releasing and reacquiring objects from the PDDoc. </p>
+ @ingroup ReplaceableMethods
+ @param doc The document to save.
+ @param saveFlags A bit field composed of an <code>OR</code> of the
+ PDSaveFlags values.
+ @param newPath The path to which the file is saved. A
+ path must be specified when either PDSaveFull or PDSaveCopy
+ are used for saveFlags. If PDSaveIncremental is specified
+ in saveFlags, then <code>newPath</code> should be <code>NULL</code>. If PDSaveFull
+ is specified and <code>newPath</code> is the same as the file's original
+ path, the new file is saved to a file system-determined
+ temporary path, then the old file is deleted and the new
+ file is renamed to <code>newPath</code>.
+ @param fileSys The file system. If it is <code>NULL</code>, uses the <code>fileSys</code>
+ of the document's current backing file. Files can only be
+ saved to the same file system. <code>fileSys</code> must be either <code>NULL</code>
+ or the default file system obtained with ASGetDefaultFileSys(),
+ otherwise an error is raised.
+ @param progMon A progress monitor. Use AVAppGetDocProgressMonitor()
+ to obtain the default. <code>NULL</code> may be passed, in which case
+ no progress monitor is used.
+ @param progMonClientData A pointer to user-supplied data
+ to pass to <code>progMon</code> each time it is called. It should be <code>NULL</code>
+ if <code>progMon</code> is <code>NULL</code>.
+ @exception pdErrAfterSave is raised if the save was completed successfully,
+ but there were problems cleaning up afterwards. The document is no longer
+ consistent and cannot be changed. It must be closed and reopened.
+ @exception pdErrOpNotPermitted is raised if saving is not permitted. Saving
+ is permitted if either <code>edit</code> or <code>editNotes</code> (see PDPerms) is allowed, or you are doing
+ a full save and saveAs is allowed.
+ @exception pdErrAlreadyOpen is raised if PDSaveFull is used, and the file
+ specified by <code>newPath</code> is already open.
+ @notify PDDocWillSave
+ @notify PDDocDidSave
+ @see PDDocClose
+ @see PDDocSaveWithParams
+ @note Not replaceable in Adobe Reader.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UPROC(void, PDDocSave, (PDDoc doc, PDSaveFlags saveFlags, ASPathName newPath, ASFileSys fileSys, ProgressMonitor progMon, void *progMonClientData))
+
+/**
+ Closes a document and releases its resources. If <code>doc</code> is
+ <code>NULL</code>, it does nothing. Changes are not saved. You must use
+ PDDocSave() to save any modifications before calling PDDocClose().
+
+ <p>If the document has been modified but you wish to mark it
+ as clean, use PDDocClearFlags(). </p>
+ @param doc The document to close.
+ @exception pdErrUnableToCloseDueToRefs is raised if there are any outstanding
+ references to objects in the document, and the document will still be
+ valid (its resources will not be released).
+ @exception genErrBadUnlock is raised if the document's open count is less
+ than one.
+ @see PDDocSave
+ @see PDDocOpen
+ @see PDDocCreate
+ @see PDDocClearFlags
+ @see PDDocSetFlags
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocClose, (PDDoc doc))
+
+/**
+ Increments a document's reference count. The document will
+ not be closed until the reference count is zero, or the
+ application terminates.
+ @param doc IN/OUT The document whose reference count is incremented.
+
+ @see PDDocRelease
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocAcquire, (PDDoc doc))
+
+/**
+ Decrements a document's reference count. The document will
+ not be closed until the reference count is zero, or the
+ application terminates.
+ @param doc IN/OUT The document whose reference count is decremented.
+
+ @exception genErrBadParm
+ @see PDDocAcquire
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocRelease, (PDDoc doc))
+
+
+/**
+ Gets information about the document's file and its state.
+
+ @param doc IN/OUT The document whose flags are obtained.
+ @return Flags field, containing an <code>OR</code> of the PDDocFlags values.
+
+ @see PDDocSetFlags
+ @see PDDocClearFlags
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDDocGetFlags, (PDDoc doc))
+
+/**
+ Sets information about the document's file and its state.
+ This method can only be used to set, not clear, flags. As
+ a result, it is not possible, for example, to use this method
+ to clear the flag that indicates that a document has been
+ modified and needs to be saved. Instead, use PDDocClearFlags()
+ to clear flags.
+ @param doc IN/OUT The document whose flags are set.
+ @param flags IN/OUT A bit field composed of an <code>OR</code> of the PDDocFlags
+ values.
+ @see PDDocGetFlags
+ @see PDDocClearFlags
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocSetFlags, (PDDoc doc, ASInt32 flags))
+
+/**
+ Gets the value of the PageMode key in the Catalog dictionary.
+
+ @note PDDocGetFullScreen should be used when the page mode
+ is set to full screen.
+ @param doc IN/OUT The document whose page mode is obtained.
+ @return Page mode value from PDF Catalog dictionary.
+ @see PDDocSetPageMode
+ @see AVDocSetViewMode
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDPageMode, PDDocGetPageMode, (PDDoc doc))
+
+/**
+ Sets the value of the PageMode key in the Catalog dictionary.
+
+ @param doc IN/OUT The document whose page mode is set.
+ @param mode IN/OUT The page mode to set.
+ @see PDDocGetPageMode
+ @see AVDocSetViewMode
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocSetPageMode, (PDDoc doc, PDPageMode mode))
+
+/**
+ Gets a document's Cos-level document object.
+ @param doc The document whose CosDoc is obtained.
+ @return The document's CosDoc.
+ @see CosObjGetDoc
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(CosDoc, PDDocGetCosDoc, (PDDoc doc))
+
+/**
+ Gets the file object for a document.
+ @param doc The document whose ASFile is obtained.
+ @return The document's ASFile.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASFile, PDDocGetFile, (PDDoc doc))
+
+/**
+ Gets an element of a document's file identifier. See Section
+ 10.3 in the <i>PDF Reference</i> for a description of file IDs.
+
+ @param doc The document whose file ID is obtained.
+ @param nElemNum The element number to get from the document's
+ file ID. It must be one of the following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>0</code></TD><TD>The permanent ID.</TD></TR>
+ <TR><TD><code>1</code></TD><TD>The permanent ID.</TD></TR>
+ </TABLE>
+
+ @param buffer (Filled by the method) If <code>buffer</code> is non-<code>NULL</code>,
+ then up to <code>bufferSize</code> bytes of the ID will be written
+ to the buffer.
+ @param bufferSize The length of <code>buffer</code> in bytes.
+ @return The number of bytes in the ID element.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDDocGetID, (PDDoc doc, ASInt32 nElemNum, ASUns8 *buffer, ASInt32 bufferSize))
+
+/**
+ Gets the major and minor PDF document versions. This is
+ the PDF version of the document, which is specified in the
+ header of a PDF file in the string <code>"%PDF-xx. yy"</code> where <code>xx</code>
+ is the major version and <code>yy</code> is the minor version. For example,
+ version 1.2 has the string <code>"%PDF<code>-1</code>.2"</code>. See Section H.1
+ in the <i>PDF Reference</i>.
+ @param doc IN/OUT The document whose version is obtained.
+ @param majorP IN/OUT (Filled by the method) The major version
+ number.
+ @param minorP IN/OUT (Filled by the method) The minor version
+ number.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocGetVersion, (PDDoc doc, ASInt16 *majorP, ASInt16 *minorP))
+
+/**
+ Gets the root of the document's bookmark tree. The return
+ value is valid even if the document's bookmark tree is empty
+ (meaning that there is no Outlines key in the underlying
+ PDF file).
+ @param pdDoc IN/OUT Document whose root bookmark is obtained.
+
+ @return The document's root bookmark.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBookmark, PDDocGetBookmarkRoot, (PDDoc pdDoc))
+
+/**
+ Gets the number of pages in a document.
+ @param doc IN/OUT The document for which the number of pages is
+ obtained.
+ @return The number of pages in the document. Remember to subtract
+ <code>1</code> from this value if you are going to pass it to a PD-
+ level method that takes a zero-based page number.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDDocGetNumPages, (PDDoc doc))
+
+
+/**
+ Gets a PDPage from a document. It increments the page's reference
+ count. After you are done using the page, release it using
+ PDPageRelease(). If PDPageRelease() is not called, it could block
+ the document containing the page from being closed. To avoid such
+ problems, use the <code>CSmartPDPage</code> class, as it ensures that the page is
+ released as it goes out of scope.
+ @param doc The document containing the page to acquire.
+
+ @param pageNum The page number of the page to acquire.
+ The first page is <code>0</code>.
+ @return The acquired page.
+ @exception genErrBadParm
+ @see CSmartPDPage
+ @see PDPageRelease
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDPage, PDDocAcquirePage, (PDDoc doc, ASInt32 pageNum))
+
+/**
+ Creates and acquires a new page. The page is inserted into
+ the document at the specified location. Call PDPageRelease()
+ when you are done using the page.
+ @param doc The document in which the page is created.
+
+ @param afterPageNum The page number after which the new
+ page is inserted. The first page is <code>0</code>. Use PDBeforeFirstPage()
+ (see PDExpT.h) to insert the new page at the beginning of
+ a document.
+ @param mediaBox A rectangle specifying the page's media
+ box, specified in user space coordinates.
+ @return The newly created page.
+ @notify PDDocWillInsertPages
+ @notify PDDocDidInsertPages
+ @notify PDDocDidChangePages
+ @notify PDDocDidChangeThumbs
+ @see PDPageRelease
+ @see PDDocDeletePages
+ @see PDDocInsertPages
+ @see PDDocReplacePages
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDPage, PDDocCreatePage, (PDDoc doc, ASInt32 afterPageNum, ASFixedRect mediaBox))
+
+/**
+ Deletes the specified pages.
+ @param doc The document from which pages are deleted.
+
+ @param firstPage The page number of the first page to
+ delete. The first page is <code>0</code>.
+ @param lastPage The page number of the last page to delete.
+
+ @param progMon A progress monitor. Use AVAppGetDocProgressMonitor()
+ to obtain the default progress monitor. <code>NULL</code> may be passed,
+ in which case no progress monitor is used.
+ @param progMonClientData A pointer to user-supplied data
+ passed to <code>progMon</code> each time it is called. It should be <code>NULL</code> if
+ progMon is <code>NULL</code>.
+ @notify PDDocWillChangePages
+ @notify PDDocWillDeletePages
+ @notify PDDocDidDeletePages
+ @notify PDDocDidChangePages
+ @see PDDocInsertPages
+ @see PDDocReplacePages
+ @see PDDocMovePage
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocDeletePages, (PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void *progMonClientData))
+
+/**
+ Moves one page in a document.
+ @param doc The document in which the page is moved.
+ @param moveToAfterThisPage The new location of the page
+ to move. The first page is <code>0</code>. It may either be a page number,
+ or the constant PDBeforeFirstPage (see PDExpT.h).
+ @param pageToMove The page number of the page to move.
+ @exception genErrBadParm is raised if <code>moveAfterThisPage</code> or <code>pageToMove</code>
+ is invalid. Other exceptions may be raised as well.
+ @notify PDDocWillMovePages
+ @notify PDDocDidMovePages
+ @notify PDDocDidChangePages
+ @notify PDDocWillChangePages
+ @see PDDocInsertPages
+ @see PDDocReplacePages
+ @see PDDocDeletePages
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+XNPROC(void, PDDocMovePage, (PDDoc doc, ASInt32 moveToAfterThisPage, ASInt32 pageToMove))
+
+/**
+ Inserts <code>numPages</code> pages from <code>doc2</code> into <code>doc</code>. All annotations,
+ and anything else associated with the page (such as a thumbnail
+ image) are copied from the <code>doc2</code> pages to the new pages in
+ <code>doc</code>. This method does not insert pages if <code>doc</code> equals <code>doc2</code>.
+
+ <p>The <code>insertFlags</code> parameter controls whether bookmarks and threads are
+ inserted along with the specified pages. Setting The PDInsertAll
+ flag has two effects:</p>
+
+ <ul>
+ <li>The parameters indicating which pages to insert are
+ ignored: all the pages of <code>doc2</code> are inserted.</li>
+ <li><p>In addition to inserting the pages themselves,
+ it also merges other document data from <code>doc2</code> into <code>doc</code>:</p>
+ <ul>
+ <li>Named destinations from <code>doc2</code> (of PDF 1.1 and later) are
+ copied into <code>doc</code>. If there are named destinations in <code>doc2</code>
+ with the same name as some named destination in <code>doc</code>, the
+ ones in <code>doc</code> retain their names and the copied named destinations
+ are given new names based on the old ones, with distinguishing
+ digits added. Actions and bookmarks referring to the old
+ names are made to refer to the new names after being copied
+ into <code>doc</code>.</li>
+ <li>If it is also the case that <code>mergeAfterThisPage</code> denotes the
+ last page of the document, then document metadata is merged, and
+ the optional content properties are merged in a more symmetrical
+ manner than would otherwise be the case.</li>
+ </ul>
+ </li>
+ </ul>
+
+ <p>Document logical structure from <code>doc2</code> is copied into <code>doc</code>.
+ If less than the whole of <code>doc2</code> is being inserted, only those
+ structure elements having content on the copied pages, and
+ the ancestors of those elements, are copied into the
+ logical structure tree of <code>doc</code>.
+ The top-level children of the structure tree root of <code>doc2</code>
+ are copied as new top-level children of the structure tree
+ root of <code>doc</code>; a structure tree root is created in <code>doc</code> if
+ there was none before. The role maps of the two structure
+ trees are merged, with name conflicts resolved in favor
+ of the role mappings present in <code>doc</code>. Attribute objects
+ having scalar values, or values that are arrays of scalar values, are
+ copied. Class map information from <code>doc2</code> is also merged
+ into that for <code>doc</code>. </p>
+ @param doc The document into which pages are inserted.
+ This document must have at least one page.
+ @param mergeAfterThisPage The page number in <code>doc</code> after
+ which pages from <code>doc2</code> are inserted. The first page is <code>0</code>.
+ If PDBeforeFirstPage (see PDExpT.h) is used, the pages are
+ inserted before the first page in <code>doc</code>. Use PDLastPage to
+ insert pages after the last page in <code>doc</code>.
+ @param doc2 The document containing the pages that are
+ inserted into <code>doc</code>.
+ @param startPage The page number of the first page in
+ <code>doc2</code> to insert into <code>doc</code>. The first page is <code>0</code>.
+ @param numPages The number of pages in <code>doc2</code> to insert
+ into <code>doc</code>. Use PDAllPages to insert all pages from <code>doc2</code> into
+ <code>doc</code>.
+ @param insertFlags Flags that determine what additional
+ information is copied from <code>doc2</code> into <code>doc</code>. It is an <code>OR</code> of the following
+ constants (see PDExpT.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Constant</TH><TH>Description</TH></TR>
+ <TR><TD>PDInsertBookmarks</TD><TD>Inserts bookmarks as well as pages.
+ The bookmark tree of <code>doc2</code> is merged into the bookmark
+ tree of <code>doc</code> by copying it as a new first-level subtree of the
+ <code>doc</code> parameter's bookmark tree root, of which it becomes the last child.
+ If <code>doc</code> has no bookmark tree, it acquires one identical to
+ the bookmark tree from <code>doc2</code>.</TD></TR>
+ <TR><TD>PDInsertThreads</TD><TD>Inserts threads as well as pages.</TD></TR>
+ <TR><TD>PDInsertAll</TD><TD>Inserts document data from pages.</TD></TR>
+ </TABLE>
+
+ @param progMon A progress monitor. Use AVAppGetDocProgressMonitor()
+ to obtain the default progress monitor. <code>NULL</code> may be passed,
+ in which case no progress monitor is used.
+ @param progMonClientData A pointer to user-supplied data
+ to pass to <code>progMon</code> each time it is called. It should be <code>NULL</code>
+ if <code>progMon</code> is <code>NULL</code>.
+ @param cancelProc A cancel procedure. Use AVAppGetCancelProc()
+ to obtain the current cancel procedure. It may be <code>NULL</code>, in
+ which case no cancel proc is used.
+ @param cancelProcClientData A pointer to user-supplied data
+ to pass to <code>cancelProc</code> each time it is called. It should be
+ <code>NULL</code> if <code>cancelProc</code> is <code>NULL</code>.
+ @exception pdErrOpNotPermitted is raised unless <code>doc</code> is editable and <code>doc2</code>
+ is not encrypted or the owner opened it.
+ @exception pdErrCantUseNewVersion is raised if <code>doc2</code> is a newer major version
+ than the Acrobat viewer understands.
+ @exception pdErrTooManyPagesForInsert is raised if the insertion would
+ result in a document with too many pages.
+ @exception genErrBadParm is raised if <code>mergeAfterThisPage</code> is an invalid
+ page number or <code>doc</code> has no pages.
+ @exception genErrNoMemory is raised if there is insufficient memory to
+ perform the insertion.
+ @exception pdErrWhileRecoverInsertPages is raised if an error occurs while
+ trying to recover from an error during inserting.
+ @notify PDDocWillInsertPages
+ @notify PDDocDidInsertPages
+ @notify PDDocDidChangePages
+ @notify PDDocPrintingTiledPage
+ @notify PDDocDidChangeThumbs
+ @notify PDDocDidAddThread
+ @see AVAppGetCancelProc
+ @see AVAppGetDocProgressMonitor
+ @see PDDocCreatePage
+ @see PDDocDeletePages
+ @see PDDocMovePage
+ @see PDDocReplacePages
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+
+XNPROC(void, PDDocInsertPages, (PDDoc doc, ASInt32 mergeAfterThisPage, PDDoc doc2, ASInt32 startPage, ASInt32 numPages, ASUns16 insertFlags, ProgressMonitor
+ progMon, void *progMonClientData, CancelProc cancelProc, void *cancelProcClientData))
+
+/**
+ Replaces the specified range of pages in one document with
+ pages from another. The contents, resources, size and rotation
+ of the pages are replaced. The bookmarks are not copied, because
+ they are attached to the document, not to individual pages.
+
+ @param doc The document in which pages are replaced.
+ @param startPage The first page number in <code>doc</code> to replace.
+ The first page is <code>0</code>.
+ @param doc2 The document from which pages are copied into
+ <code>doc</code>.
+ @param startPageDoc2 The page number of the first page
+ in <code>doc2</code> to copy. The first page is <code>0</code>.
+ @param numPages The number of pages to replace.
+ @param mergeTextAnnots If <code>true</code>, text annotations from
+ <code>doc2</code> are appended if they are different than all existing
+ annotations on the page in <code>doc</code>. No other types of annotations
+ are copied.
+ @param progMon A progress monitor. Use AVAppGetDocProgressMonitor()
+ to obtain the default progress monitor. <code>NULL</code> may be passed,
+ in which case no progress monitor is used.
+ @param progMonClientData A pointer to user-supplied data
+ to pass to <code>progMon</code> each time it is called. It should be <code>NULL</code>
+ if <code>progMon</code> is <code>NULL</code>.
+ @param cancelProc Currently unused. A cancel procedure.
+ Use AVAppGetCancelProc() to obtain the current cancel procedure.
+ It may be <code>NULL</code>, in which case no cancel proc is used.
+ @param cancelProcClientData A pointer to user-supplied data
+ to pass to <code>cancelProc</code> each time it is called. It should be
+ <code>NULL</code> if <code>cancelProc</code> is <code>NULL</code>.
+ @exception pdErrOpNotPermitted is raised unless <code>doc</code> is editable and <code>doc2</code>
+ is not encrypted or the owner opened it.
+ @exception pdErrCantUseNewVersion is raised if <code>doc2</code> is a newer major version
+ than the Acrobat viewer understands.
+ @exception genErrBadParm is raised if one of the following conditions is true:
+ <ul>
+ <li><code>numPages &lt; 1</code> </li>
+ <li><code>startPage &lt; 0</code> </li>
+ <li><code>startPage + numPages</code> is greater than the number of pages in <code>doc</code> </li>
+ <li><code>startPageDoc2 &lt; 0</code> </li>
+ <li><code>startPageDoc2 + numPages</code> is greater than the number of pages in <code>doc2</code> </li>
+ </ul>
+
+ @exception genErrNoMemory is raised if there is insufficient memory to perform the insertion.
+ @notify PDDocWillReplacePages
+ @notify PDDocDidReplacePages
+ @notify PDDocDidChangePages
+ @notify PDDocWillChangePages
+ @see PDDocInsertPages
+ @see PDDocMovePage
+ @see PDDocDeletePages
+ @see PDDocCreatePage
+
+ @note Annotations in the replaced pages are not replaced
+ and remain with the page. Use PDDocDeletePages() to remove
+ annotations.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+XNPROC(void, PDDocReplacePages, (PDDoc doc, ASInt32 startPage, PDDoc doc2, ASInt32 startPageDoc2, ASInt32 numPages, ASBool mergeTextAnnots, ProgressMonitor progMon, void *progMonClientData,
+ CancelProc cancelProc, void *cancelProcClientData))
+
+
+/**
+ Gets the number of article threads in a document.
+ @param doc IN/OUT The document whose article thread count is obtained.
+
+ @return The number of article threads in the document.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDDocGetNumThreads, (PDDoc doc))
+
+/**
+ Gets an article thread having the specified index.
+ @param doc IN/OUT The document containing the article thread.
+
+ @param index IN/OUT The index of the article thread to obtain.
+
+ @return The specified article thread.
+ @see PDDocAddThread
+ @see PDDocRemoveThread
+ @see PDThreadIsValid
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDThread, PDDocGetThread, (PDDoc doc, ASInt32 index))
+
+/**
+ Gets the index of the specified article thread.
+ @param doc IN/OUT The document containing the thread.
+ @param thread IN/OUT The thread whose index is obtained.
+ @return The index of thread in doc. It returns <code>-1</code> if <code>thread</code> is not
+ in <code>doc</code>.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDDocGetThreadIndex, (PDDoc doc, PDThread thread))
+
+/**
+ Adds an article thread to a document after the specified
+ thread index.
+ @param doc IN/OUT The document in which the thread is added. It must
+ match the document used in the call to PDThreadNew() that
+ created the thread.
+ @param addAfterIndex IN/OUT The index of the thread after which
+ <code>thread</code> is added.
+ @param thread IN/OUT The thread to add.
+ @notify PDDocDidAddThread
+ @see PDThreadNew
+ @see PDThreadFromCosObj
+ @see PDDocRemoveThread
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocAddThread, (PDDoc doc, ASInt32 addAfterIndex, PDThread thread))
+
+/**
+ Removes an article thread from a document. If you also wish
+ to destroy the thread, use PDThreadDestroy() after calling
+ PDDocRemoveThread().
+ @param doc IN/OUT The document from which the thread is removed.
+
+ @param index IN/OUT The index of the thread to remove.
+ @notify PDDocWillRemoveThread
+ @notify PDDocDidRemoveThread
+ @see PDThreadDestroy
+ @see PDDocAddThread
+ @see PDBeadGetThread
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocRemoveThread, (PDDoc doc, ASInt32 index))
+
+
+/**
+ Enumerates all the fonts in the specified page range. This
+ may take a considerable amount of time for a large page
+ range.
+ @param doc The document whose fonts are enumerated.
+ @param firstPage The page number of the first page for
+ which fonts are enumerated. The first page is <code>0</code>.
+ @param lastPage The page number of the last page for which
+ fonts are enumerated.
+ @param eproc A user-supplied callback to call for each font.
+ Enumeration terminates if <code>eproc</code> returns <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>eproc</code> each time it is called.
+ @param progMon A progress monitor. Use AVAppGetDocProgressMonitor()
+ to obtain the standard progress monitor. <code>NULL</code> may be passed,
+ in which case no progress monitor is used.
+ @param progMonClientData A pointer to user-supplied data
+ to pass to <code>progMon</code> each time it is called. It should be <code>NULL</code>
+ if <code>progMon</code> is <code>NULL</code>.
+ @see PDDocEnumLoadedFonts
+ @see PDFontEnumCharProcs
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocEnumFonts, (PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, PDFontEnumProc eproc, void *clientData, ProgressMonitor progMon, void *progMonClientData))
+
+/**
+ Enumerates all the fonts that have been encountered so far.
+ A font is loaded when a page that uses it is processed.
+ This typically happens when a page is drawn or its thumbnail
+ image is created.
+ @param doc IN/OUT The document whose loaded fonts are enumerated.
+
+ @param proc IN/OUT A user-supplied callback to call for each loaded
+ font. Enumeration terminates if <code>proc</code> returns <code>false</code>.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see PDDocEnumFonts
+ @see PDFontEnumCharProcs
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocEnumLoadedFonts, (PDDoc doc, PDFontEnumProc proc, void *clientData))
+
+
+/**
+ Creates thumbnail images for the specified range of pages.
+ Thumbnail images are only created for pages that have none.
+
+ <p>Use as large a page range as possible, because the color
+ space object is shared by all the thumbnails created by
+ a single invocation of this method. This means that if you call
+ this method separately for each page, there will be duplicate
+ color space objects. </p>
+
+ <p>See Section 4.5 in the <i>PDF Reference</i> for more details on
+ color spaces. </p>
+
+ See <i>Developing Plug-ins and Applications</i> for additional important information
+ about creating thumbnails.
+ @param doc IN/OUT The document for which thumbnail images are
+ created.
+ @param firstPage IN/OUT The page number of the first page for
+ which thumbnails are created. The first page is <code>0</code>.
+ @param lastPage IN/OUT The page number of the last page for which
+ thumbnails are created. The constant PDLastPage (see PDExpT.h) can also be used.
+ @param server IN/OUT A server (set of callback procedures) that
+ provides the sampled image used as the thumbnail image.
+ Pass <code>NULL</code> to use the default server.
+ @param serverClientData IN/OUT User-supplied data to pass to the
+ thumbnail creation server.
+ @param colorSpace IN/OUT The color space in which the thumbnail
+ data is represented. It must be <code>DeviceRGB</code>. Thumbnails may
+ be created in either a direct or an indexed color space;
+ however, it is strongly recommended that you use indexed
+ color spaces over direct color spaces. Using direct color
+ spaces with this version of Acrobat may cause bad looking
+ thumbnails. To specify a direct color space, pass <code>0</code> for
+ <code>hiVal</code> and <code>NULL</code> for <code>lookupTable</code>. To specify an indexed color
+ space, pass the appropriate values in <code>hiVal</code> and <code>lookupTable</code>.
+ Direct color spaces on Windows are supported in Acrobat
+ 3.0. Prior to Acrobat 3.0 on Windows, you had to use indexed
+ color spaces.
+ @param bitsPerComponent IN/OUT The number of bits per color component
+ in the thumbnail image's data. <code>8</code> is the only valid value.
+
+ @param hiVal IN/OUT Used only for indexed color space; pass <code>0</code>
+ for direct color spaces, as described in <code>colorSpace</code>. <code>hiVal</code>
+ specifies the highest valid index in <code>lookupTable</code>. Because
+ indices start at <code>0</code>, the number of entries in <code>lookupTable</code>
+ is <code>hiVal + 1</code>. <code>hiVal</code> must be <code>0</code> for device color spaces.
+ @param lookupTable IN/OUT Used only for indexed color space; pass
+ <code>NULL</code> for direct color spaces, as described in <code>colorSpace</code>.
+ <code>lookupTable</code> is a table that maps data values to colors.
+ It is used only for indexed color spaces. It must be <code>NULL</code> for device
+ color spaces. For an indexed color space, the size of the
+ lookup table must be <code>(hiVal + 1)</code>:
+
+ <ul>
+ <li><code>sizeof(ASUns8)</code></li>
+ <li><code>3</code>, where the <code>3</code> arises because an RGB color space has three color components.</li>
+ </ul>
+
+ @param progMon IN/OUT A monitor to call to display thumbnail creation
+ progress. Use AVAppGetDocProgressMonitor() to obtain the standard
+ progress monitor to pass for this parameter. <code>NULL</code> may be
+ passed, in which case no progress monitor is used.
+ @param progMonClientData IN/OUT A user-supplied data to pass to
+ <code>progMon</code> each time it is called. It should be <code>NULL</code> if <code>progMon</code>
+ is <code>NULL</code>.
+ @param cancelProc IN/OUT A procedure to call frequently to allow
+ the user to cancel thumbnail creation. Use AVAppGetCancelProc()
+ to obtain the default cancel proc for this parameter. It may
+ be <code>NULL</code>, in which case no cancel proc is used.
+ @param cancelProcClientData IN/OUT A user-supplied data to pass to
+ <code>cancelProc</code> each time it is called. It should be <code>NULL</code> if <code>cancelProc</code> is <code>NULL</code>.
+
+ @notify PDDocDidChangeThumbs
+ @see PDDocDeleteThumbs
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocCreateThumbs, (PDDoc doc, ASInt32 firstPage, ASInt32 lastPage,
+ PDThumbCreationServer server, void *serverClientData,
+ ASAtom colorSpace, ASInt32 bitsPerComponent, ASInt32 hiVal,
+ char *lookupTable, ProgressMonitor progMon, void *progMonClientData,
+ CancelProc cancelProc, void *cancelProcClientData))
+
+/**
+ Deletes thumbnail images for a range of pages in a document.
+
+ @param doc IN/OUT The document from which thumbnail images are
+ deleted.
+ @param firstPage IN/OUT The page number of the first page in <code>doc</code>
+ whose thumbnail image is deleted. The first page is <code>0</code>.
+ @param lastPage IN/OUT The page number of the last page in <code>doc</code>
+ whose thumbnail image is deleted.
+ @param progMon IN/OUT A monitor to call to display thumbnail deletion
+ progress. Use AVAppGetDocProgressMonitor() to obtain the standard
+ progress monitor to pass for this parameter. <code>NULL</code> may be
+ passed, in which case no progress monitor is used.
+ @param progMonClientData IN/OUT A pointer to user-supplied data
+ to pass to <code>progMon</code>. It should be <code>NULL</code> if <code>progMon</code> is <code>NULL</code>.
+ @notify PDDocDidChangeThumbs
+ @see PDDocCreateThumbs
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocDeleteThumbs, (PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void *progMonClientData))
+
+
+/**
+ Gets the word finder associated with a document. It is not
+ necessary to destroy the word finder returned by this method.
+
+ @param docP The document whose word finder is obtained.
+
+ @param WXEVersion The version of the word finder to get.
+ @return The document's word finder. It returns <code>NULL</code> if the document
+ does not have a word finder or its version does not match
+ the version requested.
+ @exception genErrBadParm is thrown if an invalid version number is passed.
+
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+SPROC(PDWordFinder, PDDocGetWordFinder, (PDDoc docP, ASInt16 WXEVersion), PDDocGetWordFinderHost)
+
+/**
+ Creates a word finder that is used to extract text in the
+ host encoding from a PDF file. The word finder may either
+ be used by PDWordFinderEnumWords() (which enumerates words
+ one-by-one) or by PDWordFinderAcquireWordList() (which fills
+ a table with all the words on a page).
+
+ <p>A default ligature table is used, containing the following
+ ligatures: </p>
+ <ul>
+ <li>fi</li>
+ <li>ff</li>
+ <li>fl</li>
+ <li>ffi</li>
+ <li>ffl</li>
+ <li>ch</li>
+ <li>cl</li>
+ <li>ct</li>
+ <li>ll</li>
+ <li>ss</li>
+ <li>fs</li>
+ <li>st</li>
+ <li>oe</li>
+ <li>OE</li>
+ </ul>
+
+ <p>The glyph name is substituted for the ligature. </p>
+
+ <p>This method also works for non-Roman (CJK or Chinese-Japanese-Korean)
+ viewers. In this case, words are extracted to the host encoding.
+ Developers desiring Unicode output must use PDDocCreateWordFinderUCS(),
+ which does the extraction for Roman or non-Roman text. </p>
+
+ <p>The type of PDWordFinder determines the encoding of the
+ string returned by PDWordGetString(). For instance, if PDDocCreateWordFinderUCS()
+ is used to create the word finder, PDWordGetString() returns
+ only Unicode. </p>
+
+ <p>For CJK viewers, words are stored internally using CID encoding.
+ For more information on CIDFonts and related topics, see
+ Section 5.6 in the <i>PDF Reference</i>. For detailed information
+ on CIDFonts, see <i>Technical Note #5092, CID-Keyed Font Technology
+ Overview</i>, and <i>Technical Note #5014, Adobe CMap and CIDFont
+ Files Specification</i>. </p>
+ @param doc The document on which the word finder is used.
+
+ @param outEncInfo An array of 256 flags, specifying the type
+ of character at each position in the encoding. Each flag
+ is an <code>OR</code> of the Character Type Codes. If <code>outEncInfo</code> is <code>NULL</code>,
+ the platform's default encoding info is used. Use <code>outEncInfo</code>
+ and <code>outEncVec</code> together; for every <code>outEncInfo</code> use a corresponding
+ <code>outEncVec</code> to specify the character at that position in the
+ encoding. Regardless of the characters specified in <code>outEncInfo</code>
+ as word separators, a default set of word separators is
+ used (see Glyph Names of Word Separators). There is no way
+ to change the list of characters that are considered to
+ be word separators.
+ @param outEncVec Array of 256 <code>NULL</code>-terminated strings
+ that are the glyph names in encoding order. See the discussion
+ of character names in the <i>PostScript Language
+ Reference Manual</i>. If <code>outEncVec</code> is <code>NULL</code>, the
+ platform's default encoding vector is used. For non-UNIX
+ Roman systems, it is <code>WinAnsiEncoding</code>
+ on Windows and <code>MacRomanEncoding</code> on Mac OS. On UNIX (except HP-UX) Roman systems, it is
+ <code>ISO8859-1</code> (ISO Latin-1); for HP-UX, it is <code>HP-ROMAN8</code>. See
+ Appendix D in the <i>PDF Reference</i> for descriptions of
+ <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and <code>PDFDocEncoding</code>. Use this parameter
+ with <code>outEncInfo</code>. See <code>outEncInfo</code> for more information.
+ @param ligatureTbl A <code>NULL</code>-terminated array of <code>NULL</code>-terminated
+ strings. Each string is the glyph name of a ligature in
+ the font. When a word contains a ligature, the glyph name
+ of the ligature is substituted for the ligature (for example,
+ <code>ff</code> is substituted for the ff ligature). This table must
+ be terminated with <code>NULL</code>. If <code>ligatureTbl</code> is <code>NULL</code>, a default
+ ligature table is used, containing the following ligatures:
+ <ul>
+ <li>fi</li>
+ <li>ff</li>
+ <li>fl</li>
+ <li>ffi</li>
+ <li>ffl</li>
+ <li>ch</li>
+ <li>cl</li>
+ <li>ct</li>
+ <li>ll</li>
+ <li>ss</li>
+ <li>fs</li>
+ <li>st</li>
+ <li>oe</li>
+ <li>OE</li>
+ </ul>
+
+ @param algVersion The version of the word-finding algorithm
+ to use (see PDExpT.h), as follows (pass <code>0</code> if your client
+ does not care):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Version</TH><TH>Description</TH></TR>
+ <TR><TD><code>WF_LATEST_VERSION</code></TD><TD>To obtain the latest available version.</TD></TR>
+ <TR><TD><code>WF_VERSION_2</code></TD><TD>Version used for Acrobat 3.x, 4.x.</TD></TR>
+ <TR><TD><code>WF_VERSION_3</code></TD><TD>Available in Acrobat 5.0 without accessibility enabled. Includes some improved word-piecing algorithms.</TD></TR>
+ <TR><TD><code>WF_VERSION_4</code></TD><TD>For Acrobat 5.0 with accessibility enabled. Includes advanced word-ordering algorithms in addition to improved word-piecing algorithms.</TD></TR>
+ </TABLE>
+
+ @param rdFlags Word-finding options that determine the
+ tables filled when using PDWordFinderAcquireWordList(). It must
+ be an <code>OR</code> of one or more of the WordFinder Sort Order Flags.
+ In Acrobat 5.0 this parameter is ignored and you should
+ pass in <code>NULL</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to the newly created word finder.
+ @return The newly created word finder.
+ @see PDDocCreateWordFinderUCS
+ @see PDWordFinderEnumWords
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderDestroy
+ @see PDWordFilterWord
+
+ @note The word finder also extracts text from Form XObjects
+ that are executed in the page contents. For information
+ about Form XObjects, see Section 4.9 in the <i>PDF Reference</i>.
+ @ref GlyphNames
+ @ref CharacterTypeCodes
+ @ref WordFinderSortOrderFlags
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDWordFinder, PDDocCreateWordFinder,(PDDoc doc, ASUns16 *outEncInfo, char **outEncVec, char **ligatureTbl, ASInt16 algVersion, ASUns16 rdFlags, void *clientData ))
+
+/**
+ Gets the nth word in the word list obtained using PDWordFinderAcquireWordList().
+
+ @param wObj IN/OUT The word finder whose nth word is obtained.
+
+ @param nTh IN/OUT The index of the word to obtain. The first word
+ on a page has an index of zero. Words are counted in PDF
+ order. See the description of the <code>wInfoP</code> parameter in PDWordFinderAcquireWordList().
+
+ @return The nth word. It returns <code>NULL</code> when the end of the list is reached.
+
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderEnumWords
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDWord, PDWordFinderGetNthWord, (PDWordFinder wObj, ASInt32 nTh))
+
+/**
+ Splits the specified string into words by substituting spaces
+ for word separator characters. The list of characters considered
+ to be word separators can be specified, or a default list
+ can be used.
+
+ <p>The characters <code>','</code> and <code>'.'</code> are context-sensitive word separators.
+ If surrounded by digits (for example, <code>654,096.345</code>), they
+ are not considered word separators. </p>
+
+ <p>For non-Roman character set viewers, this method currently
+ supports only SHIFT-JIS encoding on a Japanese system. </p>
+ @param infoArray A character information table. It specifies
+ each character's type; word separator characters must be
+ marked as <code>W_WORD_BREAK</code> (see Character Type Codes). This
+ table can be identical to the table to pass to PDDocCreateWordFinder().
+ If <code>infoArray</code> is <code>NULL</code>, a default table is used (see Glyph
+ Names of Word Separators).
+ @param cNewWord (Filled by the method) The word that has been
+ split. Word separator characters have been replaced with
+ spaces.
+ @param cOldWord The word to split.
+ @param nMaxLen The number of characters that <code>cNewWord</code> can
+ hold. Word splitting stops when <code>cOldWord</code> is completely processed
+ or <code>nMaxLen</code> characters have been placed in <code>cNewWord</code>, whichever
+ occurs first.
+ @return The number of splits that occurred.
+ @exception genErrGeneral is raised if <code>infoArray</code> is <code>NULL</code>, but host encoding
+ cannot be obtained.
+ @see PDWordGetString
+ @ref CharacterTypeCodes
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASUns16, PDWordSplitString, (ASUns16 *infoArray, char *cNewWord, char *cOldWord, ASUns16 nMaxLen))
+
+/**
+ Creates a text selection that includes all words totally
+ or partially enclosed by a rectangle. The text selection
+ can then be set as the current selection using AVDocSetSelection().
+
+ @param doc The document in which a text selection is created.
+
+ @param pageNum The page number on which the text selection
+ is created.
+ @param boundingRect A pointer to a rectangle specifying
+ the text selection's bounding rectangle, specified in user
+ space coordinates.
+ @return The newly created text selection.
+ @see PDTextSelectDestroy
+ @see AVDocSetSelection
+ @see PDTextSelectEnumQuads
+ @see PDTextSelectEnumText
+ @see PDWordCreateTextSelect
+
+ @note When this method is used to create a text selection
+ on a rotated page, you must pass in a rotated <code>boundingRect</code>.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+SPROC(PDTextSelect, PDDocCreateTextSelect, (PDDoc doc, ASInt32 pageNum, ASFixedRect *boundingRect), PDDocCreateTextSelectHost)
+
+
+
+/**
+ Gets the value of a key in a document's Info dictionary,
+ or the value of this same key in the XMP metadata, whichever
+ is later. However, it is preferable to use PDDocGetXAPMetadataProperty(),
+ because it also allows accessing XMP properties that are
+ not duplicated in the Info dictionary.
+
+ <p>See Section 1<code>0</code>.2.1 in the <i>PDF Reference</i> for information
+ about Info dictionaries. All values in the Info dictionary
+ should be strings; other data types such as numbers and
+ booleans should not be used as values in the Info dictionary. </p>
+
+ <p>Users may define their own Info dictionary entries. In this
+ case, it is strongly recommended that the key have the developer's
+ prefix assigned by the Adobe Solutions Network. </p>
+ @param doc The document whose Info dictionary key is obtained.
+
+ @param infoKey The name of the Info dictionary key whose
+ value is obtained.
+ @param buffer (Filled by the method) The buffer containing
+ the value associated with <code>infoKey</code>. If <code>buffer</code> is <code>NULL</code>, the
+ method will just return the number of bytes required.
+ @param bufSize The maximum number of bytes that can be
+ written into <code>buffer</code>.
+ @return If <code>buffer</code> is <code>NULL</code>, it returns the number of bytes in the specified
+ key's value. If <code>buffer</code> is not <code>NULL</code>, it returns the number of
+ bytes copied into <code>buffer</code>, excluding the terminating <code>NULL</code>.
+ You must pass at least the <code>length + 1</code> as the buffer size
+ since the routine adds a <code>'\\0'</code> terminator to the data, even
+ though the data is not a C string (it can contain embedded
+ <code>'\\0'</code> values).
+ @see PDDocGetXAPMetadataProperty
+ @see PDDocSetInfo
+
+ @note For Roman viewers, this text is always stored in the
+ <code>PDFDocEncoding</code>. For non-Roman character set viewers, this
+ text is stored as <code>PDFDocEncoding</code> or Unicode, depending on
+ the file's creator.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDDocGetInfo, (PDDoc doc, const char *infoKey, char *buffer, ASInt32 bufSize))
+
+/**
+ Sets the value of a key in a document's Info dictionary.
+ However, it is preferable to use PDDocSetXAPMetadataProperty(),
+ because it also allows accessing XMP properties that are
+ not duplicated in the Info dictionary.
+
+ <p>See Section 1<code>0</code>.2.1 on Info dictionaries in the <i>PDF Reference</i>
+ for information about Info dictionaries. All values in the
+ Info dictionary should be strings; other data types such
+ as numbers and Boolean values should not be used as values in
+ the Info dictionary. If an Info dictionary key is specified
+ that is not currently in the Info dictionary, it is added
+ to the dictionary. </p>
+
+ <p>Users may define their own Info dictionary entries. In this
+ case, it is strongly recommended that the key have the developer's
+ prefix assigned by the Adobe Developers Association. </p>
+
+ @note For Roman viewers, this text is always stored in the
+ <code>PDFDocEncoding</code>. For non-Roman character set viewers, this
+ text is stored as <code>PDFDocEncoding</code> or Unicode, depending on
+ the file's creator.
+ @param doc The document whose Info dictionary key is set.
+
+ @param infoKey The name of the Info dictionary key whose
+ value is set.
+ @param buffer The buffer containing the value to associate
+ with <code>infoKey</code>.
+ @param nBytes The number of bytes in <code>buffer</code>.
+ @see PDDocGetInfo
+ @see PDDocSetXAPMetadataProperty
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocSetInfo, (PDDoc doc, const char *infoKey, char *buffer, ASInt32 nBytes))
+
+
+/**
+ Superseded in Acrobat 5.0 by PDDocPermRequest.
+
+ <p>Gets the security data structure for the specified document's
+ current security handler. Use PDDocGetNewSecurityData() to
+ get the data structure for the document's new security handler. </p>
+
+ @param doc The document whose security data structure
+ is obtained.
+ @return A pointer to the document's current security data structure.
+
+ @see PDDocGetNewSecurityData
+ @see PDDocGetCryptHandler
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void *, PDDocGetSecurityData, (PDDoc doc))
+
+/**
+ Gets the security data structure for the specified document's
+ new security handler. Use PDDocGetSecurityData() to get the
+ security data structure for the document's current security
+ handler.
+ @param doc The document whose new security data structure
+ is obtained.
+ @return The security data structure for the document's new security
+ handler.
+ @see PDDocGetSecurityData
+ @see PDDocNewSecurityData
+ @see PDDocGetNewCryptHandler
+ @see PDDocSetNewCryptHandler
+ @see PDDocSetNewSecurityData
+ @see PDDocPermRequest
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void *, PDDocGetNewSecurityData, (PDDoc doc))
+
+/**
+ Deprecated in Acrobat 7.0. Use PDDocPermRequest() instead.
+
+ <p>Adds permissions to the specified document, if permitted.
+ It calls the PDCryptAuthorizeProc() callback of the document's
+ security handler to determine which of the specified permissions
+ will actually be granted. After calling this method, the
+ document's permissions will be the <code>OR</code> of the previous permissions
+ and the permissions granted by the PDCryptAuthorizeProc()
+ callback. </p>
+
+ <p>Use PDDocPermRequest() to determine if a document's permissions
+ allow a particular operation for a particular object. </p>
+ @param pdDoc The document for which new permissions are
+ requested.
+ @param permsWanted The new permissions being requested.
+ It must be an <code>OR</code> of the PDPerms values.
+ @param authData A pointer to data to pass to the PDCryptAuthorizeProc()
+ callback of the document's security handler. For the Acrobat
+ viewer's built-in security handler, <code>authData</code> is a <code>char*</code>
+ containing the password.
+ @return The <code>OR</code> of the previous value of the document's permissions
+ field, and the permissions granted by the PDCryptAuthorizeProc()
+ callback of the document's security handler. The result
+ will be an <code>OR</code> of the PDPerms values.
+ @exception pdErrNeedCryptHandler is raised if no security handler is associated
+ with <code>pdDoc</code>. It also raises whatever exceptions are raised by the security handler's
+ PDCryptAuthorizeProc() callback.
+ @see PDDocGetNewCryptHandler
+ @see PDDocGetPermissions (obsolete)
+ @see PDDocPermRequest
+ @see PDDocSetNewCryptHandler
+ @see PDDocSetNewCryptHandlerEx
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDPerms, PDDocAuthorize, (PDDoc pdDoc, PDPerms permsWanted, void *authData))
+
+/**
+ Creates a security data structure appropriate for the specified
+ document's new security handler. The new security handler
+ must have been previously set using PDDocSetNewCryptHandler().
+ The structure is created by calling the new security handler's
+ PDCryptNewSecurityDataProc().
+
+ <p>After calling PDDocNewSecurityData(), fill the structure as
+ appropriate, call PDDocSetNewSecurityData() with the
+ structure, and then free the structure using ASfree(). </p>
+ @param doc The document for which a security data structure
+ is created.
+ @return The newly created security data structure.
+ @exception pdErrOpNotPermitted is raised if pdPermSecure (see PDPerms)
+ has not been granted for <code>doc</code>.
+ @exception pdErrNeedCryptHandler is raised if the document does not have
+ a new security handler.
+ @see PDDocSetNewCryptHandler
+ @see PDDocSetNewSecurityData
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void *, PDDocNewSecurityData, (PDDoc doc))
+
+/**
+ Sets the security data structure for the specified document's
+ new security handler. Use PDDocSetNewCryptHandler() to set
+ a new security handler for a document.
+ @param pdDoc IN/OUT The document whose new security data structure
+ is set.
+ @param secData IN/OUT A pointer to the new security data structure
+ to set for <code>doc</code>. See PDDocNewSecurityData() for information
+ on creating and filling this structure.
+ @exception pdErrNeedCryptHandler is raised if the document does not have
+ a new security handler.
+ @exception pdErrOpNotPermitted is raised if the document's permissions
+ cannot be changed.
+ @see PDDocGetNewSecurityData
+ @see PDDocGetSecurityData
+ @see PDDocNewSecurityData
+ @see PDDocSetNewCryptHandler
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocSetNewSecurityData, (PDDoc pdDoc, void *secData))
+
+/**
+ Sets the specified document's new security handler (that is,
+ the security handler that will be used after the document
+ is saved).
+
+ <p>This method returns with no action if the new security handler
+ is the same as the old one. Otherwise, it calls the new
+ security handler's PDCryptNewSecurityDataProc() to set the
+ document's <code>newSecurityData</code> field. If the new security handler
+ does not have this callback, the document's <code>newSecurityData</code>
+ field is set to <code>0</code>.</p>
+ @param pdDoc The document whose new security handler is
+ set.
+ @param newCryptHandler The ASAtom for the name of the
+ new security handler to use for the document. This name
+ must be the same as the <code>pdfName</code> used when the security handler
+ was registered using PDRegisterCryptHandler(). Use ASAtomNull
+ to remove security from the document.
+ @exception pdErrNoCryptHandler is raised if there is no security handler
+ registered with the specified name and the name is not ASAtomNull.
+ @exception pdErrOpNotPermitted is raised if the document's permissions
+ do not allow its security to be modified.
+ @see PDDocGetNewCryptHandler
+ @see PDDocPermRequest
+ @see PDDocSetNewCryptHandlerEx
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDDocSetNewCryptHandler, (PDDoc pdDoc, ASAtom newCryptHandler))
+
+/**
+ Gets the specified document's new security handler (that
+ is, the security handler that will be used after the document
+ is saved).
+
+ <p>If the document does not have a new security handler, it returns
+ the document's current security handler. </p>
+ @param doc The document whose new security handler is
+ obtained.
+ @return The ASAtom corresponding to the <code>pdfName</code> of the document's
+ new security handler. It returns ASAtomNull if the document
+ does not have a new security handler.
+ @see PDDocPermRequest
+ @see PDDocSetNewCryptHandler
+ @see PDDocSetNewCryptHandlerEx
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, PDDocGetNewCryptHandler, (PDDoc doc))
+
+/**
+ Gets the security information from the specified document's
+ new security handler. It calls the PDCryptGetSecurityInfoProc()
+ callback of the document's new security handler. No permissions
+ are required to call this method.
+
+ <p>It raises only those exceptions raised by the new security
+ handler's PDCryptGetSecurityInfoProc() callback. </p>
+ @param pdDoc IN/OUT The document whose new security information
+ is obtained.
+ @param secInfo IN/OUT (Filled by the method) The document's new
+ security information. The value must be an <code>OR</code> of the Security
+ Info Flags. It is set to <code>pdInfoCanPrint | pdInfoCanEdit | pdInfoCanCopy
+ | pdInfoCanEditNotes</code> (see PDPerms) if the document's new
+ security handler does not have a PDCryptGetSecurityInfoProc()
+ callback.
+ @see PDRegisterCryptHandler
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDDocGetNewSecurityInfo, (PDDoc pdDoc, ASUns32 *secInfo))
+
+/**
+ Deprecated in Acrobat 5.0. Use PDDocPermRequest() instead.
+
+ <p>Gets the permissions for the specified document. You can
+ set permissions with PDDocAuthorize(). </p>
+
+ @param doc The document whose permissions are obtained.
+ @return A bit field indicating the document's permissions. It is
+ an <code>OR</code> of the PDPerms values.
+ @see PDDocAuthorize
+ @see PDDocGetSecurityData
+ @see PDDocPermRequest
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDPerms, PDDocGetPermissions, (PDDoc doc))
+
+
+/**
+ Registers a new security handler with the Acrobat viewer.
+
+ @param handler A pointer to a structure that contains the
+ security handler's callback functions. This structure must
+ not be freed after calling PDRegisterCryptHandler().
+ @param pdfName The name of the security handler as it
+ will appear in the PDF file. This name is also used by PDDocSetNewCryptHandler().
+ Storage for this name can be freed after PDRegisterCryptHandler()
+ has been called.
+ @param userName The name of the security handler as it
+ will be shown in menus. This name can be localized into
+ different languages. Storage for this name can be freed
+ after PDRegisterCryptHandler() has been called.
+ @exception genErrBadParm is raised if the security handler's size field
+ is incorrect.
+ @exception ErrSysPDSEdit is raised if either <code>pdfName</code> or <code>userName</code> are already
+ in use by a registered security handler.
+ @exception genErrNoMemory is raised is memory is exhausted. Other exceptions may be raised as well.
+ @see PDDocGetNewCryptHandler
+ @see PDDocPermRequest
+ @see PDDocSetNewCryptHandler
+ @see PDDocSetNewCryptHandlerEx
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDRegisterCryptHandler, (PDCryptHandler handler, const char *pdfName, const char *userName))
+
+
+/**
+ Translates a string from host encoding to <code>PDFDocEncoding</code>.
+ This method is useful when setting or retrieving displayed
+ text that must be in <code>PDFDocEncoding</code> (or Unicode), such as
+ text that appears in a text annotation or bookmark.
+
+ <p>A character that cannot be converted to the destination
+ encoding is replaced with a space. For example, PDXlateToPDFDocEnc()
+ converts <code>'\\n'</code> to a space character (<code>'\\r'</code> is present in <code>PDFDocEncoding</code>
+ and is left unchanged). </p>
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows and <code>MacRomanEncoding</code>
+ on Mac OS. On UNIX (except HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps. Use PDGetHostEncoding() to determine if a system's
+ host encoding is Roman. For non-Roman systems, use
+ PDXlateToPDFDocEncEx(). </p>
+
+ <p>In general, PDXlateToPDFDocEncEx() can be called instead of
+ PDXlateToPDFDocEnc(), since PDXlateToPDFDocEncEx() works for
+ PDFDocEncoding or Unicode. </p>
+ @param in The string to translate (it may point to the same
+ memory as <code>out</code>, allowing strings to translate in place).
+
+ @param out (Filled by the method) The translated string
+ (it may point to the same memory as <code>in</code>).
+ @param numBytes The number of bytes in the string to translate.
+ @see PDGetHostEncoding
+ @see PDXlateToHost
+ @see PDXlateToHostEx
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDXlateToPDFDocEnc, (char *in, char *out, ASInt32 numBytes))
+
+/**
+ Translates a string from <code>PDFDocEncoding</code> to host encoding.
+ This method is useful when setting or retrieving displayed
+ text that must be in <code>PDFDocEncoding</code> (or Unicode), such as
+ text that appears in a text annotation or bookmark.
+
+ <p>A character that cannot be converted to the destination
+ encoding is replaced with a space. </p>
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>MacRomanEncoding</code>
+ on Mac OS and <code>WinAnsiEncoding</code> on Windows. On UNIX (except
+ HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>MacRomanEncoding</code>, <code>WinAnsiEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps. </p>
+
+ <p>Use PDGetHostEncoding() to determine if a system's host encoding
+ is Roman. For non-Roman systems, use PDXlateToHostEx().</p>
+
+ <p>In general, PDXlateToHostEx() can be called instead of PDXlateToHost()
+ since PDXlateToHostEx() works for any host encoding.</p>
+
+ @param in The string to translate (it may point to the same
+ memory as <code>out</code>, allowing strings to translate in place).
+
+ @param out (Filled by the method) The translated string
+ (it may point to the same memory as <code>in</code>).
+ @param numBytes The number of bytes in the string to translate.
+ @see PDGetHostEncoding
+ @see PDXlateToHostEx
+ @see PDXlateToPDFDocEnc
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDXlateToHost, (char *in, char *out, ASInt32 numBytes))
+
+
+/**
+ Gets the name of a font. The behavior depends on the font
+ type; for a Type 3 font it gets the value of the Name key
+ in a PDF Font resource. See Section 5.5.4 in the <i>PDF Reference</i>.
+ For other types it gets the value of the BaseFont key in
+ a PDF font resource.
+ @param font IN/OUT The font whose name is obtained.
+ @param buffer IN/OUT (Filled by the method) The buffer into which
+ the font's name is stored. The client may pass in <code>NULL</code> to
+ obtain the buffer size, then call the method with a buffer
+ of the appropriate size.
+ @param bufSize IN/OUT The length of <code>buffer</code> in bytes. The maximum
+ font name length that the Acrobat viewer will return is
+ <code>PSNAMESIZE</code> (see PDExpT. h).
+ @return The number of characters in the font name. If the font name
+ is too long to fit into <code>buffer</code>, <code>bufSize - 1</code> bytes are copied
+ into <code>buffer</code>, and <code>buffer</code> is <code>NULL</code>-terminated.
+ @see PDDocEnumFonts
+ @see PDFontGetEncodingName
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDFontGetName, (PDFont font, char *buffer, ASInt32 bufSize))
+
+/**
+ Gets a font's subtype.
+ @param font IN/OUT The font whose subtype is obtained.
+ @return The font's subtype. The ASAtom returned can be converted
+ to a string using ASAtomGetString(). It must be one of the Font Subtypes.
+ @see PDDocEnumFonts
+ @ref FontSubtypes
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASAtom, PDFontGetSubtype, (PDFont font))
+
+/**
+ Gets the font's character set. This is derived from the
+ 'Uses Adobe standard encoding' bit in the font descriptor
+ (if the font has a font descriptor) or from the font's name
+ (if the font is one of the base 14 fonts and does not have
+ a font descriptor).
+
+ <p>For non-Roman character set viewers, call PDFontGetEncodingName()
+ instead. </p>
+ @param font IN/OUT The font whose character set is obtained.
+ @return The font's character set. For non-Roman character set viewers,
+ it returns PDUnknownCharSet.
+ @see PDFontGetEncodingName
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDCharSet, PDFontGetCharSet, (PDFont font))
+
+/**
+ Gets a font's encoding index.
+
+ <p>For non-Roman character set viewers, call PDFontGetEncodingName() instead. </p>
+
+ @param font IN/OUT The font whose encoding index is obtained.
+
+ @return A font encoding index. If the index is greater than PDLastKnownEncoding,
+ it is a custom encoding, and is unique within the document.
+ If the index is less than PDLastKnownEncoding, it must be
+ one of the PDFontEncoding values.
+ @see PDFontAcquireEncodingArray
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDFontGetEncodingIndex, (PDFont font))
+
+/**
+ Acquires a font's encoding array (the mapping of character
+ codes to glyphs). When you are done with this array, call PDFontEncodingArrayRelease()
+ to release it.
+
+ <p>The array contains 256 pointers. If a pointer is not <code>NULL</code>,
+ it points to a C string containing the name of the glyph
+ for the code point corresponding to the index. If it is
+ <code>NULL</code>, then the name of the glyph is unchanged from that
+ specified by the font's built-in encoding. </p>
+
+ <p>For a Type 3 font, all glyph names will be present in the
+ encoding array, and <code>NULL</code> entries correspond to un-encoded
+ code points. </p>
+
+ <p>For non-Roman character set viewers, it is not appropriate
+ to call this method. </p>
+ @param font The font whose encoding array is obtained.
+ @return The font's encoding array. It returns <code>NULL</code> if there is no encoding
+ array associated with the font.
+ @see PDFontEncodingArrayRelease
+ @see PDFontGetEncodingIndex
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASUns8 **, PDFontAcquireEncodingArray, (PDFont font))
+
+/**
+ Releases a font's encoding array (the mapping of character
+ codes to glyphs). Call this method after you are done using
+ an encoding array acquired using PDFontAcquireEncodingArray().
+
+ @param array IN/OUT The encoding array to release.
+ @see PDFontAcquireEncodingArray
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDFontEncodingArrayRelease, (ASUns8 **array))
+
+/**
+ Gets a font's metrics, which provide the information needed
+ to create a substitute Multiple Master font when the original
+ font is unavailable. See Section 5.7 in the <i>PDF Reference</i>
+ for a discussion of font descriptors.
+ @param font IN/OUT The font whose metrics are being obtained.
+
+ @param metricsP IN/OUT (Filled by the method) A pointer to a PDFontMetrics
+ structure containing the font's metrics. The font metric
+ values may be patched before being returned. If the actual
+ values in the PDF file are required, use Cos instead to
+ get trustworthy metrics.
+ @param sizeMetrics IN/OUT It must be <code>sizeof(PDFontMetrics)</code>.
+ @see PDFontGetWidths
+ @see PDFontSetMetrics
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDFontGetMetrics, (PDFont font, PDFontMetricsP metricsP, os_size_t sizeMetrics))
+
+/**
+ Gets a Type 3 font's bounding box, which is the smallest
+ rectangle that would enclose every character in the font
+ if they were overlaid and painted.
+ @param font IN/OUT The font whose bounding box is obtained.
+ @param bboxP IN/OUT (Filled by the method) A pointer to a rectangle
+ specifying the font's bounding box.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDFontGetBBox, (PDFont font, ASFixedRect *bboxP))
+
+/**
+ Gets the advance width of every glyph in a font. The advance
+ width is the amount by which the current point advances
+ when the glyph is drawn. The advance width may not correspond
+ to the visible width of the glyph (for example, a glyph
+ representing an accent mark might have an advance width
+ of zero so that characters can be drawn under it). For this
+ reason, the advance width cannot be used to determine the
+ glyphs' bounding boxes.
+
+ <p>For non-Roman character set viewers, this method gets the
+ width for a single byte range (<code>0</code> through <code>255</code>). </p>
+ @param font IN/OUT The font whose glyph advance widths are obtained.
+
+ @param widths IN/OUT (Filled by the method) An array of glyph
+ advance widths, measured in character space units. Un-encoded
+ code points will have a width of zero. For non-Roman character
+ set viewers, an array for a single byte range (<code>0</code> through
+ <code>255</code>).
+ @see PDFontGetMetrics
+ @see PDFontSetMetrics
+ @see PDFontXlateWidths
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDFontGetWidths, (PDFont font, ASInt16 *widths))
+
+/**
+ Gets an array describing the differences between the platform's
+ host encoding and <code>PDFDocEncoding</code>.
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows and <code>MacRomanEncoding</code>
+ on Mac OS. On UNIX (except HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps. </p>
+
+ <p>Use PDGetHostEncoding() to determine whether a system's host encoding
+ is Roman. </p>
+ @return An array containing 256 elements. Each element corresponds
+ to a code point in the <code>PDFDocEncoding</code>, and is either <code>NULL</code>
+ or a pointer to a string.
+
+ <p>If the element is <code>NULL</code>, the code point refers to the same
+ glyph in both host encoding and <code>PDFDocEncoding</code>. If the element
+ is non-<code>NULL</code>, it points to a string containing the glyph
+ name for the code point. </p>
+ @see PDGetHostEncoding
+ @see AVAppGetLanguageEncoding
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASUns8 **, PDGetPDFDocEncoding, (void))
+
+/**
+ Tests whether the specified font is embedded in the PDF
+ file, meaning that the font is stored as a font file, which
+ is a stream embedded in the PDF file. Only Type 1 and TrueType
+ fonts can be embedded.
+ @param font The font to test.
+ @return <code>true</code> if the font is embedded in the file, <code>false</code>
+ otherwise.
+ @see PDDocEnumFonts
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDFontIsEmbedded, (PDFont font))
+
+
+/**
+ Translates an array of 256 glyph advance widths (obtained
+ from PDFontGetWidths()) from their order in the PDF file into
+ host encoding order. If the widths are already in host encoding
+ order, the widths are merely copied. All un-encoded code
+ points are given a width of zero.
+
+ <p>For non-Roman character set viewers, it is not appropriate
+ to call this method. </p>
+ @param font IN/OUT The font whose glyph widths are translated.
+
+ @param inP IN/OUT The array of glyph advance widths to rearrange.
+
+ @param outP IN/OUT (Filled by the method) The rearranged array of
+ glyph advance widths.
+ @see PDFontGetWidths
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDFontXlateWidths, (PDFont font, ASInt16 *inP, ASInt16 *outP))
+
+/**
+ Translates a string from the PDFont's encoding into host
+ encoding. If any characters cannot be represented in host
+ encoding, they are replaced with space characters. If no
+ XlateTable exists in the font, the function returns <code>false</code>
+ and <code>outP</code> is not written.
+
+ <p>For non-Roman character set viewers, it is not appropriate
+ to call this method. Instead call one of the following:
+ PDFontXlateToHost(), PDFontXlateToUCS(), PDXlateToHostEx(), or
+ PDXlateToPDFDocEncEx(). </p>
+ @param font The font (and hence, the encoding) that <code>inP</code> uses.
+
+ @param inP The string to translate.
+ @param outP (Filled by the method) The translated string.
+ <code>outP</code> may point to the same buffer as <code>inP</code>, to allow in-place
+ translation.
+ @param len The length of <code>inP</code> and <code>outP</code>.
+ @return <code>true</code> if an XlateTable exists in the font, <code>false</code>
+ otherwise. If no XlateTable exists in the font, <code>outP</code> is
+ not written.
+ @see PDFontXlateToHost
+ @see PDFontAcquireXlateTable
+ @see PDFontXlateToUCS
+ @see PDXlateToHostEx
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDFontXlateString, (PDFont font, ASUns8 *inP, ASUns8 *outP, ASInt32 len))
+
+/**
+ Increments the specified font's XlateTable reference count
+ and also returns the XlateTable, which is a 256-entry table
+ that maps characters from their encoding in the PDF file
+ to host encoding. If a character cannot be mapped to host
+ encoding, then the table entry will (for that character)
+ contain <code>-1</code>. When you are done using the XlateTable, call
+ PDFontXlateTableRelease() to release it.
+
+ <p>For non-Roman character set viewers, it is not appropriate
+ to call this method. </p>
+ @param font IN/OUT The font whose XlateTable is obtained.
+ @return A pointer to the font's XlateTable, if any. Otherwise it returns <code>NULL</code>.
+
+ @see PDFontXlateTableRelease
+ @see PDFontXlateString
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt16 *, PDFontAcquireXlateTable, (PDFont font))
+
+/**
+ Decrements the specified font's XlateTable reference count.
+ The XlateTable is a 256-entry table that maps characters
+ from their encoding in the PDF file to host encoding. If
+ a character cannot be mapped to host encoding, then the
+ table entry will (for that character) contain <code>-1</code>.
+ @param table IN/OUT The XlateTable to release.
+ @see PDFontAcquireXlateTable
+ @see PDFontXlateString
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDFontXlateTableRelease, (ASInt16 *table))
+
+
+/**
+ Gets a font's matrix, which specifies the transformation
+ from character space to text space. See Section 5.5.4 in
+ the <i>PDF Reference</i>. This is only valid for Type 3 fonts.
+
+ @param fontP IN/OUT The font whose matrix is obtained.
+ @param matrixP IN/OUT (Filled by the method) A pointer to the font's
+ matrix.
+ @see PDDocEnumFonts
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDFontGetFontMatrix, (PDFont fontP, ASFixedMatrix *matrixP))
+
+/**
+ Sets a font's metrics, which provide the information needed
+ to create a substitute Multiple Master font when the original
+ font is unavailable. See Section 5.7 in the <i>PDF Reference</i>
+ for a discussion of font descriptors. This method can only
+ be used on Type 1, Multiple Master Type 1, and TrueType
+ fonts; it cannot be used on Type 3 fonts.
+ @param font IN/OUT The font whose metrics are being set.
+ @param metricsP IN/OUT A pointer to a PDFontMetrics structure containing
+ the font's metrics.
+ @param sizeMetrics IN/OUT It must be <code>sizeof(PDFontMetrics)</code>.
+ @see PDFontGetMetrics
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDFontSetMetrics, (PDFont font, PDFontMetricsP metricsP, os_size_t sizeMetrics))
+
+/**
+ Gets the Cos object for a font. This method does not copy
+ the object, but is instead the logical equivalent of a type
+ cast.
+ @param font IN/OUT The font whose Cos object is obtained.
+ @return The dictionary Cos object for the font. The dictionary's
+ contents may be enumerated with CosObjEnum().
+ @see PDDocEnumFonts
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(CosObj, PDFontGetCosObj, (PDFont font))
+
+
+/**
+ Broadcasts a PDPageContentsDidChange() notification. If the
+ Acrobat viewer is version 2.1 or later, also broadcasts
+ a PDPageContentsDidChangeEx() notification with <code>invalidateViews</code>
+ set to <code>true</code>.
+
+ <p>You must use this method after using Cos methods to change
+ a page's contents. Do not use this method if you use PDPageAddCosContents()
+ or PDPageRemoveCosContents() to change a page's contents,
+ because those methods automatically generate the appropriate
+ notifications. </p>
+
+ <p>Use PDPageNotifyContentsDidChangeEx() instead of this method
+ if you wish to suppress the Acrobat viewer's immediate redraw
+ of the page. </p>
+ @param page IN/OUT The page that changed.
+ @notify PDPageContentsDidChange
+ @notify PDPageContentsDidChangeEx (in version 2.1 and later)
+ @see PDPageAddCosContents
+ @see PDPageRemoveCosContents
+ @see PDPageNotifyContentsDidChangeEx
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDPageNotifyContentsDidChange, (PDPage page))
+
+
+/**
+ Gets the page number for the specified page.
+ @param page IN/OUT The page whose page number is obtained.
+ @return The page within the document. The first page is <code>0</code>.
+ @see PDPageNumFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDPageGetNumber, (PDPage page))
+
+/**
+ Decrements the specified page's reference count.
+ @param page IN/OUT The page whose reference count is decremented.
+
+ @see PDBeadAcquirePage
+ @see PDDocAcquirePage
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDPageRelease, (PDPage page))
+
+/**
+ Gets the document that contains the specified page.
+ @param page IN/OUT The page whose document is obtained.
+ @return The document that contains the page.
+ @see PDDocAcquirePage
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDDoc, PDPageGetDoc, (PDPage page))
+
+/**
+ Gets the dictionary Cos object associated with a page. This
+ method does not copy the object, but is instead the logical
+ equivalent of a type cast.
+ @param page IN/OUT The page whose Cos object is obtained.
+ @return The dictionary Cos object associated with page.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(CosObj, PDPageGetCosObj, (PDPage page))
+
+/**
+ Gets the page number of the page specified by a Cos object.
+
+ @param pageObj IN/OUT The dictionary Cos object for the page whose
+ number is obtained.
+ @return The page within the document (the first page in a document is page number zero).
+ @note Do not call this method with a <code>NULL</code> Cos object.
+ @see PDPageGetNumber
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDPageNumFromCosObj, (CosObj pageObj))
+
+
+/**
+ Gets the rotation value for a page.
+ @param page IN/OUT The page whose rotation is obtained.
+ @return Rotation value for the given page. It must be one of the PDRotate
+ values.
+ @see PDPageSetRotate
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDRotate, PDPageGetRotate, (PDPage page))
+
+/**
+ Sets the rotation value for a page.
+ @param page The page whose rotation is set.
+ @param angle Rotation value to be set for a given page. It must be one of the
+ PDRotate values.
+ @notify PDDocWillChangePages
+ @notify PDDocDidChangePages
+ @see PDPageGetRotate
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDPageSetRotate, (PDPage page, PDRotate angle))
+
+/**
+ Gets the media box for a page. The media box is the <i>natural
+ size</i> of the page (for example, the dimensions of an A4
+ sheet of paper).
+ @param page IN/OUT The page whose media box is obtained.
+ @param mediaBoxP IN/OUT (Filled by the method) A pointer to a rectangle
+ specifying the page's media box, specified in user space
+ coordinates.
+ @see PDPageSetMediaBox
+ @see PDPageGetCropBox
+ @see PDPageGetBBox
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDPageGetMediaBox, (PDPage page, ASFixedRect *mediaBoxP))
+
+/**
+ Sets the media box for a page. The media box is the <i>natural
+ size</i> of the page, for example, the dimensions of an A4
+ sheet of paper.
+ @param page IN/OUT The page whose media box is set.
+ @param mediaBox IN/OUT Rectangle specifying the page's media box,
+ specified in user space coordinates.
+ @notify PDDocWillChangePages
+ @notify PDDocDidChangePages
+ @see PDPageGetMediaBox
+ @see PDPageSetCropBox
+ @see PDPageGetBBox
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDPageSetMediaBox, (PDPage page, ASFixedRect mediaBox))
+
+/**
+ Gets the crop box for a page. The crop box is the region
+ of the page to display and print.
+ @param page The page whose crop box is obtained.
+ @param cropBoxP (Filled by the method) A pointer to a rectangle
+ specifying the page's crop box, specified in user space
+ coordinates.
+ @see PDPageSetCropBox
+ @see PDPageGetMediaBox
+ @see PDPageGetBBox
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDPageGetCropBox, (PDPage page, ASFixedRect *cropBoxP))
+
+/**
+ Sets the crop box for a page. The crop box is the region
+ of the page to display and print. This method ignores the
+ request if either the width or height of cropBox is less
+ than 72 points (one inch).
+ @param page The page whose crop box is set.
+ @param cropBox A rectangle specifying the page's crop box,
+ specified in user space coordinates.
+ @notify PDDocWillChangePages
+ @notify PDDocDidChangePages
+ @see PDPageGetCropBox
+ @see PDPageSetMediaBox
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDPageSetCropBox, (PDPage page, ASFixedRect cropBox))
+
+/**
+ Gets the bounding box for a page. The bounding box is the
+ rectangle that encloses all text, graphics, and images on
+ the page.
+ @param page The page whose bounding box is obtained.
+ @param bboxP (Filled by the method) A pointer to a rectangle
+ specifying the page's bounding box, specified in user space
+ coordinates.
+ @see PDPageGetMediaBox
+ @see PDPageGetCropBox
+ @see PDPageGetVisibleBBox
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDPageGetBBox, (PDPage page, ASFixedRect *bboxP))
+
+/**
+ Gets the matrix that transforms user space coordinates to
+ rotated and cropped coordinates. The origin of this space
+ is the bottom-left of the rotated, cropped page. <code>Y</code> is increasing.
+
+ @param pdPage The page whose default transformation matrix
+ is obtained.
+ @param defaultMatrix (Filled by the method) A pointer to
+ the default transformation matrix.
+ @see PDPageGetFlippedMatrix
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDPageGetDefaultMatrix, (PDPage pdPage, ASFixedMatrix *defaultMatrix))
+
+/**
+ Gets the matrix that transforms user space coordinates to
+ rotated and cropped coordinates. The origin of this space
+ is the top-left of the rotated, cropped page. <code>Y</code> is decreasing.
+
+ @param pdPage The page whose flipped transformation matrix
+ is obtained.
+ @param flipped (Filled by the method) A pointer to the flipped
+ transformation matrix.
+ @see PDPageGetDefaultMatrix
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDPageGetFlippedMatrix, (PDPage pdPage, ASFixedMatrix *flipped))
+
+
+/**
+ Draws the contents of a page into the specified window.
+
+ <p>This method just draws a bitmap to the window. If you want
+ a live document, you need to open an AVDoc for the PDF file. </p>
+
+ <p>The page can also be derived from a PDDoc. </p>
+
+ <p>On UNIX, this method cannot be used to draw into a window.
+ UNIX developers should instead use AVDocOpenFromASFileWithParamString()
+ to draw PDF files into their own window from a client. </p>
+ @param page The page to draw into <code>window</code>.
+ @param window A pointer to a platform-dependent window object
+ (<code>HWND</code> on Windows, or <code>WindowPtr</code> or <code>CWindowPtr</code> on Mac OS).
+ On Windows, to draw into an offscreen <code>DC</code>, pass <code>NULL</code> for <code>window</code>.
+ On Mac OS, to draw into an offscreen <code>GWorld</code>, pass <code>NULL</code> in
+ <code>window</code> and pass the <code>GWorldPtr</code> in <code>displayContext</code>.
+ @param displayContext A platform-dependent display context
+ structure (<code>HDC</code> on Windows, <code>GWorldPtr</code> on Mac OS). On Mac OS,
+ <code>displayContext</code> is ignored if <code>window</code> is non-<code>NULL</code>. Note that
+ <code>displayContext</code> cannot be reliably used as the <code>hDC</code> for a
+ printer device.
+ @param isDPS Currently unused. Always set it to <code>false</code>.
+ @param matrix A pointer to the matrix to concatenate onto
+ the default page matrix. It is useful for converting from
+ page to window coordinates and for scaling.
+ @param updateRect A pointer to the rectangle to draw, defined
+ in user space coordinates. Any objects outside of <code>updateRect</code>
+ will not be drawn. All objects are drawn if <code>updateRect</code> is
+ <code>NULL</code>.
+ @param cancelProc The procedure called periodically to check
+ for the user's cancelling of the drawing operation. The default cancel
+ proc can be obtained using AVAppGetCancelProc(). It may be <code>NULL</code>,
+ in which case no cancel proc is used.
+ @param cancelProcClientData A pointer to user-supplied data
+ to pass to <code>cancelProc</code> each time it is called. It should be
+ <code>NULL</code> if <code>cancelProc</code> is <code>NULL</code>.
+ @see AVAppGetCancelProc
+ @see PDDrawCosObjToWindow
+ @see PDPageDrawContentsToWindowEx
+
+ @note This method cannot be reliably used to print to a
+ device.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDPageDrawContentsToWindow, (PDPage page, void *window, void *displayContext,
+ ASBool isDPS, ASFixedMatrix *matrix, ASFixedRect *updateRect, CancelProc cancelProc, void *cancelProcClientData))
+
+
+/**
+ Gets the <code>annotIndex</code> annotation on the page.
+ @param aPage IN/OUT The page on which the annotation is located.
+
+ @param annotIndex IN/OUT The index of the annotation to get on
+ a page. The first annotation on a page has an index of zero.
+
+ @return The indexed annotation object.
+ @see PDPageGetNumAnnots
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDAnnot, PDPageGetAnnot, (PDPage aPage, ASInt32 annotIndex))
+
+/**
+ Adds an annotation to the page. To make the annotation visible
+ after adding it, convert the coordinates of <code>initialRect</code>
+ to device coordinates using AVPageViewRectToDevice(), then
+ call AVPageViewInvalidateRect() using the converted rectangle.
+ This method is equivalent to calling PDPageCreateAnnot() followed
+ by PDPageAddAnnot().
+
+ <p>The PDPageWillAddAnnot() and PDPageDidAddAnnot() notifications
+ are broadcast before the PDPageAddNewAnnot() method returns.
+ If you want to finish formatting the annotation before these
+ notifications are called, for example, by adding additional
+ key-value pairs to the annotation dictionary, you should
+ call PDPageCreateAnnot() followed by PDPageAddAnnot() instead
+ of PDPageAddNewAnnot(). </p>
+ @param aPage The page to which the annotation is added.
+ @param addAfter Where to add the annotation in the page's
+ annotation array. See Section 8.4 in the <i>PDF Reference</i> for
+ a description of the annotation array. Passing a value of
+ <code>-2</code> adds the annotation to the end of the array (this is
+ generally what you should do unless you have a need to place
+ the annotation at a special location in the array). Passing
+ a value of <code>-1</code> adds the annotation to the beginning of the
+ array. Passing other negative values produces undefined
+ results.
+ @param subType The subtype of the annotation to add.
+ @param initialRect A pointer to a rectangle specifying the
+ annotation's bounds, specified in user space coordinates.
+ @return The newly created annotation.
+ @exception pdErrOpNotPermitted is raised if:
+
+ <ul>
+ <li>The annotation is of subtype Text and the document's permissions do not include pdPermEditNotes (see PDPerms). </li>
+ <li>The annotation is of any other subtype and the document's permissions do not include pdPermEdit. </li>
+ </ul>
+
+ @notify PDPageWillAddAnnot
+ @notify PDPageDidAddAnnot
+ @see PDPageCreateAnnot
+ @see PDPageAddAnnot
+ @see PDPageRemoveAnnot
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDAnnot, PDPageAddNewAnnot, (PDPage aPage, ASInt32 addAfter, ASAtom subType, const ASFixedRect *initialRect))
+
+/**
+ Adds an annotation at the specified location in a page's
+ annotation array.
+ @param aPage The page to which the annotation is added.
+
+ @param addAfter The index into the page's annotation array
+ where the annotation is added. See Section 8.4 in the PDF
+ Reference for a description of the annotation array. The
+ first annotation in the array has an index of zero. Passing
+ a value of <code>-2</code> adds the annotation to the end of the array.
+ Passing other negative values produces undefined results.
+
+ @param annot The annotation to add.
+ @exception pdErrOpNotPermitted is raised if:
+ <ul>
+ <li>The annotation is of subtype Text and the document's permissions do not include pdPermEditNotes (see PDPerms). </li>
+ <li>The annotation is of any other subtype and the document's permissions do not include pdPermEdit. </li>
+ </ul>
+ @notify PDPageWillAddAnnot
+ @notify PDPageDidAddAnnot
+ @see PDPageCreateAnnot
+ @see PDPageAddNewAnnot
+ @see PDPageRemoveAnnot
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDPageAddAnnot, (PDPage aPage, ASInt32 addAfter, PDAnnot annot))
+
+/**
+ Removes an annotation from the specified page. Annotations
+ are stored in Cos arrays, which are automatically compressed
+ when an annotation is removed (see CosArrayRemove()). For
+ this reason, if you use a loop in which you remove annotations,
+ structure the code so the loop processes from the highest
+ to the lowest index. If you loop the other direction, you
+ will skip over annotations immediately following ones you
+ remove.
+ @param aPage The page from which the annotation is removed.
+
+ @param annotIndex The index (into the page's annotation
+ array) of the annotation to remove.
+ @exception pdErrOpNotPermitted is raised if:
+ <ul>
+ <li>The annotation is of subtype Text and the document's permissions
+ do not include pdPermEditNotes (see PDPerms). </li>
+ <li>The annotation is of any other subtype and the document's
+ permissions do not include pdPermEdit. </li>
+ </ul>
+ @notify PDPageWillRemoveAnnot
+ @notify PDPageDidRemoveAnnot
+ @see PDPageGetAnnotIndex
+ @see PDPageAddNewAnnot
+ @see PDPageAddAnnot
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDPageRemoveAnnot, (PDPage aPage, ASInt32 annotIndex))
+
+/**
+ Gets the index of a given annotation object on a given page.
+
+ @param aPage IN/OUT The page to which the annotation is attached.
+
+ @param anAnnot IN/OUT The annotation whose index is obtained.
+
+ @return The annotation's index. It returns <code>-1</code> if the annotation is
+ not on the page.
+ @see PDPageGetAnnot
+ @see PDPageGetAnnotSequence
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDPageGetAnnotIndex, (PDPage aPage, PDAnnot anAnnot))
+
+/**
+ Gets the number of annotations on a page. Annotations associated
+ with pop-up windows (such as strikeouts) are counted as
+ two annotations. Widget annotations (form fields) are included
+ in the count.
+ @param aPage The page for which the number of annotations
+ is obtained.
+ @return The number of annotations on <code>aPage</code>.
+ @see PDPageGetAnnot
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASInt32, PDPageGetNumAnnots, (PDPage aPage))
+
+
+/**
+ Gets the Cos object corresponding to a page's resource dictionary.
+ A page's resource Cos object may either be directly in the
+ Page Cos object and apply only to the page. Or, it may be
+ in the Pages tree, be shared by multiple pages, and applies
+ to all Page nodes below the point in the Pages tree where
+ it is located.
+ @param page IN/OUT The page whose Cos resources are obtained.
+
+ @return The dictionary Cos object associated with the page's resource.
+
+ @see PDPageAddCosResource
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(CosObj, PDPageGetCosResources, (PDPage page))
+
+/**
+ Adds a Cos resource to a page object. See Section 3.7.2
+ in the <i>PDF Reference</i> for a description of page resources.
+
+ <p>The necessary dictionaries are created automatically if
+ the page does not already have any resources of the type
+ specified by <code>resType</code>, or does not have a Resources dictionary.
+ For example, if you specify a font resource, but the page
+ does not already have a font resource dictionary, this method
+ automatically creates one and puts the font you specify
+ into it. </p>
+
+ <p>ProcSet resources cannot be added using this method; they
+ must be added using Cos-level methods to: </p>
+
+ <ul>
+ <li>Get the page's Resources dictionary. </li>
+ <li>Get the ProcSet array from the Resources dictionary. </li>
+ <li>Add an element to the ProcSet array. </li>
+ </ul>
+
+ @param page The page to which a resource is added.
+ @param resType The resource type. The named resource types
+ in PDF are: ExtGState, ColorSpace, Pattern, Shading, XObject,
+ Font, and Properties. Although ProcSet is also a valid resource
+ type, it cannot be added by this method.
+ @param resName The resource name (for example, the name of
+ a font might be <code>F1</code>).
+ @param resObj The Cos object being added as a resource
+ to page.
+ @notify PDDocDidChangePages
+ @see PDPageRemoveCosResource
+ @see PDPageGetCosResources
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDPageAddCosResource, (PDPage page, char *resType, char *resName, CosObj resObj))
+
+/**
+ Completely replaces the contents of the specified page with
+ <code>newContents</code>.
+ @param page IN/OUT The page whose Cos contents are replaced.
+ @param newContents IN/OUT A stream Cos object or an array Cos
+ object containing the new contents (stream Cos objects)
+ for <code>page</code>.
+ @notify PDDocDidChangePages
+ @see PDPageRemoveCosContents
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDPageAddCosContents, (PDPage page, CosObj newContents))
+
+/**
+ Removes a Cos resource from a page object. See Section 3.7.2
+ in the <i>PDF Reference</i> for a description of page resources.
+
+ @param page The page whose Cos resources are removed.
+
+ @param resType The resource type. The named
+ resource types in PDF are: ExtGState, ColorSpace, Pattern,
+ Shading, XObject, Font, ProcSet, and Properties.
+ @param resName The resource name (for example, the name of
+ a font might be <code>F1</code>).
+ @notify PDDocDidChangePages
+ @see PDPageAddCosResource
+ @see PDPageGetCosResources
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDPageRemoveCosResource, (PDPage page, char *resType, char *resName))
+
+/**
+ Removes the contents of the specified page.
+ @param page IN/OUT The page whose Cos contents are removed.
+ @notify PDDocDidChangePages
+ @see PDPageAddCosContents
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDPageRemoveCosContents, (PDPage page))
+
+/* PDPageEnumResources is obsolete as of Acrobat 4.0. Please use the PDFEdit API. */
+
+/**
+ (Obsolete, provided only for backwards compatibility) Enumerates
+ the page's resources, calling an enumeration procedure for
+ each resource.
+
+ <p>Instead of this method, use PDDocEnumOCGs(). </p>
+
+ @param page The page whose Cos resources are enumerated.
+
+ @param mon A pointer to a structure containing user-supplied
+ callbacks that are called for each of the page's resources.
+ Enumeration ends if any procedure returns <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to each procedure in <code>mon</code> when it is called.
+ @see PDDocEnumOCGs
+ @see PDPageGetCosResources
+
+ @note This method is provided only for backwards compatibility.
+ It has not been updated beyond PDF Version 1.1 and may not
+ work correctly for newly created PDF 1.2 or later files.
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDPageEnumResources, (PDPage page, PDResourceEnumMonitor mon, void *clientData))
+
+/**
+ Enumerates the contents of a page, calling a procedure for
+ each drawing object in the page description.
+
+ @param page IN/OUT The page whose contents are enumerated.
+ @param mon IN/OUT A pointer to a structure containing user-supplied
+ callbacks that are called for each drawing operator on a
+ page. Enumeration ends if any procedure returns <code>false</code>.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>mon</code> each time it is called.
+
+ @note This method is provided only for backwards compatibility.
+ It has not been updated beyond PDF Version 1.1 and may not
+ work correctly for newly created PDF 1.2 or later files.
+ You should use the PDFEdit API to enumerate page contents.
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDPageEnumContents, (PDPage page, PDGraphicEnumMonitor mon, void *clientData))
+
+
+/**
+ Gets a bounding box for the specified graphic object.
+ @param obj The graphic object whose bounding box is obtained.
+
+ @param bboxP (Filled by the method) A pointer to a rectangle
+ containing the bounding box for <code>obj</code>. If it is called during PDFormEnumPaintProc()
+ or PDCharProcEnum(), the coordinates are specified in the
+ object space, meaning that they are relative to the object's matrix.
+ @see PDCharProcEnum
+ @see PDFormEnumPaintProc
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDGraphicGetBBox, (PDGraphic obj, ASFixedRect *bboxP))
+
+/**
+ Gets the current transformation matrix in effect for a graphic
+ object; the matrix is relative to user space.
+ @param obj IN/OUT The graphic object for which transformation
+ matrix is obtained.
+ @param matrix IN/OUT (Filled by the method) A pointer to a matrix
+ containing the transformation matrix for <code>obj</code>.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDGraphicGetCurrentMatrix, (PDGraphic obj, ASFixedMatrix *matrix))
+
+/**
+ Gets the graphics state associated with a graphic object.
+ See Section 4.3 in the <i>PDF Reference</i> for a discussion of
+ the graphics state parameters.
+ @param obj IN/OUT The graphic object whose graphics state is obtained.
+
+ @param stateP IN/OUT (Filled by the method) A pointer to a PDGraphicState
+ structure containing the graphics state.
+ @param stateLen IN/OUT It must be <code>sizeof(PDGraphicsState)</code>.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDGraphicGetState, (PDGraphic obj, PDGraphicStateP stateP, ASInt32 stateLen))
+
+/**
+ Enumerates the strings of a text object, calling a procedure
+ for each string. The PDText object may be obtained from
+ the PDGraphicEnumTextProc() callback of PDGraphicEnumMonitor.
+
+ @param text IN/OUT The text object whose strings are enumerated.
+
+ @param enumProc IN/OUT A user-supplied callback to call for each
+ text string in the text object. Enumeration ends if <code>enumProc</code>
+ returns <code>false</code>.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDTextEnum, (PDText text, PDStringEnumProc enumProc, void *clientData))
+
+/**
+ Gets the text state for a text object. See Section 5.2 in
+ the <i>PDF Reference</i> for a discussion of the text state parameters.
+
+ @param obj IN/OUT The text object whose text state is obtained.
+
+ @param stateP IN/OUT (Filled by the method) A pointer to a PDTextState
+ structure containing the text state information.
+ @param stateLen IN/OUT It must be <code>sizeof(PDTextState)</code>.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDTextGetState, (PDText obj, PDTextStateP stateP, ASInt32 stateLen))
+
+/**
+ Enumerates the specified path's operators, calling one of
+ several user-supplied callbacks for each operator. The callback
+ that is called depends on which operator is encountered.
+
+ @param obj IN/OUT The path whose operators are enumerated.
+ @param mon IN/OUT A pointer to a structure that contains callbacks.
+ One of the callbacks will be called for each path segment
+ operator in the path. Enumeration ends if any of the monitor's
+ callbacks returns <code>false</code>.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to the monitor's callbacks each time one is called.
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDPathEnum, (PDPath obj, PDPathEnumMonitor mon, void *clientData))
+
+/**
+ Gets flags that indicate which paint/close/clip operators
+ are used for the specified path. For a description of the
+ path painting operators, see Section 4.4.2 in the <i>PDF Reference</i>.
+
+ @param obj IN/OUT The path whose painting operators are obtained.
+
+ @return A bit-wise <code>OR</code> of the PDPathPaintOp flags.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(ASInt32, PDPathGetPaintOp, (PDPath obj))
+
+/**
+ Gets an inline image's attributes.
+ @param obj IN/OUT The inline image whose attributes are obtained.
+
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDImageAttrs
+ structure containing the image attributes. Note that this structure
+ contains a Cos object that is subject to the warning below.
+
+ @param attrsLen IN/OUT It must be <code>sizeof(PDImageAttrs)</code>.
+ @see PDImageGetAttrs
+ @see PDInlineImageGetData
+
+ @note This method is provided only for backwards compatibility.
+ It has not been updated beyond PDF Version 1.1 and may not
+ work correctly for newly created PDF 1.2 or later files.
+ You should use the PDFEdit API to enumerate page contents.
+
+ @note The attribute for a color space is a CosObj. Cos objects
+ that are the result of parsing inline dictionaries in the
+ PDF page contents are a special class of Cos objects. You
+ should never depend on these objects lasting the lifetime
+ of the document. You should extract the information you
+ need from the object immediately and refer to it no further
+ in your code.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDInlineImageGetAttrs, (PDInlineImage obj, PDImageAttrsP attrsP, ASInt32 attrsLen))
+
+/**
+ Gets the image data for an inline image.
+ @param obj IN/OUT The inline image whose data is obtained.
+ @param data IN/OUT (Filled by the method) A buffer into which
+ the image data will be placed.
+ @param dataLen IN/OUT The number of bytes that <code>data</code> can hold. It must
+ be large enough to hold the entire inline image. Use PDInlineImageGetAttrs()
+ to determine how much data is in the image.
+ @exception genErrBadParm is raised if <code>dataLen</code> is less than the amount of data in the image.
+ @see PDInlineImageGetAttrs
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDInlineImageGetData, (PDInlineImage obj, ASUns8 *data, ASInt32 dataLen))
+
+/**
+ Gets the lookup table for an indexed color space. The table
+ will contain the number of entries specified by the index
+ size, and there will be 1 byte for each color component
+ for each entry. The number of color components depends on
+ the color space:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Color</TH><TH>Number of components</TH></TR>
+ <TR><TD>gray</TD><TD>1</TD></TR>
+ <TR><TD>RGB</TD><TD>3</TD></TR>
+ <TR><TD>CMYK</TD><TD>4</TD></TR>
+ <TR><TD>Lab</TD><TD>3</TD></TR>
+ </TABLE>
+
+ <p>For additional information on indexed color space, see Section 4.5.5 in
+ the <i>PDF Reference</i>. There is also some useful discussion
+ in the <i>PostScript Language Reference Manual</i>
+ under indexed color spaces. </p>
+ @param image IN/OUT The inline image whose lookup table is obtained.
+ @param data IN/OUT (Filled by the method) The lookup table for
+ image.
+ @param dataLen IN/OUT The length of <code>data</code> in bytes.
+ @see PDImageColorSpaceGetIndexLookup
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDInlineImageColorSpaceGetIndexLookup, (PDInlineImage image, ASUns8 *data, ASInt32 dataLen))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Gets
+ the subtype of an XObject. Examples of a subtype are Image
+ and Form.
+ @param xObj The XObject whose subtype is obtained.
+ @return The ASAtom corresponding to the XObject's subtype. It can be
+ converted into a string using ASAtomGetString().
+ @see PDXObjectGetData
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(ASAtom, PDXObjectGetSubtype, (PDXObject xObj))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Gets
+ the Cos object associated with an XObject. This method does
+ not copy the object, but is instead the logical equivalent
+ of a type cast.
+ @param xObj The XObject whose Cos object is obtained.
+ @return The dictionary Cos object for the XObject.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(CosObj, PDXObjectGetCosObj, (PDXObject xObj))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Gets
+ the value of the XObject stream's <code>length</code> key, which specifies
+ the amount of data in the PDF file (that is, after all compression/encoding
+ filters have been applied).
+ @param xObj The XObject whose data length is obtained.
+ @return The XObject's data length.
+ @see PDXObjectGetData
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(ASInt32, PDXObjectGetDataLength, (PDXObject xObj))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Passes
+ the data from an XObject to a user-supplied procedure.
+ @param obj The XObject whose data is read.
+ @param getDataProc A user-supplied callback to call with
+ the XObject's data. Enumeration ends if <code>getDataProc</code> returns
+ <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>getDataProc</code>.
+ @see PDXObjectGetDataLength
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDXObjectGetData, (PDXObject obj, PDGetDataProc getDataProc, void *clientData))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Enumerates
+ the filters attached to an XObject, calling a user-supplied
+ procedure for each filter.
+ @param obj The XObject whose filters are enumerated.
+ @param proc A user-supplied callback to call for each filter
+ attached to the XObject. Enumeration ends if <code>proc</code> returns
+ <code>false</code>. <code>proc</code> will not be called if there are no filters attached
+ to the XObject.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDXObjectEnumFilters, (PDXObject obj, PDXObjectFilterEnumProc proc, void *clientData))
+
+/**
+ (Obsolete, provided only for backwards compatibility. Use
+ PDEImageGetAttrs and/or Cos-level calls instead.) Gets the
+ attributes of an image (for example, Type, Subtype, Name,
+ Width, Height, BitsPerComponent, ColorSpace, Decode, Interpolate, or
+ ImageMask).
+ @param obj The image whose attributes are obtained.
+ @param attrsP (Filled by the method) A pointer to a PDImageAttrs
+ structure containing the image attributes.
+ @param attrsLen It must be <code>sizeof(PDImageAttrs)</code>.
+ @see PDInlineImageGetAttrs
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDImageGetAttrs, (PDXObject obj, PDImageAttrsP attrsP, ASInt32 attrsLen))
+
+/**
+ (Obsolete, provided only for backwards compatibility)
+ Gets the lookup table for an indexed color space. The table
+ will contain the number of entries specified by the index
+ size, and there will be 1 byte for each color component
+ for each entry. The number of color components depends on
+ the color space:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Color</TH><TH>Number of components</TH></TR>
+ <TR><TD>gray</TD><TD>1</TD></TR>
+ <TR><TD>RGB</TD><TD>3</TD></TR>
+ <TR><TD>CMYK</TD><TD>4</TD></TR>
+ <TR><TD>Lab</TD><TD>3</TD></TR>
+ </TABLE>
+
+ <p>For additional information on indexed color space, see Section 4.5.5 in
+ the <i>PDF Reference</i>. There is also some useful discussion
+ in the <i>PostScript Language Reference Manual</i>
+ under indexed color spaces. </p>
+
+ @param xobj The image whose lookup table is obtained.
+ @param data (Filled by the method) An array for the returned
+ color space information.
+ @param dataLen The length of data in bytes.
+ @see PDInlineImageColorSpaceGetIndexLookup
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDImageColorSpaceGetIndexLookup, (PDXObject xobj, ASUns8 *data, ASInt32 dataLen))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Gets
+ the value of a form's FormType attribute.
+ @param obj The form whose type is obtained.
+ @return The form type (the value of the PDF FormType key). This value is
+ <code>1</code> for PDF 1.0, 1.1, and 1.2.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(ASInt32, PDFormGetFormType, (PDXObject obj))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Gets
+ a form's bounding box.
+ @param obj The form whose bounding box is obtained.
+ @param bboxP (Filled by the method) A pointer to a rectangle
+ containing the form's bounding box, specified in user space
+ coordinates.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDFormGetBBox, (PDXObject obj, ASFixedRect *bboxP))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Gets
+ the specified form's transformation matrix.
+ @param obj The form whose transformation matrix is obtained.
+
+ @param matrixP (Filled by the method) A pointer to a matrix
+ containing the form's transformation matrix, which specifies
+ the transformation from form space to user space. See Section
+ 4.9 in the <i>PDF Reference</i>.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDFormGetMatrix, (PDXObject obj, ASFixedMatrix *matrixP))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Gets
+ the array Cos object corresponding to a form's XUID. An
+ XUID is an array of numbers that uniquely identify the form
+ in order to allow it to be cached.
+ @param obj The form whose XUID is obtained.
+ @return The array Cos object for the form's XUID.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(CosObj, PDFormGetXUIDCosObj, (PDXObject obj))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Enumerates
+ the resources used by a form.
+ @param obj The form whose resources are enumerated.
+ @param mon A structure containing user-supplied callbacks
+ that are called for each of the form's resources. Enumeration
+ ends if any procedure returns <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>mon</code> each time it is called.
+ @see PDFormEnumPaintProc
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDFormEnumResources, (PDXObject obj, PDResourceEnumMonitor mon, void *clientData))
+
+/**
+ (Obsolete, provided only for backwards compatibility) Enumerates
+ a form's drawing operations.
+ @param obj The form whose drawing operations are enumerated.
+
+ @param mon A structure containing user-supplied callbacks
+ that are called for each drawing operator on a page. Enumeration
+ ends if any procedure returns <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>mon</code> each time it is called.
+ @see PDFormEnumResources
+ @see PDFormEnumPaintProcWithParams
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDFormEnumPaintProc, (PDXObject obj, PDGraphicEnumMonitor mon, void *clientData))
+
+/**
+ Enumerates a Type 3 font's character drawing procedures.
+ The elements of a single character procedure can be enumerated
+ using PDCharProcEnum().
+ @param font IN/OUT The Type 3 font's character drawing procedures
+ are being enumerated.
+ @param proc IN/OUT A user-supplied callback to call for each character
+ in the font. Enumeration ends if <code>proc</code> returns <code>false</code>. If
+ the font contains no characters, <code>proc</code> will not be called.
+
+ @param clientData IN/OUT A pointer to user-supplied data passed
+ to <code>proc</code> each time it is called.
+ @see PDCharProcEnum
+ @see PDDocEnumFonts
+ @see PDDocEnumLoadedFonts
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(void, PDFontEnumCharProcs, (PDFont font, PDCharProcEnumProc proc, void *clientData))
+
+/**
+ Enumerates the graphic description of a single character
+ procedure for a Type 3 font. To enumerate all the character
+ procedures in a Type 3 font (but not their graphic descriptions),
+ use PDFontEnumCharProcs().
+ @param obj The character procedure whose graphic
+ description is enumerated.
+ @param mon A pointer to a structure containing user-supplied
+ callbacks that are called for each drawing operator on a
+ page. Enumeration halts if any procedure returns <code>false</code>.
+
+ @param clientData A pointer to user-supplied data to pass
+ to each monitor routine that is called.
+ @see PDCharProcEnumWithParams
+ @see PDFontEnumCharProcs
+ @see PDDocEnumFonts
+ @see PDDocEnumLoadedFonts
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+ENPROC(void, PDCharProcEnum, (PDCharProc obj, PDGraphicEnumMonitor mon, void *clientData))
+
+/**
+ Get the stream Cos object associated with the PDCharProc.
+ This method does not copy the object, but is instead the
+ logical equivalent of a type cast.
+ @param obj IN/OUT The character procedure whose Cos object is
+ obtained.
+ @return The character procedure's stream Cos object.
+ @see PDFontEnumCharProcs
+ @see PDCharProcEnum
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+ENPROC(CosObj, PDCharProcGetCosObj, (PDCharProc obj))
+
+
+/**
+ Creates a new article thread. Use PDDocAddThread() to add
+ the thread to a document.
+ @param aDocP The document in which the thread is created.
+ @return The newly created thread.
+ @see PDThreadDestroy
+ @see PDThreadFromCosObj
+ @see PDDocAddThread
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDThread, PDThreadNew, (PDDoc aDocP))
+
+/**
+ Deletes an article thread from its document. You must call
+ PDDocRemoveThread() to remove the thread from the document
+ (if it was added to one using PDDocAddThread()) before calling
+ PDThreadDestroy().
+ @param thread IN/OUT The thread to destroy.
+ @see PDThreadNew
+ @see PDThreadFromCosObj
+ @see PDDocRemoveThread
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDThreadDestroy, (PDThread thread))
+
+/**
+ Gets an article thread's first bead.
+ @param thread IN/OUT The thread whose first bead is obtained.
+
+ @return The thread's first bead, or a <code>NULL</code> Cos object if the thread
+ has no beads.
+ @see PDThreadSetFirstBead
+ @see PDBeadGetNext
+ @see PDBeadGetPrev
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDBead, PDThreadGetFirstBead, (PDThread thread))
+
+/**
+ Sets an article thread's first bead.
+ @param thread IN/OUT The thread whose first bead is set.
+ @param newFirstBead IN/OUT The bead to use as the first in thread.
+
+ @see PDThreadGetFirstBead
+ @see PDBeadInsert
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDThreadSetFirstBead, (PDThread thread, PDBead newFirstBead))
+
+/**
+ Gets the specified article thread's info.
+
+ @param thread IN/OUT The thread whose thread info is obtained.
+
+ @param infoKey IN/OUT The key whose value is obtained.
+ @param buffer IN/OUT (Filled by the method) The value associated
+ with <code>infoKey</code>.
+ @param bufSize IN/OUT The maximum number of characters that <code>buffer</code>
+ can hold.
+ @return The number of characters written into <code>buffer</code>.
+ @see PDThreadSetInfo
+
+ @note For Roman viewers, this text is always stored in the
+ <code>PDFDocEncoding</code>. For non-Roman character set viewers, this
+ text is stored as <code>PDFDocEncoding</code> or Unicode, depending on
+ the file's creator. Files created in a non-Roman environment
+ contain Unicode versions of these strings; in a Roman environment,
+ files contain <code>PDFDocEncoding</code> versions of these strings.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDThreadGetInfo, (PDThread thread, char *infoKey, char *buffer, ASInt32 bufSize))
+
+/**
+ Sets the specified article thread's info.
+
+ @param thread IN/OUT The thread whose thread info is set.
+ @param infoKey IN/OUT The key whose value is set.
+ @param buffer IN/OUT The value to set.
+ @param bufSize IN/OUT The number of characters in <code>buffer</code>.
+ @notify PDThreadDidChange
+ @see PDThreadGetInfo
+
+ @note For Roman viewers, this text is always stored in the
+ <code>PDFDocEncoding</code>. For non-Roman character set viewers, this
+ text is stored as <code>PDFDocEncoding</code> or Unicode, depending on
+ the file's creator. Files created in a non-Roman environment
+ contain Unicode versions of these strings; in a Roman environment,
+ files contain <code>PDFDocEncoding</code> versions of these strings.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDThreadSetInfo, (PDThread thread, char *infoKey, char *buffer, ASInt32 bufSize))
+
+/**
+ Tests whether a thread is valid. This is intended only to
+ ensure that the thread has not been deleted, not to ensure
+ that all necessary information is present and valid.
+ @param thread The thread whose validity is tested.
+ @return <code>true</code> if the thread is valid, <code>false</code> otherwise.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDThreadIsValid, (PDThread thread))
+
+/**
+ Gets the Cos object corresponding to a thread. This method
+ does not copy the object, but is instead the logical equivalent
+ of a type cast.
+ @param thread IN/OUT The thread whose Cos object is to obtained.
+
+ @return The dictionary Cos object for the thread. The contents of the
+ dictionary can be enumerated using CosObjEnum(). It returns a
+ <code>NULL</code> Cos object if <code>PDThreadIsValid(thread)</code> returns <code>false</code>.
+
+ @see CosObjEnum
+ @see PDThreadFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(CosObj, PDThreadGetCosObj, (PDThread thread))
+
+/**
+ Gets the thread object corresponding to the specified Cos
+ object. This method does not copy the object, but is instead
+ the logical equivalent of a type cast.
+ @param obj The dictionary Cos object for the thread.
+ @return The PDThread object for the thread.
+ @exception pdErrBadThread is raised if the thread is not valid as defined
+ by PDThreadIsValid.
+ @see PDThreadGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDThread, PDThreadFromCosObj, (CosObj obj))
+
+
+/**
+ Creates a new bead on the specified page. The newly created
+ bead is not linked to a thread or another bead. Use PDThreadSetFirstBead()
+ to make the bead the first bead in a thread. Use PDBeadInsert()
+ to link it to another bead.
+ @param page The page on which the bead is created.
+ @param destRect A pointer to a ASFixedRect specifying the
+ bead's bounding rectangle, specified in user space coordinates.
+ @return The newly created bead.
+ @see PDThreadSetFirstBead
+ @see PDBeadInsert
+ @see PDBeadFromCosObj
+ @see PDBeadDestroy
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDBead, PDBeadNew, (PDPage page, const ASFixedRectP destRect))
+
+/**
+ Destroys a bead.
+ @param bead IN/OUT The bead to destroy.
+ @exception pdErrBadBead
+ @see PDBeadNew
+ @see PDBeadFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDBeadDestroy, (PDBead bead))
+
+/**
+ Gets the next bead in a thread.
+ @param bead IN/OUT The bead for which the next bead is obtained.
+
+ @return The next bead, or a <code>NULL</code> Cos object (cast to a PDBead using
+ PDBeadFromCosObj()). On the last bead, PDBeadGetNext() returns
+ the first bead.
+ @see PDBeadGetPrev
+ @see PDThreadGetFirstBead
+ @see PDBeadEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDBead, PDBeadGetNext, (PDBead bead))
+
+/**
+ Gets the previous bead in a thread.
+ @param bead IN/OUT The bead for which the previous bead is obtained.
+
+ @return The previous bead, or a <code>NULL</code> Cos object (cast to a PDBead
+ using PDBeadFromCosObj()) if this is the first bead in the
+ thread.
+ @see PDBeadGetNext
+ @see PDThreadGetFirstBead
+ @see PDBeadEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDBead, PDBeadGetPrev, (PDBead bead))
+
+/**
+ Inserts a bead after the specified bead.
+ @param bead IN/OUT The bead after which newNext will be inserted.
+
+ @param newNext IN/OUT The bead to insert.
+ @see PDBeadNew
+ @see PDThreadSetFirstBead
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDBeadInsert, (PDBead bead, PDBead newNext))
+
+/**
+ Acquires the page on which a bead is located.
+ @param bead IN/OUT The bead whose page is acquired.
+ @param pdDoc IN/OUT The document in which bead is located.
+ @return The page on which the bead resides. The acquired page must
+ be freed using PDPageRelease() when it is no longer needed.
+
+ @see PDPageRelease
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDPage, PDBeadAcquirePage, (PDBead bead, PDDoc pdDoc))
+
+/**
+ Sets the page for a bead.
+ @param bead IN/OUT The bead whose page is set.
+ @param newPage IN/OUT The page on which bead is located.
+ @exception pdErrBadBead
+ @see PDBeadSetRect
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDBeadSetPage, (PDBead bead, PDPage newPage))
+
+/**
+ Gets a bead's bounding rectangle.
+ @param bead IN/OUT The bead whose bounding rectangle is obtained.
+
+ @param rectP IN/OUT (Filled by the method) A pointer to a ASFixedRect
+ specifying the bead's bounding rectangle, specified in user
+ space coordinates.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDBeadGetRect, (PDBead bead, ASFixedRectP rectP))
+
+/**
+ Sets a bead's bounding rectangle.
+ @param bead IN/OUT The bead whose bounding rectangle is set.
+ @param newDestRect IN/OUT A pointer to a ASFixedRect specifying
+ the bead's bounding rectangle, specified in user space coordinates.
+
+ @see PDBeadGetRect
+ @see PDBeadSetPage
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDBeadSetRect, (PDBead bead, const ASFixedRectP newDestRect))
+
+/**
+ Tests a bead's validity. This is intended only to ensure
+ that the bead has not been deleted, not to ensure that all
+ necessary information is present and valid.
+ @param bead The bead whose validity is tested.
+ @return <code>true</code> if the bead is valid, <code>false</code> otherwise.
+ @see PDBeadEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDBeadIsValid, (PDBead bead))
+
+/**
+ Gets the thread containing the specified bead.
+ @param bead IN/OUT The bead whose thread is obtained.
+ @return The bead's thread, or a <code>NULL</code> Cos object if the bead does
+ not belong to a thread.
+ @see PDBeadGetRect
+ @see PDBeadGetIndex
+ @see PDBeadGetNext
+ @see PDBeadGetPrev
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDThread, PDBeadGetThread, (PDBead bead))
+
+/**
+ Gets the index of a bead in its thread.
+ @param bead IN/OUT The bead whose index is obtained.
+ @return The index of the bead in its thread. The first bead in a
+ thread has an index of zero.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDBeadGetIndex, (PDBead bead))
+
+/**
+ Tests two beads for equality. This method is useful to detect
+ the end of a thread since the last bead in a thread points
+ to the first.
+ @param bead The first bead to compare.
+ @param bead2 The second bead to compare.
+ @return <code>true</code> if the two beads are identical, <code>false</code> otherwise.
+ Two beads are equal only if their Cos objects are
+ equal (see CosObjEqual()).
+ @see CosObjEqual
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDBeadEqual, (PDBead bead, PDBead bead2))
+
+/**
+ Gets the Cos object corresponding to a bead. This method
+ does not copy the object, but is instead the logical equivalent
+ of a type cast.
+ @param bead IN/OUT The bead whose Cos object is obtained.
+ @return The dictionary Cos object for the bead. The contents of the
+ dictionary can be enumerated using CosObjEnum(). It returns a
+ <code>NULL</code> Cos object if <code>PDBeadIsValid(bead)</code> returns <code>false</code>.
+ @see PDBeadFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(CosObj, PDBeadGetCosObj, (PDBead bead))
+
+/**
+ Gets the PDBead corresponding to a Cos object, after checking
+ the bead's validity. This method does not copy the object,
+ but is instead the logical equivalent of a type cast.
+ @param obj The dictionary Cos object whose bead is obtained.
+ @return The PDBead object for the bead.
+ @exception pdErrBadBead is raised if the bead is not valid, as determined
+ by PDBeadIsValid().
+ @see PDBeadGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(PDBead, PDBeadFromCosObj, (CosObj obj))
+
+
+/**
+ Creates a new view destination object.
+ @param doc The document in which the destination is used.
+ @param initialPage The destination page.
+ @param initialFitType The destination fit type. It must be one
+ of the View Destination Fit Types, which must be converted
+ into an ASAtom with ASAtomFromString().
+ @param initialRect A pointer to an ASFixedRect specifying
+ the destination rectangle, specified in user space coordinates.
+ The appropriate information will be extracted from <code>initialRect</code>,
+ depending on <code>initialFitType</code>, to create the destination.
+ All four of the <code>initialRect</code> parameter's components should be set; using
+ PDViewDestNULL for any components can result in incorrect
+ results for rotated pages.
+ @param initialZoom The zoom factor to set for the destination.
+ Used only if <code>initialFitType</code> is <code>XYZ</code>. Use the predefined value
+ PDViewDestNULL (see PDExpT.h) to indicate a <code>NULL</code> zoom factor,
+ described in Table 8.2 in the <i>PDF Reference</i>.
+ @param pageNumber Currently unused.
+ @return The newly created view destination.
+ @see PDViewDestFromCosObj
+ @see PDViewDestDestroy
+ @ref ViewDestinationFitTypes
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDViewDestination, PDViewDestCreate, (PDDoc doc, PDPage initialPage, ASAtom initialFitType, const ASFixedRectP initialRect, const ASFixed
+ initialZoom, ASInt32 pageNumber))
+
+/**
+ Deletes a view destination object. Before deleting a view
+ destination, ensure that no link or bookmark refers to it.
+
+ @param dest IN/OUT The view destination to destroy.
+ @see PDViewDestFromCosObj
+ @see PDViewDestCreate
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDViewDestDestroy, (PDViewDestination dest))
+
+/**
+ Tests whether a view destination is valid. This is intended
+ only to ensure that the view destination has not been deleted,
+ not to ensure that all necessary information is present
+ and valid.
+ @param dest The view destination whose validity is determined.
+ @return <code>true</code> if the view destination is valid, <code>false</code> otherwise.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDViewDestIsValid, (PDViewDestination dest))
+
+/**
+ Gets a view destination's fit type, destination rectangle,
+ and zoom factor. The destination must be represented by
+ an array, which is the case for a GoToR action.
+ @param dest IN/OUT The view destination whose attributes are obtained.
+
+ @param pageNum IN/OUT (Filled by the method) The page number of
+ the destination's page.
+ @param fitType IN/OUT (Filled by the method) The destination fit type.
+ One of the values listed in View Destination Fit Types.
+
+ @param destRect IN/OUT (Filled by the method) A pointer to a ASFixedRect
+ containing the destination's rectangle, specified in user
+ space coordinates.
+ @param zoom IN/OUT (Filled by the method) The destination's zoom
+ factor.
+ @exception genErrBadParm is raised if the destination is not represented
+ by an array.
+ @see PDViewDestCreate
+ @ref ViewDestinationFitTypes
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDViewDestGetAttr, (PDViewDestination dest, ASInt32* pageNum, ASAtom *fitType, ASFixedRectP destRect, ASFixed *zoom))
+
+/**
+ Gets the Cos object corresponding to a view destination
+ and verifies that the view destination is valid. This method
+ does not copy the object, but is instead the logical equivalent
+ of a type cast.
+ @param dest IN/OUT The view destination whose Cos object is obtained.
+
+ @return Array Cos object for the view destination. The contents
+ of the array can be enumerated using CosObjEnum(). It returns
+ a <code>NULL</code> Cos object if the view destination is invalid, as
+ determined by PDViewDestIsValid().
+ @see PDViewDestFromCosObj
+ @see PDViewDestIsValid
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(CosObj, PDViewDestGetCosObj, (PDViewDestination dest))
+
+/**
+ Converts the specified Cos object to a view destination
+ and verifies that the view destination is valid. This method
+ does not copy the object, but is instead the logical equivalent
+ of a type cast.
+ @param obj IN/OUT The dictionary Cos object to convert to a view destination.
+
+ @return An array Cos object for the view destination.
+ @exception pdErrBadAction is raised if the destination is invalid, as
+ determined by PDViewDestIsValid().
+ @see PDViewDestGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDViewDestination, PDViewDestFromCosObj, (CosObj obj))
+
+
+/**
+ Deletes a text selection object (the text on the page remains
+ unchanged). Do not use this method to destroy a text selection
+ that was passed to AVDocSetSelection(); such text selections
+ are automatically destroyed when a new selection is made
+ or the selection is cleared.
+ @param text IN/OUT The text selection to destroy.
+ @see PDDocCreateTextSelect
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreateWordHilite
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDTextSelectDestroy, (PDTextSelect text))
+
+/**
+ Enumerates the bounding quads in a text selection. <code>proc</code>
+ is called for each quad. If a word is on a curve it may
+ have a quad for each character, but it may also have two
+ characters per quad. An upright word will have only one
+ quad for all the characters. An upright hyphenated word
+ will have two quads.
+ @param text IN/OUT The text selection whose bounding quads are
+ enumerated.
+ @param proc IN/OUT A user-supplied callback to call for each quad.
+ Enumeration halts if <code>proc</code> returns <code>false</code>.
+ @param procObj IN/OUT A user-supplied data to pass to <code>proc</code> each
+ time it is called.
+ @exception genErrBadParm
+ @see PDDocCreateTextSelect
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+SPROC(void, PDTextSelectEnumQuads, (PDTextSelect text, PDTextSelectEnumQuadProc proc, void *procObj), PDTextSelectEnumQuadsHost)
+
+/**
+ Enumerates the strings of the specified text select object,
+ calling a procedure for each string. A string, in this context,
+ is the set of like-styled characters within a word. It is
+ never larger than a single word. A word containing three
+ styles is enumerated as three strings. There is no guaranteed
+ correspondence between these strings and the actual show
+ strings in the PDF file. Acrobat enumerates text in the
+ order it appears in the PDF file, which is often not the
+ same as the order in which a person would read the text.
+
+ @param text IN/OUT The text selection whose strings are enumerated.
+
+ @param proc IN/OUT A user-supplied callback to call for each string
+ in the text object. Enumeration ends if <code>proc</code> returns <code>false</code>.
+
+ @param procObj IN/OUT User-supplied data to pass to <code>proc</code> each
+ time it is called.
+ @exception genErrBadParm
+ @exception pdErrOpNotPermitted
+ @see PDDocCreateTextSelect
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+SPROC(void, PDTextSelectEnumText, (PDTextSelect text, PDTextSelectEnumTextProc proc, void *procObj), PDTextSelectEnumTextHost)
+
+/**
+ Gets the page number of a text selection's page.
+ @param text IN/OUT The text selection whose page number is obtained.
+
+ @return The page number of the text selection's page.
+ @see PDTextSelectGetBoundingRect
+ @see PDTextSelectGetRange
+ @see PDTextSelectGetRangeCount
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDTextSelectGetPage, (PDTextSelect text))
+
+/**
+ Gets a text selection's bounding rectangle. This is the
+ smallest rectangle that completely encloses all characters
+ in the selection.
+ @param text IN/OUT The text selection whose bounding rectangle
+ is determined.
+ @param boundRectP IN/OUT (Filled by the method) A pointer to the
+ text selection's bounding rectangle, specified in user space
+ coordinates.
+ @see PDTextSelectGetPage
+ @see PDTextSelectGetRange
+ @see PDTextSelectGetRangeCount
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+SPROC(void, PDTextSelectGetBoundingRect, (PDTextSelect text, ASFixedRect *boundRectP), PDTextSelectGetBoundingRectHost)
+
+/**
+ Creates a text selection from a page and a list of highlights
+ specified as character offsets from the start of the page.
+ Character offsets are a well-defined quantity in the PDF
+ file, and are therefore stable against revisions of the
+ word-finding algorithm, which makes them a good way to isolate
+ yourself from changes in the algorithm.
+
+ <p>This method does not highlight the text selection. That
+ occurs when you pass the PDTextSelect returned by this method
+ to AVDocSetSelection(). </p>
+ @param page The page on which the highlights appear.
+ @param hList A pointer to an array of highlight entries.
+ If the <code>length</code> field of a HiliteEntry is <code>0</code>, the entire word
+ is highlighted. <code>hList</code> should not contain multiple instances
+ of the same highlight; the display appearance is undefined
+ when it does.
+ @param listLen The number of highlight entries in <code>hList</code>.
+ @return The newly created text selection.
+ @see AVDocSetSelection
+ @see PDTextSelectCreateWordHilite
+ @see PDTextSelectCreateWordHiliteEx
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreateRangesEx
+ @see PDTextSelectCreatePageHiliteEx
+ @see PDDocCreateTextSelect
+ @see PDTextSelectDestroy
+
+ @note As is the case with the Acrobat viewer, the text selection is always
+ of whole words, not part of words.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+SPROC(PDTextSelect, PDTextSelectCreatePageHilite, (PDPage page, HiliteEntry *hList, ASInt32 listLen), PDTextSelectCreatePageHiliteHost)
+
+/**
+ Creates a text selection from a list of highlights specified
+ as word offsets from the start of the page. Word offsets
+ are not well-defined in PDF files, but are calculated by
+ the word-finding algorithm. As a result, word offsets will,
+ in general, differ in different versions of the word-finding
+ algorithm. If you choose to store word offsets, you must
+ also store the version of the word-finding algorithm from
+ which they are obtained using PDWordFinderGetLatestAlgVersion().
+
+ <p>This method does not highlight the text selection. That
+ occurs when you pass the PDTextSelect returned by this method
+ to AVDocSetSelection(). </p>
+ @param page The page on which the highlights appear.
+ @param hList A pointer to an array of highlight entries.
+ <code>hList</code> should not contain multiple instances of the same highlight;
+ the display appearance is undefined when it does.
+ @param listLen The number of highlight entries in <code>hList</code>.
+ @return The newly created text selection.
+ @see AVDocSetSelection
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreateRangesEx
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreatePageHiliteEx
+ @see PDTextSelectCreateWordHiliteEx
+ @see PDWordFinderGetLatestAlgVersion
+ @see PDTextSelectDestroy
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+SPROC(PDTextSelect, PDTextSelectCreateWordHilite, (PDPage page, HiliteEntry *hList, ASInt32 listLen), PDTextSelectCreateWordHiliteHost)
+
+/**
+ Extracts the range specified by index from a text selection.
+ Use PDTextSelectGetRangeCount() to determine the number of
+ ranges in a text selection.
+ @param textP IN/OUT The text selection from which a range is extracted.
+
+ @param index IN/OUT The index of the range to extract from <code>textP</code>.
+
+ @param range IN/OUT (Filled by the method) A pointer to a structure
+ that contains the specified range.
+ @see PDTextSelectGetBoundingRect
+ @see PDTextSelectGetPage
+ @see PDTextSelectGetRangeCount
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDTextSelectGetRange, ( PDTextSelect textP, ASInt32 index, PDTextSelectRange range ))
+
+/**
+ Gets the number of ranges in a text selection. Use PDTextSelectGetRange()
+ to extract a single range from a text selection.
+ @param textP IN/OUT The text selection whose range count is obtained.
+
+ @return The number of ranges in the text selection.
+ @see PDTextSelectGetBoundingRect
+ @see PDTextSelectGetPage
+ @see PDTextSelectGetRange
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDTextSelectGetRangeCount, ( PDTextSelect textP ))
+
+/**
+ Creates a text selection from one or more ranges.
+
+ <p>This method does not highlight the text selection. That
+ occurs when you pass the PDTextSelect returned by this method
+ to AVDocSetSelection(). </p>
+ @param page IN/OUT The page on which the text appears.
+ @param range IN/OUT A pointer to an array of ranges that are used
+ to create a text selection. Each array element is a PDTextSelectRange
+ structure.
+ @param rangeCount IN/OUT The number of ranges in range.
+ @return A text selection created from the specified ranges.
+ @see AVDocSetSelection
+ @see PDTextSelectCreateRangesEx
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreatePageHiliteEx
+ @see PDTextSelectCreateWordHilite
+ @see PDTextSelectCreateWordHiliteEx
+ @see PDTextSelectDestroy
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+SPROC(PDTextSelect, PDTextSelectCreateRanges, ( PDPage page, PDTextSelectRange range, ASInt32 rangeCount ), PDTextSelectCreateRangesHost)
+
+
+/**
+ Finds all words on the specified page and returns one or
+ more tables containing the words. One table contains the
+ words sorted in the order in which they appear in the PDF
+ file, while the other contains the words sorted by their
+ x- and y-coordinates on the page.
+
+ <p>Only words within or partially within the page's crop box
+ (see PDPageGetCropBox()) are enumerated. Words outside the
+ crop box are skipped. </p>
+
+ <p>There can be only one word list in existence at a time;
+ clients must release the previous word list, using PDWordFinderReleaseWordList(),
+ before creating a new one. </p>
+
+ <p>Use PDWordFinderEnumWords() instead of this method, if you
+ wish to find one word at a time instead of obtaining a table
+ containing all words on a page. </p>
+
+ @param wObj The word finder (created using PDDocCreateWordFinder()
+ or PDDocCreateWordFinderUCS()) used to acquire the word list.
+
+ @param pgNum The page number for which words are found.
+ The first page is <code>0</code>, not <code>1</code> as designated in Acrobat.
+
+ @param wInfoP (Filled by the method) A user-supplied
+ PDWord variable. Acrobat will fill this in to point to an
+ Acrobat-allocated array of PDWord objects, which should <i>never</i> be
+ accessed directly.
+
+ <p>Access the acquired list through PDWordFinderGetNthWord().
+ The words are ordered in PDF order, which is the order in
+ which they appear in the PDF file's data. This is often,
+ but not always, the order in which a person would read the
+ words. Use PDWordFinderGetNthWord() to traverse this array; you
+ cannot access this array directly. This array is always
+ filled, regardless of the flags used in the call to PDDocCreateWordFinder()
+ or PDDocCreateWordFinderUCS().</p>
+
+ @param xySortTable (Filled by the method) Acrobat fills
+ in this user-supplied pointer to a pointer with the location
+ of an Acrobat-allocated array of PDWords, sorted in x-y
+ order, meaning that all words on the first <i>line</i>, from left
+ to right, are followed by all words on the next line. This
+ array is only filled if the <code>WXE_XY_SORT</code> flag was set in
+ the call to PDDocCreateWordFinder() or PDDocCreateWordFinderUCS().
+ PDWordFinderReleaseWordList() must be called to release allocated
+ memory for this return or there will be a memory leak. As
+ long as this parameter is non-<code>NULL</code>, the array is always
+ filled regardless of the value of the <code>rdFlags</code> parameter
+ in PDDocCreateWordFinder().
+ @param rdOrderTable Currently unused. Pass <code>NULL</code> for this value.
+ @param numWords (Filled by the method) The number of words
+ found on the page.
+ @exception pdErrOpNotPermitted
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDWordFinderReleaseWordList
+ @see PDWordFinderEnumWords
+ @see PDWordFinderGetNthWord
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDWordFinderAcquireWordList, ( PDWordFinder wObj, ASInt32 pgNum, PDWord *wInfoP, PDWord **xySortTable, PDWord **rdOrderTable, ASInt32 *numWords))
+
+/**
+ Gets the version number of the specified word finder, or
+ the version number of the latest word finder algorithm.
+
+ @param wObj IN/OUT The word finder whose algorithm's version is
+ obtained. Pass <code>NULL</code> to obtain the latest word finding algorithm
+ version number.
+ @return The algorithm version associated with <code>wObj</code>, or the version
+ of the latest word finder algorithm if <code>wObj</code> is <code>NULL</code>.
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDDocGetWordFinder
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt16, PDWordFinderGetLatestAlgVersion, ( PDWordFinder wObj ))
+
+/**
+ Releases the word list for a given page. Use this to release
+ a list created by PDWordFinderAcquireWordList() when you are
+ done using this list.
+ @param wObj A word finder object.
+ @param pgNum The number of pages for which a word list is
+ released.
+ @exception genErrBadUnlock is raised if the list has already been released.
+
+ @see PDWordFinderAcquireWordList
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDDocGetWordFinder
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDWordFinderReleaseWordList, ( PDWordFinder wObj, ASInt32 pgNum ))
+
+/**
+ Destroys a word finder. Use this when you are done extracting
+ text in a file.
+ @param wObj IN/OUT The word finder to destroy.
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDDocGetWordFinder
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDWordFinderDestroy, ( PDWordFinder wObj ))
+
+/**
+ Extracts words, one at a time, from the specified page or
+ the entire document. It calls a user-supplied procedure once
+ for each word found. If you wish to extract all text from
+ a page at once, use PDWordFinderAcquireWordList() instead
+ of this method.
+
+ <p>Only words within or partially within the page's crop box
+ (see PDPageGetCropBox()) are enumerated. Words outside the
+ crop box are skipped. </p>
+
+ @param wObj A word finder object.
+ @param PageNum The page number from which to extract words.
+ Pass PDAllPages (see PDExpT.h) to sequentially process all
+ pages in the document.
+ @param wordProc A user-supplied callback to call once for
+ each word found. Enumeration halts if <code>wordProc</code> returns <code>false</code>.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>wordProc</code> each time it is called.
+ @return <code>true</code> if enumeration was successfully completed,
+ <code>false</code> if enumeration was terminated because <code>wordProc</code> returned
+ <code>false</code>.
+ @exception genErrBadParm is raised if <code>wordProc</code> is <code>NULL</code>, or <code>pageNum</code> is
+ less than zero or greater than the total number of pages in the document.
+ @exception pdErrOpNotPermitted
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDDocGetWordFinder
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderEnumVisibleWords
+ @see PDWordFinderEnumWordsStr
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDWordFinderEnumWords, ( PDWordFinder wObj, ASInt32 PageNum, PDWordProc wordProc, void *clientData ))
+
+
+/**
+ Gets the number of bytes in a word. This method also works
+ on non-Roman systems.
+ @param word IN/OUT The word object whose character count is obtained.
+
+ @return The number of characters in word.
+ @see PDWordGetCharDelta
+ @see PDWordGetCharOffset
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASUns8, PDWordGetLength, ( PDWord word ))
+
+/**
+ This method gets a word's text. The string to return includes any
+ word break characters (such as space characters) that follow
+ the word, but not any that precede the word. The characters
+ that are treated as word breaks are defined in the <code>outEncInfo</code>
+ parameter of PDDocCreateWordFinder() method. Use PDWordFilterString()
+ to subsequently remove the word break characters.
+
+ <p>This method produces a string in whatever encoding the PDWord
+ uses, for both Roman and non-Roman systems. </p>
+ @param word The word whose string is obtained.
+ @param str (Filled by the method) The string. The encoding
+ of the string is the encoding used by the <code>PDWordFinder</code> that
+ supplied the PDWord. For instance, if PDDocCreateWordFinderUCS()
+ is used to create the word finder, PDWordGetString() returns
+ only Unicode. There is no way to detect Unicode strings
+ returned by PDWordGetString(), since there is no UCS header
+ (<code>FEFF</code>) added to each string returned.
+ @param len The length of <code>str</code> in bytes. Up to <code>len</code> characters
+ of word will be copied into <code>str</code>. If <code>str</code> is long enough,
+ it will be <code>NULL</code>-terminated.
+ @exception genErrBadParm is raised if either <code>word</code> or <code>str</code> is <code>NULL</code>.
+ @see PDWordGetLength
+ @see PDWordGetCharDelta
+ @see PDWordSplitString
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDWordGetString, ( PDWord word, char *str, ASInt32 len ))
+
+/**
+ Gets a bit field containing information on the types of
+ characters in a word. Use PDWordGetCharacterTypes() if you
+ wish to check each character's type individually.
+ @param word IN/OUT The word whose character types are obtained.
+
+ @return A bit field containing information on the types of characters
+ in word. The value is a logical <code>OR</code> of the Word Attributes.
+
+ @see PDWordGetCharacterTypes
+ @see PDWordGetStyleTransition
+ @see PDWordGetNthCharStyle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+ @note PDWordGetAttr() may return an attribute value greater
+ than the maximum of all of the public attributes since there
+ can be private attributes added on. It is recommended to
+ <code>AND</code> the result with the attribute you are interested in.
+*/
+NPROC(ASUns16, PDWordGetAttr, ( PDWord word ))
+
+/**
+ Gets the character type for each character in a word.
+ @param word The word whose character types are obtained.
+
+ @param cArr (Filled by the method) An array of character
+ types. This array contains one element for each character
+ in the word. Use PDWordGetLength() to determine the number
+ of elements that must be in the array. Each element is the
+ logical <code>OR</code> of one or more of the Character Type Codes. For
+ non-Roman character set viewers, meaningful values are returned
+ only for Roman characters. For non-Roman characters, it
+ returns <code>0</code>, which is the same as <code>W_CNTL</code>. If the character
+ is 2 bytes, both bytes indicate the same character type.
+
+ @param size The number of elements in <code>cArr</code>.
+ @see PDWordGetAttr
+ @see PDWordGetLength
+ @ref CharacterTypeCodes
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDWordGetCharacterTypes, ( PDWord word, ASUns16 *cArr, ASInt16 size ))
+
+/**
+ Returns a word's character offset from the beginning of
+ its page. This information, together with the character
+ delta obtained from PDWordGetCharDelta(), can be used to highlight
+ a range of words on a page, using PDTextSelectCreatePageHilite().
+
+ @param word IN/OUT The word whose character offset is obtained.
+
+ @return The word's character offset. On multi-byte systems, it points
+ to the first byte.
+ @see PDWordGetCharDelta
+ @see PDWordGetLength
+ @see PDTextSelectCreatePageHilite
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASUns16, PDWordGetCharOffset, ( PDWord word ))
+
+/**
+ Gets the difference between the word length (the number
+ of printed characters in the word) and the PDF word length
+ (the number of character codes in the word). For instance,
+ if the PDF word is <code>fi (ligature) sh</code> the mapped word will
+ be <code>"fish"</code>. The ligature occupies only one character code,
+ so in this case the character delta will be <code>3-4 = -1</code>.
+ @param word IN/OUT The word whose character delta is obtained.
+
+ @return The character delta for word. Cast the return value to an
+ ASInt8 before using.
+
+ If the PDWord's character set has no ligatures, such as
+ on a non-Roman viewer supporting Japanese, returns <code>0</code>.
+ @see PDWordGetLength
+ @see PDWordGetCharOffset
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt8, PDWordGetCharDelta, ( PDWord word ))
+
+/**
+ Gets the locations of style transitions in a word. Every
+ word has at least one style transition, at character position
+ zero in the word.
+ @param word IN/OUT The word whose style transition list is obtained.
+
+ @param transTbl IN/OUT (Filled by the method) An array of style transitions.
+ Each element is the character offset in word where the style
+ changes. The offset specifies the first character in the
+ word that has the new style. The first character in a word
+ has an offset of zero.
+ @param size IN/OUT The number of entries that <code>transTbl</code> can hold. The
+ word is searched only until this number of style transitions
+ have been found.
+ @return The number of style transition offsets copied to <code>transTbl</code>.
+ @see PDWordGetNthCharStyle
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt16, PDWordGetStyleTransition, ( PDWord word, ASInt16 *transTbl, ASInt16 size ))
+
+/**
+ Returns a PDStyle object for the nth style in a word.
+ @param wObj IN/OUT A word finder object.
+ @param word IN/OUT The word whose nth style is obtained.
+ @param dex IN/OUT The index of the style to obtain. The first
+ style in a word has an index of zero.
+ @return The nth style in the word. It returns <code>NULL</code> if <code>dex</code> is greater
+ than the number of styles in the word.
+ @exception genErrBadParm is raised if <code>dex < 0</code>.
+ @see PDWordGetStyleTransition
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDStyle, PDWordGetNthCharStyle, ( PDWordFinder wObj,PDWord word, ASInt32 dex ))
+
+/**
+ Gets the number of quads in a word. A quad is a quadrilateral
+ bounding a contiguous piece of a word. Every word has at
+ least one quad. A word has more than one quad, for example,
+ if it is hyphenated and split across multiple lines or if
+ the word is set on a curve rather than on a straight line.
+
+ @param word IN/OUT The word whose quad count is obtained.
+ @return The number of quads in word.
+ @see PDWordGetNthQuad
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt16, PDWordGetNumQuads,( PDWord word ))
+
+/**
+ Gets the specified word's nth quad, specified in user space
+ coordinates. See PDWordGetNumQuads() for a description of
+ a quad.
+
+ <p>The quad's height is the height of the font's bounding box,
+ not the height of the tallest character used in the word.
+ The font's bounding box is determined by the glyphs in the
+ font that extend farthest above and below the baseline;
+ it often extends somewhat above the top of <code>'A'</code> and below
+ the bottom of <code>'y'</code>. </p>
+
+ <p>The quad's width is determined from the characters actually
+ present in the word. </p>
+
+ <p>For example, the quads for the words <code>"AWAY"</code> and <code>"away"</code>
+ have the same height, but generally do not have the same
+ width unless the font is a mono-spaced font (a font in which
+ all characters have the same width). </p>
+
+ Despite the names of the fields in an ASFixedQuad (<code>tl</code> for
+ top left, <code>bl</code> for bottom left, and so forth) the corners
+ of <code>quad</code> do not necessarily have these positions.
+ @param word The word whose nth quad is obtained.
+ @param nTh The quad to obtain. A word's first quad has
+ an index of zero.
+ @param quad (Filled by the method) A pointer to the word's
+ nth quad, specified in user-space coordinates.
+ @return <code>true</code> if the word has an nth quad, <code>false</code> otherwise.
+
+ @see PDWordGetNumQuads
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDWordGetNthQuad,( PDWord word, ASInt16 nTh, ASFixedQuad *quad ))
+
+/**
+ Tests whether a word is rotated.
+ @param word The word to test.
+ @return <code>true</code> if the word is rotated, <code>false</code> otherwise.
+ @see PDWordGetNthQuad
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDWordIsRotated,( PDWord word ))
+
+
+/**
+ Removes leading and trailing spaces and leading and trailing
+ punctuation (including soft hyphens) from the specified
+ word. It does not remove wildcard characters (<code><code>'*'</code></code> and <code><code>'?'</code></code>)
+ or any punctuation surrounded by alphanumeric characters
+ within the word.
+
+ <p>The determination of which characters are alphanumeric,
+ wildcard, punctuation, and so forth, is made by the values
+ in <code>infoArray</code>. </p>
+
+ <p>Although this method seems very similar to PDWordFilterWord(),
+ the two methods treat letters and digits slightly differently.
+ PDWordFilterWord() uses the encoding info array but also does
+ a straight character code test for any characters that have
+ not been mapped to anything. It does this to catch letters
+ and digits from non-standard character sets, and is necessary
+ to avoid removing words with non-standard character sets. </p>
+
+ <p>PDWordFilterString(), on the other hand, was designed for
+ known character sets such as WinAnsi and Mac Roman. </p>
+
+ <p>For non-Roman character set viewers, this method currently
+ supports only SHIFT-JIS encoding on a Japanese system. </p>
+
+ @param infoArray An array specifying the type of each
+ character in the font. Each entry in this table must be
+ one of the Character Type Codes. If <code>infoArray</code> is set to
+ <code>NULL</code>, a default table is used. For non-UNIX Roman systems,
+ it is <code>WinAnsiEncoding</code> on Windows<code> and MacRomanEncoding</code> on Mac OS.
+ On UNIX (except HP-UX) Roman systems, it is <code>ISO8859-1</code>
+ (ISO Latin-1); for HP-UX, it is <code>HP-ROMAN8</code>. See Appendix
+ D in the <i>PDF Reference</i> for descriptions of <code>MacRomanEncoding</code>
+ and <code>WinAnsiEncoding</code>.
+ @param cNewWord (Filled by the method) The filtered word.
+
+ @param cOldWord The unfiltered word. This value must be
+ passed to the method.
+ @return <code>true</code> if the string required filtering, <code>false</code> if
+ the filtered string is the same as the unfiltered string.
+
+ @see PDWordFilterWord
+
+ @note In Acrobat 6.0, the method PDWordFinderEnumWordsStr()
+ is preferred to this method, which remains for backward
+ compatability.
+ @ref CharacterTypeCodes
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDWordFilterString, (ASUns16 *infoArray, char *cNewWord, char *cOldWord))
+
+/**
+ Removes leading and trailing spaces and leading and trailing
+ punctuation (including soft hyphens) from the specified
+ word. It does not remove wildcard characters (<code>'*'</code> and <code>'?'</code>)
+ or any punctuation surrounded by alphanumeric characters
+ within the word. It also converts ligatures to their constituent
+ characters. The determination of which characters to remove
+ is made by examining the flags in the <code>outEncInfo</code> array passed
+ to PDDocCreateWordFinder(). As a result, this method is most
+ useful after you have been called with words obtained by
+ calling PDWordFinderGetNthWord(), in the callback for PDWordFinderEnumWords(),
+ and words in the pXYSortTable returned by PDWordFinderAcquireWordList().
+ See the description of PDWordFilterString() for further information,
+ and for a description of how the two methods differ.
+
+ <p>The Acrobat Catalog program uses this method to filter words
+ before indexing them. </p>
+
+ <p>This method works with non-Roman systems. </p>
+ @param word The PDWord to filter.
+ @param buffer (Filled by the method) The filtered string.
+
+ @param bufferLen The maximum number of characters that
+ <code>buffer</code> can hold.
+ @param newLen (Filled by the method) The number of characters
+ actually written into <code>buffer</code>.
+ @return <code>true</code> if the word required filtering, <code>false</code> if the
+ filtered string is the same as the unfiltered string.
+ @see PDWordFilterString
+
+ @note In Acrobat 6.0 and later, the method PDWordFinderEnumWords() is
+ preferred to this method, which remains for backward compatability.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDWordFilterWord, (PDWord word, char *buffer, ASInt16 bufferLen, ASInt16 *newLen))
+
+
+/**
+ Gets the specified style's font.
+ @param obj IN/OUT The style whose font is obtained.
+ @return The font for the specified style.
+ @see PDStyleGetColor
+ @see PDStyleGetFontSize
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDFont, PDStyleGetFont, (PDStyle obj))
+
+/**
+ Get a style's font size.
+ @param obj The style whose font size is obtained.
+ @return The size of the font in points.
+ @see PDStyleGetColor
+ @see PDStyleGetFont
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASFixed, PDStyleGetFontSize, ( PDStyle obj ))
+
+/**
+ Gets a style's color.
+ @param obj IN/OUT The style whose color is obtained.
+ @param color IN/OUT (Filled by the method) A pointer to a structure
+ that contains the style's color.
+ @see PDStyleGetFont
+ @see PDStyleGetFontSize
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(void, PDStyleGetColor, ( PDStyle obj, PDColorValue color ))
+
+
+/**
+ Creates a new file specification from the specified ASPathName,
+ using the PDFileSpecNewFromASPathProc() of the specified file
+ system's file specification handler.
+ @param pdDoc The document in which the new file specification
+ will be used.
+ @param fileSys A pointer to an ASFileSysRec specifying the
+ file system responsible for the newly created file specification.
+
+ @param path The path to convert into a file specification.
+
+ @param relativeToThisPath A path name relative to which <code>path</code>
+ is interpreted. If it is <code>NULL</code>, <code>path</code> is interpreted as an absolute
+ path name, not a relative path name.
+ @return The newly created file spec, or an invalid file spec if
+ the ASPathName cannot be converted to a PDFileSpec (use
+ PDFileSpecIsValid() to test whether the conversion was successful).
+
+ @see PDFileSpecIsValid
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(PDFileSpec, PDFileSpecNewFromASPath, (PDDoc pdDoc, ASFileSys fileSys, ASPathName path, ASPathName relativeToThisPath))
+
+/**
+ Converts an appropriate string or dictionary Cos object
+ to a file specification. This method does not copy the object,
+ but is instead the logical equivalent of a type cast.
+ @param obj IN/OUT The Cos object to convert to a file specification.
+
+ @return The file specification corresponding to <code>obj</code>.
+ @exception pdErrBadFileSpec is raised if the file specification is not
+ valid, as determined by PDFileSpecIsValid().
+ @see PDFileSpecGetCosObj
+ @see PDFileSpecIsValid
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(PDFileSpec, PDFileSpecFromCosObj, (CosObj obj))
+
+/**
+ Gets the file system that services the specified file specification.
+
+ @param fileSpec IN/OUT The file specification whose file system
+ is obtained.
+ @return The file system that services <code>fileSpec</code>.
+ @see PDFileSpecGetFileSysName
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASFileSys, PDFileSpecGetFileSys, (PDFileSpec fileSpec))
+
+/**
+ Acquires an ASPathName for the specified file specification
+ and relative path.
+ @param fileSpec IN/OUT The file specification for which an ASPathName
+ is acquired.
+ @param relativeToThisPath IN/OUT A path name relative to which
+ the <code>fileSpec</code> is interpreted. If it is <code>NULL</code>, <code>fileSpec</code> is assumed
+ to be an absolute, not a relative, path.
+ @return The ASPathName corresponding to <code>fileSpec</code>.
+
+ <p>After you are done using the ASPathName, you must free it
+ using ASFileSysReleasePath(). </p>
+
+ @see ASFileSysReleasePath
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASPathName, PDFileSpecAcquireASPath, (PDFileSpec fileSpec, ASPathName relativeToThisPath))
+
+/**
+ Gets the Cos object associated with a file specification.
+ This method does not copy the object, but is instead the
+ logical equivalent of a type cast.
+ @param fileSpec IN/OUT The file specification whose Cos object
+ is obtained.
+ @return The string or dictionary Cos object corresponding to the
+ file specification.
+ @see PDFileSpecFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(CosObj, PDFileSpecGetCosObj, (PDFileSpec fileSpec))
+
+/**
+ Tests whether a file specification is valid. This is intended
+ only to ensure that the file specification has not been deleted,
+ not to ensure that all necessary information is present
+ and valid.
+ @param fileSpec The file specification whose validity
+ is tested.
+ @return <code>true</code> if <code>fileSpec</code> is valid, <code>false</code> otherwise.
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDFileSpecIsValid, (PDFileSpec fileSpec))
+
+/**
+ Registers a new file specification handler with the Acrobat
+ viewer. In version 3.0 and later of the Acrobat viewer,
+ use the PDRegisterFileSpecHandlerByName method instead.
+
+ @param contextFileSys The file system that specifies the
+ context in which the file specification handler is used.
+ This is the file system on which the PDF document resides.
+ It is sometimes necessary to use different file specification
+ handlers depending on the file system in which the document
+ is open. For example, when a document is opened in a web
+ browser, the Acrobat viewer may use the browser's HTTP stack
+ when it needs to use HTTP. When a document is opened outside
+ of the browser, however, the Acrobat viewer must use a different
+ HTTP stack.
+ @param fileSpecHandler A pointer to a structure that contains
+ the handler's callbacks. This structure must not be freed
+ after calling PDRegisterFileSpecHandler().
+ @param fileSpecHandlerObj A pointer to user-supplied data
+ to pass to the file specification handler's callbacks each
+ time they are called.
+ @exception genErrNoMemory
+ @see PDRegisterFileSpecHandlerByName
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(void, PDRegisterFileSpecHandler, (ASFileSys contextFileSys, PDFileSpecHandler fileSpecHandler, void *fileSpecHandlerObj))
+
+/**
+ Gets the device-independent path name from a file specification.
+
+ @param fileSpec IN/OUT The file specification whose device-independent
+ path name is obtained.
+ @param buffer IN/OUT (Filled by the method) <code>NULL</code>-terminated device-
+ independent path name. If <code>buffer</code> is <code>NULL</code>, the method simply
+ returns the length of the path name.
+ @param bufLen IN/OUT The length of <code>buffer</code> in bytes. If the device-
+ independent path name is longer than this, only the first
+ <code>bufLen - 1</code> bytes are copied into <code>buffer</code>, plus a <code>NULL</code> at
+ the end of the buffer.
+ @return The number of characters (excluding the <code>NULL</code>) copied into <code>buffer</code>.
+
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASInt32, PDFileSpecGetDIPath, (PDFileSpec fileSpec, char* buffer, ASInt32 bufLen))
+
+
+/**
+ Sets the values to use for displaying the calibrated color and
+ grayscale. These values are the chromaticities and gammas
+ of the phosphors in the monitor.
+
+ <p>These values do not necessarily correspond to the monitor
+ being used; it is the responsibility of the client that
+ sets these values to provide the correct values. </p>
+
+ <p>These values are used for rendering if calibrated color
+ is enabled by the preferences file item avpDoCalibratedColor
+ (see AVAppSetPreference()). </p>
+
+ @param colorCal A pointer to a structure that contains the
+ color calibration information. For RGB devices, the red,
+ green, and blue chromaticities and gammas are used; for
+ grayscale, <code>whiteChrom</code> and <code>greenGamma</code> are used.
+ @return <code>true</code> if the values were successfully set and installed
+ for the currently active display device, <code>false</code> otherwise.
+
+ @see PDPrefGetColorCal
+ @see AVAppSetPreference
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+NPROC(ASBool, PDPrefSetColorCal, (PDColorCalP colorCal))
+
+/**
+ Gets the values to use for displaying the calibrated color and
+ grayscale. These values are the chromaticity and gammas
+ of the phosphors in the monitor.
+
+ <p>These values are used for rendering if calibrated color
+ is enabled by the preferences file item avpDoCalibratedColor
+ (see AVAppGetPreference()). </p>
+
+ @param colorCal IN/OUT (Filled by the method) A pointer to a structure
+ that contains the color calibration information. For RGB
+ devices, the red, green, and blue chromaticity and gammas
+ are used; for grayscale, <code>whiteChrom</code> and <code>greenGamma</code> are
+ used. You must allocate storage for the <code>colorCal</code> data structure
+ and pass a pointer to the memory you allocated.
+ @return Always returns <code>true</code>.
+ @see PDPrefSetColorCal
+ @see AVAppGetPreference
+ @since PI_PDMODEL_VERSION >= 0x00020000
+
+*/
+NPROC(ASBool, PDPrefGetColorCal, (PDColorCalP colorCal))
+
+/* Acrobat 2.1 additions */
+
+/**
+ Broadcasts a PDPageContentsDidChange() notification and a
+ PDPageContentsDidChangeEx() notification. These notify the
+ Acrobat viewer that a page's contents have been modified,
+ and tells the Acrobat viewer whether to redraw the page
+ immediately.
+
+ <p>You must use this method after using Cos methods to change
+ a page's contents. Do not use this method if you use PDPageAddCosContents()
+ or PDPageRemoveCosContents() to change a page's contents,
+ because those methods automatically generate the appropriate
+ notifications. </p>
+
+ <p>If your plug-in must be compatible with version 2.0 of the
+ Acrobat viewer, you must use PDPageNotifyContentsDidChange()
+ instead. </p>
+ @param page The page that changed.
+ @param invalidateViews <code>true</code> if the Acrobat viewer redraws
+ the page view, <code>false</code> otherwise. This allows plug-ins to
+ make a sequence of modifications to a page's contents, without
+ having the entire page flash after each modification. Passing
+ <code>true</code> for <code>invalidateViews</code> is equivalent to calling PDPageNotifyContentsDidChange().
+ @notify PDPageContentsDidChange
+ @notify PDPageContentsDidChangeEx
+ @see PDPageAddCosContents
+ @see PDPageRemoveCosContents
+ @see PDPageNotifyContentsDidChange
+ @since PI_PDMODEL_VERSION >= 0x00020001
+*/
+NPROC(void, PDPageNotifyContentsDidChangeEx, (PDPage page, ASBool invalidateViews))
+
+/**
+ Clears flags associated with a document. This method is
+ most frequently used to mark a modified document as clean
+ (by clearing the PDDocNeedsSave flag) to avoid bringing
+ up the Save dialog box when the file is closed.
+ @param doc IN/OUT The document whose flags are cleared.
+ @param flags IN/OUT The flags to clear. It must be an <code>OR</code> of the PDDocFlags
+ values.
+ @see PDDocSave
+ @see PDDocClose
+ @see PDDocGetFlags
+ @see PDDocSetFlags
+ @since PI_PDMODEL_VERSION >= 0x00020001
+
+*/
+NPROC(void, PDDocClearFlags, (PDDoc doc, ASInt32 flags))
+
+
+/**
+ Draws the specified stream of PDF marking operators into
+ the specified window. This method is used for platform-independent
+ drawing of graphics and text.
+
+ <p>This method changes the current page's CTM and zoom factor,
+ and dirties the file. </p>
+ @param cosObj The stream Cos object to draw into the window.
+ This stream can be created using CosNewStream(). The stream's
+ dictionary must contain a Resources key whose value is a
+ dictionary specifying all the resources needed to draw the
+ Cos object (including a ProcSet entry). Its structure and
+ contents are the same as for the Resources dictionary for
+ a Page object. See Section 3.7.2 in the <i>PDF Reference</i> for
+ a description of a Page object's Resources dictionary. The
+ stream's data is a sequence of PDF marking operators. See
+ Appendix A in the <i>PDF Reference</i> for a description of these
+ operators. A pseudocode example of the stream object is:
+
+ <p><code><< /Length 1000 /Filter</code></p>
+ <p><code>[...filters...] /Resources <<</code></p>
+ <p><code>/ProcSet [ /PDF /Text ]</code></p>
+ <p><code>/Font <</F5 6 0 R /F9 12 0 R>> >></code></p>
+ <p><code>>></code></p>
+ <p><code>stream</code></p>
+ <p><code>...stream data...</code></p>
+ <p><code>endstream </code></p>
+
+
+ @param window A pointer to a platform-dependent window object
+ (<code>HWND</code> on Windows, <code>WindowPtr</code> or <code>CWindowPtr</code> on Mac OS). On Windows,
+ to draw into an offscreen <code>DC</code>, pass <code>NULL</code> for <code>window</code>. On
+ Mac OS, to draw into an off screen <code>GWorld</code>, pass <code>NULL</code> in
+ window and pass the <code>GWorld</code>Ptr in displayContext.
+ @param displayContext A pointer to a platform-dependent
+ display context structure (<code>hDC</code> on Windows, <code>GWorldPtr</code> on Mac OS).
+ On Mac OS, <code>displayContext</code> is ignored if <code>windows</code> is non-<code>NULL</code>.
+
+ @param isDPS Currently unused. Always set it to <code>false</code>.
+ @param matrix A pointer to a matrix to concatenate onto
+ the default page matrix. It is useful for scaling and for
+ converting from page to window coordinates.
+ @param updateRect A pointer to a rectangle, specified in
+ user space coordinates. Any objects outside of <code>updateRect</code>
+ will not be drawn. All objects are drawn if <code>updateRect</code> is
+ <code>NULL</code>.
+ @param cancelProc A procedure called periodically to check
+ for the user's cancelling of the drawing operation. The default cancel
+ proc can be obtained using AVAppGetCancelProc(). It may be <code>NULL</code>,
+ in which case no cancel proc is used.
+ @param cancelProcClientData A pointer to user-supplied data
+ to pass to <code>cancelProc</code> each time it is called. It should be
+ <code>NULL</code> if <code>cancelProc</code> is <code>NULL</code>.
+ @see CosNewStream
+ @see PDPageDrawContentsToWindow
+ @see PDPageDrawContentsToWindowEx
+ @since PI_PDMODEL_VERSION >= 0x00020001
+*/
+NPROC(void, PDDrawCosObjToWindow, (CosObj cosObj, void *window, void *displayContext,
+ ASBool isDPS, ASFixedMatrix *matrix, ASFixedRect *updateRect, CancelProc cancelProc,
+ void *cancelProcClientData))
+
+/* Acrobat 3.0 additions */
+
+/**
+ Opens the document specified by the ASFile. <code>aFile</code> must be
+ a valid ASFile. It is the caller's responsibility to dispose
+ of the ASFile after calling PDDocClose().
+
+ <p>This method is useful when the document referenced by the
+ ASFile is not on the local machine, and is being retrieved
+ incrementally using the multi-read protocol of an ASFileSys.
+ If the bytes required to open a PDDoc are not yet available,
+ this method will raise the exception fileErrBytesNotReady.
+ The client should call PDDocOpenFromASFile() until this exception
+ is no longer raised. </p>
+
+ @param aFile The ASFile to open. The ASFile should be
+ released after the PDDoc is closed.
+ @param authProc An authorization callback, called only if
+ the file is encrypted. This callback should obtain whatever
+ information is needed to determine whether the user is authorized
+ to open the file, then call PDDocAuthorize() (which returns
+ the permissions that the authentication data enables). The
+ Acrobat viewer's built-in authorization procedure requires
+ the user to enter a password, and allows the user to try
+ three times before giving up.
+ @param doRepair If <code>true</code>, attempt to repair the file if
+ it is damaged. If <code>false</code>, do not attempt to repair the file
+ if it is damaged.
+ @return A valid PDDoc if successfully opened.
+ @exception pdErrNeedPassword is raised if the file is encrypted and <code>authProc</code>
+ is <code>NULL</code> or returns <code>false</code>.
+ @exception fileErrBytesNotReady is raised if the bytes required to open
+ a PDDoc are not yet available.
+ @see PDDocClose
+ @see PDDocOpen
+ @see PDDocOpenEx
+ @see PDDocOpenFromASFileEx
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(PDDoc, PDDocOpenFromASFile, (ASFile aFile, PDAuthProc authProc, ASBool doRepair))
+
+/**
+ Gets the PDDoc that contains <code>fileSpec</code>.
+ @param fileSpec IN/OUT A PDFileSpec in a document.
+ @return A PDDoc or <code>NULL</code> if the file specification CosObj is not
+ in a document.
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(PDDoc, PDFileSpecGetDoc, (PDFileSpec fileSpec))
+
+/**
+ Gets the name of the file system that a PDFileSpec belongs
+ to. For a simple <code>fileSpec</code> (string form), the name of the
+ file system is the name of the document's file system if
+ the CosObj that is the <code>fileSpec</code> is contained in a document.
+ For a complex <code>fileSpec</code> (dictionary form) with an FS key, the name
+ of the file system is the atom associated with the FS key.
+
+ <p>The file system returned by PDFileSpecGetFileSys() is the
+ file system that has registered a PDFileSpecHandler() for
+ the file specification's file system name (if there is one), and is not
+ necessarily the same as <code>ASFileGetFileSysByName(PDFileSpecGetFileSysName(fileSpec));</code> .</p>
+
+ @param fileSpec A PDFileSpec.
+ @return An ASAtom representing the file system of <code>fileSpec</code>.
+ @see PDFileSpecGetFileSys
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(ASAtom, PDFileSpecGetFileSysName, (PDFileSpec fileSpec))
+
+/**
+ Registers a new file specification handler with the Acrobat
+ viewer. The viewer calls the appropriate file specification
+ handler when it encounters a file specification in a PDF
+ file. The appropriate file specification handler is the
+ one whose <code>specSysName</code> matches the value of the FS key in the file
+ specification and whose <code>contextFileSys</code> matches the file system on which the PDF
+ file resides.
+
+ <p>The file specification handler's file system, (passed as
+ the <code>fileSys</code> field of <code>fileSpecHandler</code>), is used to obtain
+ data from, or write data to, the file referred to by the
+ file specification. </p>
+
+ @param specSysName The name (as an ASAtom) of a file system
+ with which this file specification works.
+ @param contextFileSys The file system that specifies the
+ context in which the file specification handler is used.
+ This is the file system on which the PDF document resides.
+ It is sometimes necessary to use different file specification
+ handlers depending on the file system in which the document
+ is open. For example, when a document is opened in a web
+ broswer, the Acrobat viewer may use the browser's HTTP stack
+ when it needs to use HTTP. When a document is opened outside
+ of the browser, however, the Acrobat viewer must use a different
+ HTTP stack.
+ @param fileSpecHandler A pointer to a structure that contains
+ the handler's callbacks. This structure must not be freed
+ after calling PDRegisterFileSpecHandlerByName().
+ @param fileSpecHandlerObj A pointer to user-supplied data
+ to pass to the file specification handler's callbacks each
+ time they are called.
+ @exception genErrNoMemory
+ @see PDRegisterFileSpecHandler
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(void, PDRegisterFileSpecHandlerByName, (ASAtom specSysName, ASFileSys contextFileSys, PDFileSpecHandler fileSpecHandler, void *fileSpecHandlerObj))
+
+/**
+ Reads a PDF page content token from a stream. The stream
+ is typically obtained by getting the Cos stream for a page
+ contents or a Form contents, and calling CosStreamOpenStm()
+ to open the stream using the <i>filtered</i> mode.
+
+ <p>It begins reading at the current stream position, and reads
+ exactly one token. It returns the number of bytes read.
+ This is the number of bytes read from the stream and indicates
+ the amount by which the stream position has advanced. The
+ end-of-stream criteria (loop terminating condition) is the
+ following:</p>
+
+ <ul>
+ <li>A <code>NULL</code> object is returned (an object of type CosNull). </li>
+ <li>The number of bytes read (return value) is <code>1</code>. </li>
+ </ul>
+
+ <p>If the token is an integer, real (ASFixed), or ASBool, then
+ the value is returned in <code>pageStmToken.iVal</code>. If the token
+ is a string or a name, the value is returned in <code>pageStmToken.sVal</code>,
+ and the length of the token is in <code>pageStmToken.sValLen</code>.
+ Strings are not <code>NULL</code>-terminated, but names are <code>NULL</code>-terminated.
+ If a string length is greater than kPDPageStmStringMax,
+ the PDPageStmStringOverflowProc() is called repeatedly with
+ portions of the string. On return from PDPageStmGetToken,
+ the value of <code>pageStmToken.sValLen</code> is zero, and <code>pageStmToken.sVal</code>
+ is empty (<code>ival</code>, <code>sVal</code>, and <code>sValLen</code> are components of the PDPageStmToken).
+ If there is no overflow proc, then the first kPDPageStmStringMax
+ bytes of the string will be returned in <code>pageStmToken.sVal</code>,
+ and the remaining bytes are lost. The value of <code>pageStmToken.sValLen</code>
+ is kPDPageStmStringMax in this case. </p>
+
+ <p>If the token is BI (begin inline image), PDPageStmGetInlineImage()
+ should be called to parse the inline image. </p>
+
+ <p>This method can raise memory, I/O, and parsing exceptions.</p>
+
+ @param stm The stream from which data is read.
+ @param flags A bit field of options such as 'skip comments'
+ (kPDPageStmSkipComments means skip comments during
+ token generation).
+ @param proc A callback method to handle long strings.
+ @param procClientData Client data passed to the callback
+ method.
+ @param pageStmToken The returned token.
+ @return The number of bytes read from <code>stm</code>.
+ @see CosStreamOpenStm
+ @see PDPageGetCosObj
+ @see PDPageStmGetInlineImage
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(ASUns32,PDPageStmGetToken, (
+ ASStm stm,
+ ASUns32 flags,
+ PDPageStmStringOverflowProc proc,
+ void *procClientData,
+ PDPageStmToken pageStmToken))
+
+/**
+ Reads a PDF page content inline image from a stream. The
+ stream is typically obtained by getting the Cos stream for
+ a page contents or a Form contents, and calling CosStreamOpenStm()
+ to open the stream using the <i>filtered</i> mode. This method
+ is called after a BI token has been read from the stream.
+ BI indicates that the following tokens comprise an inline
+ image dictionary and data.
+
+ <p>It begins reading at the current stream position. It returns the
+ number of bytes read. This is the number of bytes read from
+ the stream and indicates the amount by which the stream
+ position has advanced. </p>
+
+ <p>The image attributes dictionary is returned in <code>imageDict</code>.
+ The image data is passed to the PDPageStmImageDataProc();
+ if <code>proc</code> is not provided, the image data is discarded.</p>
+
+ <p><code>imageRawDataStmOffsetP</code> and <code>imageRawDataLenP</code> may be <code>NULL</code>,
+ in which case they are ignored. </p>
+
+ <p>The caller should call CosObjDestroy() on <code>imageDict</code> when it is done. </p>
+
+ <p> This method can raise memory, I/O, and parsing exceptions. </p>
+
+ @param stm The stream from which data is read.
+ @param cosDoc The CosDoc with the PDPage that contains
+ the inline image.
+ @param resDict The Resources dictionary in which to look up
+ ColorSpace resources for inline images.
+ @param flags Currently unused by this method (used by
+ PDPageStmGetToken().)
+ @param proc A callback method to handle inline image data.
+
+ @param procClientData Client data passed to <code>proc</code>.
+ @param imageRawDataStmOffsetP (Filled by the method) The offset
+ of the data stream, after BI, relative to the beginning
+ of <code>stm</code>.
+ @param imageRawDataLenP (Filled by the method) The offset
+ of the last byte of the data stream between the BI and EI
+ PDF operators.
+ @param imageDict (Filled by the method) The returned image
+ dictionary.
+ @return The number of bytes read from <code>stm</code>.
+ @see CosStreamOpenStm
+ @see PDPageGetBox
+ @see PDPageStmGetToken
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(ASUns32, PDPageStmGetInlineImage, (
+ ASStm stm,
+ ASUns32 flags,
+ CosDoc cosDoc,
+ CosObj resDict,
+ PDPageStmImageDataProc proc,
+ void *procClientData,
+ ASUns32 *imageRawDataStmOffsetP,
+ ASUns32 *imageRawDataLenP,
+ CosObj *imageDict))
+
+/**
+ Resolves a destination. <code>dest</code> is the value of the D key in
+ an action. It can be a real destination (an array) or a
+ name. If it is a name, look it up in the <code>doc</code> parameter's Dests dictionary.
+ The value found there can be a real destination (an array) or a
+ dictionary. If it is a dictionary, look up the D key in that
+ dictionary.
+
+ <p>This method is useful for getting a PDViewDestination from
+ an action, as provided by PDActionGetDest(), since this method
+ may not return a PDViewDestination. </p>
+
+ <p> This method can raise memory, I/O, and parsing exceptions. </p>
+
+ @param dest IN/OUT The destination to resolve.
+ @param doc IN/OUT The PDDoc that contains the destination.
+ @return The resolved view destination.
+ @see PDActionGetDest
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(PDViewDestination, PDViewDestResolve, (
+ PDViewDestination dest,
+ PDDoc doc))
+/* Transition API's */
+
+/**
+ Tests whether a transition is valid, meaning that the transition
+ has not been deleted.
+ @param pdt The transition dictionary whose validity is
+ tested.
+ @return <code>true</code> if the transition is valid, <code>false</code> otherwise.
+
+ @see PDTransEqual
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(ASBool, PDTransIsValid, (PDTrans pdt))
+
+/**
+ Gets a <code>NULL</code> transition. This can be used in conjunction
+ with PDTransEqual() to determine whether a transition is <code>NULL</code>.
+
+ @return A <code>NULL</code> transition.
+ @see PDTransNew
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(PDTrans, PDTransNull, (void))
+
+/**
+ Converts the specified dictionary Cos object to a transition
+ and verifies that the transition is valid. This method does
+ not copy the object but is instead the logical equivalent
+ of a type cast.
+ @param coLayer The dictionary Cos object to convert to a transition.
+ @return The transition corresponding to the given dictionary object,
+ <code>obj</code>.
+ @exception pdErrBadBaseObj is raised if the transition is not valid as
+ determined by PDTransIsValid().
+ @see PDTransGetCosObj
+ @see PDTransIsValid
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(PDTrans, PDTransFromCosObj, (CosObj coLayer))
+
+/**
+ Gets the dictionary Cos object corresponding to the transition
+ and verifies that the transition is valid. This method does
+ not copy the object but is the logical equivalent of a type
+ cast.
+ @param pdl The transition whose Cos object is obtained.
+ @return The dictionary Cos object corresponding to the transition.
+ it returns the <code>NULL</code> Cos object if the transition is invalid
+ as determined by PDTransIsValid().
+ @see PDTransFromCosObj
+ @see PDTransIsValid
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(CosObj, PDTransGetCosObj, (PDTrans pdl))
+
+/**
+ Tests two transitions for equality. Two transitions are
+ equal only if their Cos objects are equal (see CosObjEqual()).
+
+ @param pdtOne A transition to test for equality.
+ @param pdtTwo A transition to test for equality.
+ @return <code>true</code> if the transitions are equal, <code>false</code> otherwise.
+
+ @see CosObjEqual
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(ASBool, PDTransEqual, (PDTrans pdtOne, PDTrans pdtTwo))
+
+/* OBSOLETE! Document level transition has/get/set routines */
+NOPROC(PDDocHasTransition)
+NOPROC(PDDocGetTransition)
+NOPROC(PDDocSetTransition)
+
+/* Page level transition set/get routines. */
+
+/**
+ Tests whether a page has a transition.
+ @param pdp The page to test.
+ @return <code>true</code> if the page has a transition, <code>false</code> otherwise.
+
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(ASBool, PDPageHasTransition, (PDPage pdp))
+
+/**
+ Gets the transition for a given page.
+ @param pdp The page whose transition is obtained.
+ @return The page's transition. If the page has no transition, it returns
+ a <code>NULL</code> transition.
+ @see PDPageSetTransition
+ @see PDTransNull
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(PDTrans, PDPageGetTransition, (PDPage pdp))
+
+/**
+ Sets the transition for a given page.
+ @param pdp The page whose transition is set.
+ @param pdt The transition for the page.
+ @see PDPageGetTransition
+ @see PDTransNull
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+UNPROC(void, PDPageSetTransition, (PDPage pdp, PDTrans pdt))
+
+/**
+ Gets the page's automatic-advance timing value, which is the maximum
+ amount of time the page is displayed before the viewer automatically
+ advances to the next page.
+ @param pdp The page whose timing value is obtained.
+ @return The automatic-advance timing for the page, in seconds. If
+ the page does not have an advance timing value, fxDefaultPageDuration is returned
+ (representing positive infinity, meaning that it never advances).
+ @see PDPageSetDuration
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(ASFixed, PDPageGetDuration, (PDPage pdp))
+
+/**
+ Sets the page's automatic-advance timing value, which is the maximum
+ amount of time the page is displayed before the viewer automatically
+ advances to the next page.
+ @param pdp The page whose timing is set.
+ @param fxDuration The auto-advance timing, in seconds.
+ If no advance timing is desired, <code>fxDuration</code> should be set
+ to fxDefaultPageDuration.
+ @see PDPageGetDuration
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+UNPROC(void, PDPageSetDuration, (PDPage pdp, ASFixed fxDuration))
+
+/* Creation, set/get methods. */
+
+/**
+ Creates a new transition of the specified type and duration
+ associated with the given CosDoc.
+ @param cd The CosDoc to which the transition is added.
+
+ @param asaSubtype The transition subtype to create. This
+ subtype is returned by the AVTransHandlerGetTypeProc() callback
+ in AVTransHandler.
+ @param fxDuration The transition duration, in seconds.
+ @return The newly created transition.
+ @exception pdErrBadBaseObj is raised if the transition is not valid as
+ determined by PDTransIsValid().
+ @see PDTransNew
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(PDTrans, PDTransNewFromCosDoc, (CosDoc cd, ASAtom asaSubtype, ASFixed fxDuration))
+
+/**
+ Creates a new transition of the specified type and duration
+ associated with the CosDoc of the given PDDoc.
+ @param pdd The PDDoc to whose CosDoc the transition is
+ added.
+ @param asaSubtype The transition subtype to create. It must
+ be one of the transition effects described in Section 8.3.3
+ in the <i>PDF Reference</i>. All implementations that support transitions
+ are required to support these transitions at a minimum.
+ Plug-ins can register new types or provide a new handler
+ for an existing type.
+ @param fxDuration The transition duration, in seconds.
+ @return The newly created transition.
+ @exception pdErrBadBaseObj is raised if the transition is not valid as
+ determined by PDTransIsValid().
+ @see PDTransNewFromCosDoc
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+UNPROC(PDTrans, PDTransNew, (PDDoc pdd, ASAtom asaSubtype, ASFixed fxDuration))
+
+/**
+ Gets a transition's subtype.
+ @param pdt IN/OUT The transition whose subtype is obtained.
+ @return The ASAtom for the transition's subtype. It can be converted
+ to a string using ASAtomGetString().
+ @see PDTransGetDuration
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(ASAtom, PDTransGetSubtype, (PDTrans pdt))
+
+/**
+ Gets the duration for the given transition.
+ @param pdt IN/OUT The transition for which the duration is obtained.
+
+ @return The transition duration, specified in seconds. If no duration
+ is specified in the transition, the return value is fxDefaultTransDuration
+ (<code>1</code> second).
+
+ @note Standard durations are:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Duration</TH><TH>Meaning</TH></TR>
+ <TR><TD>0 seconds</TD><TD>fast</TD></TR>
+ <TR><TD>1 second</TD><TD>medium</TD></TR>
+ <TR><TD>2 seconds</TD><TD>slow</TD></TR>
+ </TABLE>
+
+ @see PDTransGetSubtype
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(ASFixed, PDTransGetDuration, (PDTrans pdt))
+NOPROC(PDDocSetTextSelectVertical)
+
+/**
+ Used for page-at-a-time downloading and byte-serving Acrobat
+ data. If a document is being viewed over a slow file system,
+ PDDocReadAhead() issues a byte range request for all the data
+ associated with the flags in flags.
+ @param doc IN/OUT The document being read.
+ @param flags IN/OUT Flags describing type of data to read ahead.
+ It must be an <code>OR</code> of flags in PDDocReadAhead() Flags.
+ @param clientData IN/OUT Currently unused.
+ @since PI_PDMODEL_VERSION >= 0x00020002
+
+*/
+NPROC(void, PDDocReadAhead, (PDDoc doc, ASUns32 flags, void * clientData))
+
+/**
+ Opens the specified document. If the document is already
+ open, it returns a reference to the already opened PDDoc. You
+ must call PDDocClose() once for every successful open. If
+ the call fails and the exception is pdErrNeedRebuild, then
+ call again with <code>doRepair</code> equal to <code>true</code>. This allows the application
+ to decide whether to perform the time-consuming repair operation.
+
+ @param fileName A path name to the file, specified in whatever
+ format is correct for <code>fileSys</code>.
+ @param fileSys A pointer to an ASFileSysRec containing the
+ file system in which the file resides.
+ @param authProcEx An authorization callback, called only
+ if the file has been secured (meaning that the file has either
+ the user or the master password set). This callback should
+ obtain whatever information is needed to determine whether
+ the user is authorized to open the file, then call PDDocAuthorize()()
+ (which returns the permissions that the authentication data
+ enables). The Acrobat viewer's built-in authorization procedure
+ requires the user to enter a password, and allows the user
+ to try three times before giving up.
+ @param authProcClientData A pointer to user-supplied data
+ to pass to authProcEx() each time it is called.
+ @param doRepair If <code>true</code>, attempt to repair the file if
+ it is damaged. If <code>false</code>, do not attempt to repair the file
+ if it is damaged.
+ @return The newly-opened document.
+ @exception pdErrNeedPassword is raised if the file is encrypted and <code>authProc</code>Ex()
+ is <code>NULL</code> or returns <code>false</code>.
+ @exception pdErrNotEnoughMemoryToOpenDoc or genErrNoMemory is raised if
+ there is insufficient memory to open the document.
+ @exception pdErrNeedRebuild is raised if the document needs to be rebuilt
+ and <code>doRepair</code> is <code>false</code>.
+ @exception pdErrBadOutlineObj is raised if the Outlines object appears
+ to be invalid (if the value of the Outlines key in the Catalog is not a <code>NULL</code> or dictionary
+ object).
+ @exception pdErrBadRootObj is raised if the Catalog object (as returned
+ by CosDocGetRoot()) is not a dictionary.
+ @exception pdErrBadBaseObj is raised if the Pages tree appears to be invalid
+ (if the value of the Pages key in the Catalog is not a <code>NULL</code> or dictionary object).
+
+ @exception pdErrTooManyPagesForOpen is raised if the document contains
+ too many pages.
+ @exception cosSynErrNoHeader is raised if the document's header appears
+ to be bad.
+ @exception cosSynErrNoStartXRef is raised if no end-of-file line can be
+ located.
+ @exception cosErrRebuildFailed is raised if <code>doRepair</code> is <code>true</code> and rebuild
+ failed.
+ @see PDDocClose
+ @see PDDocCreate
+ @see PDDocAuthorize
+ @see PDDocOpen
+ @see PDDocOpenFromASFile
+ @see PDDocOpenFromASFileEx
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(PDDoc, PDDocOpenEx, (ASPathName fileName, ASFileSys fileSys,PDAuthProcEx authProcEx, void *authProcClientData, ASBool doRepair))
+
+/**
+ Opens the document specified by the ASFile. <code>aFile</code> must be
+ a valid ASFile. It is the caller's responsibility to dispose
+ of the ASFile after calling PDDocClose().
+
+ <p>This method is useful when the document referenced by the
+ ASFile is not on the local machine, and is being retrieved
+ incrementally using the multiread protocol of an ASFileSys.
+ If the bytes required to open a PDDoc are not yet available,
+ this method will raise the exception fileErrBytesNotReady.
+ The client should call PDDocOpenFromASFile() until this exception
+ is no longer raised. </p>
+
+ @param aFile The ASFile to open. The ASFile should be
+ released after the PDDoc is closed.
+ @param authProcEx An authorization callback, called only
+ if the file is encrypted. This callback should obtain whatever
+ information is needed to determine whether the user is authorized
+ to open the file, then call PDDocAuthorize() (which returns
+ the permissions that the authentication data enables). The
+ Acrobat viewer's built-in authorization procedure requires
+ the user to enter a password, and allows the user to try
+ three times before giving up.
+ @param authProcClientData A pointer to user-supplied data
+ to pass to authProcEx() each time it is called.
+ @param doRepair If <code>true</code>, attempt to repair the file if
+ it is damaged. If <code>false</code>, do not attempt to repair the file
+ if it is damaged.
+ @return A valid PDDoc if successfully opened.
+ @exception pdErrNeedPassword is raised if the file is encrypted and <code>authProc</code>
+ is <code>NULL</code> or returns <code>false</code>.
+ @exception fileErrBytesNotReady is raised if the bytes required to open
+ a PDDoc are not yet available.
+ @see PDDocClose
+ @see PDDocOpen
+ @see PDDocOpenEx
+ @see PDDocOpenFromASFile
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(PDDoc, PDDocOpenFromASFileEx, (ASFile aFile, PDAuthProcEx authProcEx, void *authProcClientData, ASBool doRepair))
+
+/**
+ Registers a new security handler with the Acrobat viewer.
+ It is the same as PDRegisterCryptHandler() except that it accepts a
+ client data parameter.
+ @param handler A pointer to a structure that contains the
+ security handler's callback functions. This structure must
+ not be freed after calling PDRegisterCryptHandlerEx().
+ @param pdfName The name of the security handler as it
+ will appear in the PDF file. This name is also used by PDDocSetNewCryptHandler().
+ Storage for this name can be freed after PDRegisterCryptHandlerEx()
+ has been called.
+ @param userName The name of the security handler as it
+ will be shown in menus. This name can be localized to different
+ languages. Storage for this name can be freed after PDRegisterCryptHandlerEx()
+ has been called.
+ @param clientData A pointer to user-supplied data to store
+ with the handler.
+ @exception genErrBadParm is raised if the security handler's size field
+ is incorrect.
+ @exception ErrSysPDSEdit is raised if either pdfName or userName are already
+ in use by a registered security handler.
+ @exception genErrNoMemory is raised is memory is exhausted.
+ @see PDDocSetNewCryptHandler
+ @see PDDocPermRequest
+ @see PDRegisterCryptHandler
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(void, PDRegisterCryptHandlerEx, (PDCryptHandler handler, const char *pdfName, const char *userName, void *clientData))
+
+/**
+ Gets the client data for the encryption handler associated
+ with the PDDoc. This is the client data provided as a parameter
+ in PDRegisterCryptHandlerEx().
+ @param pdDoc The document whose encryption handler client
+ data is obtained.
+ @return Client data for the encryption handler associated with the
+ PDDoc. It returns <code>NULL</code> if there is no encryption handler or
+ no client data was provided.
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(void *, PDDocGetCryptHandlerClientData, (PDDoc pdDoc))
+
+/**
+ Tests whether the document will open in full-screen mode.
+ This provides an alternative to calling PDDocGetPageMode()
+ to test for PDFullScreen.
+ @param pdDoc The document to test.
+ @return <code>true</code> if the PDDoc is in full-screen mode, <code>false</code>
+ otherwise.
+ @see PDDocSetFullScreen
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(ASBool, PDDocGetFullScreen, (PDDoc pdDoc))
+
+/**
+ Sets whether this document opens in full-screen mode. This
+ provides an alternative to calling PDDocSetPageMode() with
+ PDFullScreen.
+ @param pdDoc The document to set.
+ @param fs <code>true</code> if the document is set to open in full-screen
+ mode, <code>false</code> otherwise.
+ @see PDDocGetFullScreen
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+UNPROC(void, PDDocSetFullScreen, (PDDoc pdDoc, ASBool fs))
+
+/**
+ Saves a document to disk as specified in a parameter's structure.
+ This is essentially the same as PDDocSave() with two additional
+ parameters: a cancel proc and cancel proc client data (so
+ you could cut and paste description information and other
+ information from PDDocSave()).
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+ @ingroup ReplaceableMethods
+ @param doc The document to save.
+ @param inParams A PDDocSaveParams structure specifying how
+ the document should be saved.
+ @see PDDocSave
+
+ @note Saving a PDDoc invalidates all objects derived from
+ it. See PDDocSave() for important information about releasing
+ objects that you may have acquired or used from a PDDoc
+ before it is saved.
+ @note Not replaceable in Adobe Reader.
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+UPROC(void, PDDocSaveWithParams, (PDDoc doc, PDDocSaveParams inParams))
+
+/**
+ Given a name tree (such as the Dests tree in the Names dictionary)
+ and a string, find the CosObj in the tree that matches the
+ string.
+
+ <p>See Section 3.8.5 in the <i>PDF Reference</i> for more information
+ on name trees. </p>
+ @param nameTree The name tree in which to search.
+ @param string The name to search for. The name tree uses
+ Cos-style strings, which may use Unicode encoding, and these
+ may contain bytes with zeroes in them (high bytes of ASCII
+ characters). Note that <code>name</code> is not a C-style string. Cos string
+ objects can contain <code>NULL</code> chars. Standard C string-handling
+ functions may not work as expected.
+ @param stringLen The length of <code>name</code> in bytes.
+ @return The Cos object associated with the specified name, which
+ is the array element following the name.
+ @see PDNameTreeGet
+ @see PDNameTreePut
+ @since PI_PDMODEL_VERSION >= 0x00020002
+*/
+NPROC(CosObj, PDNameTreeLookup, (CosObj nameTree, char *string, ASInt32 stringLen))
+
+/* Support for CJK viewers */
+
+/**
+ Gets a Type 0 font's descendant, which may be a CIDType0
+ or CIDType2 font.
+
+ <p>Type 0 fonts support single-byte or multi-byte encodings
+ and can refer to one or more descendant fonts. These fonts
+ are analogous to the Type 0 or composite fonts supported
+ by Level 2 PostScript interpreters. However, PDF Type 0
+ fonts only support character encodings defined by a CMap.
+ The CMap specifies the mappings between character codes
+ and the glyphs in the descendant fonts. </p>
+
+ <p>For information on Type 0 fonts, see Section 5.6 in the
+ <i>PDF Reference</i>. See Section 5.6.4 for more details on CMaps. </p>
+
+ @param font IN/OUT The font whose descendant is obtained.
+ @return The font's descendant font.
+ @see PDFontGetCIDSystemInfo
+ @see PDFontGetCIDSystemSupplement
+ @since PI_PDMODEL_VERSION >= 0x00020003
+
+*/
+SPROC(PDFont, PDFontGetDescendant, (PDFont font), PDFontGetDescendantInt)
+
+/**
+ Gets a string representing a font's encoding.
+
+ <p>Use PDFontGetEncodingIndex() to get encoding information for
+ Roman viewers. </p>
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows and <code>MacRomanEncoding</code>
+ on Mac OS. On UNIX (except HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps. In this case, the encoding string contains values
+ such as <code>"90ms-RKSJ-H"</code>, <code>"90msp-RKSJ-H"</code>, <code>"Identity-V"</code>, or
+ <code>"90pv-RKSJ-H"</code>; it does not return a string like <code>"Shift-JIS"</code>. </p>
+
+ @param font The font whose encoding name is obtained.
+ @return The string representing the font's encoding.
+ @see PDFontGetEncodingIndex
+ @see PDGetHostEncoding
+ @since PI_PDMODEL_VERSION >= 0x00020003
+*/
+NPROC(const ASUns8*, PDFontGetEncodingName, (PDFont font))
+
+/**
+ Gets an ASAtom representing Registry and Ordering for a
+ CIDFont. This information resides in the CIDSystemInfo entry
+ of the CIDFont dictionary, which describes a CIDFont.
+
+ <p>PDFontGetCIDSystemInfo() takes either a Type 0 font or a descendant
+ font (CIDType0 or CIDType2) as an argument. This information
+ is always present for any Type 0 font; the actual registry
+ ordering information is a part of the descendant font. </p>
+
+ <p>This method provides one way to identify a font's language. </p>
+
+ <p>The CIDSystemInfo entry uses three components to identify
+ a character collection uniquely:</p>
+ <ul>
+ <li>A registry name to identify an issuer of ordering information. </li>
+ <li>An ordering name to identify an ordered character collection. </li>
+ <li>A supplement number to indicate that the ordered character
+ collection for a registry, ordering, and previous supplement
+ has been changed to add new characters assigned CIDs beginning
+ with the next available CID. </li>
+ </ul>
+
+ <p>The PDFontGetCIDSystemInfo() method obtains the first two
+ of these components. </p>
+
+ <p>A CIDFont is designed to contain a large number of glyph
+ procedures. Instead of being accessed by a name, each glyph
+ procedure is accessed by an integer known as a character
+ identifier or CID. Instead of a font encoding, CIDFonts
+ use a CMap with a Type 0 composite font to define the mapping
+ from character codes to a font number and a character selector. </p>
+
+
+ <p>For more information on Type 0 fonts, CIDFonts, and CMaps,
+ see Section 5.6 in the <i>PDF Reference</i>. For detailed information
+ on CIDFonts, see <i>Technical Note # 5092, CID-Keyed Font Technology
+ Overview</i>, and <i>Technical Note # 5014, Adobe CMap and CIDFont
+ Files Specification</i>. </p>
+ @param font IN/OUT The font whose Registry and Ordering information
+ is obtained.
+ @return The ASAtom representing the CIDFont's Registry and Ordering
+ information (for example, <code>"Adobe-Japan1"</code>).
+ @see PDFontGetCIDSystemSupplement
+ @see PDFontGetDescendant
+ @since PI_PDMODEL_VERSION >= 0x00020003
+
+*/
+NPROC(ASAtom, PDFontGetCIDSystemInfo, (PDFont font))
+
+/**
+ Gets the SystemSupplement number of a CIDFont. This field
+ resides in the CIDSystemInfo entry of the CIDFont dictionary,
+ which describes a CIDFont.
+
+ <p>The CIDSystemInfo entry uses three components to identify
+ a character collection uniquely:</p>
+ <ul>
+ <li>A registry name to identify an issuer of orderings. </li>
+ <li>An ordering name to identify an ordered character collection. </li>
+ <li>A supplement number to indicate that the ordered character
+ collection for a registry, ordering, and previous supplement
+ has been changed to add new characters assigned CIDs beginning
+ with the next available CID. </li>
+ </ul>
+
+ <p>PDFontGetCIDSystemInfo() provides character collection information,
+ and PDFontGetCIDSystemSupplement() specifies the version of
+ the ordering. </p>
+
+ <p>A CIDFont is designed to contain a large number of glyph
+ procedures. Instead of being accessed by a name, each glyph
+ procedure is accessed by an integer known as a character
+ identifier or CID. Instead of a font encoding, CIDFonts
+ use a CMap with a Type 0 composite font to define the mapping
+ from character codes to a font number and a character selector. </p>
+
+ <p>For more information on Type 0 fonts, CIDFonts, and CMaps,
+ see Section 5.6 in the <i>PDF Reference</i>. For detailed information
+ on CIDFonts, see <i>Technical Note # 5092, CID-Keyed Font Technology
+ Overview</i>, and <i>Technical Note # 5014, Adobe CMap and CIDFont
+ Files Specification</i>. </p>
+ @param font IN/OUT The font whose <code>SystemSupplement</code> field is obtained.
+
+ @return The <code>SystemSupplement</code> field from the CIDFont.
+ @see PDFontGetDescendant
+ @see PDFontGetCIDSystemInfo
+ @since PI_PDMODEL_VERSION >= 0x00020003
+
+*/
+NPROC(ASInt32, PDFontGetCIDSystemSupplement, (PDFont font))
+
+/**
+ Translates a string from Unicode or <code>PDFDocEncoding</code> to host
+ encoding. This method is useful when setting or retrieving
+ displayed text that might be in Unicode, such as text that
+ appears in a text annotation or bookmark.
+
+ <p>A character that cannot be converted to the destination
+ encoding is replaced with a space.</p>
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows and <code>MacRomanEncoding</code>
+ on Mac OS. On UNIX (except HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and
+ <code>PDFDocEncoding</code>. For non-Roman systems, the host encoding
+ may be a variety of encodings, which are defined by a CMap
+ (character map). See Section 5.6.4 in the <i>PDF Reference</i>
+ for information on CMaps. </p>
+
+ <p>For non-Roman systems, use PDXlatetoHostEx(). Use PDGetHostEncoding()
+ to determine whether the host encoding for a system is Roman. </p>
+
+ <p>In general, PDXlatetoHostEx() operates in the same way as PDXlateToHost()
+ but requires an extra argument, since the sizes of the input
+ and translated strings may differ. This method can be called
+ instead of PDXlateToHost(), and must be called for multi-byte character set systems. </p>
+
+ @param inPdfStr IN/OUT A pointer to the string to translate (it may
+ point to the same memory as <code>outHostStr</code>, allowing strings
+ to translate in place).
+ @param inPdfStrSize IN/OUT The length of <code>inPdfStr</code> in bytes.
+ @param outHostStr IN/OUT (Filled by the method) A pointer to the
+ translated string (it may point to the same memory as <code>inPdfStr</code>).
+
+ @param outHostStrSize IN/OUT The length of the <code>outHostStr</code> buffer in bytes.
+ @return The number of bytes in the translated string <code>outHostStr</code>.
+ @see PDFontXlateToHost
+ @see PDFontXlateToUCS
+ @see PDGetHostEncoding
+ @see PDXlateToHost
+ @see PDXlateToPDFDocEnc
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00020003
+
+*/
+SPROC(ASInt32, PDXlateToHostEx, (const char* inPdfStr, ASInt32 inPdfStrSize, char* outHostStr, ASInt32 outHostStrSize ), PDXlateToExtHost)
+
+/**
+ Translates a string from host encoding to <code>PDFDocEncoding</code>
+ or Unicode. This method is useful when using text that must
+ be in <code>PDFDocEncoding</code> or Unicode, such as text in a text
+ annotation, bookmark, or article title.
+
+ <p>A character that cannot be converted to the destination
+ encoding is replaced with a space. For example, PDXlateToPDFDocEncEx()
+ converts <code>'\\n'</code> to a space character (<code>'\\r'</code> is present in <code>PDFDocEncoding</code>
+ and is left unchanged). </p>
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows and <code>MacRomanEncoding</code>
+ on Mac OS. On UNIX (except HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps.</p>
+
+ <p>For non-Roman systems, use PDXlateToPDFDocEncEx(). You can
+ use PDGetHostEncoding() to determine whether a system's host
+ encoding is Roman. </p>
+
+ <p>In general, PDXlateToPDFDocEncEx() can be called instead of
+ PDXlateToPDFDocEnc() since PDXlateToPDFDocEncEx() works for
+ PDFDocEncoding or Unicode. </p>
+ @param bUseUnicode If <code>true</code>, translate the string to Unicode;
+ otherwise use <code>PDFDocEncoding</code>.
+ @param inHostStr A pointer to the string to translate (it may
+ point to the same memory as <code>outPDFStr</code>, allowing strings
+ to translate in place).
+ @param inHostStrSize The number of bytes in the string to
+ translate.
+ @param outPDFStr (Filled by the method) A pointer to the
+ translated string (it may point to the same memory as <code>inHostStr</code>).
+
+ @param outPDFStrSize The length of the <code>outPDFStr</code> buffer,
+ in bytes.
+ @return The number of bytes in the translated string <code>outPDFStr</code>.
+ @see PDFontXlateToHost
+ @see PDFontXlateToUCS
+ @see PDGetHostEncoding
+ @see PDXlateToHost
+ @see PDXlateToHostEx
+ @see PDXlateToPDFDocEnc
+ @since PI_PDMODEL_VERSION >= 0x00020003
+*/
+SPROC(ASInt32, PDXlateToPDFDocEncEx, (ASBool bUseUnicode,const char *inHostStr, ASInt32 inHostStrSize, char* outPDFStr, ASInt32 outPDFStrSize ), PDXlateToExtPDFDocEnc)
+
+/**
+ Gets the number of additional bytes required for the multi-byte
+ character pointed to by <code>cp</code>. If <code>cp</code> points to a single-byte
+ character, <code>0</code> is returned. This method makes it possible to determine
+ the length of multi-byte character strings to allocate space
+ for them.
+
+ <p>This function is similar to the ANSI-C code: </p>
+
+ <p><code>mblen(cp, MB_LEN_MAX) - 1</code> </p>
+
+ <p>or the Windows function: </p>
+
+ <p><code>IsDBCSLeadByte(cp) </code></p>
+
+ @param cp The character to examine.
+ @return The number of bytes in the multi-byte character.
+ @since PI_PDMODEL_VERSION >= 0x00020003
+*/
+NPROC(ASInt32, PDHostMBLen, (const char* cp))
+
+/**
+ Indicates what kind of host encoding a system uses. It allows
+ you to determine whether a system is Roman or non-Roman.
+ (Non-Roman is also known as CJK-capable, which means that it is capable
+ of handling multi-byte character sets such as Chinese,
+ Japanese, or Korean).
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows and <code>MacRomanEncoding</code>
+ on Mac OS. On UNIX (except HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps. </p>
+
+ <p>Use PDGetHostEncoding() to determine if a system's host encoding
+ is Roman. </p>
+ @return <code>0</code> for a Roman system, nonzero for a non-Roman system (a
+ structure that depends on the host encoding). Users should
+ simply test whether this value is <code>0</code>.
+ @see PDGetPDFDocEncoding
+ @see AVAppGetLanguageEncoding
+ @since PI_PDMODEL_VERSION >= 0x00020003
+*/
+NPROC(void*, PDGetHostEncoding, (void))
+
+/**
+ Creates a word finder that is used to extract text in Unicode
+ format from a PDF file. The word finder may either be used
+ by PDWordFinderEnumWords() (which enumerates words one-by-one)
+ or by PDWordFinderAcquireWordList() (which fills a table with
+ all the words on a page).
+
+ <p>PDDocCreateWordFinder() also works for non-Roman character
+ set viewers. For PDDocCreateWordFinder(), words are extracted
+ to the host encoding. Users desiring Unicode output should
+ use PDDocCreateWordFinderUCS(). </p>
+
+ <p>The type of PDWordFinder determines the encoding of the
+ string returned by PDWordGetString(). If PDDocCreateWordFinderUCS()
+ is used to create the word finder, PDWordGetString() returns
+ only Unicode. Note that there is no way to detect Unicode strings returned
+ by PDWordGetString(), since there is no UCS header (FEFF)
+ added to each string returned. </p>
+
+ <p>In CJK viewers, words are stored internally using CID encoding.
+ For more information on CIDFonts and related topics, see
+ Section 5.6 in the <i>PDF Reference</i>. For detailed information
+ on CIDFonts, see <i>Technical Note #5092, CID-Keyed Font Technology
+ Overview</i>, and <i>Technical Note #5014, Adobe CMap and CIDFont
+ Files Specification</i>. </p>
+ @param doc The document on which the word finder is used.
+
+ @param algVersion The version of the word-finding algorithm
+ to use. If it is WF_LATEST_VERSION (see PDExpT.h), the most recent
+ version is used. Set to <code>0</code> to ignore the version.
+
+ @param rdFlags Word-finding options that determine the
+ tables filled when using PDWordFinderAcquireWordList(). It must
+ be an <code>OR</code> of one or more of the WordFinder Sort Order Flags.
+
+ @param clientData A pointer to user-supplied data to pass
+ to the newly created word finder.
+ @return The newly created word finder.
+ @see PDDocCreateWordFinder
+ @see PDWordFinderEnumWords
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderDestroy
+ @see PDWordFilterWord
+
+ @note The word finder also extracts text from Form XObjects
+ that are executed in the page contents. For information
+ about Form XObjects, see Section 4.9 in the <i>PDF Reference</i>.
+
+ @note PDDocCreateWordFinderUCS() is useful for converting
+ non-Roman text (CJK or Chinese-Japanese-Korean) to Unicode.
+ This method also converts Roman text to Unicode in any document.
+ @ref WordFinderSortOrderFlags
+ @since PI_PDMODEL_VERSION >= 0x00020003
+*/
+NPROC(PDWordFinder, PDDocCreateWordFinderUCS, (PDDoc doc,ASInt16 algVersion, ASUns16 rdFlags, void *clientData))
+
+/**
+ Translates a string from the PDFont's encoding to host encoding.
+ This is useful for converting the text from a PDWord into
+ host encoding. In the same way that PDXlateToHostEx() converts
+ text from bookmark titles to host encoding, PDFontXlateToHost()
+ converts text from a page contents stream to host encoding.
+ Use PDFontXlateToUCS() to translate from the PDFont's encoding
+ to Unicode.
+
+ <p>Non-Roman fonts, such as PostScript composite fonts, can
+ be encoded in different ways, such as SHIFT-JIS, RKSJ, and
+ so on. To use PDFontXlateToHost(), the caller does not need
+ to know which encoding he is converting from, since that
+ information is contained in the PDFont. </p>
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows
+ and <code>MacRomanEncoding</code> on Mac OS. On UNIX (except
+ HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>MacRomanEncoding</code>, <code>WinAnsiEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps. </p>
+
+ Use PDGetHostEncoding() to determine if a system's host encoding
+ is Roman.
+ @param fontP The font used in the input string <code>inP</code>.
+ @param inP A pointer to the string to translate.
+ @param inLen The length of the <code>inP</code> buffer in bytes.
+ @param outP (Filled by the method) A pointer to the translated
+ string.
+ @param outLen The length of the <code>outP</code> buffer in bytes.
+ @return The number of bytes in the translated string <code>outP</code>.
+ @see PDFontXlateString
+ @see PDFontXlateToUCS
+ @see PDGetHostEncoding
+ @see PDXlateToHostEx
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00020003
+*/
+NPROC(ASInt32, PDFontXlateToHost, (PDFont fontP, ASUns8 *inP, ASInt32 inLen, ASUns8 *outP, ASInt32 outLen))
+
+/**
+ Translates a string from whatever encoding the PDFont uses
+ to Unicode encoding. This is useful for converting the text
+ from a PDWord into Unicode. Use PDFontXlateToHost() to translate
+ from the PDFont's encoding to host encoding.
+
+ <p>Non-Roman fonts, like PostScript composite fonts, can be
+ encoded in different ways, such as SHIFT-JIS, RKSJ, and
+ so on. The caller does not need to know which encoding they're
+ converting from, since that information is contained in
+ the PDFont. </p>
+
+ <p>Host encoding is a platform-dependent encoding for the host
+ machine. For non-UNIX Roman systems, it is <code>WinAnsiEncoding</code> on Windows
+ and <code>MacRomanEncoding</code> on Mac OS. On UNIX (except
+ HP-UX) Roman systems, it is <code>ISO8859-1</code> (ISO Latin-1); for
+ HP-UX, it is <code>HP-ROMAN8</code>. See Appendix D in the <i>PDF Reference</i>
+ for descriptions of <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, and
+ <code>PDFDocEncoding</code>. </p>
+
+ <p>For non-Roman systems, the host encoding may be a variety
+ of encodings, which are defined by a CMap (character map).
+ See Section 5.6.4 in the <i>PDF Reference</i> for a list of predefined
+ CMaps. </p>
+
+ <p>Use PDGetHostEncoding() to determine if a system's host encoding
+ is Roman. </p>
+
+ @param fontP The font of the input string <code>inP</code>.
+ @param inP A pointer to the string to translate.
+ @param inLen The length of the <code>inP</code> buffer in bytes.
+ @param outP (Filled by the method) A pointer to the translated
+ string. If it is <code>NULL</code>, the method returns the size of the translated
+ string.
+ @param outLen The length of the <code>outP</code> buffer in bytes.
+ If it is <code>0</code>, the method returns the size of the translated string.
+ @return The number of bytes in the translated string in <code>outP</code>.
+ @see PDFontXlateToHost
+ @see PDGetHostEncoding
+ @see PDXlateToHostEx
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00020003
+*/
+NPROC(ASInt32, PDFontXlateToUCS, (PDFont fontP, ASUns8 *inP, ASInt32 inLen, ASUns8 *outP, ASInt32 outLen))
+
+/* Acrobat 4.0 Additions */
+
+/**
+ Gets the PDDoc associated with a CosDoc.
+ @param cosDoc The Cos-level document object for which
+ a PDDoc is obtained. This object represents the PDF.
+ @return The PDDoc associated with cosDoc.
+ @exception genErrBadParm is raised if the CosDoc is not valid.
+ @exception pdErrNoPDDocForCosDoc is raised if there is no PDDoc associated
+ with this CosDoc.
+ @see AVDocGetPDDoc
+ @see PDPageGetDoc
+ @see PDDocGetCosDoc
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(PDDoc, PDDocFromCosDoc, (CosDoc cosDoc))
+
+/**
+ Enumerates the specified type of page resources, for a specified
+ range of pages.
+
+ <p>This method enumerates resources in each page's Resources
+ dictionary (ColorSpace resources, Fonts, ExtGState objects,
+ or others). In addition, it looks inside in-line images
+ and page contents to enumerate ColorSpace resources that
+ are not in the Resources dictionary, such as DeviceGray,
+ DeviceRGB, and DeviceCMYK. </p>
+
+ @param pdDoc IN/OUT The document whose resources are enumerated.
+
+ @param startPage IN/OUT The first page whose resources are enumerated.
+ The first page in a document is <code>0</code>.
+ @param endPage IN/OUT The last page whose resources are enumerated.
+
+ @param resourceType IN/OUT Resource type to enumerate. It must be
+ one of the valid PDF resource types, such as Font, ColorSpace,
+ XObject, Pattern, and so on, described in Section 3.7 in
+ the <i>PDF Reference</i>. Pass ASAtomNull to enumerate all resource
+ types.
+ @param enumProc IN/OUT A user-supplied callback to call once for
+ each resource of the specified type. The resource is presented
+ as a CosObj, and it is the first parameter of <code>enumProc</code> (the second parameter is unused).
+ @param clientData IN/OUT User-supplied data to pass to <code>enumProc</code>
+ each time it is called.
+ @exception genErrBadParm
+ @exception pdErrOpNotPermitted
+ @see PDDocEnumFonts
+ @see PDEEnumElements
+ @see PDELogDump
+ @see PDEObjectDump
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(void, PDDocEnumResources,
+ (PDDoc pdDoc,
+ ASInt32 startPage,
+ ASInt32 endPage,
+ ASAtom resourceType,
+ CosObjEnumProc enumProc,
+ void *clientData))
+
+/**
+ Adds text annotations from <code>sourceDoc</code> to <code>doc</code>.
+
+ <p>It raises an exception if the given object has the wrong Cos
+ type. It also raises exceptions if storage is exhausted or file access fails. </p>
+
+ @param doc The document that will receive the imported
+ annotations.
+ @param src The document from which the annotations will
+ be imported.
+ @param noteTitle Not currently used.
+ @param noteTitleLen Not currently used.
+ @param color If non-<code>NULL</code>, the color attribute of imported
+ annotations. <code>color</code> indicates the color space (PDDeviceGray,
+ PDDeviceRGB, PDDeviceCMYK), and color values for the annotation.
+
+ @param progMon If supplied, it is a procedure to call regularly
+ to update a progress bar for the user.
+ @param monClientData If supplied, it is a pointer to the private
+ data buffer used by <code>progMon</code>.
+ @param importFilter A user-supplied procedure that will
+ be called to provide a filtering process, allowing only
+ desired annotations to import.
+ @return The number of notes imported.
+ @notify PDDocDidImportAnnots
+ @notify PDDocWillImportAnnots
+ @see PDDocImportNotes
+ @see PDDocExportNotes
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(ASInt32, PDDocImportCosDocNotes,
+ (PDDoc doc,
+ CosDoc src,
+ const char* noteTitle,
+ ASInt32 noteTitleLen,
+ PDColorValue color,
+ void* progMon, /* ASProgressMonitor */
+ void* monClientData,
+ PDDocWillImportAnnotCallback importFilter))
+
+/**
+ Creates a document containing empty pages plus text annotations
+ (notes) from <code>sourceDoc</code>. It does not create a new document if
+ <code>sourceDoc</code> contains no notes.
+ @param doc The document from which notes are exported.
+
+ @param unused1 Currently unused.
+ @param unused2 Currently unused.
+ @param unused3 Currently unused.
+ @param unused4 Currently unused.
+ @param exportFilter A user-supplied routine that selects
+ which notes to export.
+ @param numNotesP If non-<code>NULL</code>, the number of notes exported.
+ @return The CosDoc of the document created to hold the exported
+ notes.
+ @notify PDDocWillExportAnnots
+ @notify PDDocDidExportAnnots
+ @see PDDocImportCosDocNotes
+ @see PDDocImportNotes
+ @see PDDocExportSomeNotes
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(CosDoc, PDDocExportNotes,
+ (PDDoc doc,
+ ASFileSys unused1,
+ ASPathName unused2,
+ void* unused3, /* ASProgressMonitor */
+ void* unused4,
+ PDDocWillExportAnnotCallback exportFilter,
+ ASInt32* numNotesP))
+
+/**
+ Returns the sequence number of the specified annotation
+ for the given page. It is applicable only to annotations
+ that are listed in Acrobat's Comments pane and therefore
+ cannot be summarized using Summarize command
+ (as would be the case for link and widget annotations, for example).
+
+ <p>This method is similar to PDPageGetAnnotIndex() but it checks
+ the information flags from the annotation handler's PDAnnotHandlerGetAnnotInfoFlagsProc()
+ to determine whether the PDAnnotOperationSummarize flag
+ is set, meaning that the annotation has a sequence number.</p>
+
+ @param page The page on which the annotation exists.
+ @param annot The annotation for which the sequence number
+ is desired.
+ @return The sequence number of the specified annotation; or <code>-1</code> if
+ the annotation is not in the page or if it is an annotation that cannot be summarized.
+
+ @note The sequence number is one-based, while the index
+ returned by PDPageGetAnnotIndex() is zero-based.
+ @see PDPageGetAnnot
+ @see PDPageGetAnnotIndex
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(ASInt32, PDPageGetAnnotSequence, (PDPage page, PDAnnot annot))
+
+/**
+ 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 <code>NULL</code>.
+
+ <p>To effectively use a PDAnnotHandler, the AVAnnotHandler
+ associated with this annotation must have its AVAnnotHandlerGetInfoProc()
+ and AVAnnotHandlerDeleteInfoProc() callbacks defined. </p>
+
+ <p>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.</p>
+ @param 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.
+ @see PDGetAnnotHandlerByName
+ @see AVAppGetAnnotHandlerByName
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDRegisterAnnotHandler, (PDAnnotHandler handler))
+
+/**
+ Gets the annotation handler that handles the specified annotation
+ type.
+ @param name IN/OUT The name of the requested annotation handler. The
+ character string for the name can be converted to an ASAtom
+ using ASAtomFromString().
+ @return The annotation handler that services annotations of type
+ <code>name</code>. It returns the default annotation handler if no handler
+ services the specified annotation type.
+ @see PDRegisterAnnotHandler
+ @see AVAppRegisterAnnotHandler
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+UNPROC(PDAnnotHandler, PDGetAnnotHandlerByName, (ASAtom name))
+
+/* PDNameTree related methods */
+
+/**
+ Creates a new name tree in the document.
+ @param pdDoc The document for which a new name tree is
+ desired.
+ @return The newly created name tree or a <code>NULL</code> CosObj if Acrobat
+ is unable to create a PDNameTree for the document specified
+ by <code>pdDoc</code>.
+
+ <p>PDNameTreeIsValid() should be called to determine if the name
+ tree returned by PDNameTreeNew() is usable. </p>
+ @see PDNameTreeFromCosObj
+ @see PDNameTreeGetCosObj
+ @see PDNameTreeIsValid
+ @see PDNameTreeRemove
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(PDNameTree, PDNameTreeNew, (PDDoc pdDoc))
+
+/**
+ Creates a type cast of the CosObj to a name tree. This does
+ not copy the object.
+ @param obj IN/OUT The CosObj for which a PDNameTree representation
+ is desired.
+ @return A PDNameTree representation of <code>obj</code>.
+ @see PDNameTreeNew
+ @see PDNameTreeGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(PDNameTree, PDNameTreeFromCosObj, (CosObj obj))
+
+/**
+ Creates a type cast of the name tree to a CosObj. This does
+ not copy the object.
+ @param theTree IN/OUT The PDNameTree for which a CosObj representation
+ is desired.
+ @return A CosObj representation of <code>theTree</code>.
+ @see PDNameTreeNew
+ @see PDNameTreeFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(CosObj, PDNameTreeGetCosObj, (PDNameTree theTree))
+
+/**
+ Validates whether a PDNameTree is a CosDict Cos object.
+
+ @param theTree The PDNameTree whose validity is desired.
+ @return <code>true</code> if the name tree is a CosDict, <code>false</code> otherwise.
+
+ @see PDDocCreateNameTree
+ @see PDDocGetNameTree
+ @see PDNameTreeEqual
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDNameTreeIsValid, (PDNameTree theTree))
+
+/**
+ Compares two name trees to determine if they are the same
+ object.
+ @param tree1 A name tree.
+ @param tree2 Another name tree.
+ @return <code>true</code> if the two name trees are equivalent, <code>false</code>
+ otherwise.
+ @see PDNameTreeIsValid
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDNameTreeEqual, (PDNameTree tree1, PDNameTree tree2))
+
+/**
+ Puts a new entry in the name tree. If an entry with this
+ name is already in the tree, it is replaced.
+ @param theTree IN/OUT The name tree for which a new entry is added.
+
+ @param key IN/OUT The name of the object to put in the tree. This
+ is a Cos-style string, not a C string. This allows the use
+ of an existing indirect object for the key rather than forcing
+ the creation of a new object.
+ @param value IN/OUT The Cos object to be associated with <code>key</code>.
+
+ @notify PDNameTreeNameAdded
+ @see PDNameTreeGet
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDNameTreePut, (PDNameTree theTree, CosObj key, CosObj value))
+
+/**
+ Retrieves an object from the name tree.
+ @param theTree The PDNameTree from which an object is
+ retrieved.
+ @param name The name of the object within <code>theTree</code> to get.
+ This is a Cos-style string, not a C string.
+ @param nameLen The length of <code>name</code>.
+ @param value (Filled by the method) The Cos object corresponding
+ to <code>name</code> within <code>theTree</code>.
+ @return <code>true</code> if the object was retrieved, <code>false</code> if no object
+ with this name exists.
+ @see PDNameTreePut
+ @see PDNameTreeRemove
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDNameTreeGet, (PDNameTree theTree, const char *name, ASInt32 nameLen, CosObj *value))
+
+/**
+ Removes the specified object from the tree. It does nothing
+ if no object with that name exists.
+ @param theTree IN/OUT The name tree from which an entry is removed.
+
+ @param key IN/OUT The name of the entry to remove. This is a Cos-
+ style string, not a C string.
+ @param keyLen IN/OUT The length of <code>key</code> in bytes.
+ @notify PDNameTreeNameRemoved
+ @see PDNameTreeGet
+ @see PDNameTreePut
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDNameTreeRemove, (PDNameTree theTree, const char *key, ASInt32 keyLen))
+
+/**
+ Enumerates the entries in the tree.
+ @param theTree IN/OUT A name tree.
+ @param proc IN/OUT A procedure to call once for each name/object
+ pair in <code>theTree</code>. The obj/value pair in <code>proc</code> correspond
+ to the Cos string and CosObj values of each leaf in the
+ tree.
+ @param clientData IN/OUT Data used by the enumeration procedure.
+ <code>clientData</code> is passed to the enumeration procedure proc each
+ time an entry is encountered.
+ @see PDNameTreeGet
+ @see PDNameTreePut
+ @see PDNameTreeRemove
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(void, PDNameTreeEnum, (PDNameTree theTree, CosObjEnumProc proc, void* clientData))
+
+/**
+ Retrieves a name tree, with the key name specified in <code>theTree</code>,
+ from the Names dictionary of <code>thePDDoc</code>.
+ @param thePDDoc IN/OUT The document containing the name tree desired.
+
+ @param theTree IN/OUT The name of the tree requested. This can
+ be created by passing a string to the ASAtomFromString() method.
+
+ @return The PDNameTree requested.
+ @see PDNameTreeIsValid
+ @see PDDocCreateNameTree
+ @see PDDocRemoveNameTree
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(PDNameTree, PDDocGetNameTree, (PDDoc thePDDoc, ASAtom theTree))
+
+/**
+ Retrieves the name tree inside the Names dictionary with
+ the specified key name, or creates it if it does not exist.
+
+ @param thePDDoc The document in which the name tree is
+ created.
+ @param theTree The name of the name tree to create. A
+ string can be converted to an ASAtom using ASAtomFromString().
+ @return The newly created PDNameTree for the PDDoc. It returns a <code>NULL</code>
+ PDNameTree if <code>pdDoc</code> has no root dictionary. The return value
+ should be tested with PDNameTreeIsValid().
+ @see PDNameTreeIsValid
+ @see PDDocGetNameTree
+ @see PDDocRemoveNameTree
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(PDNameTree, PDDocCreateNameTree, (PDDoc thePDDoc, ASAtom theTree))
+
+/**
+ Removes the name tree inside the Names dictionary with the
+ specified key name. It does nothing if no object with that
+ name exists.
+ @param thePDDoc IN/OUT The document from which a name tree is
+ removed.
+ @param theTree IN/OUT The name tree to remove.
+ @see PDDocCreateNameTree
+ @see PDDocGetNameTree
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDDocRemoveNameTree, (PDDoc thePDDoc, ASAtom theTree))
+
+/* PDPageLabel related methods */
+
+/**
+ Determines whether a page label is valid.
+
+ <p>A page label is valid if its values correspond to the specification
+ for page label dictionaries in Table 8.6 in the <i>PDF Reference</i>. </p>
+
+ <p>It raises an exception if storage is exhausted or file access
+ fails.</p>
+
+ @param pgLabel The page label whose validity is determined.
+ @return <code>true</code> if the label is valid, <code>false</code> otherwise.
+ @see PDPageLabelEqual
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDPageLabelIsValid, (PDPageLabel pgLabel))
+
+/**
+ Compares two page labels to see if they are equivalent.
+ Two labels are equivalent if they have the same style, starting
+ number (the numeric value of the first page associated with
+ the label), and prefix strings which are the same byte-for-byte.
+
+ @param pdlOne A page label.
+ @param pdlTwo Another page label.
+ @return <code>true</code> if the two labels are valid and equivalent,
+ <code>false</code> otherwise.
+ @see PDPageLabelIsValid
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDPageLabelEqual, (PDPageLabel pdlOne, PDPageLabel pdlTwo))
+
+/**
+ Creates a type cast of the page label object to a Cos object.
+
+ @param pdl IN/OUT A PDPageLabel representation of a page label.
+
+ @return A CosObj representation of <code>pdl</code> if the page label is valid,
+ <code>NULL</code> CosObj otherwise.
+ @see PDPageLabelFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(CosObj, PDPageLabelGetCosObj, (PDPageLabel pdl))
+
+/**
+ Creates a type cast of the CosObj to a PDPageLabel object.
+
+ @param cosLabel IN/OUT The Cos object level representation of a page
+ label.
+ @return The page label representation of <code>cosLabel</code>.
+ @exception pdErrBadBaseObj is raised if <code>cosLabel</code> is not a valid page label.
+
+ @see PDPageLabelGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(PDPageLabel, PDPageLabelFromCosObj, (CosObj cosLabel))
+
+/**
+ Returns an ASAtom for the style of the label.
+
+ <p>It raises an exception if storage is exhausted or file access fails. </p>
+
+ @param pgLabel IN/OUT The page label whose style is desired.
+ @return An ASAtom for the label style. If no style is specified,
+ it returns <code>ASAtomFromString(" None")</code>.
+ @see PDPageLabelGetPrefix
+ @see PDPageLabelGetStart
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(ASAtom, PDPageLabelGetStyle, (PDPageLabel pgLabel))
+
+/**
+ Returns the prefix string for the label. The prefix string
+ is transitory and should be copied immediately.
+ @param pgLabel The label for the page whose prefix is desired.
+
+ @param prefixLen (Filled by the method) The length, in
+ bytes, of the prefix string. It is zero if the page label is not valid.
+ @return The prefix string for the label, or <code>NULL</code> if none is specified.
+
+ @see PDPageLabelGetStart
+ @see PDPageLabelGetStyle
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(const char *, PDPageLabelGetPrefix, (PDPageLabel pgLabel, ASInt32 *prefixLen))
+
+/**
+ Gets the starting number of a given page label.
+ @param pgLabel The page label for the page whose starting number
+ is desired.
+ @return The starting number of the page label; that is, the numeric
+ value of the first page associated with the label. It returns
+ <code>1</code> if the page label is not valid or unknown.
+ @see PDPageLabelGetPrefix
+ @see PDPageLabelGetStyle
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASInt32, PDPageLabelGetStart, (PDPageLabel pgLabel))
+
+/**
+ Returns the label that is in effect for the given page.
+
+ @param pdDoc The document for which a page label is desired.
+
+ @param pageNum The page number of the page for which a
+ label is requested.
+ @param firstPage (Filled by the method) If non-<code>NULL</code>, it is the
+ number of the first page that the page label is attached
+ to.
+ @param lastPage (Filled by the method) If non-<code>NULL</code>, it is the
+ number of the last page that the page label is attached
+ to. Setting <code>lastPage</code> to non-<code>NULL</code> forces the implementation
+ to perform another traverse of the page label tree, with
+ some slight performance impact.
+ @return The label that is in effect for the given page. If there
+ is no label object in effect, this method returns an invalid
+ page label object, and <code>firstPage</code> and <code>lastPage</code> will be set
+ to <code>-1</code>.
+ @see PDDocFindPageNumForLabel
+ @see PDDocGetLabelForPageNum
+ @see PDDocRemovePageLabel
+ @see PDDocSetPageLabel
+ @see PDPageLabelNew
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(PDPageLabel, PDDocGetPageLabel, (PDDoc pdDoc, ASInt32 pageNum,
+ ASInt32 *firstPage, ASInt32 *lastPage))
+
+/**
+ Constructs a new label object in the document with the specified
+ style, prefix, and starting page number.
+ @param pdDoc The document that contains the new page label.
+
+ @param style The numbering system to use for the numeric
+ portion of each label in this range of pages. The possible values
+ are <code>D</code> for decimal numbers, <code>R</code> for upper-case Roman numbers,
+ <code>r</code> for lower-case Roman numbers, <code>A</code> for upper-case alphabetic
+ numbers, or <code>a</code> for lower-case alphabetic numbers. If it is <code>NULL</code>,
+ the labels for this range will not have a numeric portion.
+
+ @param prefix A string to prefix to the numeric portion
+ of the page label. It may be a <code>NULL</code> string.
+ @param prefixLen The length in bytes of the prefix string.
+
+ @param startAt The value to use when generating the numeric
+ portion of the first label in this range; it must be greater
+ than or equal to <code>1</code>.
+ @return The newly created page label.
+ @exception pdErrBadBaseObj is raised if the base pages object is missing
+ or invalid.
+ @see PDDocRemovePageLabel
+ @see PDDocGetPageLabel
+ @see PDDocFindPageNumForLabel
+ @see PDDocGetLabelForPageNum
+ @see PDDocSetPageLabel
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(PDPageLabel, PDPageLabelNew, (PDDoc pdDoc, ASAtom style, const char *prefix,
+ ASInt32 prefixLen, ASInt32 startAt))
+
+/**
+ Attaches a label to a page. This establishes the numbering
+ scheme for that page and all pages following it, until another
+ page label is encountered. This label allows PDF producers
+ to define a page numbering system other than the Acrobat
+ default.
+
+ <p>If <code>pageNum</code> is less than <code>0</code> or greater than the number of
+ pages in <code>pdDoc</code>, the method does nothing. </p>
+
+ @param pdDoc The document containing the page to label.
+
+ @param pageNum The number of the page to label.
+ @param pgLabel The label for the page specified by <code>pageNum</code>.
+ @exception genErrBadParm is raised if <code>pgLabel</code> is not a valid PDPageLabel.
+
+ @notify PDDocPageLabelDidChange
+ @see PDDocFindPageNumForLabel
+ @see PDDocGetPageLabel
+ @see PDDocGetLabelForPageNum
+ @see PDDocRemovePageLabel
+ @see PDPageLabelNew
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(void, PDDocSetPageLabel, (PDDoc pdDoc, ASInt32 pageNum, PDPageLabel pgLabel))
+
+/**
+ Removes the page label that is attached to the specified
+ page, effectively merging the specified range with the previous
+ page label sequence.
+ @param pdDoc The document from which a page label is removed.
+
+ @param pageNum The page from which the page label is removed.
+ @see PDDocSetPageLabel
+ @see PDDocGetPageLabel
+ @see PDPageLabelNew
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(void, PDDocRemovePageLabel, (PDDoc pdDoc, ASInt32 pageNum))
+
+/* PDDocOpenWithParams */
+
+/**
+ Opens the document specified by the ASFile or ASFileSys/ASPathName.
+ If both are set, the ASFile is used and the <code>fileSys</code> and <code>pathName</code> are ignored.
+ @param openParams IN/OUT A structure that defines which PDF file
+ is opened. It contains parameters such as a file name, a file system, an authorization
+ procedure, and a set of flags that define what permissions
+ the user has on a file.
+ @return The PDDoc for the PDF document described by the structure
+ passed in <code>openParams</code>.
+ @see PDDocOpen
+ @see PDDocOpenEx
+ @see PDDocOpenFromASFile
+ @see PDDocOpenFromASFileEx
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(PDDoc, PDDocOpenWithParams, (PDDocOpenParams openParams))
+
+/* PDDocReadAhead */
+
+/**
+ Reads ahead <code>nPages</code> starting at <code>startPage</code> (if the file is
+ linearized).
+ @param doc IN/OUT The document for which pages are read ahead.
+
+ @param startPage IN/OUT The page for which read ahead is initiated.
+
+ @param nPages IN/OUT The number of pages to read ahead.
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(void, PDDocReadAheadPages, (PDDoc doc, ASInt32 startPage, ASInt32 nPages))
+
+/* Further PDPageLabel API's */
+
+/**
+
+ Superseded by PDDocGetLabelForPageNumEx() in Acrobat 6.0.
+
+ <p>Retrieves the label string associated with the given page
+ number. The page number is returned in host encoding and
+ is truncated to the length of the buffer. </p>
+
+ @param pdDoc The document containing the page for which a
+ label is requested.
+ @param pageNum The number of the page whose label is requested.
+
+ @param buffer If a label exists for <code>pageNum</code>, it will be
+ placed in this buffer.
+ @param bufferLen The length of the label (<code>NULL</code>-terminated).
+ @return The length of the resulting label. If no such page number
+ exists, the resulting string will be the ASCII representation
+ of <code>pageNum + 1</code>.
+ @see PDDocGetLabelForPageNumEx
+ @see PDDocFindPageNumForLabel
+ @see PDDocGetPageLabel
+ @see PDDocRemovePageLabel
+ @see PDDocSetPageLabel
+ @see PDPageLabelNew
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASInt32, PDDocGetLabelForPageNum, (
+ PDDoc pdDoc,
+ ASInt32 pageNum,
+ char *buffer,
+ ASInt32 bufferLen))
+
+/**
+ Superseded by PDDocFindPageNumForLabelEx() in Acrobat 6.0.
+
+ <p>Finds the first page in the document with a specified label. </p>
+
+ @param pdDoc The document to search for the page named
+ in <code>labelStr</code>.
+ @param labelStr The label of the page to find.
+ @param labelLen The length of <code>labelStr</code>.
+ @return The page number of the first page with the specified label,
+ or <code>-1</code> if no such page exists.
+ @see PDDocGetLabelForPageNum
+ @see PDDocGetPageLabel
+ @see PDDocRemovePageLabel
+ @see PDDocSetPageLabel
+ @see PDPageLabelNew
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASInt32, PDDocFindPageNumForLabel, (
+ PDDoc pdDoc,
+ const char *labelStr,
+ ASInt32 labelLen))
+
+/**
+ Adds text annotations (notes) from <code>sourceDoc</code> to <code>doc</code>.
+
+ <p>It raises an exception if the given object has the wrong Cos
+ type. Also raises exceptions if storage is exhausted or file access fails. </p>
+
+ @param doc The document to which the notes are exported.
+
+ @param sourceDoc The document from which the notes are
+ exported.
+ @param progMon A user-supplied progress monitor.
+ @param monClientData Data supplied by the monitoring routine.
+
+ @param importFilter A user-supplied filter which determines
+ what type of notes will be exported.
+ @return The number of notes imported.
+ @notify PDDocDidImportAnnots
+ @notify PDDocWillImportAnnots
+ @see PDDocExportNotes
+ @see PDDocImportCosDocNotes
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(ASInt32, PDDocImportNotes,
+ (PDDoc doc,
+ PDDoc sourceDoc,
+ void* progMon, /* ASProgressMonitor */
+ void* monClientData,
+ PDDocWillImportAnnotCallback importFilter))
+
+/* Alternate Images */
+
+/**
+ <p>This method is obsolete and never called in Acrobat 8.</p>
+
+ (Obsolete, provided only for backwards compatibility)
+ Selects which Alternate image to use.
+ <p>This method can do one of three things:</p>
+ <ul>
+ <li>Return an existing Alternate.</li>
+ <li>Create and return an image XObject.</li>
+ <li>Indicate that this XObject should be skipped.</li>
+ </ul>
+
+ <p>This method is called each time the Acrobat viewer draws
+ an XObject image, regardless of whether the image XObject
+ has an Alternates key.</p>
+
+ <p>You can replace this method with your own version, using
+ HFTReplaceEntry(). </p>
+
+ @param image The Cos object for this image XObject's base
+ image. Under some circumstances, PDImageSelectAlternate()
+ can be called with an XObject type other than an image;
+ for example, a form. Because of this, your code must check
+ the XObject's subtype (you can use CosDictGet() to read the
+ value of the XObject's Subtype key). If the subtype is not
+ Image, your code must not modify the XObject, but simply
+ return the CosObj that was passed to you.
+ @param print <code>true</code> if printing, <code>false</code> if displaying.
+ @param tickLimit The amount of time, in ticks, before the
+ image selector must return control to the Acrobat viewer.
+ This parameter is not relevant for image selectors that
+ simply choose an existing alternate or create a new image
+ XObject using Cos methods, but it is relevant for image
+ selectors that create a new image XObject by calculating
+ or reading data from a network or a slow device.
+
+ <ul>
+ <li>If <code>tickLimit</code> is zero, the image selector must not return
+ control to the Acrobat viewer until the selector can provide
+ the alternate image to use.</li>
+ <li>If <code>tickLimit</code> is nonzero, the image selector
+ does not have to provide the image XObject within <code>tickLimit</code>,
+ but it must raise the fileErrBytesNotReady exception if
+ it cannot. This returns control to the Acrobat viewer and
+ informs it that the data is not ready. The Acrobat viewer
+ then calls the image selector periodically until the image
+ selector returns the selected image XObject.</li>
+ </ul>
+
+ @ingroup ReplaceableMethods
+ @param cacheImageP If <code>true</code>, the image data returned to
+ the Acrobat viewer is cached for future use. If <code>false</code>, it
+ is not. Pass <code>true</code> if you expect your image data to remain
+ valid for at least several calls to your client. Pass <code>false</code>
+ if you expect your image data to change on the next call
+ to your client. If you create and return a Cos stream object
+ with an external file system and the stream's data will
+ not always be the same, you must set <code>cacheImageP</code> to <code>false</code>.
+ If you fail to do this, the Acrobat viewer may use cached
+ image data when it should not.
+ @param callData An opaque pointer containing data that
+ must be passed in other image selector calls.
+ @return The image XObject to use. Returning a <code>NULL</code> Cos object (obtained
+ using CosNewNull) tells the Acrobat viewer to skip this
+ XObject entirely.
+ @exception fileErrBytesNotReady
+ @see PDImageSelGetGeoAttr (obsolete)
+ @see PDImageSelGetDeviceAttr (obsolete)
+ @see PDImageSelAdjustMatrix (obsolete)
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+PROC(CosObj, PDImageSelectAlternate,
+ (CosObj image, ASBool print, ASUns32 tickLimit, ASBool *cacheImageP, void *callData))
+
+/**
+ <p>This method is obsolete and never called in Acrobat 8.</p>
+
+ (Obsolete, provided only for backwards compatibility)
+ Requests geometry-related attributes of an image XObject.
+ This method can be used by an image selector client to obtain
+ additional information to help the selector determine which
+ alternate image to choose.
+ @param callData (Filled by the method) The value passed
+ to the image selector as a parameter to PDImageSelectAlternate().
+ @param updateBBoxP (Filled by the method) The rectangle bounding
+ the region of the page to update. This is the intersection
+ of the visible portion of the page, any update regions,
+ and any clipping paths that have been explicitly set in
+ the PDF file. Its coordinates are specified in default user
+ space.
+ @param imageToDefaultMatrixP (Filled by the method) A matrix
+ specifying the transformation from image space (the space
+ in which all images are 1x1 units) to default user space
+ (the space with 72 units per inch). It contains sufficient
+ information for the image selector plug-in to determine
+ the image's size and location on the page. For a <i>normal
+ page and image</i> (an <i>upright</i> image on a non-rotated page),
+ the following is true:
+
+ <ul>
+ <li><code>imageToDefaultMatrixP->a</code> is equal to the image horizontal size in 1/72 of an inch units.</li>
+ <li><code>imageToDefaultMatrixP->b = 0</code> </li>
+ <li><code>imageToDefaultMatrixP->c = 0</code> </li>
+ <li><code>imageToDefaultMatrixP->d</code> is equal to the image vertical size in 1/72 of an inch units.</li>
+ <li><code>imageToDefaultMatrixP->h</code> is equal to the left edge of image.</li>
+ <li><code>imageToDefaultMatrixP->v</code> is equal to the bottom edge of the image.</li>
+ </ul>
+
+ In other words, this matrix
+ provides the image's height, width, and position on the page, all in
+ units of points (compare to <code>imageToDefaultMatrixP</code>). The
+ intersection of the rectangle obtained by transforming a
+ 1x1 unit rectangle (the image) through <code>imageToDeviceMatrixP</code>
+ and the <code>updateBBoxP</code> rectangle is the region of the image
+ that is actually drawn. This is the region of the image
+ for which data is required.
+ @param imageToDevMatrixP (Filled by the method) A matrix
+ specifying the transformation from image space (the space
+ in which all images are 1x1 unit) to device space (the space
+ in which one unit is one pixel). This matrix provides the
+ image's height, width, and position on the page, all in
+ pixels (compare to <code>imageToDefaultMatrixP</code>).
+ @see PDImageSelAdjustMatrix (obsolete)
+ @see PDImageSelGetDeviceAttr (obsolete)
+ @see PDImageSelectAlternate (obsolete)
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(void, PDImageSelGetGeoAttr, (void *callData, ASFixedRect *updateBBoxP,
+ ASFixedMatrix *imageToDefaultMatrixP, ASFixedMatrix *imageToDevMatrixP))
+
+/**
+ <p>This method is obsolete and never called in Acrobat 8.</p>
+
+ (Obsolete, provided only for backwards compatibility)
+ Gets device-related attributes for a particular image XObject.
+ It must only be used from within an image selector client,
+ since it returns information that is only valid in that
+ context. This method can be used by an image selector client
+ to obtain additional information to help the selector determine
+ which alternate image to choose.
+
+ <p>If an image is displayed on two devices simultaneously (for
+ example, if the window containing the image is split across
+ two monitors in a multi-monitor system), the values returned
+ for <code>colorSpaceP</code> and <code>bitsPerPixelP</code> are each the maximum for
+ the devices on which the image is currently displayed. For
+ example, if the image is currently split across the following
+ devices:</p>
+ <ul>
+ <li>8-bit gray scale monitor </li>
+ <li>4-bit RGB color monitor </li>
+ </ul>
+
+ <p><code>colorSpaceP</code> would be <code>DeviceRGB</code>, because that is the <i>highest</i>
+ color space on which the image is currently displayed. </p>
+
+ <p><code>bitsPerPixelP</code> would be <code>8</code>, because that is the highest bit
+ depth on which the image is currently displayed. </p>
+
+ @param callData (Filled by the method) The value passed
+ to the image selector as a parameter to PDImageSelectAlternate().
+
+ @param colorSpaceP (Filled by the method) The destination
+ device's color space. It will be one of the following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>PDDeviceGray</TD><TD>Grayscale device</TD></TR>
+ <TR><TD>PDDeviceRGB</TD><TD>RGB device</TD></TR>
+ <TR><TD>PDDeviceCMYK</TD><TD>CMYK device</TD></TR>
+ </TABLE>
+
+ <p>If the device has some other color space or
+ its color space cannot be determined, PDDeviceRGB is returned. </p>
+
+ @param bitsPerPixelP (Filled by the method) The number of
+ bits used for each pixel. For example, a device with 8 bits
+ red, 8 bits green, and 8 bits blue would have a <code>bitsPerPixel</code>
+ of <code>24</code>. If <code>bitsPerPixelP</code> has a value of <code>0</code> (instead of the
+ more standard <code>1</code>, <code>8</code>, or <code>24</code>), the number of bits per pixel
+ on the output device could not be determined.
+ @param deviceTypeP (Filled by the method) The output device
+ type. It will be one of the following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>Display</code></TD><TD>A display device such as a monitor</TD></TR>
+ <TR><TD><code>PostScript</code></TD><TD>A PostScript printer or PostScript file</TD></TR>
+ <TR><TD><code>nonPostScriptPrinter</code></TD><TD>A non-PostScript printer</TD></TR>
+ </TABLE>
+
+ @see PDImageSelAdjustMatrix (obsolete)
+ @see PDImageSelGetDeviceAttr (obsolete)
+ @see PDImageSelectAlternate (obsolete)
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(void, PDImageSelGetDeviceAttr, (void *callData, PDColorSpace *colorSpaceP,
+ ASUns32 *bitsPerPixelP, ASAtom *deviceTypeP))
+
+/**
+ <p>This method is obsolete and never called in Acrobat 8.</p>
+
+ (Obsolete, provided only for backwards compatibility)
+ Allows an image selector client to change the region of
+ the page occupied by an image. It must only be used by image
+ selector clients that return data for only the visible part
+ of an image, to set the region of the page that the sub-image
+ occupies. It must not be used otherwise.
+
+ <p>This method only has an effect while displaying on the screen.
+ It does nothing when printing. </p>
+
+ <p>The matrix set by this call remains in effect only for the
+ current image. The Acrobat viewer automatically replaces
+ it after the image has been drawn. </p>
+
+ @param callData The value passed to the image selector
+ as a parameter to PDImageSelectAlternate().
+ @param newUserMatrix The matrix that will replace the
+ <code>imageToUserMatri</code> (see PDImageSelGetGeoAttr()). The <code>imageToDevMatrix</code>
+ is automatically calculated from <code>newUserMatrix</code>.
+ @see PDImageSelGetGeoAttr (obsolete)
+ @see PDImageSelGetDeviceAttr (obsolete)
+ @see PDImageSelectAlternate (obsolete)
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(void, PDImageSelAdjustMatrix, (void *callData, ASFixedMatrix newUserMatrix))
+
+
+/**
+ Given a CosObj that represents a function, it applies the function
+ to the supplied values.
+
+ <p>It raises an error if the CosObj is malformed. </p>
+
+ @param funcDict The CosObj representing a function.
+ @param inVals Input values.
+ @param outVals Output values.
+ @exception genErrBadParm is raised if the CosObj is not a function dictionary.
+
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(void, PDApplyFunction,
+ (CosObj funcDict, const float inVals[], float outVals[]))
+
+/* PDNumTree calls */
+
+/**
+ Creates a new number tree in the document.
+ @param pdDoc The document for which a new number tree
+ is desired.
+ @return The newly created number tree, or a <code>NULL</code> CosObj if Acrobat
+ is unable to create a PDNumTree for the document specified
+ by <code>pdDoc</code>.
+
+ <p>PDNumTreeIsValid() should be called to determine if the number
+ tree returned by PDNumTreeNew() is usable. </p>
+
+ @see PDNumTreeFromCosObj
+ @see PDNumTreeGetCosObj
+ @see PDNumTreeIsValid
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+UNPROC(PDNumTree, PDNumTreeNew, (PDDoc pdDoc))
+
+/**
+ Creates a type cast of the CosObj to a number tree.
+ @param obj IN/OUT The CosObj for which a PDNumTree representation
+ is desired.
+ @return A PDNumTree representation of <code>obj</code>.
+ @see PDNumTreeNew
+ @see PDNumTreeGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(PDNumTree, PDNumTreeFromCosObj, (CosObj obj))
+
+/**
+ Creates a type cast of the number tree to a CosObj.
+ @param theTree IN/OUT The PDNumTree for which a CosObj representation
+ is desired.
+ @return A CosObj representation of <code>theTree</code>.
+ @see PDNumTreeNew
+ @see PDNumTreeFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(CosObj, PDNumTreeGetCosObj, (PDNumTree theTree))
+
+/**
+ Validates whether a PDNumTree is a CosDict Cos object.
+
+ @param theTree The PDNumTree whose validity is desired.
+ @return <code>true</code> if the number tree is a CosDict, <code>false</code> otherwise.
+
+ @see PDNumTreeEqual
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDNumTreeIsValid, (PDNumTree theTree))
+
+/**
+ Compares two number trees to determine if they are the same
+ object.
+ @param tree1 A number tree.
+ @param tree2 Another number tree.
+ @return <code>true</code> if the two number trees are equivalent, <code>false</code>
+ otherwise.
+ @see PDNumTreeIsValid
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDNumTreeEqual, (PDNumTree tree1, PDNumTree tree2))
+
+/**
+ Puts a new entry in the number tree. If an entry with this
+ number is already in the tree, it is replaced.
+ @param theTree IN/OUT The number tree for which a new entry is
+ added
+ @param key IN/OUT The number of the entry.
+ @param value IN/OUT The value associated with <code>key</code>.
+ @notify PDNumTreeNumAdded
+ @see PDNumTreeGet
+ @see PDNumTreeRemove
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDNumTreePut, (PDNumTree theTree, ASInt32 key, CosObj value))
+
+/**
+ Retrieves an object from the number tree.
+ @param theTree The PDNumTree requested.
+ @param key The number of the entry to retrieve.
+ @param value (Filled by the method) The value associated
+ with <code>key</code>.
+ @return <code>true</code> if the object was retrieved, <code>false</code> if no object
+ with this number exists.
+ @see PDNumTreePut
+ @see PDNumTreeRemove
+ @since PI_PDMODEL_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDNumTreeGet, (PDNumTree theTree, ASInt32 key, CosObj *value))
+
+/**
+ Removes the specified object from the tree. It does nothing
+ if no object with that number exists.
+ @param theTree IN/OUT The number tree from which an entry is removed.
+
+ @param key IN/OUT The number of the entry to remove.
+ @notify PDNumTreeNumRemoved
+ @see PDNumTreeGet
+ @see PDNumTreePut
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDNumTreeRemove, (PDNumTree theTree, ASInt32 key))
+
+/**
+ Enumerates the entries in the tree.
+ @param theTree IN/OUT A number tree.
+ @param proc IN/OUT A procedure to call once for each number destination
+ pair in <code>theTree</code>.
+ @param clientData IN/OUT Data used by the enumeration procedure.
+ <code>clientData</code> is passed to the enumeration procedure proc each
+ time a number tree is encountered.
+ @see PDNumTreeGet
+ @see PDNumTreePut
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(void, PDNumTreeEnum, (PDNumTree theTree, CosObjEnumProc proc, void* clientData))
+
+
+/**
+ Converts a dictionary Cos object to a font. This method
+ does not copy the object, but is instead the logical equivalent
+ of a type cast.
+ @param fontObj IN/OUT The dictionary Cos object for the font.
+ @return The PDFont for <code>fontObj</code>. It returns <code>NULL</code> if there is no CosDoc
+ or PDDoc containing <code>fontObj</code>.
+ @since PI_PDMODEL_VERSION >= 0x00040000
+
+*/
+NPROC(PDFont, PDFontFromCosObj, (CosObj fontObj))
+
+
+/**
+ In Adobe Reader or for documents that are not dirty,
+ this method copies the bytes from the document's ASFile
+ to the specified location. This also occurs if the <code>saveChanges</code>
+ field in <code>params</code> is <code>false</code>. If <code>saveChanges</code> is <code>true</code>, the document
+ is dirty, and the product is Acrobat, a full save is performed
+ to the specified file. The resulting file is linearized (optimized for the web).
+ If the file already exists, it is overwritten.
+ @param pdDoc The document to copy.
+ @param params A structure that defines how the PDF file
+ is copied.
+ @exception genErrBadParm is raised if an invalid argument is passed in
+ params.
+ @exception pdErrAlreadyOpen is raised if the target and source files are
+ the same.
+ @exception fileErrDiskFull is raised if there is no space for the copy.
+
+ @exception pdErrCancelSave is raised if the save was canceled (<code>cancelProc</code>
+ in <code>params</code> returned <code>true</code>).
+ @exception pdErrUnableToRead is raised if a read error occurred on the
+ source.
+ @exception pdErrUnableToWrite is raised if a write error occurred on the
+ destination.
+ @since PI_PDMODEL_VERSION >= 0x00040005
+*/
+NPROC(void, PDDocCopyToFile, (PDDoc pdDoc, PDDocCopyParams params))
+
+
+/**
+ This method supersedes PDDocGetPermissions().
+
+ <p>Checks the permissions associated with the specified
+ document using the latest permissions format, and determines
+ whether the requested operation is allowed for the specified
+ object in the document. </p>
+
+ <p>This method first checks the requested object and operation
+ in a cached permissions list. If a value is not found, it calls the
+ document's permission handlers, followed by security handlers via PDCryptAuthorizeExProc() to
+ request permissions for the operation. The final permission is a logical <code>AND</code> of the permissions
+ granted by individual permissions and/or security handlers. If the document's
+ security handler does not support this Acrobat 5.0 call,
+ the method calls PDCryptAuthorizeProc() instead. The method
+ then interprets the returned <code>PDPerms</code> to determine whether
+ the requested operation is allowed for the specified object
+ in the document. </p>
+
+ <p>This method may throw exceptions.</p>
+
+ @param pdDoc The PDDoc whose permissions are being requested.
+
+ @param reqObj The target object of the permissions request.
+
+ @param reqOpr The target operation of the permissions
+ request.
+ @param authData A pointer to an authorization data structure.
+ @return The request status constant, <code>0</code> if the requested operation
+ is allowed, a non-zero status code otherwise.
+ @see PDDocAuthorize
+ @see PDDocGetPermissions (obsolete)
+ @see PDDocGetNewCryptHandler
+ @see PDDocSetNewCryptHandler
+ @see PDDocSetNewCryptHandlerEx
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(PDPermReqStatus, PDDocPermRequest, (PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void *authData))
+
+
+/**
+ Returns the box specified for the page object intersected
+ with the media box. If the value for <code>boxName</code> is <code>CropBox</code>,
+ this call is equivalent to PDPageGetCropBox(); if the value
+ is <code>MediaBox</code>, this call is equivalent to PDPageGetMediaBox().
+
+ @param page The page whose box is obtained.
+ @param boxName An ASAtom representing the type of box.
+ It can have values such as <code>ArtBox</code>, <code>BleedBox</code>, <code>CropBox</code>, <code>TrimBox</code>, or <code>MediaBox</code>.
+
+ @param box (Filled by the method) An ASFixedRect specifying
+ the page's box.
+ @return <code>true</code> if the requested box was specified for the
+ page, <code>false</code> otherwise.
+ @see PDPageSetBox
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(ASBool, PDPageGetBox, (PDPage page, ASAtom boxName, ASFixedRect *box))
+
+/**
+ Sets the box specified by <code>boxName</code> for the page.
+
+ <p>This method may throw exceptions.</p>
+
+ @param page IN/OUT The page for which the box is to be set.
+ @param boxName IN/OUT An ASAtom representing the type of box.
+ The box names are:
+ <ul>
+ <li><code>ArtBox</code></li>
+ <li><code>BleedBox</code></li>
+ <li><code>CropBox</code></li>
+ <li><code>TrimBox</code></li>
+ <li><code>MediaBox</code> </li>
+ </ul>
+
+ @param box IN/OUT An ASFixedRect specifying the coordinates to
+ set for the box.
+ @notify PDDocWillChangePages
+ @notify PDDocDidChangePages
+ @see PDPageGetBox
+ @since PI_PDMODEL_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDPageSetBox, (PDPage page, ASAtom boxName, ASFixedRect box))
+
+
+/**
+ Removes a link annotation's action.
+ @param aLinkAnnot The link annotation whose action is
+ removed.
+ @exception pdErrBadAction
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDLinkAnnotGetAction
+ @see PDLinkAnnotSetAction
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+UNPROC(void, PDLinkAnnotRemoveAction, (PDLinkAnnot aLinkAnnot))
+
+/**
+ Removes a bookmark's action.
+ @param aBookmark The bookmark whose action is removed.
+ @exception pdErrBadAction
+ @notify PDBookmarkDidChange
+ @notify PDBookmarkWillChange
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+UNPROC(void, PDBookmarkRemoveAction, (PDBookmark aBookmark))
+
+/**
+ Removes the value of the OpenAction key in the Catalog dictionary.
+ The value is the action performed when the document is opened.
+
+ @param doc IN/OUT The document whose open action is removed.
+ @exception genErrBadParm
+ @exception pdErrOpNotPermitted
+ @see PDDocGetOpenAction
+ @see PDDocSetOpenAction
+ @since PI_PDMODEL_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDDocRemoveOpenAction, (PDDoc doc))
+
+/**
+ Sends a PDNameTreeNameAdded() notification.
+ @param theTree The PDNameTree to which a name had been
+ added.
+ @param key The name of the object within <code>theTree</code> that
+ was added. This is a Cos string, not a C string.
+ @param value (Filled by the method) The Cos object corresponding
+ to the object name that was added to <code>theTree</code>.
+ @notify PDNameTreeNameAdded
+ @see PDNameTreeNotifyNameRemoved
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+UNPROC(void, PDNameTreeNotifyNameAdded, (PDNameTree theTree, CosObj key, CosObj value))
+
+/**
+ Sends a PDNameTreeNameRemoved() notification.
+ @param theTree The PDNameTree from which the name had
+ been removed.
+ @param removedName The name within <code>theTree</code> that was removed.
+ @notify PDNameTreeNameRemoved
+ @see PDNameTreeNotifyNameAdded
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+UNPROC(void, PDNameTreeNotifyNameRemoved, (PDNameTree theTree, CosObj removedName))
+
+
+/**
+ Returns the page Cos object corresponding to the given page
+ number.
+ @param pdd The PDDoc containing the given page.
+ @param nPage The page number.
+ @return A Cos object representing the page, or an object of type
+ CosNull if the page does not exist.
+ @exception genErrBadParm
+ @exception pdErrBadPageObj
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(CosObj, PDDocGetPageObjByNum, (PDDoc pdd, ASInt32 nPage))
+
+/**
+ Same as PDTextSelectEnumText(), except the output is forced to
+ UCS.
+ @param textP IN/OUT The text selection whose strings are enumerated.
+
+ @param proc IN/OUT A user-supplied callback to call for each string
+ in the text object. Enumeration ends if <code>proc</code> returns <code>false</code>.
+
+ @param procData IN/OUT User-supplied data to pass to <code>proc</code> each
+ time it is called.
+ @exception genErrBadParm
+ @see PDDocCreateTextSelect
+ @see PDTextSelectEnumText
+ @since PI_PDMODEL_VERSION >= 0x00050000
+
+*/
+NPROC(void, PDTextSelectEnumTextUCS, (PDTextSelect textP, PDTextSelectEnumTextProc proc, void *procData))
+
+/* for 5.<code>0</code>, provide control over whether annotations are rendered */
+
+/**
+ Provides control over the rendering of annotations on the
+ page to be drawn into <code>window</code>. It provides the ability to specify
+ the flags passed in to the PDPageDrawContentsToWindows() function.
+ @param page The page to draw into <code>window</code>.
+ @param window A pointer to a platform-dependent window object
+ (<code>HWND</code> on Windows, or <code>WindowPtr</code> or <code>CWindowPtr</code> on Mac OS).
+ On Windows, to draw into an offscreen <code>DC</code>, pass <code>NULL</code> for <code>window</code>.
+ On Mac OS, to draw into an offscreen <code>GWorld</code>, pass <code>NULL</code> in
+ <code>window</code> and pass the <code>GWorld</code>Ptr in <code>displayContext</code>.
+ @param displayContext A platform-dependent display context
+ structure (<code>HDC</code> on Windows, <code>GWorldPtr</code> on Mac OS). On Mac OS,
+ <code>displayContext</code> is ignored if <code>window</code> is non-<code>NULL</code> Note that
+ <code>displayContext</code> cannot be reliably used as the <code>hDC</code> for a
+ printer device.
+ @param isDPS Currently unused. Always set it to <code>false</code>.
+ @param matrix A pointer to the matrix to concatenate onto
+ the default page matrix. It is useful for converting from
+ page to window coordinates and for scaling.
+ @param flags See PDPageDrawFlagsPI for possible values.
+ @param updateRect A rectangle represented by the coordinates
+ of its four sides.
+ @param cancelProc A procedure called periodically to check
+ for the user's cancelling of the drawing operation. The default cancel
+ procedure can be obtained using AVAppGetCancelProc(). It may
+ be <code>NULL</code> in which case no cancel procedure is used.
+ @param cancelProcClientData A pointer to user-supplied data
+ to pass to <code>cancelProc</code> each time it is called. It should be
+ <code>NULL</code> if <code>cancelProc</code> is <code>NULL</code>.
+ @exception pdPErrUnableToCreateRasterPort
+ @see AVAppGetCancelProc
+ @see PDDrawCosObjToWindow
+ @see PDPageDrawContentsToWindow
+
+ @note <b>(Acrobat 5.0 Implementation)</b> This function can
+ only be called with a flags value of <code>0</code>. The function is
+ not supported with any other values for <code>flags</code>. <code>flags = 0</code> means do not render
+ the annotation faces. If you want to draw to a window with annotations,
+ you should call the original PDPageDrawContentsToWindow().
+ In general, Adobe recommends that you not use PDPageDrawContentsToWindowsEx()
+ in the Acrobat 5.0 release unless you have a specific need
+ to prevent the drawing of annotations.
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(void, PDPageDrawContentsToWindowEx,
+ (PDPage page, void *window, void *displayContext,
+ ASBool isDPS, ASFixedMatrix *matrix, ASUns32 flags,
+ ASFixedRect *updateRect, CancelProc cancelProc, void *cancelProcClientData))
+
+/**
+ Retrieves the color of the specified bookmark.
+
+ <p>An exception is thrown if the bookmark is invalid or the existing color is malformed in the PDF file. </p>
+
+ @param bm The bookmark in question.
+ @param pdcvOut (Filled by the method) The color of the bookmark
+ in PDColorValue format.
+ @return <code>true</code> if the color was specified, <code>false</code> otherwise (the default
+ color is returned in <code>pdcvOut</code>).
+ @see PDBookmarkSetColor
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(ASBool, PDBookmarkGetColor, (PDBookmark bm, PDColorValue pdcvOut))
+
+/**
+ Sets the color of the specified bookmark.
+ @param bm The bookmark whose color is set.
+ @param pdcvIn The new color. It must be in <code>DeviceRGB</code>.
+ @exception If color is <code>NULL</code> or not in <code>DeviceRGB</code>, the bookmark is invalid or
+ the existing bookmark color is malformed.
+ @notify PDBookmarkWillChange with C as the key.
+ @notify PDBookmarkDidChange with C as the key.
+ @see PDBookmarkGetColor
+ @since PI_PDMODEL_VERSION >= 0x00020000
+*/
+UNPROC(void, PDBookmarkSetColor, (PDBookmark bm, PDColorValue pdcvIn))
+
+/**
+ Retrieves the flags of the specified bookmark.
+
+ <p>An exception is thrown if the bookmark is invalid or the existing style is malformed in the PDF file. </p>
+
+ @param bm The bookmark whose flags are obtained.
+ @return The bookmark's flags. Bit 1 (the least significant bit) indicates
+ an italic font; bit 2 indicates a bold font.
+ @see PDBookmarkSetFlags
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(ASInt32, PDBookmarkGetFlags, (PDBookmark bm))
+
+/**
+ Sets the flags of the specified bookmark.
+
+ <p>An exception is thrown if the bookmark is invalid or the existing style is malformed in the PDF file. </p>
+
+ @param bm The bookmark whose flags are set.
+ @param nFlags The new bookmark flags. Bit 1 (the least significant
+ bit) indicates an italic font; bit 2 indicates a bold font.
+ @notify PDBookmarkWillChange with F as the key.
+ @notify PDBookmarkDidChange with F as the key
+ @see PDBookmarkGetFlags
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+UNPROC(void, PDBookmarkSetFlags, (PDBookmark bm, ASInt32 nFlags))
+
+/**
+ Like PDDocExportNotes(), but the caller provides the list of
+ annotations to export. This is useful in scenarios when it may
+ be inappropriate to use PDDocExportNotes() and look for annotations
+ on every page. This is an especially important consideration
+ when in a browser.
+ @param doc The document from which notes are exported.
+
+ @param unused1 Currently unused.
+ @param unused2 Currently unused.
+ @param unused3 Currently unused.
+ @param unused4 Currently unused.
+ @param exportFilter A user-supplied routine that selects
+ which notes to export.
+ @param pdanArray An array of PDAnnotArrayRec objects; the number
+ of items in the arrray is the number of pages in <code>doc</code>.
+ @param numNotesP (Filled by the method) If non-<code>NULL</code>, the
+ number of notes exported.
+ @return The CosDoc of the document created to hold the exported
+ notes.
+ @notify PDDocWillExportAnnots
+ @notify PDDocDidExportAnnots
+ @see PDDocGetXAPMetadata
+ @see PDDocImportNotes
+ @see PDDocExportNotes
+
+ @note Make sure to explicitly include popups.
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+UNPROC(CosDoc, PDDocExportSomeNotes,
+ (PDDoc doc,
+ ASFileSys unused1,
+ ASPathName unused2,
+ void* unused3, /* ASProgressMonitor */
+ void* unused4,
+ PDDocWillExportAnnotCallback exportFilter,
+ PDAnnotArray pdanArray,
+ ASInt32* numNotesP))
+
+/**
+ Checks whether a page uses any transparency features.
+
+ @param pdPage The page to check.
+ @param includeAnnotAppearances If <code>true</code>, annotation appearances
+ are included in the check; if <code>false</code> annotation appearances
+ will be ignored.
+ @return <code>true</code> only if the page uses any transparency
+ features.
+
+ @note To determine whether the page uses transparency, the
+ resources of the page must be enumerated (though the page
+ contents do not need to be parsed). The page resources may
+ not be optimized for slow (browser-based) connections, so
+ calling PDPageHasTransparency() before the page has been downloaded
+ may cause unpleasant read behavior and performance problems.
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(ASBool, PDPageHasTransparency, (PDPage pdPage, ASBool includeAnnotAppearances))
+
+/**
+ Adds the <code>WFVersion</code> parameter to PDTextSelectCreatePageHilite().
+ It is the same as PDTextSelectCreatePageHilite(), but it creates a WordFinder
+ using the specified version number. It is intended to be
+ used by plug-ins that want to do text highlighting with previous
+ versions of the word finder algorithm.
+ @param page The page on which the highlights appear.
+ @param hList A pointer to an array of highlight entries.
+ If the <code>length</code> field of a HiliteEntry is <code>0</code>, the entire word
+ is highlighted. <code>hList</code> should not contain multiple instances
+ of the same highlight; the display appearance is undefined
+ when it does.
+ @param listLen The number of highlight entries in <code>hList</code>.
+
+ @param WFVersion The WordFinder version:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Annotation</TH><TH>Use</TH></TR>
+ <TR><TD>WF_LATEST_VERSION</TD><TD>To obtain the latest available version.</TD></TR>
+ <TR><TD>WF_VERSION_2</TD><TD>Version used for Acrobat 3.x, 4.x.</TD></TR>
+ <TR><TD>WF_VERSION_3</TD><TD>Available in Acrobat 5.0 without Accessibility enabled. Includes some improved word-piecing algorithms.</TD></TR>
+ <TR><TD>WF_VERSION_4</TD><TD>For Acrobat 5.0 with Accessibility enabled. Includes advanced word-ordering algorithms in addition to improved word-piecing algorithms.</TD></TR>
+ </TABLE>
+
+ @return The newly created text selection.
+ @see AVDocSetSelection
+ @see PDTextSelectCreateWordHilite
+ @see PDTextSelectCreateWordHiliteEx
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreateRangesEx
+ @see PDDocCreateTextSelect
+ @see PDTextSelectDestroy
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(PDTextSelect, PDTextSelectCreatePageHiliteEx, (PDPage page, HiliteEntry *hList, ASInt32 listLen, ASInt16 WFVersion))
+
+/**
+ Adds the <code>WFVersion</code> parameter to PDTextSelectCreateWordHilite().
+
+ @param page The page on which the highlights appear.
+ @param hList A pointer to an array of highlight entries.
+ <code>hList</code> should not contain multiple instances of the same highlight;
+ the display appearance is undefined when it does.
+ @param listLen The number of highlight entries in <code>hList</code>.
+
+ @param WFVersion The WordFinder version:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Annotation</TH><TH>Use</TH></TR>
+ <TR><TD>WF_LATEST_VERSION</TD><TD>To obtain the latest available version.</TD></TR>
+ <TR><TD>WF_VERSION_2</TD><TD>Version used for Acrobat 3.x, 4.x.</TD></TR>
+ <TR><TD>WF_VERSION_3</TD><TD>Available in Acrobat 5.0 without Accessibility enabled. Includes some improved word-piecing algorithms.</TD></TR>
+ <TR><TD>WF_VERSION_4</TD><TD>For Acrobat 5.0 with Accessibility enabled. Includes advanced word-ordering algorithms in addition to improved word-piecing algorithms.</TD></TR>
+ </TABLE>
+
+ @return The newly created text selection.
+ @see AVDocSetSelection
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreateRangesEx
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreatePageHiliteEx
+ @see PDTextSelectCreateWordHilite
+ @see PDWordFinderGetLatestAlgVersion
+ @see PDTextSelectDestroy
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(PDTextSelect, PDTextSelectCreateWordHiliteEx, (PDPage page, HiliteEntry *hList, ASInt32 listLen, ASInt16 WFVersion))
+
+/**
+ Adds the <code>WFVersion</code> parameter to PDTextSelectCreateRanges().
+ It is the same as PDTextSelectCreateRanges() but it creates a WordFinder
+ using the specified version number. It is intended to be used
+ by plug-ins that want to do text highlighting with previous
+ versions of the word finder algorithm.
+ @param page IN/OUT The page on which the text appears.
+ @param range IN/OUT A pointer to an array of ranges that are used
+ to create a text selection. Each array element is a PDTextSelectRange
+ structure.
+ @param rangeCount IN/OUT The number of ranges in range.
+ @param WFVersion IN/OUT The WordFinder version:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Annotation</TH><TH>Use</TH></TR>
+ <TR><TD>WF_LATEST_VERSION</TD><TD>To obtain latest the available version.</TD></TR>
+ <TR><TD>WF_VERSION_2</TD><TD>Version used for Acrobat 3.x, 4.x.</TD></TR>
+ <TR><TD>WF_VERSION_3</TD><TD>Available in Acrobat 5.0 without Accessibility enabled. Includes some improved word-piecing algorithms.</TD></TR>
+ <TR><TD>WF_VERSION_4</TD><TD>For Acrobat 5.0 with Accessibility enabled. Includes advanced word-ordering algorithms in addition to improved word-piecing algorithms.</TD></TR>
+ </TABLE>
+
+
+ @return A text selection created from the specified ranges.
+ @see AVDocSetSelection
+ @see PDTextSelectCreatePageHilite
+ @see PDTextSelectCreatePageHiliteEx
+ @see PDTextSelectCreateRanges
+ @see PDTextSelectCreateWordHilite
+ @see PDTextSelectCreateWordHiliteEx
+ @see PDTextSelectDestroy
+ @since PI_PDMODEL_VERSION >= 0x00050000
+
+*/
+NPROC(PDTextSelect, PDTextSelectCreateRangesEx, ( PDPage page, PDTextSelectRange range, ASInt32 rangeCount, ASInt16 WFVersion))
+
+
+/**
+ Useful for obtaining the static, platform-specific palette;
+ the bitmap must be already selected into the <code>displayContext</code>
+ to get the palette. This API was exposed for the purpose
+ of the ImageConversion plug-in. When that code uses PDPageDrawContentsToWindow()
+ to get a bitmap from AGM, it needs the palette that AGM
+ used in order to get the correct results.
+ @param page The page whose palette is obtained.
+ @param displayContext The bitmap.
+ @param table (Filled by the method) The palette.
+ @return <code>true</code> if the palette was returned, <code>false</code> otherwise.
+
+ @since PI_PDMODEL_VERSION >= 0x00050000
+*/
+NPROC(ASBool, PDPageGetPalette, ( PDPage page, void *displayContext, char *table ))
+
+/* Separations API
+**
+*/
+
+/**
+ Enumerates the inks for a page, calling the supplied procedure
+ for each PDPageInk structure.
+
+ <p>For the DeviceCMYK_K process color model, it always finds the
+ four inks Cyan, Magenta, Yellow, and Black, which are marked
+ as process inks. The RGB values in the PDPageInk structure
+ are the RGB equivalents (in system monitor space) of 100%
+ of the ink, which can be used to show color swatches for
+ a given ink. </p>
+
+ <p>If the inks are part of a DeviceN colorspace which has not
+ been defined in a Colorants dictionary or elsewhere in a
+ Separation colorspace, the color of the swatch is undefined. </p>
+
+ <p>This call finds all color spaces that are in a color space
+ dictionary within the page, even if they are not used by
+ the page contents. </p>
+ @param pdPage The page whose contents are enumerated.
+ @param proc The user-supplied callback procedure to be
+ applied to each ink. Enumeration ends if any procedure returns
+ <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @param includeOPI If <code>true</code>, enumerate inks contained in OPI dictionaries.
+ @see PDPageMakeSeparations
+ @see AVPageViewGetNumVisibleInks
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewGetPixelInformationAtPoint
+ @see AVPageViewSetInkPreview
+ @see AVPageViewSetVisibleInks
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDPageEnumInks, ( PDPage pdPage, PDPageEnumInksCallback proc, void *clientData, ASBool includeOPI ))
+
+
+/**
+ Generates print color separations for a page.
+
+ <p>This is the entry point for creating separations for a single
+ page. The spec structure contains an array of PDHostSepsPlate
+ pointers, (typically based on the page inks reported by
+ PDPageEnumInks()), with settings such as what to do on each
+ plate and the output stream for plates that are being produced.
+ The client owns the memory for the array and all of the
+ records in it, and is responsible for disposing of all allocated
+ memory. </p>
+
+ <p>On completion, the marked flags in the <code>wasColorSet</code> field
+ of the plates indicate whether each plate was marked, meaning that
+ any marking operation happened, even if it was clipped
+ away or knocked out later. The special All colorant in a
+ Separation color space does not affect the marked flags.</p>
+
+ <p>For Adobe Reader and Acrobat Standard, this method
+ does nothing. </p>
+ @param pdPage The page.
+ @param spec The separation specification structure containing
+ parameters for the generation.
+ @see AVDocPrintSeparations
+ @see PDPageEnumInks
+ @see PDPageMakeSeparations
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDPageMakeSeparations, ( PDPage pdPage, PDHostSepsSpec spec ))
+
+/* Additional Wordy APIs for Acrobat 6.0 */
+/**
+ This is a version 6.0 replacement for PDDocCreateWordFinder()
+ and PDDocCreateWordFinderUCS() that adds configurable word-breaking
+ behavior. This method creates a word finder that is used
+ to extract text from a PDF file, according to the given
+ configuration. The word finder can be used to enumerate
+ words one-by-one or to fill a table with all the words on
+ a page. You can choose to find only words that are visible
+ in a given context.
+
+ <p>You can use version 6.0 methods such as PDWordGetCharOffsetEx()
+ to extract character information from words if you create
+ the word finder with WF_VERSION_3 or later. </p>
+
+ @param doc The document on which the word finder is used.
+
+ @param algVersion The version of the word-finding algorithm
+ to use (see PDExpT.h), as follows (pass <code>0</code> if your client
+ does not care):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Annotation</TH><TH>Use</TH></TR>
+ <TR><TD>WF_LATEST_VERSION</TD><TD>To obtain latest available version.</TD></TR>
+ <TR><TD>WF_VERSION_2</TD><TD>Version used for Acrobat 3.x, 4.x.</TD></TR>
+ <TR><TD>WF_VERSION_3</TD><TD>Available in Acrobat 5.0 and 6.0 without Tagged PDF support. </TD></TR>
+ <TR><TD>WF_VERSION_4</TD><TD>For Acrobat 5.0 and 6.0 with Tagged PDF support.</TD></TR>
+ </TABLE>
+
+ @param outUnicode Whether to return Unicode. When <code>true</code>,
+ the word finder encodes the extracted text in Unicode format.
+ Otherwise, the word finder extracts the text in the host
+ encoding.
+ @param wbConfig A pointer to a configuration record for
+ the new word finder that customizes the way the extraction
+ is performed. The configuration is only used if the algorithm
+ version is WF_VERSION_3 or higher. When it is <code>NULL</code>, the default
+ configuration is used.
+ @return The newly created word finder object.
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDWordFinderEnumWords
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderDestroy
+ @see PDWordFilterWord
+ @see PDWordGetCharOffsetEx
+
+ @note The word finder also extracts text from Form XObjects
+ that are executed in the page contents. For information
+ about Form XObjects, see Section 4.9 in the <i>PDF Reference</i>.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(PDWordFinder, PDDocCreateWordFinderEx, (PDDoc doc, ASInt16 algVersion, ASBool outUnicode, PDWordFinderConfig wbConfig))
+
+/**
+ This is a version 6.0 extension of PDWordGetCharOffset() that
+ can be used only with a word finder created with algorithm
+ version WF_VERSION_3 or higher.
+
+ <p>It returns the character offset for a character identified
+ by its index number, and the number of bytes (length) used
+ for that character. The length is usually <code>1</code> for single-byte
+ characters and <code>2</code> for double-byte characters. If multiple
+ bytes are used to construct one character, only the first
+ byte has valid character offset information and the other
+ bytes have zero offset length with the same character offset
+ of the first byte. If the returned offset length is zero,
+ it means the specified byte in the word is a part (other
+ than the first byte) of a multi-byte character. </p>
+
+ <p>The character offset is the character position calculated
+ in bytes from the beginning of a page. Because of the encoding
+ conversions and character replacements applied by the word
+ finder, some characters may have different byte lengths
+ from the original PDF content. The character offset itself
+ can locate a character in the PDF content. However, without
+ the offset length (that is the number of bytes in the PDF
+ content), clients cannot tell whether two characters are
+ next to each other in the PDF content. For example,
+ suppose you want to create a Text Select object of two characters
+ at character offset <code>1</code> and <code>3</code>. You can create an object with
+ two disconnected ranges of <code>[Offset 1, The length 1]</code> and <code>[Offset
+ 3, The length 1]</code>. However, if you know that the offset length
+ of both characters is <code>2</code>, you can create a simpler object
+ with a single range of <code>[Offset 1, The length 4]</code>. </p>
+
+ @param word The word whose character offset is obtained.
+
+ @param byteIdx The byte index within the word of the character
+ whose offset is obtained. Valid values are <code>0</code> to <code>PDWordGetLength(word)-1</code>.
+ @param bytesConsumed (Filled by method) Returns the number
+ of bytes in the word that are occupied by the specified
+ character. It can be <code>NULL</code> if it is not needed. Use <code>(byteIdx + *bytesConsumed)</code>
+ to get the byte index of the next character in the word.
+
+ @param offsetLen (Filled by the method) Returns the number
+ of bytes occupied by the specified character in the original
+ PDF content. This is <code>0</code> if the specified byte is not the
+ starting byte of a character in the PDF content. It can be
+ <code>NULL</code> if it is not needed.
+ @return The word's character offset and the number of bytes occupied
+ by the character.
+ @see PDWordGetCharOffset
+ @see PDWordGetCharDelta
+ @see PDWordGetLength
+ @see PDTextSelectCreatePageHilite
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASUns32, PDWordGetCharOffsetEx, (PDWord word, ASUns32 byteIdx, ASUns32* bytesConsumed, ASUns32* offsetLen))
+
+/**
+ Gets the quadrilateral bounding of the character at a given
+ index position in the word. If the specified character is
+ constructed with multiple bytes, only the first byte returns
+ a valid quad. Otherwise, this method returns <code>false</code>.
+
+ <p>This method can be used only with a word finder created
+ with algorithm version WF_VERSION_3 or higher. </p>
+
+ @param word The word whose character offset is obtained.
+
+ @param byteIdx The byte index within the word of the character
+ whose quad is obtained. Valid values are <code>0</code> to <code>PDWordGetLength(word)-1</code>.
+ @param quad (Filled by method) A pointer to an existing
+ quad structure in which to return the character's quad specified
+ in user-space coordinates.
+ @return <code>true</code> if the provided byte index is the beginning
+ byte of a character and a valid quad is returned, <code>false</code>
+ otherwise.
+ @see PDWordGetCharOffsetEx
+ @see PDWordGetNthQuad
+ @see PDWordGetNumQuads
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASBool, PDWordGetCharQuad, (PDWord word, ASUns32 byteIdx, ASFixedQuad* quad))
+
+/**
+ <p>Gets the number of <i>highlightable</i> characters in a word. A
+ highlightable character is the minimum text unit that Acrobat
+ can select and highlight. This method can be used only with a word finder created
+ with algorithm version WF_VERSION_3 or higher.</p>
+
+ <p>Because of the encoding conversion, the characters in a
+ word finder word list do not have a 1-to-1 correspondence
+ to the characters displayed by Acrobat. For example, if
+ the word is <code>"fish"</code> and the text operation in PDF content
+ is <code>"fi"</code>(ligature) <code>+ 's' + 'h'</code>, this method returns the number
+ of highlightable characters as <code>3</code>, counting <code>"fi"</code> as one character.
+ For the same word, the PDWordGetLength() method returns the
+ byte-length as <code>4</code>. </p>
+
+ @param word The word whose highlightable character count
+ is obtained.
+ @return The number of highlightable characters in <code>word</code>.
+ @see PDWordGetLength
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASUns32, PDWordGetNumHiliteChar, (PDWord word))
+
+/**
+ <p>Returns the byte offset within the specified word of the
+ highlightable character at the specified character offset.
+ The first character of a word is at byte offset <code>0</code>.
+ This method can be used only with a word finder created
+ with algorithm version WF_VERSION_3 or higher.</p>
+
+ <p>The returned byte offset can be passed to PDWordGetCharOffsetEx()
+ and PDWordGetCharQuad() to get additional information. Use
+ PDWordGetNumHiliteChar() to get the number of highlightable
+ characters in a word. </p>
+
+ @param word The word containing the character.
+ @param charIdx The character index within the word.
+ @return The byte offset of the specified character within the word,
+ or <code>0</code> if the character index is out of range.
+ @see PDWordGetCharOffsetEx
+ @see PDWordGetCharQuad
+ @see PDWordGetNumHiliteChar
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASUns32, PDWordGetByteIdxFromHiliteChar, (PDWord word, ASUns32 charIdx))
+
+/**
+ Copies the text from a word into an ASText object. It automatically
+ performs the necessary encoding conversions from the specified
+ word (either in Unicode or Host Encoding) to the ASText
+ object.
+ @param word The word whose text becomes the new ASText.
+
+ @param filter Character types to be dropped from the output
+ string. For example, the following returns text without
+ soft hyphens and accent marks:
+ <p><code>PDWordGetASText(word, W_SOFT_HYPHEN + W_ACCENT, mystr);</code> </p>
+ @param str An existing ASText object whose content will
+ be replaced by the new text.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDWordGetASText, (PDWord word, ASUns32 filter, ASText str))
+
+/**
+ Gets the WordFinder Character Encoding Flags for each character
+ in a word, which specify how reliably the word finder identified
+ the character encoding.
+
+ <p>This method can be used only with a word finder created
+ with algorithm version WF_VERSION_3 or higher. </p>
+
+ @param word The word whose character encoding flags are
+ obtained.
+ @param fList (Filled by the method) An array of character
+ encoding flags types. This array contains one element for
+ each byte of text in the word. The byte length of the text
+ can be determined with PDWordGetLength(). Each element is
+ the logical <code>OR</code> of one or more of the character encoding
+ flags.
+ @param size The maximum number of elements in the array
+ <code>fList</code>.
+ @see PDWordGetAttrEx
+ @see PDWordGetLength
+ @ref WordFinderCharacterEncodingFlags
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDWordGetCharEncFlags, (PDWord word, ASUns32 *fList, ASUns32 size))
+
+/**
+ This is a version 6.0 extension of PDWordGetAttr() that can
+ be used only with a word finder created with algorithm version
+ WF_VERSION_3 or higher. It can get an additional 16-bit
+ flag group defined in Acrobat 6.
+
+ <p>It gets a bit field containing information on the types of
+ characters in a word. Use PDWordGetCharacterTypes() if you
+ wish to check each character's type individually. </p>
+
+ @param word The word whose character types are obtained.
+
+ @param groupID The group number of the Word Attributes
+ flags:
+ <ul>
+ <li><code>0</code>, the default, is the first 16-bit group, and is the same as PDWordGetAttr().</li>
+ <li><code>1</code> gets the second group defined in Acrobat 6.</li>
+ </ul>
+
+ @return A bit field containing information on the types of characters
+ in <code>word</code>. The value is a logical <code>OR</code> of the Word Attributes.
+ @note PDWordGetAttr() may return an attribute value greater
+ than the maximum of all of the public attributes, since there
+ can be private attributes added on. It is recommended that
+ you <code>AND</code> the result with the attribute you are interested
+ in.
+ @see PDWordGetCharacterTypes
+ @see PDWordGetStyleTransition
+ @see PDWordGetNthCharStyle
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASUns16, PDWordGetAttrEx, (PDWord word, ASUns32 groupID))
+
+/**
+ Creates a text selection object for a given page that includes
+ all words in a word list, as returned from a <code>PDWordFinder</code>
+ method. The text selection can then be set as the current
+ selection using AVDocSetSelection().
+
+ @param page The page on which to select the words.
+ @param wList The word list to be selected.
+ @param wListLen The number of words in the word list.
+ @return The newly created text selection.
+ @see PDDocCreateTextSelect
+ @see PDTextSelectDestroy
+ @see AVDocSetSelection
+ @see PDTextSelectEnumQuads
+ @see PDTextSelectEnumText
+
+ @note For consistent text selection behavior, avoid using
+ other PDTextSelect creation methods which depend on the
+ word finder versions and word offsets. These include PDTextSelectCreatePageHiliteEx(),
+ PDTextSelectCreateRanges(), PDTextSelectCreateRangesEx(), PDTextSelectCreateWordHilite(),
+ and PDTextSelectCreateWordHiliteEx().
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(PDTextSelect, PDWordCreateTextSelect, (PDPage page, PDWord* wList, ASUns32 wListLen))
+
+/**
+ Constructs a PDWord list from a Unicode string, and calls
+ a user-supplied procedure once for each word found.
+
+ <p>The words extracted by this method do not have quads, text
+ style, or text selection information. The character offset
+ is calculated from the beginning of the input string, and
+ is increased by <code>2</code> on every 16 bits of data (the character
+ offset of a character in a PDWord is the byte offset of
+ the character in the source Unicode string). </p>
+
+ @param wObj A word finder object.
+ @param ucsStr A pointer to the Unicode string.
+ @param strLen The length of the string in bytes.
+ @param charOffsetAdj The character offset value of the
+ first character in the input Unicode string. This value
+ is added to the word character offsets, and is used to maintain
+ contiguous word character offsets when multiple strings
+ (and multiple calls to this method) are combined into one
+ word list.
+
+ <p>For example:</p>
+ <code>
+ <p>PDWordFinderEnumWordsStr(wf, str1, stelen(str1), <code>0</code>, wp, d); </p>
+ <p>PDWordFinderEnumWordsStr(wf, str2, stelen(str2), stelen(str1), wp, d); </p>
+ </code>
+
+ @param wordProc A user-supplied callback to call once for
+ each word found. Enumeration halts if <code>wordProc</code> returns <code>false</code>.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>wordProc</code> each time it is called.
+ @return <code>true</code> if the enumeration was successfully completed,
+ <code>false</code> if the enumeration was terminated because <code>wordProc</code> returned
+ <code>false</code>.
+ @exception genErrBadParm is raised if <code>wordProc</code> is <code>NULL</code>.
+ @exception pdErrOpNotPermitted
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDDocGetWordFinder
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderEnumVisibleWords
+ @see PDWordFinderEnumWords
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASBool, PDWordFinderEnumWordsStr, (PDWordFinder wObj, const ASUTF16Val *ucsStr, ASUns32 strLen, ASUns32 charOffsetAdj, PDWordProc wordProc, void* clientData))
+
+/* Routines for copying and pasting PDActions */
+
+/**
+ Registers a handler for PDAction operations.
+ @param handler A pointer to a structure containing the action
+ handler's callbacks. This structure must not be freed after
+ this call, but must be retained.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(void, PDRegisterActionHandler, (PDActionHandler handler))
+
+/**
+ Tests whether the data from an action object can be copied
+ to a clipboard for pasting. If the action is part of an
+ action chain, the method tests all actions in the chain,
+ and returns <code>true</code> only if all actions in the chain can be
+ copied.
+ @param action The action to test.
+ @return <code>true</code> if the action object or all actions in the action chain
+ can be copied, <code>false</code> otherwise.
+ @see PDActionCanPaste
+ @see PDActionCopy
+ @see PDActionPaste
+ @see PDActionDestroyClipboardData
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(ASBool, PDActionCanCopy, (PDAction action))
+
+/**
+ Copies action object data to a clipboard structure, from
+ which it can be pasted. When the PDActionClipboardData is
+ no longer required, it must be explicitly freed using PDActionDestroyClipboardData().
+
+ @param action The action to copy.
+ @return The action clipboard data object.
+ @see PDActionCanCopy
+ @see PDActionCanPaste
+ @see PDActionPaste
+ @see PDActionDestroyClipboardData
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(PDActionClipboardData, PDActionCopy, (PDAction action))
+
+/**
+ Tests whether data from an action object that has been copied
+ to a clipboard can be pasted into a destination document.
+ It tests, for example, whether pasting is allowed by document
+ permissions.
+ @param dest The destination document.
+ @param data The action data to test.
+ @return <code>true</code> if the action data can be pasted to the document, <code>false</code>
+ otherwise.
+ @see PDActionCanCopy
+ @see PDActionCopy
+ @see PDActionPaste
+ @see PDActionDestroyClipboardData
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(ASBool, PDActionCanPaste, (PDDoc dest, PDActionClipboardData data))
+
+/**
+ Creates a new PDAction in the destination document, using
+ clipboard data generated by PDActionCopy(). If the original
+ PDAction was an action chain, the entire action chain is
+ recreated. The returned PDAction is the first item in the
+ chain.
+
+ <p>When the data is no longer needed, use PDActionDestroyClipboardData()
+ to free the structure. </p>
+
+ @param dest The destination document for the paste operation.
+
+ @param data The clipboard structure holding the copied
+ action data.
+ @return A newly created action object (or the first such object
+ in the action chain) associated with the specified document,
+ containing the same data as the copied action.
+ @see PDActionCanCopy
+ @see PDActionCanPaste
+ @see PDActionCopy
+ @see PDActionDestroyClipboardData
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(PDAction, PDActionPaste, (PDDoc dest, PDActionClipboardData data))
+
+/**
+ Destroys data that has been copied from an action object
+ into a clipboard. Use this method when the clipboard data
+ is no longer needed.
+ @param data The clipboard action data to destroy.
+ @see PDActionCanCopy
+ @see PDActionCanPaste
+ @see PDActionCopy
+ @see PDActionPaste
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(void, PDActionDestroyClipboardData, (PDActionClipboardData data))
+
+/* BEGIN Optional Content API calls */
+
+/**
+ Creates a new optional-content group (OCG) object in the
+ document. The order of the groups (as returned by PDDocGetOCGs())
+ is not guaranteed, and is not the same as the display order
+ (see PDOCConfigGetOCGOrder()).
+ @param pdDoc The document in which the group is used.
+ @param name The name of the optional-content group.
+ @return The newly created group object.
+ @see PDDocGetOCGs
+ @see PDOCGCreateFromCosObj
+ @see PDOCGDestroy
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG, PDOCGCreate, (PDDoc pdDoc, ASConstText name) )
+
+/**
+ Creates a new optional-content group (OCG) object from a
+ Cos object.
+ @param ocgObj The Cos object.
+ @return The newly created OCG object.
+ @see PDOCGCreate
+ @see PDOCGGetCosObj
+ @see PDOCGDestroy
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG, PDOCGCreateFromCosObj, (CosObj ocgObj) )
+
+/**
+ Destroys an optional-content group (OCG) object. This does
+ not delete any content, but deletes the PDOCG object, destroys
+ the corresponding Cos object, and invalidates references
+ from optional-content membership dictionaries (OCMDs).
+ @param pdocg The optional-content group object.
+ @see PDOCGCreate
+ @see PDOCGCreateFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGDestroy, (PDOCG pdocg) )
+
+/**
+ Gets the Cos object associated with the optional-content
+ group (OCG) object.
+ @param pdocg The optional-content group object.
+ @return The Cos object.
+ @see PDOCGCreateFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( CosObj, PDOCGGetCosObj, (PDOCG pdocg) )
+
+/**
+ Gets an optional-content group (OCG) object from the associated
+ Cos object. If you call this multiple times for the same
+ PDOCG, it returns the same object.
+ @param obj The Cos object.
+ @return The OCG object.
+ @see PDOCGCreate
+ @see PDOCGCreateFromCosObj
+ @see PDOCGGetCosObj
+ @see PDOCGDestroy
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG, PDOCGGetFromCosObj, (CosObj obj) )
+
+/**
+ Gets the document that contains an optional-content group.
+
+ @param pdocg The optional-content group object for which
+ the document is desired.
+ @return The document object.
+ @see PDDocGetOCGs
+ @see PDOCMDGetPDDoc
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDDoc, PDOCGGetPDDoc, (PDOCG pdocg) )
+
+/**
+ Sets the name of an optional-content group.
+ @param pdocg The optional-content group object.
+ @param name The new name string.
+ @see PDOCGGetName
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGSetName, (PDOCG pdocg, ASConstText name) )
+
+/**
+ Gets the name of an optional-content group. The returned
+ ASText is a copy of the OCG's name. The client is free to
+ modify it and responsible for destroying it.
+ @param pdocg The optional-content group object for which
+ the name is desired.
+ @return The name string.
+ @see PDOCGSetName
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASText, PDOCGGetName, (PDOCG pdocg) )
+
+/**
+ Sets the initial state (<code>ON</code> or <code>OFF</code>) of the optional-content
+ group (OCG) object in a given configuration.
+ @param pdocg The optional-content group object.
+ @param pdOCCfg The configuration for which to set the
+ group's initial state.
+ @param onOff The new initial state, <code>true</code> if the state
+ is <code>ON</code>, <code>false</code> if it is <code>OFF</code>.
+ @see PDOCContextGetOCGStates
+ @see PDOCContextSetOCGStates
+ @see PDOCGGetCurrentState
+ @see PDOCGGetInitialState
+ @see PDOCGRemoveInitialState
+ @see PDOCGSetCurrentState
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGSetInitialState, (PDOCG pdocg, PDOCConfig pdOCCfg, ASBool onOff) )
+
+/**
+ Gets a initial state (<code>ON</code> or <code>OFF</code>) of the optional-content
+ group (OCG) object in a given configuration. If the configuration
+ has a <code>BaseState</code> of <code>Unchanged</code>, and the OCG is not listed
+ explicitly in its <code>ON</code> list or <code>OFF</code> list, then the initial
+ state is taken from the OCG's current state in the document's
+ default context, and the method returns <code>false</code>.
+ @param pdocg The optional-content group object.
+ @param pdOCCfg The configuration for which to get the
+ group's initial state.
+ @param initState (Filled by the method) The initial state,
+ <code>true</code> if the state is <code>ON</code>, <code>false</code> if it is <code>OFF</code>.
+ @return <code>true</code> if the initial state is unambiguously defined
+ in the configuration, <code>false</code> otherwise.
+ @see PDOCGGetCurrentState
+ @see PDOCGGetUsageEntry
+ @see PDOCGRemoveInitialState
+ @see PDOCGSetInitialState
+ @see PDOCContextGetOCGStates
+ @see PDOCContextSetOCGStates
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCGGetInitialState, (PDOCG pdocg, PDOCConfig pdOCCfg, ASBool* initState) )
+
+/**
+ Removes the initial <code>ON-OFF</code> state information for the optional-content
+ group (OCG) object in a given configuration.
+ @param pdocg The optional-content group object.
+ @param pdOCCfg The configuration for which to remove the
+ group's initial state.
+ @see PDOCGGetCurrentState
+ @see PDOCGGetInitialState
+ @see PDOCGGetUsageEntry
+ @see PDOCContextGetOCGStates
+ @see PDOCContextSetOCGStates
+ @see PDOCGSetCurrentState
+ @see PDOCGSetInitialState
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGRemoveInitialState, (PDOCG pdocg, PDOCConfig pdOCCfg) )
+
+/**
+ Sets a Usage dictionary entry in an optional-content group
+ (OCG) object. The entry associates usage information with
+ an entry key for retrieval. If a dictionary does not exist,
+ the method creates one.
+
+ <p>A Usage dictionary entry provides more specific intended
+ usage information than an intent entry. The possible key values
+ are:</p>
+ <ul>
+ <li><code>CreatorInfo</code></li>
+ <li><code>Language</code></li>
+ <li><code>Export</code></li>
+ <li><code>Zoom</code></li>
+ <li><code>Print</code></li>
+ <li><code>View</code></li>
+ <li><code>User</code></li>
+ <li><code>PageElement</code></li>
+ </ul>
+
+ <p>The usage value can act as a kind of metadata, describing
+ the sort of things that belong to the group, such as
+ text in French, fine detail on a map, or a watermark. The
+ usage values can also be used by the <code>AutoState</code> mechanism
+ to make decisions about what groups should be on and what
+ groups should be off. The <code>AutoState</code> mechanism considers
+ the usage information in the OCGs, the AS array of the configuration,
+ and external factors; for example, the language the application
+ is running in, the current zoom level on the page, or if
+ the page is being printed. </p>
+
+ @param pdocg The optional-content group object.
+ @param usagekey The usage entry key.
+ @param usageinfo The usage information to associate with
+ the key.
+ @see PDOCGGetUsageEntry
+ @see PDOCGHasUsageInfo
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGSetUsageDictEntry, (PDOCG pdocg, ASAtom usagekey, CosObj usageinfo) )
+
+/**
+ Tests whether an optional-content group (OCG) object is
+ associated with a Usage dictionary.
+ @param pdocg The optional-content group object.
+ @return <code>true</code> if the group has a Usage dictionary, <code>false</code>
+ otherwise.
+ @see PDOCGGetUsageEntry
+ @see PDOCGSetUsageDictEntry
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCGHasUsageInfo, (PDOCG pdocg) )
+
+/**
+ Gets usage information from an optional-content group (OCG)
+ object. A Usage dictionary entry provides more specific
+ intended usage information than an intent entry. The possible
+ key values are:
+
+ <ul>
+ <li><code>CreatorInfo</code></li>
+ <li><code>Language</code></li>
+ <li><code>Export</code></li>
+ <li><code>Zoom</code></li>
+ <li><code>Print</code></li>
+ <li><code>View</code></li>
+ <li><code>User</code></li>
+ <li><code>PageElement</code></li>
+ </ul>
+
+ @param pdocg The optional-content group object.
+ @param entry The usage key in the usage dictionary entry.
+ @return The usage information associated with the given key in the
+ Usage dictionary for the group, or a <code>NULL</code> Cos object if
+ the operation fails (because the OCG is malformed or has
+ no dictionary, or because the dictionary has no entry corresponding
+ to the given key).
+ @see PDOCGHasUsageInfo
+ @see PDOCGSetUsageDictEntry
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( CosObj, PDOCGGetUsageEntry, (PDOCG pdocg, ASAtom entry) )
+
+/**
+ Sets the Intent entry in an optional-content group's Cos
+ dictionary. An intent is an ASAtom value broadly describing
+ the intended use, which can be either <code>View</code> or <code>Design</code>.
+
+ <p>A group's content is considered to be optional (that is,
+ the group's state is considered in its visibility) if any
+ intent in its list matches an intent of the context. The
+ intent list of the context is usually set from the intent
+ list of the document configuration. </p>
+
+ @param pdocg The optional-content group object for which
+ the intent is desired.
+ @param intent The new Intent entry value, an array of
+ atoms terminated with ASAtomNull.
+ @see PDOCGGetIntent
+ @see PDOCContextSetIntent
+ @see PDOCConfigSetIntent
+ @see PDOCGUsedInOCConfig
+ @see PDOCGUsedInOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGSetIntent, (PDOCG pdocg, ASAtom *intent) )
+
+/**
+ Gets the intent list for an optional-content group. An intent
+ is an ASAtom value broadly describing the intended use,
+ either <code>View</code> or <code>Design</code>.
+
+ <p>A group's content is considered to be optional (that is,
+ the group's state is considered in its visibility) if any
+ intent in its list matches an intent of the context. The
+ intent list of the context is usually set from the intent
+ list of the document configuration. </p>
+
+ @param pdocg The optional-content group object for which
+ the intent is desired.
+ @return An array containing intent entries (ASAtom objects) terminated
+ by ASAtomNull. The client is responsible for freeing it
+ using ASfree().
+ @see PDOCGSetIntent
+ @see PDOCContextGetIntent
+ @see PDOCConfigGetIntent
+ @see PDOCGUsedInOCConfig
+ @see PDOCGUsedInOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASAtom*, PDOCGGetIntent, (PDOCG pdocg) )
+
+/**
+ Gets the current <code>ON-OFF</code> state of the optional-content group
+ (OCG) object in a given context.
+ @param pdocg The optional-content group object.
+ @param ocContext The context for which to get the group's
+ state.
+ @return <code>true</code> if the state is <code>ON</code>, <code>false</code> if it is <code>OFF</code>.
+ @see PDOCGGetInitialState
+ @see PDOCGGetUsageEntry
+ @see PDOCContextGetOCGStates
+ @see PDOCContextSetOCGStates
+ @see PDOCGSetCurrentState
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCGGetCurrentState, (PDOCG pdocg, PDOCContext ocContext) )
+
+/**
+ Sets the current <code>ON-OFF</code> state of the optional-content group
+ (OCG) object in a given context.
+ @param pdocg The optional-content group object.
+ @param ocContext The context for which to set the group's
+ state.
+ @param newState The new state.
+ @see PDOCContextGetOCGStates
+ @see PDOCContextSetOCGStates
+ @see PDOCGGetCurrentState
+ @see PDOCGGetInitialState
+ @see PDDocGetOCContext
+ @see PDOCGRemoveInitialState
+ @see PDOCGSetInitialState
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGSetCurrentState, (PDOCG pdocg, PDOCContext ocContext, ASBool newState) )
+
+/**
+ Tests whether an optional-content group (OCG) object is
+ used in a given context.
+
+ <p>A group's content is considered to be optional (that is,
+ the group's state is considered in its visibility) if any
+ intent in its list matches an intent of the context. The
+ intent list of the context is usually set from the intent
+ list of the document configuration. </p>
+
+ @param pdocg The optional-content group object.
+ @param pdocctx The optional-content context.
+ @return <code>true</code> if the group is taken into consideration when
+ determining the visibility of content, <code>false</code> otherwise.
+
+ @see PDOCConfigGetIntent
+ @see PDOCContextGetIntent
+ @see PDOCGGetIntent
+ @see PDOCGUsedInOCConfig
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCGUsedInOCContext, (PDOCG pdocg, PDOCContext pdocctx) )
+
+/**
+ Tests whether an optional-content group (OCG) object is
+ used in a context initialized using the given configuration.
+
+ <p>A group's content is considered to be optional (that is,
+ the group's state is considered in its visibility) if any
+ intent in its list matches an intent of the context. The
+ intent list of the context is usually set from the intent
+ list of the document configuration. </p>
+
+ @param pdocg The optional-content group object.
+ @param pdoccfg The optional-content configuration.
+ @return <code>true</code> if the group is taken into consideration when
+ determining the visibility of content, <code>false</code> otherwise.
+
+ @see PDOCConfigGetIntent
+ @see PDOCContextGetIntent
+ @see PDOCGGetIntent
+ @see PDOCGUsedInOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCGUsedInOCConfig, (PDOCG pdocg, PDOCConfig pdoccfg) )
+
+/**
+ Enumerates the optional-content groups for the page, calling
+ the supplied procedure for each one. Enumeration continues
+ until all groups have been enumerated, or until <code>enumProc</code>
+ returns <code>false</code>. Each group is reported once, even if it is
+ referenced multiple times in the page.
+ @param pdPage The page whose groups are enumerated.
+ @param enumProc A user-supplied callback to call for each
+ group. Enumeration terminates if <code>proc</code> returns <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @see PDDocEnumOCGs
+ @see PDPageGetOCGs
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDPageEnumOCGs, (PDPage pdPage, PDOCGEnumProc enumProc, void* clientData) )
+
+/**
+ Enumerates the optional-content groups for the document,
+ calling the supplied procedure for each one. Enumeration
+ continues until all groups have been enumerated, or until
+ <code>enumProc</code> returns <code>false</code>. Each group is reported once, even
+ if it is referenced multiple times in a page, or on multiple
+ pages.
+ @param pdDoc The document whose groups are enumerated.
+
+ @param enumProc A user-supplied callback to call for each
+ group. Enumeration terminates if <code>enumProc</code> returns <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @see PDDocGetOCGs
+ @see PDDocEnumOCConfigs
+ @see PDPageEnumOCGs
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDDocEnumOCGs, (PDDoc pdDoc, PDOCGEnumProc enumProc, void* clientData) )
+
+/**
+ Gets the optional-content groups for the document.
+ @param pdPage The page whose OCGs are obtained.
+ @return A <code>NULL</code>-terminated array of PDOCG objects. The client is
+ responsible for freeing the array with ASfree().
+ @see PDDocGetOCGs
+ @see PDPageEnumOCGs
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG*, PDPageGetOCGs, (PDPage pdPage) )
+
+/**
+ Creates a new optional-content membership dictionary (OCMD) object
+ in the given document for the given groups and visibility
+ policy.
+
+ <p>To add a group to an existing OCMD, get the current OCG
+ list, modify it, then create a new OCMD with the new list
+ of groups. </p>
+
+ @param pdDoc The document in which the dictionary is used.
+
+ @param ocgs A <code>NULL</code>-terminated array of optional-content
+ groups (OCGs) to be members of the dictionary.
+ @param policy The visibility policy that determines the
+ visibility of content with respect to the <code>ON-OFF</code> state of
+ OCGs listed in the dictionary.
+ @return The newly created dictionary object, or <code>NULL</code> if no groups
+ are supplied.
+ @see PDOCMDFindOrCreate
+ @see PDOCMDGetFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCMD, PDOCMDCreate, (PDDoc pdDoc, PDOCG* ocgs, PDOCMDVisPolicy policy) )
+
+/**
+ Locates an existing optional-content membership dictionary
+ (OCMD) object that references the given groups, and that
+ uses the same visibility policy. If no such dictionary is
+ found, the method creates one.
+
+ <p>If only one group is supplied, the policy is kOCMDVisibility_AnyOn
+ or kOCMDVisibility_AllOn, and no matching dictionary is
+ found, the method creates an OCMD that directly contains
+ the group without the level of indirection normally introduced
+ by an OCMD. If the indirection is needed to add more groups
+ to the OCMD, use PDOCMDCreate(). </p>
+
+ <p>To add a group to an existing OCMD, get the current OCG
+ list, modify it, then create a new OCMD with the new list
+ of groups. </p>
+
+ @param pdDoc The document in which the dictionary is used.
+
+ @param ocgs A <code>NULL</code>-terminated array of optional-content
+ groups (OCGs) to be members of the dictionary.
+ @param policy The visibility policy that determines the
+ visibility of content with respect to the <code>ON-OFF</code> state of
+ OCGs listed in the dictionary.
+ @return The newly created or existing dictionary object, or <code>NULL</code>
+ if no groups are supplied.
+ @see PDOCMDCreate
+ @see PDOCMDGetFromCosObj
+ @see PDAnnotGetOCMD
+ @see PDEElementGetOCMD
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCMD, PDOCMDFindOrCreate, (PDDoc pdDoc, PDOCG* ocgs, PDOCMDVisPolicy policy) )
+
+/**
+ Gets the Cos object associated with the optional-content
+ membership dictionary (OCMD) object.
+ @param pdocmd The dictionary object.
+ @return The Cos object.
+ @see PDOCMDGetFromCosObj
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( CosObj, PDOCMDGetCosObj, (PDOCMD pdocmd) )
+
+/**
+ Gets the document that contains an optional-content membership
+ dictionary.
+ @param pdocmd The dictionary for which the document is
+ desired.
+ @return The document object.
+ @see PDDocGetOCGs
+ @see PDOCGGetPDDoc
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDDoc, PDOCMDGetPDDoc, (PDOCMD pdocmd) )
+
+/**
+ Gets an optional-content membership dictionary (OCMD) object
+ from the associated Cos object.
+ @param obj The Cos object.
+ @return The dictionary object.
+ @see PDOCMDCreate
+ @see PDOCMDGetCosObj
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCMD, PDOCMDGetFromCosObj, (CosObj obj) )
+
+/**
+ Gets the optional-content groups listed in a membership
+ dictionary.
+ @param pdocmd The membership dictionary whose OCGs are
+ obtained.
+ @return A <code>NULL</code>-terminated array of the document's optional-content
+ groups. The client is responsible for freeing the array
+ using ASfree().
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG*, PDOCMDGetOCGs, (PDOCMD pdocmd) )
+
+/**
+ Gets the optional-content membership dictionary's visibility
+ policy, which determines the visibility of content with
+ respect to the <code>ON-OFF</code> state of OCGs listed in the dictionary.
+
+ @param pdocmd The dictionary whose policy is obtained.
+ @return The visibility policy.
+ @see PDOCMDIsCurrentlyVisible
+ @see PDOCMDsAreCurrentlyVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCMDVisPolicy, PDOCMDGetVisPolicy, (PDOCMD pdocmd) )
+
+/**
+ Associates an optional-content membership dictionary (OCMD)
+ object with the annotation, making it optionally visible
+ according to the OCMD's visibility policy. If the annotation
+ already has a dictionary, the method replaces it.
+ @param annot The annotation for which to set the dictionary.
+
+ @param pdocmd The new dictionary.
+ @see PDAnnotGetOCMD
+ @see PDOCMDFindOrCreate
+ @see PDAnnotRemoveOCMD
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDAnnotSetOCMD, (PDAnnot annot, PDOCMD pdocmd) )
+
+/**
+ Gets an optional-content membership dictionary (OCMD) object
+ associated with the annotation.
+ @param annot The annotation from which the dictionary
+ is obtained.
+ @return The dictionary object, or <code>NULL</code> if the annotation does not
+ contain a dictionary.
+ @see PDAnnotSetOCMD
+ @see PDAnnotRemoveOCMD
+ @see PDEElementGetOCMD
+ @see PDOCMDFindOrCreate
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCMD, PDAnnotGetOCMD, (PDAnnot annot) )
+
+/**
+ Dissociates any optional-content membership dictionary (OCMD)
+ object from the annotation.
+ @param annot The annotation for which to remove the dictionary.
+ @see PDAnnotGetOCMD
+ @see PDAnnotSetOCMD
+ @see PDOCMDFindOrCreate
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDAnnotRemoveOCMD, (PDAnnot annot) )
+
+/**
+ Based on the optional-content groups listed in the dictionary,
+ the current <code>ON-OFF</code> state of those groups within the specified
+ context, and the dictionary's visibility policy, test whether
+ the content tagged with this dictionary would be visible.
+
+ <p>It ignores the context's current PDOCDrawEnumType and NonOCDrawing
+ settings. </p>
+ @param pdocmd The dictionary.
+ @param ocContext The context in which the visibility of
+ content is tested.
+ @return <code>true</code> if content tagged with this dictionary is visible
+ in the given context, <code>false</code> if it is hidden.
+ @see PDOCMDGetVisPolicy
+ @see PDOCMDsAreCurrentlyVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCMDIsCurrentlyVisible, (PDOCMD pdocmd, PDOCContext ocContext) )
+
+/**
+ Tests a set of optional-content membership dictionaries
+ to determine whether contents tagged with any of them is
+ visible in a given optional-content context. The method
+ calls PDOCMDIsCurrentlyVisible() on each of the dictionaries.
+ If content is visible in the given context in any of the
+ dictionaries, this method returns <code>true</code>.
+ @param pdocmds A <code>NULL</code>-terminated array of dictionaries
+ to test.
+ @param ocContext The context in which visibility is tested.
+ @return <code>true</code> if content using any of the dictionaries is visible
+ in the given context, <code>false</code> if it is hidden for all of the
+ dictionaries.
+ @see PDOCMDGetVisPolicy
+ @see PDOCMDIsCurrentlyVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCMDsAreCurrentlyVisible, (PDOCMD* pdocmds, PDOCContext ocContext) )
+
+/**
+ Tests whether an annotation with an OC entry is visible
+ in a given optional-content context, considering the current
+ <code>ON-OFF</code> states of the optional-content groups in the optional-content
+ dictionary (OCMD) and the dictionary's visibility policy.
+
+ @param annot The annotation to test.
+ @param ocContext The optional-content context in which the visibility
+ is tested.
+ @return <code>true</code> if the annotation is visible in the given context
+ or if the annotation has no OC entry, <code>false</code> if it is hidden.
+
+ @see PDAnnotGetOCMD
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDAnnotIsCurrentlyVisible, (PDAnnot annot, PDOCContext ocContext) )
+
+/**
+ Makes content that uses any of a set of optional-content
+ membership dictionaries visible in a given optional-content
+ context. The method manipulates the states of optional-content
+ groups in the dictionaries so that any content controlled
+ by any of the dictionaries will be visible in the given
+ context. There can be more than one combination of states
+ that satisfies the request. The particular combination of
+ states is not guaranteed from one call to the next.
+
+ <p>The method returns <code>false</code> if it is not possible to make the
+ content visible (for example, if there are nested dictionaries
+ where one specifies <code>"show if the group state is ON"</code> and
+ the other specifies <code>"show if the group state is OFF"</code>). In
+ such a case, visibility is always off, so no state setting
+ can make the content visible. </p>
+
+ <p>This method ignores the context's draw type. </p>
+
+ @param ocmds A <code>NULL</code>-terminated array of dictionaries to
+ act upon.
+ @param ocContext The context in which the contents are
+ made visible.
+ @return <code>true</code> if successful or if the OCMD list is empty, <code>false</code> otherwise.
+
+ @see PDOCMDGetVisPolicy
+ @see PDOCMDIsCurrentlyVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCMDsMakeContentVisible, (PDOCMD* ocmds, PDOCContext ocContext) )
+
+/**
+ Creates a context object that represents an optional-content
+ state of the document, initializing it in the same way as
+ PDOCContextInit().
+ @param policy The initialization policy for the new context.
+ This value determines whether optional-content groups (OCGs)
+ are initially <code>ON</code> or <code>OFF</code>.
+ @param otherCtx Another context from which to take initial
+ OCG states when the policy is kPDOCInit_FromOtherContext.
+ It is ignored for other policies.
+ @param pdOCCfg A configuration from which to take initial
+ OCG states when the policy is kPDOCInit_FromConfig. It is ignored
+ for other policies.
+ @param pdDoc The document for which to create a context.
+ @return The new PDOCContext object. The client is responsible for
+ freeing the context using PDOCContextFree().
+ @see PDOCContextInit
+ @see PDOCContextFree
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCContext, PDOCContextNew, (PDOCContextInitPolicy policy, PDOCContext otherCtx, PDOCConfig pdOCCfg, PDDoc pdDoc) )
+
+/**
+ Destroys an optional-content context object and frees the
+ associated memory as needed.
+ @param ocContext The context object to free.
+ @see PDOCContextInit
+ @see PDOCContextNew
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextFree, (PDOCContext ocContext) )
+
+/**
+ Gets the built-in default optional-content context for the
+ document. This context is used by all content drawing and
+ enumeration calls that do not take an optional-content context
+ parameter, or for which no context is specified.
+ @param pdDoc The document whose context is obtained.
+ @return The document's current optional-content context.
+ @see PDDocGetOCConfig
+ @see PDDocGetOCGs
+ @see PDOCContextGetPDDoc
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCContext, PDDocGetOCContext, (PDDoc pdDoc) )
+
+/**
+ Gets the document that contains an optional-content context.
+
+ @param ocContext The context for which a document is desired.
+ @return The document object.
+ @see PDDocGetOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDDoc, PDOCContextGetPDDoc, (PDOCContext ocContext) )
+
+/**
+ Initializes the <code>ON-OFF</code> states of all optional-content groups
+ (OCGs) within an existing context.
+ @param ocContext The context to initialize.
+ @param policy The initialization policy for the context.
+ This value determines whether optional-content groups are
+ initially <code>ON</code> or <code>OFF</code>.
+ @param otherCtx Another context from which to take initial
+ OCG states when the policy is kPDOCInit_FromOtherContext.
+ It is ignored for other policies.
+ @param pdOCCfg A configuration from which to take initial
+ OCG states when the policy is kPDOCInit_FromConfig. It is ignored
+ for other policies.
+ @see PDOCContextNew
+ @see PDOCContextFree
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextInit, (PDOCContext ocContext, PDOCContextInitPolicy policy, PDOCContext otherCtx, PDOCConfig pdOCCfg) )
+
+/**
+ Creates a new context object to represent an optional-content
+ state of the document, using an existing context as a template.
+
+ <p>This is the same as the following call: </p>
+
+ <p><code>PDOCCOntextNew(kOCCInit_FromOtherContext, ocContext, <code>NULL</code>, PDOCContextGetPDDoc(ocContext)); </code></p>
+
+ @param ocContext The context to copy.
+ @return The new PDOCContext object. The client is responsible for
+ freeing the context using PDOCContextFree().
+ @see PDDocGetOCContext
+ @see PDOCContextInit
+ @see PDOCContextNew
+ @see PDOCContextFree
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCContext, PDOCContextMakeCopy, (PDOCContext ocContext) )
+
+/**
+ Creates a context object that represents an optional-content
+ state of the document, with the PDOCDrawEnumType property
+ set to kPDOC_NoOC, so that no content marked as optional
+ content is drawn, regardless of the visibility according
+ to the OCGs and OCMDs.
+
+ <p>Content that is not marked as optional content may still
+ be drawn, depending on the NonOCDrawing property. </p>
+
+ @param pdDoc The document for which to create a context.
+ @return The new PDOCContext object. The client is responsible for
+ freeing the context using PDOCContextFree().
+ @see PDOCContextInit
+ @see PDOCContextNew
+ @see PDOCContextNewWithInitialState
+ @see PDOCContextFree
+ @see PDOCContextGetNonOCDrawing
+ @see PDOCContextGetOCDrawEnumType
+ @see PDOCContextSetNonOCDrawing
+ @see PDOCContextSetOCDrawEnumType
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCContext, PDOCContextNewWithOCDisabled, (PDDoc pdDoc) )
+
+/**
+ Creates a context object that represents an optional-content
+ state of the document, using the current state as the initial
+ state for each group (OCG), as determined by the document's
+ optional-content configuration (returned by <code>PDDocGetOCConfig(pdDoc)</code>).
+
+ @param pdDoc The document for which to create a context.
+ @return The new PDOCContext object. The client is responsible for
+ freeing the context using PDOCContextFree().
+ @see PDDocGetOCConfig
+ @see PDOCContextInit
+ @see PDOCContextNew
+ @see PDOCContextNewWithOCDisabled
+ @see PDOCContextFree
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCContext, PDOCContextNewWithInitialState, (PDDoc pdDoc) )
+
+/**
+ Gets the <code>ON-OFF</code> states for the given optional-content groups
+ (OCGs) in the given optional-content context. It returns the
+ states in the <code>states</code> array, which must be large enough to
+ hold as many ASBool values as there are OCGs.
+ @param ocContext The context for which the OCG states
+ are desired.
+ @param pdocgs A <code>NULL</code>-terminated array of optional-content
+ groups whose states are obtained.
+ @param states (Filled by the method) An array of OCG states
+ corresponding to the array of OCGs, <code>true</code> for ON and <code>false</code>
+ for <code>OFF</code>. The array must be large enough to hold as many
+ states as there are non-<code>NULL</code> OCGs.
+ @see PDOCContextSetOCGStates
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextGetOCGStates, (PDOCContext ocContext, PDOCG *pdocgs, ASBool *states) )
+
+/**
+ Sets the <code>ON-OFF</code> states for the given optional-content groups
+ (OCGs) in the given optional-content context. The <code>newStates</code>
+ array must be large enough to hold as many ASBool values
+ as there are OCGs.
+ @param ocContext The context for which the OCG states
+ are set.
+ @param pdocgs A <code>NULL</code>-terminated array of optional-content
+ groups.
+ @param newStates An array of new OCG states corresponding
+ to the array of OCGs, <code>true</code> for ON and <code>false</code> for <code>OFF</code>. The
+ array must contain as many states as there are non-<code>NULL</code>
+ OCGs in the <code>pdocgs</code> array.
+ @see PDOCContextGetOCGStates
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextSetOCGStates, (PDOCContext ocContext, PDOCG *pdocgs, ASBool *newStates) )
+
+/**
+ Creates a new context object that represents an optional-content
+ state of the document, using an existing context as a template,
+ but applying an automatic state change for the specified
+ event. An automatic state change toggles all groups' <code>ON-OFF</code>
+ states when the triggering event occurs.
+
+ <p>A configuration's AS array defines how usage entries are
+ used to automatically manipulate the OCG states. It associates
+ an event (<code>View</code>, <code>Print</code>, or <code>Export</code>) with a list of OCGs and
+ a category, or list of usage keys identifying OCG usage
+ dictionary entries. See the <i>PDF Reference</i>, and the <b>OCTextAutoStateSnip</b>
+ example in the Snippet Runner. </p>
+
+ @param inCtx The context to copy.
+ @param cfg The configuration in which the automatic state
+ change applies.
+ @param event The event for which state will automatically
+ change. Events are <code>View</code>, <code>Export</code>, and <code>Print</code>.
+ @return The new PDOCContext object. The client is responsible for
+ freeing the context using PDOCContextFree().
+ @see PDOCContextApplyAutoStateChanges
+ @see PDOCContextFindAutoStateChanges
+ @see PDOCContextClearAllUserOverrides
+ @see PDOCGGetUserOverride
+ @see PDOCGSetUserOverride
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCContext, PDOCContextMakeCopyWithAutoStateChanges, (PDOCContext inCtx, PDOCConfig cfg, ASAtom event) )
+
+/**
+ Finds optional-content groups whose <code>ON-OFF</code> states should
+ be toggled in the context, based on usage application directives
+ contained in the configuration's AS array.
+
+ <p>The AS array defines how usage entries are used to automatically
+ manipulate the OCG states. It associates an event (<code>View</code>,
+ <code>Print</code>, or <code>Export</code>) with a list of OCGs and a category, or
+ list of usage keys identifying OCG usage dictionary entries.
+ See the <i>PDF Reference</i>, and the <b>OCTextAutoStateSnip</b> example
+ in the Snippet Runner. </p>
+ @param ctx The context for which the visibility state
+ should be changed.
+ @param cfg The configuration whose usage directives are
+ used.
+ @param event The event for which an <code>ON-OFF</code> state is automatically
+ changed. Events are <code>View</code>, <code>Export</code>, and <code>Print</code>.
+ @return A <code>NULL</code>-terminated array of optional-content group objects.
+ The client is responsible for freeing it using ASfree().
+ @see PDOCContextApplyAutoStateChanges
+ @see PDOCContextMakeCopyWithAutoStateChanges
+ @see PDOCContextClearAllUserOverrides
+ @see PDOCGGetUserOverride
+ @see PDOCGSetUserOverride
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG*, PDOCContextFindAutoStateChanges, (PDOCContext ctx, PDOCConfig cfg, ASAtom event) )
+
+/**
+ Calls PDOCContextFindAutoStateChanges() to find optional-content
+ groups whose <code>ON-OFF</code> states should be toggled, based on usage
+ application directives contained in the configuration's
+ AS array, and applies the changes within the given context.
+
+ <p>The AS array defines how usage entries are used to automatically
+ manipulate the OCG states. It associates an event (<code>View</code>,
+ <code>Print</code>, or <code>Export</code>) with a list of OCGs and a category, or
+ list of usage keys identifying OCG usage dictionary entries.
+ See the <i>PDF Reference</i>, and the <b>OCTextAutoStateSnip</b> example
+ in the Snippet Runner.</p>
+
+ @param ctx The context for which the visibility state
+ is changed.
+ @param cfg The configuration whose usage directives are
+ used.
+ @param event The event for which an <code>ON-OFF</code> state is automatically
+ changed. Events are <code>View</code>, <code>Export</code>, and <code>Print</code>.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see PDOCContextFindAutoStateChanges
+ @see PDOCContextMakeCopyWithAutoStateChanges
+ @see PDOCContextClearAllUserOverrides
+ @see PDOCGGetUserOverride
+ @see PDOCGSetUserOverride
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCContextApplyAutoStateChanges, (PDOCContext ctx, PDOCConfig cfg, ASAtom event) )
+
+/**
+ Sets the drawing and enumeration type for an optional-content
+ context. This type, together with the visibility determined
+ by the OCG and OCMD states, controls whether content that
+ is marked as optional content is drawn or enumerated.
+
+ <p>Together, this value and the NonOCDrawing value of the context
+ determine how both optional and non-optional content on
+ a page is drawn or enumerated. See PDOCDrawEnumType(). </p>
+
+ @param ocContext The context for which the drawing and
+ enumeration type is desired.
+ @param dt The new drawing and enumeration type.
+ @see PDOCContextGetOCDrawEnumType
+ @see PDOCContextSetNonOCDrawing
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextSetOCDrawEnumType, (PDOCContext ocContext, PDOCDrawEnumType dt) )
+
+/**
+ Gets the drawing and enumeration type for an optional-content
+ context. This type, together with the visibility determined
+ by the OCG and Optional Content Membership Dictionary (OCMD) states, controls whether content that
+ is marked as optional content is drawn or enumerated.
+
+ <p>Together, this value and the NonOCDrawing value of the context
+ determine how both optional and non-optional content on
+ a page is drawn or enumerated. See PDOCDrawEnumType(). </p>
+
+ @param ocContext The context for which the drawing and
+ enumeration type is desired.
+ @return The drawing and enumeration type value.
+ @see PDOCContextGetNonOCDrawing
+ @see PDOCContextSetOCDrawEnumType
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCDrawEnumType, PDOCContextGetOCDrawEnumType, (PDOCContext ocContext) )
+
+/**
+ Sets the Intent entry in an optional-content context's Cos
+ dictionary. An intent is an ASAtom value broadly describing
+ the intended use, either <code>View</code> or <code>Design</code>.
+
+ <p>A group's content is considered to be optional (that is,
+ the group's state is considered in its visibility) if any
+ intent in its list matches an intent of the context. The
+ intent list of the context is usually set from the intent
+ list of the document configuration. </p>
+
+ <p>It raises an exception if the context is busy. </p>
+
+ @param ocContext The context for which to set the intent.
+
+ @param intent The new Intent entry value, an array of
+ atoms terminated with ASAtomNull.
+ @see PDOCContextGetIntent
+ @see PDOCConfigSetIntent
+ @see PDOCGSetIntent
+ @see PDOCGUsedInOCConfig
+ @see PDOCGUsedInOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextSetIntent, (PDOCContext ocContext, ASAtom* intent) )
+
+/**
+ Gets the intent list for an optional-content context. An
+ intent is an ASAtom value broadly describing the intended
+ use, either <code>View</code> or <code>Design</code>.
+
+ <p>A group's content is considered to be optional (that is,
+ the group's state is considered in its visibility) if any
+ intent in its list matches an intent of the context. The
+ intent list of the context is usually set from the intent
+ list of the document configuration. </p>
+
+ @param ocContext The context for which an intent is desired.
+ @return An array containing intent entries (ASAtom objects) terminated
+ by ASAtomNull. The client is responsible for freeing it
+ using ASfree().
+ @see PDOCContextSetIntent
+ @see PDOCConfigGetIntent
+ @see PDOCGGetIntent
+ @see PDOCGUsedInOCConfig
+ @see PDOCGUsedInOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASAtom*, PDOCContextGetIntent, (PDOCContext ocContext) )
+
+/**
+ Sets the non-OC status for an optional-content context.
+ Content that is not marked as optional content is drawn
+ when NonOCDrawing is <code>true</code>, and not drawn when NonOCDrawing
+ is <code>false</code>.
+
+ <p>Together, this value and the PDOCDrawEnumType value of the
+ context determine how both optional and non-optional content
+ on a page is drawn or enumerated. See PDOCDrawEnumType(). </p>
+
+ @param ocContext The context for which to set the non-OC
+ drawing status.
+ @param drawNonOC The new value for the non-OC drawing
+ status, <code>true</code> or <code>false</code>.
+ @see PDOCContextGetNonOCDrawing
+ @see PDOCContextGetOCDrawEnumType
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextSetNonOCDrawing, (PDOCContext ocContext, ASBool drawNonOC) )
+
+/**
+ Gets the non-OC drawing status for an optional-content context.
+ Content that is not marked as optional content is drawn
+ when NonOCDrawing is <code>true</code>, and not drawn when NonOCDrawing
+ is <code>false</code>.
+
+ <p>Together, this value and the PDOCDrawEnumType value of the
+ context determine how both optional and non-optional content
+ on a page is drawn or enumerated. See PDOCDrawEnumType(). </p>
+
+ @param ocContext The context for which the non-OC drawing
+ status is desired.
+ @return <code>true</code> if the context's NonOCDrawing is <code>true</code>, <code>false</code>
+ otherwise.
+ @see PDOCContextSetNonOCDrawing
+ @see PDOCContextGetOCDrawEnumType
+ @see PDOCContextNewWithOCDisabled
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCContextGetNonOCDrawing, (PDOCContext ocContext) )
+
+/**
+ Clears the Optional Content Membership Dictionary (OCMD) stack for an optional-content context, and
+ resets the current visibility for the context based on the
+ context's non-OC drawing setting (see PDOCContextSetNonOCDrawing()).
+ Call this method at the start of an enumeration or drawing
+ operation that uses a given context.
+
+ <p>The OCMD stack contains optional-content membership dictionary
+ objects. The OCMD stack methods and the various methods
+ that test visibility (such as PDAnnotIsCurrentlyVisible())
+ work together as content is being enumerated or drawn to
+ determine whether particular graphical elements are visible
+ or not. Visibility is based on the context's collection
+ of <code>ON-OFF</code> states for optional-content groups, the context's
+ current settings for NonOCDrawing and PDOCDrawEnumType,
+ and the state of the OCMD stack. </p>
+
+ <p>Any custom drawing or enumerating code that needs to keep
+ track of visibility of content must make a private copy
+ of the PDOCContext if that context could be accessed by
+ some other client, in order to avoid conflicting state changes.
+ In particular, you must copy the document's default context
+ (as returned by PDDocGetOCContext()). To enforce this, this
+ reset method does nothing when given a document's default
+ context. Similarly, the push and pop stack operations raise
+ an error for the default context. </p>
+
+ <p>If you are using the PD-level draw and enumeration methods,
+ you do not need to copy the context or explicitly call the
+ OCMD stack methods, as the PD-level methods do this internally. </p>
+
+ <p>Clients of PDFEdit and other libraries that enumerate contents
+ need to use these three methods when traversing the PDEContent
+ structure. When entering a new PDEContent, call PDOCContextPushOCMD()
+ (passing an OCMD object or <code>NULL</code>). Upon finishing the traversal,
+ call PDOCContextPopOCMD(). </p>
+
+ @param pdOCContext The context for which to reset the OCMD
+ stack.
+ @see PDOCContextPopOCMD
+ @see PDOCContextPushOCMD
+ @see PDOCContextContentIsVisible
+ @see PDOCContextXObjectIsVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextResetOCMDStack, (PDOCContext pdOCContext) )
+
+/**
+ Pushes a new optional-content membership dictionary (OCMD)
+ onto the stack for an optional-content context.
+
+ <p>The stack is used to track nesting of optional-content states
+ as contents are enumerated or drawn. Call this method when
+ entering the BDC for optional content or beginning to process
+ a form or annotation that has a OC entry. Call PDOCContextPopOCMD()
+ when encountering an EMC, or finishing the processing of
+ a form or annotation appearance. </p>
+
+ <p>To make it easier to track nested content that is not for
+ optional content, pass <code>NULL</code> for pdOCMD when encountering
+ BMC, patterns, and charprocs. Also pass <code>NULL</code> for a BDC with
+ no optional content or for forms or annotations that do
+ not have an OC entry. When finished processing any of these
+ objects, you can call PDOCContextPopOCMD() without worrying
+ about whether the content was optional. </p>
+
+ @param pdOCContext The context containing the OCMD stack.
+
+ @param pdOCMD The OCMD to push onto the stack.
+ @see PDOCContextPopOCMD
+ @see PDOCContextResetOCMDStack
+ @see PDOCContextContentIsVisible
+ @see PDOCContextXObjectIsVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextPushOCMD, (PDOCContext pdOCContext, PDOCMD pdOCMD) )
+
+/**
+ Pops the optional-content membership dictionary (OCMD) stack
+ for an optional-content context. The stack is used to track
+ nesting of optional-content states as contents are enumerated
+ or drawn:
+
+ <ul>
+ <li>Call the PDOCContextPushOCMD() method when entering BDC
+ for optional content or beginning to process a form or annotation
+ that has a OC entry. </li>
+ <li>Call this method to pop the stack when encountering EMC,
+ or finishing the processing of a form or annotation appearance. </li>
+ </ul>
+
+ <p>To track nested content that is not for optional content,
+ pass in <code>NULL</code> for pdOCMD when pushing the OCMD stack for
+ BMC, patterns, and charprocs, for BDC with no optional content,
+ or for forms or annotations that do not have an OC entry.
+ When finished processing any of these objects, you can call
+ PDOCContextPopOCMD() without worrying about whether the content
+ was optional. </p>
+
+ @param ocContext The context for which to pop the OCMD
+ stack.
+ @see PDOCContextPushOCMD
+ @see PDOCContextResetOCMDStack
+ @see PDOCContextContentIsVisible
+ @see PDOCContextXObjectIsVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextPopOCMD, (PDOCContext ocContext) )
+
+/**
+ Tests whether content is visible in the optional-content
+ context. The method considers the context's current OCMD
+ stack, the group <code>ON-OFF</code> states, the non-OC drawing status,
+ the drawing and enumeration type, and the intent.
+
+ <p>Use this method in conjunction with the OCMD stack methods. </p>
+
+ @param ocContext The context for which the visibility
+ state is desired.
+ @return <code>true</code> if the content is visible, <code>false</code> otherwise.
+
+ @see PDOCContextPopOCMD
+ @see PDOCContextPushOCMD
+ @see PDOCContextResetOCMDStack
+ @see PDOCContextXObjectIsVisible
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCContextContentIsVisible, (PDOCContext ocContext) )
+
+/**
+ Tests whether an XObject form or image contained in <code>obj</code>
+ is visible in the optional-content context. The method considers
+ the context's current OCMD stack, optional-content group
+ <code>ON-OFF</code> states, the non-OC drawing status, the drawing and
+ enumeration type, the intent, and the specific OCG.
+
+ <p>Use this method in conjunction with the OCMD stack methods. </p>
+
+ @param pdOCContext The context for which to test visibility.
+
+ @param obj The external object.
+ @return <code>true</code> if the external object is visible, <code>false</code> otherwise.
+
+ @see PDOCContextContentIsVisible
+ @see PDOCContextPopOCMD
+ @see PDOCContextPushOCMD
+ @see PDOCContextResetOCMDStack
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCContextXObjectIsVisible, (PDOCContext pdOCContext, CosObj obj) )
+
+/**
+ Creates a new optional-content configuration object.
+ @param pdDoc The document in which the configuration is
+ used.
+ @return The newly created configuration object.
+ @see PDOCConfigDestroy
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCConfig, PDOCConfigCreate, (PDDoc pdDoc) )
+
+/**
+ Removes an optional-content configuration object and destroys
+ the Cos objects associated with it. If you pass this method
+ the document's default configuration object (as returned
+ by PDDocGetOCConfig()), nothing happens.
+ @param pdOCCfg The configuration to destroy.
+ @see PDOCConfigCreate
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigDestroy, (PDOCConfig pdOCCfg) )
+
+/**
+ Gets the built-in default optional-content configuration
+ for the document from the OCProperties D entry.
+ @param pdDoc The document whose configuration is obtained.
+ @return The document's current optional-content configuration.
+ @see PDDocGetOCContext
+ @see PDDocGetOCGs
+ @see PDDocEnumOCGs
+ @see PDDocEnumOCConfigs
+ @see PDOCConfigGetPDDoc
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCConfig, PDDocGetOCConfig, (PDDoc pdDoc) )
+
+/**
+ Gets the document to which the optional-content configuration
+ belongs.
+ @param pdOCCfg The configuration for which a document
+ is desired.
+ @return The document object.
+ @see PDDocGetOCConfig
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDDoc, PDOCConfigGetPDDoc, (PDOCConfig pdOCCfg) )
+
+/**
+ Gets the Cos object associated with the optional-content
+ configuration.
+ @param pdOCCfg The configuration for which a CosObj representation
+ is desired.
+ @return A CosObj representation of pdOCCfg.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( CosObj, PDOCConfigGetCosObj, (PDOCConfig pdOCCfg) )
+
+/**
+ Sets the user interface display order of optional-content groups (OCGs)
+ in an optional-content configuration. This is the order
+ in which the group names are displayed in the Layers panel
+ of Acrobat 6.0 and later.
+ @param pdOCCfg The configuration for which a OCG is desired.
+
+ @param orderArray The Cos object containing the OCG order
+ array. For more information, see the <i>PDF Reference</i>. Pass
+ NULL to remove any existing order entry.
+ @see PDOCConfigGetOCGOrder
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigSetOCGOrder, (PDOCConfig pdOCCfg, CosObj orderArray) )
+
+/**
+ Gets the user interface display order of optional-content groups (OCGs)
+ in an optional-content configuration. This is the order
+ in which the group names are displayed in the Layers panel
+ of Acrobat 6.0 and later.
+ @param pdOCCfg The configuration for which an OCG display
+ order is desired.
+ @param orderObj (Filled by the method) A pointer to
+ the Cos object containing the OCG order array. For more
+ information, see the <i>PDF Reference</i>.
+ @return <code>true</code> if the order belongs directly to this configuration,
+ <code>false</code> if it is inherited from the document's default configuration.
+
+ @see PDOCConfigSetOCGOrder
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCConfigGetOCGOrder, (PDOCConfig pdOCCfg, CosObj *orderObj) )
+
+/**
+ Configures a mutually exclusive set of optional-content
+ groups in an optional-content configuration. The set behaves
+ like a radio button group, where only one OCG from the set
+ can be <code>ON</code> at a time. A client must enforce this in the user interface-level
+ code, not the PD-level code.
+ @param pdOCCfg The optional-content configuration.
+ @param ocgs A <code>NULL</code>-terminated array of optional-content
+ groups to be included in the group.
+ @see PDOCConfigGetAllRadioButtonGroups
+ @see PDOCConfigGetRadioButtonGroupForOCG
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigMakeRadioButtonGroup, (PDOCConfig pdOCCfg, PDOCG* ocgs) )
+
+/**
+ Returns an array of optional-content groups in the configuration
+ that contains the specified group, and is configured to
+ behave like a radio button group, where only one member
+ of the set can be <code>ON</code> at one time.
+ @param pdOCCfg The optional-content configuration.
+ @param ocg The optional-content group for which to obtain
+ the radio-button group.
+ @return A <code>NULL</code>-terminated array of PDOCG objects, or <code>NULL</code> if the
+ specified group does not belong to any radio button group.
+ The client is responsible for freeing the array using ASfree().
+
+ @see PDOCConfigGetAllRadioButtonGroups
+ @see PDOCConfigMakeRadioButtonGroup
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG*, PDOCConfigGetRadioButtonGroupForOCG, (PDOCConfig pdOCCfg, PDOCG ocg) )
+
+/**
+ Returns an array of pointers to sets of optional-content
+ groups in the configuration that are configured to be mutually
+ exclusive. A set behaves like a radio button group, where
+ only one member can be <code>ON</code> at one time.
+ @param pdOCCfg The configuration.
+ @return A <code>NULL</code>-terminated array of pointers to <code>NULL</code>-terminated arrays
+ of optional-content groups (OCGs). The client is responsible
+ for freeing all arrays using ASfree().
+ @see PDOCConfigGetRadioButtonGroupForOCG
+ @see PDOCConfigMakeRadioButtonGroup
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG**, PDOCConfigGetAllRadioButtonGroups, (PDOCConfig pdOCCfg) )
+
+/**
+ Sets the initial <code>ON-OFF</code> states of optional-content groups
+ to be saved in an optional-content configuration.
+ @param pdOCCfg The configuration for which to set the
+ initial state.
+ @param bs An existing PDOCConfigBaseState structure containing
+ the initialization information.
+ @param onOCGs A <code>NULL</code>-terminated array of optional-content
+ groups (OCGs) that have an initial state of <code>ON</code> when that
+ is not the base state, or <code>NULL</code>.
+ @param offOCGs A <code>NULL</code>-terminated array of OCGs that have
+ an initial state of <code>OFF</code> when that is not the base state,
+ or <code>NULL</code>.
+ @see PDOCConfigGetInitState
+ @see PDOCGSetInitialState
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigSetInitState, (PDOCConfig pdOCCfg, PDOCConfigBaseState bs, PDOCG* onOCGs, PDOCG* offOCGs) )
+
+/**
+ Gets the initial <code>ON-OFF</code> states of optional-content groups
+ in an optional-content configuration.
+
+ <p>The client is responsible for freeing storage for the arrays using ASfree(). </p>
+
+ @param pdOCCfg The configuration for which the initial
+ state is desired.
+ @param bs (Filled by the method) An existing PDOCConfigBaseState
+ structure in which to store the initialization information.
+
+ @param onOCGs (Filled by the method) A <code>NULL</code>-terminated
+ array of OCGs that have an initial state of <code>ON</code>, or <code>NULL</code>
+ if there are no such groups.
+ @param offOCGs (Filled by the method) A <code>NULL</code>-terminated
+ array of OCGs that have an initial state of <code>OFF</code>, or <code>NULL</code>
+ if there are no such groups.
+ @see PDOCConfigSetInitState
+ @see PDOCGGetInitialState
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigGetInitState, (PDOCConfig pdOCCfg, PDOCConfigBaseState *bs, PDOCG** onOCGs, PDOCG** offOCGs) )
+
+/**
+ Sets the name of an optional-content configuration. It stores
+ the specified string as the Name entry in the configuration's
+ Cos dictionary.
+ @param pdOCCfg The configuration for which to set the
+ name.
+ @param name The new name string.
+ @see PDOCConfigGetName
+ @see PDOCConfigSetCreator
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigSetName, (PDOCConfig pdOCCfg, ASConstText name) )
+
+/**
+ Gets the name of an optional-content configuration.
+ @param pdOCCfg The configuration for which a name is desired.
+ @return An ASText object containing the name string from Name entry
+ of the configuration's Cos dictionary, or <code>NULL</code> if there
+ is no Name entry. The client is responsible for freeing
+ the ASText object using ASTextDestroy().
+ @see PDOCConfigSetName
+ @see PDOCConfigGetCreator
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASText, PDOCConfigGetName, (PDOCConfig pdOCCfg) )
+
+/**
+ Sets the creator property of an optional-content configuration.
+ Stores the specified string as the Creator entry in the
+ configuration's Cos dictionary.
+ @param pdOCCfg The configuration for which to set a creator.
+
+ @param creator The new creator string.
+ @see PDOCConfigGetCreator
+ @see PDOCConfigSetName
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigSetCreator, (PDOCConfig pdOCCfg, ASConstText creator) )
+
+/**
+ Gets the creator property for an optional-content configuration.
+
+ @param pdOCCfg The configuration for which a creator is
+ desired.
+ @return An ASText object containing the creator string from the
+ Creator entry in the configuration's Cos dictionary, or
+ <code>NULL</code> if there is no such entry. The client is responsible
+ for freeing the ASText using ASTextDestroy().
+ @see PDOCConfigSetCreator
+ @see PDOCConfigGetName
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASText, PDOCConfigGetCreator, (PDOCConfig pdOCCfg) )
+
+/**
+ Sets the Intent entry in an optional-content configuration's
+ Cos dictionary. An intent is an ASAtom value broadly describing
+ the intended use, either <code>View</code> or <code>Design</code>.
+
+ <p>A group's content is considered to be optional (that is,
+ the group's state is considered in its visibility) if any
+ intent in its list matches an intent of the context. The
+ intent list of the context is usually set from the intent
+ list of the document configuration. </p>
+
+ <p>If the configuration has no Intent entry, the default value
+ of <code>View</code> is used. In this case, optional content is disabled
+ for contexts initialized with this configuration. </p>
+
+ @param pdOCCfg The configuration for which to set an intent.
+
+ @param intent The new Intent entry value, an array of
+ atoms terminated with ASAtomNull. To remove the Intent entry,
+ pass an array with only one element, ASAtom<code>NULL</code>.
+ @see PDOCConfigGetIntent
+ @see PDOCContextSetIntent
+ @see PDOCGSetIntent
+ @see PDOCGUsedInOCConfig
+ @see PDOCGUsedInOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCConfigSetIntent, (PDOCConfig pdOCCfg, ASAtom *intent) )
+
+/**
+ Gets the Intent entry for an optional-content configuration.
+ An intent is an ASAtom value broadly describing the intended
+ use, either <code>View</code> or <code>Design</code>. A group's content is considered
+ to be optional (that is, the group's state is considered
+ in its visibility) if any intent in its list matches an
+ intent of the context. The intent list of the context is
+ usually set from the intent list of the document configuration.
+
+ <p>The intent array contains entries (atoms) terminated by
+ ASAtomNull. </p>
+
+ <p>If the configuration has no Intent entry, the default value
+ of <code>View</code> is used. In this case, optional content is disabled
+ for contexts initialized with this configuration. </p>
+
+ @param pdOCCfg The configuration for which an intent list
+ is desired.
+ @return The ASAtomNull-terminated intent array. The client is responsible
+ for freeing it using ASfree().
+ @see PDOCConfigSetIntent
+ @see PDOCContextGetIntent
+ @see PDOCGGetIntent
+ @see PDOCGUsedInOCConfig
+ @see PDOCGUsedInOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASAtom*, PDOCConfigGetIntent, (PDOCConfig pdOCCfg) )
+
+/**
+ Enumerates the optional-content configurations for the document,
+ calling the supplied procedure for each one. These include
+ the configuration for the D configuration dictionary and
+ those for all entries in the Configs array dictionary.
+ @param pdDoc The document whose configurations are enumerated.
+
+ @param enumProc A user-supplied callback to call for each
+ configuration. Enumeration terminates if <code>enumProc</code> returns <code>false</code>.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @see PDDocGetOCConfig
+ @see PDDocEnumOCGs
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDDocEnumOCConfigs, (PDDoc pdDoc, PDOCConfigEnumProc enumProc, void *clientData) )
+
+/**
+ Determines whether the optional content feature is associated
+ with the document. The document is considered to have optional
+ content if there is an OCProperties dictionary in the document's
+ catalog, and that dictionary has one or more entries in
+ the OCGs array.
+ @param pdDoc The document whose OC status is obtained.
+ @return <code>true</code> if the document has optional content, <code>false</code> otherwise.
+
+ @see PDDocGetOCConfig
+ @see PDDocGetOCContext
+ @see PDDocGetOCGs
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDDocHasOC, (PDDoc pdDoc) )
+
+/**
+ Returns the number of optional-content groups associated
+ with a document, which is the number of unique entries in
+ the document's OCProperties OCGs array.
+ @param pdDoc The document whose groups are counted.
+ @return The number of OCGs for the document.
+ @see PDDocHasOC
+ @see PDDocGetOCGs
+ @see PDDocReplaceOCG
+ @see PDDocEnumOCGs
+ @see PDDocGetOCConfig
+ @see PDDocGetOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASUns32, PDDocGetNumOCGs, (PDDoc pdDoc) )
+
+/**
+ Gets the optional-content groups for the document. The order
+ of the groups is not guaranteed to be the creation order,
+ and is not the same as the display order (see PDOCConfigGetOCGOrder()).
+
+ @param pdDoc The document whose OCGs are obtained.
+ @return A <code>NULL</code>-terminated array of PDOCG objects. The client is
+ responsible for freeing the array using ASfree().
+ @see PDDocHasOC
+ @see PDDocReplaceOCG
+ @see PDDocEnumOCGs
+ @see PDDocGetNumOCGs
+ @see PDDocGetOCConfig
+ @see PDDocGetOCContext
+ @see PDOCGGetPDDoc
+ @see PDOCMDGetPDDoc
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( PDOCG*, PDDocGetOCGs, (PDDoc pdDoc) )
+
+/**
+ In the document associated with a specified optional-content
+ group, replaces that group with another group.
+ @param replaceOCG The OCG to replace.
+ @param keepOCG The replacement OCG.
+ @see PDDocHasOC
+ @see PDDocGetOCGs
+ @see PDDocEnumOCGs
+ @see PDDocGetNumOCGs
+ @see PDDocGetOCConfig
+ @see PDDocGetOCContext
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDDocReplaceOCG, (PDOCG replaceOCG, PDOCG keepOCG) )
+
+/**
+ Marks the optional-content group as having had its state
+ set directly by client code in the specified context (as
+ opposed to automatically by the optional-content AutoState
+ mechanism).
+
+ <p>When a group is so marked, automatic state changes caused
+ by the <code>View</code> event are prevented. When a group's automatic
+ state change is caused by the <code>Export</code> or <code>Print</code> event, the
+ user-override setting for the group is ignored. </p>
+
+ <p>A configuration's AS array defines how usage entries are
+ used to automatically manipulate the OCG states. It associates
+ an event (<code>View</code>, <code>Print</code>, or <code>Export</code>) with a list of OCGs and
+ a category, or list of usage keys identifying OCG usage
+ dictionary entries. See the <i>PDF Reference</i>, and the <b>OCTextAutoStateSnip</b>
+ example in the Snippet Runner. </p>
+
+ @param ocg The optional-content group object.
+ @param ctx The context for which the group is marked.
+
+ @param overridden <code>true</code> to mark the group as having had
+ its state set manually, <code>false</code> to clear the mark.
+ @see PDOCGGetUserOverride
+ @see PDOCContextClearAllUserOverrides
+ @see PDOCContextFindAutoStateChanges
+ @see PDOCContextApplyAutoStateChanges
+ @see PDOCContextMakeCopyWithAutoStateChanges
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCGSetUserOverride, (PDOCG ocg, PDOCContext ctx, ASBool overridden) )
+
+/**
+ Tests whether the optional-content group is marked as having
+ had its state set directly by client code in the specified
+ context (as opposed to automatically by the optional-content
+ AutoState mechanism).
+
+ <p>When a group is so marked, automatic state changes caused
+ by the <code>View</code> event are prevented. When a group's automatic
+ state change is caused by the <code>Export</code> or <code>Print</code> event, the
+ user-override setting for the group is ignored. </p>
+
+ <p>A configuration's AS array defines how usage entries are
+ used to automatically manipulate the OCG states. It associates
+ an event (<code>View</code>, <code>Print</code>, or <code>Export</code>) with a list of OCGs and
+ a category, or list of usage keys identifying OCG usage
+ dictionary entries. See the <i>PDF Reference</i>, and the <b>OCTextAutoStateSnip</b>
+ example in the Snippet Runner. </p>
+
+ @param ocg The optional-content group object.
+ @param ctx The context for which the group is tested.
+ @return <code>true</code> if the group is marked as being overridden in the context,
+ <code>false</code> otherwise.
+ @see PDOCGSetUserOverride
+ @see PDOCContextClearAllUserOverrides
+ @see PDOCContextFindAutoStateChanges
+ @see PDOCContextApplyAutoStateChanges
+ @see PDOCContextMakeCopyWithAutoStateChanges
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDOCGGetUserOverride, (PDOCG ocg, PDOCContext ctx) )
+
+/**
+ Removes usage override marks in all optional-content groups
+ in the given context.
+
+ <p>When an optional-content group is marked as having had its
+ state set explicitly in a specified context, automatic state
+ changes caused by the <code>View</code> event are prevented. When a group's
+ automatic state change is caused by the <code>Export</code> or <code>Print</code>
+ event, the user-override setting for the group is ignored. </p>
+
+ <p>A configuration's AS array defines how usage entries are
+ used to automatically manipulate the OCG states. It associates
+ an event (<code>View</code>, <code>Print</code>, or <code>Export</code>) with a list of OCGs and
+ a category, or list of usage keys identifying OCG usage
+ dictionary entries. See the <i>PDF Reference</i>, and the <b>OCTextAutoStateSnip</b>
+ example in the Snippet Runner. </p>
+
+ @param ctx The context for which the user override marks
+ are removed.
+ @see PDOCGGetUserOverride
+ @see PDOCGSetUserOverride
+ @see PDOCContextApplyAutoStateChanges
+ @see PDOCContextFindAutoStateChanges
+ @see PDOCContextMakeCopyWithAutoStateChanges
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDOCContextClearAllUserOverrides, (PDOCContext ctx) )
+
+/**
+ Replaces the page's contents with a version that has no
+ optional content, containing only what was visible on the
+ page when the call was made.
+ @param pdPage The page to be modified.
+ @param context The optional-content context in which content
+ is checked for visibility.
+ @return <code>true</code> if the operation is successful, <code>false</code> otherwise.
+ @see PDDocFlattenOC
+ @see PDEContentFlattenOC
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDPageFlattenOC, (PDPage pdPage, PDOCContext context) )
+
+/**
+ Replaces the contents of every page in the document with
+ a version that has no optional content, containing only
+ what was visible on the page when the call was made, and
+ removes all other optional-content information.
+ @param pdDoc The document to be modified.
+ @param context The optional-content context in which content
+ is checked for visibility.
+ @return <code>true</code> if the operation is successful, <code>false</code> otherwise.
+ @see PDPageFlattenOC
+ @see PDEContentFlattenOC
+*/
+NPROC( ASBool, PDDocFlattenOC, (PDDoc pdDoc, PDOCContext context) )
+
+/* END Optional Content API calls */
+
+/* BEGIN Extensible PD Draw / Enum calls */
+
+/**
+ Provides control over the rendering of contents on the page,
+ including both those parameters you would pass to PDPageDrawContentsToWindowEx(),
+ and an optional-content context that determines which contents
+ are visible.
+ @param page The page to draw.
+ @param params The parameters with which to draw the page,
+ including the optional-content context to use for content
+ visibility.
+ @exception pdPErrUnableToCreateRasterPort
+ @see PDPageDrawContentsToWindow
+ @see PDPageDrawContentsToWindowEx
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDPageDrawContentsWithParams, (PDPage page, PDDrawParams params) )
+
+/**
+ Provides control over the rendering of contents, including
+ both those parameters you would pass to PDDrawCosObjWithParams(),
+ and an optional-content context that determines which contents
+ are visible.
+ @param cosObj The object to draw.
+ @param params The parameters with which to draw the object,
+ including the optional-content context to use for content
+ visibility.
+ @exception pdPErrUnableToCreateRasterPort
+ @see PDDrawCosObjToWindow
+ @see PDPageEnumContents
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDDrawCosObjWithParams, (CosObj cosObj, PDDrawParams params) )
+
+/**
+ Enumerates a form's drawing operations for those contents
+ that are visible in a given optional-content context. The
+ parameters include both the monitor and data you would pass
+ to PDFormEnumPaintProc(), and an optional-content context
+ that determines which contents are visible.
+ @param obj The form whose drawing operations are enumerated.
+
+ @param params The parameters, including the optional-content
+ context to use for content visibility.
+ @exception pdPErrUnableToCreateRasterPort
+ @see PDFormEnumPaintProc
+ @see PDCharProcEnumWithParams
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDFormEnumPaintProcWithParams, (PDXObject obj, PDGraphicEnumParams params) )
+
+/**
+ Enumerates the graphic description of a single character
+ procedure for a Type 3 font, for those contents that are
+ visible in a given optional-content context. The parameters
+ include both the monitor and data you would pass to PDCharProcEnum(),
+ and an optional-content context that determines which contents
+ are visible.
+ @param obj The character procedure whose graphic
+ descriptions are enumerated.
+ @param params The parameters, including the optional-content
+ context to use for content visibility.
+ @exception pdPErrUnableToCreateRasterPort
+ @see PDCharProcEnum
+ @see PDFormEnumPaintProcWithParams
+ @see PDPageEnumContents
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDCharProcEnumWithParams, (PDCharProc obj, PDGraphicEnumParams params) )
+/* END Extensible PD Draw / Enum calls */
+
+
+/**
+ Finds all words on the specified page that are visible in
+ the given optional-content context and returns one or more
+ tables containing the words. One table contains the words
+ sorted in the order in which they appear in the PDF file,
+ while the other contains the words sorted by their x- and
+ y-coordinates on the page.
+
+ <p>The list contains only words that are visible in the given
+ context. If the word states change in the given context,
+ the word list will have to be released and re-acquired to
+ reflect the changed set of visible words. </p>
+
+ <p>There can be only one word list in existence at a time;
+ clients must release the previous word list, using PDWordFinderReleaseWordList(),
+ before creating a new one. </p>
+
+ <p>Use PDWordFinderEnumWords() instead of this method if you
+ wish to find one word at a time instead of obtaining a table
+ containing all visible words on a page. </p>
+
+ <p>This procedure is intended to replace the call to PDWordFinderAcquireWordList()
+ in most cases where you want to work only with the content
+ that is visible on screen (such as a text selection). Change
+ this call to update an application to work with the Optional
+ Content feature. </p>
+
+ @param wObj The word finder (created using PDDocCreateWordFinder()
+ or PDDocCreateWordFinderUCS()) used to acquire the word list.
+
+ @param pgNum The page number for which words are found.
+ First page is <code>0</code>, not <code>1</code> as designated in Acrobat.
+ @param ocContext The context within which the words are
+ in a visible state. <code>NULL</code> is equivalent to passing <code>PDDocGetOCContext(pdDoc)</code>.
+ @param wInfoP (Filled by the method) A user-supplied PDWord
+ variable. Acrobat will fill this in to point to an Acrobat-allocated
+ array of PDWord objects, which should <i>never</i> be accessed directly.
+
+ <p>Access the acquired list through PDWordFinderGetNthWord().
+ The words are ordered in PDF order, which is the order in
+ which they appear in the PDF file's data. This is often,
+ but not always, the order in which a person would read the
+ words. Use PDWordFinderGetNthWord to traverse this array; you
+ cannot access this array directly. This array is always
+ filled, regardless of the flags used in the call to PDDocCreateWordFinder()
+ or PDDocCreateWordFinderUCS(). </p>
+
+ @param xySortTable (Filled by the method) Acrobat fills
+ in this user-supplied pointer to a pointer with the location
+ of an Acrobat-allocated array of PDWords, sorted in x-y
+ order, meaning that all words on the first <i>line</i>, from left
+ to right, followed by all words on the next line. This
+ array is only filled if the WXE_XY_SORT flag was set in
+ the call to PDDocCreateWordFinder() or PDDocCreateWordFinderUCS().
+ PDWordFinderReleaseWordList() <i>must</i> be called to release allocated
+ memory for this return or there will be a memory leak. As
+ long as this parameter is non-<code>NULL</code>, the array is always
+ filled regardless of the value of the rdFlags parameter
+ in PDDocCreateWordFinder().
+ @param rdOrderTable Currently unused. Pass <code>NULL</code> for its value.
+ @param numWords (Filled by the method) The number of visible
+ words found on the page.
+ @exception pdErrOpNotPermitted
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderReleaseWordList
+ @see PDWordFinderEnumWords
+ @see PDWordFinderGetNthWord
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDWordFinderAcquireVisibleWordList, ( PDWordFinder wObj, ASInt32 pgNum, PDOCContext ocContext, PDWord *wInfoP, PDWord **xySortTable, PDWord **rdOrderTable, ASInt32 *numWords))
+
+/**
+ Tests whether a word is visible in a given optional-content
+ context on a given page.
+ @param word The word to test.
+ @param pageNum The page number for which the word is tested.
+
+ @param ctx The context in which the word is tested, as
+ returned by <code>PDDocGetOCContext(pdDoc)</code>.
+ @return <code>true</code> if the word is visible in the given context,
+ <code>false</code> if it is hidden.
+ @see PDWordMakeVisible
+ @see PDWordFinderAcquireVisibleWordList
+ @see PDWordFinderEnumVisibleWords
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASBool, PDWordIsCurrentlyVisible, (PDWord word, ASInt32 pageNum, PDOCContext ctx))
+
+/**
+ Makes a word visible in a given optional-content context
+ on a given page.
+ @param word The word to test.
+ @param pageNum The page number for which the word is to
+ be made visible.
+ @param ctx The context in which the word is to be made
+ visible, as returned by <code>PDDocGetOCContext(pdDoc)</code>.
+ @return <code>true</code> if the word can be made visible in the given
+ context, <code>false</code> otherwise.
+ @see PDWordIsCurrentlyVisible
+ @see PDWordFinderAcquireVisibleWordList
+ @see PDWordFinderEnumVisibleWords
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASBool, PDWordMakeVisible, (PDWord word, ASInt32 pageNum, PDOCContext ctx))
+
+/**
+ Extracts visible words, one at a time, from the specified
+ page or the entire document. It calls a user-supplied procedure
+ once for each word found. If you wish to extract all text
+ from a page at once, use PDWordFinderAcquireWordList() instead
+ of this method.
+
+ <p>Only words that are visible in the given optional-content
+ context are enumerated. </p>
+
+ @param wObj A word finder object.
+ @param PageNum The page number from which to extract words.
+ Pass PDAllPages (see PDExpT.h) to sequentially process all
+ pages in the document.
+ @param ocContext The context within which the words are
+ in a visible state. <code>NULL</code> is equivalent to passing <code>PDDocGetOCContext(pdDoc)</code>.
+
+ @param wordProc A user-supplied callback to call once for
+ each word found. Enumeration halts if <code>wordProc</code> returns <code>false</code>.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>wordProc</code> each time it is called.
+ @return <code>true</code> if enumeration was successfully completed,
+ <code>false</code> if enumeration was terminated because <code>wordProc</code> returned
+ <code>false</code>.
+ @exception genErrBadParm is raised if <code>wordProc</code> is <code>NULL</code>, or <code>pageNum</code> is
+ less than zero or greater than the total number of pages in the document.
+ @exception pdErrOpNotPermitted
+ @see PDDocCreateWordFinder
+ @see PDDocCreateWordFinderUCS
+ @see PDDocGetWordFinder
+ @see PDWordFinderAcquireWordList
+ @see PDWordFinderEnumWords
+ @see PDWordFinderEnumWordsStr
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASBool, PDWordFinderEnumVisibleWords, ( PDWordFinder wObj, ASInt32 PageNum, PDOCContext ocContext, PDWordProc wordProc, void *clientData ))
+
+/**
+ Gets the bounding box for a given page for those contents that are
+ visible in the given optional-content context. The bounding box is
+ the rectangle that encloses the visible text, graphics, and images
+ on the page.
+ @param page The page whose visible-content bounding box is obtained.
+ @param ocContext The context within which the contents are visible.
+ @param includeAnnots When <code>true</code>, include annotations as content that
+ must be visible to affect the bounding box. When <code>false</code>, annotations
+ are not considered at all.
+ @param fr (Filled by the method) A pointer to a rectangle specifying the
+ page's visible content bounding box, specified in user space coordinates.
+ The client must not pass <code>NULL</code>.
+ @see PDPageGetBBox
+ @since PI_PDMODEL_VERSION >= 0x00060002
+*/
+NPROC(void, PDPageGetVisibleBBox, (PDPage page, PDOCContext ocContext, ASBool includeAnnots, ASFixedRect *fr))
+
+/* BEGIN Crypt filter support */
+
+/**
+ Sets or resets the specified document's security filter
+ method, used for encryption and decryption of the document's
+ data.
+ @param doc The document whose new security filter method
+ is set.
+ @param filterName The ASAtom corresponding to the name of
+ the security filter to use.
+ @param method One of five supported security methods:
+ <ul>
+ <li>None (default)</li>
+ <li>V2 (RC4)</li>
+ <li>V3 (RC4)</li>
+ <li>AESV1</li>
+ <li>AESV2 (128 bit)</li>
+ <li>AESV3 (256 bit)</li>
+ </ul>
+ @exception pdErrNoCryptHandler is raised if there is no security handler
+ registered for the document.
+ @see PDCryptAuthorizeFilterAccess
+ @see PDDocSetNewCryptFilterData
+ @see PDDocSetNewDefaultFilters
+
+ @product_exclude RDR
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDDocSetNewCryptFilterMethod, (PDDoc doc, ASAtom filterName, ASAtom method) )
+
+/**
+ Sets the encrypted data for the specified document's encryption
+ filter to decrypt. Call this before accessing the stream to be
+ decrypted.
+ @param doc The document whose new encrypted data is set.
+
+ @param filterName The ASAtom corresponding to the name
+ of the security filter used by the document.
+ @param cryptData The new encrypted data for the document.
+
+ @param cryptDataLen The length of <code>cryptData</code> in bytes.
+ @exception pdErrNoCryptHandler is raised if there is no security handler
+ registered for the document.
+ @exception pdErrOpNotPermitted is raised if the document's permissions
+ do not allow its data to be modified.
+ @see PDCryptAuthorizeFilterAccess
+ @see PDDocSetNewCryptFilterMethod
+ @see PDDocSetNewDefaultFilters
+
+ @product_exclude RDR
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDDocSetNewCryptFilterData, (PDDoc doc, ASAtom filterName, char *cryptData, ASInt32 cryptDataLen) )
+
+/**
+ Sets or resets the document's default security filter methods
+ for streams and strings, used to encrypt and decrypt the
+ document's data. This method is only valid with version
+ 4 algorithms (/V 4 in the Encrypt dictionary).
+ @param doc The document whose new security filter is set.
+
+ @param defaultStmFilterName The ASAtom corresponding to
+ the name of the default security filter to use for streams.
+ The filter must exist and be registered.
+ @param defaultStrFilterName The ASAtom corresponding to
+ the name of the default security filter to use for strings.
+ The filter must exist and be registered.
+ @exception pdErrNoCryptHandler is raised if there is no security handler
+ registered for the document.
+ @see PDCryptAuthorizeFilterAccess
+ @see PDDocSetNewCryptFilterData
+ @see PDDocSetNewCryptFilterMethod
+ @product_exclude RDR
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( void, PDDocSetNewDefaultFilters, (PDDoc doc, ASAtom defaultStmFilterName, ASAtom defaultStrFilterName) )
+
+/**
+ Gets authorization to encrypt or decrypt an embedded file,
+ where that file's cryptographic filter is not the one used
+ to open the document in which the file is embedded.
+ @param doc The document containing the embedded file whose
+ filter access is requested.
+ @param handlerName The security handler containing the
+ Authorize() callback procedure to run.
+ @param filterName The ASAtom corresponding to the name
+ of the security filter used by the embedded file.
+ @param bEncrypt When <code>true</code>, the access is required for
+ an encryption operation. When <code>false</code>, it is a decryption
+ operation.
+ @return <code>true</code> if the authorization succeeds, <code>false</code> otherwise.
+ @exception pdErrNoCryptHandler is raised if there is no security handler
+ registered for the document.
+ @see PDDocSetNewCryptFilterData
+ @see PDDocSetNewCryptFilterMethod
+ @see PDDocSetNewDefaultFilters
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC( ASBool, PDCryptAuthorizeFilterAccess, (PDDoc doc, ASAtom handlerName, ASAtom filterName, ASBool bEncrypt) )
+
+/* END Crypt Filter support */
+
+/* BEGIN PDDocRequestXX support */
+
+/**
+ Requests <code>nPages</code> starting at <code>startPage</code>, and performs a specified
+ procedure on them.
+ @param doc The document for which pages are read ahead.
+
+ @param startPage The first page requested.
+ @param nPages The number of pages requested.
+ @param requestProc The procedure to call to process the
+ request.
+ @param clientData A pointer to user-defined data to pass
+ to the <code>requestProc</code>.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDDocRequestPages,(PDDoc doc, ASInt32 startPage, ASInt32 nPages, PDDocRequestPagesProc requestProc, void * clientData))
+
+/**
+ Requests the document file and performs the specified procedure
+ on it.
+ @param doc The document for which pages are read ahead.
+ @param requestProc The procedure to call to process the
+ request.
+ @param clientData A pointer to user-defined data to pass
+ to the <code>requestProc</code>.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDDocRequestEntireFile, (PDDoc doc, PDDocRequestEntireFileProc requestProc, void * clientData))
+
+
+/* END PDDocRequestXX support */
+
+
+/**
+ For internal use only.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDSetHostEncoding, (void* encoding, char* parseTable))
+
+
+/**
+ Tests whether the data from an annotation on a given page
+ can be copied to a clipboard for pasting. This depends on
+ whether there is a PDAnnotHandler with copy and paste support
+ for the annotation, and whether copying is allowed by document
+ permissions.
+ @param sourcePage The page containing the annotation to
+ test. It can be <code>NULL</code> (as when copying annotations while spawning
+ a hidden template).
+ @param annot The annotation to test.
+ @return <code>true</code> if the annotation object can be copied, <code>false</code> otherwise.
+
+ @see PDAnnotCanPaste
+ @see PDAnnotCopy
+ @see PDAnnotDestroyClipboardData
+ @see PDAnnotPaste
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(ASBool, PDAnnotCanCopy, (PDPage sourcePage, PDAnnot annot))
+
+/**
+ Copies action object data to a clipboard structure, from
+ which it can be pasted.
+ @param sourcePage The page containing the annotation to
+ copy. It can be <code>NULL</code> (as when copying annotations while spawning
+ a hidden template).
+ @param annot The annotation to copy.
+ @return The annotation clipboard data object.
+ @see PDAnnotCanCopy
+ @see PDAnnotCanPaste
+ @see PDAnnotDestroyClipboardData
+ @see PDAnnotPaste
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(PDAnnotClipboardData, PDAnnotCopy, (PDPage sourcePage, PDAnnot annot))
+
+/**
+ 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.
+ @param destPage The page to which the annotation would
+ be pasted.
+ @param center The location for the center of the annotation
+ on the destination page, or a <code>NULL</code> pointer to center the
+ annotation on the destination page.
+ @param data The copied annotation data to test.
+ @return <code>true</code> if the annotation data can be pasted, <code>false</code> otherwise.
+
+ @see PDAnnotCanCopy
+ @see PDAnnotCopy
+ @see PDAnnotDestroyClipboardData
+ @see PDAnnotPaste
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(ASBool, PDAnnotCanPaste, (PDPage destPage, const ASFixedPoint *center, PDAnnotClipboardData data))
+
+/**
+ Pastes copied annotation data from a clipboard structure
+ to a new annotation object in a specified document. After
+ successfully pasting the data, use PDAnnotDestroyClipboardData()
+ to free the associated memory.
+ @param destPage The page to which the annotation is pasted.
+
+ @param center The location for the center of the annotation
+ on the destination page, or a <code>NULL</code> pointer to center the
+ annotation on the destination page.
+ @param data The copied annotation data to paste.
+ @return A newly created annotation object associated with the specified
+ document, containing the same data as the copied annotation.
+
+ @see PDAnnotCanCopy
+ @see PDAnnotCanPaste
+ @see PDAnnotCopy
+ @see PDAnnotDestroyClipboardData
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(PDAnnot, PDAnnotPaste, (PDPage destPage, const ASFixedPoint *center, PDAnnotClipboardData data))
+
+/**
+ Destroys data that has been copied from an annotation object
+ into a clipboard. Use this method after successfully pasting
+ the data to a new document.
+ @param data The clipboard annotation data to destroy.
+ @see PDAnnotCanCopy
+ @see PDAnnotCanPaste
+ @see PDAnnotCopy
+ @see PDAnnotPaste
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(void, PDAnnotDestroyClipboardData, (PDAnnotClipboardData data))
+
+
+/**
+ Used for page-at-a-time downloading and byte-serving Acrobat
+ data. If a document is being viewed over a slow file system,
+ the method issues a byte range request for all the data
+ associated with an embedded file.
+ @param doc The document being read.
+ @param embeddedFileObj The Cos object of the embedded
+ file stream (the stream referenced by entries in the EF
+ dictionary).
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDDocReadAheadEmbeddedFile, (PDDoc doc, CosObj embeddedFileObj))
+
+
+/**
+ Extends PDDocSetNewCryptHandler() for Acrobat 6.0. It sets the specified
+ document's new security handler (that is, the security handler
+ that will be used after the document is saved). This method
+ should be called when the current document's security handler
+ requires authorization data to validate permission to change
+ security handlers.
+
+ <p>This method returns with no action if the new security handler
+ is the same as the old one. Otherwise, the new security
+ handler's PDCryptNewSecurityDataProc() is called to set the
+ document's <code>newSecurityData</code> field. If the new security handler
+ does not have this callback, the document's <code>newSecurityData</code>
+ field is set to <code>0</code>. </p>
+
+ @param pdDoc The document whose new security handler is
+ set.
+ @param newCryptHandler The ASAtom corresponding to the
+ name of the new security handler to use for the document.
+ This name must be the same as the <code>pdfName</code> used when the
+ security handler was registered using PDRegisterCryptHandler().
+ Use ASAtomNull to remove security from the document.
+ @param currentAuthData A pointer to authorization data
+ to be passed to the PDCryptAuthorizeProc() callback for the
+ document's current security handler. For the Acrobat viewer's
+ built-in security handler, the password is passed in the
+ <code>authData</code> parameter.
+ @exception pdErrNoCryptHandler is raised if there is no security handler
+ registered with the specified name and the name is not ASAtomNull.
+ @exception pdErrOpNotPermitted is raised if the document's permissions
+ do not allow its security to be modified.
+ @see PDDocGetNewCryptHandler
+ @see PDDocPermRequest
+ @see PDDocSetNewCryptHandler
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+UNPROC(void, PDDocSetNewCryptHandlerEx, (PDDoc pdDoc, ASAtom newCryptHandler, void *currentAuthData))
+
+/**
+ Gets the value of the Trapped key in the Info dictionary.
+
+ @param pdDoc The document whose Trapped key value is obtained.
+ @return The value of the Trapped key in the Info dictionary if the
+ entry exists and is a name, or ASAtomNull if the entry does
+ not exist or is not a name.
+ @see PDDocSetTrapped
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+
+NPROC(ASAtom, PDDocGetTrapped, (PDDoc pdDoc))
+
+/**
+ Sets the value of the Trapped key in the Info dictionary
+ to the specified ASAtom.
+
+ <p>This method causes the corresponding XMP metadata item to
+ be set to a string reflecting the characters in the ASAtom. </p>
+
+ @param pdDoc The document whose Trapped key value to set.
+
+ @param newValue The new value of the Trapped key in the
+ Info dictionary, or ASAtomNull to remove any existing entry.
+ The method does not check that the value is one of the allowed
+ values for the key.
+ @see PDDocGetTrapped
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+
+UNPROC(void, PDDocSetTrapped, (PDDoc pdDoc, ASAtom newValue))
+
+
+/**
+ Supersedes PDDocGetLabelForPageNum() in Acrobat 6.0.
+
+ <p>Retrieves the label string associated with the given page
+ number. The page number is returned in host encoding as
+ a ASText object. </p>
+
+ @param pdDoc The document containing the page for which a
+ label is requested.
+ @param pageNum The number of the page whose label is requested.
+
+ @param text If a label exists for <code>pageNum</code>, it is returned
+ in this object.
+ @see PDDocFindPageNumForLabelEx
+ @see PDDocGetPageLabel
+ @see PDDocRemovePageLabel
+ @see PDDocSetPageLabel
+ @see PDPageLabelNew
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDDocGetLabelForPageNumEx, (
+ PDDoc pdDoc,
+ ASInt32 pageNum,
+ ASText text))
+
+/**
+ Supersedes PDDocFindPageNumForLabel in Acrobat 6.0.
+
+ <p>Finds the first page in the document with a specified label. </p>
+
+ @param pdDoc The document to search for the page named
+ in <code>labelStr</code>.
+ @param labelText The label of the page to find.
+ @return The page number of the first page with the specified label,
+ or <code>-1</code> if no such page exists.
+ @see PDDocGetLabelForPageNumEx
+ @see PDDocGetPageLabel
+ @see PDDocRemovePageLabel
+ @see PDDocSetPageLabel
+ @see PDPageLabelNew
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(ASInt32, PDDocFindPageNumForLabelEx, (
+ PDDoc pdDoc,
+ ASConstText labelText))
+
+/**
+ Fills in an ASText object with the font name, to be used
+ in displaying lists or menus.
+
+ <p>In PDF 1.5, the font name can be represented with a UTF8
+ byte sequence. In previous versions of Acrobat the name
+ could also be represented by host encodings such as Shift-
+ JIS, Big5, KSC, and so on. This routine tries to return
+ a text object that uses the correct script, but cannot always
+ do so. </p>
+
+ <p>The ASText object is owned by the caller. </p>
+
+ @param font The font whose name is obtained.
+ @param removePrefix Whether to remove the subset prefix,
+ if present. For example, when <code>true</code>, the name <code>"ABCDEF+Myriad"</code>
+ is returned as <code>"Myriad"</code>.
+ @param nameToFill (Filled by the method) The ASText object
+ for the font's name.
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+NPROC(void, PDFontGetASTextName, (PDFont font, ASBool removePrefix, ASText nameToFill))
+
+/**
+ Increments the page's reference count. After you are done using the page,
+ release it using PDPageRelease(). If PDPageRelease() is not called, it could
+ block the document containing the page from being closed. To avoid such
+ problems use the CSmartPDPage class as it ensures that the page is released
+ as it goes out of scope.
+ @param pdPage IN The page whose reference count is to be incremented.
+ @see CSmartPDPage
+ @see PDPageRelease
+ @since PI_PDMODEL_VERSION >= 0x0007000<code>0</code>.
+*/
+NPROC(void, PDPageAcquirePage, (PDPage pdPage))
+
+/**
+ Returns the locked state of an OCG in a given configuration.
+ The on/off state of a locked OCG cannot be toggled by the user through the user interface.
+ @param ocg IN The PDOCG whose locked state is requested.
+ @param pdOCCfg IN The optional-content configuration.
+ @return An ASBool that is <code>true</code> if the OCG is locked,
+ and <code>false</code> if it is unlocked.
+
+ @see PDOCGSetLocked
+ @see PDOCConfigGetLockedArray
+ @see PDOCConfigSetLockedArray
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(ASBool, PDOCGGetLocked, (PDOCG ocg, PDOCConfig pdOCCfg))
+
+/**
+ Sets the locked state of an OCG in a given configuration.
+ The on/off state of a locked OCG cannot be toggled by the user through the user interface.
+ @param ocg IN The PDOCG whose locked state is to be set.
+ @param pdOCCfg IN/OUT The optional-content configuration.
+ @param locked IN An ASBool that is <code>true</code> if the OCG should be locked,
+ and <code>false</code> if it should be unlocked.
+
+ @see PDOCGGetLocked
+ @see PDOCConfigGetLockedArray
+ @see PDOCConfigSetLockedArray
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(void, PDOCGSetLocked, (PDOCG ocg, PDOCConfig pdOCCfg, ASBool locked))
+
+/**
+ Returns a PDOCConfig object's list of locked OCGs.
+ The on/off state of a locked OCG cannot be toggled by the user through the user interface.
+ @param pdOCCfg The optional-content configuration.
+ @return A <code>NULL</code>-terminated array of PDOCG objects, or <code>NULL</code> if the
+ specified configuration does not contain a list of locked OCGs.
+ The client is responsible for freeing the array using ASfree().
+
+ @see PDOCConfigSetLockedArray
+ @see PDOCGGetLocked
+ @see PDOCGSetLocked
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(PDOCG*, PDOCConfigGetLockedArray, (PDOCConfig pdOCCfg))
+
+/**
+ Sets a PDOCConfig's list of locked OCGs.
+ The on/off state of a locked OCG cannot be toggled by the user through the user interface.
+ @param pdOCCfg The optional-content configuration.
+ @param lockedOCGs A <code>NULL</code>-terminated array of PDOCG objects to be used
+ as the locked OCGs for the specified configuration, or <code>NULL</code> if the
+ configuration should not contain a list of locked OCGs.
+
+ @see PDOCConfigGetLockedArray
+ @see PDOCGGetLocked
+ @see PDOCGSetLocked
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(void, PDOCConfigSetLockedArray, (PDOCConfig pdOCCfg, PDOCG* lockedOCGs))
+
+/**
+ Locates an existing optional-content membership dictionary
+ (PDOCMD) object that references the given groups, uses the
+ same visibility policy, and uses the same visibility expression.
+ If no such PDOCMD is found, the method creates one.
+
+ <p>The fourth parameter, <code>veObj</code> must be a CosNull object or a CosArray object.
+ If it is a CosNull object, this call is identical to PDOCMDFindOrCreate().
+ If it is an array object, it is used as the OCMD's visibility expression.</p>
+
+ @param pdDoc The PDDoc in which to create the PDOCMD.
+ @param ocgs A list of OCGs, or <code>NULL</code> if only a visibility expression is to be used.
+ @param policy The visibility policy to use. unused if <code>ocgs</code> is <code>NULL</code>.
+ @param veObj A CosObj containing a visibility expression.
+
+ @see PDOCMDFindOrCreate
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(PDOCMD, PDOCMDFindOrCreateEx, (PDDoc pdDoc, PDOCG *ocgs, PDOCMDVisPolicy policy, CosObj veObj))
+
+/**
+ If the PDOCMD has a visibility expression entry, the function returns <code>true</code>, and
+ if <code>veObj</code> is non-<code>NULL</code>, <code>*veObj</code> is set to the CosObj for the visibility expression.
+ If the PDOCMD does not have a visibility expression entry, the function returns <code>false</code>.
+
+ @param ocmd The PDOCMD in which to check for a visibility expression.
+ @param veObj The cos object in which to return the visibility expression.
+ @return <code>true</code> if there is a visibility expression, <code>false</code> otherwise.
+
+ @see PDOCMDFindOrCreateEx
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(ASBool, PDOCMDGetVisibilityExpression, (PDOCMD ocmd, CosObj *veObj))
+
+/**
+ Returns the UserUnit value for the page. If the key is
+ not present in the page dictionary the default of <code>1.0</code>
+ is returned.
+ @param page The page whose UserUnit value is being obtained.
+ @return The value of UserUnit from the page dictionary, or a default value of <code>1.0</code> if not present.
+*/
+NPROC(float, PDPageGetUserUnitSize, (PDPage page))
+
+/**
+ Set the UserUnit value for a page.
+ @param page The page whose UserUnit value is being set.
+ @param unitSize UserUnit value to be set for the page dictionary. The default value is <code>1.0</code>.
+ @exception genErrBadParm is raised if <code>unitSize <= 0.0</code> .
+*/
+NPROC(void, PDPageSetUserUnitSize, (PDPage page, float unitSize))
+
+/**
+ <p>PDDocPermRequestNoUB() indicates whether the permission would have been granted had the document not been Rights Enabled.</p>
+
+ <p>This may throw numerous exceptions.</p>
+
+ @param pdDoc The PDDoc whose permissions are being requested.
+
+ @param reqObj The target object of the permissions request.
+
+ @param reqOpr The target operation of the permissions
+ request.
+ @param authData A pointer to an authorization data structure.
+ @return The request status constant: <code>0</code> if the requested operation
+ is allowed, a non-zero status code otherwise.
+ @see PDDocPermRequest
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(PDPermReqStatus, PDDocPermRequestNoUB, (PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void *authData))
+
+/**
+ Enumerates the inks for a page, calling the supplied procedure
+ for each PDPageInk structure. This differs from PDPageEnumInks()
+ in that it allows the process color model to be passed in.
+
+ <p>For the DeviceCMYK_K process color model, it always finds the
+ four inks Cyan, Magenta, Yellow, and Black, which are marked
+ as process inks. The RGB values in the PDPageInk structure
+ are the RGB equivalents (in system monitor space) of 100%
+ of the ink, which can be used to show color swatches for
+ a given ink. </p>
+
+ <p>If the inks are part of a DeviceN color space which has not
+ been defined in a Colorants dictionary or elsewhere in a
+ Separation color space, the color of the swatch is undefined. </p>
+
+ <p>This call finds all color spaces that are in a color space
+ dictionary within the page, even if they are not used by
+ the page contents. </p>
+
+ @param pdPage The page whose contents are enumerated.
+ @param proc The user-supplied callback procedure to be
+ applied to each ink. Enumeration ends if any procedure returns
+ <code>false</code>.
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @param includeOPI If <code>true</code>, enumerate inks contained in OPI dictionaries.
+ @param colorModel <code>CMYK_K</code>, <code>RGB_K</code>, or <code>Gray_K</code>.
+ @see PDPageMakeSeparations
+ @see AVPageViewGetNumVisibleInks
+ @see AVPageViewGetVisibleInks
+ @see AVPageViewGetPixelInformationAtPoint
+ @see AVPageViewSetInkPreview
+ @see AVPageViewSetVisibleInks
+ @ingroup Enumerators
+ @since PI_PDMODEL_VERSION >= 0x00060000
+*/
+
+NPROC(void, PDPageEnumInksEx, ( PDPage pdPage, PDPageEnumInksCallback proc, void *clientData, ASBool includeOPI, ASAtom colorModel ))
+
+/**
+Adds a PDPage as a watermark to a page range in the given document.
+ @param pdDoc The document onto which the watermark will be added.
+ @param pdPage The page to be added as a watermark.
+ @param pParams Structure specifying how the watermark should be added to the document.
+*/
+XNPROC(void, PDDocAddWatermarkFromPDPage, (PDDoc pdDoc, PDPage pdPage, PDDocAddWatermarkParamsRec *pParams))
+
+/**
+Adds a text-based watermark to a page range in the given document.
+ @param pdDoc The document onto which the watermark will be added.
+ @param pTextParams Structure describing the text-based watermark to be added.
+ @param pParams Structure specifying how the watermark should be added to the document.
+*/
+XNPROC(void, PDDocAddWatermarkFromText, (PDDoc pdDoc, PDDocWatermarkTextParamsRec *pTextParams, PDDocAddWatermarkParamsRec *pParams))
+
+/**
+ Sets the value of the PageLayout key in the Catalog dictionary.
+
+ @param doc IN The document whose page mode is set.
+ @param mode IN The layout mode to set.
+ @see PDDocGetLayoutMode
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+UNPROC(void, PDDocSetLayoutMode, (PDDoc doc, PDLayoutMode mode))
+
+/**
+ Gets the value of the PageLayout key in the Catalog dictionary.
+
+ @param doc IN The document whose layout mode is obtained.
+ @return Layout mode value from the PDF Catalog dictionary.
+ @see PDDocSetLayoutMode
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(PDLayoutMode, PDDocGetLayoutMode, (PDDoc doc))
+
+
+/**
+ Gets the specified document's current security handler (that
+ is, the security handler that was used to open the document).
+
+ @param doc The document whose new security handler is
+ obtained.
+ @return The ASAtom corresponding to the name of the document's
+ security handler. It returns ASAtomNull if the document does not have
+ a current security handler.
+ @see PDDocPermRequest
+ @see PDDocGetSecurityData
+ @see PDDocSetNewCryptHandler
+ @see PDDocSetNewCryptHandlerEx
+ @see PDRegisterCryptHandler
+ @see PDRegisterCryptHandlerEx
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(ASAtom, PDDocGetCryptHandler, (PDDoc doc))
+
+/**
+ Creates a new file specification from the specified ASPathName,
+ using the PDFileSpecNewFromASPathProc() of the specified file
+ system's file specification handler.
+ @param pdDoc The document in which the new file specification
+ will be used.
+ @param fileSys A pointer to an ASFileSysRec specifying the
+ file system responsible for the newly created file specification.
+ @param path The path to convert into a file specification.
+ @param relPathFileSys The file system that owns <code>relativeToThisPath</code>.
+ @param relativeToThisPath A path name relative to which
+ the <code>fileSpec</code> is interpreted. If it is <code>NULL</code>, <code>fileSpec</code> is assumed
+ to be an absolute, not a relative, path. If it is not <code>NULL</code>
+ and <code>fileSys</code> and <code>relPathFileSys</code> are not the same, then an attempt
+ is made to fabricate a <code>relPathName</code> in terms of <code>fileSys</code>, and if that is
+ not possible, <code>NULL</code> is used.
+ @return The newly created file specification, or an invalid file specification if
+ the ASPathName cannot be converted to a PDFileSpec (use
+ PDFileSpecIsValid() to test whether the conversion was successful).
+
+ @see PDFileSpecIsValid
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+UNPROC(PDFileSpec, PDFileSpecNewFromASPathEx, (PDDoc pdDoc, ASFileSys fileSys, ASPathName path, ASFileSys relPathFileSys, ASPathName relativeToThisPath))
+
+/**
+ Acquires an ASPathName for the specified file specification
+ and relative path.
+ @param fileSpec IN/OUT The file specification for which an ASPathName
+ is acquired.
+ @param relPathFileSys The file system that owns <code>relativeToThisPath</code>.
+ @param relativeToThisPath IN/OUT A path name relative to which
+ the <code>fileSpec</code> is interpreted. If it is <code>NULL</code>, <code>fileSpec</code> is assumed
+ to be an absolute, not a relative, path. If it is not <code>NULL</code>
+ and <code>fileSys</code> and <code>relPathFileSys</code> are not the same, then an attempt
+ is made to fabricate a <code>relPathName</code> in terms of <code>fileSys</code>, and if that is
+ not possible, <code>NULL</code> is used.
+ @param retFileSys IN/OUT The file system that owns the returned ASPathName.
+ @param pathMustExist IN/OUT If it is <code>true</code> and the result
+ ASPathName does not exist, then the return value is <code>NULL</code>.
+ @return The ASPathName corresponding to <code>fileSpec</code>.
+
+ <p>After you are done using the ASPathName, you must free it
+ using ASFileSysReleasePath(). </p>
+
+ @see ASFileSysReleasePath
+ @since PI_PDMODEL_VERSION >= 0x00080000
+
+*/
+NPROC(ASPathName, PDFileSpecAcquireASPathEx, (PDFileSpec fileSpec, ASFileSys relPathFileSys, ASPathName relativeToThisPath, ASFileSys* retFileSys, ASBool pathMustExist))
+
+/**
+ Gets the device-independent path name from a file specification.
+
+ @param fileSpec IN The file specification whose device-independent
+ path name is obtained.
+ @param diPath IN/OUT An existing ASText object whose content is set to the path name
+ obtained from from <code>fileSpec</code>.
+
+ @since PI_PDMODEL_VERSION >= 0x00080000
+
+*/
+NPROC(void, PDFileSpecGetDIPathEx, (PDFileSpec fileSpec, ASText diPath))
+
+
+/**
+ Gets an annotation's label text as an ASText object.
+
+ @param anAnnot The annotation whose label is obtained.
+ @param title (Filled by the method) The text object containing
+ the annotation's label string. The client must pass a
+ valid ASText object title. The routine does not allocate it.
+
+ @exception pdErrBadAnnotation
+ @see PDAnnotGetTitle
+ @see PDAnnotSetTitleASText
+ @see PDAnnotSetTitle
+ @see PDAnnotGetColor
+ @see PDAnnotGetDate
+ @see PDAnnotGetRect
+ @see PDAnnotGetFlags
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void, PDAnnotGetTitleASText, (PDAnnot anAnnot,ASText title))
+
+/**
+ Sets an annotation's label text.
+
+ @param anAnnot The annotation whose label is set.
+ @param title The text object containing the label to set.
+
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDAnnotSetTitle
+ @see PDAnnotGetTitleASText
+ @see PDAnnotGetTitle
+ @see PDAnnotSetColor
+ @see PDAnnotSetDate
+ @see PDAnnotSetFlags
+ @see PDAnnotSetRect
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void, PDAnnotSetTitleASText, (PDAnnot anAnnot, const ASText title))
+
+/**
+ Gets the text of a text annotation as an ASText object.
+
+ @param aTextAnnot The text annotation whose text is obtained.
+ @param contents (Filled by the method) The text object containing the contents.
+ The client must pass a valid ASText object title.
+ The routine does not allocate it.
+
+ @see PDTextAnnotGetContents
+ @see PDTextAnnotSetContentsASText
+ @see PDTextAnnotSetContents
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void, PDTextAnnotGetContentsASText, (PDTextAnnot aTextAnnot, ASText contents))
+
+/**
+ Sets the text of a text annotation.
+
+ @param aTextAnnot The text annotation whose text is set.
+ @param contents The text object containing the new text.
+
+ @notify PDAnnotWillChange
+ @notify PDAnnotDidChange
+ @see PDTextAnnotSetContents
+ @see PDTextAnnotGetContentsASText
+ @see PDTextAnnotGetContents
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void, PDTextAnnotSetContentsASText, (PDTextAnnot aTextAnnot, const ASText contents))
+
+/**
+ Gets the value of a key in a document's Info dictionary,
+ or the value of this same key in the XMP metadata, whichever
+ is latest as an ASText object.
+
+ @param doc The document whose Info dictionary key is obtained.
+ @param key The name of the Info dictionary key whose
+ value is obtained.
+ @param value (Filled by the method) The text object containing
+ the value associated with <code>key</code>. The client must pass a
+ valid ASText object value. The routine does not allocate it.
+
+ @see PDDocGetInfo
+ @see PDDocGetXAPMetadataProperty
+ @see PDDocSetInfoASText
+ @see PDDocSetInfo
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void,PDDocGetInfoASText, (PDDoc doc, const ASText key, ASText value))
+
+
+/**
+ Sets the value of a key in a document's Info dictionary.
+
+ @param doc The document whose Info dictionary key is set.
+ @param infoKey The name of the Info dictionary key whose
+ value is set.
+ @param value The text object containing the value to associate
+ with <code>infoKey</code>.
+
+ @see PDDocSetInfo
+ @see PDDocGetInfoASText
+ @see PDDocGetInfo
+ @see PDDocSetXAPMetadataProperty
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void,PDDocSetInfoAsASText, (PDDoc doc, const ASText infoKey, const ASText value))
+
+
+/**
+ Gets a bookmark's title as an ASText object.
+
+ @param aBookmark The bookmark whose title is obtained.
+ @param title (Filled by the method) The text object containing
+ the title. The client must pass a valid ASText
+ object title. The routine does not allocate it.
+
+ @see PDBookmarkGetTitle
+ @see PDBookmarkSetTitleASText
+ @see PDBookmarkSetTitle
+ @see PDXlateToHost
+ @see PDXlateToHostEx
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void,PDBookmarkGetTitleASText, (PDBookmark aBookmark, ASText title))
+
+/**
+ Sets a bookmark's title.
+
+ @param aBookmark The bookmark whose title is set.
+ @param title The text object containing the bookmark's
+ new title.
+
+ @exception pdErrBookmarksError is raised if there is an error setting
+ the title.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @see PDBookmarkSetTitle
+ @see PDBookmarkGetTitleASText
+ @see PDBookmarkGetTitle
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void,PDBookmarkSetTitleASText, (PDBookmark aBookmark, const ASText title))
+
+
+/**
+ Adds a new bookmark to the tree containing <code>aBookmark</code>,
+ as the new right sibling.
+ @param aBookmark The bookmark that will be the left sibling
+ of the new bookmark.
+ @param initialText The text object containing the new bookmark's title.
+ @return The newly created bookmark.
+
+ @notify PDBookmarkDidChangePosition
+ @notify PDBookmarkWasCreated
+
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddChild
+ @see PDBookmarkAddNewChildASText
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddSubtreeASText
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(PDBookmark,PDBookmarkAddNewSiblingASText, (PDBookmark aBookmark, const ASText initialText))
+
+/**
+ Adds a new bookmark to the tree containing <code>aBookmark</code>, as
+ the new last child of aBookmark. If <code>aBookmark</code> previously
+ had no children, it will be open after the child is added.
+
+ @param aBookmark The bookmark to which a new last child
+ is added.
+ @param initialText The text object containing the new bookmark's title.
+ @return The newly created bookmark.
+
+ @notify PDBookmarkDidChangePosition
+ @notify PDBookmarkWasCreated
+
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddNewSiblingASText
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddSubtreeASText
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddChild
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(PDBookmark,PDBookmarkAddNewChildASText, (PDBookmark aBookmark, const ASText initialText))
+
+/**
+ Adds a copy of the bookmark subtree source to <code>aBookmark</code>,
+ as a new last child of <code>aBookmark</code>. This new item will have
+ the text value <code>sourceTitle</code>, will be open, and will have
+ no destination attribute. <code>source</code> must have been previously
+ unlinked. If <code>aBookmark</code> previously had no children, it will
+ be open after the subtree is added.
+
+ @param aBookmark The bookmark to which the subtree source
+ will be added as a new last child.
+ @param source The bookmark subtree to add.
+ @param sourceTitle The text object containing the new bookmark's title.
+
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @notify PDBookmarkDidChangePosition
+ @see PDBookmarkAddSubtree
+ @see PDBookmarkAddNewSiblingASText
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddNewChildASText
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddChild
+ @see PDBookmarkUnlink
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void,PDBookmarkAddSubtreeASText, (PDBookmark aBookmark, PDBookmark source, const ASText sourceTitle))
+
+/**
+ Gets the first bookmark whose title is set in passed the ASText object.
+
+ @param aBookmark The root of the bookmark subtree to search.
+ @param title The text object containing the title value to search for.
+ @param maxDepth The number of subtree levels to search,
+ not counting the root level.
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>0</code></TD><TD>Only look at <code>aBookmark</code>, not at any of its children.</TD></TR>
+ <TR><TD><code>1</code></TD><TD>Check <code>aBookmark</code> and its children, but not any grandchildren or great grandchildren, and so on.</TD></TR>
+ <TR><TD><code>-1</code></TD><TD>Check the entire subtree.</TD></TR>
+ </TABLE>
+
+ @return The bookmark with the specified title, or a <code>NULL</code> Cos object
+ if there is no such bookmark.
+
+ @see PDBookmarkGetByTitle
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(PDBookmark,PDBookmarkGetByTitleASText, (PDBookmark aBookmark, const ASText title,ASInt32 maxDepth))
+
+/**
+ Gets the specified article thread's info as an ASText object.
+
+ @param thread The thread whose thread info is being obtained.
+ @param infoKey The key whose value is being obtained.
+ @param value (Filled by the method) The text object containing the value associated
+ with <code>infoKey</code> is set. The client must pass a valid ASText object value.
+ The routine does not allocate it.
+
+ @see PDThreadGetInfo
+ @see PDThreadSetInfoASText
+ @see PDThreadSetInfo
+ @since PI_PDMODEL_VERSION >= 0x00080000
+
+*/
+NPROC(void,PDThreadGetInfoASText, (PDThread thread, const ASText infoKey, ASText value))
+
+/**
+ Sets the specified article thread's info.
+
+ @param thread The thread whose thread info is being set.
+ @param infoKey The key whose value is being set.
+ @param value The text object containing the value to set.
+
+ @see PDThreadSetInfo
+ @see PDThreadGetInfoASText
+ @see PDThreadGetInfo
+ @since PI_PDMODEL_VERSION >= 0x00080000
+
+*/
+NPROC(void,PDThreadSetInfoASText, (PDThread thread, const ASText infoKey, const ASText value))
+
+/**
+ Returns a host encoded string corresponding to an ASText object.
+
+ @param inPdfString The text object.
+ @param outHostString (Filled by the method) A pointer to the
+ translated string.
+ @param outHostStringSize The length of the <code>outHostString</code> buffer,
+ in bytes.
+ @return The number of bytes in the translated string <code>outHostString</code>.
+
+ @see PDXlateToHostEx
+ @see PDFontXlateToHost
+ @see PDFontXlateToUCS
+ @see PDGetHostEncoding
+ @see PDXlateToHost
+ @see PDXlateToPDFDocEnc
+ @see PDXlateToPDFDocEncEx
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(ASInt32,PDXlateToHostASText, (const ASText inPdfString,char* outHostString, ASInt32 outHostStringSize ))
+
+/**
+ Returns an ASText object corresponding to a host encoded string.
+
+ @param inHostString A pointer to the string to translate (it may
+ point to the same memory as <code>outPDFString</code>, allowing strings
+ to translate in place).
+ @param inHostStringSize The number of bytes in the string to
+ translate.
+ @param outPDFString (Filled by the method) The text object corresponding to <code>inHostStringSize</code>.
+ The client must pass a valid ASText object title. The routine does not allocate it.
+
+ @return The number of bytes in the translated string <code>outPDFString</code>.
+ @see PDFontXlateToHost
+ @see PDFontXlateToUCS
+ @see PDGetHostEncoding
+ @see PDXlateToHost
+ @see PDXlateToHostEx
+ @see PDXlateToPDFDocEnc
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void, PDXlateToASText, (const char *inHostString, ASInt32 inHostStringSize, ASText outPDFString))
+
+/**
+ Constructs a new label object in the document with the specified
+ style, prefix, and starting page number.
+
+ @param pdDoc The document that contains the new page label.
+ @param style The numbering system to use for the numeric
+ portion of each label in this range of pages. The possible values are:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>D</code></TD><TD>Decimal numbers.</TD></TR>
+ <TR><TD><code>R</code></TD><TD>Upper-case Roman numbers.</TD></TR>
+ <TR><TD><code>r</code></TD><TD>Lower-case Roman numbers.</TD></TR>
+ <TR><TD><code>A</code></TD><TD>Upper-case alphabetic numbers.</TD></TR>
+ <TR><TD><code>a</code></TD><TD>Lower-case alphabetic numbers.</TD></TR>
+ </TABLE>
+
+ <p>If it is <code>NULL</code>, the labels for this range will not have a numeric portion. </p>
+
+ @param prefix The text object containing the string to prefix to the numeric portion
+ of the page label.
+ @param startAt The value to use when generating the numeric
+ portion of the first label in this range; it must be greater
+ than or equal to <code>1</code>.
+ @return The newly created page label.
+
+ @exception pdErrBadBaseObj is raised if the base pages object is missing
+ or invalid.
+ @see PDPageLabelNew
+ @see PDDocRemovePageLabel
+ @see PDDocGetPageLabel
+ @see PDDocFindPageNumForLabel
+ @see PDDocGetLabelForPageNum
+ @see PDDocSetPageLabel
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(PDPageLabel, PDPageLabelNewASText, (PDDoc pdDoc, ASAtom style, const ASText prefix, ASInt32 startAt))
+
+/**
+ Returns the prefix string for the label as an ASText object. The prefix string
+ is transitory and should be copied immediately.
+
+ @param pgLabel The label for the page whose prefix is desired.
+ @param prefix (Filled by the method) The text object containing the prefix string.
+ The client must pass a valid ASText object title. The routine does not allocate it.
+
+ @see PDPageLabelGetPrefix
+ @see PDPageLabelGetStart
+ @see PDPageLabelGetStyle
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void , PDPageLabelGetPrefixASText, (PDPageLabel pgLabel, ASText prefix))
+
+
+#if !defined (_H_PDFLPrivCalls)
+ /**
+ Gets an ASStm from a thumbnail data.
+ @param thumb The thumb for which image data is to be retrieved.
+ @param height (Filled by the method) The height of the thumbnail.
+ @param width (Filled by the method) The width of the thumbnail.
+ @param bpc (Filled by the method) The number of bits per component in the thumbnail image's data.
+ @param csName (Filled by the method) The color space in which thumnail data is represented.
+ @return An ASStm for the thumbnail data.
+ @see PDThumbGetIndexedColorSpace
+ @see PDThumbCreationDrawThumbProc
+ */
+ UNPROC(ASStm, PDThumbGetImageData, (
+ PDThumb thumb,
+ ASInt32 *height,
+ ASInt32 *width,
+ ASInt32 *bpc,
+ ASAtom *csName))
+
+/**
+ Gets an ASStm from a thumbnail's indexed color space table.
+ @param thumb The thumb for which image data is to be retrieved.
+ @param hival (Filled by the method) The highest valid index in the lookup table for the Indexed color space.
+ @param baseColorSpaceName (Filled by the method) The base color space in which the values in the color table are to be interpreted.
+ @return An ASStm from the thumbnail's indexed color space table.
+ @see PDThumbGetImageData
+ @see PDThumbCreationDrawThumbProc
+ */
+ UNPROC(ASStm, PDThumbGetIndexedColorSpace, (
+ PDThumb thumb,
+ ASInt32 *hival,
+ ASAtom *baseColorSpaceName))
+#else
+NOPROC(PDThumbGetImageData_InPDProcs) // Fix 1251180
+NOPROC(PDThumbGetIndexedColorSpace_InPDProcs)
+#endif
+
+/**
+ Checks whether a page contains overprint (with qualifications).
+
+ @param pdPage The page to check.
+ @return <code>true</code> only if the page contains overprint.
+ @since PI_PDMODEL_VERSION >= 0x00070000
+*/
+NPROC(ASBool, PDPageHasOverprintExt, (PDPage pdPage))
+
+/**
+ Sets the PDF minor version to the greater of its current value and the requested value.
+ This function should be called when any feature requiring a PDF version of 1.7 or higher is applied to a document.
+
+ @param pdDoc The document.
+ @param minor The minimum required minor version
+ @since PI_PDMODEL_VERSION >= 0x00080000
+*/
+NPROC(void, PDDocSetMinorVersion, (PDDoc pdDoc, ASInt16 minor))
+
+/**
+ Sets the Output Intent flag.
+ @param flag When <code>true</code>, use Output Intent to override a
+ working space if it is present.
+ @see PDPrefGetUseOutputIntents
+*/
+NPROC(void, PDPrefSetUseOutputIntents , (ASBool flag))
+
+
+/**
+ Returns the value of the Output Intent flag. When this flag
+ is <code>true</code>, the system overrides the working space with the Output
+ Intent, if it is present.
+ @return The Output Intent flag value.
+ @see PDPrefSetUseOutputIntents
+*/
+NPROC(ASBool, PDPrefGetUseOutputIntents, (void))
+
+/**
+ Sets the black-point compensation flag, which controls whether
+ to adjust for differences in black points when converting
+ colors between color spaces. When enabled, the full dynamic
+ range of the source space is mapped into the full dynamic
+ range of the destination space. When disabled, the dynamic
+ range of the source space is simulated in the destination
+ space (which can result in blocked or gray shadows).
+ @param kbpc <code>true</code> to enable black-point compensation, <code>false</code>
+ otherwise.
+ @see PDPrefGetBlackPointCompensation
+*/
+NPROC(void, PDPrefSetBlackPointCompensation, (ASBool kbpc))
+
+/**
+ Returns the black-point compensation flag.
+ @return <code>true</code> if black-point compensation is done.
+ @see PDPrefSetBlackPointCompensation
+*/
+NPROC(ASBool, PDPrefGetBlackPointCompensation, (void))
+
+/**
+ Set the current RGB working space to a given ICC profile.
+ An RGB working space in PDF is defined as a profile to substitute
+ for a corresponding <code>/DeviceRGB</code> space.
+ @param profile A pointer to a buffer containing the ICC
+ color profile.
+ @param profileLength The length in bytes of the profile.
+ @see PDPrefSetWorkingCMYK
+ @see PDPrefSetWorkingGray
+*/
+NPROC(void, PDPrefSetWorkingRGB, (void *profile, ASUns32 profileLength))
+
+/**
+ Sets the current CMYK working space to a given ICC profile.
+ A CMYK working space in PDF is defined as a profile to substitute
+ for a corresponding <code>/DeviceCMYK</code> space.
+ @param profile A pointer to a buffer containing the ICC
+ color profile.
+ @param profileLength The length in bytes of the profile.
+ @see PDPrefSetWorkingGray
+ @see PDPrefSetWorkingRGB
+*/
+NPROC(void, PDPrefSetWorkingCMYK, (void *profile, ASUns32 profileLength))
+
+/**
+ Sets the current gray working space to a given ICC profile.
+ A Gray working space in PDF is defined as a profile to substitute
+ for a corresponding <code>/DeviceGray</code> space. When rendering with
+ overprint preview, the gray substitution is suppressed,
+ to avoid converting grayscale to <i>rich black</i>.
+ @param profile A pointer to a buffer containing the ICC
+ color profile.
+ @param profileLength The length in bytes of the profile.
+ @see PDPrefSetWorkingCMYK
+ @see PDPrefSetWorkingRGB
+*/
+NPROC(void, PDPrefSetWorkingGray, (void *profile, ASUns32 profileLength))
+
+/**
+ Applies a set of redaction marks to the document, permanently removing the affected
+ document content and the marks themselves.
+ @param pdDoc IN/OUT The document to which the redaction marks should be applied.
+ @param applyParams IN/OUT A pointer to a <code>PDApplyRedactionParams</code> specifying which
+ redaction marks to apply and what parameters to use when applying them. If <code>NULL</code>,
+ then all redaction marks present in the document will be applied.
+ @return <code>true</code> if the document's content was changed, <code>false</code> otherwise.
+ @exception pdErrBadAnnotation is raised if any specified redaction marks are invalid
+ @see PDDocCreateRedaction
+ @see PDRedactionGetProps
+ @see PDRedactionSetProps
+*/
+XNPROC(ASBool, PDDocApplyRedactions, (PDDoc pdDoc, PDApplyRedactionParams applyParams))
+
+/**
+ Creates a redaction mark on a given page. The resulting annotation will be added to the page,
+ but the affected content will not be removed until <code>PDDocApplyRedactions</code> is
+ called with this mark.
+ @param pdDoc IN/OUT The document for which the new redaction mark should be created.
+ @param redactionProps IN A set of properties to be used for the new redaction mark.
+ @return The new annotation representing the redaction mark.
+ @exception genErrBadParm is raised if <code>redactionProps</code> is <code>NULL</code> or if contains an
+ invalid page number or an empty list of quads.
+ @see PDDocApplyRedactions
+ @see PDRedactionGetProps
+ @see PDRedactionSetProps
+*/
+NPROC(PDAnnot, PDDocCreateRedaction, (PDDoc pdDoc, PDRedactParams redactionProps))
+
+/**
+ Retrieves a set of properties for a given redaction mark.
+ @param redactionAnnot IN The redaction mark whose properties are to be returned.
+ @param redactionProps OUT The set of properties to be filled by this method.
+ @return <code>true</code> if the properties were successfully returned, <code>false</code> otherwise.
+ @exception pdErrBadAnnotation
+ @see PDDocApplyRedactions
+ @see PDDocCreateRedaction
+ @see PDRedactionSetProps
+*/
+NPROC(ASBool, PDRedactionGetProps, (PDAnnot redactionAnnot, PDRedactParams redactionProps))
+
+/**
+ Assigns a set of properties to a given redaction mark.
+ @param redactionAnnot IN/OUT The redaction mark whose properties are to be assigned.
+ @param redactionProps IN The set of properties to be assigned by this method.
+ @return <code>true</code> if the properties were successfully assigned, <code>false</code> otherwise.
+ @exception pdErrBadAnnotation
+ @see PDDocApplyRedactions
+ @see PDDocCreateRedaction
+ @see PDRedactionGetProps
+*/
+NPROC(ASBool, PDRedactionSetProps, (PDAnnot redactionAnnot, PDRedactParams redactionProps))
+
+/**
+ Resets the cached ink (spot color) usage information in a document. This should be called
+ when the set of non-process colorants for a document have been changed. Calling this will
+ force the cached information to be recomputed.
+ @param doc IN The document on which to reset set the ink usage.
+*/
+XNPROC(void, PDDocResetInkUsage, (PDDoc doc))
+
+/**
+ Return the number of non-fatal errors encountered since the document was opened.
+ @param doc The document in which the non-fatal errors have occurred.
+ @since PI_PDMODEL_VERSION >= 0x00090000
+*/
+
+NPROC(ASInt32, PDDocGetNumErrors, (PDDoc doc))
+
+/**
+ Returns the error code and string for the nth non-fatal error encountered since the document was opened.
+ @param doc The document in which the error has occurred.
+ @param errNumber This is the serial number of the non-fatal error to be returned; only the first three different errors in the document can be retrieved through this API.
+ @param errorP The error code. Use <code>ASGetErrorString()</code> to get the error message.
+ @param buffer If there is a string associated with this error, the string is copied to this buffer if it is non-<code>NULL</code> and is <code>NULL</code>-terminated.
+ @param bufSize The maximum number of bytes that will be written to the buffer.
+ @return If there is a string associated with this error, the length of that string is returned. If there is no string, the return value is zero.
+ @since PI_PDMODEL_VERSION >= 0x00090000
+*/
+
+NPROC(ASInt32, PDDocGetNthError, (PDDoc doc, ASInt32 errNumber, ASInt32 *errorP, char *buffer, ASInt32 bufSize))
+
+/**
+
+ Returns the version of the PDF format to which the PDF file conforms. For PDF versions
+ 1.0 through 1.7, this method will return a major version of 1, a minor version in the
+ range of 0 through 7, and an <code>adbeExtensionLevel</code> of 0.
+ Starting with Acrobat 9, Adobe extensions to the PDF format will be identified via
+ the Extensions dictionary in the catalog; in this case, the major and minor versions will
+ be returned, and the Adobe extension level will be returned via the last argument.
+
+ @param doc IN/OUT The document whose version is obtained.
+ @param majorP IN/OUT (Filled by the method) The major version number.
+ @param minorP IN/OUT (Filled by the method) The minor version number.
+ @param adbeExtensionBaseP IN/OUT (Filled in by the method) The value of the BaseVersion
+ entry in the ADBE dictionary. If there is no Extensions dictionary or no ADBE sub-dictionary, the value returned will
+ be a null CosObj.
+ @param adbeExtensionLevelP IN/OUT (Filled in by the method) The values of the ExtensionLevel
+ entry in the ADBE dictionary.
+ If there is no Extensions dictionary or no ADBE sub-dictionary, the value returned will
+ be zero.
+ @since PI_PDMODEL_VERSION >= 0x00090000
+*/
+
+NPROC(void, PDDocGetVersionEx, (PDDoc doc, ASUns32 *majorP, ASUns32 *minorP, CosObj *adbeExtensionBaseP, ASUns32 *adbeExtensionLevelP))
+
+/**
+
+ Returns true if the document contains an Extensions dictionary as defined by ISO 32000 for
+ specifying the inclusion of features beyond the ISO 32000 specification.
+ Starting with Acrobat 9, Adobe extensions to the PDF format will be identified via
+ this Extensions dictionary in the catalog.
+
+ @param doc IN/OUT The document tested for ISO extensions.
+ @since PI_PDMODEL_VERSION >= 0x00090000
+*/
+
+NPROC(ASBool, PDDocHasISOExtensions, (PDDoc doc))
+
+
+
+/************************************************************************************\
+|* *|
+|* PDFileAttachment *|
+|* *|
+\************************************************************************************/
+
+/** Tests a file attachment for validity.
+ @param attachment The file attachment.
+ @return <code>true</code> if the file attachment is a dictionary, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFileAttachmentIsValid, (PDFileAttachment attachment))
+
+/**
+ <p>Creates a new file attachment from the given file.
+ The resulting file specification dictionary is created for the given document,
+ but is not referenced. The client must reference the resulting file specification
+ dictionary by attaching it to another object in the PDF file, such as an annotation
+ or name tree. An exception is raised if the file could not be read or the attachment stream could not be created.</p>
+
+ <p>Note that permissions must be checked by the caller before invoking this function. </p>
+
+ <p>For example, to have an attachment flate compressed and then ASCII base-85 encoded:</p>
+
+ <pre>
+ ASAtom filterNames[2];
+ filterNames[0] = ASAtomFromString("ASCII85Decode");
+ filterNames[1] = ASAtomFromString("FlateDecode");
+ PDFileAttachmentNewFromFile(parentDoc, sourceFile, filterNames, 2,
+ CosNewNull(), NULL, NULL, NULL);
+ </pre>
+
+ @param parentDoc The <code>CosDoc</code> in which the file attachment dictionary will be created.
+ @param sourceFile The <code>ASFile</code> from which to create the file attachment.
+ @param filterNames An array of filters to apply to the file attachment stream. Filters
+ are indentified by name, in accordance with section 3.3 of the
+ <i>PDF Reference</i>.
+ @param numFilters The number of elements in <code>filterNames</code>.
+ @param filterParams The filter parameters, represented as a <code>CosArray</code> or <code>CosNull</code>.
+ When the array form is used, the array must contain the same
+ number of elements as <code>filterNames</code>. Each element in the <code>CosArray</code>
+ is a <code>CosDict</code> representing the filter parameters for the corresponding
+ filter in the <code>filterNames</code> array, or <code>CosNull</code> to indicate that
+ default parameters should be used for that filter.
+ When the <code>CosNull</code> form is used for <code>filterParams</code>, default parameters
+ are used for every filter in the filterNames array.
+ @param monitor The <code>ASProgressMonitor</code> to use for the duration of the call. The monitor
+ object is owned by the caller. <code>NULL</code> indicates that no progress updates
+ are needed.
+ @param monitorText The text for the monitor to display, or <code>NULL</code> if no text is needed.
+ The text object is owned by the caller.
+ @param monitorData Opaque data that is specific to the monitor object.
+ @return The new file attachment.
+
+*/
+NPROC(PDFileAttachment, PDFileAttachmentNewFromFile, (CosDoc parentDoc, ASFile sourceFile,
+ const ASAtom* filterNames, const ASArraySize numFilters, CosObj filterParams,
+ ASProgressMonitor monitor, ASConstText monitorText, void* monitorData))
+
+/**
+ <p>Updates a file attachment from the given file.
+ The attachment uses the filters specified in the attachment to encode the data.
+ An exception is raised if the file could not be read or the attachment stream could not be updated.</p>
+
+ <p>Note that permissions must be checked by the caller before invoking this function. </p>
+
+ @param attachment The file attachment.
+ @param sourceFile The file to use as input for the update operation.
+ @param monitor The <code>ASProgressMonitor</code> to use for the duration of the call. The monitor
+ object is owned by the caller. <code>NULL</code> indicates that no progress updates
+ are needed.
+ @param monitorText The text for the monitor to display, or <code>NULL</code> if no text is needed.
+ The text object is owned by the caller.
+ @param monitorData Opaque data that is specific to the monitor object.
+
+*/
+NPROC(void, PDFileAttachmentUpdateFromFile,(PDFileAttachment attachment, ASFile sourceFile,
+ ASProgressMonitor monitor, ASConstText monitorText, void* monitorData))
+
+/**
+ Copies the data embedded in the file attachment to the specified file.
+ The file must be open for write or append. The caller is responsible for closing the
+ file after this call returns. If an error is encountered during the write, some data may
+ have been written to the destination file. This call will make no attempt at restoring
+ the file after failure. An exception is raised if the file attachment has no embedded stream or if a
+ file write error occurs.
+
+ @param attachment The file attachment.
+ @param destFile The file that will be written with the file attachment data.
+*/
+NPROC(void, PDFileAttachmentSaveToFile, (PDFileAttachment attachment, ASFile destFile))
+
+/** Converts a file specification dictionary to a <code>PDFileAttachment</code> object.
+ An exception is raised if the parameter is not a file specification dictionary.
+ @param attachment The <code>CosObj</code> to convert.
+ @return The file attachment object.
+*/
+NPROC(PDFileAttachment, PDFileAttachmentFromCosObj, (CosObj cosAttachment))
+
+/** Returns a <code>CosObj</code> representing the file specification dictionary of the file attachment.
+ @param attachment The file attachment object.
+ @return The <code>CosObj</code> representation of the file attachment.
+*/
+NPROC(CosObj, PDFileAttachmentGetCosObj, (PDFileAttachment attachment))
+
+/** Returns a stream for reading the data from an existing file attachment.
+ An exception is raised if the file attachment does not have a stream (it is not embedded) or the stream
+ could not be opened. The caller is responsible for closing the returned stream.
+ @param attachment The file attachment object.
+ @return The file attachment stream.
+*/
+NPROC(ASStm, PDFileAttachmentOpenStream, (PDFileAttachment attachment))
+
+/** Returns the size, in bytes, that the file will occupy if exported to disk.
+
+ @param attachment The file attachment object
+ @return The size of the file attachment. It returns <code>0</code> if the
+ <code>PDFileAttachment</code> object does not specify a file size and one cannot be
+ determined.
+*/
+NPROC(ASUns32, PDFileAttachmentGetFileSize, (PDFileAttachment attachment))
+
+/** Gets the creation date of the file attachment.
+ @param attachment The file attachment object.
+ @param date A pointer to a date that will receive the creation date.
+ @return <code>true</code> if the file attachment has a creation date, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFileAttachmentGetCreationDate, (PDFileAttachment attachment, ASTimeRec *date))
+
+/** Gets the modification date of the file attachment.
+ @param attachment The file attachment object.
+ @param date A pointer to a date that will receive the modification date.
+ @return <code>true</code> if the file attachment has a modification date, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFileAttachmentGetModDate, (PDFileAttachment attachment, ASTimeRec *date))
+
+/** Gets the file name of the file attachment.
+ @param attachment The file attachment.
+ @return An <code>ASText</code> copy of the file name of the file attachment.
+*/
+NPROC(ASText, PDFileAttachmentGetFileName, (PDFileAttachment attachment))
+
+/** Sets the specified text field in the file attachment.
+ @param attachment The file attachment.
+ @param fieldID The field identifier.
+ @param text The text to use as the new value for the specified field.
+ @exception genErrBadParm is raised if the field does not exist in the collection schema
+ or the field type is not <code>S</code> (text).
+*/
+NPROC(void, PDFileAttachmentSetFieldText, (PDFileAttachment attachment, ASAtom fieldID, ASText text))
+
+/** Gets the value of the specified text field in the file attachment.
+ @param attachment The file attachment.
+ @param fieldID The field identifier.
+ @param text The text object that will receive the field value.
+ @return <code>true</code> if the field value was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFileAttachmentGetFieldText, (PDFileAttachment attachment, ASAtom fieldID, ASText text))
+
+/** Sets the specified numeric field in the file attachment.
+ @param attachment The file attachment.
+ @param fieldID The field identifier.
+ @param number The number to use as the new value for the specified field.
+ @exception genErrBadParm is raised if the field does not exist in the collection schema
+ or the field type is not <code>N</code> (number).
+*/
+NPROC(void, PDFileAttachmentSetFieldNumber, (PDFileAttachment attachment, ASAtom fieldID, float number))
+
+/** Gets the value of the specified numeric field in the file attachment.
+ @param attachment The file attachment.
+ @param fieldID The field identifier.
+ @param number The number that will receive the field value.
+ @return <code>true</code> if the field value was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFileAttachmentGetFieldNumber, (PDFileAttachment attachment, ASAtom fieldID, float *number))
+
+/** Sets the specified date field in the file attachment.
+ @param attachment The file attachment.
+ @param fieldID The field identifier.
+ @param date The date to use as the new value for the specified field.
+ @exception genErrBadParm is raised if the field does not exist in the collection schema
+ or the field type is not <code>D</code> (date).
+*/
+NPROC(void, PDFileAttachmentSetFieldDate, (PDFileAttachment attachment, ASAtom fieldID, const ASTimeRec *date))
+
+/** Gets the value of the specified date field in the file attachment.
+ @param attachment The file attachment.
+ @param fieldID The field identifier.
+ @param date The date that will receive the field value.
+ @return <code>true</code> if the field value was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFileAttachmentGetFieldDate, (PDFileAttachment attachment, ASAtom fieldID, ASTimeRec *date))
+
+/** Sets the specified prefix field in the file attachment. The prefix allows additional
+ text to be prepended to the visual appearance of a field without affecting its actual value.
+ @param attachment The file attachment.
+ @param fieldName The field identifier.
+ @param text The prefix to use as the new value for the specified field. Note that if a <code>NULL</code> value
+ is passed into this parameter, the prefix is removed and an exception will not be thrown.
+ @exception genErrBadParm is raised if the field does not exist in the collection schema.
+*/
+NPROC(void, PDFileAttachmentSetFieldPrefix, (PDFileAttachment attachment, ASAtom fieldName, ASText text))
+
+/** Gets the specified prefix field in the file attachment.
+ @param attachment The file attachment.
+ @param fieldID The field identifier.
+ @param prefix The text object that will receive the prefix.
+*/
+NPROC(ASBool, PDFileAttachmentGetFieldPrefix, (PDFileAttachment attachment, ASAtom fieldName, ASText prefix))
+
+
+/************************************************************************************\
+|* *|
+|* PDCollection *|
+|* *|
+\************************************************************************************/
+
+/** Determines if a collection is valid.
+ @param collection The collection
+ @return <code>true</code> if the collection is valid, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDCollectionIsValid, (PDCollection collection))
+
+/** Gets the collection object in a document.
+ @param pdDoc The document.
+ @return The collection. If the document does not have a collection, the returned
+ collection is invalid.
+*/
+NPROC(PDCollection, PDDocGetPDCollection, (PDDoc pdDoc))
+
+/** Creates a collection in a document. It replaces any existing collection.
+ @param pdDoc The document that will host the new collection.
+ @return The new collection object.
+*/
+NPROC(PDCollection, PDDocCreatePDCollection, (PDDoc pdDoc))
+
+/** Removes a collection dictionary from a document.
+ @param pdDoc The document whose collection dictionary is to be removed.
+*/
+NPROC(void, PDDocDeleteCollection, (PDDoc pdDoc))
+
+/** Gets the contents of the collection sort dictionary.
+ @param collection The collection object.
+ @param pairs The array of pairs. It may be <code>NULL</code>.
+ @arrayLen The length of the pairs array.
+ @return If <code>pairs</code> is <code>NULL</code>, the number of items in the collection sort dictionary is returned;
+ otherwise, the number of items stored in the <code>pairs</code> array is returned.
+*/
+NPROC(ASArraySize, PDCollectionGetSortOrder, (PDCollection collection, PDCollectionSchemaSortPairRec *pairs, ASArraySize arrayLen))
+
+/** Set the contents of the collection sort dictionary.
+ @param collection The collection object.
+ @param pairs The array of pairs. If it is <code>NULL</code>, the collection sort dictionary is removed.
+ @arrayLen The length of the <code>pairs</code> array.
+*/
+NPROC(void, PDCollectionSetSortOrder, (PDCollection collection, const PDCollectionSchemaSortPairRec *pairs, ASArraySize arrayLen))
+
+/** Gets the view data for the collection.
+ @param collection The collection object.
+ @param data The collection view data.
+*/
+NPROC(void, PDCollectionGetViewData, (PDCollection collection, PDCollectionViewDataRec *data))
+
+/** Set the view data for the collection.
+ @param collection The collection object.
+ @param data The collection view data.
+*/
+NPROC(void, PDCollectionSetViewData, (PDCollection collection, const PDCollectionViewDataRec *data))
+
+/** Acquires the <code>PDCollectionSchema</code> object for a collection.
+ @param collection The collection object.
+ @return The collection object.
+*/
+NPROC(PDCollectionSchema, PDCollectionSchemaAcquire, (PDCollection collection))
+
+/** Destroys a <code>PDCollectionSchema</code> object.
+ @param collection The collection object.
+ @return The collection object.
+*/
+NPROC(void, PDCollectionSchemaDestroy, (PDCollectionSchema schema))
+
+/** Gets the number of fields in the schema.
+ @param collection The collection object.
+ @return The number of fields in the schema.
+ */
+NPROC(ASArraySize, PDCollectionSchemaGetLength, (PDCollectionSchema schema))
+
+/** Gets a field by name or position.
+ The caller must set <code>field.size</code> to <code>sizeof(PDCollectionFieldRec)</code>.
+ To look up a field by name, set <code>field.fieldName</code> to the appropriate name.
+ To look up a field by position, set <code>field.fieldName</code> to <code>ASAtomNull</code>,
+ and set <code>field.index</code> to the position.
+ The caller owns (and must destroy) <code>field.fieldText</code> if it is not <code>NULL</code>.
+ @param schema The collection schema object.
+ @param field The field to be obtained.
+ @return <code>true</code> if the field was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDCollectionSchemaGetField, (PDCollectionSchema schema, PDCollectionFieldRec *field))
+
+/** Sets a field with new values.
+ The target field is identified by the <code>field.fieldName</code> member. If the target field exists, it is
+ overwritten; otherwise a new field is added.
+ The caller must set <code>field.size</code> to <code>sizeof(PDCollectionFieldRec)</code>.
+ Specifying a new value for <code>field.index</code> will affect other field values
+ as necessary to maintain the correct overall ordering. See
+ <code>PDCollectionSchema</code> for information about ordering.
+ @param schema The collection schema object.
+ @param field The field to add or modify in the collection schema.
+ @see PDCollectionSchema
+*/
+NPROC(void, PDCollectionSchemaSetField, (PDCollectionSchema schema, const PDCollectionFieldRec *field))
+
+/** Removes a field from the collection schema.
+ @param schema The collection schema.
+ @param fieldName The name of the field to remove from the collection schema.
+*/
+NPROC(void, PDCollectionSchemaRemoveField, (PDCollectionSchema schema, ASAtom fieldName))
+
+/** Determines if a <code>PDFolder</code> is valid.
+ @param folder The folder object
+ @return <code>true</code> if the folder is a dictionary, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFolderIsValid, (PDFolder folder))
+
+/** Creates a new folder.
+ @param collection The collection that will be associated with the new folder.
+ @param path The path and name of the folder. The path syntax for folders takes the
+ form <code>[parent/]folder</code>, where the mandatory <code>parent/</code> section may be repeated
+ as necessary to provide a complete path to the new folder. The path
+ is always interpreted as being relative to the root level of the folder
+ hierarchy. Paths that specify simply a new folder name are located
+ in the root folder. The character set for folder names is subject to
+ the limitations imposed by the PDF Reference: folders may not contain
+ any of the characters in the set <code>/ \ : ? * " &lt; &gt; |</code> and may not end with a <code>.</code> (period).
+ Please note that a folder name cannot consist entirely of spaces.
+ To specify the root folder itself, assign a value of <code>"/"</code>.
+ @return The new folder object.
+*/
+NPROC(PDFolder, PDCollectionCreateFolder, (PDCollection collection, ASConstText path))
+
+/** Removes a folder and its descendant folders and associated file attachments.
+ @param collection The collection associated with the folder that will be removed.
+ @param path The path to the folder.
+ @return <code>0</code> if the folder hierarchy was successfully removed; otherwise an
+ error code identifying the failure condition is returned.
+*/
+NPROC(void, PDCollectionRemoveFolder, (PDCollection collection, ASConstText path))
+
+/** Gets an existing folder.
+ @param collection The collection associated with the folder to be obtained.
+ @param path The path to the folder. To specify the root folder itself, assign a value of <code>"/"</code>.
+ The path syntax for folders takes the
+ form <code>[parent/]folder</code>, where the mandatory <code>parent/</code> section may be repeated
+ as necessary to provide a complete path to the new folder.
+ @return The specified folder. If the folder does not exist, the returned folder is invalid.
+ */
+NPROC(PDFolder, PDCollectionGetFolder, (PDCollection collection, ASConstText path))
+
+/** Gets the parent of the specified folder.
+ @param folder The folder object.
+ @return The parent of the specified folder. If no parent exists, the returned folder is invalid.
+*/
+NPROC(PDFolder, PDFolderGetParent, (PDFolder folder))
+
+/** Sets the parent of the specified folder.
+ @param folder The folder that will receive a new parent.
+ @param parent The new parent folder.
+*/
+NPROC(void, PDFolderSetParent, (PDFolder folder, PDFolder parent))
+
+/** Gets the first child of a folder.
+ @param folder The folder.
+ @return The first child of the folder. If no child exists, the returned folder is invalid.
+*/
+NPROC(PDFolder, PDFolderGetFirstChild, (PDFolder folder))
+
+/** Gets the next sibling of a folder.
+ @param folder The folder.
+ @return The next sibling of the folder. If no next sibling exists, the returned folder is invalid.
+*/
+NPROC(PDFolder, PDFolderGetNextSibling, (PDFolder folder))
+
+/** Sets the name of a folder.
+ @param folder The folder.
+ @param folderName The name of the folder.
+*/
+NPROC(void, PDFolderSetName, (PDFolder folder, ASConstText folderName))
+
+/** Gets the name of a folder.
+ @param folder The folder.
+ @param folderName The name of the folder.
+*/
+NPROC(void, PDFolderGetName, (PDFolder folder, ASText name))
+
+/** Gets the ID number of a folder.
+ @param folder The folder.
+ @return The folder ID.
+*/
+NPROC(ASInt32, PDFolderGetID, (PDFolder folder))
+
+/** Gets the path of the folder.
+ @param folder The folder.
+ @param path The folder path.
+*/
+NPROC(void, PDFolderGetPathText, (PDFolder folder, ASText path))
+
+/** Gets the modification date of the folder.
+ @param folder The folder.
+ @param date A pointer to an <code>ASTimeRec</code> that will be filled with the folder modification date.
+ @return <code>true</code> if the folder has a modification date, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFolderGetModDate, (PDFolder folder, ASTimeRec *date))
+
+/** Sets the modification date of the folder.
+ @param folder The folder.
+ @param date A pointer to an <code>ASTimeRec</code> that will be used to set the modification date.
+*/
+NPROC(void, PDFolderSetModDate, (PDFolder folder, const ASTimeRec *date))
+
+/** Gets the creation date of the folder.
+ @param folder The folder.
+ @param date A pointer to an <code>ASTimeRec</code> that will be filled with the folder creation date.
+ @return <code>true</code> if the folder has a creation date, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFolderGetCreationDate, (PDFolder folder, ASTimeRec *date))
+
+/** Sets the creation date of the folder.
+ @param folder The folder.
+ @param date A pointer to an <code>ASTimeRec</code> will be used to set the creation date.
+*/
+NPROC(void, PDFolderSetCreationDate, (PDFolder folder, const ASTimeRec *date))
+
+/** Gets the description of the folder.
+ @param folder The folder.
+ @param text A text object that will receive the folder description.
+ @return <code>true</code> if the folder has a description, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFolderGetDescription, (PDFolder folder, ASText text))
+
+/** Sets the description of the folder.
+ @param folder The folder.
+ @param text The new description for the folder.
+*/
+NPROC(void, PDFolderSetDescription, (PDFolder folder, ASConstText text))
+
+/** Gets the value of the specified text field in the folder.
+ @param folder The folder.
+ @param fieldID The field identifier.
+ @param text The text object that will receive the field value.
+ @return <code>true</code> if the field value was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFolderGetFieldText, (PDFolder folder, ASAtom fieldID, ASText text))
+
+/** Sets the specified text field in the folder.
+ @param folder The folder.
+ @param fieldID The field identifier.
+ @param text The text to use as the new value for the specified field.
+ @exception genErrBadParm is raised if the field does not exist in the collection schema
+ or the field type is not <code>S</code> (text).
+*/
+NPROC(void, PDFolderSetFieldText, (PDFolder folder, ASAtom fieldID, ASConstText text))
+
+/** Gets the value of the specified numeric field in the folder.
+ @param folder The folder.
+ @param fieldID The field identifier.
+ @param number The number that will receive the field value.
+ @return <code>true</code> if the field value was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFolderGetFieldNumber, (PDFolder folder, ASAtom fieldID, float *number))
+
+/** Sets the specified numeric field in the folder.
+ @param folder The folder.
+ @param fieldID The field identifier.
+ @param number The number to use as the new value for the specified field.
+ @exception genErrBadParm is raised if the field does not exist in the collection schema
+ or the field type is not <code>N</code> (number).
+*/
+NPROC(void, PDFolderSetFieldNumber, (PDFolder folder, ASAtom fieldID, float number))
+
+/** Gets the value of the specified date field in the folder.
+ @param folder The folder.
+ @param fieldID The field identifier.
+ @param date The date that will receive the field value
+ @return <code>true</code> if the field value was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, PDFolderGetFieldDate, (PDFolder folder, ASAtom fieldID, ASTimeRec *date))
+
+/** Sets the specified date field in the folder.
+ @param folder The folder.
+ @param fieldID The field identifier.
+ @param date The date to use as the new value for the specified field.
+ @exception genErrBadParm is raised if the field does not exist in the collection schema
+ or the field type is not <code>D</code> (date).
+*/
+NPROC(void, PDFolderSetFieldDate, (PDFolder folder, ASAtom fieldID, const ASTimeRec *date))
+
+
+
+ /** Creates an <code>ASPathName</code> corresponding to the specified file or folder in the collection.
+ @param pdDoc The document containing the specified file or folder.
+ @param pathText The text-based representation of the path. The path consists of a file
+ name or sequence of file names. A file name may not contain any of the characters
+ <code>'\', '/', ':', '*', '?', '&lt;', '&gt;', '|'</code>, and may not contain <code>'.'</code> as the final character.
+ When <code>'/'</code> appears in a path, it signifies that the preceding file name is a folder, and
+ that the subsequent file name is a child of that folder. The root of a collection may
+ be identified by passing <code>"/"</code>, <code>NULL</code>, or an empty string for <code>pathText</code>.
+ @param fileSys A pointer that will be filled by the function. This parameter provides
+ the caller with the <code>ASFileSys</code> to use in conjunction with the specified file or folder.
+ @param pathName A pointer that will be filled by the function. This parameter provides
+ the caller with the <code>ASPathName</code> to use in conjunction with the specified file or folder.
+*/
+NPROC(void, ASFileAttachmentCreatePathName, (PDDoc pdDoc, ASText pathText, ASFileSys *fileSys, ASPathName *pathName))
+
+/** Produces a <code>PDFileAttachment</code> corresponding to the <code>ASFileSys</code> and <code>ASPathName</code>.
+ It raises an exception if the <code>ASFileSys</code> is
+ is not the embedded files file system, or if the <code>ASPathName</code> or <code>PDFileAttachment</code> parameters
+ are <code>NULL</code>.
+ @param fileSys The <code>ASFileSys</code> for file attachments.
+ @param pathName The <code>ASPathName</code> identifying the file attachment of interest.
+ @param attachment A pointer that will be receive the file attachment.
+ @return <code>true</code> if the file attachment was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, ASFileAttachmentGetPDFileAttachment, (ASFileSys fileSys, ASPathName pathName, PDFileAttachment *attachment))
+
+/** Produces a <code>PDFolder</code> corresponding to the <code>ASFileSys</code> and <code>ASPathName</code>.
+ It raises an exception if the <code>ASFileSys</code> is
+ is not the embedded files file system, or if the <code>ASPathName</code> or <code>PDFolder</code> parameters
+ are <code>NULL</code>.
+ @param fileSys The <code>ASFileSys</code> for file attachments
+ @param pathName The <code>ASPathName</code> identifying the folder of interest.
+ @param attachment A pointer that will be receive the folder.
+ @return <code>true</code> if the folder was found, <code>false</code> otherwise.
+*/
+NPROC(ASBool, ASFileAttachmentGetPDFolder, (ASFileSys fileSys, ASPathName pathName, PDFolder *folder))
+
+#undef XSPROC
+#undef XNPROC
+#undef XPROC
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSError.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSError.h
new file mode 100644
index 0000000..f64dcac
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSError.h
@@ -0,0 +1,19 @@
+/* PDSError.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PDSErrorASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSErrorASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSErrorASF.h
new file mode 100644
index 0000000..8951e8d
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSErrorASF.h
@@ -0,0 +1,30 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(pdsErrRequiredMissing, "A required field was missing from a dictionary")
+
+DefineErr(pdsErrBadPDF, "An incorrect structure was found in the PDF file")
+
+DefineErr(pdsErrWrongTypeEntry, "Dictionary entry has wrong Cos type")
+
+DefineErr(pdsErrWrongTypeParameter, "Wrong type parameter supplied to a PDS procedure")
+
+DefineErr(pdsErrAlreadyExists, "There is already a table entry with the same name")
+
+DefineErr(pdsErrCantDo, "Some software required to perform this operation is not present in this version of Adobe Acrobat")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSExpT.h
new file mode 100644
index 0000000..4ab47b2
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSExpT.h
@@ -0,0 +1,312 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSExpT.h
+
+ - Types, macros, structures, etc. required to use the PDSEdit HFT.
+
+*********************************************************************/
+
+#ifndef _H_PDSExpT
+#define _H_PDSExpT
+
+#include "Environ.h"
+#if PLUGIN || ACROBAT_LIBRARY
+#include "CoreExpT.h"
+#include "ASExpT.h"
+#include "CosExpT.h"
+#include "PDExpT.h"
+#else
+#include "PubTypes.h"
+#include "ASTypes.h"
+#include "Cos.h"
+#include "PDExpT.h"
+#endif
+#include "PEExpT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+/*
+** Function prototypes
+** The following defines are used in function prototypes
+** for labelling function parameters as input or output.
+** Note that function arguments which are pointers and are
+** marked as 'OUT' are pointers to buffers and the buffers
+** will contain the output data.
+*/
+#define IN
+#define OUT
+
+/* Note on integer types.
+** The following integer types are used for the following purposes.
+** Index into a structure or array: ASInt32
+** Count, number of elements: ASInt32
+** Variable or argument of enum: ASInt32
+** Size in bytes of a structure or data: ASUns32
+** Bitfield flag: ASUns32
+**
+** I find it easier to use these existing types than to define
+** new types such as Count, Index and Size, and to remember to
+** use them consistently.
+**
+** I use an ASInt32 for index and enum because both may be negative.
+** (Although I don't use negative indixes in this API.)
+** I use ASInt32 for enums because enums can have different sizes
+** on different compilers; I want my API to be independent of compiler.
+** ASInt32 is used for count because it cannot be greater than an index.
+** ASUns32 is the obvious choice for size and bitfield (os_size_t has
+** too many underlines in it!-)
+*/
+
+/*------------------------------------------------------------------------
+ PDS Public Types.
+------------------------------------------------------------------------*/
+
+
+/**
+ Represents PDF structural elements, which are nodes in a tree giving a PDF
+ document's logical structure.
+ @see PDSElementCreate
+ @see PDSElementGetParent
+ @see PDSMCGetParent
+ @see PDSOBJGetParent
+ @see PDSTreeRootGetElementFromID
+*/
+typedef CosObj PDSElement;
+
+
+/**
+ The root of the structure tree, which is a central repository for information related to a
+ PDF document's logical structure. There is at most one PDSTreeRoot in each
+ document.
+ @see PDDocCreateStructTreeRoot
+ @see PDDocGetStructTreeRoot
+ @see PDDocRemoveStructTreeRoot
+*/
+typedef CosObj PDSTreeRoot;
+
+
+
+/**
+ Represents PDF logical structure attribute objects, which are dictionaries containing
+ application-specific data that can be attached to PDSElement objects.
+ @see PDSAttrObjCreate
+ @see PDSAttrObjCreateFromStream
+ @see PDSClassMapGetAttrObj
+ @see PDSElementGetAttrObj
+ @see PDSElementRemoveAttrObj
+*/
+typedef CosObj PDSAttrObj;
+
+
+/**
+ * PDSMCR
+ */
+typedef CosObj PDSMCR;
+
+
+/**
+ Represents marked content, which are portions of the graphic content of a PDF document that may
+ be included in the document's logical structure hierarchy. This type is identical with the
+ PDFEdit layer type PDEContainer.
+ @note The write functions in the <code>PDSEdit</code> API are not available in Adobe Reader.
+ */
+typedef PDEContainer PDSMC;
+
+
+/**
+ * PDSOBJR
+ */
+typedef CosObj PDSOBJR;
+
+
+/**
+ Represents mappings of structural element types present in a PDF document to standard
+ element types having similar uses. There is one PDSClassMap per document, associated
+ with the PDSTreeRoot.
+ @note The write functions in the <code>PDSEdit</code> API are not available in Adobe Reader.
+ */
+typedef CosObj PDSRoleMap;
+
+
+/**
+ Associates class identifiers, which are names, with objects of type PDSAttrObj. Structural
+ elements maintain a list of names identifying classes to which they belong. The associated
+ attributes are thus shared by all structural elements belonging to a given class. There is one
+ class map per document, associated with the PDSTreeRoot.
+ @note The write functions in the <code>PDSEdit</code> API are not available in Adobe Reader.
+ */
+typedef CosObj PDSClassMap;
+
+/**
+ An opaque pointer type to a marked content reference handle.
+*/
+#ifdef __cplusplus
+
+class PDSMCRefRec;
+typedef PDSMCRefRec* PDSMCRef;
+
+#else
+
+typedef struct _t_PDSMCRef *PDSMCRef;
+
+#endif // __cplusplus
+
+
+/*------------------------------------------------------------------------
+ PDS Attributes.
+------------------------------------------------------------------------*/
+
+
+/*------------------------------------------------------------------------
+ PDS Flags and Enums.
+------------------------------------------------------------------------*/
+
+
+/** PDS object types. */
+typedef enum {
+ /** */
+ kPDSElement,
+ /** */
+ kPDSAttrObj,
+ /** */
+ kPDSMCR,
+ /** */
+ kPDSMC,
+ /** */
+ kPDSRoleMap,
+ /** */
+ kPDSClassMap,
+ /** */
+ kPDSLastType
+} PDSType;
+
+/*----------------------------------------------------------------------
+ Description of how an MC kid is included in its parent
+----------------------------------------------------------------------*/
+
+/**
+ Information about how a marked content PDS object (a marked
+ content kid) is included in its parent.
+ @see PDSMCGetInfo
+*/
+typedef struct _t_PDSMCInfo
+{
+ /** The size of this data structure. */
+ ASSize_t size;
+ /** The MCID of the content kid in question. */
+ ASInt32 mcid;
+ /** If <code>true</code>, content is contained within the page's content stream, and the
+ fields <code>containingStm</code> and <code>stmOwner</code> are meaningless.
+ If <code>false</code>, content is contained within some other content stream,
+ such as a Form XObject or an annotation. */
+ ASBool directContent;
+ /** The stream object containing the marked content in question. */
+ CosObj containingStm;
+ /** The object owning the stream, as defined by the StmOwn key in an OBJR. */
+ CosObj stmOwner;
+ /** The page on which the marked content is drawn, whether directly as part of
+ page content or indirectly by being in a Form XObject or annotation drawn
+ on that page .
+ */
+ CosObj page;
+}
+PDSMCInfo, *PDSMCInfoP;
+
+/*----------------------------------------------------------------------*/
+
+/* Handy defines for inserting at the beginning and end of lists */
+#define kPDSBeforeFirst ((ASInt32) -1)
+#define kPDSAfterLast (ASMAXInt32 - 1)
+
+/*----------------------------------------------------------------------*/
+/* Additions for "UserProperties" structure elements */
+/**
+ Callback for PDSElementEnumUserPropertiesAsASText().
+
+ @param propName The property's name.
+ @param propVal The property's value, formatted for display.
+ @param clientData Client-supplied data passed in to PDSElementEnumUserPropertiesAsASText().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt.
+ @ingroup Enumerators
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDSElementEnumUserPropertiesAsASTextProc)(ASText propName, ASText propVal, void *clientData);
+
+/**
+ A callback for PDSElementEnumUserPropertiesAsCosObj().
+
+ @param propDict The property dictionary, containing the property's name and its value.
+ @param clientData Client-supplied data passed in to PDSElementEnumUserPropertiesAsASText().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt.
+ @ingroup Enumerators
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDSElementEnumUserPropertiesAsCosObjProc)(CosObj propDict, void *clientData);
+
+/**
+ A callback for PDDocEnumPDSElementsWithUserProperties() and PDSElementEnumKidsWithUserProperties().
+
+ @param elem A PDS element that contains user properties, attributes, and classes.
+ @param closestAncestorWithUserProperties The nearest PDS element
+ above <code>elem</code> in the structure tree that also contains user
+ properties, attributes, and classes, or CosNewNull() if no
+ such element exists.
+ @param clientData Client-supplied data passed in to PDDocEnumPDSElementsWithUserProperties() and PDSElementEnumKidsWithUserProperties().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt.
+ @ingroup Enumerators
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *EnumElementsWithUserPropertiesProc)(PDSElement elem, PDSElement closestAncestorWithUserProperties, void *clientData);
+
+/**
+ Information about XML labels for exporting user properties.
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Tag</TH><TH>Name</TH></TR>
+ <TR><TD><code>nodeTag</code></TD><TD><code>"xyz_Node"</code></TD></TR>
+ <TR><TD><code>nodeNameTag</code></TD><TD><code>"xyz_NodeName"</code></TD></TR>
+ <TR><TD><code>propTag</code></TD><TD><code>"xyz_Property"</code></TD></TR>
+ <TR><TD><code>propNameTag</code></TD><TD><code>"xyz_PropertyName"</code></TD></TR>
+ <TR><TD><code>propValTag</code></TD><TD><code>"xyz_Value"</code></TD></TR>
+ </TABLE>
+
+ @example &lt;xyz_Node xyz_NodeName = "StructElem"&gt;
+ <p> &lt;xyz_Property xyz_PropertyName = "Part Number" xyz_Value = "123"/&gt;</p>
+ <p> &lt;xyz_Property xyz_PropertyName = "Cost" xyz_Value = "$4.99"/&gt;</p>
+ <p>&lt;/xyz_Node&gt; </p>
+*/
+typedef struct _t_PDUserPropertiesXMLLabels
+{ // tells us what to use for the xml node types and attribute names
+ ASSize_t size; // Size of the structure in bytes
+ ASText rootTag;
+ ASText nodeTag;
+ ASText propTag;
+ ASText classTag;
+ ASText classDefTag;
+ ASText nodeNameTag;
+ ASText propNameTag;
+ ASText propValueTag;
+ ASText propTypeTag;
+ ASText propFormatTag;
+ ASText propHiddenTag;
+ ASText classNameTag;
+ ASText classDefNameTag;
+} *PDUserPropertiesXMLLabels;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_PDSExpT */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadCalls.h
new file mode 100644
index 0000000..18d0ae7
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadCalls.h
@@ -0,0 +1,257 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSReadCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+*********************************************************************/
+
+#ifndef _H_PDSReadCalls
+#define _H_PDSReadCalls
+#include "acroassert.h"
+
+/* for Adobe use only */
+#define _PDSRead_LATEST_VERSION 0x00080000
+#define _PDSRead_LAST_BETA_COMPATIBLE_VERSION 0x00080000
+#define _PDSRead_IS_BETA 0
+
+/* for public use */
+#define PDSReadHFT_LATEST_VERSION (_PDSRead_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDSRead_LATEST_VERSION) : _PDSRead_LATEST_VERSION)
+
+#define PDSRead_VERSION_2 0x00020000
+#define PDSRead_VERSION_5 0x00050000
+#define PDSRead_VERSION_6 0x00060000
+#define PDSRead_VERSION_7 0x00070000
+#define PDSRead_VERSION_8 0x00080000
+
+
+#include "PDSReadHFTVers.h"
+#include "PDSExpT.h"
+#include "PEExpT.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PLUGIN
+#define PEX1 ACCB1
+#define PEX2 ACCB2
+#endif
+
+#ifndef PEX1
+#define PEX1 ACEX1
+#define PEX2 ACEX2
+#endif
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif /* NPROC */
+
+#if PDSEDIT_IN_CORE || ACROBAT_LIBRARY
+#if HAS_PDSEDIT_READ_PROCS
+ /* Implementation or static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #include "PDSReadProcs.h"
+ #undef NPROC
+#endif /* HAS_PDSEDIT_READ_PROCS */
+#else
+#if PLUGIN
+#include "PIRequir.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+#ifdef NPROC /* This might be defined in sys/procs.h (and the above includes seem to bring that file in) */
+#undef NPROC
+#endif /* NPROC */
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+
+ enum {
+ PDSReadBAD_SELECTOR,
+ #include "PDSReadProcs.h"
+ PDSReadNUMSELECTORSplusOne
+ };
+
+ #define PDSReadNUMSELECTORS (PDSReadNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #include "PDSReadProcs.h"
+ #undef NPROC
+
+#if PI_PDSEDIT_READ_VERSION != 0
+
+#ifdef THREAD_SAFE_PDFL
+ #define gPDSReadHFT (GetHFTLocations()->pdsReadHFT)
+ #define gPDSReadVersion (GetHFTLocations()->pdsReadVersion)
+#else
+ extern HFT gPDSReadHFT;
+ extern ASUns32 gPDSReadVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+ /* Define the macros */
+ #define PDDocGetStructTreeRoot (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDDocGetStructTreeRootSELPROTO)(gPDSReadHFT[PDDocGetStructTreeRootSEL])))
+ #define PDSTreeRootGetNumKids (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSTreeRootGetNumKidsSELPROTO)(gPDSReadHFT[PDSTreeRootGetNumKidsSEL])))
+ #define PDSTreeRootGetKid (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSTreeRootGetKidSELPROTO)(gPDSReadHFT[PDSTreeRootGetKidSEL])))
+ #define PDSTreeRootGetRoleMap (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSTreeRootGetRoleMapSELPROTO)(gPDSReadHFT[PDSTreeRootGetRoleMapSEL])))
+ #define PDSTreeRootGetClassMap (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSTreeRootGetClassMapSELPROTO)(gPDSReadHFT[PDSTreeRootGetClassMapSEL])))
+ #define PDSTreeRootGetElementFromID (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSTreeRootGetElementFromIDSELPROTO)(gPDSReadHFT[PDSTreeRootGetElementFromIDSEL])))
+
+ #define PDSElementGetType (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetTypeSELPROTO)(gPDSReadHFT[PDSElementGetTypeSEL])))
+ #define PDSElementGetParent (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetParentSELPROTO)(gPDSReadHFT[PDSElementGetParentSEL])))
+ #define PDSElementGetTitle (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetTitleSELPROTO)(gPDSReadHFT[PDSElementGetTitleSEL])))
+ #define PDSElementGetRevision (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetRevisionSELPROTO)(gPDSReadHFT[PDSElementGetRevisionSEL])))
+ #define PDSElementGetNumAttrObjs (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetNumAttrObjsSELPROTO)(gPDSReadHFT[PDSElementGetNumAttrObjsSEL])))
+ #define PDSElementGetAttrObj (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetAttrObjSELPROTO)(gPDSReadHFT[PDSElementGetAttrObjSEL])))
+ #define PDSElementGetNumClasses (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetNumClassesSELPROTO)(gPDSReadHFT[PDSElementGetNumClassesSEL])))
+ #define PDSElementGetClass (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetClassSELPROTO)(gPDSReadHFT[PDSElementGetClassSEL])))
+ #define PDSElementGetAlt (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetAltSELPROTO)(gPDSReadHFT[PDSElementGetAltSEL])))
+ #define PDSElementGetNumKids (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetNumKidsSELPROTO)(gPDSReadHFT[PDSElementGetNumKidsSEL])))
+ #define PDSElementGetKid (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetKidSELPROTO)(gPDSReadHFT[PDSElementGetKidSEL])))
+ #define PDSElementGetFirstPage (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetFirstPageSELPROTO)(gPDSReadHFT[PDSElementGetFirstPageSEL])))
+
+ #define PDSElementGetID (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetIDSELPROTO)(gPDSReadHFT[PDSElementGetIDSEL])))
+ #define PDSElementGetStructTreeRoot (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSElementGetStructTreeRootSELPROTO)(gPDSReadHFT[PDSElementGetStructTreeRootSEL])))
+
+ #define PDSAttrObjGetOwner (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSAttrObjGetOwnerSELPROTO)(gPDSReadHFT[PDSAttrObjGetOwnerSEL])))
+
+ #define PDSMCGetParent (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSMCGetParentSELPROTO)(gPDSReadHFT[PDSMCGetParentSEL])))
+
+ #define PDSOBJGetParent (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSOBJGetParentSELPROTO)(gPDSReadHFT[PDSOBJGetParentSEL])))
+
+ #define PDSRoleMapGetDirectMap (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSRoleMapGetDirectMapSELPROTO)(gPDSReadHFT[PDSRoleMapGetDirectMapSEL])))
+ #define PDSRoleMapDoesMap (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSRoleMapDoesMapSELPROTO)(gPDSReadHFT[PDSRoleMapDoesMapSEL])))
+
+ #define PDSClassMapGetNumAttrObjs (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSClassMapGetNumAttrObjsSELPROTO)(gPDSReadHFT[PDSClassMapGetNumAttrObjsSEL])))
+ #define PDSClassMapGetAttrObj (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_2), *((PDSClassMapGetAttrObjSELPROTO)(gPDSReadHFT[PDSClassMapGetAttrObjSEL])))
+ /* #define XXX (*((XXXSELPROTO)(gPDSReadHFT[XXXSEL]))) */
+
+/*
+** Acrobat 5.0 additions
+*/
+
+/* PI_PDSEDIT_READ_VERSION >= 0x00050000 */
+
+ #define PDSElementGetKidEx (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_5), *((PDSElementGetKidExSELPROTO)(gPDSReadHFT[PDSElementGetKidExSEL])))
+ #define PDSElementGetActualText (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_5), *((PDSElementGetActualTextSELPROTO)(gPDSReadHFT[PDSElementGetActualTextSEL])))
+ #define PDSElementGetLanguage (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_5), *((PDSElementGetLanguageSELPROTO)(gPDSReadHFT[PDSElementGetLanguageSEL])))
+
+ #define PDSElementHasAlt (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_5), *((PDSElementHasAltSELPROTO)(gPDSReadHFT[PDSElementHasAltSEL])))
+ #define PDSElementHasActualText (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_5), *((PDSElementHasActualTextSELPROTO)(gPDSReadHFT[PDSElementHasActualTextSEL])))
+ #define PDSElementHasLanguage (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_5), *((PDSElementHasLanguageSELPROTO)(gPDSReadHFT[PDSElementHasLanguageSEL])))
+
+
+/* PI_PDSEDIT_READ_VERSION >= 0x00060000 */
+
+ #define PDSElementGetKidWithMCInfo (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_6), *((PDSElementGetKidWithMCInfoSELPROTO)(gPDSReadHFT[PDSElementGetKidWithMCInfoSEL])))
+ #define PDSMCGetInfo (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_6), *((PDSMCGetInfoSELPROTO)(gPDSReadHFT[PDSMCGetInfoSEL])))
+ #define PDSMCIDGetParent (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_6), *((PDSMCIDGetParentSELPROTO)(gPDSReadHFT[PDSMCIDGetParentSEL])))
+ #define PDSMCGetPDEContainer (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_6), *((PDSMCGetPDEContainerSELPROTO)(gPDSReadHFT[PDSMCGetPDEContainerSEL])))
+ #define PDSElementGetCosObj (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_6), *((PDSElementGetCosObjSELPROTO)(gPDSReadHFT[PDSElementGetCosObjSEL])))
+ #define PDSAttrObjGetCosObj (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_6), *((PDSAttrObjGetCosObjSELPROTO)(gPDSReadHFT[PDSAttrObjGetCosObjSEL])))
+
+
+/* PI_PDSEDIT_READ_VERSION >= 0x00070000 */
+ #define PDDocHasUserProperties (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_7), *((PDDocHasUserPropertiesSELPROTO)(gPDSReadHFT[PDDocHasUserPropertiesSEL])))
+ #define PDDocEnumPDSElementsWithUserProperties (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_7), *((PDDocEnumPDSElementsWithUserPropertiesSELPROTO)(gPDSReadHFT[PDDocEnumPDSElementsWithUserPropertiesSEL])))
+ #define PDSElementHasUserProperties (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_7), *((PDSElementHasUserPropertiesSELPROTO)(gPDSReadHFT[PDSElementHasUserPropertiesSEL])))
+ #define PDSElementEnumUserPropertiesAsASText (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_7), *((PDSElementEnumUserPropertiesAsASTextSELPROTO)(gPDSReadHFT[PDSElementEnumUserPropertiesAsASTextSEL])))
+ #define PDSElementEnumUserPropertiesAsCosObj (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_7), *((PDSElementEnumUserPropertiesAsCosObjSELPROTO)(gPDSReadHFT[PDSElementEnumUserPropertiesAsCosObjSEL])))
+ #define PDSElementFindAncestorWithUserProperties (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_7), *((PDSElementFindAncestorWithUserPropertiesSELPROTO)(gPDSReadHFT[PDSElementFindAncestorWithUserPropertiesSEL])))
+ #define PDSElementEnumKidsWithUserProperties (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_7), *((PDSElementEnumKidsWithUserPropertiesSELPROTO)(gPDSReadHFT[PDSElementEnumKidsWithUserPropertiesSEL])))
+
+/* PI_PDSEDIT_READ_VERSION >= 0x00080000 */
+ #define PDSElementGetTitleASText (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_8), *((PDSElementGetTitleASTextSELPROTO)(gPDSReadHFT[PDSElementGetTitleASTextSEL])))
+ #define PDSElementGetAltASText (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_8), *((PDSElementGetAltASTextSELPROTO)(gPDSReadHFT[PDSElementGetAltASTextSEL])))
+ #define PDSElementGetActualTextASText (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_8), *((PDSElementGetActualTextASTextSELPROTO)(gPDSReadHFT[PDSElementGetActualTextASTextSEL])))
+ #define PDSElementExportUserProperties (ACROASSERT(gPDSReadVersion >=PDSRead_VERSION_8), *((PDSElementExportUserPropertiesSELPROTO)(gPDSReadHFT[PDSElementExportUserPropertiesSEL])))
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* PI_PDSEDIT_READ_VERSION != 0 */
+
+#endif /* PLUGIN */
+#endif /* PDSEDIT_IN_CORE || ACROBAT_LIBRARY */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PDSReadCalls */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadHFTVers.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadHFTVers.h
new file mode 100644
index 0000000..fa572e0
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadHFTVers.h
@@ -0,0 +1,26 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSReadHFTVers.h
+
+ - PDSRead HFT name and version.
+
+*********************************************************************/
+
+#ifndef _H_PDSReadHFTVers
+#define _H_PDSReadHFTVers
+
+#define PDSReadHFTName "PDSRead"
+
+#endif /* _H_PDSReadHFTVers */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadProcs.h
new file mode 100644
index 0000000..a1481d3
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSReadProcs.h
@@ -0,0 +1,1064 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSReadProcs.h
+
+ - Catalog of functions exported by PDSEdit.
+
+*********************************************************************/
+
+/*------------------------------------------------------------------------
+ PDS Objects (see PDSExpT.h).
+------------------------------------------------------------------------*/
+/*
+ PDSTreeRoot - Root of a structural tree.
+ PDSElement - Member of the structural tree (and super-class of PDSTreeRoot)
+ PDSAttrObj - Attribute Object
+ PDSMC - Marked Content (cover for PDEContainer)
+ PDSMCR - Marked Content Refence
+ PDSOBJR - PDF Object Reference
+ PDSRoleMap - RoleMap
+ PDSClassMap - ClassMap
+*/
+
+/*
+ * Struct Tree Root methods.
+ */
+
+
+/**
+ Gets the structure tree root for a document.
+ @param pdDoc The PDDoc whose root is obtained.
+ @param treeRoot (Filled by the method) The structure tree
+ root.
+ @return <code>true</code> if structure tree root found, <code>false</code> otherwise.
+
+ @see PDDocCreateStructTreeRoot
+ @see PDDocRemoveStructTreeRoot
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASBool, PDDocGetStructTreeRoot, (IN PDDoc pdDoc,
+ OUT PDSTreeRoot *treeRoot))
+
+/**
+ Gets the number of kids of the structure tree root.
+ <p>This may throw various exceptions.</p>
+
+ @param treeRoot IN/OUT The structure tree root whose number of
+ kids is obtained.
+ @return The number of kids of the structure tree root.
+ @see PDSTreeRootGetKid
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSTreeRootGetNumKids, (IN PDSTreeRoot treeRoot))
+
+/**
+ Gets the kid at an array index in the specified structure
+ tree root.
+ @param treeRoot The structure tree root whose kid is obtained.
+
+ @param index The index of the kid to obtain.
+ @param kid (Filled by the method) A pointer to the kid at
+ <code>index</code>.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSTreeRootGetNumKids
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (void, PDSTreeRootGetKid, (IN PDSTreeRoot treeRoot,
+ IN ASInt32 index,
+ OUT PDSElement *kid))
+
+/**
+ Gets the PDSRoleMap object for the specified structure tree
+ root.
+ <p>This may throw various exceptions.</p>
+
+ @param treeRoot The structure tree root whose PDSRoleMap
+ is obtained.
+ @param roleMap (Filled by the method) A pointer to a location
+ in which to return the role map, if one exists. Set it to CosNull
+ if there is no role map. If a <code>NULL</code> pointer is passed, no
+ retrieval will take place.
+ @return <code>true</code> if there is a role map, <code>false</code> otherwise.
+ @see PDSTreeRootCreateRoleMap
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASBool, PDSTreeRootGetRoleMap, (IN PDSTreeRoot treeRoot,
+ OUT PDSRoleMap *roleMap))
+
+/**
+ Gets the PDSClassMap object for the specified structure
+ tree root.
+ <p>This may throw various exceptions.</p>
+
+ @param treeRoot The structure tree root whose PDSClassMap
+ is obtained.
+ @param classMap (Filled by the method) A pointer to a location
+ in which to return the class map, if one exists. Set it to
+ CosNull if there is no class map. If a <code>NULL</code> pointer is passed,
+ no retrieval will take place.
+ @return <code>true</code> if there is a class map, <code>false</code> otherwise.
+ @see PDSTreeRootCreateClassMap
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASBool, PDSTreeRootGetClassMap, (IN PDSTreeRoot treeRoot,
+ OUT PDSClassMap *classMap))
+
+/**
+ Gets the element associated with the given ID, if any.
+ @param treeRoot The structure tree root in which to search
+ for <code>id</code>.
+ @param id A pointer to a buffer containing the ID to search
+ for.
+ @param numChars The number of characters in <code>id</code>.
+ @param element (Filled by the method) The element corresponding
+ to <code>id</code>. It is undefined if no element has the specified <code>id</code>.
+ @return <code>true</code> if an element for <code>id</code> is found, or <code>false</code> with element undefined
+ if the tree root contains no IDTree value.
+ @exception pdsErrWrongTypeParameter is raised if <code>id</code> is <code>NULL</code> or <code>numChars</code>
+ is zero or less.
+ @exception pdsErrWrongTypeEntry is raised if the <code>IDTree</code> value in <code>treeRoot</code>
+ is not a dictionary.
+ @see PDSElementGetID
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASBool, PDSTreeRootGetElementFromID,(IN PDSTreeRoot treeRoot,
+ IN const char *id,
+ IN ASInt32 numChars,
+ OUT PDSElement *element))
+/*
+ * PDSElement methods.
+ */
+
+/**
+ Gets the element's structural element type. The type corresponds
+ to the Subtype key in the structure element dictionary. See the <i>PDF Reference</i> for more information.
+
+ <p>PDSElementGetType() gets the value of the Subtype key (not
+ the Type key) in the structure element dictionary. All PDSElement objects
+ have a Type value of StructElem. </p>
+
+ @param element The element whose structural element type
+ is obtained.
+ @return The ASAtom representing element's type.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementSetType
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASAtom, PDSElementGetType, (IN PDSElement element))
+
+/**
+ Gets the immediate ancestor element of the specified element
+ in the tree.
+
+ <p>If the element's parent is another element, <code>parent</code> is set
+ to that parent and <code>parentIsTreeRoot</code> is set to <code>false</code>. If
+ the element's parent is the structure tree root, <code>parent</code>
+ is set to CosNull and <code>parentIsTreeRoot</code> is set to <code>true</code>. If
+ <code>parentIsTreeRoot</code> is <code>NULL</code>, it is not set. </p>
+
+ @param element The element whose parent is obtained.
+ @param parent (Filled by the method) The element's parent.
+
+ @param parentIsTreeRoot (Filled by the method) The element's
+ parent is the structure tree root.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetKid
+ @see PDSElementGetStructTreeRoot
+ @see PDSMCGetInfo
+ @see PDSOBJGetParent
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (void, PDSElementGetParent, (IN PDSElement element,
+ OUT PDSElement *parent,
+ OUT ASBool *parentIsTreeRoot))
+
+/**
+ Gets the title of the specified element, returning the number
+ of bytes in the title. See the <i>PDF Reference</i> for more information.
+
+ <p>It can first be called with a <code>NULL</code> buffer to find the title
+ size, so that buffer can be appropriately sized as one greater
+ than the title's length. </p>
+ @param element IN/OUT The element whose title is obtained.
+ @param buffer IN/OUT (Filled by the method) A buffer into which
+ the title text is placed. It may be <code>NULL</code>, in which case the
+ number of bytes in the title is returned.
+ @return The number of bytes in the <code>element</code> parameter's title, or zero if <code>element</code> has
+ no title.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementSetTitle
+
+ @note Due to implementation issues, make the buffer one
+ byte larger than the required size.
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetTitle, (IN PDSElement element,
+ OUT ASUns8 *buffer))
+
+/**
+ Gets the revision number of an element. See the <i>PDF Reference</i> for more information.
+ @param element IN/OUT The element whose revision is obtained.
+
+ @return The revision number of <code>element</code>.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementIncrementRevision
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetRevision, (IN PDSElement element))
+
+/**
+ Gets the number of attribute objects directly attached to
+ the specified element.
+ @param element IN/OUT The element whose number of attributes is
+ obtained.
+ @return The number of attribute objects directly attached to <code>element</code>.
+
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetAttrObj
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetNumAttrObjs, (IN PDSElement element))
+
+/**
+ Gets the attribute object at a specified array index in
+ the specified element.
+
+ <p>If there is only one attribute object (that is, there is
+ no array of attributes), and <code>index</code> is zero, that attribute
+ object is obtained. </p>
+
+ @param element IN/OUT The element whose attribute is obtained.
+
+ @param index IN/OUT The index of the attribute object to obtain.
+ @param attrObj IN/OUT (Filled by the method) The attribute object
+ at <code>index</code>.
+ @return The revision number of <code>element</code> at time of last association.
+
+ @exception pdsErrRequiredMissing
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementAddAttrObj
+ @see PDSElementGetNumAttrObjs
+ @see PDSElementRemoveAttrObj
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetAttrObj, (IN PDSElement element,
+ IN ASInt32 index,
+ OUT PDSAttrObj *attrObj))
+
+/**
+ Gets the number of classes to which the specified element
+ belongs.
+ @param element The element whose number of classes is
+ obtained.
+ @return The number of classes to which <code>element</code> belongs.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetClass
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetNumClasses, (IN PDSElement element))
+
+/**
+ Gets the class name at an array index in the specified element.
+
+ <p>If there is only one attribute object (that is, there is
+ no array), and <code>index</code> is zero, that class name is obtained. </p>
+
+ @param element The element whose class is obtained.
+ @param index The index of the class to obtain.
+ @param classAtom (Filled by the method) The ASAtom describing
+ the class.
+ @return The revision number of <code>element</code> at the time of the last association.
+
+ @exception pdsErrRequiredMissing
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementAddClass
+ @see PDSElementGetNumClasses
+ @see PDSElementRemoveAllClasses
+ @see PDSElementRemoveClass
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetClass, (IN PDSElement element,
+ IN ASInt32 index,
+ OUT ASAtom *classAtom))
+
+/**
+ Gets the alternate text associated with an element.
+
+ <p>It can first be called with a <code>NULL</code> buffer to find the size,
+ so that buffer can then be appropriately sized. </p>
+ @param element The element whose alternate text is obtained.
+
+ @param buffer (Filled by the method) A buffer into which
+ the alternate text is placed. It may be <code>NULL</code>, if the method
+ is called only to find the length of the element's alternate
+ text. If it is not <code>NULL</code>, <code>buffer</code> contains the element's actual
+ text. The string is <code>NULL</code>-terminated (but not correctly for
+ Unicode). This is not a C-style string, so normal string
+ handling functions may not work; the buffer may contain
+ a Unicode string.
+ @return The number of bytes in the <code>element</code> parameter's alternate text.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementSetAlt
+ @see PDSElementHasAlt
+
+ @note The Alt text can be legally defined as an empty string.
+ To differentiate between an Alt text string of zero length
+ and no Alt text being defined, call PDSElementHasAlt() first.
+
+ @note Due to implementation issues, make the buffer one
+ byte larger than the required size. The code will not <code>NULL</code>-terminate
+ the string correctly in the case of Unicode strings.
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetAlt, (IN PDSElement element,
+ IN ASUns8 *buffer))
+
+/**
+ Gets the number of kids of the specified element.
+ @param element IN/OUT The element whose number of kids is obtained.
+
+ @return The number of direct kids of <code>element</code>.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetKid
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetNumKids, (IN PDSElement element))
+
+/**
+ Gets the kid at an array index in the specified element.
+
+ <p>A PDF structural element, unlike the structure tree root, can
+ have several different kinds of children: marked content,
+ another element, or an entire PDF object. The parameter
+ in which the kid is placed depends on the type of kid. If
+ the kid is a structural element or an object reference,
+ PDSElementGetKid() places the result in <code>cosObjKid</code>; if the
+ kid is page content, it is placed in <code>pointerKid</code>. </p>
+
+ <p>Any or all of cosObjKid, pointerKid, and cosPage can be
+ <code>NULL</code> to get the kid's type without setting that parameter. </p>
+
+ @param element The element whose specified kid is found.
+ @param index The index of the kid to obtain.
+ @param cosObjKid (Filled by the method) The CosObj of
+ the specified kid, if that kid is a PDSElement or an OBJR.
+ If <code>cosObjKid</code> is <code>NULL</code>, it is not filled in, but the type
+ of the kid is returned regardless. Note that this CosObj can
+ be treated as a PDSElement or a PDSObjR. Use the return
+ type to decide which to use.
+ @param pointerKid (Filled by the method) A pointer to the
+ kid at <code>index</code>, if that kid is an MC. If <code>pointerKid</code> is <code>NULL</code>,
+ it is not filled in, but the type of the kid is returned
+ regardless.
+ @param cosPage (Filled by the method) A pointer to the CosObj
+ of the page containing the kid. If <code>cosPage</code> is <code>NULL</code>, it is
+ not filled in, but the type of the kid is returned regardless.
+ @return The ASAtom representing the kid's Type value: StructElem,
+ MC, or OBJR. MCR is never returned.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSElementGetFirstPage
+ @see PDSElementGetKidEx
+ @see PDSElementGetKidWithMCInfo
+ @see PDSElementGetNumKids
+ @see PDSElementInsertKid
+
+ @note When the kid is an MC, it is actually a pointer of
+ the type PDEContainer. As with all PDFEdit objects, you
+ must be careful to manage the reference count of the object
+ by calling PDEAcquire() and PDERelease(). PDSElementGetKid() does
+ not call PDEAcquire() for you.
+
+ @note This method cannot access marked content inside a
+ Form XObject.
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASAtom, PDSElementGetKid, (IN PDSElement element,
+ IN ASInt32 index,
+ OUT CosObj *cosObjKid,
+ OUT void **pointerKid,
+ OUT CosObj *cosPage))
+
+/**
+ Gets the Cos object for the page of the first kid of the
+ element.
+
+ <p>This may throw various exceptions.</p>
+
+ @param pdsElement IN/OUT The element whose kid's first page is found.
+
+ @param firstKidType IN/OUT (Filled by the method) A pointer to an
+ ASAtom for the name that appears as the Type entry of the
+ actual first kid of <code>element</code>. Possible values are the values
+ that PDSElementGetKid() can return. Pass <code>NULL</code> to inhibit setting
+ <code>firstKidType</code>.
+ @param firstCosObjKidOnAPage IN/OUT (Filled by the method) The
+ kid whose content determined that the page returned was
+ the first page with content, if that kid is a CosObj. Pass
+ <code>NULL</code> to inhibit setting <code>firstCosObjKidOnAPage</code>.
+ @param firstMCKidOnAPage IN/OUT (Filled by the method) The kid
+ whose content determined that the page returned was the
+ first page with content, if that kid is marked content
+ that is not a CosObj. Pass <code>NULL</code> to inhibit setting <code>firstMCKidOnAPage</code>.
+
+ @return The CosObj of the page found, CosObjNull if the element
+ has no page content.
+ @see PDSElementGetKid
+
+ @note The order in which the returned page is first is the
+ order of kids, not the order of pages. That is, the first
+ descendant with page content determines which page is returned.
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (CosObj, PDSElementGetFirstPage, (IN PDSElement pdsElement,
+ OUT ASAtom *firstKidType,
+ OUT CosObj *firstCosObjKidOnAPage,
+ OUT PDEContainer *firstMCKidOnAPage))
+
+/**
+ Gets the ID of an element, or CosObjNull if there is no ID
+ set.
+ @param pdsElement The element whose ID is obtained.
+ @param idBuf (Filled by the method) A pointer to the buffer
+ containing the element's ID.
+ @return The number of bytes in the ID, or zero if the element has
+ no ID.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSElementClearID
+ @see PDSElementSetID
+ @see PDSTreeRootGetElementFromID
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSElementGetID, (IN PDSElement pdsElement,
+ OUT ASUns8 *idBuf))
+
+/**
+ Gets the structure tree root of the document containing
+ element.
+ @param element The element whose title is obtained.
+ @param treeRoot (Filled by the method) The structure tree
+ root.
+ @return <code>true</code> if the document has a structure tree root, <code>false</code> otherwise.
+ If there is a structure tree root, it sets <code>treeRoot</code> to be the
+ structure tree root.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSTreeRootGetKid
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASBool, PDSElementGetStructTreeRoot,(IN PDSElement element,
+ OUT PDSTreeRoot *treeRoot))
+
+/*
+ * Atrribute Object method
+*/
+
+/**
+ Gets the value of the key (Owner) in the specified attribute
+ object.
+ <p>This may throw various exceptions.</p>
+
+ @param element The attribute object whose owner is obtained.
+ @return The ASAtom for the owner's name.
+ @see PDSAttrObjCreate
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASAtom, PDSAttrObjGetOwner, (IN PDSAttrObj element))
+/*
+ * Marked Content Container method
+ */
+
+
+/**
+ Gets the parent element of the specified marked content.
+
+ @param containingObj The CosObj containing the MC whose
+ parent is obtained. For marked content on a page, this is
+ the Cos object representing the page. For marked content
+ elsewhere, this is the stream in which the marked content
+ resides.
+ @param mc The marked content whose parent is obtained.
+
+ @param parent (Filled by the method) The parent element of
+ <code>containingObj</code>.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file. It will also raise the error if the PDSMC passed to it is not in the structure tree.
+ @see PDSElementGetParent
+ @see PDSElementInsertMCAsKid
+ @see PDSElementRemoveKidMC
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (void, PDSMCGetParent, (IN CosObj containingObj,
+ IN PDSMC mc,
+ OUT PDSElement *parent))
+/*
+ * PDSOBJR methods
+ */
+
+/**
+ Gets the parent element of the specified PDF object.
+ <p>This may throw various exceptions.</p>
+
+ @param obj IN/OUT The PDF object whose parent element is obtained.
+ It must be referred to via an OBJR from some element (that
+ is, it has a <code>struct</code> parent key), otherwise it is undefined.
+ @param parent IN/OUT (Filled by the method) The parent element of
+ <code>obj</code>.
+ @see PDSElementGetParent
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (void, PDSOBJGetParent, (IN CosObj obj,
+ OUT PDSElement *parent))
+
+/*
+ * RoleMap methods.
+ */
+
+
+/**
+ Gets the type, if any, directly mapped in the specified
+ PDSRoleMap for the given element type.
+ @param roleMap The PDSRoleMap.
+ @param type The ASAtom for an element type whose mapping
+ is found.
+ @return The ASAtom for the equivalent type specified in <code>roleMap</code>,
+ or ASAtomNull if type has no mapping in <code>roleMap</code>.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSRoleMapDoesMap
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASAtom, PDSRoleMapGetDirectMap, (IN PDSRoleMap roleMap,
+ IN ASAtom type))
+
+/**
+ Determines whether the specified PDSRoleMap provides any
+ mapping path for two given element types.
+ @param roleMap IN/OUT The PDSRoleMap.
+ @param src IN/OUT The ASAtom for an element type whose mapping
+ is tested.
+ @param dst IN/OUT The ASAtom for an element type. Note that this may
+ be a standard element type.
+ @return <code>true</code> if an mapping path was found, <code>false</code> otherwise.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSRoleMapMap
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASBool, PDSRoleMapDoesMap, (IN PDSRoleMap roleMap,
+ IN ASAtom src,
+ IN ASAtom dst))
+/*
+ * ClassMap methods.
+ */
+
+
+/**
+ Gets the number of attribute objects associated with a class
+ name.
+ <p>This may throw various exceptions.</p>
+
+ @param classMap IN/OUT The PDSClassMap.
+ @param classAtom IN/OUT The ASAtom of a class name for which the
+ number of associated attribute objects is found.
+ @return The number of attribute objects associated with the class in
+ <code>classAtom</code>.
+ @see PDSClassMapGetAttrObj
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (ASInt32, PDSClassMapGetNumAttrObjs, (IN PDSClassMap classMap,
+ IN ASAtom classAtom))
+
+/**
+ Gets the attribute object associated with the specified
+ class name at an index in the class.
+
+ <p>If there is only one object and index is zero, that object
+ is retrieved. </p>
+
+ <p>This may throw various exceptions.</p>
+
+ @param classMap The PDSClassMap.
+ @param classAtom The ASAtom of a class name for which
+ an associated attribute objects is found.
+ @param index The index of the desired attribute object in
+ the class.
+ @param attrObj (Filled by the method) The attribute object
+ at <code>index</code>. Set it to CosNull if there is no attribute object
+ at the specified location.
+ @see PDSClassMapAddAttrObj
+ @see PDSClassMapGetNumAttrObjs
+ @since PI_PDS_READ_VERSION >= 0x00040000
+*/
+NPROC (void, PDSClassMapGetAttrObj, (IN PDSClassMap classMap,
+ IN ASAtom classAtom,
+ IN ASInt32 index,
+ OUT PDSAttrObj *attrObj))
+/*
+ * New in Acrobat 5
+ */
+
+
+/**
+ Functions identically to PDSElementGetKid(), but for children
+ that are marked contents can return the <code>mcid</code> as well as
+ or instead of the actual object.
+
+ @note This method cannot access marked content inside a
+ Form XObject.
+ @param element The PDSElement containing the kid that
+ is retrieved.
+ @param index The index of the kid.
+ @param cosObjKid (Filled in by method) The kid being accessed
+ (depending on the kid's type) or <code>NULL</code>.
+ @param mcid (Filled in by method) The kid's <code>mcid</code> or <code>NULL</code>.
+
+ @param pointerKid (Filled in by method) A pointer to the
+ kid, or <code>NULL</code>.
+ @param cosPage (Filled in by method) The CosObj of the
+ page containing the kid, or <code>NULL</code>.
+ @return An ASAtom representing the Type value of the kid. See above.
+
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSElementGetKid
+ @see PDSElementGetKidWithMCInfo
+ @since PI_PDS_READ_VERSION >= 0x00050000
+*/
+NPROC (ASAtom, PDSElementGetKidEx, (IN PDSElement element,
+ IN ASInt32 index,
+ OUT CosObj* cosObjKid,
+ OUT ASInt32* mcid,
+ OUT void** pointerKid,
+ OUT CosObj* cosPage))
+/**
+ Gets the actual text associated with the specified PDSElement.
+ It returns the number of bytes in the text, or <code>0</code> if the element
+ has no actual text or has an empty string.
+
+ <p>To check for the existence of alternate text, check for
+ a non-zero return value. To get the needed size of <code>buffer</code>,
+ call this method with a <code>NULL</code> buffer. </p>
+
+ @param element The structural element whose actual text
+ is sought.
+ @param buffer If not <code>NULL</code>, <code>buffer</code> contains the element's
+ actual text. The string is <code>NULL</code>-terminated (but not correctly
+ for Unicode). This is not a C-style string, so normal string
+ handling functions may not work; the buffer may contain
+ a Unicode string.
+ @return An ASInt32 representing the number of bytes in the text,
+ or <code>0</code> if the element has no actual text.
+ @see PDSElementSetActualText
+
+ @note Due to implementation issues, make the buffer one
+ byte larger than the required size. Code will not <code>NULL</code>-terminate
+ the string correctly in the case of Unicode strings.
+ @since PI_PDS_READ_VERSION >= 0x00050000
+*/
+NPROC (ASInt32, PDSElementGetActualText, (IN PDSElement element,
+ IN ASUns8 *buffer))
+
+/**
+ Gets the language associated with the specified PDSElement.
+
+ <p>It returns the number of bytes in the language string, or <code>0</code>
+ if the element has no language or has an empty string. </p>
+
+ <p>To check for the existence of expansion text, call PDSElementHasLanguage().
+ To get the needed buffer size, call this method with a <code>NULL</code>
+ buffer. </p>
+ @param element The structural element whose expansion
+ text is sought.
+ @param buffer (Filled by the method) A buffer containing
+ the element's expansion text, or <code>NULL</code>. See PDSElementSetLanguage()
+ for format and languages. If not <code>NULL</code>, buffer contains the
+ element's expansion text. The string is <code>NULL</code>-terminated
+ (but not correctly for Unicode). This is not a C-style string,
+ so normal string handling functions may not work; the buffer
+ may contain a Unicode string.
+ @return An ASInt32 representing the number of bytes in the language
+ string.
+ @see PDSElementSetLanguage
+ @see PDSElementHasLanguage
+
+ @note Due to implementation issues, make the buffer one
+ byte larger than the required size. Code will not <code>NULL</code>-terminate
+ the string correctly in the case of Unicode strings.
+ @since PI_PDS_READ_VERSION >= 0x00050000
+*/
+NPROC (ASInt32, PDSElementGetLanguage, (IN PDSElement element,
+ IN ASUns8 *buffer))
+
+/**
+ Tests whether Alt text is defined for a given PDSElement. See the <i>PDF Reference</i> for more information.
+
+ @param element The PDSElement being tested.
+ @return <code>true</code> if text exists (including the empty string); <code>false</code>
+ otherwise.
+ @see PDSElementGetAlt
+ @since PI_PDS_READ_VERSION >= 0x00050000
+*/
+NPROC (ASBool, PDSElementHasAlt, (IN PDSElement element))
+
+/**
+ Tests whether ActualText is defined for a given PDSElement. See the <i>PDF Reference</i> for more information.
+
+ @param element The PDSElement being tested.
+ @return <code>true</code> if text exists (including the empty string); <code>false</code>
+ otherwise.
+ @since PI_PDS_READ_VERSION >= 0x00050000
+*/
+NPROC (ASBool, PDSElementHasActualText, (IN PDSElement element))
+
+/**
+ Tests whether a language string is defined for a given PDSElement.
+
+ @param element The PDSElement being tested.
+ @return <code>true</code> if text exists (including the empty string); <code>false</code>
+ otherwise.
+ @since PI_PDS_READ_VERSION >= 0x00050000
+*/
+NPROC (ASBool, PDSElementHasLanguage, (IN PDSElement element))
+
+/**
+ Functions identically to PDSElementGetKidEx(), but returns
+ additional information about marked content kids that are
+ in streams other than the page content streams.
+ @param element The PDSElement containing the kid that
+ is retrieved.
+ @param index The index of the kid.
+ @param cosObjKid (Filled in by method) The kid being accessed
+ (depending on the kid's type), or <code>NULL</code>.
+ @param mcidInfo (Filled in by method) The kid's information
+ object, or <code>NULL</code>.
+ @param pointerKid (Filled in by method) A pointer to the
+ kid, or <code>NULL</code>.
+ @param cosPage (Filled in by method) The CosObj of the
+ page containing the kid, or <code>NULL</code>.
+ @return An ASAtom representing the Type value of the kid.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSElementGetKid
+ @see PDSElementGetKidEx
+ @since PI_PDS_READ_VERSION >= 0x00060000
+*/
+NPROC (ASAtom, PDSElementGetKidWithMCInfo, (PDSElement element,
+ ASInt32 index,
+ CosObj* cosObjKid,
+ PDSMCInfoP mcidInfo,
+ void** pointerKid,
+ CosObj* cosPage))
+/**
+ Gets information about how the specified marked content
+ is contained in its parent.
+ @param containingObj The CosObj containing the MC whose
+ information is obtained. For marked content on a page, this
+ is the Cos object representing the page. For marked content
+ elsewhere, this is the stream in which the marked content
+ resides.
+ @param mc The marked content whose information is obtained.
+
+ @param info (Filled by the method) A pointer to a structure
+ that the method fills with information about <code>containingObj</code>.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file. It will also raise the error if the PDSMC passed to it is not in the structure tree.
+
+ @note This method cannot access marked content inside a
+ Form XObject.
+ @since PI_PDS_READ_VERSION >= 0x00060000
+*/
+NPROC (void, PDSMCGetInfo, (CosObj containingObj,
+ PDSMC mc,
+ PDSMCInfoP info))
+
+/**
+ Gets the parent element of the specified marked content,
+ referred to by its containing object and marked-content
+ identifier.
+ @param mcid The identifier (MCID) of the marked content
+ whose parent is obtained.
+ @param containingObj The CosObj containing the marked
+ content whose parent is obtained. For marked content on
+ a page, this is the Cos object representing the page. For
+ marked content elsewhere, this is the stream in which the
+ marked content resides.
+ @param parent (Filled by the method) The parent element of
+ <code>containingObj</code>.
+ @return <code>true</code> if the parent is successfully obtained, <code>false</code> otherwise.
+
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file. It will also raise the error if the PDSMC passed to it is not in the structure tree.
+ @see PDSMCGetParent
+ @see PDSElementGetParent
+ @since PI_PDS_READ_VERSION >= 0x00060000
+*/
+NPROC (ASBool, PDSMCIDGetParent, (ASInt32 mcid,
+ CosObj containingObj,
+ PDSElement* parent))
+/**
+ Gets the PDE container object for the specified marked content.
+
+ @param mc The marked content whose container is obtained.
+ @return The PDE container object.
+ @since PI_PDS_READ_VERSION >= 0x00060000
+*/
+NPROC (PDEContainer, PDSMCGetPDEContainer, (PDSMC mc))
+
+/**
+ Gets the Cos object corresponding to the specified element
+ object. This method does not copy the object, but is instead
+ the logical equivalent of a type cast.
+ @param element The element object whose Cos object is
+ obtained.
+ @return The dictionary Cos object for the element object.
+ @since PI_PDS_READ_VERSION >= 0x00060000
+*/
+NPROC (CosObj, PDSElementGetCosObj, (PDSElement element))
+/**
+ Gets the Cos object corresponding to the specified attribute
+ object. This method does not copy the object, but is instead
+ the logical equivalent of a type cast.
+ @param attrObj The attribute object whose Cos object is
+ obtained.
+ @return The dictionary Cos object for the attribute object.
+ @since PI_PDS_READ_VERSION >= 0x00060000
+*/
+NPROC (CosObj, PDSAttrObjGetCosObj, (PDSAttrObj attrObj))
+
+/**
+ <p>Returns <code>true</code> if the document declares that it has
+ structure elements that conform to the UserProperties
+ attributes or class conventions.</p>
+
+ <p>This is based on both the presence of StructTreeRoot,
+ and a value of <code>"true"</code> for the UserProperties
+ key in the document's MarkInfo dictionary.</p>
+
+ @param doc The PDDoc to be examined.
+ @return An ASBool indicating whether the document declares that it has structure elements with UserProperties attributes or classes.
+ @since PI_PDS_READ_VERSION >= 0x00070000
+*/
+NPROC (ASBool, PDDocHasUserProperties, (PDDoc doc))
+
+/**
+ Enumerates the elements in the document's structure
+ tree that have UserProperties attributes or classes,
+ calling the supplied enumeration procedure for each
+ such element found. The procedure returns <code>true</code> to
+ continue enumeration, or <code>false</code> to halt enumeration.
+
+ @param doc The PDDoc whose structure elements are to be enumerated.
+ @param proc The procedure to call for each PDSElement found to have UserProperties.
+ @param clientData Client-supplied data to be passed to the client callback.
+ @return <code>true</code> if the enumeration completes, <code>false</code> if the enumeration callback returns <code>false</code>.
+ @ingroup Enumerators
+ @since PI_PDS_READ_VERSION >= 0x00070000
+*/
+NPROC (ASBool, PDDocEnumPDSElementsWithUserProperties, (PDDoc doc,
+ EnumElementsWithUserPropertiesProc proc,
+ void *clientData))
+
+/**
+ Returns <code>true</code> if the PDSElement has attribute objects
+ or class objects with an owner of UserProperties.
+
+ @param elem The PDSElement to examine.
+ @return ASBool indicating that some attribute objects or class objects have an owner of UserProperties.
+ @since PI_PDS_READ_VERSION >= 0x00070000
+*/
+NPROC (ASBool, PDSElementHasUserProperties, (PDSElement elem))
+
+/**
+ Enumerates the PDSElement object's user properties by traversing
+ the list of attribute objects and class objects, calling
+ the caller-supplied procedure for each entry in the
+ properties array. The enumeration proc receives the
+ property information as a pair of ASText objects, for the
+ property name and the property value. The enumeration
+ continues as long as the callback returns <code>true</code>, and halts
+ when the proc returns <code>false</code> or all properties have been
+ enumerated.
+
+ @param elem The PDSElement whose user properties will be enumerated.
+ @param proc The callback that is called for each user property item.
+ @param clientData Client-supplied data to be passed to the client callback.
+ @param includeHidden A boolean value indicating whether the client wants to be given property items that are marked as hidden.
+ @return <code>true</code> if the enumeration completes, <code>false</code> if the enumeration callback returns <code>false</code>.
+ @see PDSElementEnumUserPropertiesAsCosObj
+ @since PI_PDS_READ_VERSION >= 0x00070000
+*/
+NPROC (ASBool, PDSElementEnumUserPropertiesAsASText, (PDSElement elem,
+ PDSElementEnumUserPropertiesAsASTextProc proc,
+ void *clientData,
+ ASBool includeHidden))
+
+/**
+ Enumerates the PDSElement object's user properties by traversing
+ the list of attribute objects and class objects, calling
+ the caller-supplied procedure for each entry in the
+ properties array. The enumeration proc receives the
+ property information as a Cos Dictionary, with contents
+ as described in the <i>PDF Reference</i>. The enumeration
+ continues as long as the callback returns <code>true</code>, and halts
+ when the proc returns <code>false</code> or all properties have been
+ enumerated.
+
+ @param elem The PDSElement whose user properties will be enumerated.
+ @param proc The callback that is called for each user property item.
+ @param clientData Client-supplied data to be passed to the client callback.
+ @param includeHidden A boolean value indicating whether the client wants to be given property items that are marked as hidden.
+ @return <code>true</code> if the enumeration completes, <code>false</code> if the enumeration callback returns <code>false</code>.
+ @see PDSElementEnumUserPropertiesAsASText
+ @since PI_PDS_READ_VERSION >= 0x00070000
+*/
+NPROC (ASBool, PDSElementEnumUserPropertiesAsCosObj, (PDSElement elem,
+ PDSElementEnumUserPropertiesAsCosObjProc proc,
+ void *clientData,
+ ASBool includeHidden))
+
+/**
+ Starting at the supplied structure element, this procedure
+ follows the chain of parents (see PDSElementGetParent()) until
+ a structure element is found that has user properties. If no
+ such element is found (for example, the chain ended at the structure
+ tree root), CosNull is returned.
+
+ @param elem The PDSElement at which to start searching upwards through the tree.
+ @return The first ancestor of <code>elem</code> that contains UserProperties attributes or class information, or CosNull if none is found.
+ @see PDSElementEnumKidsWithUserProperties
+ @since PI_PDS_READ_VERSION >= 0x00070000
+*/
+NPROC (PDSElement, PDSElementFindAncestorWithUserProperties, (PDSElement elem))
+
+/**
+ Enumerates PDSElement objects, beneath the supplied PDSElement, that
+ have user properties attributes/classes.
+
+ <p>The elements in a structure tree that have user properties
+ form a virtual tree themselves; this procedure enumerates
+ the children of the given structure element in this virtual
+ tree. In other words, this procedure enumerates all the
+ descendents(<code>d</code>) of the supplied structure element(<code>e</code>) such that
+ <code>PDSElementFindAncestorWithUserProperties(d)</code> would return (<code>e</code>).
+ The enumeration continues as long as the callback returns
+ <code>true</code>, and halts when the proc returns <code>false</code> or all virtual
+ children have been enumerated.</p>
+
+ @param elem The PDSElement below which to search for elements with user properties.
+ @param proc The client-supplied callback to call for each element found.
+ @param clientData Client-supplied data to be passed to the client callback.
+ @return <code>true</code> if the enumeration completes, <code>false</code> if the enumeration callback returns <code>false</code>.
+ @see PDSElementFindAncestorWithUserProperties
+ @ingroup Enumerators
+ @since PI_PDS_READ_VERSION >= 0x00070000
+*/
+NPROC (ASBool, PDSElementEnumKidsWithUserProperties, (PDSElement elem,
+ EnumElementsWithUserPropertiesProc proc,
+ void *clientData))
+
+/**
+ Gets the title associated with the specified PDSElement as an ASText object.
+
+ @param element The element whose title is sought.
+ @param title (Filled by the method) The text object containing the title.
+ The client must pass a valid ASText object. The routine does not allocate it.
+
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetTitle
+ @see PDSElementSetTitleASText
+ @see PDSElementSetTitle
+ @since PI_PDS_READ_VERSION >= 0x00080000
+*/
+NPROC (void, PDSElementGetTitleASText, (PDSElement element, ASText title))
+
+/**
+ Gets the actual text associated with the specified PDSElement as an ASText object.
+
+ @param element The element whose actual text is sought.
+ @param text (Filled by the method) The text object containing the element's actual text.
+ The client must pass a valid ASText object. The routine does not allocate it.
+
+ @see PDSElementGetActualText
+ @see PDSElementSetActualTextASText
+ @see PDSElementSetActualText
+ @since PI_PDS_READ_VERSION >= 0x00080000
+*/
+NPROC (void, PDSElementGetActualTextASText, (PDSElement element, ASText text))
+
+/**
+ Gets the alternate text associated with the specified PDSElement as an ASText object.
+
+ @param element The element whose alternate text is sought.
+ @param text (Filled by the method) The text object containing
+ the element's alternate text. The client must pass a valid ASText object.
+ The routine does not allocate it.
+
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetAlt
+ @see PDSElementSetAltASText
+ @see PDSElementSetAlt
+ @see PDSElementHasAlt
+ @since PI_PDS_READ_VERSION >= 0x00080000
+*/
+NPROC (void, PDSElementGetAltASText, (PDSElement element, ASText text))
+
+/**
+ Exports user properties of the specified PDSElement in XML.
+
+ @param userPropsElement The element whose user properties are to be exported
+ in XML format.
+ @param wholeSubtree A boolean value indicating whether to export user properties of
+ the whole structure tree which contains <code>userPropsElement</code>, or
+ just the subtree which starts from <code>userPropsElement</code>.
+ @param includeHidden A boolean value indicating whether the client wants to be given
+ property items that are marked as hidden.
+ @param flattenClasses A boolean value indicating whether to flatten the attribute classes for each structure
+ element. If <code>true</code>, the user properties for that class will be listed as properties for
+ that stucture element. If <code>false</code>, the class will be listed for that structure element, and
+ a list of classes and their properties will be listed near the end of the XML.
+ @param xmlLabels The XML tag/label information for exporting user properties. These labels are output as is.
+ There is no XML escaping done. It is the caller's responsibility to make sure they conform
+ to the XML standard.
+ @param output The output stream to which user properties are written. The encoding of the characters is UTF-8.
+
+ @return An ASErrorCode to indicate the success of exporting user properties in XML format.
+ If ASErrorCode is <code>0</code>, it indicates success in exporting user properties; non-zero
+ value indicates otherwise.
+
+ @see PDUserPropertiesXMLLabels
+ @since PI_PDS_READ_VERSION >= 0x00080000
+*/
+NPROC (ASErrorCode, PDSElementExportUserProperties, (PDSElement userPropsElement, ASBool wholeSubtree, ASBool includeHidden, ASBool flattenClasses, PDUserPropertiesXMLLabels xmlLabels, ASStm output))
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteCalls.h
new file mode 100644
index 0000000..7be4bb1
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteCalls.h
@@ -0,0 +1,286 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSWriteCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_PDSWCalls
+#define _H_PDSWCalls
+#include "acroassert.h"
+
+/* for Adobe use only */
+#define _PDSWrite_LATEST_VERSION 0x00080000
+#define _PDSWrite_LAST_BETA_COMPATIBLE_VERSION 0x00080000
+#define _PDSWrite_IS_BETA 0
+
+/* for public use */
+#define PDSWriteHFT_LATEST_VERSION (_PDSWrite_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDSWrite_LATEST_VERSION) : _PDSWrite_LATEST_VERSION)
+
+#define PDSWrite_VERSION_B 0x00000006
+#define PDSWrite_VERSION_5 0x00050000
+#define PDSWrite_VERSION_6 0x00060000
+#define PDSWrite_VERSION_7 0x00070000
+#define PDSWrite_VERSION_8 0x00080000
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "PDSWriteHFTVers.h"
+#include "PDSExpT.h"
+#include "PEExpT.h"
+
+#if PLUGIN
+#define PEX1 ACCB1
+#define PEX2 ACCB2
+#endif
+
+#ifndef PEX1
+#define PEX1 ACEX1
+#define PEX2 ACEX2
+#endif
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif /* NPROC */
+
+
+#if PDSEDIT_IN_CORE || ACROBAT_LIBRARY
+#if HAS_PDSEDIT_WRITE_PROCS
+ /* Implementation or static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define XNPROC NPROC
+ #define UNPROC NPROC
+ #define NOPROC(name)
+ #include "PDSWriteProcs.h"
+ #undef NPROC
+ #undef XNPROC
+ #undef UNPROC
+ #undef NOPROC
+
+#endif /* HAS_PDSEDIT_WRITE_PROCS */
+#else
+#if PLUGIN
+#include "PIRequir.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define XNPROC NPROC
+ #define UNPROC NPROC
+ #define NOPROC(name) \
+ name##SEL,
+
+
+ enum {
+ PDSWriteBAD_SELECTOR,
+ #include "PDSWriteProcs.h"
+ PDSWriteNUMSELECTORSplusOne
+ };
+
+ #define PDSNUMSELECTORS (PDSNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef XNPROC
+ #undef UNPROC
+ #undef NOPROC
+
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define NOPROC(name)
+#if READER_PLUGIN
+ /* Force an error for Exchange procs */
+ #define XNPROC(returnType, name, params)
+ #define UNPROC(returnType, name, params)
+#else
+ #define XNPROC NPROC
+ #define UNPROC NPROC
+#endif
+ #include "PDSWriteProcs.h"
+ #undef NPROC
+ #undef XNPROC
+ #undef UNPROC
+ #undef NOPROC
+
+#if PI_PDSEDIT_WRITE_VERSION != 0
+
+#ifdef THREAD_SAFE_PDFL
+ #define gPDSWriteHFT (GetHFTLocations()->pdsWriteHFT)
+ #define gPDSWriteVersion (GetHFTLocations()->pdsWriteVersion)
+#else
+ extern HFT gPDSWriteHFT;
+ extern ASUns32 gPDSWriteVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+ /* Define the macros */
+ #define PDDocCreateStructTreeRoot (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDDocCreateStructTreeRootSELPROTO)(gPDSWriteHFT[PDDocCreateStructTreeRootSEL])))
+ #define PDDocRemoveStructTreeRoot (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDDocRemoveStructTreeRootSELPROTO)(gPDSWriteHFT[PDDocRemoveStructTreeRootSEL])))
+ #define PDSTreeRootInsertKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSTreeRootInsertKidSELPROTO)(gPDSWriteHFT[PDSTreeRootInsertKidSEL])))
+ #define PDSTreeRootRemoveKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSTreeRootRemoveKidSELPROTO)(gPDSWriteHFT[PDSTreeRootRemoveKidSEL])))
+ #define PDSTreeRootReplaceKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSTreeRootReplaceKidSELPROTO)(gPDSWriteHFT[PDSTreeRootReplaceKidSEL])))
+
+
+ #define PDSTreeRootCreateRoleMap (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSTreeRootCreateRoleMapSELPROTO)(gPDSWriteHFT[PDSTreeRootCreateRoleMapSEL])))
+ #define PDSTreeRootRemoveRoleMap (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSTreeRootRemoveRoleMapSELPROTO)(gPDSWriteHFT[PDSTreeRootRemoveRoleMapSEL])))
+
+ #define PDSTreeRootCreateClassMap (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSTreeRootCreateClassMapSELPROTO)(gPDSWriteHFT[PDSTreeRootCreateClassMapSEL])))
+ #define PDSTreeRootRemoveClassMap (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSTreeRootRemoveClassMapSELPROTO)(gPDSWriteHFT[PDSTreeRootRemoveClassMapSEL])))
+
+ #define PDSElementCreate (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementCreateSELPROTO)(gPDSWriteHFT[PDSElementCreateSEL])))
+ #define PDSElementSetType (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementSetTypeSELPROTO)(gPDSWriteHFT[PDSElementSetTypeSEL])))
+ #define PDSElementSetTitle (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementSetTitleSELPROTO)(gPDSWriteHFT[PDSElementSetTitleSEL])))
+ #define PDSElementIncrementRevision (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementIncrementRevisionSELPROTO)(gPDSWriteHFT[PDSElementIncrementRevisionSEL])))
+ #define PDSElementAddAttrObj (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementAddAttrObjSELPROTO)(gPDSWriteHFT[PDSElementAddAttrObjSEL])))
+ #define PDSElementRemoveAttrObj (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementRemoveAttrObjSELPROTO)(gPDSWriteHFT[PDSElementRemoveAttrObjSEL])))
+ #define PDSElementRemoveAllAttrObjs (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementRemoveAllAttrObjsSELPROTO)(gPDSWriteHFT[PDSElementRemoveAllAttrObjsSEL])))
+ #define PDSElementAddClass (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementAddClassSELPROTO)(gPDSWriteHFT[PDSElementAddClassSEL])))
+ #define PDSElementRemoveClass (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementRemoveClassSELPROTO)(gPDSWriteHFT[PDSElementRemoveClassSEL])))
+ #define PDSElementRemoveAllClasses (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementRemoveAllClassesSELPROTO)(gPDSWriteHFT[PDSElementRemoveAllClassesSEL])))
+ #define PDSElementSetAlt (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementSetAltSELPROTO)(gPDSWriteHFT[PDSElementSetAltSEL])))
+ #define PDSElementInsertKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementInsertKidSELPROTO)(gPDSWriteHFT[PDSElementInsertKidSEL])))
+ #define PDSElementInsertMCAsKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementInsertMCAsKidSELPROTO)(gPDSWriteHFT[PDSElementInsertMCAsKidSEL])))
+ #define PDSElementInsertOBJAsKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementInsertOBJAsKidSELPROTO)(gPDSWriteHFT[PDSElementInsertOBJAsKidSEL])))
+
+ #define PDSElementRemoveKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementRemoveKidSELPROTO)(gPDSWriteHFT[PDSElementRemoveKidSEL])))
+ #define PDSElementRemoveKidMC (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementRemoveKidMCSELPROTO)(gPDSWriteHFT[PDSElementRemoveKidMCSEL])))
+ #define PDSElementReplaceKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementReplaceKidSELPROTO)(gPDSWriteHFT[PDSElementReplaceKidSEL])))
+ #define PDSElementReplaceKidMC (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementReplaceKidMCSELPROTO)(gPDSWriteHFT[PDSElementReplaceKidMCSEL])))
+ #define PDSElementReplaceKidOBJ (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementReplaceKidOBJSELPROTO)(gPDSWriteHFT[PDSElementReplaceKidOBJSEL])))
+ #define PDSElementSetID (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementSetIDSELPROTO)(gPDSWriteHFT[PDSElementSetIDSEL])))
+ #define PDSElementClearID (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSElementClearIDSELPROTO)(gPDSWriteHFT[PDSElementClearIDSEL])))
+
+ #define PDSAttrObjCreate (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSAttrObjCreateSELPROTO)(gPDSWriteHFT[PDSAttrObjCreateSEL])))
+ #define PDSAttrObjCreateFromStream (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSAttrObjCreateFromStreamSELPROTO)(gPDSWriteHFT[PDSAttrObjCreateFromStreamSEL])))
+
+ #define PDSRoleMapMap (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSRoleMapMapSELPROTO)(gPDSWriteHFT[PDSRoleMapMapSEL])))
+ #define PDSRoleMapUnMapSrc (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSRoleMapUnMapSrcSELPROTO)(gPDSWriteHFT[PDSRoleMapUnMapSrcSEL])))
+ #define PDSRoleMapUnMapDst (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSRoleMapUnMapDstSELPROTO)(gPDSWriteHFT[PDSRoleMapUnMapDstSEL])))
+ #define PDSRoleMapCopy (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSRoleMapCopySELPROTO)(gPDSWriteHFT[PDSRoleMapCopySEL])))
+
+ #define PDSClassMapAddAttrObj (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSClassMapAddAttrObjSELPROTO)(gPDSWriteHFT[PDSClassMapAddAttrObjSEL])))
+ #define PDSClassMapRemoveClass (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSClassMapRemoveClassSELPROTO)(gPDSWriteHFT[PDSClassMapRemoveClassSEL])))
+ #define PDSClassMapRemoveAttrObj (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_B), *((PDSClassMapRemoveAttrObjSELPROTO)(gPDSWriteHFT[PDSClassMapRemoveAttrObjSEL])))
+
+/*
+** Acrobat 5.0 additions
+*/
+
+ /* PI_PDSEDIT_WRITE_VERSION >= 0x00050000 */
+
+ #define PDSElementSetActualText (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_5), *((PDSElementSetActualTextSELPROTO)(gPDSWriteHFT[PDSElementSetActualTextSEL])))
+ #define PDSElementSetLanguage (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_5), *((PDSElementSetLanguageSELPROTO)(gPDSWriteHFT[PDSElementSetLanguageSEL])))
+ #define PDSElementRemoveKidOBJ (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_5), *((PDSElementRemoveKidOBJSELPROTO)(gPDSWriteHFT[PDSElementRemoveKidOBJSEL])))
+
+/*
+** Acrobat 6.0 additions
+*/
+ #define PDSElementInsertMCAsKidEx (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_6), *((PDSElementInsertMCAsKidExSELPROTO)(gPDSWriteHFT[PDSElementInsertMCAsKidExSEL])))
+ #define PDSElementInsertStmMCAsKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_6), *((PDSElementInsertStmMCAsKidSELPROTO)(gPDSWriteHFT[PDSElementInsertStmMCAsKidSEL])))
+ #define PDSTreeRootReplaceStreamRef (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_6), *((PDSTreeRootReplaceStreamRefSELPROTO)(gPDSWriteHFT[PDSTreeRootReplaceStreamRefSEL])))
+
+/*
+** Acrobat 7.0 additions
+*/
+ #define PDSMCRefCreate (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_7), *((PDSMCRefCreateSELPROTO) (gPDSWriteHFT[PDSMCRefCreateSEL])))
+ #define PDSMCRefDestroy (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_7), *((PDSMCRefDestroySELPROTO) (gPDSWriteHFT[PDSMCRefDestroySEL])))
+ #define PDSElementInsertMCRefAsKid (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_7), *((PDSElementInsertMCRefAsKidSELPROTO)(gPDSWriteHFT[PDSElementInsertMCRefAsKidSEL])))
+
+/*
+** Acrobat 8.0 additions
+*/
+ #define PDSElementSetAltASText (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_8), *((PDSElementSetAltASTextSELPROTO)(gPDSWriteHFT[PDSElementSetAltASTextSEL])))
+ #define PDSElementSetActualTextASText (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_8), *((PDSElementSetActualTextASTextSELPROTO)(gPDSWriteHFT[PDSElementSetActualTextASTextSEL])))
+ #define PDSElementSetTitleASText (ACROASSERT(gPDSWriteVersion >=PDSWrite_VERSION_8), *((PDSElementSetTitleASTextSELPROTO)(gPDSWriteHFT[PDSElementSetTitleASTextSEL])))
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* PI_PDSEDIT_WRITE_VERSION != 0 */
+
+#endif /* PLUGIN */
+#endif /* PDSEDIT_IN_CORE || ACROBAT_LIBRARY */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PDSWCalls */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteHFTVers.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteHFTVers.h
new file mode 100644
index 0000000..d5d2f7b
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteHFTVers.h
@@ -0,0 +1,26 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSWriteHFTVers.h
+
+ - PDSWrite HFT name and version.
+
+*********************************************************************/
+
+#ifndef _H_PDSWriteHFTVers
+#define _H_PDSWriteHFTVers
+
+#define PDSWriteHFTName "PDSWrite"
+
+#endif /* _H_PDSWriteHFTVers */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteProcs.h
new file mode 100644
index 0000000..252daf1
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSWriteProcs.h
@@ -0,0 +1,991 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSWriteProcs.h
+
+ - Catalog of functions exported by the PDSWrite HFT.
+
+*********************************************************************/
+/*
+ * Structure Tree Root methods.
+ */
+
+
+
+#if !PLUGIN
+#undef XNPROC
+#if !READER
+#define XNPROC NPROC
+#else
+#define XNPROC(returnType, name, params) NOPROC(name)
+#endif
+#endif
+
+/**
+ Creates a new StructTreeRoot element.
+
+ <p>If PDDocCreateStructTreeRoot() is called on a PDDoc that already
+ has a structure tree root, it returns without modifying
+ the document. </p>
+
+ <p>It raises an exception if <code>pdDoc</code> already has a StructTreeRoot. </p>
+
+ @param pdDoc IN/OUT The PDDoc for which the StructTreeRoot element
+ is created.
+ @param treeRoot IN/OUT (Filled by the method) The newly-created
+ StructTreeRoot element.
+
+ @see PDDocGetStructTreeRoot
+ @see PDSTreeRootGetRoleMap
+ @see PDSTreeRootGetClassMap
+ @see PDDocRemoveStructTreeRoot
+ @see PDSTreeRootCreateRoleMap
+ @see PDSTreeRootRemoveRoleMap
+ @see PDSTreeRootCreateClassMap
+ @see PDSTreeRootRemoveClassMap
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDDocCreateStructTreeRoot, (IN PDDoc pdDoc, OUT PDSTreeRoot *treeRoot))
+
+/**
+ Removes, but does not destroy, the specified StructTreeRoot
+ element from the specified PDDoc.
+ @param pdDoc IN/OUT The PDDoc for which the StructTreeRoot element
+ is removed.
+ @see PDDocCreateStructTreeRoot
+ @see PDDocGetStructTreeRoot
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDDocRemoveStructTreeRoot, (IN PDDoc pdDoc))
+
+
+/**
+ Inserts the specified kid element after the given position
+ as a kid of the specified structure tree root.
+
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot IN/OUT The structure tree root in which a kid
+ is inserted.
+ @param kid IN/OUT The kid to insert.
+ @param insertAfter IN/OUT The position after which the kid is inserted.
+ If <code>element</code> currently has no kids, <code>insertAfter</code> is ignored.
+
+ @see PDSTreeRootRemoveKid
+ @see PDSTreeRootReplaceKid
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSTreeRootInsertKid, (IN PDSTreeRoot treeRoot,
+ IN PDSElement kid,
+ IN ASInt32 insertAfter))
+
+
+/**
+ Removes the specified kid element from the specified structure
+ tree root.
+
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot IN/OUT The structure tree root whose kid is removed.
+
+ @param kid IN/OUT The kid to remove.
+ @see PDSTreeRootInsertKid
+ @see PDSTreeRootReplaceKid
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSTreeRootRemoveKid, (IN PDSTreeRoot treeRoot,
+ IN PDSElement kid))
+
+/**
+ Replaces structural element <code>oldKid</code> with <code>element</code> <code>newKid</code> as
+ a kid of <code>treeRoot</code>.
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot IN/OUT The structure tree root whose kid is replaced.
+
+ @param oldKid IN/OUT The kid to replace.
+ @param newKid IN/OUT The kid that is replacing <code>oldKid</code>.
+ @see PDSTreeRootInsertKid
+ @see PDSTreeRootRemoveKid
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSTreeRootReplaceKid, (IN PDSTreeRoot treeRoot,
+ IN PDSElement oldKid,
+ IN PDSElement newKid))
+
+/**
+ Creates and sets the PDSRoleMap of the specified StructTreeRoot
+ element. Any previously existing PDSRoleMap is unlinked.
+
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot The structure tree root in which to create
+ a PDSRoleMap.
+ @param roleMap (Filled by the method) The newly created
+ PDSRoleMap.
+ @see PDSTreeRootGetRoleMap
+ @see PDSTreeRootRemoveRoleMap
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSTreeRootCreateRoleMap, (IN PDSTreeRoot treeRoot, OUT PDSRoleMap *roleMap))
+
+
+/**
+ Removes the PDSRoleMap of the specified structure tree root
+ element. It does nothing if one does not exist.
+
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot The structure tree root whose PDSRoleMap
+ is removed.
+ @see PDSTreeRootCreateRoleMap
+ @see PDSTreeRootGetRoleMap
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSTreeRootRemoveRoleMap, (IN PDSTreeRoot treeRoot))
+
+
+/**
+ Creates a PDSClassMap in the specified tree root.
+
+ <p>Any previously existing PDSClassMap is unlinked. </p>
+
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot The structure tree root in which to create
+ a PDSClassMap.
+ @param classMap (Filled by the method) The newly created
+ PDSClassMap.
+ @see PDSTreeRootGetClassMap
+ @see PDSTreeRootRemoveClassMap
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSTreeRootCreateClassMap, (IN PDSTreeRoot treeRoot, OUT PDSClassMap *classMap))
+
+
+/**
+ Removes the PDSClassMap of the specified structure tree
+ root element. It does nothing if one does not exist.
+
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot The structure tree root whose PDSClassMap
+ is removed.
+ @see PDSTreeRootCreateClassMap
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSTreeRootRemoveClassMap, (IN PDSTreeRoot treeRoot))
+/*
+ * PDSElement methods.
+ */
+
+
+/**
+ Creates a new (but empty) PDSElement.
+
+ <p>This may raise various exceptions.</p>
+
+ @param pdDoc The PDDoc in which the PDSElement is created.
+
+ @param element (Filled by the method) The newly created
+ PDSElement.
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementCreate, (IN PDDoc pdDoc, OUT PDSElement *element))
+
+/**
+ Sets an element's type value to the specified type. The
+ type corresponds to the Subtype key in the structure element
+ dictionary. See the <i>PDF Reference</i> for more information.
+
+ <p>PDSElementSetType() sets the value of the Subtype key, not
+ the Type key, in the structure element dictionary. All PDSElement objects
+ have a Type value of StructElem. </p>
+
+ @param element The element whose type is set.
+ @param type The ASAtom representing the element's type.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetType
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementSetType, (IN PDSElement element, IN ASAtom type))
+
+/**
+ Sets an element's title.
+ @param element IN/OUT The element whose title is set.
+ @param buffer IN/OUT A pointer to a buffer containing a string to
+ be made the element's title.
+ @param nBytes IN/OUT The number of bytes in <code>buffer</code> to use as the <code>element</code> parameter's
+ new title. It may be zero. It sets a title even if the buffer
+ length is zero, but such a title looks like no title according
+ to PDSElementGetTitle().
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetTitle
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementSetTitle, (IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes))
+
+/**
+ Increments an element's revision count by one. See the <i>PDF Reference</i> for more information.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element whose revision count is incremented.
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementIncrementRevision,(IN PDSElement element))
+
+/**
+ Associates the specified attribute object with an element
+ at the element's current revision value.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element with which <code>attrObj</code> is associated.
+
+ @param attrObj The attribute object to associate with <code>element</code>.
+ @see PDSElementGetAttrObj
+ @see PDSElementRemoveAttrObj
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementAddAttrObj, (IN PDSElement element, IN PDSAttrObj attrObj))
+
+/**
+ Removes the specified attribute object from an element.
+ If <code>element</code> does not have an <code>attrObj</code> attribute, this method
+ does nothing.
+
+ @param element The element whose attribute is removed.
+ @param attrObj The attribute object to remove.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid PDSElement or <code>attrObj</code> is not a valid attribute object.
+ @see PDSElementAddAttrObj
+ @see PDSElementGetAttrObj
+ @see PDSElementRemoveAllAttrObjs
+
+ @note Calling PDSElementRemoveAttrObj() while iterating over
+ the attribute objects of an element will change the relationship
+ between the attribute object indices and attribute objects.
+ Although it is possible to track this change in indices
+ in a single loop, it is more straightforward to accumulate
+ a list of attribute objects to remove during one pass over
+ the attribute objects and to carry out the actual removals
+ during a subsequent iteration over the accumulated list.
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementRemoveAttrObj, (IN PDSElement element, IN PDSAttrObj attrObj))
+
+/**
+ Removes all attribute objects directly associated with the
+ specified element.
+ @param element The element whose attributes are removed.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementRemoveAttrObj
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementRemoveAllAttrObjs,(IN PDSElement element))
+
+/**
+ Adds a class name to the element's list of classes to which
+ it belongs at the element's current revision value.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element IN/OUT The element to which a class is added.
+ @param classAtom IN/OUT The ASAtom representing the class to add
+ to <code>element</code>. If <code>classAtom</code> is already present among the <code>element</code> parameter's
+ classes, it will not be added again.
+ @see PDSElementGetClass
+ @see PDSElementGetNumClasses
+ @see PDSElementRemoveAllClasses
+ @see PDSElementRemoveClass
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementAddClass, (IN PDSElement element, IN ASAtom classAtom))
+
+/**
+ Removes the specified class name from the element's list
+ of classes to which it belongs.
+ @param element The element from which the specified class
+ is removed.
+ @param classAtom The ASAtom representing the class to
+ remove.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementAddClass
+ @see PDSElementGetClass
+ @see PDSElementGetNumClasses
+ @see PDSElementRemoveAllClasses
+
+ @note Calling PDSElementRemoveClass() while iterating over
+ the classes of an element will change the relationship between
+ class indices and classes. Although it is possible to track
+ this change in indices in a single loop, it is more straightforward
+ to accumulate a list of classes to remove during one pass
+ over the classes and to carry out the actual removals during
+ a subsequent iteration over the accumulated list.
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementRemoveClass, (IN PDSElement element, IN ASAtom classAtom))
+
+/**
+ Removes all classes from the specified element.
+ @param element IN/OUT The element whose classes are removed.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementAddClass
+ @see PDSElementGetClass
+ @see PDSElementGetNumClasses
+ @see PDSElementRemoveClass
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementRemoveAllClasses, (IN PDSElement element))
+
+/**
+ Sets the alternate text representation of an element's contents.
+
+ @param element IN/OUT The element whose alternate text representation
+ is set.
+ @param buffer IN/OUT A pointer to a buffer containing a string to
+ be made the element's alternate text representation.
+ @param nBytes IN/OUT The number of bytes in <code>buffer</code> to use as the <code>element</code> parameter's
+ new alternate text representation. It may be zero. It sets an
+ Alt string even if the buffer length is zero, but such an
+ Alt string looks like no Alt string according to PDSElementGetAlt().
+
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetAlt
+ @see PDSElementHasAlt
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementSetAlt, (IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes))
+
+/**
+ Inserts the specified kid PDSElement object into the specified
+ element after position <code>insertAfter</code>.
+ @param element The element in which the specified kid is inserted.
+
+ @param kid The kid to insert.
+ @param insertAfter The position after which the kid is inserted.
+ If <code>element</code> currently has no kids, <code>insertAfter</code> is ignored.
+ @exception pdsErrWrongTypeParameter
+ @see PDSElementGetFirstPage
+ @see PDSElementGetKid
+ @see PDSElementInsertMCAsKid
+ @see PDSElementInsertOBJAsKid
+ @see PDSElementInsertStmMCAsKid
+ @see PDSElementRemoveKid
+ @see PDSElementReplaceKid
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementInsertKid, (IN PDSElement element, IN PDSElement kid, IN ASInt32 insertAfter))
+
+/**
+ Inserts a reference to the specified PDSMC (marked content)
+ in the specified element after position <code>insertAfter</code>.
+
+ <p>This method automatically creates MCR objects if needed. </p>
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element in which the reference is inserted.
+
+ @param cosPage The CosObj for the page containing the
+ reference to insert.
+ @param mc The marked content to insert.
+ @param insertAfter The position after which the reference
+ is inserted. If <code>element</code> currently has no kids, <code>insertAfter</code>
+ is ignored.
+ @see PDSElementInsertKid
+ @see PDSElementInsertOBJAsKid
+ @see PDSElementInsertStmMCAsKid
+ @see PDSElementReplaceKidMC
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementInsertMCAsKid, (IN PDSElement element,
+ IN CosObj cosPage,
+ IN PDSMC mc,
+ IN ASInt32 insertAfter))
+
+/**
+ Inserts a reference to the specified PDF object as a kid
+ into the specified element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element IN/OUT The element in which the reference is inserted.
+
+ @param cosPage IN/OUT The CosObj for the page containing the reference
+ to insert.
+ @param obj IN/OUT The CosObj to insert.
+ @param insertAfter IN/OUT The position after which the reference is
+ inserted in <code>element</code>. If <code>element</code> currently has no kids, <code>insertAfter</code>
+ is ignored.
+ @see PDSElementReplaceKidOBJ
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementInsertOBJAsKid, (IN PDSElement element,
+ IN CosObj cosPage,
+ IN CosObj obj,
+ IN ASInt32 insertAfter))
+
+/**
+ Removes the specified kid from an element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element whose kid is removed.
+ @param kid The kid to remove.
+ @see PDSElementGetKid
+ @see PDSElementInsertKid
+ @see PDSElementRemoveKidMC
+ @see PDSElementRemoveKidOBJ
+
+ @note The approved method of removing OBJ kids is PDSElementRemoveKidOBJ().
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementRemoveKid, (IN PDSElement element, IN CosObj kid))
+
+/**
+ Removes the specified PDSMC (marked content) from an element's
+ kids, if it has any.
+
+ <p>After calling this method, use PDPageSetPDEContent() to commit
+ any changes that have been made to the page contents. </p>
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element whose reference is removed.
+ @param cosPage The CosObj for the page containing the
+ reference to remove.
+ @param mc The marked content to remove.
+ @see PDSElementInsertMCAsKid
+ @see PDSElementReplaceKidMC
+ @see PDSElementRemoveKid
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementRemoveKidMC, (IN PDSElement element, IN CosObj cosPage, IN PDSMC mc))
+
+/**
+ Replaces the specified kid in the specified element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element IN/OUT The element whose kid is replaced.
+ @param oldKid IN/OUT The kid to replace.
+ @param newKid IN/OUT The kid that is replacing <code>oldKid</code>.
+ @see PDSElementInsertKid
+ @see PDSElementGetFirstPage
+ @see PDSElementGetKid
+ @see PDSElementRemoveKid
+ @see PDSElementReplaceKidMC
+ @see PDSElementReplaceKidOBJ
+
+ @note The approved method of replacing OBJ kids is PDSElementReplaceKidOBJ().
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementReplaceKid, (IN PDSElement element, IN CosObj oldKid, IN CosObj newKid))
+
+/**
+ Replaces the specified PDSMC (on <code>oldCosPage</code>) with a new
+ PDSMC (on <code>newCosPage</code>) in the specified element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element whose reference is replaced.
+ @param oldCosPage The CosObj for the page holding the
+ reference to replace.
+ @param oldMC The marked content to replace.
+ @param newCosPage The CosObj for the page holding the
+ reference that is replacing <code>oldMC</code>.
+ @param newMC The marked content that is replacing <code>oldMC</code>.
+ @see PDSElementInsertMCAsKid
+ @see PDSElementRemoveKidMC
+ @see PDSElementReplaceKid
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementReplaceKidMC, (IN PDSElement element, IN CosObj oldCosPage, IN PDSMC oldMC, IN CosObj newCosPage, IN PDSMC newMC))
+
+/**
+ Replaces <code>oldObj</code> with <code>newObj</code> on the specified page in the
+ specified element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element IN/OUT The element whose object is replaced.
+ @param oldObj IN/OUT The object to replace.
+ @param newObj IN/OUT The object that is replacing <code>oldObj</code>.
+ @param newPage IN/OUT The CosObj for the page holding the reference
+ that is replacing <code>oldObj</code>.
+ @see PDSElementInsertOBJAsKid
+ @see PDSElementReplaceKid
+ @see PDSElementReplaceKidMC
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementReplaceKidOBJ, (IN PDSElement element,
+ IN CosObj oldObj,
+ IN CosObj newObj,
+ IN CosObj newPage))
+
+/**
+ Sets the ID of an element to the given Cos string.
+ @param element The element whose ID is set.
+ @param buffer A pointer to a buffer containing a string
+ to be made the element's ID.
+ @param nBytes The number of bytes in <code>buffer</code> to use as the <code>element</code> parameter's
+ new ID. It may be zero. It sets an ID even if the buffer length
+ is zero, but such an ID looks like no ID according to PDSElementGetID().
+ @exception ErrSysPDSEdit is raised if another element already has the ID as
+ its ID.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @see PDSElementGetID
+ @see PDSElementClearID
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementSetID, (IN PDSElement element,
+ IN const ASUns8 *buffer,
+ IN ASInt32 nBytes))
+
+/**
+ Removes an element's ID, if it exists.
+ @param element The element whose ID is removed.
+ @exception pdsErrWrongTypeParameter is raised if <code>element</code> is not a valid
+ PDSElement.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSElementGetID
+ @see PDSElementSetID
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSElementClearID, (IN PDSElement element))
+
+/*
+ * Attribute Object methods
+ */
+
+/**
+ Creates a new attribute object with the specified owner.
+
+ @param pdDoc The document in which the attribute object is
+ created.
+
+ <p>This may raise various exceptions.</p>
+
+ @param owner The owner of the new attribute object.
+ @param indirect If <code>true</code>, it creates the attribute object
+ as an indirect Cos object and sets the <code>pdDoc</code> parameter's PDDocNeedsSave
+ flag (see PDDocFlags). If <code>false</code>, it creates the attribute object
+ as a direct object.
+ @param attrObj (Filled by the method) The newly created
+ attribute object.
+ @see PDSAttrObjCreateFromStream
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSAttrObjCreate, (IN PDDoc pdDoc, IN ASAtom owner, IN ASBool indirect, OUT PDSAttrObj *attrObj))
+
+/**
+ Creates an attribute object with the specified owner from
+ the specified Cos stream.
+ @param owner The owner of the new attribute object.
+ @param cosStreamObj The Cos stream containing the data
+ with which to create the attribute. The dictionary of this
+ stream is modified.
+ @param attrObj (Filled by the method) A pointer to the newly
+ created attribute object. This actually points to <code>cosStreamObj</code>.
+ May be <code>NULL</code>.
+ @exception pdsErrWrongTypeParameter is raised if <code>cosStreamObj</code> is not a Cos stream. It may raise other exceptions as well.
+ @see PDSAttrObjCreate
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSAttrObjCreateFromStream, (IN ASAtom owner, IN OUT CosObj cosStreamObj, OUT PDSAttrObj *attrObj))
+
+
+/*
+ * RoleMap methods.
+ */
+
+/**
+ Maps an element type (<code>src</code>) to another element type (<code>dst</code>) in
+ the specified PDSRoleMap.
+ @param roleMap The PDSRoleMap in which to create a new
+ mapping.
+ @param src The element type to map to <code>dst</code>.
+ @param dst The element type that <code>src</code> maps onto. Note that this
+ may be a standard element type, such as P.
+ @exception ErrSysPDSEdit is raised if <code>src</code> is already mapped.
+ @see PDSRoleMapDoesMap
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSRoleMapMap, (IN PDSRoleMap roleMap, IN ASAtom src, IN ASAtom dst))
+
+/**
+ Makes the specified element type have no mapping.
+
+ <p>This may raise various exceptions.</p>
+
+ @param roleMap IN/OUT The PDSRoleMap in which to un-map the <code>src</code>
+ element type.
+ @param src IN/OUT The element type whose mapping is removed.
+ @param fixupOthers IN/OUT If <code>true</code>, any element type that was directly
+ mapped to <code>src</code> is mapped to whatever <code>src</code> previously mapped
+ to. If <code>false</code>, PDSRoleMapUnMapSrc() only un-maps <code>src</code>.
+ @see PDSRoleMapUnMapDst
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSRoleMapUnMapSrc, (IN PDSRoleMap roleMap, IN ASAtom src, IN ASBool fixupOthers))
+
+/**
+ Makes the specified element type have no mapping.
+ @param roleMap The PDSRoleMap in which to un-map all element
+ types that map onto the <code>dst</code> element type.
+ @param dst The element type to which all mappings are removed.
+ All element types that map to the <code>dst</code> element type are unmapped.
+ @exception pdsErrWrongTypeParameter
+ @see PDSRoleMapUnMapSrc
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSRoleMapUnMapDst, (IN PDSRoleMap roleMap, IN ASAtom dst))
+
+/**
+ Makes a copy of a PDSRoleMap, making it the PDSRoleMap of
+ the specified StructTreeRoot.
+
+ <p>This may raise various exceptions.</p>
+
+ @param srcRoleMap The PDSRoleMap to copy.
+ @param dstTreeRoot The structure tree root in which to
+ place srcRoleMap.
+ @param dstRoleMap (Filled by the method) If not <code>NULL</code>,
+ it points to the new, copied PDSRoleMap.
+ @see PDSTreeRootGetRoleMap
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSRoleMapCopy, (IN PDSRoleMap srcRoleMap, IN PDSTreeRoot dstTreeRoot, OUT PDSRoleMap *dstRoleMap))
+
+/*
+ * ClassMap methods.
+ */
+
+/**
+ Adds the specified attribute object to the specified PDSClassMap
+ for the given class name. If the attribute object is already
+ present, it is not added a second time.
+ @param classMap The PDSClassMap to which the specified
+ attribute object is added.
+ @param classAtom The ASAtom representing the class name.
+
+ @param attrObj The attribute object to add to the class in
+ <code>classAtom</code>.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSClassMapGetAttrObj
+ @see PDSClassMapRemoveAttrObj
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSClassMapAddAttrObj, (IN PDSClassMap classMap,
+ IN ASAtom classAtom,
+ IN PDSAttrObj attrObj))
+
+/**
+ Removes the specified class from the specified PDSClassMap,
+ if it exists.
+
+ <p>This may raise various exceptions.</p>
+
+ @param classMap IN/OUT The PDSClassMap from which a class is removed.
+
+ @param classAtom IN/OUT The ASAtom representing the class to remove
+ from <code>classMap</code>.
+ @see PDSClassMapRemoveAttrObj
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSClassMapRemoveClass, (IN PDSClassMap classMap, IN ASAtom classAtom))
+
+/**
+ Removes the specified attribute object from the specified
+ PDSClassMap. If classAtom is ASAtomNull, it removes all occurrences
+ of <code>attrObj</code> in the entire <code>classMap</code>.
+ @param classMap The PDSClassMap from which the specified
+ attribute object is removed.
+ @param classAtom The ASAtom of a class name for which
+ the associated attribute object is found.
+ @param attrObj The attribute object to remove from <code>classMap</code>.
+ @exception pdsErrBadPDF is raised if an error is found in the PDF file.
+
+ @see PDSClassMapAddAttrObj
+ @see PDSClassMapRemoveClass
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSClassMapRemoveAttrObj, (IN PDSClassMap classMap,
+ IN ASAtom classAtom,
+ IN PDSAttrObj attrObj))
+/*
+ * New in Acrobat 5
+ */
+
+
+/**
+ Sets the actual text representation of the specified PDSElement object's
+ contents to <code>buffer</code> (from <code>0</code> to <code>nBytes</code>).
+ @param element The PDSElement whose contents are being
+ set to <code>buffer</code>.
+ @param buffer The buffer to which the PDSElement object's contents
+ are being set.
+ @param nBytes The number of bytes in the text representation.
+ @see PDSElementGetActualText
+ @since PI_ASEXTRA_VERSION >= 0x00050000
+*/
+UNPROC (void, PDSElementSetActualText, (IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes))
+
+/**
+ Sets the language field associated with the PDSElement to
+ the <code>buffer</code> parameter's contents (from 0 to nBytes).
+ @param element The PDSElement whose language field is
+ set to <code>buffer</code>.
+ @param buffer A pointer to a buffer containing a string
+ to be made the element's language field. The empty string
+ indicates that the language is unknown. The string should be
+ in the format <code><IETF RFC-1766-language-code></code>. Note that the ISO 639 language
+ codes can be found at http://lcweb.loc.gov/standards/iso639-2.
+ @param nBytes The size of <code>buffer</code>. It may be zero. It sets the language
+ even if the buffer length is zero, but such a language setting
+ looks like no language according to PDSElementGetLanguage.
+ @see PDSElementGetLanguage
+ @see PDSElementHasLanguage
+
+ @note IANA registered language codes can be found at http://www.isi.edu.
+ @note The IETF Standard for Language Element Values (RFC 1766) can be found at http://www.ietf.org/rfc/rfc1766.txt?number=1766.
+ @since PI_PDS_WRITE_VERSION >= 0x00050000
+*/
+UNPROC (void, PDSElementSetLanguage, (IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes))
+
+/**
+ Removes an OBJ from among the kids of a given element. It does
+ nothing if the given OBJ is not a kid of the given element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element whose kid is having an OBJ removed.
+
+ @param kid The kid whose OBJ is removed.
+ @see PDSElementInsertMCAsKid
+ @see PDSElementReplaceKidMC
+ @see PDSElementRemoveKid
+ @since PI_PDS_WRITE_VERSION >= 0x00050000
+*/
+UNPROC (void, PDSElementRemoveKidOBJ, (IN PDSElement element, IN CosObj kid))
+
+/*
+ * New since Acrobat 5
+ */
+
+/**
+ Extends PDSElementInsertMCAsKid(), inserting content that is in a
+ stream other than a page content stream. This function is the same
+ as PDSElementInsertStmMCAsKid().
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element in which the reference is inserted.
+ @param cosPage The CosObj for the page containing the reference to insert.
+ @param mc The marked content to insert.
+ @param insertAfter The position after which the reference is inserted. If
+ <code>element</code> currently has no kids, <code>insertAfter</code> is ignored.
+ @param cosStream The stream containing the content given by <code>mc</code>.
+ @param streamOwner A Cos object to record as the owner of the content. It can
+ be CosNull if the owner is not important.
+ @see PDSElementInsertKid
+ @see PDSElementInsertMCAsKid
+ @see PDSElementInsertOBJAsKid
+ @see PDSElementInsertStmMCAsKid
+ @see PDSElementReplaceKidMC
+ @since PI_PDS_WRITE_VERSION >= 0x00060000
+*/
+UNPROC (void, PDSElementInsertMCAsKidEx, (IN PDSElement element,
+ IN CosObj cosPage,
+ IN PDSMC mc,
+ IN ASInt32 insertAfter,
+ IN CosObj cosStream,
+ IN CosObj streamOwner))
+
+/**
+ Inserts a marked content sequence from a non-page-content
+ stream as a kid of the specified element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The element in which the reference is inserted.
+
+ @param cosPage The CosObj for the page containing the
+ reference to insert.
+ @param containingStm The stream containing the content given
+ by <code>mc</code>.
+ @param stmOwner The PDF object owning the stream given
+ in <code>cosStream</code> (for example, the annotation to which an appearance
+ stream belongs). It can be CosNull if the owner is not important.
+
+ @param mc The marked content to insert.
+ @param insertAfter The position after which the reference
+ is inserted. If <code>element</code> currently has no kids, <code>insertAfter</code>
+ is ignored.
+ @see PDSElementInsertKid
+ @see PDSElementInsertMCAsKid
+ @see PDSElementInsertOBJAsKid
+ @see PDSElementReplaceKidMC
+ @since PI_PDS_WRITE_VERSION >= 0x00060000
+*/
+UNPROC (void, PDSElementInsertStmMCAsKid, (PDSElement element,
+ CosObj cosPage,
+ CosObj containingStm,
+ CosObj stmOwner,
+ PDSMC mc,
+ ASInt32 insertAfter))
+
+/**
+ Updates the stream entries (Stm) in marked content reference
+ dictionaries to reference a new Cos stream object. It replaces
+ references to the old stream with refererences to the new
+ stream.
+
+ <p>This may raise various exceptions.</p>
+
+ @param treeRoot The structure tree root in which stream
+ references are updated.
+ @param oldStream The stream reference to replace.
+ @param newStream The stream reference that is replacing
+ <code>oldStream</code>.
+ @since PI_PDS_WRITE_VERSION >= 0x00060000
+*/
+UNPROC (void, PDSTreeRootReplaceStreamRef, (PDSTreeRoot treeRoot,
+ CosObj oldStream,
+ CosObj newStream))
+
+/**
+ Creates a reference handle to a piece of marked content that
+ can be used to associate the content with structure. The handle
+ can persist beyond the lifetime of the marked contents, allowing
+ greater flexibility about when structure information can be
+ created.
+
+ <p>This may raise various exceptions.</p>
+
+ @param container The marked content to create a reference for.
+ It must be either a PDEContainer or PDEBeginContainer.
+ @param cosDoc The document within which the reference will be used.
+ @param mcid The mcid to set for the container.
+ @see PDSMCRefDestroy
+ @see PDSElementInsertMCRefAsKid
+
+ @note This must be called before placing the container within
+ the content stream that owns it.
+
+ @note The handle will persist until PDSMCRefDestroy is called.
+
+ @note All values in the PDSMCInfo object apart from mcid are currently ignored.
+ @since PI_PDS_WRITE_VERSION >= 0x00070000
+*/
+UNPROC (PDSMCRef, PDSMCRefCreate, (IN PDEElement container ,
+ IN CosDoc cosDoc,
+ IN ASInt32 mcid))
+
+/**
+ Destroys a marked content reference created with PDSMCRefCreate().
+ This should only be called once the reference has been placed in
+ the structure tree or if the reference is no longer needed.
+
+ @param ref The marked content reference to destroy.
+ @exception Unknown
+ @see PDSMCRefCreate
+ @see PDSElementInsertMCRefAsKid
+
+ @note If the PDSMCRef is associated with a PDSMC, it will be set as
+ invalid and ignored on subsequent processing.
+ @since PI_PDS_WRITE_VERSION >= 0x00070000
+*/
+UNPROC (void, PDSMCRefDestroy, (IN PDSMCRef ref))
+
+/**
+ Takes a marked content reference and places the content
+ that it identifies in the structure as a child of the element.
+
+ <p>This may raise various exceptions.</p>
+
+ @param element The structure element with which to associate marked content.
+ @param ref The marked content reference describing the content on the page.
+ It must have had a valid MCID, and must have been completed by subsequent content
+ stream processing calls.
+ @param insertAfter The position after which the marked content is inserted into
+ the element's kids. If the element has no children, <code>insertAfter</code> is ignored.
+ @see PDSMCRefCreate
+
+ @note the content reference handle will be filled out automatically
+ if PDPageSetPDEContent(), PDEFormSetContent(), or PDEGroupSetContent() is
+ called. Otherwise, PDEContentSetPage() or PDEContentSetContainingStmAndOwner()
+ must be called explicitly.
+ @since PI_PDS_WRITE_VERSION >= 0x00070000
+*/
+UNPROC (ASBool, PDSElementInsertMCRefAsKid, (IN PDSElement element,
+ IN PDSMCRef ref,
+ IN ASInt32 insertAfter))
+
+/**
+ Sets an element's title.
+
+ @param element The element whose title is being set.
+ @param title The text object containing the string to
+ be made the element's title.
+
+ @exception Raises pdsErrWrongTypeParameter if element is not a valid
+ PDSElement.
+ @see PDSElementSetTitle
+ @see PDSElementGetTitleASText
+ @see PDSElementGetTitle
+ @since PI_PDS_WRITE_VERSION >= 0x00080000
+*/
+UNPROC (void, PDSElementSetTitleASText, (PDSElement element, const ASText title))
+
+/**
+ Sets an element's actual text.
+
+ @param element The element whose content is being set.
+ @param text The text object containing the string to
+ be made the element's actual text.
+
+ @see PDSElementSetActualText
+ @see PDSElementGetActualTextASText
+ @see PDSElementGetActualText
+ @since PI_PDS_WRITE_VERSION >= 0x00080000
+*/
+UNPROC (void, PDSElementSetActualTextASText, (PDSElement element, const ASText text))
+
+/**
+ Sets the alternate text representation of an element's contents (ASText version of PDSElementSetAlt).
+
+ @param element The element whose alternate text representation is being set.
+ @param text The text object containing the string to
+ be set as the element's alternate text representation.
+
+ @exception Raises pdsErrWrongTypeParameter if element is not a valid
+ PDSElement.
+ @see PDSElementSetAlt
+ @see PDSElementGetAltASText
+ @see PDSElementGetAlt
+ @since PI_PDS_WRITE_VERSION >= 0x00080000
+*/
+UNPROC (void, PDSElementSetAltASText, (PDSElement element, const ASText text))
+#undef XNPROC
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFT.h
new file mode 100644
index 0000000..be2bc60
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFT.h
@@ -0,0 +1,37 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSysFT.h
+
+ - PDSysFont Types header file.
+
+*********************************************************************/
+
+#ifndef _H_PDSysFT
+#define _H_PDSysFT
+
+#include "Environ.h"
+#if PDFEDIT_IN_CORE
+#include "PubTypes.h"
+#else
+#include "CoreExpT.h"
+#endif
+
+#include "PDSysFontExpT.h"
+
+/* tbienz 02 Nov 1999
+All declarations were already in other public header files and have been
+deleted from this file to eliminate duplicate declarations.
+*/
+#endif /* _H_PDSysFT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFont.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFont.h
new file mode 100644
index 0000000..c4c50bc
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFont.h
@@ -0,0 +1,479 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSysFont.h
+
+ - PDSysFont header file.
+
+*********************************************************************/
+
+#ifdef NPROC /* may be already defined */
+#undef NPROC
+#endif
+
+#define NPROC(returnType, name, params) \
+ ACCB1 returnType ACCB2 name params;
+
+
+/**
+ Enumerates all of the system fonts with a user-supplied
+ procedure.
+
+ <p>The PDSysFont must be acquired during the enumeration if
+ the font is needed beyond the <code>enumProc</code>. </p>
+
+ <p>Developers should not assume that the <code>enumProc</code> will be
+ called. If no system fonts are found (for example, if the
+ <code>PSRESOURCEPATH</code> environment variable is not set on UNIX platforms),
+ <code>enumProc</code> is never called, and PDEnumSysFonts() does not raise
+ an exception. </p>
+
+ @param enumProc IN/OUT A user-supplied callback to call once for
+ each system font. Enumeration continues until all fonts
+ have been enumerated, or until <code>enumProc</code> returns <code>false</code>.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @see PDFindSysFont
+ @see PDFindSysFontForPDEFont
+
+ @note The font names that are returned from the methods
+ PDEnumSysFonts() and PDSysFontGetAttrs() are different in 5.0 and later
+ (compared to 4.05). The differences are shown in the table:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Acrobat 4.05 Name</TH><TH>Acrobat 4.05 PSname</TH><TH>Acrobat 5.0 (and later) Name</TH><TH>Acrobat 5.0 (and later) Psname</TH></TR>
+ <TR><TD><code>MS-Mincho</code></TD><TD><code>NULL</code></TD><TD><code>MSMincho</code></TD><TD><code>MS-Mincho</code></TD></TR>
+ <TR><TD><code>MS-Gothic</code></TD><TD><code>NULL</code></TD><TD><code>MSGothic</code></TD><TD><code>MS-Gothic</code></TD></TR>
+ <TR><TD><code>MS-PMincho</code></TD><TD><code>NULL</code></TD><TD><code>MSPMincho</code></TD><TD><code>MS-PMincho</code></TD></TR>
+ <TR><TD><code>MS-PGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSPGothic</code></TD><TD><code>MS-PGothic</code></TD></TR>
+ <TR><TD><code>MS-UIGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSUIGothic</code></TD><TD><code>MS-UIGothic</code></TD></TR>
+ </TABLE>
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDEnumSysFonts, (
+ IN PDSysFontEnumProc enumProc,
+ IN void *clientData)
+ )
+
+
+/**
+ Finds a system font that matches the requested attributes.
+
+ <p>The method gets the PDSysFont rather than acquires it, so
+ do not call PDERelease() on the returned PDSysFont when done
+ with it. </p>
+ @param attrs IN/OUT A pointer to a PDEFontAttrs structure with the
+ attributes of the font you are searching for.
+ @param attrsSize IN/OUT The size of the <code>attrs</code> buffer in bytes.
+ @param flags IN/OUT Flags from PDSysFontMatchFlags.
+ @return The desired system font.
+ @see PDEnumSysFonts
+ @see PDFindSysFontForPDEFont
+ @see PDFindSysFontEx
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(PDSysFont, PDFindSysFont, (
+ IN PDEFontAttrsP attrs,
+ IN ASUns32 attrsSize,
+ IN ASUns32 flags)
+ )
+
+
+/**
+ Finds a system font that matches the requested attributes.
+
+ <p>If the requested font is a multiple master font instance,
+ the base font is returned, and the specified design vector
+ is decoded and returned in mmDesignVector. </p>
+
+ <p>The method gets the PDSysFont rather than acquires it, so
+ do not call PDERelease() on the returned PDSysFont when done
+ with it. </p>
+ @param attrs IN/OUT A pointer to a PDEFontAttrs structure with the
+ attributes of the font you are searching for.
+ @param attrsSize IN/OUT The size of the <code>attrs</code> buffer in bytes.
+ @param flags IN/OUT Flags from PDSysFontMatchFlags.
+ @param mmDesignVector IN/OUT (Filled by the method) If the requested
+ font is a Multiple Master font instance, the specified design
+ vector is decoded and returned in <code>mmDesignVector</code>.
+ @param designVecLength IN/OUT (Filled by the method) Pass the
+ length of <code>mmDesignVector</code>. This parameter also returns the
+ number of elements filled in <code>mmDesignVector</code> (the maximum is <code>4</code>).
+
+ @return The desired system font.
+ @see PDEnumSysFonts
+ @see PDFindSysFont
+ @see PDFindSysFontForPDEFont
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(PDSysFont, PDFindSysFontEx, (
+ IN PDEFontAttrsP attrs,
+ IN ASUns32 attrsSize,
+ IN ASUns32 flags,
+ OUT ASFixed *mmDesignVector,
+ OUT ASInt32 *designVecLength)
+ )
+
+
+/**
+ Finds a system font that matches the requested PDEFont.
+
+ <p>The method gets the PDSysFont rather than acquires it, so
+ do not call PDERelease() on the returned PDSysFont when done
+ with it. </p>
+
+ @param font IN/OUT A PDEFont whose matching system font is found.
+
+ @param flags IN/OUT A bit field comprised of PDSysFontMatchFlags
+ values.
+ <ul>
+ <li> kPDSysFontMatchNameAndCharSet</li>
+ <li> kPDSysFontMatchFontType </li>
+ <li> PDSysFontMatchFlags Passing zero matches <code>font</code> by name only. </li>
+ </ul>
+ @return The system font corresponding to <code>font</code>.
+ @exception peErrCantGetAttrs
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDFindSysFont
+ @since PI_PDSYSFONT_VERSION >= 0x00050000
+*/
+NPROC(PDSysFont, PDFindSysFontForPDEFont, (
+ IN PDEFont font,
+ IN ASUns32 flags)
+ )
+
+
+/**
+ Gets the attributes of a system font.
+
+ <p>The attributes will be returned in the buffer pointed to
+ by <code>attrsP</code>. </p>
+
+ <p>No more than <code>attrsSize</code> bytes will be written to the buffer. </p>
+
+ <p>This call can be expensive to execute, as it may involve
+ parsing the font in order to determine attributes. </p>
+
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose attributes are obtained.
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDEFontAttrs
+ structure with the attributes of a system font.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @exception peErrCantGetAttrs
+ @see PDSysFontGetEncoding
+ @see PDSysFontGetInfo
+ @see PDSysFontGetName
+ @see PDSysFontGetType0Widths
+
+ @note The font names that are returned from the methods
+ PDEnumSysFonts() and PDSysFontGetAttrs() are different in 5.0 and later
+ (compared to 4.05). The differences are shown in the table:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Acrobat 4.05 Name</TH><TH>Acrobat 4.05 PSname</TH><TH>Acrobat 5.0 (and later) Name</TH><TH>Acrobat 5.0 (and later) Psname</TH></TR>
+ <TR><TD><code>MS-Mincho</code></TD><TD><code>NULL</code></TD><TD><code>MSMincho</code></TD><TD><code>MS-Mincho</code></TD></TR>
+ <TR><TD><code>MS-Gothic</code></TD><TD><code>NULL</code></TD><TD><code>MSGothic</code></TD><TD><code>MS-Gothic</code></TD></TR>
+ <TR><TD><code>MS-PMincho</code></TD><TD><code>NULL</code></TD><TD><code>MSPMincho</code></TD><TD><code>MS-PMincho</code></TD></TR>
+ <TR><TD><code>MS-PGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSPGothic</code></TD><TD><code>MS-PGothic</code></TD></TR>
+ <TR><TD><code>MS-UIGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSUIGothic</code></TD><TD><code>MS-UIGothic</code></TD></TR>
+ </TABLE>
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDSysFontGetAttrs, (
+ IN PDSysFont sysFont,
+ OUT PDEFontAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+
+/**
+ Gets the widths of a single byte encoded system font.
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose widths are obtained.
+ @param widthsP IN/OUT (Filled by the method) A pointer to the widths
+ array. <code>widthsP</code> must have room for 256 entries.
+ @exception peErrCantGetWidths
+ @see PDSysFontGetType0Widths
+ @see PDSysFontGetWidthsEx
+ @see PDFontGetWidths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDSysFontGetWidths, (
+ IN PDSysFont sysFont,
+ OUT ASInt16 *widthsP)
+ )
+
+
+/**
+ Gets the widths of a single byte encoded system font.
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose widths are obtained.
+ @param widthsP IN/OUT (Filled by the method) A pointer to the widths
+ array. <code>widthsP</code> must have room for 256 entries.
+ @param mmDesignVector IN/OUT If <code>sysFont</code> is a multiple master font,
+ it points to the design vector, whose length must equal the
+ number of design axes of <code>sysFont</code>.
+ @exception peErrCantGetWidths
+ @see PDSysFontGetType0Widths
+ @see PDSysFontGetWidths
+ @see PDFontGetWidths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDSysFontGetWidthsEx, (
+ IN PDSysFont sysFont,
+ OUT ASInt16 *widthsP,
+ IN ASFixed *mmDesignVector)
+ )
+
+
+/**
+ Gets the encoding of a single byte encoded system font.
+
+ <p>The returned encoding must be freed via a call to ASfree(). </p>
+
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose encoding is obtained.
+ @param encodingNameP IN/OUT (Filled by the method) An encoding
+ name if the return value of PDSysFontGetEncoding() is zero.
+ If <code>encodingNameP</code> is the <code>NULL</code> ASAtom, the font uses its default
+ encoding.
+ @return An encoding array of 256 C strings. Each entry in the array
+ either contains a glyph name or <code>NULL</code>. If it is <code>NULL</code>, the
+ corresponding entry uses the font's built in encoding value.
+
+ <p>If the return value is zero, encodingNameP contains the
+ name of the encoding: </p>
+ <ul>
+ <li> For a Type 1 font, the default encoding is that specified
+ by the Encoding value in the font dictionary. </li>
+ <li> For a TrueType font, the default encoding is that specified
+ in the single byte CMAP table. </li>
+ </ul>
+ @see PDSysFontAcquirePlatformData
+ @see PDSysFontGetInfo
+ @see PDSysFontGetName
+ @see PDSysFontGetType0Widths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(Uns8 **, PDSysFontGetEncoding, (
+ IN PDSysFont sysFont,
+ OUT ASAtom *encodingNameP)
+ )
+
+
+/**
+ Gets high-level information about a system font.
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose information is obtained.
+ @param infoP IN/OUT (Filled by the method) A pointer to PDEFontInfoRec
+ structure to fill with font information for <code>sysFont</code>. No
+ more than <code>infoSize</code> bytes are written to this buffer.
+ @param infoSize IN/OUT The size of the <code>infoP</code> buffer in bytes.
+ @see PDSysFontAcquirePlatformData
+ @see PDSysFontGetEncoding
+ @see PDSysFontGetName
+ @see PDSysFontGetType0Widths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDSysFontGetInfo, (
+ IN PDSysFont sysFont,
+ OUT PDEFontInfoP infoP,
+ IN ASUns32 infoSize)
+ )
+
+
+/**
+ Gets the PostScript or TrueType styled name for a system
+ font.
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose name is obtained.
+ @return The ASAtom for the system font's name.
+ @see PDSysFontAcquirePlatformData
+ @see PDSysFontGetEncoding
+ @see PDSysFontGetInfo
+ @see PDSysFontGetType0Widths
+ @since PI_PDSYSFONT_VERSION >= 0x00050000
+*/
+NPROC(ASAtom, PDSysFontGetName, (
+ IN PDSysFont sysFont)
+ )
+
+
+/**
+ Acquires platform-specific data for use by user interface
+ code. It must be released when finished by PDSysFontReleasePlatformData().
+
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font returned by either PDFindSysFont() or PDFindSysFontForPDEFont().
+
+ @return A pointer to a platform-dependent structure, PDSysFontPlatData,
+ containing information relating to a system font. It returns
+ <code>NULL</code> if it is out of memory.
+ @see PDSysFontReleasePlatformData
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(PDSysFontPlatDataP, PDSysFontAcquirePlatformData, (
+ IN PDSysFont sysFont)
+ )
+
+
+/**
+ Releases platform-specific data for the specified PDSysFont.
+
+ @param platDataP IN/OUT A pointer to a PDSysFontPlatDataP structure
+ containing platform-specific data.
+
+ @see PDSysFontAcquirePlatformData Creates a new attribute object with the specified owner.
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+NPROC(void, PDSysFontReleasePlatformData, (
+ IN PDSysFontPlatDataP platDataP)
+ )
+
+#if !POQUTIO
+/**
+ Returns a PDScript value for the specified PDSysFont.
+ @param sysFont The font from which to acquire the script.
+ @since PI_PDS_WRITE_VERSION >= 0x00040000
+*/
+NPROC(PDScript, PDSysFontGetScript, (
+ IN PDSysFont sysFont)
+ )
+#endif
+
+
+/**
+ If there is a font on the system that matches this PDEFont,
+ embed the full font regardless of whether it was subsetted
+ or not embedded at all in the first place. This will not
+ work for CID fonts, because they must be subsetted.
+
+ <p>The matching is based on the PDSysFontMatchFlags. </p>
+
+ <p>Only the font object itself is modified; no content streams
+ are changed. </p>
+ @param font IN/OUT A PDEFont object returned from one of the <code>PDEFontCreate</code>
+ methods.
+ @param flags IN/OUT Flags from PDSysFontMatchFlags that determine
+ matches.
+ @param cosDoc IN/OUT Currently unused.
+ @exception peErrFontToEmbedNotOnSys is raised if there is no system font
+ that matches this PDEFont.
+ @exception genErrBadParm is raised if the PDEFont is a CID font.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @see PDEFontCreateFromSysFont
+ @see PDFindSysFontForPDEFont
+
+ @note This method does not change the reference count of
+ the font.
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDEmbedSysFontForPDEFont, (
+ IN PDEFont font,
+ IN ASUns32 flags,
+ IN CosDoc cosDoc)
+)
+
+
+/**
+ Derives the registry, ordering, and supplement information
+ of a multi-byte system font. This information can be used
+ to create a PDEFont from a system font. For more information
+ on CID fonts, see PDFontGetCIDSystemInfo().
+ @param sysFont IN/OUT A PDSysFont object referencing a multi-byte
+ system font.
+ @param registry IN/OUT (Filled by the method) The ASAtom representing
+ the CIDFont's Registry information (for example, <code>"Adobe"</code>).
+ @param ordering IN/OUT (Filled by the method) The ASAtom representing
+ the CIDFont's Ordering information (for example, <code>"Japan1"</code>).
+
+ @param supplement IN/OUT (Filled by the method) The <code>SystemSupplement</code>
+ field from the CIDFont.
+ @see PDFontGetCIDSystemInfo
+ @see PDFontGetCIDSystemSupplement
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDSysFontGetCIDSystemInfo, (
+ IN PDSysFont sysFont,
+ OUT ASAtom* registry,
+ OUT ASAtom* ordering,
+ OUT ASInt32* supplement)
+ )
+
+
+/**
+ Gets width information from a Type 0 system font. This information
+ can be used to create a PDEFont from a system font.
+
+ @param sysFont IN/OUT A PDSysFont object referencing a multibyte
+ system font.
+ @param ordering IN/OUT An ASAtom representing the CIDFont's Ordering
+ information. It is used to get a CMap object for <code>sysFont</code>.
+ @param hasDW IN/OUT (Filled by the method) <code>true</code> if <code>sysFont</code> has
+ a valid <code>dw</code> value; <code>false</code> otherwise.
+ @param dw IN/OUT (Filled by the method) The default width for glyphs
+ in a CIDFont. Currently, it is always <code>1000</code>. See Section 5.6 on
+ CIDFontType 0 in the <i>PDF Reference</i> for more information.
+
+ @param w IN/OUT (Filled by the method) A Cos array of a set of
+ lists that define the widths for the glyphs in the CIDFont.
+ Each list can specify individual widths for consecutive
+ CIDs, or one width for a range of CIDs. See Section 5.6.3
+ on character widths in CIDFonts in the <i>PDF Reference</i> for
+ information on the format of this array.
+ @param hasDW2 IN/OUT (Filled by the method) <code>true</code> if <code>sysFont</code> has
+ a valid <code>dw2</code> value. The default is <code>false</code>.
+ @param dw2 IN/OUT (Filled by the method) The default metrics for
+ writing mode 1. This entry is an array of two ASInt32 numbers:
+ the y component of the position vector and the y component
+ of the displacement vector for writing mode 1. The x component
+ of the position vector is always half the width of the character.
+ The x component of the displacement vector is always <code>0</code>.
+ The default value is <code>[880-1000]</code>. For information on writing
+ mode 1, see Section 5.6.3 on vertical writing in the <i>PDF
+ Reference</i>.
+ @param w2 IN/OUT (Filled by the method) A Cos array defining the
+ metrics for vertical writing. Its format is similar to the
+ format of the array in <code>w</code>. It defines the x and y components
+ of the position vector, and the y component of the displacement
+ vector. The x component of the displacement vector is always
+ <code>0</code>. See Section 5.6.3 on character widths in CIDFonts in
+ the <i>PDF Reference</i> for information on the format of this
+ array.
+ @see PDSysFontGetWidths
+ @see PDSysFontGetWidthsEx
+ @see PDFontGetWidths
+
+ @note In general, you are discouraged from using this method.
+ Instead use PDEFontCreateFromSysFontAndEncoding() followed
+ by PDEFontCreateWidthsNow() to create the W entry in a font.
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+NPROC(void, PDSysFontGetType0Widths, (
+ IN PDSysFont sysFont,
+ IN ASAtom ordering,
+ OUT ASBool* hasDW,
+ OUT ASInt32* dw,
+ OUT CosObj* w,
+ OUT ASBool* hasDW2,
+ OUT ASInt32* dw2,
+ OUT CosObj* w2)
+ )
+
+
+
+#undef NPROC
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFontExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFontExpT.h
new file mode 100644
index 0000000..d6c9b86
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PDSysFontExpT.h
@@ -0,0 +1,164 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PDSysFontExpT.h
+
+ - PDSysFont Types header file.
+
+*********************************************************************/
+
+#ifndef _H_PSFExpT
+#define _H_PSFExpT
+
+
+#include "Environ.h"
+#if PLUGIN || ACROBAT_LIBRARY
+#include "CoreExpT.h"
+#else
+#include "PubTypes.h"
+#endif
+
+#if WIN_PLATFORM
+#include <Windows.h>
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#if defined( WINDOWS ) || defined( WIN_ENV )
+#pragma pack(push, peexpt, 8)
+#endif
+
+typedef ASInt16 PDSysFontMode;
+typedef ASInt16 PDSysFontFID;
+typedef ASInt16 PDSysFontFStyle;
+
+/** A reference to a font installed in the host system. PDSysFont methods allow you to
+ list the fonts available in the host system and to find a font in the system that matches
+ a PDEFont, if it is present.
+ @see PDEnumSysFonts
+ @see PDFindSysFont
+ @see PDFindSysFontEx
+ @see PDFindSysFontForPDEFont
+ @see PDEnumSysFonts
+*/
+typedef struct _t_PDSysFont *PDSysFont;
+
+
+/** Font matching flags for PDFindSysFontForPDEFont() and PDFindSysFont().
+ @see PDFindSysFont
+ @see PDFindSysFontForPDEFont
+*/
+typedef enum {
+
+ /** Match the font name and character set. */
+ kPDSysFontMatchNameAndCharSet = 0x0001,
+
+ /** Match the font type. */
+ kPDSysFontMatchFontType = 0x0002,
+
+ /** Match the writing mode (horizontal or vertical). */
+ kPDSysFontMatchWritingMode = 0x0004
+ } PDSysFontMatchFlags;
+
+/** PDEFont information.
+ @see PDSysFontGetInfo
+*/
+typedef struct _t_PDEFontInfo {
+
+ /** An ASAtom for the font name (for example, <code>"Times-Roman"</code>). */
+ ASAtom name;
+
+ /**An ASAtom for font type (for example, <code>"Type 1"</code>, <code>"TrueType"</code>, and so on). */
+ ASAtom type;
+
+ /** An ASAtom for <code>"Roman"</code>, or ASAtomNull. If it is <code>"Roman"</code>, the
+ characters must be a subset of the Adobe Standard Roman Character Set.
+ */
+ ASAtom charSet;
+
+ /** An ASAtom for font encoding, such as WinAnsiEncoding. */
+ ASAtom encoding;
+
+ /** The writing mode: <code>0</code> means horizontal and <code>1</code> means vertical. */
+ PDSysFontMode wMode;
+ } PDEFontInfoRec, *PDEFontInfoP;
+
+
+/** PDSysFontPlatData */
+#if WIN_PLATFORM
+typedef struct _t_PDSysFontPlatData {
+
+ /** This must be <code>sizeof(PDSysFontPlatData)</code>. */
+ ASSize_t size;
+
+ /** (Windows only) The Windows <code>LOGFONTA</code> structure defining font attributes.*/
+ LOGFONTA *lf;
+
+ /** (Optional) This is only set if <code>LOGFONTA</code> is not present. */
+ ASPathName fontPath;
+
+ /** (Optional) This is only set if <code>LOGFONTA</code> is not present. */
+ ASPathName afmPath;
+} PDSysFontPlatData, *PDSysFontPlatDataP;
+#elif MAC_PLATFORM
+typedef struct _t_PDSysFontPlatData {
+
+ /** This must be <code>sizeof(PDSysFontPlatData)</code>. */
+ ASSize_t size;
+
+ /** The font ID. */
+ PDSysFontFID fontID;
+
+ /** The style value within that font. The default is <code>0</code>. */
+ PDSysFontFStyle fontStyle;
+} PDSysFontPlatData, *PDSysFontPlatDataP;
+#elif UNIX_PLATFORM
+typedef struct _t_PDSysFontPlatData {
+
+ /** This must be <code>sizeof(PDSysFontPlatData)</code>. */
+ ASSize_t size;
+
+ /** A path to the font file. It is set only if <code>lf</code> is not present. */
+ ASPathName fontPath;
+
+ /** A path to the font AFM file. It is set only if <code>lf</code> is not present. */
+ ASPathName afmPath;
+} PDSysFontPlatData, *PDSysFontPlatDataP;
+#endif
+
+/* PDSysFontEnumProc */
+
+/**
+ A callback for PDEnumSysFonts(). It is called once for each
+ system font.
+ @param sysFont IN/OUT The system font.
+ @param clientData IN/OUT User-supplied data that was specified
+ in the call to PDEnumSysFonts().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDEnumSysFonts
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDSysFontEnumProc)(PDSysFont sysFont, void *clientData);
+
+#if defined( WINDOWS ) || defined( WIN_ENV )
+#pragma pack (pop, peexpt ) /* reset to /Zp */
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_PSFExpT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEError.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEError.h
new file mode 100644
index 0000000..151d1d7
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEError.h
@@ -0,0 +1,19 @@
+/* PEError.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PEErrorASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEErrorASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEErrorASF.h
new file mode 100644
index 0000000..ea3f6c7
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEErrorASF.h
@@ -0,0 +1,64 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(peErrNoError, "No error")
+
+DefineErr(peErrUnknownPDEColorSpace, "Unknown PDEColorSpace value.")
+
+DefineErr(peErrWrongPDEObjectType, "Incorrect PDEObject type.")
+
+DefineErr(peErrUnknownResType, "Unknown PDEObject resource type.")
+
+DefineErr(peErrPStackUnderflow, "PDFEdit parse stack underflow while reading object.")
+
+DefineErr(peErrCantCreateFontSubset, "Unable to create embedded font subset.")
+
+DefineErr(peErrBadBlockHeader, "Bad block header for type 1 embedded stream.")
+
+DefineErr(peErrCantGetAttrs, "Unable to get attributes for font.")
+
+DefineErr(peErrCantGetWidths, "Unable to get widths for font.")
+
+DefineErr(peErrFontToEmbedNotOnSys, "Unable to find font to embed on this system.")
+
+DefineErr(peErrCantEmbedFont, "This font is licensed and cannot be embedded.")
+
+DefineErr(peErrCantGetImageDict, "Unable to get image dictionary.")
+
+DefineErr(peErrCantReadImage, "Unable to read image data.")
+
+DefineErr(peErrCantGetShading, "Unable to get shading resource.")
+
+DefineErr(peErrWrongOpType, "Wrong operand type.")
+
+DefineErr(peErrTooFewPathOps, "Too few operands in path.")
+
+DefineErr(peErrErrorParsingImage, "There was an error while trying to parse an image.")
+
+DefineErr(peErrReadLessImageColor, "Read less image color data than expected.")
+
+DefineErr(peErrReadLessImageData, "Read less image data than expected.")
+
+DefineErr(peErrBadResMetrics, "Invalid or corrupt font metrics in the resource file.")
+
+DefineErr(peErrBadType3Font, "Invalid Type 3 font.")
+
+DefineErr(peErrInvalidUnicodeAttribute, "Invalid Unicode attribute or attribute not set.")
+
+DefineErr(peErrIllegalUTFText, "Invalid Unicode text.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEExpT.h
new file mode 100644
index 0000000..9f87b27
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEExpT.h
@@ -0,0 +1,2231 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1995-2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PEExpT.h
+
+ - Types, macros, structures, etc. required to use the PDFEdit HFTs.
+
+*********************************************************************/
+
+#ifndef _H_PEExpT
+#define _H_PEExpT
+
+#include "Environ.h"
+#if PLUGIN || ACROBAT_LIBRARY
+#include "CoreExpT.h"
+#include "ASExpT.h"
+#include "CosExpT.h"
+#include "PDExpT.h" /* ASFixedQuad */
+#else
+#include "PubTypes.h"
+#include "ASTypes.h"
+#include "ASExtndT.h"
+#include "CosTypes.h"
+#include "ASFixed.h"
+#include "FixedGeo.h"
+#include "FixedMtx.h"
+#include "ASStm.h"
+#endif
+
+#include "PDSysFontExpT.h"
+
+#if PLUGIN
+#define PEX1 ACCB1
+#define PEX2 ACCB2
+#else
+#define PEX1 ACEX1
+#define PEX2 ACEX2
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#if defined( WINDOWS ) || defined( WIN_ENV )
+#pragma pack(push, peexpt, 8)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Function prototypes
+** The following defines are used in function prototypes
+** for labelling function parameters as input or output.
+** Note that function arguments which are pointers and are
+** marked as 'OUT' are pointers to buffers and the buffers
+** will contain the output data.
+*/
+#define IN
+#define OUT
+
+/* Note on integer types.
+** The following integer types are used for the following purposes.
+** Index into a structure or array: ASInt32
+** Count, number of elements: ASInt32
+** Variable or argument of enum: ASInt32
+** Size in bytes of a structure or data: ASUns32
+** Bitfield flag: ASUns32
+**
+** I find it easier to use these existing types than to define
+** new types such as Count, Index and Size, and to remember to
+** use them consistently.
+**
+** I use an ASInt32 for index and enum because both may be negative.
+** (Although I don't use negative indixes in this API.)
+** I use ASInt32 for enums because enums can have different sizes
+** on different compilers; I want my API to be independent of compiler.
+** ASInt32 is used for count because it cannot be greater than an index.
+** ASUns32 is the obvious choice for size and bitfield (os_size_t has
+** too many underlines in it!-)
+*/
+
+/*------------------------------------------------------------------------
+ PDFEdit Public Types.
+------------------------------------------------------------------------*/
+
+
+/** The abstract super class of the PDFEdit classes. You can find the type of any object with
+ the PDEObjectGetType() method. You can then cast and apply that class' methods
+ to the object. In addition, you can cast any of the PDFEdit objects to a PDEObject
+ and use it anywhere a PDEObject is called for, such as in the PDEObject methods.
+ @see PDERelease
+ @see PDEObjectDump
+*/
+typedef struct _t_PDEObject *PDEObject;
+
+/** Contains the modifiable contents of a PDPage. A PDEContent object may be obtained from
+ an existing page, from a Form XObject, or from a Type 3 CharProc. You can create
+ an empty PDEContent object. A PDEContent object contains PDEElement objects. In addition, a
+ PDEContent object may have attributes such as a Form matrix and <code>setcachedevice</code>
+ parameters.
+ @see PDEContentCreate
+ @see PDEContainerGetContent
+ @see PDEContentCreateFromCosObj
+ @see PDEFormGetContent
+ @see PDPageAcquirePDEContent
+ @see PDERelease
+*/
+typedef struct _t_PDEContent *PDEContent;
+
+/** The base class for elements of a page display list (PDEContent) and for clip objects.
+The general PDEElement methods allow you to get and set general element
+properties.
+@see PDEContainer (subclass)
+@see PDEForm (subclass)
+@see PDEGroup (subclass)
+@see PDEImage (subclass)
+@see PDEPath (subclass)
+@see PDEPlace (subclass)
+@see PDEPS (subclass)
+@see PDEShading (subclass)
+@see PDEText (subclass)
+@see PDEUnknown (subclass)
+@see PDEXObject (subclass)
+@see PDEClipGetElem (subclass)
+@see PDEContentGetElem (subclass)
+@see PDEElementCopy (subclass)
+@see PDERelease
+*/
+typedef struct _t_PDEElement *PDEElement;
+
+/* Subclasses of PDEElement.
+** PDEText - a collection of text strings or words
+** PDEPath - a graphic path
+** PDEImage - an image
+** PDEForm - an XObject form
+** PDEPS - a pass-through PostScript object
+** PDEXObject - an XObject of unknown type
+** PDEPlace - a marked content place operator
+** PDEContainer - a marked content container
+** PDEGroup - a container of PDEElement objects
+** PDEUnknown - an unknown element
+*/
+
+/** A PDEElement representing text. It is a container for text as show strings or as
+ individual characters. Each sub-element may have different graphics state properties.
+ However, the same clip applies to all sub-elements of a PDEText. Also, the
+ <code>charpath</code> of a PDEText can be used to represent a clip.
+ @see PDEElement (superclass)
+ @see PDETextCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEText *PDEText;
+
+/** A PDEElement that contains a path. Path objects can be stroked, filled, and/or serve
+ as clipping paths.
+ @see PDEElement (superclass)
+ @see PDEPathCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEPath *PDEPath;
+
+/** A PDEElement that contains an Image XObject or an inline image. You can associate
+ data or a stream with an image.
+ @see PDEElement (superclass)
+ @see PDEImageCreate
+ @see PDEImageCreateFromCosObj
+ @see PDERelease
+*/
+typedef struct _t_PDEImage *PDEImage;
+
+/** A PDEElement that corresponds to an instance of an XObject Form on a page (or
+ another containing stream such as another XObject Form or annotation form). The
+ context associated with this instance includes the actual CosObj stream that
+ represents the XObject Form and the initial conditions of the graphics state. The
+ latter consists of the transformation matrix, initial color values, and so forth. It is
+ possible to have two PDEForm objects that refer to the same XObject Form. The forms will
+ exist at different places on the same page, depending on the transformation matrix.
+ They may also have different colors or line stroking parameters. In the case of a
+ transparency group, the opacity is specified in the <code>gstate</code>.
+ Within a PDEForm, each PDEElement has its own <code>gstate</code> (or is a container, place,
+ or group object). These <code>gstates</code> are independent of the parent PDEForm <code>gstate</code>.
+ PDEForm elements within the PDEForm may have their own opacity.
+ A PDEContent may be obtained from a PDEForm to edit the form's display list.
+ @see PDEElement (superclass)
+ @see PDEFormCreateFromCosObj
+ @see PDERelease
+*/
+typedef struct _t_PDEForm *PDEForm;
+
+/** An element representing inline or XObject pass-through PostScript object. XObject
+ PostScripts are listed in page XObject resources.
+ @see PDEElement (superclass)
+ @see PDEPSCreate
+ @see PDEPSCreateFromCosObj
+*/
+typedef struct _t_PDEPS *PDEPS;
+
+/** A PDEElement representing an arbitrary XObject.
+ @see PDEElement (superclass)
+ @see PDEXObjectCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEXObject *PDEXObject;
+
+/** A PDEElement that marks a place on a page in a PDF file. In a PDF file, a place is
+ represented by the MP or DP Marked Content operators.
+
+ <p>Marked content is useful for adding structure information to a PDF file. For instance, a
+ drawing program may want to mark a point with information, such as the start of a
+ path of a certain type. Marked content provides a way to retain this information in the
+ PDF file. A DP operator functions the same as the MP operator and, in addition,
+ allows a property list dictionary to be associated with a place.</p>
+
+ @see PDEElement (superclass)
+ @see PDEPlaceCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEPlace *PDEPlace;
+
+/** A PDEElement representing an unknown element.
+ @see PDEElement (superclass)
+*/
+typedef struct _t_PDEUnknown *PDEUnknown;
+
+/** A group of PDEElement objects on a page in a PDF file. In the PDF file, containers are
+ delimited by Marked Content BMC/EMC or BDC/EMC pairs. Every PDEContainer
+ has a Marked Content tag associated with it. In addition to grouping a set of elements,
+ a BDC/EMC pair specifies a property list to be associated with the grouping. Thus, a
+ PDEContainer corresponding to a BDC/EMC pair also has a property list dictionary
+ associated with it.
+ @see PDEContainerCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEContainer *PDEContainer;
+
+/** An in-memory representation of objects in a PDEContent object. It has no state and is not
+ represented in any way in a PDF content stream (that is, PDEContent).
+ When used in a PDEClip, this object is used to associate PDEText objects into a
+ single clipping object.
+ @see PDEElement (superclass)
+ @see PDEGroupCreate
+*/
+typedef struct _t_PDEGroup *PDEGroup;
+
+/** A PDEElement that represents smooth shading.
+ @see PDEElement (superclass)
+ @see PDEShadingCreateFromCosObj
+ @see PDEShadingCreateFromCosObj
+ @see PDEShadingGetCosObj
+*/
+typedef struct _t_PDEShading *PDEShading;
+
+/** The PDFEdit representation of the opening bracket of a marked-content sequence.
+ Elements of this type must be paired with elements of type PDEEndContainer.
+ @see PDEElement (superclass)
+ @see PDEBeginContainerCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEBeginContainer *PDEBeginContainer;
+
+/** The PDFEdit representation of the closing bracket of a marked-content sequence.
+ Elements of this type must be paired with elements of type PDEBeginContainer.
+ @see PDEElement (superclass)
+ @see PDEEndContainerCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEEndContainer *PDEEndContainer;
+
+/** A group of PDEElement objects on a page in a PDF file.
+ @see PDEElement (superclass)
+ @see PDEBeginGroupCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEBeginGroup *PDEBeginGroup ;
+
+/** A group of PDEElement objects on a page in a PDF file.
+ @see PDEElement (superclass)
+ @see PDEEndGroupCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEEndGroup *PDEEndGroup;
+
+
+/* This typedef appears in both PDExpT.h and PEExpT.h now, so avoid multiple typedef's here */
+#ifndef _T_PDEFONT_
+#define _T_PDEFONT_
+
+/** A reference to a font used on a page in a PDF file. It may be equated with a font in the
+ system. A PDEFont is not the same as a PDFont; a PDFont is associated with a
+ particular document.
+ @see PDEFontCreate
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontEx
+ @see PDEFontCreateWithParams
+ @see PDETextGetFont
+ @see PDERelease
+*/
+typedef struct _t_PDEFont *PDEFont;
+#endif
+
+
+/** A reference to a color space used on a page in a PDF file. The color space is part of
+ the graphics state attributes of a PDEElement.
+ @see PDEColorSpaceCreate
+ @see PDEColorSpaceCreateFromName
+ @see PDEImageGetColorSpace
+ @see PDERelease
+*/
+typedef struct _t_PDEColorSpace *PDEColorSpace;
+
+
+/** A list of PDEElement objects containing a list of PDEPath objects and PDEText objects that describe a
+ clip state. PDEClip objects can be created and built up with PDEClip methods. Any
+ PDEElement object can have PDEClip associated with it.
+ PDEClip objects can contain PDEContainer objects and PDEGroup objects to an arbitrary level
+ of nesting. This allows PDEContainer objects to be used to mark clip objects.
+ PDEGroup objects inside PDEClip objects that contain at least one PDEText and no PDEPath objects
+ have a special meaning. All PDEText objects contained in such a PDEGroup are
+ considered to be part of the same BT/ET block. This means that the union of these
+ PDEText objects makes up a single clipping path, as opposed to the intersection of the
+ PDEText objects.
+ @see PDEClipCreate
+ @see PDEElementGetClip
+ @see PDERelease
+ @see PDEClipFlattenedEnumElems
+*/
+typedef struct _t_PDEClip *PDEClip;
+
+
+/** A reference to an ExtGState resource used on a page in a PDF file. It specifies a
+ PDEElement object's extended graphics state, which is part of its graphics state.
+ @see PDEExtGStateCreate
+ @see PDERelease
+*/
+typedef struct _t_PDEExtGState *PDEExtGState;
+
+
+/** A reference to a Pattern resource used on a page in a PDF file.
+ @see PDEPatternCreate
+ @see PDERelease
+ @see PDEPatternGetCosObj
+*/
+typedef struct _t_PDEPattern *PDEPattern;
+
+
+/** A color space with a variable number of device-dependent components. It is usually used
+ to store multiple spot colors in a single color space.
+ @see PDEDeviceNColorsCreate
+*/
+typedef struct _t_PDEDeviceNColors *PDEDeviceNColors;
+
+
+/** A reference to the state of a reader.
+*/
+typedef struct _t_PDEState *PDEState;
+
+
+/** A reference to the state of a writer.
+*/
+typedef struct _t_PDEEmitState *PDEEmitStateP;
+
+
+/** An object for creating and manipulating a soft mask in a PDF file.
+ @see PDEElement (superclass)
+ @see PDESoftMaskCreate
+ @see PDESoftMaskCreateFromCosObj
+ @see PDESoftMaskCreateFromName
+ @see PDERelease
+*/
+typedef struct _t_PDESoftMask *PDESoftMask;
+
+
+/** A transparency (XGroup) resource.
+ @see PDEElement (superclass)
+ @see PDEXGroupCreate
+ @see PDEXGroupCreateFromCosObj
+ @see PDERelease
+*/
+typedef struct _t_PDEXGroup *PDEXGroup;
+
+
+/** An object used to read streams of PDEElement objects from page contents.
+*/
+typedef struct _t_PDEReader *PDEReader;
+
+
+/** An object used to write streams of PDEElement objects to page content.
+*/
+typedef struct _t_PDEWriter *PDEWriter;
+
+
+/** A PDEElement that provides system encoding for a PDF file.
+ @see PDEElement (superclass)
+ @see PDSysEncodingCreateFromBaseName
+ @see PDSysEncodingCreateFromCMapName
+ @see PDERelease
+*/
+typedef struct _t_PDSysEncoding *PDSysEncoding;
+
+
+/** A reference to a PDEDoc.
+*/
+typedef struct _t_PDEDoc *PDEDoc;
+
+
+/** A reference to a PDEPage.
+*/
+typedef struct _t_PDEPage *PDEPage;
+
+
+/** A reference to a PDETextItem.
+*/
+typedef struct _t_PDETextItem *PDETextItem;
+
+/** A reference to a PDEImageFlate.
+*/
+typedef struct _t_PDEImageFlate *PDEImageFlate;
+
+
+/** A reference to a PDEImageJPX.
+*/
+typedef struct _t_PDEImageJPX *PDEImageJPX;
+
+
+/** A reference to a JPXColorSpace.
+*/
+typedef struct _t_JPXColorSpace *JPXColorSpace;
+
+
+/** A reference to a JPXPalette.
+*/
+typedef struct _t_JPXPalette *JPXPalette;
+
+
+/*------------------------------------------------------------------------
+ PDFEdit Attributes.
+------------------------------------------------------------------------*/
+
+
+/**
+ A structure describing attributes of a PDEContent object.
+
+ @see PDEContentGetAttrs
+ @see PDEContentToCosObj
+*/
+typedef struct _t_PDEContentAttrs {
+
+ /** PDEContentFlags */
+ ASUns32 flags;
+
+ /* CharProc attributes */
+
+ /** If flags has kPDESetCacheDevice set, the first six cache
+ device values contain the operands for the d1 (<code>setcachedevice</code>)
+ page operator. If flags has kPDESetCacheDevice set,
+ <code>cacheDevice</code> contains two <code>charwidth</code> values.
+ */
+ ASFixed cacheDevice[8];
+
+ /* Form attributes */
+
+ /** Only used if PDEContent contains a Form XObject.
+ It corresponds to FormType key in the XObject Form attributes
+ dictionary.
+ */
+ ASInt32 formType;
+
+ /** Only used if PDEContent contains a Form. It is the bounding box of the
+ PDEContent object. It corresponds to the BBox key in the XObject
+ Form attributes dictionary.
+ */
+ ASFixedRect bbox;
+
+ /** Only used if PDEContent contains a Form. It is the transformation
+ matrix for the PDEContent object. It corresponds to the Matrix key in
+ the XObject Form attributes dictionary.
+ */
+ ASFixedMatrix matrix;
+
+ /** Only used if PDEContent contains a Form. It is the form's XUID, which is an
+ ID that uniquely identifies the form. It corresponds to the XUID key in
+ the XObject Form attributes dictionary.
+ */
+ CosObj XUID;
+ } PDEContentAttrs, *PDEContentAttrsP;
+
+
+/**
+ A structure describing a color value.
+*/
+typedef struct _t_PDEColorValue {
+
+ /** Color value components. For example, a Gray color space has one
+ component, an RGB color space has three components, a CMYK
+ has four components, and so on. Use <code>color[0]</code> for the Separation color space.
+ */
+ ASFixed color[7];
+
+ /** Used if the color space is DeviceN. */
+ PDEObject colorObj2;
+
+ /** Used for color spaces whose color values do not have numeric
+ values, such as the Pattern color space.
+ */
+ PDEObject colorObj;
+ } PDEColorValue, *PDEColorValueP;
+
+
+/**
+ A structure describing a color specification.
+
+*/
+typedef struct _t_PDEColorSpec {
+
+ /** The specified PDEColorSpace. */
+ PDEColorSpace space;
+
+ /** The color value. */
+ PDEColorValue value;
+ } PDEColorSpec, *PDEColorSpecP;
+
+
+/**
+ A structure describing a dash specification, as described
+ in Table 4.8 in the <i>PDF Reference</i>. See Section 4.3.2 for
+ more information on line dash patterns.
+
+*/
+typedef struct _t_PDEDash {
+
+ /** The dash phase. The phase is a number that specifies a distance in user
+ space into the dash pattern at which to begin marking the path.
+ */
+ ASFixed dashPhase;
+
+ /** The number of entries in the dash array, which is an element of the Border array. */
+ ASInt32 dashLen;
+
+ /** The dash array, which specifies distances in user space for the
+ lengths of dashes and gaps.
+ */
+ ASFixed dashes[11];
+ } PDEDash, *PDEDashP;
+
+
+/** A structure describing the graphics state that was set.
+ @see PDEDefaultGState
+ @see PDETextAdd
+*/
+typedef enum {
+
+ /** A fill color space was set corresponding to the cs (<code>setcolorspace</code>) operator. */
+ kPDEFillCSpaceWasSet = 0x0001,
+
+ /** A color fill value was set corresponding to the sc (<code>setcolor</code>) operator. */
+ kPDEFillCValueWasSet = 0x0002,
+
+ /** A color space stroke value was set corresponding to the CS (<code>setcolorspace</code>) operator. */
+ kPDEStrokeCSpaceWasSet = 0x0004,
+
+ /** A color stroke value was set corresponding to the SC (<code>setcolor</code>) operator. */
+ kPDEStrokeCValueWasSet = 0x0008,
+
+ /** A dash specification was set corresponding to the d (<code>setdash</code>) operator. */
+ kPDEDashWasSet = 0x0010,
+
+ /** The line width was set corresponding to the w (<code>setlinewidth</code>) operator. */
+ kPDELineWidthWasSet = 0x0020,
+
+ /** The miter limit was set corresponding to the M (<code>setmiterlimit</code>) operator. */
+ kPDEMiterLimitWasSet = 0x0040,
+
+ /** Line flatness was set corresponding to the i (<code>setflat</code>) operator. */
+ kPDEFlatnessWasSet = 0x0080,
+
+ /** Line cap style was set corresponding to the J (<code>setlinecap</code>) operator. */
+ kPDELineCapWasSet = 0x0100,
+
+ /** Line join style was set corresponding to the j (<code>setlinejoin</code>) operator. */
+ kPDELineJoinWasSet = 0x0200,
+
+ /** A color rendering intent was set corresponding to the Intent key in the image dictionary. */
+ kPDERenderIntentWasSet = 0x0400,
+
+ /** An extended graphics state was set corresponding to the gs operator. */
+ kPDEExtGStateWasSet = 0x0800,
+
+ /** The soft mask matrix has been set */
+ kPDESoftMaskMatrixWasSet = 0x1000 /* New in PDFLib 8.0 */
+} PDEGraphicStateWasSetFlags;
+
+
+/** A structure describing the text state that was set.
+ @see PDETextAdd
+ @see PDETextGetTextState
+ @see PDETextRunSetTextState
+*/
+typedef enum {
+
+ /** Character spacing was set corresponding to the Tc operator. */
+ kPDECharSpacingWasSet = 0x0001,
+
+ /** Word spacing was set corresponding to the Tw operator. */
+ kPDEWordSpacingWasSet = 0x0002,
+
+ /** Text rendering mode was set corresponding to the Tr operator. */
+ kPDERenderModeWasSet = 0x0004,
+
+ /** TBD */
+ kPDEFontSizeWasSet = 0x0008, /* new in PDFLib 5.0 */
+
+ /** TBD */
+ kPDEHScaleWasSet = 0x0010, /* new in PDFLib 5.0 */
+
+ /** TBD */
+ kPDETextRiseWasSet = 0x0020 /* new in PDFLib 5.0 */
+} PDETextStateWasSetFlags;
+
+#define kPDFStateSetAll ((ASUns32) -1)
+
+
+/**
+ Attributes of a PDEElement or a PDEText sub-element.
+ @see PDEDefaultGState
+ @see PDETextAdd
+*/
+typedef struct _t_PDEGraphicState {
+
+ /** PDEGraphicStateWasSetFlags indicating if an attribute has been set.
+ @note Support for these flags is not complete. For compatibility,
+ you should set them, but do not depend on reading their
+ values back. The intended use with XObject Forms is to
+ indicate whether the value is inherited or explicitly set.
+ */
+ ASUns32 wasSetFlags;
+
+ /** The fill color specification.
+ The default value is DeviceGray, fixedZero.
+ */
+ PDEColorSpec fillColorSpec;
+
+ /** The stroke color specification.
+ The default value is DeviceGray, fixedZero.
+ */
+ PDEColorSpec strokeColorSpec;
+
+ /** The dash specification.
+ The default value is <code>[0, 0]</code>.
+ */
+ PDEDash dash;
+
+ /** The line width corresponding to the w (<code>setlinewidth</code>) operator.
+ The default value is <code>fixedOne</code>.
+ */
+ ASFixed lineWidth;
+
+ /** The miter limit corresponding to the M (<code>setmiterlimit</code>) operator.
+ The default value is fixedTen.
+ */
+ ASFixed miterLimit;
+
+ /** The line flatness corresponding to the i (<code>setflat</code>) operator.
+ The default value is fixedZero.
+ */
+ ASFixed flatness;
+
+ /** The line cap style corresponding to the J (<code>setlinecap</code>) operator.
+ The default value is <code>0</code>.
+ */
+ ASInt32 lineCap;
+
+ /** Line join style corresponding to the j (<code>setlinejoin</code>) operator.
+ The default value is <code>0</code>.
+ */
+ ASInt32 lineJoin;
+
+ /** A color rendering intent corresponding to the Intent key in the image dictionary.
+ The default value is <code>0</code>.
+ */
+ ASAtom renderIntent;
+
+ /** An extended graphics flag corresponding to the <code>gs</code> operator.
+ The default value is CosObj, <code>NULL</code>.
+ */
+ PDEExtGState extGState;
+
+ /** The CTM at the time soft mask was established.
+ The default value is identity matrix.
+ */
+ ASFixedMatrix softMaskMatrix;
+ } PDEGraphicState, *PDEGraphicStateP;
+
+/* Attributes of a PDEText subelement */
+/* PDETextGetTextState and PDETextRunSetTextState can handle up to renderMode for backward
+ compatibility with PDFLib 4.0 or below.
+ Use PDETextGetState and PDETextRunSetState for new PETextState fields. */
+
+/**
+ Attributes of a PDEText element.
+ @see PDETextAdd
+ @see PDETextGetTextState
+ @see PDETextRunSetTextState
+*/
+typedef struct _t_PDETextState {
+
+ /** PDETextStateWasSetFlags indicates whether an attribute has been set.
+
+ @note Support for these flags is not complete. For compatibility,
+ you should set them, but do not depend on reading their
+ values back. The intended use with XObject Forms is to
+ indicate whether the value is inherited or explicitly set.
+
+ @note PDFEdit ignores the <code>wasSetFlags</code> flag, so you must
+ initialize the PDETextState fields.
+ */
+ ASUns32 wasSetFlags;
+
+ /** Character spacing was set corresponding to the Tc operator. */
+ ASFixed charSpacing;
+
+ /** Word spacing corresponding to the Tw operator. */
+ ASFixed wordSpacing;
+
+ /** Text rendering mode corresponding to the Tr operator. */
+ ASInt32 renderMode;
+
+ /** Default is <code>1</code>. */
+ ASFixed fontSize; /* new in PDFLib 5.0. Default = 1 */
+
+ /** Default is <code>100</code> (meaning 100%). */
+ ASFixed hScale; /* new in PDFLib 5.0. Default = 100 (== 100%) */
+
+ /** Specifies the distance, in text space units that are not scaled, to
+ move the baseline up or down from its default location. See Section 5.2.6 in the <i>PDF Reference</i>.
+ */
+ ASFixed textRise; /* new in PDFLib 5.0 */
+ } PDETextState, *PDETextStateP;
+
+
+/**
+ Attributes of a PDEImage.
+ @see PDEImageCreate
+ @see PDEImageGetAttrs
+ @see PDEImageGetData
+*/
+typedef struct _t_PDEImageAttrs {
+
+ /** PDEImageAttrFlags indicating image attributes. */
+ ASUns32 flags;
+
+ /** The width of the image corresponding to the Width key in the image dictionary. */
+ ASInt32 width;
+
+ /** The height of the image corresponding to the Height key in the image dictionary. */
+ ASInt32 height;
+
+ /** The number of bits used to represent each color component in the
+ image corresponding to the BitsPerComponent key in the image dictionary.
+ */
+ ASInt32 bitsPerComponent;
+
+ /** An array of numbers specifying the mapping from sample values
+ in the image to values appropriate for the current color space.
+ These values correspond to the Decode key in the image dictionary.
+ */
+ ASFixed decode[8];
+
+ /** The color rendering intent corresponding to the Intent key in the image dictionary. */
+ ASAtom intent;
+ } PDEImageAttrs, *PDEImageAttrsP, PDEImageFlateAttrs, *PDEImageFlateAttrsP;
+
+
+/**
+ The filter element in a filter array.
+ @see CosNewStream
+ @see PDEContentToCosObj
+ @see PDEImageCreate
+*/
+typedef struct _t_PDEFilterSpec {
+
+ /** Parameters used by the decoding filters specified with the Filter
+ key. It corresponds to the DecodeParms key in the stream
+ dictionary.
+
+ <p>It must be set to <code>NULL</code> if PDEFilterSpec is specified but no
+ encode or decode parameters are specified. This can be done
+ by passing CosNewNull for the unused encode and/or decode
+ parameters.</p>
+
+ <p>The required decode parameters for DCTDecode are <code>Columns</code>, <code>Rows</code>,
+ and <code>Colors</code>. The parameters should be passed in a CosDict. </p>
+ */
+ CosObj decodeParms;
+
+ /** Parameters used when encoding the stream. It is required for
+ the DCTDecode filter, but is optional for other filters.
+
+ <p>It must be set to <code>NULL</code> if PDEFilterSpec is specified but no
+ encode or decode parameters are specified. This can be done
+ by passing CosNewNull for the unused encode and/or decode parameters. </p>
+ */
+ CosObj encodeParms;
+
+ /** The filter name. The supported filters are:
+ <ul>
+ <li>ASCIIHexDecode</li>
+ <li>ASCII85Decode</li>
+ <li>LZWDecode</li>
+ <li>DCTDecode</li>
+ <li>CCITTFaxDecode</li>
+ <li>RunLengthDecode</li>
+ <li>FlateDecode</li>
+ </ul>
+ */
+ ASAtom name;
+
+ /** Reserved - used to align to 32 bits. */
+ ASInt16 padding;
+ } PDEFilterSpec, *PDEFilterSpecP;
+
+
+/** Filter information for streams.
+
+ <p>Although the PDEFilterSpec is declared as a one member array in the header file,
+ more members can be added by dynamically allocating the PDEFilterArray with
+ space for as many filters as you would like to add.
+ In practice, there is seldom need for more than two filters.</p>
+
+ @see PDEContentToCosObj
+ @see PDEImageCreate
+*/
+typedef struct _t_PDEFilterArray {
+
+ /** The number of filters in the array. */
+ ASInt32 numFilters;
+
+ /** A variable length array of filter specifications. */
+ PDEFilterSpec spec[1];
+ } PDEFilterArray, *PDEFilterArrayP;
+
+
+/**
+ Attributes of a PDEPS object.
+ @see PDEPSCreate
+ @see PDEPSGetAttrs
+*/
+typedef struct _t_PDEPSAttrs {
+
+ /** kPDEPSInline */
+ ASUns32 flags;
+ } PDEPSAttrs, *PDEPSAttrsP;
+
+
+/**
+ Attributes of a PDEFont and of a PDSysFont. This structure
+ is also referenced in PDEFontCreateParams().
+ @see PDEFontCreate
+ @see PDEFontCreateWithParams
+ @see PDEFontGetAttrs
+ @see PDFindSysFont
+ @see PDFindSysFontEx
+ @see PDSysFontGetAttrs
+ @see PDSysFontGetEncoding
+ @see PDSysFontAcquirePlatformData
+*/
+typedef struct _t_PDEFontAttrs {
+
+ /** An ASAtom for font name (for example, <code>"Times-Roman"</code>). It corresponds to
+ the BaseFont key in the font dictionary of a PDF file (see
+ Section 5.6.3 in the <i>PDF Reference</i>).
+ */
+ ASAtom name;
+
+ /** An ASAtom for the font type corresponding to the Subtype key in a
+ a font dictionary. It may be:
+ <ul>
+ <li><code>"Type1"</code></li>
+ <li><code>"TrueType"</code></li>
+ <li><code>"MMType1"</code></li>
+ <li><code>"Type0"</code></li>
+ </ul>
+ */
+ ASAtom type;
+
+ /** An ASAtom for <code>"Roman"</code>, or ASAtomNull. If it is <code>"Roman"</code>, the
+ characters must be a subset of the Adobe Standard Roman Character Set.
+ */
+ ASAtom charSet;
+
+ /** An ASAtom for font encoding. It may be <code>MacRomanEncoding</code>,
+ <code>WinAnsiEncoding</code>, or ASAtomNull. In the case of
+ ASAtomNull, call PDSysFontGetEncoding() to get more
+ information about the encoding.
+ */
+ ASAtom encoding;
+
+ /* Almost the same as PDFontMetrics in Acrobat 2.0 */
+
+ /** The desired font flags; one or more of the Font Flags. */
+ ASUns32 flags; /* Use PD_SCRIPT, etc. to get flags */
+
+ /** The font bounding box in 1000 EM units. */
+ ASFixedRect fontBBox;
+
+ /** The width of the missing character (<code>.notdef</code>). */
+ ASInt16 missingWidth;
+
+ /** The vertical stem width. */
+ ASInt16 stemV;
+
+ /** The horizontal stem width. */
+ ASInt16 stemH;
+
+ /** The capital height. */
+ ASInt16 capHeight;
+
+ /** The x height. */
+ ASInt16 xHeight;
+
+ /** The maximum ascender height. */
+ ASInt16 ascent;
+
+ /** The maximum descender depth. */
+ ASInt16 descent;
+
+ /** The additional leading between lines. */
+ ASInt16 leading;
+
+ /** The maximum character width. */
+ ASInt16 maxWidth;
+
+ /** The average character width. */
+ ASInt16 avgWidth;
+
+ /** The italic angle in degrees, if any. */
+ ASInt16 italicAngle;
+
+ /** CIDFontType0 or CIDFontType2. */
+ ASAtom cidFontType;
+
+ /** The writing mode. It must be one of:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>0</code></TD><TD>For horizontal writing.</TD></TR>
+ <TR><TD><code>1</code></TD><TD>For vertical writing.</TD></TR>
+ </TABLE>
+ */
+ ASInt16 wMode;
+
+ /** An ASAtom representing the PostScript name of a TrueType font. */
+ ASAtom psName;
+
+ /** The platform name. */
+ ASAtom platformName;
+
+ /** An ASAtom representing the ISO 639 language code. These are available from http://www.iso.ch. */
+ ASAtom lang;
+
+ /** An ASAtom representing the CIDFont's Registry information (for example, <code>"gAdobe-Japan"</code>. */
+ ASAtom registry;
+
+ /** An ASAtom representing the CIDFont's Ordering information (for example, <code>"g1"</code>). */
+ ASAtom ordering;
+
+ /** The SystemSupplement field from the CIDFont. */
+ ASInt32 supplement;
+
+ /** A non-zero value means the font can't be embedded. */
+ ASInt32 cantEmbed;
+
+ /** The name of the base encoding; that is, the BaseEncoding entry
+ in an encoding dictionary (see section 5.5.5 of the <i>PDF
+ Reference</i>). The Differences entry of the encoding dictionary
+ describes differences (deltas) from the base encoding.
+ */
+ ASAtom deltaEncoding;
+
+ /** Allows one of the following bits to be set in order to disable font embedding:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Bit</TH><TH>Description</TH></TR>
+ <TR><TD><code>kPDEFontNoEmbedding = 1</code></TD><TD>The font should not be embedded.</TD></TR>
+ <TR><TD><code>kPDEFontNoEditableEmbedding = 2</code></TD><TD>The font should not be embedded for editing purposes.</TD></TR>
+ </TABLE>
+
+ */
+ ASUns32 protection;
+
+ /** PDSysFontPackageType */
+ ASInt32 packageType;
+ } PDEFontAttrs, *PDEFontAttrsP;
+
+
+/**
+ Parameters used for PDEFontCreateWithParams() to describe
+ a font.
+ @see PDEFontCreateWithParams
+*/
+typedef struct _t_PDEFontCreateParams {
+
+ /** A pointer to a PDEFontAttrs for the font attributes. */
+ PDEFontAttrsP attrsP;
+
+ /** The size of the data structure. It must be set to <code>sizeof(PDEFontAttrs)</code>. */
+ ASUns32 attrsSize;
+
+ /** The first character index for the widths array, <code>widthsP</code>. */
+ ASInt32 firstChar;
+
+ /** The last character index for the widths array, <code>widthsP</code>. */
+ ASInt32 lastChar;
+
+ /** A pointer to the widths array. */
+ ASInt16 *widthsP;
+
+ /** An array of 256 pointers to glyph names specifying the custom
+ encoding. If any pointer is <code>NULL</code>, no encoding information is written for that entry.
+ */
+ char **encoding;
+
+ /** An ASAtom representing the encoding base name if the
+ encoding is a custom encoding. If the encoding is <code>NULL</code>,
+ <code>encodingBaseName</code> is used as the value of the encoding and
+ must be one of <code>"WinAnsiEncoding"</code>, <code>"MacRomanEncoding"</code>, or
+ <code>"MacExpertEncoding"</code>. If no encoding value is desired, use
+ ASAtomNull. However, for Type 0 fonts, this field must be a
+ valid CMap name, or PDEFontCreateWithParams() will fail.
+ */
+ ASAtom encodingBaseName;
+
+ /** A stream with font information. */
+ ASStm fontStm;
+
+ /** The length in bytes of the ASCII portion of the Type 1 font file after it
+ has been decoded. For other font formats, such as TrueType or
+ CFF, only <code>len1</code> is used, and it is the size of the font.
+ */
+ ASInt32 len1;
+
+ /** The length in bytes of the encrypted portion of the Type 1 font file after it has been decoded. */
+ ASInt32 len2;
+
+ /** The length in bytes of the portion of the Type 1 font file that contains
+ the 512 zeros, plus the <code>cleartomark</code> operator, plus any following data.
+ */
+ ASInt32 len3;
+
+ /** If <code>true</code>, the <code>dw</code> and <code>w</code> fields are used; if <code>false</code>, they are not used. */
+ ASBool hasDW;
+
+ /** (Optional) The default width for glyphs in a CIDFont. See
+ Section 5.6.3 in the <i>PDF Reference</i> for more information.
+ */
+ ASInt32 dw;
+
+ /** A Cos array of a set of lists that define the widths for the glyphs
+ in the CIDFont. Each list can specify individual widths for
+ consecutive CIDs, or one width for a range of CIDs. See
+ Section 5.6.3 on character widths in CIDFonts in the <i>PDF
+ Reference</i> for information on the format of this array.
+ */
+ CosObj w;
+
+ /** If <code>true</code>, the <code>dw2</code> and <code>w2</code> fields are used; if <code>false</code>, they are not used. */
+ ASBool hasDW2;
+
+ /** (Optional: this applies only to CIDFonts that are used for vertical writing).
+
+ <p>The default metric for writing mode 1. This entry is an
+ array of two numbers: the y-component of the position vector
+ and the y component of the displacement vector for writing
+ mode 1. The x-component of the position vector is always half
+ the width of the character. The x-component of the displacement
+ vector is always <code>0</code>. The default value is <code>[880-1000]</code>. For
+ information on writing mode 1, see Section 5.6.3 on vertical
+ writing in the <i>PDF Reference</i>.</p>
+ */
+ ASInt32 dw2[2];
+
+ /** (Optional: this applies only to CIDFonts that are used for vertical writing)
+
+ <p>A Cos array defining the metrics for vertical writing. Its
+ format is similar to the format of the array in <code>w</code>. It defines the x
+ and y components of the position vector, and the y-component
+ of the displacement vector. The x-component of the
+ displacement vector is always <code>0</code>. See Section 5.6.3 on character
+ widths in CIDFonts in the <i>PDF Reference</i> for information on the
+ format of this array. </p>
+ */
+ CosObj w2;
+
+ /** (Optional) The length of <code>toUnicodeStm</code>. */
+ ASInt32 toUnicodeLen;
+
+ /** (Optional) A stream containing a CMap that defines the mapping
+ from character codes to Unicode values. This entry is
+ recommended for fonts that do not use one of the predefined
+ CMaps. If present, this allows strings in the encoding to convert
+ to Unicode values for export to other applications or plug-ins.
+ For more information, see Section 5.6 on Type 0 fonts in the
+ <i>PDF Reference</i>.
+ */
+ ASStm toUnicodeStm;
+
+ /** A stream contain the mapping from a CID to <code>glyphindex</code> (<code>"GID"</code>).
+ The <code>glyphindex</code> for a particular CID value <code>c</code> is a 2-byte value
+ stored in bytes <code>2*c</code> and <code>2*c+1</code>; the first byte is the high-order byte.
+ */
+ ASStm cidToGidMapStm;
+
+ /** A 12-byte string containing the Family Class ID, Family
+ SubClass ID, and 10 bytes for the PANOSE classification number
+ for the font. For additional details on the PANOSE number, see the
+ <i>Japanese TrueType Font Property Selection Guidelines</i> by the
+ TrueType Conference Technical Committee.
+ */
+ char *panoseNo;
+
+ /** A Cos dictionary identifying a subset of characters in a CIDFont.
+ The values are dictionaries with entries that override the values
+ in the FontDescriptor dictionary for the subset of characters.
+ See Section 5.6 in the <i>PDF Reference</i> for more information.
+ */
+ CosObj fd;
+
+ /** A stream identifying which CIDs are present in the CIDFont file.
+ It is required if the CIDFont file is embedded and only contains a
+ subset of the glyphs in the character collection defined by the
+ CIDSystemInfo. If this entry is missing, then it is assumed that
+ the CIDFont file contains all the glyphs for the character
+ collection. The stream's length should be rounded up to the
+ nearest multiple of <code>8</code>. The bits should be stored in bytes with the
+ high-order bit first. Each bit corresponds to a CID. The first bit of
+ the first byte corresponds to CID 0, the next bit corresponds to
+ CID 1, and so on. If the subset contains a CID, the bit for that
+ CID should be set. For compactness, the stream may use one of
+ the compression filters to encode the data. For more
+ information, see Section 5.6 in the <i>PDF Reference</i>.
+ */
+ ASStm cidSetStm;
+
+ /** One of the PDEFontCreateFlags describing how to embed
+ and subset the font:
+
+ <ul>
+ <li>kPDEFontCreateEmbedded</li>
+ <li>kPDEFontWillSubset</li>
+ <li>kPDEFontDoNotEmbed </li>
+ </ul>
+ */
+ ASUns32 flags; /* */
+
+ /** A pointer to the Multiple Master font design vector. */
+ ASFixed *mmDesignVec;
+
+ /** */
+ ASAtom sourceFontType; /* K2 */
+ } PDEFontCreateParamsRec, *PDEFontCreateParams;
+
+
+/**
+ A data structure used with PDEFont creation.
+ @see PDEFontCreateFromSysFontWithParams
+*/
+typedef struct _t_PDEFontCreateFromSysFontParams {
+
+ /** The size of the data structure. It must be set to <code>sizeof(PDEFontCreateFromSysFontParamsRec)</code>. */
+ ASUns32 structSize;
+
+ /** A bit mask of the PDEFontCreateFlags. */
+ ASUns32 flags;
+
+ /** The name of a Multiple Master snapshot. See the <i>PDF Reference</i>
+ for more information on snapshots.
+ */
+ ASAtom snapshotName;
+
+ /** A pointer to the Multiple Master font design vector. */
+ ASFixed *mmDesignVec;
+
+ /** Used to select a specific code page supported by the font. When
+ a non-zero code page is supplied, embedding must be turned
+ on and the kPDEFontEncodeByGID flag must be set.
+ */
+ long ctCodePage;
+
+ /** Used to specify which encoding to use with a CID font. Pass
+ ASAtomNull to use the platform default.
+ */
+ ASAtom encoding;
+
+ /** Used to specify the CosDoc in which to create the font. Pass
+ <code>NULL</code> to use the scratch doc.
+ */
+ CosDoc cosDoc;
+
+ } PDEFontCreateFromSysFontParamsRec, *PDEFontCreateFromSysFontParams;
+
+/**
+ A data structure used for adding Unicode text.
+ @see PDETextAddGlyphs
+*/
+typedef struct _t_PDEGlyphDescription {
+
+ /** The GlyphID of a glyph being added. */
+ ASUns32 glyphID;
+
+ /** An array of indices to Unicode characters, from the <code>uniText</code> member
+ of the PDEGlyphRun <code>struct</code>, represented by this glyph.
+ */
+ ASInt16 *charIndices;
+
+ /** The count of the indices in the <code>charIndices</code> array. */
+ ASInt32 charIndicesLen;
+
+ /** The x position of where to place this glyph. */
+ ASReal xPosition;
+
+ /** The y position of where to place this glyph. */
+ ASReal yPosition;
+ } PDEGlyphDescription, *PDEGlyphDescriptionP;
+
+/**
+ A data structure used for adding Unicode text.
+ @see PDETextAddGlyphs
+*/
+typedef struct _t_PDEGlyphRun {
+
+ /** A pointer to the array of PDEGlyphDescription items. */
+ PDEGlyphDescriptionP glyphs;
+
+ /** The count of items in the PDEGlyphDescription array. */
+ ASInt32 glyphLen;
+
+ /** An array of Unicode characters in UTF32HE format. */
+ ASUTF32Val *uniText;
+
+ /** The count of characters in uniText array. */
+ ASInt32 uniTextLen;
+ } PDEGlyphRun, *PDEGlyphRunP;
+
+/* Utility structures for passing around ActualText information
+ related to the new PDETextAddGlyphs API. */
+
+typedef struct _t_PDESpanItem {
+
+ /** The index into the glyphs array in a PDEGlyphRun object. */
+ ASInt32 firstGlyph;
+
+ /** The number of glyphs in the span starting from firstGlyph.
+ This can be zero, indicating there are no glyphs for
+ this Unicode string. The firstGlyph indicates the
+ glyph that precedes the Unicode string.
+ */
+ ASInt32 nGlyphs;
+
+ /** The index into the <code>uniText</code> array in a PDEGlyphRun object. */
+ ASInt32 firstUniChar;
+
+ /** The number of Unicode characters in the span starting from
+ <code>firstUniChar</code>. This count can be zero, indicating there
+ are no Unicode values for the range of glyphs.
+ */
+ ASInt32 nUniChars;
+} PDESpanItem, *PDESpanItemP;
+
+typedef struct _t_PDESpanSet {
+
+ /** A pointer to array of spans corresponding to the PDEGlyphRun
+ object.
+ */
+ PDESpanItemP spans;
+
+ /** The count of spans in the <code>spans</code> array. */
+ ASInt32 spanCount;
+} PDESpanSet, *PDESpanSetP;
+
+/*------------------------------------------------------------------------
+ PDFEdit Flags and Enums.
+------------------------------------------------------------------------*/
+
+
+/** The types of PDEObject, which is the superclass for PDEContent, PDEElement,
+ PDEClip, and so on.
+ @see PDEObjectGetType
+*/
+typedef enum {
+
+ /** PDEContent object */
+ kPDEContent,
+
+
+ /** PDEText object */
+ kPDEText,
+
+ /** PDEPath object */
+ kPDEPath,
+
+ /** PDEImage object */
+ kPDEImage,
+
+ /** PDEForm object */
+ kPDEForm,
+
+ /** PDEPS object */
+ kPDEPS,
+
+ /** PDEXObject object */
+ kPDEXObject,
+
+
+ /** PDEClip object */
+ kPDEClip,
+
+
+ /** PDEFont object */
+ kPDEFont,
+
+ /** PDEColorSpace object */
+ kPDEColorSpace,
+
+ /** PDEExtGState object */
+ kPDEExtGState,
+
+
+ /** PDEPlace object */
+ kPDEPlace,
+
+ /** PDEContainer object */
+ kPDEContainer,
+
+
+ /** PDESysFont object */
+ kPDSysFont,
+
+
+ /** PDEPattern object */
+ kPDEPattern,
+
+ /** PDEDevineNColors object */
+ kPDEDeviceNColors,
+
+
+ /** PDEShading object */
+ kPDEShading,
+
+ /** PDEGroup object */
+ kPDEGroup,
+
+
+ /** PDEUnknown object */
+ kPDEUnknown,
+
+
+ /** PDEBeginContainer object */
+ kPDEBeginContainer,
+
+ /** PDEEndContainer object */
+ kPDEEndContainer,
+
+
+ /** PDEBeginGroup object */
+ kPDEBeginGroup,
+
+ /** PDEEndGroup object */
+ kPDEEndGroup,
+
+
+ /** PDEXGroup object */
+ kPDEXGroup,
+
+ /** PDESoftMask object */
+ kPDESoftMask,
+
+
+ /** PDSysEcoding object */
+ kPDSysEncoding,
+
+
+ /** PDEDoc object */
+ kPDEDoc,
+
+ /** PDEPage object */
+ kPDEPage,
+
+
+ /** PDEReader object */
+ kPDEReader,
+
+ /** PDEWriter object */
+ kPDEWriter,
+
+
+ /** PDETextItem object */
+ kPDETextItem,
+
+
+ /** PDEImageFlate object */
+ kPDEImageFlate,
+
+
+ /** PDEImageJPX object */
+ kPDEImageJPX,
+
+
+ /** JPXColorSpace object */
+ kJPXColorSpace,
+
+
+ /** JPXPalette object */
+ kJPXPalette,
+
+ /** */
+ kPDELastType
+} PDEType;
+
+/* Handy defines for inserting at the beginning and end of lists */
+#define kPDEBeforeFirst ((ASInt32) -1)
+#define kPDEAfterLast (MAXInt32 - 1)
+
+/** A bit field for the PDEContentToCosObj() method, indicating the type of object to create
+ and how it is created.
+ @see PDEContentToCosObj
+*/
+typedef enum {
+
+ /** Create page contents. */
+ kPDEContentToPage = 0x0001,
+
+ /** Create a form. */
+ kPDEContentToForm = 0x0002,
+
+ /** Create charprocs. */
+ kPDEContentToCharProc = 0x0004,
+
+ /** Currently unused. */
+ kPDEContentRev1Compat = 0x0008,
+
+ /** Currently unused. */
+ kPDEContentDoNotResolveForms = 0x0010,
+
+ /** Currently unused. */
+ kPDEContentDoNotResolveType3 = 0x0020,
+
+ /** Emit calibrated RGB and gray information using the PDF 1.0
+ compatible mechanism. In this case, generate rg and k page operators and
+ place DefaultGray and DefaultRGB color space arrays in the Resources
+ dictionary, as described in Section 4.5.7 in the <i>PDF Reference</i>.
+ */
+ kPDEContentEmitDefaultRGBAndGray = 0x0040,
+
+ /** */
+ kPDEContentInheritState = 0x0080,
+
+ /** Prevents the emission of the content compatibility operators, BX/EX, which
+ cause issues for some versions of PDF/A or PDF/X.
+ */
+ kPDEContentDoNotEmitBXEX = 0x0100,
+
+ kPDEContentUseMaxPrecision = 0x0200,
+
+ /** Use a space character as the EOL character in the content stream to make
+ the Flate compressor more effective.
+ */
+ kPDEContentUseSpaceAsEOL = 0x0400,
+
+ /** Emit a gstate or textstate parameter for any element, only if the corresponding WasSetFlag is set.
+ Settting this flag will skip setting the bounding box of form XObject.
+ */
+ kPDEContentHonorWasSetFlags = 0x0800
+
+ } PDEContentToCosObjFlags;
+
+
+/** A bit field for the PDEEnumElements() method.
+ @see PDEEnumElements
+*/
+typedef enum {
+
+ /** Indicates whether Marked Content is ignored in the enumeration. This may
+ be useful when generating elements purely for display purposes.
+ */
+ kPDEContentIgnoreMarkedContent = 0x0001
+} PDEEnumElementsFlags;
+
+
+/** A bit field for PDEContentAttrs.
+ @see PDEContentGetResources
+*/
+typedef enum {
+
+ /** Obtain font resources. */
+ kPDEGetFonts,
+
+ /** Obtain Xobject resources. */
+ kPDEGetXObjects,
+
+ /**
+ Obtain color space resources.
+ */
+ kPDEGetColorSpaces
+ } PDEContentGetResourceFlags;
+
+
+/** A bit field for PDEContentAttrs.
+ @see PDEContentGetAttrs
+ @see PDEContentToCosObj
+*/
+typedef enum {
+
+ /** If set, <code>cacheDevice</code> contains 6 cache device values. */
+ kPDESetCacheDevice = 0x0001,
+
+ /** If set, <code>cacheDevice</code> contains 2 charwidth values. */
+ kPDESetCharWidth = 0x0002,
+
+ /** If set, <code>formMatrix</code> contains a valid matrix. */
+ kPDEFormMatrix = 0x0004
+ } PDEContentFlags;
+
+
+/** A bit field used in PDEText methods.
+ @see PDETextAdd
+ @see PDETextGetFont
+ @see PDETextGetText
+*/
+typedef enum {
+
+ /** Text run. */
+ kPDETextRun = 0x0001,
+
+ /** Character (text run with only one character). */
+ kPDETextChar = 0x0002,
+
+ /** Obtain the advance width in page space. */
+ kPDETextPageSpace = 0x0004,
+
+ /** Fill in the left and right bounds of the text run's bounding box. */
+ kPDETextGetBounds = 0x0008
+ } PDETextFlags;
+
+
+/** Flags indicating text rendering mode set by the Tr operator.
+ @see PDETextCreate
+*/
+typedef enum {
+
+ /** Fill text. */
+ kPDETextFill,
+
+ /** Stroke text. */
+ kPDETextStroke,
+
+ /** Fill and stroke text. */
+ kPDETextFillAndStroke,
+
+ /**
+ Text with no fill and no stroke (invisible).
+ */
+ kPDETextInvisible
+ } PDETextRenderMode;
+
+
+/** An enumerated data type for path segment operators in PDEPath elements.
+ @see PDEPathAddSegment
+ @see PDEPathCreate
+ @see PDEPathSetData
+*/
+typedef enum {
+
+ /** Designates the m (<code>moveto</code>) operator, which moves the current point. */
+ kPDEMoveTo,
+
+ /** Designates the l (<code>lineto</code>) operator, which appends a straight line
+ segment from the current point.
+ */
+ kPDELineTo,
+
+ /** Designates the c (<code>curveto</code>) operator, which appends a bezier curve
+ to the path.
+ */
+ kPDECurveTo,
+
+ /** Designates the v (<code>curveto</code>) operator, which appends a bezier curve
+ to the current path when the first control point coincides with
+ initial point on the curve.
+ */
+ kPDECurveToV,
+
+ /** Designates the y (<code>curveto</code>) operator, which appends a bezier curve
+ to the current path when the second control point coincides with
+ final point on the curve.
+ */
+ kPDECurveToY,
+
+ /** Designates the re operator, which adds a rectangle to the current path. */
+ kPDERect,
+
+ /** Designates the h (<code>closepath</code>) operator, which closes the current sub-path. */
+ kPDEClosePath,
+
+ /** */
+ kPDEPathLastType
+ } PDEPathElementType;
+
+
+/** Flags for paint operators in a PDEPath.
+ @see PDEPathGetPaintOp
+ @see PDEPathSetPaintOp
+*/
+typedef enum {
+
+ /** The path is neither stroked nor filled, so it is invisible. */
+ kPDEInvisible = 0x00,
+
+ /** Stroke the path, as with the S (<code>stroke</code>) operator. */
+ kPDEStroke = 0x01,
+
+ /** Fills the path, using the nonzero winding number rule to
+ determine the region to fill, as with the f (<code>fill</code>) operator.
+ */
+ kPDEFill = 0x02,
+
+ /** Fills the path, using the even/odd rule to determine the region to
+ fill, as with the f* (<code>eofill</code>) operator.
+ */
+ kPDEEoFill = 0x04
+ } PDEPathOpFlags;
+
+
+/** Flags for PDEImageAttrs. See Section 4.8.4 in the <i>PDF Reference</i> for more
+ information on image attributes.
+ @see PDEImageCreate
+ @see PDEImageGetAttrs
+ @see PDEImageGetData
+*/
+typedef enum {
+
+ /** The image is an XObject. */
+ kPDEImageExternal = 0x0001,
+
+ /** The image is an imagemask. */
+ kPDEImageIsMask = 0x0002,
+
+ /** <code>interpolate</code> is <code>true</code>. */
+ kPDEImageInterpolate = 0x0004,
+
+ /** The image has a decode array. */
+ kPDEImageHaveDecode = 0x0008,
+
+ /** The image uses an indexed color space. */
+ kPDEImageIsIndexed = 0x0010,
+
+ /** The image has a Mask key containing an ImageMask stream. */
+ kPDEImageMaskedByPosition = 0x0020,
+
+ /** The image has a Mask key containing an array of color values. */
+ kPDEImageMaskedByColor = 0x0040
+ } PDEImageAttrFlags;
+
+
+/** Flags for <code>PDEImageGetData()</code>, <code>PDEImageGetDataStm()</code>, <code>PDEImageSetData()</code>, and
+ <code>PDEImageSetDataStm()</code>.
+ @see PDEImageGetData
+ @see PDEImageGetDataStm
+ @see PDEImageSetData
+ @see PDEImageSetDataStm
+ @see PDEImageCreate
+*/
+typedef enum {
+
+ /** Indicates that the filter is active; data is encoded. */
+ kPDEImageEncodedData = 0x0001,
+ kPDEImageAllowDelayedRead = 0x0002,
+ /** Indicates if the accompanying image data is 16-bit. Should be passed in
+ for 16-bit images to PDEImageGetData/PDEImageGetDataStm to prevent the
+ return of 8-bit converted data.
+ */
+ kPDEImage16bpcData = 0x0004
+ } PDEImageDataFlags;
+
+
+/** Flags to enable <code>PDEImageGetColorSpaceEx()</code> to return a color space
+ with a particular bpc, depending on the image's bpc.
+ @see PDEImageGetColorSpaceEx
+ @see PDEImageGetColorSpace
+*/
+typedef enum {
+
+ /** Indicates conversion of the color space of 16 bpc image to 8 bpc. */
+ kPDEImageConvert16bpcColorSpace = 0x0001
+ } PDEImageColorSpaceFlags;
+
+
+/** Flags for PDEPSAttrs. */
+typedef enum {
+
+ /** PS is an XObject. */
+ kPDEPSExternal = 0x0001
+ } PDEPSFlags;
+
+
+/** A bit field for <code>PDEElementCopy()</code>.
+ @see PDEElementCopy
+*/
+typedef enum {
+
+ /** The copied element does not need <code>gstate</code> or <code>clip</code>. */
+ kPDEElementCopyForClip = 0x0001,
+
+ /** Acquire the clip path and put it in the copied object. */
+ kPDEElementCopyClipping = 0x0002
+ } PDEElementCopyFlags;
+
+
+/** Flags for <code>PDEFontCreateFromSysFont()</code>.
+ If you want to subset a font, set both the
+ <code>kPDEFontCreateEmbedded</code> and <code>kPDEFontWillSubset</code> flags.
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontAndEncoding
+ @see PDEFontCreateFromSysFontWithParams
+ @see kPDEFontWillSubset
+ */
+typedef enum {
+
+ /** Embed the font. Create an embedded font. By itself, this will not subset the font.*/
+ kPDEFontCreateEmbedded = 0x0001,
+
+ /** Subset the font. If you want to subset a font, set both the <code>kPDEFontCreateEmbedded</code>
+ and kPDEFontWillSubset flags. You must call <code>PDEFontSubsetNow()</code> to actually subset
+ the font. Both embedding and subsetting a font creates a CFF font.
+ */
+ kPDEFontWillSubset = 0x0002,
+
+ /** Do not embed the font. You cannot set both
+ this and the <code>kPDEFontWillSubset</code> flags.
+ Nor can you set <code>kPDEFontCreateEmbedded</code>.
+ */
+ kPDEFontDoNotEmbed = 0x0004,
+
+ /** Create a CIDFont with identity (GID) encoding. */
+ kPDEFontEncodeByGID = 0x0008,
+
+ /** Wait to get the widths until later (this affects Type0 fonts only). */
+ kPDEFontDeferWidths = 0x0010,
+
+ /** */
+ kPDEFontCreateSubset = kPDEFontWillSubset,
+
+ /** PDFLib will convert <code>cp</code> to <code>gid</code> with identity embedded. */
+ kPDEFontCreateGIDOverride = 0x0020,
+
+ /** Create a ToUnicode CMap. */
+ kPDEFontCreateToUnicode = 0x0040,
+
+ /** Supply the entire widths table (this affects Type0 fonts only). */
+ kPDEFontCreateAllWidths = 0x0080,
+
+ /** Embed an OpenType style font subset, if appropriate. */
+ kPDEFontCreateEmbedOpenType = 0x0100
+} PDEFontCreateFlags;
+
+
+/** Flags for PDEFontGetCreateNeedFlags(). */
+typedef enum {
+
+ /** It is necessary to to create the width. */
+ kPDEFontCreateNeedWidths = 0x00010000,
+
+ /** It is necessary to to create the ToUnicode stream. */
+ kPDEFontCreateNeedToUnicode = 0x00020000,
+
+ /** It is necessary to to embed it. */
+ kPDEFontCreateNeedEmbed = 0x00040000
+} PDEFontCreateNeedFlags;
+
+
+/** Flags for protection of PDEFontAttrs: embedding is not allowed. */
+#define kPDEFontNoEmbedding 0x00000001
+
+/** Flags for protection of PDEFontAttrs: editable embedding is not allowed. */
+#define kPDEFontNoEditableEmbedding 0x00000002
+
+/* Flags for <code>packageType</code> of PDEFontAttrs. */
+typedef enum {
+ kPDSysFontUnknown = 0,
+ kPDSysFontType1,
+ kPDSysFontTrueType,
+ kPDSysFontCID,
+ kPDSysFontATC,
+ kPDSysFontOCF,
+ kPDSysFontOpenTypeCFF,
+ kPDSysFontOpenTypeCID,
+ kPDSysFontOpenTypeTT
+} PDSysFontPackageType;
+
+
+/** Flags for use with PDESoftMaskCreate().
+ @see PDESoftMaskCreate
+*/
+typedef enum {
+
+ /** Specifies how the mask is to be computed. */
+ kPDESoftMaskTypeLuminosity = 0x0001,
+
+ /** Specifies how the mask is to be computed. */
+ kPDESoftMaskTypeAlpha = 0x0002
+ } PDESoftMaskCreateFlags;
+
+
+/** An enumerated data type used to specify the type of transparency group to create.
+ @see PDESoftMaskCreate
+*/
+typedef enum {
+
+ /** Creates a transparency XGroup object. */
+ kPDEXGroupTypeTransparency = 0x0001
+ } PDEXGroupCreateFlags;
+
+
+/**
+ A callback for PDEEnumElements(). It is called once for each
+ PDEElement in a page's Contents Stream or Resources dictionary.
+
+ @param elem The PDEElement.
+ @param clientData User-supplied data that was specified
+ in the call to PDEEnumElements().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDEEnumElements
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDEElementEnumProc)(
+ IN PDEElement elem,
+ IN void *clientData);
+
+/**
+ A callback for PDEClipFlattenedEnumElems(), which enumerates
+ all of a PDEClip object's PDEElement objects in a flattened manner.
+ @param elem IN/OUT The PDEElement currently being enumerated.
+
+ @param clientData IN/OUT User-supplied data that was passed in
+ the call to PDEClipFlattenedEnumElems().
+ @return If <code>false</code>, enumeration halts. If <code>true</code>, enumeration continues.
+
+ @see PDEClipFlattenedEnumElems
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDEClipEnumProc)(
+ IN PDEElement elem,
+ IN void *clientData);
+
+/*------------------------------------------------------------------------
+ PDFEdit Dump.
+------------------------------------------------------------------------*/
+
+
+/**
+ A callback for PDELogDump() or PDEObjectDump(). It is called once
+ for each PDEObject, its children, and their attributes for
+ the specified number of levels.
+ @param obj IN/OUT The PDEObject.
+ @param dumpInfo IN/OUT Contains information about an object. Information
+ fields are delimited by tabs. There are no newline characters
+ in this string.
+ @param clientData IN/OUT User-supplied data that was specified
+ in the call to PDELogDump() or PDEObjectDump().
+ @see PDELogDump
+ @see PDEObjectDump
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PDEObjectDumpProc)(
+ IN PDEObject obj,
+ IN char *dumpInfo,
+ IN void *clientData);
+
+/**
+ A callback for PDEAttrEnumTable(). It is called once for each
+ attribute in a table.
+ @param attrHdrP An opaque pointer to the attribute. The
+ actual attribute type is not specified in this function,
+ since the storage mechanism only knows the size of the attribute,
+ not its type.
+ @param refCount The reference count of the attribute.
+ @param size The size of <code>attrHdrP</code> in bytes.
+ @param clientData User-supplied data that was specified
+ in the call to PDEAttrEnumTable().
+ @return <code>true</code> to continue enumeration, <code>false</code> to halt enumeration.
+
+ @see PDEAttrEnumTable
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PDEAttrEnumProc)(
+ IN void *attrHdrP,
+ IN ASUns32 refCount,
+ IN ASUns16 size,
+ IN void *clientData);
+/*------------------------------------------------------------------------
+ PDFEdit Colorspace Struct.
+------------------------------------------------------------------------*/
+
+/** */
+typedef struct {
+ float min;
+ float max;
+} PDEColorRangeFlt;
+/** */
+typedef struct {
+ float x;
+ float y;
+ float z;
+} PDEXYZColorFlt;
+/**
+ A structure describing a white point in a calibrated color
+ space.
+ @see PDEColorSpaceCreate
+*/
+typedef PDEXYZColorFlt PDEWhitePointFlt;
+/**
+ A structure describing a black point in a calibrated color
+ space.
+ @see PDEColorSpaceCreate
+*/
+typedef PDEXYZColorFlt PDEBlackPointFlt;
+
+
+/**
+ A structure describing a CalGray color space.
+
+ <p>Default value: <code>PDEGrayCalFlt calGray = {{0, 0, 0}, {0, 0, 0}, 1};</code></p>
+
+ @see PDEColorSpaceCreate
+*/
+typedef struct _t_PDEGrayCalFlt {
+
+ /** */
+ PDEWhitePointFlt whitePoint;
+
+ /** */
+ PDEBlackPointFlt blackPoint;
+
+ /** */
+ float gamma;
+} PDEGrayCalFlt;
+
+
+/**
+ A structure describing a CalRGB color space. It is the same as AGMRGBCalFlt
+ (it is only available as part of the PDF Library SDK).
+
+ <p>Default value: <code>{{0, 0, 0}, {0, 0, 0}, 1, 1, 1, {1, 0, 0, 0, 1, 0, 0, 0, 1}}; </code></p>
+
+ @see PDEColorSpaceCreate
+*/
+typedef struct _t_PDERGBCalFlt {
+
+ /** */
+ PDEWhitePointFlt whitePoint;
+
+ /** */
+ PDEBlackPointFlt blackPoint;
+
+ /** */
+ float redGamma;
+
+ /** */
+ float greenGamma;
+
+ /** */
+ float blueGamma;
+
+ /** */
+ float matrix[9];
+} PDERGBCalFlt;
+
+
+/**
+ A structure describing a Lab color space.
+
+ <p>Default value: <code>{{0, 0, 0}, {0, 0, 0}, {-100, 100}, {-100, 100}}; </code></p>
+
+ @see PDEColorSpaceCreate
+*/
+typedef struct _t_PDELabCalFlt {
+
+ /** */
+ PDEWhitePointFlt whitePoint;
+
+ /** */
+ PDEBlackPointFlt blackPoint;
+
+ /** */
+ PDEColorRangeFlt rangeA, rangeB;
+} PDELabCalFlt;
+
+/* DeviceGray, DeviceRGB, DeviceCMYK - pass NULL for PDEColorSpaceStruct */
+
+
+
+/**
+ A PDEColorSpace that describes a Pattern color space.
+ @see PDEColorSpaceCreate
+*/
+typedef PDEColorSpace PDEPatternColorSpace;
+
+
+/** An ICC-based color space. */
+typedef struct _t_PDEICCBasedColorData {
+
+ /** Set the size to <code>sizeof(PDEICCColorData)</code>. */
+ ASSize_t size;
+
+ /** A stream containing an ICC Profile. */
+ ASStm iccstream;
+
+ /** The number of color components (<code>1</code>, <code>3</code>, or <code>4</code>). */
+ ASUns32 nComps;
+
+ /** (Optional) An alternate color space. */
+ PDEColorSpace altCs;
+} PDEICCBasedColorData;
+
+
+/**
+ A structure describing an indexed color space.
+ @see PDEColorSpaceCreate
+*/
+typedef struct _t_PDEIndexedColorData {
+
+ /** Set the size to <code>sizeof(PDEIndexedColorData)</code>. */
+ ASSize_t size;
+
+ /** The base color space. */
+ PDEColorSpace baseCs;
+
+ /** The highest color value. */
+ ASUns16 hival;
+
+ /** Indexed color lookup data. */
+ char *lookup;
+
+ /** The number of bytes in the lookup data. */
+ ASUns32 lookupLen;
+} PDEIndexedColorData;
+
+
+/**
+ A structure describing a separation color space.
+ @see PDEColorSpaceCreate
+*/
+typedef struct _t_PDESeparationColorData {
+
+ /** The size of the data structure. It must be set to
+ <code>sizeof(PDESeparationColorData)</code>.
+ */
+ ASSize_t size;
+
+ /** The name of the separation or colorant. */
+ ASAtom name;
+
+ /** The alternate color space. */
+ PDEColorSpace alt;
+
+ /** The tintTransform dictionary or function.
+ See Section 4.5.5 in the <i>PDF Reference</i>.
+ */
+ CosObj tintTransform;
+} PDESeparationColorData;
+
+
+/**
+ A structure describing a DeviceRGB or DeviceCMYK color space.
+
+ @see PDEColorSpaceCreate
+*/
+typedef struct _t_PDEDeviceNColorData {
+
+ /** The size of the data structure. It must be set to
+ <code>sizeof(PDEDeviceNColorData)</code>.
+ */
+ ASSize_t size;
+
+ /** The names of the colorants. */
+ ASAtom *names;
+
+ /** The number of colorants. */
+ ASUns32 nNames;
+
+ /** The alternate color space. */
+ PDEColorSpace alt;
+
+ /** The tintTransform dictionary or function.
+ See Section 4.5.5 in the <i>PDF Reference</i> for more information.
+ */
+ CosObj tintTransform;
+} PDEDeviceNColorData;
+
+
+/** A color space structure for PDEColorSpaceCreate(). See Section 4.5 in the <i>PDF Reference</i>
+ for information on color spaces.
+ @see PDEColorSpaceCreate
+*/
+typedef union {
+
+ /** */
+ PDEGrayCalFlt *calGray;
+
+ /** */
+ PDERGBCalFlt *calRGB;
+
+ /** */
+ PDELabCalFlt *lab;
+
+ /** */
+ PDEICCBasedColorData *icc;
+
+ /** */
+ PDEIndexedColorData *indexed;
+
+ /** */
+ PDEPatternColorSpace patternbase;
+
+ /** */
+ PDESeparationColorData *sep;
+
+ /** */
+ PDEDeviceNColorData *devn;
+} PDEColorSpaceStruct;
+
+/* codePage supported for PDSysEncodingCreateFromCodePage */
+enum {
+ /* Windows code pages */
+ kPDCodePageWinEastEuropeanRoman = 1250,
+ kPDCodePageWinCyrillic = 1251,
+ kPDCodePageWinGreek = 1253,
+ kPDCodePageWinTurkish = 1254,
+ kPDCodePageWinHebrew = 1255,
+ kPDCodePageWinArabic = 1256,
+ kPDCodePageWinBaltic = 1257,
+
+ /* Macintosh pseudo code pages */
+ kPDCodePageMacCentralEuropean = -9994,
+ kPDCodePageMacCroatian = -9993,
+ kPDCodePageMacRomanian = -9992,
+ kPDCodePageMacCyrillic = -9991,
+ kPDCodePageMacUkrainian = -9990,
+ kPDCodePageMacGreek = -9989,
+ kPDCodePageMacTurkish = -9988,
+ kPDCodePageMacHebrew = -9987,
+ kPDCodePageMacArabic = -9986
+};
+
+
+
+/*
+** Attribute definitions for JPX objects
+*/
+
+/**
+ Attributes of a JPX image.
+*/
+typedef struct _t_PDEImageJPXAttrs {
+ ASUns32 flags; /* PDEImageAttrFlags */
+ ASInt32 width;
+ ASInt32 height;
+ ASInt32 tileWidth;
+ ASInt32 tileHeight;
+ ASInt32 nResolutions;
+ ASInt32 nComponents;
+ ASInt32 bpc[24];
+ ASFixed decode[24];
+} PDEImageJPXAttrs, *PDEImageJPXAttrsP;
+
+
+
+/**
+ JPX Color Space types.
+*/
+typedef enum {
+ kJPXCSUnknown = 0x0000,
+ kJPXCSEnumerated = 0x0001,
+ kJPXCSRestrictedICC = 0x0002,
+ kJPXCSAnyICC = 0x0003,
+ kJPXCSVenderColor = 0x0004
+} JPXColorSpaceType;
+
+
+/**
+ Attributes of a JPXCSEnumerated JPXColorSpace.
+*/
+typedef struct _t_JPXCSEnumAttrs {
+ /** The enumerated color space number. */
+ ASUns32 enumNumber;
+ /** The standard illuminant is used. */
+ ASBool stdIlluminant;
+ /** A 4-byte illuminant value. */
+ ASUns32 illuminant;
+ /** L, A, and B range values. */
+ ASUns32 labRange[3];
+ /** L, A, and B offset values. */
+ ASUns32 labOffset[3];
+} JPXCSEnumAttrs, *JPXCSEnumAttrsP;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#if defined( WINDOWS ) || defined( WIN_ENV )
+#pragma pack (pop, peexpt ) /* reset to /Zp */
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_PEExpT */
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERCalls.h
new file mode 100644
index 0000000..f61d80c
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERCalls.h
@@ -0,0 +1,389 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PERCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_PERCalls
+#define _H_PERCalls
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _PDFEditReadHFT_LATEST_VERSION 0x00090000
+#define _PDFEditReadHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _PDFEditReadHFT_IS_BETA 0
+
+/* for public use */
+#define PDFEditReadHFT_LATEST_VERSION (_PDFEditReadHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDFEditReadHFT_LATEST_VERSION) : _PDFEditReadHFT_LATEST_VERSION)
+
+#define PDFEditReadHFT_VERSION_4 0x00040000
+#define PDFEditReadHFT_VERSION_5 0x00050000
+#define PDFEditReadHFT_VERSION_6 0x00060000
+#define PDFEditReadHFT_VERSION_8_1 0x00080001
+#define PDFEditReadHFT_VERSION_9 PDFEditReadHFT_LATEST_VERSION
+
+#include "PDBasicExpT.h"
+#include "PEExpT.h"
+#include "PEVers.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NPROC /* may be already defined */
+#undef NPROC
+#endif
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define UNPROC NPROC
+ #include "PERProcs.h"
+ #undef NPROC
+ #undef UNPROC
+#endif /* !PLUGIN */
+
+#if PLUGIN
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define UNPROC NPROC
+
+ enum {
+ PDFEditReadBAD_SELECTOR,
+ #include "PERProcs.h"
+ PDFEditReadNUMSELECTORSplusOne
+ };
+
+ #define PDFEditReadNUMSELECTORS (PDFEditReadNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef UNPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+#if READER_PLUGIN
+ #define UNPROC(returnType, name, params)
+#else
+ #define UNPROC NPROC
+#endif
+ #include "PERProcs.h"
+ #undef NPROC
+ #undef UNPROC
+
+
+#if PI_PDFEDIT_READ_VERSION != 0
+#ifdef THREAD_SAFE_PDFL
+ #define gPDFEditReadHFT (GetHFTLocations()->pdfEditReadHFT)
+ #define gPDFEditReadVersion (GetHFTLocations()->pdfEditReadVersion)
+#else
+ extern HFT gPDFEditReadHFT;
+ extern ASUns32 gPDFEditReadVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+/*# PDFEDIT_READ_VERSION >= 0x00040000 */
+
+#if !STATIC_HFT
+ /* Define the macros */
+
+ #define PDEContentCreateFromCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContentCreateFromCosObjSELPROTO)(gPDFEditReadHFT[PDEContentCreateFromCosObjSEL])))
+ #define PDEContentGetAttrs (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContentGetAttrsSELPROTO)(gPDFEditReadHFT[PDEContentGetAttrsSEL])))
+ #define PDEContentGetResources (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContentGetResourcesSELPROTO)(gPDFEditReadHFT[PDEContentGetResourcesSEL])))
+ #define PDEContentGetNumElems (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContentGetNumElemsSELPROTO)(gPDFEditReadHFT[PDEContentGetNumElemsSEL])))
+ #define PDEContentGetElem (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContentGetElemSELPROTO)(gPDFEditReadHFT[PDEContentGetElemSEL])))
+
+ #define PDEElementGetBBox (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEElementGetBBoxSELPROTO)(gPDFEditReadHFT[PDEElementGetBBoxSEL])))
+ #define PDEElementGetGState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEElementGetGStateSELPROTO)(gPDFEditReadHFT[PDEElementGetGStateSEL])))
+ #define PDEElementGetMatrix (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEElementGetMatrixSELPROTO)(gPDFEditReadHFT[PDEElementGetMatrixSEL])))
+ #define PDEElementGetClip (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEElementGetClipSELPROTO)(gPDFEditReadHFT[PDEElementGetClipSEL])))
+
+ #define PDETextGetNumChars (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetNumCharsSELPROTO)(gPDFEditReadHFT[PDETextGetNumCharsSEL])))
+ #define PDETextGetNumRuns (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetNumRunsSELPROTO)(gPDFEditReadHFT[PDETextGetNumRunsSEL])))
+ #define PDETextRunGetCharOffset (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextRunGetCharOffsetSELPROTO)(gPDFEditReadHFT[PDETextRunGetCharOffsetSEL])))
+ #define PDETextGetRunForChar (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetRunForCharSELPROTO)(gPDFEditReadHFT[PDETextGetRunForCharSEL])))
+ #define PDETextRunGetNumChars (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextRunGetNumCharsSELPROTO)(gPDFEditReadHFT[PDETextRunGetNumCharsSEL])))
+ #define PDETextGetBBox (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetBBoxSELPROTO)(gPDFEditReadHFT[PDETextGetBBoxSEL])))
+ #define PDETextGetGState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetGStateSELPROTO)(gPDFEditReadHFT[PDETextGetGStateSEL])))
+ #define PDETextGetTextState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetTextStateSELPROTO)(gPDFEditReadHFT[PDETextGetTextStateSEL])))
+ #define PDETextGetFont (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetFontSELPROTO)(gPDFEditReadHFT[PDETextGetFontSEL])))
+ #define PDETextGetTextMatrix (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetTextMatrixSELPROTO)(gPDFEditReadHFT[PDETextGetTextMatrixSEL])))
+ #define PDETextGetStrokeMatrix (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetStrokeMatrixSELPROTO)(gPDFEditReadHFT[PDETextGetStrokeMatrixSEL])))
+ #define PDETextGetAdvanceWidth (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetAdvanceWidthSELPROTO)(gPDFEditReadHFT[PDETextGetAdvanceWidthSEL])))
+ #define PDETextGetText (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetTextSELPROTO)(gPDFEditReadHFT[PDETextGetTextSEL])))
+
+ #define PDEPathGetData (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPathGetDataSELPROTO)(gPDFEditReadHFT[PDEPathGetDataSEL])))
+ #define PDEPathGetPaintOp (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPathGetPaintOpSELPROTO)(gPDFEditReadHFT[PDEPathGetPaintOpSEL])))
+
+ #define PDEImageGetAttrs (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetAttrsSELPROTO)(gPDFEditReadHFT[PDEImageGetAttrsSEL])))
+ #define PDEImageGetColorSpace (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetColorSpaceSELPROTO)(gPDFEditReadHFT[PDEImageGetColorSpaceSEL])))
+ #define PDEImageIsCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageIsCosObjSELPROTO)(gPDFEditReadHFT[PDEImageIsCosObjSEL])))
+ #define PDEImageDataIsEncoded (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageDataIsEncodedSELPROTO)(gPDFEditReadHFT[PDEImageDataIsEncodedSEL])))
+ #define PDEImageGetData (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetDataSELPROTO)(gPDFEditReadHFT[PDEImageGetDataSEL])))
+ #define PDEImageGetDataStm (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetDataStmSELPROTO)(gPDFEditReadHFT[PDEImageGetDataStmSEL])))
+ #define PDEImageGetDataLen (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetDataLenSELPROTO)(gPDFEditReadHFT[PDEImageGetDataLenSEL])))
+ #define PDEImageGetFilterArray (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetFilterArraySELPROTO)(gPDFEditReadHFT[PDEImageGetFilterArraySEL])))
+ #define PDEImageGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetCosObjSELPROTO)(gPDFEditReadHFT[PDEImageGetCosObjSEL])))
+
+ #define PDEClipGetNumElems (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEClipGetNumElemsSELPROTO)(gPDFEditReadHFT[PDEClipGetNumElemsSEL])))
+ #define PDEClipGetElem (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEClipGetElemSELPROTO)(gPDFEditReadHFT[PDEClipGetElemSEL])))
+
+ #define PDEXObjectGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEXObjectGetCosObjSELPROTO)(gPDFEditReadHFT[PDEXObjectGetCosObjSEL])))
+
+ #define PDEFormGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFormGetCosObjSELPROTO)(gPDFEditReadHFT[PDEFormGetCosObjSEL])))
+
+ #define PDEPSGetAttrs (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPSGetAttrsSELPROTO)(gPDFEditReadHFT[PDEPSGetAttrsSEL])))
+ #define PDEPSGetData (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPSGetDataSELPROTO)(gPDFEditReadHFT[PDEPSGetDataSEL])))
+ #define PDEPSGetDataStm (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPSGetDataStmSELPROTO)(gPDFEditReadHFT[PDEPSGetDataStmSEL])))
+
+ #define PDEFontGetAttrs (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFontGetAttrsSELPROTO)(gPDFEditReadHFT[PDEFontGetAttrsSEL])))
+ #define PDEFontGetWidths (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFontGetWidthsSELPROTO)(gPDFEditReadHFT[PDEFontGetWidthsSEL])))
+ #define PDEFontGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFontGetCosObjSELPROTO)(gPDFEditReadHFT[PDEFontGetCosObjSEL])))
+
+ #define PDEColorSpaceGetName (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEColorSpaceGetNameSELPROTO)(gPDFEditReadHFT[PDEColorSpaceGetNameSEL])))
+ #define PDEColorSpaceGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEColorSpaceGetCosObjSELPROTO)(gPDFEditReadHFT[PDEColorSpaceGetCosObjSEL])))
+ #define PDEColorSpaceGetNumComps (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEColorSpaceGetNumCompsSELPROTO)(gPDFEditReadHFT[PDEColorSpaceGetNumCompsSEL])))
+ #define PDEColorSpaceGetBase (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEColorSpaceGetBaseSELPROTO)(gPDFEditReadHFT[PDEColorSpaceGetBaseSEL])))
+ #define PDEColorSpaceGetHiVal (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEColorSpaceGetHiValSELPROTO)(gPDFEditReadHFT[PDEColorSpaceGetHiValSEL])))
+ #define PDEColorSpaceGetCTable (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEColorSpaceGetCTableSELPROTO)(gPDFEditReadHFT[PDEColorSpaceGetCTableSEL])))
+
+ #define PDEObjectGetType (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEObjectGetTypeSELPROTO)(gPDFEditReadHFT[PDEObjectGetTypeSEL])))
+ #define PDEObjectDump (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEObjectDumpSELPROTO)(gPDFEditReadHFT[PDEObjectDumpSEL])))
+
+ #define PDEAcquire (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEAcquireSELPROTO)(gPDFEditReadHFT[PDEAcquireSEL])))
+ #define PDERelease (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEReleaseSELPROTO)(gPDFEditReadHFT[PDEReleaseSEL])))
+
+ #define PDELogDump (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDELogDumpSELPROTO)(gPDFEditReadHFT[PDELogDumpSEL])))
+ #define PDEAttrEnumTable (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEAttrEnumTableSELPROTO)(gPDFEditReadHFT[PDEAttrEnumTableSEL])))
+
+ /* Methods added after 0.2 */
+ #define PDEExtGStateGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEExtGStateGetCosObjSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetCosObjSEL])))
+ #define PDETextGetQuad (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetQuadSELPROTO)(gPDFEditReadHFT[PDETextGetQuadSEL])))
+ #define PDEPlaceGetMCTag (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPlaceGetMCTagSELPROTO)(gPDFEditReadHFT[PDEPlaceGetMCTagSEL])))
+ #define PDEPlaceGetDict (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPlaceGetDictSELPROTO)(gPDFEditReadHFT[PDEPlaceGetDictSEL])))
+ #define PDEContainerGetMCTag (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContainerGetMCTagSELPROTO)(gPDFEditReadHFT[PDEContainerGetMCTagSEL])))
+ #define PDEContainerGetDict (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContainerGetDictSELPROTO)(gPDFEditReadHFT[PDEContainerGetDictSEL])))
+ #define PDEContainerGetContent (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContainerGetContentSELPROTO)(gPDFEditReadHFT[PDEContainerGetContentSEL])))
+ #define PDEColorSpaceGetBaseNumComps (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEColorSpaceGetBaseNumCompsSELPROTO)(gPDFEditReadHFT[PDEColorSpaceGetBaseNumCompsSEL])))
+ /* Methods added after 0.4 */
+ #define PDEDefaultGState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEDefaultGStateSELPROTO)(gPDFEditReadHFT[PDEDefaultGStateSEL])))
+ /* Methods added after 0.5 */
+ #define PDEPatternGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEPatternGetCosObjSELPROTO)(gPDFEditReadHFT[PDEPatternGetCosObjSEL])))
+ /* Methods added after 0.6 */
+ #define PDEEnumElements (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEEnumElementsSELPROTO)(gPDFEditReadHFT[PDEEnumElementsSEL])))
+ /* Methods added after 0.7 */
+ #define PDEFontSumWidths (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFontSumWidthsSELPROTO)(gPDFEditReadHFT[PDEFontSumWidthsSEL])))
+ #define PDEFontGetNumCodeBytes (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFontGetNumCodeBytesSELPROTO)(gPDFEditReadHFT[PDEFontGetNumCodeBytesSEL])))
+ #define PDEDeviceNColorsGetColorValue (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEDeviceNColorsGetColorValueSELPROTO)(gPDFEditReadHFT[PDEDeviceNColorsGetColorValueSEL])))
+ #define PDEFontIsMultiByte (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFontIsMultiByteSELPROTO)(gPDFEditReadHFT[PDEFontIsMultiByteSEL])))
+ #define PDETextGetNumBytes (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextGetNumBytesSELPROTO)(gPDFEditReadHFT[PDETextGetNumBytesSEL])))
+
+ #define PDEGroupGetContent (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEGroupGetContentSELPROTO)(gPDFEditReadHFT[PDEGroupGetContentSEL])))
+ #define PDEClipFlattenedEnumElems (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEClipFlattenedEnumElemsSELPROTO)(gPDFEditReadHFT[PDEClipFlattenedEnumElemsSEL])))
+
+ #define PDEElementIsAtPoint (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEElementIsAtPointSELPROTO)(gPDFEditReadHFT[PDEElementIsAtPointSEL])))
+ #define PDEElementIsAtRect (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEElementIsAtRectSELPROTO)(gPDFEditReadHFT[PDEElementIsAtRectSEL])))
+ #define PDETextIsAtPoint (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextIsAtPointSELPROTO)(gPDFEditReadHFT[PDETextIsAtPointSEL])))
+ #define PDETextIsAtRect (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDETextIsAtRectSELPROTO)(gPDFEditReadHFT[PDETextIsAtRectSEL])))
+ #define PDEFontGetOneByteEncoding (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEFontGetOneByteEncodingSELPROTO)(gPDFEditReadHFT[PDEFontGetOneByteEncodingSEL])))
+ #define PDEShadingGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEShadingGetCosObjSELPROTO)(gPDFEditReadHFT[PDEShadingGetCosObjSEL])))
+
+ #define PDEUnknownGetOpName (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEUnknownGetOpNameSELPROTO)(gPDFEditReadHFT[PDEUnknownGetOpNameSEL])))
+ #define PDEContentGetDefaultColorSpace (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEContentGetDefaultColorSpaceSELPROTO)(gPDFEditReadHFT[PDEContentGetDefaultColorSpaceSEL])))
+ #define PDEImageGetDecodeArray (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_4), *((PDEImageGetDecodeArraySELPROTO)(gPDFEditReadHFT[PDEImageGetDecodeArraySEL])))
+
+
+/* PI_PDFEDIT_READ_VERSION >= 0x00050000 */
+
+ #define PDEBeginContainerGetMCTag (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEBeginContainerGetMCTagSELPROTO)(gPDFEditReadHFT[PDEBeginContainerGetMCTagSEL])))
+ #define PDEBeginContainerGetDict (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEBeginContainerGetDictSELPROTO)(gPDFEditReadHFT[PDEBeginContainerGetDictSEL])))
+
+ #define PDESoftMaskGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDESoftMaskGetCosObjSELPROTO)(gPDFEditReadHFT[PDESoftMaskGetCosObjSEL])))
+ #define PDESoftMaskAcquireForm (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDESoftMaskAcquireFormSELPROTO)(gPDFEditReadHFT[PDESoftMaskAcquireFormSEL])))
+ #define PDESoftMaskGetBackdropColor (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDESoftMaskGetBackdropColorSELPROTO)(gPDFEditReadHFT[PDESoftMaskGetBackdropColorSEL])))
+ #define PDESoftMaskGetTransferFunction (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDESoftMaskGetTransferFunctionSELPROTO)(gPDFEditReadHFT[PDESoftMaskGetTransferFunctionSEL])))
+
+ #define PDEXGroupGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEXGroupGetCosObjSELPROTO)(gPDFEditReadHFT[PDEXGroupGetCosObjSEL])))
+ #define PDEXGroupGetKnockout (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEXGroupGetKnockoutSELPROTO)(gPDFEditReadHFT[PDEXGroupGetKnockoutSEL])))
+ #define PDEXGroupGetIsolated (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEXGroupGetIsolatedSELPROTO)(gPDFEditReadHFT[PDEXGroupGetIsolatedSEL])))
+ #define PDEXGroupAcquireColorSpace (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEXGroupAcquireColorSpaceSELPROTO)(gPDFEditReadHFT[PDEXGroupAcquireColorSpaceSEL])))
+
+ #define PDEFormAcquireXGroup (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEFormAcquireXGroupSELPROTO)(gPDFEditReadHFT[PDEFormAcquireXGroupSEL])))
+ #define PDEFormHasXGroup (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEFormHasXGroupSELPROTO)(gPDFEditReadHFT[PDEFormHasXGroupSEL])))
+
+ #define PDEElementHasGState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEElementHasGStateSELPROTO)(gPDFEditReadHFT[PDEElementHasGStateSEL])))
+
+ #define PDEExtGStateGetOPM (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetOPMSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetOPMSEL])))
+ #define PDEExtGStateGetOPFill (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetOPFillSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetOPFillSEL])))
+ #define PDEExtGStateGetOPStroke (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetOPStrokeSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetOPStrokeSEL])))
+ #define PDEExtGStateGetOpacityFill (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetOpacityFillSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetOpacityFillSEL])))
+ #define PDEExtGStateGetOpacityStroke (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetOpacityStrokeSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetOpacityStrokeSEL])))
+ #define PDEExtGStateGetBlendMode (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetBlendModeSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetBlendModeSEL])))
+ #define PDEExtGStateGetAIS (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetAISSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetAISSEL])))
+ #define PDEExtGStateHasSoftMask (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateHasSoftMaskSELPROTO)(gPDFEditReadHFT[PDEExtGStateHasSoftMaskSEL])))
+ #define PDEExtGStateAcquireSoftMask (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateAcquireSoftMaskSELPROTO)(gPDFEditReadHFT[PDEExtGStateAcquireSoftMaskSEL])))
+
+ #define PDEImageHasSMask (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEImageHasSMaskSELPROTO)(gPDFEditReadHFT[PDEImageHasSMaskSEL])))
+ #define PDEImageGetSMask (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEImageGetSMaskSELPROTO)(gPDFEditReadHFT[PDEImageGetSMaskSEL])))
+ #define PDEImageGetMatteArray (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEImageGetMatteArraySELPROTO)(gPDFEditReadHFT[PDEImageGetMatteArraySEL])))
+
+ #define PDEExtGStateGetTK (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetTKSELPROTO)(gPDFEditReadHFT[PDEExtGStateGetTKSEL])))
+
+ #define PDETextGetState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDETextGetStateSELPROTO)(gPDFEditReadHFT[PDETextGetStateSEL])))
+
+ #define PDSysEncodingGetWMode (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDSysEncodingGetWModeSELPROTO)(gPDFEditReadHFT[PDSysEncodingGetWModeSEL])))
+ #define PDSysEncodingIsIdentity (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDSysEncodingIsIdentitySELPROTO)(gPDFEditReadHFT[PDSysEncodingIsIdentitySEL])))
+ #define PDSysEncodingIsMultiByte (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDSysEncodingIsMultiByteSELPROTO)(gPDFEditReadHFT[PDSysEncodingIsMultiByteSEL])))
+ #define PDEExtGStateGetSA (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDEExtGStateGetSASELPROTO)(gPDFEditReadHFT[PDEExtGStateGetSASEL])))
+ #define PDESoftMaskGetName (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDESoftMaskGetNameSELPROTO)(gPDFEditReadHFT[PDESoftMaskGetNameSEL])))
+
+ #define PDETextGetMatrix (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_5), *((PDETextGetMatrixSELPROTO)(gPDFEditReadHFT[PDETextGetMatrixSEL])))
+
+/* BEGIN Optional Content API calls */
+ #define PDEElementGetOCMD (ACROASSERT(gPDFEditReadVersion >= PDFEditReadHFT_VERSION_6), *((PDEElementGetOCMDSELPROTO)(gPDFEditReadHFT[PDEElementGetOCMDSEL])))
+ #define PDEElementIsCurrentlyVisible (ACROASSERT(gPDFEditReadVersion >= PDFEditReadHFT_VERSION_6), *((PDEElementIsCurrentlyVisibleSELPROTO)(gPDFEditReadHFT[PDEElementIsCurrentlyVisibleSEL])))
+ #define PDEElementGetAllVisibilities (ACROASSERT(gPDFEditReadVersion >= PDFEditReadHFT_VERSION_6), *((PDEElementGetAllVisibilitiesSELPROTO)(gPDFEditReadHFT[PDEElementGetAllVisibilitiesSEL])))
+ #define PDEElementMakeVisible (ACROASSERT(gPDFEditReadVersion >= PDFEditReadHFT_VERSION_6), *((PDEElementMakeVisibleSELPROTO)(gPDFEditReadHFT[PDEElementMakeVisibleSEL])))
+/* END Optional Content API calls */
+
+ #define PDEFontIsEmbedded (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEFontIsEmbeddedSELPROTO)(gPDFEditReadHFT[PDEFontIsEmbeddedSEL])))
+ #define PDEFontGetSysFont (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEFontGetSysFontSELPROTO)(gPDFEditReadHFT[PDEFontGetSysFontSEL])))
+ #define PDEFontGetSysEncoding (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEFontGetSysEncodingSELPROTO)(gPDFEditReadHFT[PDEFontGetSysEncodingSEL])))
+ #define PDETextGetAdvance (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextGetAdvanceSELPROTO)(gPDFEditReadHFT[PDETextGetAdvanceSEL])))
+ #define PDETextItemGetFont (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextItemGetFontSELPROTO)(gPDFEditReadHFT[PDETextItemGetFontSEL])))
+ #define PDETextItemGetTextMatrix (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextItemGetTextMatrixSELPROTO)(gPDFEditReadHFT[PDETextItemGetTextMatrixSEL])))
+ #define PDETextItemGetTextState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextItemGetTextStateSELPROTO)(gPDFEditReadHFT[PDETextItemGetTextStateSEL])))
+ #define PDETextItemGetTextLen (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextItemGetTextLenSELPROTO)(gPDFEditReadHFT[PDETextItemGetTextLenSEL])))
+ #define PDETextItemCopyText (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextItemCopyTextSELPROTO)(gPDFEditReadHFT[PDETextItemCopyTextSEL])))
+ #define PDETextItemGetGState (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextItemGetGStateSELPROTO)(gPDFEditReadHFT[PDETextItemGetGStateSEL])))
+ #define PDETextGetItem (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDETextGetItemSELPROTO)(gPDFEditReadHFT[PDETextGetItemSEL])))
+
+/* Support for 16 bpc Flate and JPX images. */
+ /* #define XXXXXX (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((XXXXXXSELPROTO)(gPDFEditReadHFT[XXXXXXSEL]))) */
+ #define PDEImageGetType (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageGetTypeSELPROTO)(gPDFEditReadHFT[PDEImageGetTypeSEL])))
+ #define PDEImageAcquireImageFlate (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageAcquireImageFlateSELPROTO)(gPDFEditReadHFT[PDEImageAcquireImageFlateSEL])))
+ #define PDEImageAcquireImageJPX (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageAcquireImageJPXSELPROTO)(gPDFEditReadHFT[PDEImageAcquireImageJPXSEL])))
+
+ #define PDEImageJPXGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXGetCosObjSELPROTO)(gPDFEditReadHFT[PDEImageJPXGetCosObjSEL])))
+
+ #define PDEImageFlateGetCosObj (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageFlateGetCosObjSELPROTO)(gPDFEditReadHFT[PDEImageFlateGetCosObjSEL])))
+ #define PDEImageFlateGetAttrs (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageFlateGetAttrsSELPROTO)(gPDFEditReadHFT[PDEImageFlateGetAttrsSEL])))
+ #define PDEImageFlateAcquireColorSpace (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageFlateAcquireColorSpaceSELPROTO)(gPDFEditReadHFT[PDEImageFlateAcquireColorSpaceSEL])))
+ #define PDEImageFlateGetDataStm (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageFlateGetDataStmSELPROTO)(gPDFEditReadHFT[PDEImageFlateGetDataStmSEL])))
+
+ #define PDEImageJPXGetAttrs (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXGetAttrsSELPROTO)(gPDFEditReadHFT[PDEImageJPXGetAttrsSEL])))
+ #define PDEImageJPXAcquireColorSpace (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXAcquireColorSpaceSELPROTO)(gPDFEditReadHFT[PDEImageJPXAcquireColorSpaceSEL])))
+ #define PDEImageJPXGetDataStm (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXGetDataStmSELPROTO)(gPDFEditReadHFT[PDEImageJPXGetDataStmSEL])))
+ #define PDEImageJPXGetNumColorSpaces (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXGetNumColorSpacesSELPROTO)(gPDFEditReadHFT[PDEImageJPXGetNumColorSpacesSEL])))
+ #define PDEImageJPXAcquireJPXColorSpace (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXAcquireJPXColorSpaceSELPROTO)(gPDFEditReadHFT[PDEImageJPXAcquireJPXColorSpaceSEL])))
+ #define PDEImageJPXHasPalette (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXHasPaletteSELPROTO)(gPDFEditReadHFT[PDEImageJPXHasPaletteSEL])))
+ #define PDEImageJPXAcquirePalette (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((PDEImageJPXAcquirePaletteSELPROTO)(gPDFEditReadHFT[PDEImageJPXAcquirePaletteSEL])))
+
+ #define JPXPaletteGetNumEntries (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXPaletteGetNumEntriesSELPROTO)(gPDFEditReadHFT[JPXPaletteGetNumEntriesSEL])))
+ #define JPXPaletteGetBitDepths (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXPaletteGetBitDepthsSELPROTO)(gPDFEditReadHFT[JPXPaletteGetBitDepthsSEL])))
+ #define JPXPaletteGetNumComponents (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXPaletteGetNumComponentsSELPROTO)(gPDFEditReadHFT[JPXPaletteGetNumComponentsSEL])))
+ #define JPXPaletteGetTable (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXPaletteGetTableSELPROTO)(gPDFEditReadHFT[JPXPaletteGetTableSEL])))
+
+ #define JPXColorSpaceAcquireNext (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXColorSpaceAcquireNextSELPROTO)(gPDFEditReadHFT[JPXColorSpaceAcquireNextSEL])))
+ #define JPXColorSpaceGetType (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXColorSpaceGetTypeSELPROTO)(gPDFEditReadHFT[JPXColorSpaceGetTypeSEL])))
+ #define JPXColorSpaceGetEnumAttrs (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXColorSpaceGetEnumAttrsSELPROTO)(gPDFEditReadHFT[JPXColorSpaceGetEnumAttrsSEL])))
+ #define JPXColorSpaceGetProfile (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_6), *((JPXColorSpaceGetProfileSELPROTO)(gPDFEditReadHFT[JPXColorSpaceGetProfileSEL])))
+
+ #define PDEColorSpaceGetStruct (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_8_1), *((PDEColorSpaceGetStructSELPROTO) (gPDFEditReadHFT[PDEColorSpaceGetStructSEL])))
+
+ #define PDEImageGetColorSpaceEx (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_9), *((PDEImageGetColorSpaceExSELPROTO)(gPDFEditReadHFT[PDEImageGetColorSpaceExSEL])))
+ #define PDEFormGetContentToCosObjFlags (ACROASSERT(gPDFEditReadVersion >=PDFEditReadHFT_VERSION_9), *((PDEFormGetContentToCosObjFlagsSELPROTO)(gPDFEditReadHFT[PDEFormGetContentToCosObjFlagsSEL])))
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+
+#endif /* !STATIC_HFT */
+
+#endif /* PI_PDFEDIT_READ_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PERCalls */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERProcs.h
new file mode 100644
index 0000000..92637be
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PERProcs.h
@@ -0,0 +1,3467 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PERProcs.h
+
+ - Catalog of functions exported by the PDFEditRead HFT.
+
+*********************************************************************/
+
+/*------------------------------------------------------------------------
+ PDFEdit Object Hierarchy.
+------------------------------------------------------------------------*/
+/*
+ PDEObject - base subclass of all PDFEdit objects
+ | methods: GetType, Acquire, Release, AddTag, GetTag, RemoveTag
+ |
+ --->PDEContent - container of a display list composed of PDEElement's
+ |
+ |
+ --->PDEElement - base subclass of all PDEElements
+ | | methods: GetClip, SetClip, etc.
+ | |
+ | --->PDEText - element representing text
+ | |
+ | --->PDEPath - element representing a PostScript path
+ | |
+ | --->PDEImage - element representing an inline or XObject image
+ | | XObject images are listed in page XObject resources
+ | |
+ | --->PDEForm - element representing an XObject Form
+ | | Forms are listed in page XObject resources
+ | |
+ | --->PDEPS - element representing inline or XObject passthrough PS
+ | | XObject PS's are listed in page XObject resources
+ | |
+ | --->PDEXObject - element representing an unknown type of XObject
+ | |
+ | --->PDEPlace - element representing a place in the display list of
+ | | a Marked Content MP or DP operator.
+ | |
+ | --->PDEContainer - element representing a container of PDEElements
+ | | collected by a Marked Content BMC/DMC and EMC pair.
+ | |
+ | --->PDEGroup - element representing a group (container) of PDEElements
+ |
+ --->PDEClip - container of PDEPath objects, PDEText objects, PDEContainer objects, PDEGroup objects,
+ | and PDEPlaces describing paths and charpaths; attribute of a
+ | PDEElement
+ |
+ --->PDEFont - font; part of a PDEText attributes
+ | fonts are listed in page Font resources
+ |
+ --->PDEColorSpace - color space attribute of a PDEElement
+ | color spaces are listed in page ColorSpace resources
+ |
+ --->PDEExtGState - Extended Graphics State attribute of a PDEElement
+ ExtGStates are listed in page ExtGState resources
+
+*/
+
+/*------------------------------------------------------------------------
+ PDFEdit Public Methods - Generic PDEContent and PDEElement methods.
+------------------------------------------------------------------------*/
+
+
+/**
+ Creates a content object from a Cos object. This is the
+ main method for obtaining a PDEContent object.
+
+ <p>Call PDERelease() to dispose of the returned content object
+ when finished with it. </p>
+
+ @param contents IN/OUT A Cos object that is the source for the content.
+ It may be page contents, a Form XObject, a Type 3 font CharProc,
+ or an appearance dictionary for an annotation.
+ @param resources IN/OUT The object's Resources dictionary. If
+ the Form or Type 3 font or appearance dictionary contains
+ a Resources dictionary, this dictionary must be passed in
+ <code>resources</code>. Otherwise, it must be the page resources object
+ of the page containing the Form or Type 3 font contents
+ object.
+ @return The content from the Cos object.
+ @exception pdErrOpNotPermitted
+ @exception peErrPStackUnderflow
+ @see PDEContentCreate
+ @see PDEContentToCosObj
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(PDEContent, PDEContentCreateFromCosObj, (
+ const CosObj *contents,
+ const CosObj *resources)
+ )
+
+/**
+ Gets the attributes of a content.
+ @param pdeContent IN/OUT A content object.
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDEContentAttrs
+ structure containing the attributes of the content.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEContentGetAttrs,(
+ IN PDEContent pdeContent,
+ OUT PDEContentAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+/**
+ Gets the number of resources of the specified type and,
+ optionally, gets the pointers to the resource objects.
+ @param pdeContent IN/OUT A content object.
+ @param type IN/OUT The type of resources to query or obtain: PDEFont,
+ PDEXGroup, or PDEColorSpace. It must be one of PDEContentGetResourceFlags.
+
+ @param resourcesP IN/OUT (Filled by the method) If non-<code>NULL</code>, it
+ must point to an array of PDEObject pointers. On return,
+ the array contains pointers to the requested resources.
+ If <code>resourcesP</code> is <code>NULL</code>, only the number of resources of <code>type</code>
+ is returned. Note that the object in <code>resourcesP</code> may only be
+ valid for this method. Use PDEAcquire() if you need to hold
+ on to the object longer than the scope of <code>resourcesP</code>.
+ @return The number of resources of <code>type</code> returned in <code>resourcesP</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEContentGetResources,(
+ IN PDEContent pdeContent,
+ IN ASInt32 type,
+ OUT PDEObject *resourcesP)
+ )
+
+/**
+ Gets the number of elements in a PDEContent object.
+ @param pdeContent IN/OUT A content object.
+ @return The number of elements in <code>pdeContent</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEContentGetElem
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEContentGetNumElems,(
+ IN PDEContent pdeContent)
+ )
+
+/**
+ Gets the requested element from a content.
+ @param pdeContent IN/OUT A content object.
+ @param index IN/OUT The index of element to obtain.
+ @return The requested element.
+ @exception peErrWrongPDEObjectType
+ @see PDEContentGetNumElems
+
+ @note This method does not change the reference count of
+ the element.
+
+ @note This method does not copy the element.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEElement, PDEContentGetElem,(
+ IN PDEContent pdeContent,
+ IN ASInt32 index)
+ )
+/*------------------------------------------------------------------------
+ General methods for PDEPath, PDEImage and PDEXObject.
+------------------------------------------------------------------------*/
+
+
+/**
+ Gets the bounding box for an element.
+
+ <p>The returned bounding box is guaranteed to encompass the
+ element, but is not guaranteed to be the smallest box that
+ could contain the element. For example, for an arc, <code>bboxP</code>
+ encloses the bezier control points, and not just the curve
+ itself. </p>
+
+ @param pdeElement IN/OUT An element whose bounding box is obtained.
+
+ @param bboxP IN/OUT (Filled by the method) A pointer to a ASFixedRect
+ structure specifying the bounding box of <code>pdeElement</code>, specified
+ in user space coordinates.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @notify PDEElementGetClip
+ @notify PDEElementGetGState
+ @notify PDEElementGetMatrix
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEElementGetBBox, (
+ IN PDEElement pdeElement,
+ OUT ASFixedRectP bboxP)
+ )
+
+/**
+ Gets the graphics state information for an element.
+
+ <p>This method is only valid for PDEForm, PDEImage, PDEPath, and
+ PDEShading elements. </p>
+
+ @param pdeElement An element whose graphics state is obtained.
+
+ @param stateP (Filled by the method) A pointer to a PDEGraphicStateP
+ structure that contains graphics state information for <code>pdeElement</code>.
+ This PDEGraphicStateP may contain PDEObjects for color spaces
+ or an ExtGState. They are not acquired by this method. Note that
+ for a PDEImage, only the ExtGState value is used for images.
+ For indexed images, the fill color space and values are
+ categorized in the PDEImage object.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEElementSetGState
+ @see PDEElementGetBBox
+ @see PDEElementGetClip
+ @see PDEElementGetMatrix
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEElementGetGState, (
+ IN PDEElement pdeElement,
+ OUT PDEGraphicStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Gets the transformation matrix for an element.
+
+ <p>This matrix provides the transformation from user space
+ to device space for the element. If there is no cm
+ (<code>concatmatrix</code>) operator in the page stream, the matrix is the identity
+ matrix. </p>
+
+ <p>For the Adobe PDF Library v1, the element may not be a PDEContainer,
+ a PDEGroup, a PDEPlace, or a PDEText. </p>
+
+ For the Adobe PDF Library v4, the element may not be a PDEText.
+
+ @param pdeElement An element whose transformation matrix
+ is obtained.
+ @param matrixP (Filled by the method) A pointer to ASFixedMatrix
+ that holds a transformation matrix for <code>pdeElement</code>. If <code>pdeElement</code>
+ is a text object, it returns the identity matrix.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEElementSetMatrix
+ @see PDEElementGetBBox
+ @see PDEElementGetGState
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEElementGetMatrix, (
+ IN PDEElement pdeElement,
+ OUT ASFixedMatrixP matrixP)
+ )
+
+/**
+ Gets the current clip for an element. The current clipping path is part
+ of the graphics state. Element types that are not graphics elements (for example, PDEContainer and PDEPlace)
+ do not have an associated <code>gstate</code> and should not be expected to return valid results.
+ @param pdeElement IN/OUT An element whose clip is obtained. Note that
+ a clip may be shared by many elements. Use care when modifying
+ a clip. Copy it first if you want to modify the clip for
+ a specific element.
+ @return The clip object for <code>pdeElement</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEElementGetBBox
+ @see PDEElementGetGState
+ @see PDEElementGetMatrix
+ @see PDEElementIsAtRect
+
+ @note This method does not change the reference count of
+ the clip object.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEClip, PDEElementGetClip, (
+ IN PDEElement pdeElement)
+ )
+
+/*------------------------------------------------------------------------
+ PDEText methods.
+------------------------------------------------------------------------*/
+
+/* Characters and show strings
+** Each PDEtext object contains a set of text which does not
+** contain any intervening non-text objects, such as paths and XObjects.
+** All the of text in a text block is subject to the same clip path.
+**
+** The text may be accessed as show strings (text runs) or as individual
+** characters. The matrix, graphics state or text state may be retrieved for
+** a text run or for an individual character.
+*/
+
+/* flags and index
+** Many of the PDEText methods operate on either a character or
+** a text element (show string). For such methods, a flag and an index
+** must be specified. The flag will indicate whether the index is a character
+** index or an element index.
+*/
+
+
+/**
+ Gets the number of characters in a text object.
+ @param pdeText IN/OUT A text object whose number of characters is
+ found.
+ @return The total number of characters in <code>pdeText</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetNumRuns
+ @see PDETextGetRunForChar
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDETextGetNumChars, (
+ IN PDEText pdeText)
+ )
+
+/**
+ Gets the number of text runs (show strings) in a text object.
+
+ @param pdeText IN/OUT A text object whose number of text runs is
+ found.
+ @return The number of text runs in <code>pdeText</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDETextGetNumBytes
+ @see PDETextGetRunForChar
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDETextGetNumRuns, (
+ IN PDEText pdeText)
+ )
+
+/**
+ Gets the character offset of the first character of the
+ specified text run.
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose graphics state is found.
+ @param runIndex IN/OUT The index of the text run whose first character's
+ index is returned.
+ @return The character offset of the first character of the specified
+ text run in <code>pdeText</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetNumBytes
+ @see PDETextGetNumRuns
+ @see PDETextGetRunForChar
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDETextRunGetCharOffset, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex)
+ )
+
+/**
+ Gets the index of the text run that contains the nth character
+ in a text object.
+ @param pdeText IN/OUT A text object to examine.
+ @param charIndex IN/OUT The number of the character to find in <code>pdeText</code>.
+
+ @return The index of the text run with the specified character index
+ into <code>pdeText</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDETextGetRunForChar, (
+ IN PDEText pdeText,
+ IN ASInt32 charIndex)
+ )
+
+/**
+ Gets the number of characters in a text run.
+ @param pdeText IN/OUT A text object containing a text run whose
+ number of characters is found.
+ @param runIndex IN/OUT The index of the text run whose number of characters
+ is returned.
+ @return The number of characters in the specified text run.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetNumRuns
+ @see PDETextGetRunForChar
+ @see PDETextRunGetCharOffset
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDETextRunGetNumChars, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex)
+ )
+
+/**
+ Gets the bounding box of a character or a text run.
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose bounding box is found.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param bboxP IN/OUT (Filled by the method) A pointer to ASFixedRect
+ to set to the bounding box of specified character or text
+ run.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDETextGetBBox, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT ASFixedRectP bboxP)
+ )
+
+/**
+ Gets the graphics state of a character or a text run.
+ @param pdeText A text object containing a character or text
+ run whose graphics state is found.
+ @param flags A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index The index of the character or text run in <code>pdeText</code>.
+
+ @param stateP (Filled by the method) A pointer to a PDEGraphicStateP
+ structure with the graphics state of the specified character or
+ text run.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextRunSetGState
+
+ @note This method does not increment the reference count
+ of the objects in <code>stateP</code>.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextGetGState, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT PDEGraphicStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Gets the text state of a character or a text element.
+
+ @note This function handles only <code>charSpacing</code>, <code>wordSpacing</code>,
+ and <code>renderMode</code> for backward compatibility. For all attributes,
+ use PDETextGetState() instead.
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose text state is found.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param stateP IN/OUT (Filled by the method) A pointer to a PDETextState
+ structure to fill with the text state of the specified character
+ or text run.
+ @param stateSize IN/OUT The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetState
+ @see PDETextRunSetTextState
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDETextGetTextState, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT PDETextStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Gets the font for a text character or element.
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose font is found.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @return The font of the specified character or text run.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextRunSetFont
+
+ @note This method does not change the reference count of
+ the returned PDEFont.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEFont, PDETextGetFont, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index)
+ )
+
+/**
+ Gets the matrix of a character or a text run.
+ @param pdeText A text object containing a character or text
+ run whose matrix is found.
+ @param flags A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index The index of the character or text run in <code>pdeText</code>.
+
+ @param matrixP (Filled by the method) A pointer to ASFixedMatrix
+ that holds the matrix of the specified character or text run.
+ This is the transformation matrix from user space to the
+ current text space. The <code>h</code> and <code>v</code> values of the matrix indicate
+ the origin of the first character.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextRunSetTextMatrix
+ @see PDETextGetMatrix
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextGetTextMatrix, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT ASFixedMatrixP matrixP)
+ )
+
+/**
+ Gets the stroke matrix of a character or a text run.
+ @param pdeText A text object containing a character or text
+ run whose stroke matrix is found.
+ @param flags A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index The index of the character or text run in <code>pdeText</code>.
+
+ @param matrixP (Filled by the method) A pointer to ASFixedMatrix
+ that holds the stroke matrix of the specified character or text
+ run. This matrix is the transformation for line widths when
+ stroking. The <code>h</code> and <code>v</code> values of the matrix are ignored.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextRunSetStrokeMatrix
+
+ @note Currently this method returns no valid information (Acrobat 5 and later).
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextGetStrokeMatrix, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT ASFixedMatrixP matrixP)
+ )
+
+/**
+ Gets the advance width of a character or a text element.
+ Advance width is returned in either character space or user
+ space. The advance width is the amount by which the current
+ point advances when the character is drawn.
+
+ <p>Advance width may be horizontal or vertical, depending on
+ the writing style. Thus <code>advanceP</code> has both a horizontal and
+ vertical component. </p>
+
+ @param pdeText A text object containing a character or text
+ run whose advance width is found.
+ @param flags A PDETextFlags value that specifies whether
+ <code>index</code> refers to the character offset from the beginning
+ of the text object or the index of the text run in the text
+ object. It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ <p>In addition, set the kPDETextPageSpace
+ flag to obtain the advance width in user space. If it is
+ not set, the advance width is in character space. </p>
+ @param index The index of the character or text run in <code>pdeText</code>.
+
+ @param advanceP (Filled by the method) A pointer to a ASFixedPoint
+ value indicating the advance width.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextGetAdvanceWidth, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar, kPDETextPageSpace */
+ IN ASInt32 index,
+ OUT ASFixedPointP advanceP)
+ )
+
+/**
+ Gets the text for a text run or character.
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose text is found.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param textBuffer IN/OUT (Filled by the method) The text of the specified
+ character or text run. <code>textBuffer</code> must be large enough to
+ hold the returned text. If <code>textBuffer</code> is <code>NULL</code>, it returns the
+ number of bytes required to hold the data.
+ @return The number of bytes in the text run or character.
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @see PDETextGetTextMatrix
+ @see PDETextGetTextState
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDETextGetText, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT ASUns8 *textBuffer)
+ )
+/*------------------------------------------------------------------------
+ PDEPath methods.
+------------------------------------------------------------------------*/
+
+/* PDEPath data format
+**
+** A path object consists of the path gstate and the path data.
+** The path data is an array of path operators, such as, moveto, lineto,
+** and path operands. Each operator is a 32-bit integer value, defined
+** by the PDEPathElementType enum. Each operator is followed by its
+** operands, which are zero to three FixedPoint values, which are
+** pairs of 32-bit values, consisting of the x value followed by the y value.
+**
+** For example, to draw a horizontal line from (100,100) to (200, 100),
+** the data elements would be as follows:
+** 0: kPDEMoveTo
+** 1: 100 (x value in Fixed representation)
+** 2: 100 (y)
+** 3: kPDELineTo
+** 4: 200 (x)
+** 5: 100 (y)
+**
+** A convenient algorithm for accessing the data values in a path is:
+**
+** ASInt32 *pData;
+** ASInt32 *pEnd;
+** Fixed x, y;
+**
+** pathLen = PDPathGetData(pdePath, pathData, pathDataSize);
+** pData = pathData;
+** pDend = pData + pathLen/sizeof(ASInt32);
+** while (pData < pEnd)
+** {
+** switch (*pData++)
+** {
+** case kPDEMoveTo:
+** x = *pData++;
+** y = *pData++;
+** (do something with the data)
+** break;
+** case kPDELineTo:
+** (and so on)
+** }
+** }
+*/
+
+
+/**
+ Gets the size of the path data and, optionally, the path
+ data.
+ @param path IN/OUT The path whose data is obtained.
+ @param data IN/OUT (Filled by the method) A pointer to the path data.
+ If <code>data</code> is non-<code>NULL</code>, it contains a variable-sized array
+ of path operators and operands. The format is a 32-bit operator
+ followed by 0 to 3 ASFixedPoint values, depending on the
+ operator. Opcodes are codes for <code>moveto</code>, <code>lineto</code>, <code>curveto</code>,
+ <code>rect</code>, or <code>closepath</code> operators; operands are ASFixedPoint
+ values. If <code>data</code> is <code>NULL</code>, the number of bytes required for
+ <code>data</code> is returned by the method. Note that it returns <i>raw</i> path
+ data. If you want the points in page coordinates, concatenate
+ the path data points with the PDEElement matrix obtained
+ from PDEElementGetMatrix().
+ @param dataSize IN/OUT Specifies the size of the buffer provided
+ in data. If it is less than the length of the path data,
+ the method copies <code>dataSize</code> bytes.
+ @return The length of the data of <code>path</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEPathSetData
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASUns32, PDEPathGetData, (
+ IN PDEPath path,
+ OUT ASInt32 *data,
+ IN ASUns32 dataSize)
+ )
+
+/**
+ Gets the fill and stroke attributes of a path.
+ @param path The path whose fill and stroke attributes
+ are obtained.
+ @return A set of PDEPathOpFlags flags describing fill and stroke
+ attributes.
+ @exception peErrWrongPDEObjectType
+ @see PDEPathSetPaintOp
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(ASUns32, PDEPathGetPaintOp, (
+ IN PDEPath path)
+ )
+
+/*------------------------------------------------------------------------
+ PDEImage methods.
+------------------------------------------------------------------------*/
+
+/* Image filtering
+** The GetData, SetData, GetDataStm and SetDataStm methods take a flags parameter.
+** If flags & kPDEImageEncodedData, then the data is interpreted as being
+** encoded for SetData/SetDataStm.
+** For XObject images, the flag value may be set to kPDEImageEncodedData when
+** calling GetData/GetDataStm. This flag is not allowed when getting
+** inline image data.
+*/
+
+/**
+ Gets the attributes for an image.
+ @param image IN/OUT The image whose attributes are obtained.
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDEImageAttrs
+ structure with attributes of image.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @exception peErrUnknownPDEColorSpace
+ @see PDEImageGetColorSpace
+ @see PDEImageGetData
+ @see PDEImageGetDataLen
+ @see PDEImageGetDataStm
+ @see PDEImageGetDecodeArray
+ @see PDEImageGetFilterArray
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEImageGetAttrs, (
+ IN PDEImage image,
+ IN PDEImageAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+/**
+ Gets the color space object for an image.
+
+ @note (For the Adobe PDF Library v1 only) If you get the
+ PDEColorSpace for an inline image and then get the CosObj for
+ that color space with PDEColorSpaceGetCosObj(), this CosObj
+ is limited. Cos objects that are the result of parsing inline
+ dictionaries in the PDF page contents are a special class
+ of Cos objects. You should never depend on these objects
+ to last for the lifetime of the document. You should extract
+ the information you need from the object immediately, and
+ no longer refer to it in your code.
+ @param image IN/OUT The image whose color space is obtained.
+ @return Color space for image. It returns <code>NULL</code> if <code>image</code> is an image
+ mask.
+ @see PDEImageGetAttrs
+ @see PDEImageGetData
+ @see PDEImageGetDataLen
+ @see PDEImageGetDataStm
+ @see PDEImageGetDecodeArray
+ @see PDEImageGetFilterArray
+
+ @note This method does not change the reference count of
+ the returned PDEColorSpace.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEColorSpace, PDEImageGetColorSpace, (
+ IN PDEImage image)
+ )
+
+/**
+ Determines if an image is an XObject image.
+ @param image IN/OUT The image to examine.
+ @return <code>true</code> if the image is an XObject image, <code>false</code> otherwise.
+
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetCosObj
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDEImageIsCosObj, (
+ IN PDEImage image)
+ )
+
+/**
+ Determines if image data is encoded or not. It is used only for
+ inline images; it is not relevant to XObject images.
+
+ <p>It always returns <code>false</code> for XObject images; XObject image data
+ can be obtained from PDEImageGetData() or PDEImageGetDataStm(),
+ either encoded or decoded. </p>
+
+ <p>If an inline image is obtained via PDEContentCreateFromCosObj()
+ or related methods, the inline image data is always decoded.
+ That is, if PDFEdit parses the stream, the data is always
+ decoded. Only if PDEImageCreate() is used to explicitly create
+ a new image using encoded data does PDEImageDataIsEncoded()
+ return <code>true</code>. </p>
+
+ @param image IN/OUT The image to examine.
+ @param encodedLenP IN/OUT (Filled by the method) The length of the
+ encoded data. If the data is encoded, the method
+ returns <code>true</code>.
+ @return <code>true</code> if PDEImageGetData returns encoded data, <code>false</code> otherwise.
+ It returns <code>false</code> for XObject images.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetData
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDEImageDataIsEncoded, (
+ IN PDEImage image,
+ OUT ASUns32 *encodedLenP)
+ )
+
+/**
+ Gets an image's data.
+
+ <p>If the image is an XObject image, data is always returned
+ as decoded data. </p>
+
+ <p>See the note about inline images under PDEImageDataIsEncoded(). </p>
+
+ @param image IN/OUT The image whose data is obtained.
+ @param flags IN/OUT Unused - must be zero.
+ @param buffer IN/OUT The image data. If the data is decoded, <code>buffer</code>
+ must be large enough to contain the number of bytes specified
+ in the PDEImageAttrs structure obtained by PDEImageGetAttrs().
+ If the data is encoded, <code>buffer</code> must be large enough to contain
+ the number of bytes in the <code>encodedLenP</code> parameter obtained
+ by PDEImageDataIsEncoded().
+ @exception peErrUnknownPDEColorSpace
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @see PDEImageDataIsEncoded
+ @see PDEImageSetColorSpace
+ @see PDEImageGetAttrs
+ @see PDEImageGetColorSpace
+ @see PDEImageGetDataLen
+ @see PDEImageGetDataStm
+ @see PDEImageGetDecodeArray
+ @see PDEImageGetFilterArray
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEImageGetData, (
+ IN PDEImage image,
+ IN ASUns32 flags,
+ IN ASUns8 *buffer)
+ )
+
+/**
+ Gets a data stream for an image. It may only be called for
+ XObject images.
+
+ <p>The caller must dispose of the returned ASStm by calling
+ ASStmClose. </p>
+
+ @param image IN/OUT The image whose data stream is obtained.
+ @param flags IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData
+ flag is set, data is returned in encoded form. Otherwise,
+ data is decoded.
+ @return The stream for the image.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEImageSetDataStm
+ @see PDEImageGetDataLen
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASStm, PDEImageGetDataStm, (
+ IN PDEImage image,
+ IN ASUns32 flags)
+ )
+
+/**
+ Gets the length of data for an image.
+ @param image IN/OUT The image whose data length is obtained.
+ @return The number of bytes of image data, specified by the width, height,
+ bits per component, and color space of the image.
+ @exception peErrUnknownPDEColorSpace
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetData
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEImageGetDataLen, (
+ IN PDEImage image)
+ )
+
+/**
+ Gets the filter array for an image.
+ @param image IN/OUT The image whose filter array is obtained.
+ @param filtersP IN/OUT (Filled by the method) A pointer to PDEFilterArray
+ structure to fill with the current filter array for the
+ image. <code>filtersP</code> must be large enough to contain all of the
+ elements. It may be <code>NULL</code> to obtain the number of filter elements.
+
+ @return The number of filter elements.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetAttrs
+ @see PDEImageGetColorSpace
+ @see PDEImageGetDataLen
+ @see PDEImageGetDecodeArray
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEImageGetFilterArray, (
+ IN PDEImage image,
+ OUT PDEFilterArrayP filtersP)
+ )
+
+/**
+ Gets a Cos object for an image.
+ @param image IN/OUT The image whose Cos object is obtained.
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for the
+ image.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageCreateFromCosObj
+ @see PDEImageIsCosObj
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEImageGetCosObj, (
+ IN PDEImage image,
+ OUT CosObj *cosObjP)
+ )
+/*------------------------------------------------------------------------
+ PDEClip methods.
+------------------------------------------------------------------------*/
+
+
+/**
+ Gets the number of top-level elements in a clip object.
+ Top-level elements may be a path or charpath, a marked
+ content container or place, or a group.
+
+ <p>Paths are represented as PDEPath objects; charpaths are
+ represented as PDEText objects. </p>
+
+ @param clip IN/OUT The clip object to examine.
+ @return The number of path and charpath elements in clip. If <code>clip</code> contains
+ PDEGroup objects, this method returns the top-level PDEPath, PDEText,
+ PDEContainer, PDEGroup, or PDEPlace object. Use PDEClipFlattenedEnumElems()
+ to see only the PDEPath and PDEText objects.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEClipFlattenedEnumElems
+ @see PDEClipGetElem
+
+ @note PDEGroup is not a persistent object. You cannot save
+ to PDF and re-get group objects.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEClipGetNumElems, (
+ IN PDEClip clip)
+ )
+
+/**
+ Gets an element from a clip object.
+
+ @note This method does not change the reference count of
+ the returned PDEElement.
+ @param clip IN/OUT The clip object from which an element is obtained.
+
+ @param index IN/OUT The index of the element to get from <code>clip</code>.
+ @return The element from the clip object.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEClipGetNumElems
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEElement, PDEClipGetElem, (
+ IN PDEClip clip,
+ IN ASInt32 index)
+ )
+/*------------------------------------------------------------------------
+ PDEXObject methods.
+------------------------------------------------------------------------*/
+
+/* PDEXObject
+** Any unrecognized XObject references in a page stream will be
+** provided in the display list as a PDEXObject.
+*/
+
+/**
+ Gets a Cos object corresponding to a PDEXObject.
+ @param xObject IN/OUT The PDEXobject whose Cos object is obtained.
+
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for <code>xObject</code>.
+
+ @exception peErrWrongPDEObjectType
+ @see PDEXObjectCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEXObjectGetCosObj, (
+ IN PDEXObject xObject,
+ OUT CosObj *cosObjP)
+ )
+
+/*------------------------------------------------------------------------
+ PDEForm methods.
+------------------------------------------------------------------------*/
+
+
+/**
+ Gets a Cos object for a form.
+ @param form IN/OUT The form whose Cos object is obtained.
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for the
+ form.
+ @exception peErrWrongPDEObjectType
+ @see PDEFormCreateFromCosObj
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEFormGetCosObj, (
+ IN PDEForm form,
+ OUT CosObj *cosObjP)
+ )
+
+/*------------------------------------------------------------------------
+ PDEPS methods. (Passthrough PostScript)
+------------------------------------------------------------------------*/
+
+
+/**
+ Returns a PDEPS object's attributes.
+ @param ps IN/OUT An object of type PDEPS.
+ @param attrsP IN/OUT (Filled by the method) A pointer to PDEPSAttrs
+ data structure containing the attributes information.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer. Set it to <code>sizeof(PDEPSAttrs)</code>.
+ @return A pointer to a data structure of type PDEPSAttrs.
+ @see PDEPSCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDEPSGetAttrs, (
+ IN PDEPS ps,
+ OUT PDEPSAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+/**
+ Gets all or part of the image data.
+ @param ps IN/OUT An object of type PDEPS.
+ @param buffer IN/OUT (Filled by the method) Receives the data.
+
+ @param bufferSize IN/OUT The size of the buffer.
+ @param offset IN/OUT The offset into the source data at which to start
+ filling <code>buffer</code>.
+ @return The number of bytes written into the buffer. If
+ the return value is less than <code>bufferSize</code>, then there is
+ no more data.
+ @see PDEPSSetData
+ @since PI_PDFEDIT_READ_VERSION >= 0x00020000
+
+*/
+UNPROC(ASUns32, PDEPSGetData, (
+ IN PDEPS ps,
+ OUT ASUns8 *buffer,
+ IN ASUns32 bufferSize,
+ IN ASInt32 offset)
+ )
+
+/**
+ Gets a stream for the data. The data in the stream is decoded
+ (no filters). The caller must dispose of the stream.
+ @param ps IN/OUT An object of type PDEPS.
+ @return An object of type ASStm.
+ @see PDEPSSetDataStm
+ @since PI_PDFEDIT_READ_VERSION >= 0x00020000
+
+*/
+UNPROC(ASStm, PDEPSGetDataStm, (
+ IN PDEPS ps)
+ )
+/*------------------------------------------------------------------------
+ PDEFont methods.
+------------------------------------------------------------------------*/
+
+
+/**
+ Gets the attributes for a font object.
+ @param font IN/OUT A PDEFont whose attributes are found.
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDEFontAttrs
+ structure for the font attributes.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @exception peErrCantGetAttrs
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontGetNumCodeBytes
+
+ @note PDEFontGetAttrs() cannot fill in the <code>cantEmbed</code> and <code>protection</code>
+ fields. PDSysFontAttrs() can return this information to you for system fonts.
+
+ @note PDEFontGetAttrs() fills in the <code>fontBBox</code> portion of the PDEFontAttrs as
+ ASInt16 objects, even though the member says it is an ASFixedRect. Make sure to
+ properly convert those values using ASInt16ToFixed() so that you get the proper
+ ASFixedRect associated with that font.
+
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEFontGetAttrs, (
+ IN PDEFont font,
+ OUT PDEFontAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+/**
+ Gets the widths for a font object.
+ @param font IN/OUT A PDEFont whose widths are found.
+ @param widthsP IN/OUT (Filled by the method) A pointer to the widths
+ array. <code>widthsP</code> must have room for 256 values. The widths
+ are returned in character space (1000 EM units). An EM is
+ a typographic unit of measurement equal to the size of a
+ font. To convert to text space, divide the value returned
+ by <code>1000</code>. To convert to user space, multiply the text space
+ value by the font size.
+ @exception peErrCantGetWidths
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreateWithParams
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEFontGetWidths, (
+ IN PDEFont font,
+ OUT ASInt16 *widthsP)
+ )
+
+/**
+ Gets a Cos object for a PDEFont.
+ @param font IN/OUT A PDEFont whose Cos object is obtained.
+ @param cosObjP IN/OUT (Filled by the method) The Cos object corresponding
+ to <code>font</code>.
+ @exception genErrResourceLoadFailed
+ @exception peErrWrongPDEObjectType
+ @see PDEFontCreateFromCosObj
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEFontGetCosObj, (
+ IN PDEFont font,
+ OUT CosObj *cosObjP)
+ )
+
+/*------------------------------------------------------------------------
+ PDEColorSpace methods.
+------------------------------------------------------------------------*/
+
+/**
+ Gets the name of a color space object.
+ @param colorSpace IN/OUT A color space object.
+ @return The color space object's name. It supports all PDF 1.3 color
+ spaces, which include:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Type of names</TH><TH>Names</TH></TR>
+ <TR><TD>Device-dependent names</TD><TD><ul><li><code>DeviceCMYK</code></li><li><code>DeviceGray</code></li><li><code>DeviceN</code></li><li><code>DeviceRGB</code></li></ul></TD></TR>
+ <TR><TD>Device-independent names</TD><TD><ul><li><code>CalGray</code></li><li><code>CalRGB</code></li><li><code>Lab</code></li><li><code>ICCBased</code></li></ul></TD></TR>
+ <TR><TD>Special names</TD><TD><ul><li><code>Indexed</code></li><li><code>Pattern</code></li><li><code>Separation</code></li></ul></TD></TR>
+ </TABLE>
+
+ @exception peErrUnknownPDEColorSpace
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASAtom, PDEColorSpaceGetName, (
+ IN PDEColorSpace colorSpace)
+ )
+
+/**
+ Gets the CosObj representation of the color space object.
+
+ <p>For image masks, use PDEElementGetGState()
+ to obtain color information. </p>
+
+ @param colorSpace IN/OUT The color space whose Cos object is obtained.
+
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for the
+ color space.
+ @return The Cos object for <code>colorSpace</code>. Any color space that is in the
+ Resources dictionary of the page is returned as a Cos object.
+ @exception peErrWrongPDEObjectType
+
+ @note (For the Adobe PDF Library v1 only) If you get the
+ PDEColorSpace for an inline image and then get the CosObj for
+ that color space with PDEColorSpaceGetCosObj(), this CosObj
+ is limited. Cos objects that are the result of parsing inline
+ dictionaries in the PDF page contents are a special class
+ of Cos objects. You should never depend on these objects
+ to last for the lifetime of the document. You should extract
+ the information you need from the object immediately and
+ refer to it no further in your code.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEColorSpaceGetCosObj, (
+ IN PDEColorSpace colorSpace,
+ OUT CosObj *cosObjP)
+ )
+
+/**
+ Calculates the number of components in a color space.
+ @param colorSpace IN/OUT A color space object.
+ @return The number of components in <code>colorSpace</code>:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Color space</TH><TH>Return value</TH></TR>
+ <TR><TD>DeviceGray</TD><TD><code>1</code></TD></TR>
+ <TR><TD>CalGray</TD><TD><code>1</code></TD></TR>
+ <TR><TD>Separation</TD><TD><code>1</code></TD></TR>
+ <TR><TD>DeviceRGB</TD><TD><code>3</code></TD></TR>
+ <TR><TD>CalRGB</TD><TD><code>3</code></TD></TR>
+ <TR><TD>DeviceCMYK</TD><TD><code>4</code></TD></TR>
+ <TR><TD>Lab</TD><TD><code>4</code></TD></TR>
+ <TR><TD>DeviceN</TD><TD>The number of components dependent on the specific color space object.</TD></TR>
+ <TR><TD>ICCBased</TD><TD>The number of components dependent on the specific color space object.</TD></TR>
+ <TR><TD>Indexed</TD><TD><code>1</code></TD></TR>
+ </TABLE>
+
+ <p>Call PDEColorSpaceGetBaseNumComps() to get the number of components in the base color space. </p>
+
+ @exception peErrUnknownPDEColorSpace
+ @exception peErrWrongPDEObjectType
+ @see PDEColorSpaceGetBaseNumComps
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEColorSpaceGetNumComps, (
+ IN PDEColorSpace colorSpace)
+ )
+
+/**
+ Gets the name of the base color space. This is a helper
+ routine for indexed color spaces.
+
+ <p>Call this method to obtain the base color space and color
+ values for an uncolored pattern in PDFEdit. </p>
+
+ @param colorSpace The base color space.
+ @return The ASAtom for the name of the base color space. Use ASAtomGetString()
+ to obtain a C string for the ASAtom.
+ @exception peErrUnknownPDEColorSpace
+ @exception peErrWrongPDEObjectType
+ @see PDEColorSpaceGetBaseNumComps
+
+ Note that the base color values are in the color array in the
+ PDEColorValue field for stroke and fill of a PDEGraphicStateP.
+ Or, they are in the <code>colorObj2</code> object if the base color space
+ is DeviceN. To get the color values, a client gets the base
+ color space, determines the type and number of components
+ of the value, and looks them up in the PDEColorValue field.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(ASAtom, PDEColorSpaceGetBase, (
+ IN PDEColorSpace colorSpace)
+ )
+
+/**
+ Gets the highest index for the color lookup table for an
+ indexed color space. Since the color table is indexed from
+ zero to <code>hiVal</code>, the actual number of entries is <code>hiVal + 1</code>.
+
+ @param colorSpace IN/OUT An indexed color space.
+ @return The highest index (<code>hiVal</code>) in the color lookup table.
+ @exception peErrUnknownPDEColorSpace
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEColorSpaceGetHiVal, (
+ IN PDEColorSpace colorSpace)
+ )
+
+/**
+ Gets the component information for an indexed color space.
+
+ @param colorSpace IN/OUT The color space whose component information
+ table is obtained.
+ @param colorTableP IN/OUT (Filled by the method) The color lookup
+ table, which is <code>numComps * (hiVal + 1)</code> bytes long, where
+ <code>numComps</code> is the number of components in the base <code>colorSpace</code>.
+ Each entry in the table contains <code>numComps</code> bytes, and the
+ table is indexed from <code>0</code> to <code>hiVal</code>, where <code>hiVal</code> is the highest
+ index in the color table. The table is indexed from <code>0</code> to
+ <code>hival</code>, thus the table contains <code>hival + 1</code> entries.
+ @exception peErrUnknownPDEColorSpace
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEColorSpaceGetCTable, (
+ IN PDEColorSpace colorSpace,
+ OUT ASUns8 *colorTableP)
+ )
+
+/*------------------------------------------------------------------------
+ Get Type.
+------------------------------------------------------------------------*/
+
+/**
+ Gets the type of an element.
+ @param obj IN/OUT The element whose type is obtained.
+ @return The object type, which is one of PDEType.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEObjectGetType, (
+ IN PDEObject obj)
+ )
+
+/*------------------------------------------------------------------------
+ Acquire and Release methods.
+------------------------------------------------------------------------*/
+
+/**
+ Increments the reference count for an object.
+ @param obj IN/OUT The element whose count is incremented.
+ @exception peErrWrongPDEObjectType
+ @see PDERelease
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEAcquire, (
+ IN PDEObject obj)
+ )
+
+/**
+ Decrements the reference count for the object. If the count
+ becomes zero, the object is destroyed.
+
+ <p>Do not call PDERelease() on PDEContent that you acquired with
+ PDPageAcquirePDEContent(); call PDPageReleasePDEContent() instead. </p>
+ @param obj IN/OUT The element released.
+ @see PDEAcquire
+
+ @note Objects should only be disposed of with PDERelease()
+ if the method by which they were obtained incremented the
+ reference count for the object. In general, methods that
+ <i>get</i> an object do not increment the reference count. Methods
+ that increment the reference count typically contain the
+ word <code>acquire</code> or <code>create</code> in the method name and specifically
+ state that you must release the object.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDERelease, (
+ IN PDEObject obj)
+ )
+
+/*------------------------------------------------------------------------
+ Dump methods.
+------------------------------------------------------------------------*/
+
+/**
+ The object, its children and attributes are dumped. The
+ dump contains information about each individual object.
+ The output for child elements is indented with respect to
+ their parents.
+ <ul>
+ <li> The information for each object is <code>char*</code> - the string
+ describing Object Type. (See PDEObjectGetType()). </li>
+ <li> The number representing Object Type. (See PEExpT.h: PDEType <code>enum</code>). </li>
+ <li> The object reference count. </li>
+ <li> The memory location for the object. </li>
+ </ul>
+
+ @param obj The PDEObject to dump.
+ @param levels The depth of children to dump.
+ @param proc A callback with the dump information; it may
+ be called more than once per object.
+ @param clientData Provided by the caller as the parameter
+ of the same name for <code>proc</code>.
+ @exception genErrBadParm
+ @see PDELogDump
+ @ingroup Enumerators
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEObjectDump, (
+ IN PDEObject obj,
+ IN ASInt32 levels,
+ IN PDEObjectDumpProc proc,
+ IN void *clientData)
+ )
+
+/**
+ Enumerates the PDEObject objects. This is useful when looking for
+ orphaned objects.
+ @param proc A callback to call once for each PDEObject.
+
+ @param clientData A pointer to user-supplied data to pass
+ to <code>proc</code> each time it is called.
+ @exception peErrWrongPDEObjectType
+ @exception peErrUnknownPDEColorSpace
+ @exception genErrBadParm
+ @see PDEObjectDump
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDELogDump, (
+ IN PDEObjectDumpProc proc,
+ IN void *clientData)
+ )
+
+/**
+ Enumerates the table of attributes. This method enumerates
+ the shared resource objects. It is useful when looking for
+ orphaned attributes.
+ @param enumProc IN/OUT A callback to call for each attribute.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @exception genErrBadParm
+ @ingroup Enumerators
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEAttrEnumTable, (
+ IN PDEAttrEnumProc enumProc,
+ IN void *clientData)
+ )
+/*------------------------------------------------------------------------
+ Methods added after version 0.2
+------------------------------------------------------------------------*/
+
+
+/**
+ Gets a Cos object for a PDEExtGState.
+ @param extGState IN/OUT A PDEExtGState whose Cos object is obtained.
+
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for <code>extGState</code>.
+
+ @exception peErrWrongPDEObjectType
+ @see PDEExtGStateCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEExtGStateGetCosObj, (
+ IN PDEExtGState extGState,
+ OUT CosObj *cosObjP)
+ )
+
+/**
+ Gets the quad bounding the specified text run or character.
+
+ <p>The advance portion of the quad is based on the left side
+ bearing and advance width. </p>
+
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose quad is found.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ <p>In addition, if the kPDETextBounding flag
+ is set, PDETextGetQuad() uses the font descriptor's <code>FontBBox</code>,
+ which is the smallest rectangle that encloses all characters
+ in the font. The advance portion is based on the x-coordinates
+ of the left and right sides of <code>FontBBox</code> and the advance
+ width. </p>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param quadP IN/OUT (Filled by the method) A pointer to ASFixedQuad
+ that bounds the specified character or text run.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDETextGetQuad, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar, kPDETextBounding */
+ IN ASInt32 index,
+ OUT ASFixedQuadP quadP)
+ )
+
+/**
+ Gets the Marked Content tag for a PDEPlace.
+ @param pdePlace IN/OUT The place whose Marked Content tag is obtained.
+
+ @return A tag for <code>pdePlace</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEPlaceSetMCTag
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASAtom, PDEPlaceGetMCTag, (
+ IN PDEPlace pdePlace)
+ )
+
+/**
+ Gets the Marked Content dictionary for a PDEPlace.
+ @param pdePlace IN/OUT The place whose Marked Content dictionary
+ is obtained.
+ @param placeDictP IN/OUT (Filled by the method) A pointer to the
+ Marked Content dictionary; may be <code>NULL</code>.
+ @param isInline IN/OUT (Filled by the method) If <code>true</code>, the Marked
+ Content dictionary is inline; may be <code>NULL</code>.
+ @return <code>true</code> if dictionary is obtained, <code>false</code> if no dictionary is
+ present.
+ @exception peErrWrongPDEObjectType
+ @see PDEPlaceSetDict
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDEPlaceGetDict, (
+ IN PDEPlace pdePlace,
+ OUT CosObj *placeDictP,
+ OUT ASBool *isInline)
+ )
+
+/**
+ Gets the Marked Content tag for a container.
+ @param pdeContainer IN/OUT A container.
+ @return The Marked Content tag of <code>pdeContainer</code>. It returns ASAtomNull if
+ <code>pdeContainer</code> has no Marked Content tag.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEContainerCreate
+ @see PDEContainerSetMCTag
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASAtom, PDEContainerGetMCTag, (
+ IN PDEContainer pdeContainer)
+ )
+
+/**
+ Gets the Marked Content dictionary for a container.
+ @param pdeContainer IN/OUT A container.
+ @param placeDictP IN/OUT (Filled by the method) The Marked Content
+ dictionary for <code>pdeContainer</code>. <code>NULL</code> if <code>pdeContainer</code> has no
+ Marked Content dictionary.
+ @param isInline IN/OUT (Filled by the method) <code>true</code> if the dictionary
+ is inline, <code>false</code> otherwise. It is undefined if <code>pdeContainer</code> has
+ no Marked Content dictionary.
+ @return <code>true</code> if <code>pdeContainer</code> has a Marked Content dictionary, <code>false</code>
+ otherwise.
+ @exception peErrWrongPDEObjectType
+ @exception cosErrInvalidObj
+ @see PDEContainerSetDict
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDEContainerGetDict, (
+ IN PDEContainer pdeContainer,
+ OUT CosObj *placeDictP,
+ OUT ASBool *isInline)
+ )
+
+/**
+ Gets the PDEContent for a PDEContainer.
+
+ @note This method does not change the reference count of
+ the returned PDEContent.
+ @param pdeContainer IN/OUT The container whose content is obtained.
+
+ @return The PDEContent for the <code>pdeContainer</code>.
+ @exception pdErrOpNotPermitted
+ @exception peErrWrongPDEObjectType
+ @see PDEContainerSetContent
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEContent, PDEContainerGetContent, (
+ IN PDEContainer pdeContainer)
+ )
+
+/**
+ Gets the number of components in the base color space of
+ an indexed color space.
+
+ <p>For example, for <code>[/ Indexed / DeviceRGB...]</code>, the number
+ of components is <code>3</code>. </p>
+
+ @param colorSpace IN/OUT The indexed color space.
+ @return The number of components in <code>colorSpace</code>.
+ @exception peErrUnknownPDEColorSpace
+ @exception peErrWrongPDEObjectType
+ @see PDEColorSpaceGetBase
+ @see PDEColorSpaceGetNumComps
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt32, PDEColorSpaceGetBaseNumComps, (
+ IN PDEColorSpace colorSpace)
+ )
+
+/**
+ Fills out a PDEGraphicStateP structure with the default
+ graphic state.
+ @param stateP (Filled by the method) A pointer to a PDEGraphicStateP
+ structure with the default graphic state.
+ @param stateSize The size of the <code>stateP</code> structure in bytes.
+
+ @note Non-NULL objects in the graphic state, such as the
+ fill and stroke color spaces, have their reference counts
+ incremented by this method. Be sure to release these non-
+ NULL objects when disposing of <code>stateP</code>.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void , PDEDefaultGState, (
+ OUT PDEGraphicStateP stateP,
+ IN ASInt32 stateSize)
+ )
+
+/**
+ Gets a Cos object corresponding to a pattern object.
+ @param pattern IN/OUT The pattern whose Cos object is obtained.
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for the
+ pattern.
+ @see PDEPatternCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEPatternGetCosObj, (
+ IN PDEPattern pattern,
+ OUT CosObj *cosObjP)
+ )
+
+/**
+ Enumerates all the PDEElements in a given stream. It is similar
+ to PDEContentCreateFromCosObj(), but provides enumeration
+ instead of a list of elements.
+
+ <p>If marked content is not ignored, each PDEContainer contains
+ a PDEContent list within itself. </p>
+
+ @param contents IN/OUT A Cos object that is the source for the content
+ stream. It may be page contents, a Form XObject, a Type 3 font
+ CharProc, or an appearance object from an annotation.
+ @param resources IN/OUT The object's Resources dictionary. If
+ the Form or Type 3 font or appearance dictionary contains
+ a Resources dictionary, this dictionary must be passed in
+ <code>resources</code>. Otherwise, it must be the page resources object
+ of the page containing the Form or Type 3 font contents
+ object.
+ @param flags IN/OUT Flags from PDEEnumElementsFlags.
+ @param enumProc IN/OUT A user-supplied callback to call once for
+ each top-level element. Note that the element in <code>enumProc</code>
+ may only be valid for this method. Use PDEAcquire() if you
+ need to hold on to the element longer than the scope of
+ <code>enumProc</code>.
+ @param enumProcClientData IN/OUT A pointer to user-supplied data
+ to pass to <code>enumProc</code> each time it is called.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception peErrPStackUnderflow
+ @exception peErrCantGetImageDict
+ @see PDEContentCreateFromCosObj
+ @see PDEContentGetNumElems
+ @see PDEContentGetElem
+ @ingroup Enumerators
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+NPROC (void, PDEEnumElements, (
+ IN const CosObj *contents,
+ IN const CosObj *resources,
+ IN ASUns32 flags,
+ IN PDEElementEnumProc enumProc,
+ IN void *enumProcClientData)
+ )
+
+/*------------------------------------------------------------------------
+ Methods added after version 0.7
+------------------------------------------------------------------------*/
+
+/**
+ Gets the sum of the widths of <code>len</code> characters from a string
+ of single or multi-byte characters.
+ @param font A PDEFont object returned from one of the
+ PDEFontCreate methods.
+ @param text A pointer to a string of characters.
+ @param len The number of characters in the string.
+ @return The width of the text string in EM space. (In EM space, the width
+ of 'M' is about 1000 EM units).
+ @exception genErrNoMemory
+ @exception pdErrBadResMetrics
+ @exception genErrResourceLoadFailed
+ @exception peErrWrongPDEObjectType
+ @see PDEFontGetNumCodeBytes
+ @see PDEFontIsMultiByte
+ @see PDEFontGetOneByteEncoding
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(ASInt32, PDEFontSumWidths, (
+ IN PDEFont font,
+ IN ASUns8 *text,
+ IN ASInt32 len)
+ )
+
+/**
+ Gets the number of bytes comprising the next code in a string
+ of single or multi-byte character codes.
+ @param font IN/OUT A PDEFont object returned from one of the <code>PDEFontCreate</code>
+ methods.
+ @param text IN/OUT A pointer to a string of characters.
+ @param len IN/OUT The length, in bytes, of the string of characters,
+ starting with the character pointed to by text.
+ @return The number of bytes in the next character code pointed to by
+ text.
+ @exception genErrNoMemory
+ @see PDEFontIsMultiByte
+ @see PDEFontSumWidths
+ @see PDEFontGetOneByteEncoding
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASInt16, PDEFontGetNumCodeBytes, (
+ IN PDEFont font,
+ IN ASUns8 *text,
+ IN ASInt32 len)
+ )
+
+/**
+ Gets the value of a color component of a PDEDeviceNColors
+ color space.
+ @param colors IN/OUT A PDEDeviceNColors object returned by PDEDeviceNColorsCreate().
+
+ @param index IN/OUT The index of the color component to return.
+ @return The value of the requested color component.
+ @exception genErrBadParm
+ @see PDEDeviceNColorsCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASFixed, PDEDeviceNColorsGetColorValue, (
+ IN PDEDeviceNColors colors,
+ IN ASInt32 index)
+ )
+
+/**
+ Tests whether a font contains any multi-byte characters.
+
+ @param font IN/OUT A PDEFont object returned from one of the <code>PDEFontCreate</code>
+ methods to test.
+ @return <code>true</code> if the font contains any multi-byte characters, <code>false</code>
+ otherwise.
+ @see PDEFontGetNumCodeBytes
+ @see PDEFontSumWidths
+ @see PDEFontGetOneByteEncoding
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+NPROC (ASBool, PDEFontIsMultiByte, (
+ IN PDEFont font)
+ )
+
+/**
+ Gets the number of bytes occupied by the character code
+ or text run.
+ @param pdeText IN/OUT A PDEText object returned from one of the
+ <code>PDETextCreate</code> methods whose text is examined.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @return The number of bytes occupied by the text run or character.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEFontGetNumCodeBytes
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+NPROC (ASInt32, PDETextGetNumBytes, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun or kPDETextChar */
+ IN ASInt32 index)
+ )
+
+/**
+ Gets the PDEContent for a PDEGroup.
+
+ @note This method does not change the reference count of
+ the returned PDEContent.
+ @param pdeGroup IN/OUT The group whose content is obtained.
+ @return The PDEContent in <code>pdeGroup</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEGroupSetContent
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEContent, PDEGroupGetContent, (
+ IN PDEGroup pdeGroup)
+ )
+
+/**
+ For a given PDEClip, this enumerates all of the PDEElement objects in
+ a flattened manner. In other words, PDEContainer objects and PDEGroup objects
+ nested in the PDEClip will not be handed back, but any PDEPath objects
+ and PDEText objects nested in them will be. Additionally, PDEPlace
+ objects inside the PDEClip are not returned.
+ @param clip The PDEClip to enumerate.
+ @param enumProc Called with each flattened element. Enumeration
+ continues until all elements have been enumerated, or until
+ <code>enumProc</code> returns <code>false</code>.
+ @param enumProcClientData A pointer to user-supplied data
+ to pass to <code>enumProc</code> each time it is called.
+ @return Returns the value of <code>enumProc</code>. It returns <code>true</code> if successful, <code>false</code> otherwise.
+
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEClipCreate
+ @see PDEClipGetElem
+ @see PDEClipGetNumElems
+ @ingroup Enumerators
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(ASBool, PDEClipFlattenedEnumElems, (
+ IN PDEClip clip,
+ IN PDEClipEnumProc enumProc,
+ IN void *enumProcClientData)
+ )
+
+/**
+ Tests whether a point is on an element.
+ @param elem IN/OUT The element to test. If PDEElement is a PDEText
+ or PDEImage, it uses the bounding box of the PDEElement
+ to make the check. If the PDEElement is a PDEPath and it
+ is stroked, it checks if the point is on the path. If the
+ PDEElement is a PDEPath and it is filled, it checks if the
+ point is in the fill area, taking into consideration whether
+ it is filled using the non-zero winding number rule or the
+ even-odd rule.
+ @param point IN/OUT The point, specified in user space coordinates.
+
+ @return <code>true</code> if the point is on the element, <code>false</code> otherwise.
+ @exception peErrWrongPDEObjectType
+ @see PDEElementIsAtRect
+ @see PDETextIsAtPoint
+ @see PDETextIsAtRect
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDEElementIsAtPoint, (
+ IN PDEElement elem,
+ IN ASFixedPoint point)
+ )
+
+/**
+ Tests whether any part of a rectangle is on an element.
+
+ @param elem IN/OUT The element to test. If PDEElement is a PDEText
+ or PDEImage, it uses the bounding box of the PDEElement
+ to make the check. If the PDEElement is a PDEPath and it
+ is stroked, it checks if the rectangle is on the path. If
+ the PDEElement is a PDEPath and it is filled, it checks
+ if the rectangle is in the fill area, taking into consideration
+ whether it is filled using the non-zero winding number rule
+ or the even-odd rule.
+ @param rect IN/OUT The rectangle, specified in user space coordinates.
+
+ @return <code>true</code> if any part of the rectangle is on the element, <code>false</code>
+ otherwise.
+ @exception peErrWrongPDEObjectType
+ @see PDEElementIsAtPoint
+ @see PDETextIsAtPoint
+ @see PDETextIsAtRect
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDEElementIsAtRect, (
+ IN PDEElement elem,
+ IN ASFixedRect rect)
+ )
+
+/**
+ Tests whether a point is on specified text. It checks if the
+ point is in a bounding box for the PDEText.
+ @param pdeText IN/OUT The text to test.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param point IN/OUT The point, specified in user space coordinates.
+
+ @return <code>true</code> if the point is on the text, <code>false</code> otherwise.
+ @see PDEElementIsAtPoint
+ @see PDEElementIsAtRect
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDETextIsAtPoint, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ IN ASFixedPoint point)
+ )
+
+/**
+ Tests whether any part of a rectangle is on the specified
+ text.
+ @param pdeText IN/OUT The text to test.
+ @param flags IN/OUT A PDETextFlags flag that specifies whether
+ index refers to the character offset from the beginning
+ of the text object or the index of the text run in the text
+ object. It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param rect IN/OUT The rectangle, specified in user space coordinates.
+
+ @return <code>true</code> if the text is on the rectangle, <code>false</code> otherwise.
+ @see PDEElementIsAtPoint
+ @see PDEElementIsAtRect
+ @see PDETextIsAtPoint
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDETextIsAtRect, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ IN ASFixedRect rect)
+ )
+
+/**
+ Gets an array of delta encodings for the given one byte
+ PDEFont.
+ @param font IN/OUT A PDEFont object returned from one of the <code>PDEFontCreate</code>
+ methods.
+ @param encodingDelta IN/OUT (Filled by the method) A pointer to
+ an ASAtom array that is filled with the delta encodings
+ for font. Each entry is the ASAtom for a glyph name that
+ differs from the base encoding. See Section 5.5.5 in the
+ <i>PDF Reference</i> for more information about font encodings.
+ The array must be allocated to hold 256 entries.
+ @return <code>true</code> if <code>encodingDelta</code> is filled, <code>false</code> otherwise.
+ @exception genErrNoMemory
+ @see PDEFontIsMultiByte
+ @see PDEFontSumWidths
+ @see PDEFontGetNumCodeBytes
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(ASBool, PDEFontGetOneByteEncoding, (
+ IN PDEFont font,
+ OUT ASAtom *encodingDelta)
+ )
+
+
+/**
+ Gets the CosObj for a PDEShading.
+ @param shading IN/OUT A smooth shading object.
+ @param cosObjP IN/OUT The Cos dictionary corresponding to shading.
+
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEShadingGetCosObj, (
+ IN PDEShading shading,
+ OUT CosObj *cosObjP)
+ )
+
+/**
+ Gets the operator name of an unknown operator.
+ @param pdeUnknown IN/OUT Unknown element whose operator name is
+ obtained.
+ @return An ASAtom for the name of the operator for <code>pdeUnknown</code>.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(ASAtom, PDEUnknownGetOpName, (
+ IN PDEUnknown pdeUnknown)
+ )
+
+/**
+ Gets a default color space from a PDEContent object.
+
+ <p>See Section 4.5.4 in the <i>PDF Reference</i> for more information
+ about default color spaces. </p>
+
+ @note This method does not change the reference count of
+ the returned PDEColorSpace.
+ @param pdeContent IN/OUT A content object.
+ @param colorSpaceName IN/OUT An ASAtom for the name of the desired
+ color space. It must be an ASAtom for one of DefaultRGB, DefaultCMYK,
+ or DefaultGray.
+ @return The desired color space in <code>pdeContent</code>. It returns <code>NULL</code> if <code>colorSpaceName</code>
+ does not correspond to a known default, such as DefaultRGB.
+
+ @see PDEContentGetNumElems
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEColorSpace, PDEContentGetDefaultColorSpace, (
+ IN PDEContent pdeContent,
+ IN ASAtom colorSpaceName)
+ )
+
+/**
+ Gets the decode array from the attributes of the image.
+ This array specifies the parameters used with the array
+ of filters used to decode the image. This should be called
+ first with a <code>NULL</code> <code>decode</code> to obtain the number of elements that
+ may be returned so that a properly sized array can be allocated
+ for a subsequent call. There are two decode entries per colorant in normal use.
+ @param image The image whose decode array is obtained.
+
+ @param decode (Filled by the method) A pointer to the <code>decode</code>
+ array. If it is <code>NULL</code>, the number of <code>decode</code> elements required is
+ returned.
+ @param decodeSize The number of elements in <code>decode</code>.
+ @return The number of elements in the <code>decode</code> array.
+ @see PDEImageSetDecodeArray
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(ASUns32, PDEImageGetDecodeArray, (
+ IN PDEImage image,
+ OUT ASFixed *decode,
+ IN ASUns32 decodeSize)
+ )
+/* APIs added for 5.0 start here */
+
+/**
+ Gets the marked content tag associated with a PDEBeginContainer
+ object.
+ @param pdeBeginContainer IN/OUT A PDEBeginContainer object.
+ @return The mark content tag.
+ @exception peErrWrongPDEObjectType if pdeBeginContainer is <code>NULL</code> or
+ not the right type.
+ @see PDEBeginContainerSetMCTag
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASAtom, PDEBeginContainerGetMCTag, (
+ IN PDEBeginContainer pdeBeginContainer)
+ )
+
+/**
+ Gets the property list dictionary associated with a PDEBeginContainer
+ object. The property list is stored in a Cos dictionary.
+ @param pdeBeginContainer IN/OUT A PDEBeginContainer object.
+ @param dictP IN/OUT (Filled by the method) The property list associated
+ with the PDEBeginContainer.
+ @param isInlineP IN/OUT (Filled by the method) If <code>true</code>, the dictionary
+ is emitted into the page content stream inline.
+ @return <code>true</code> if dictP points to a Cos dictionary; <code>false</code> otherwise.
+
+ @exception peErrWrongPDEObjectType if <code>pdeBeginContainer</code> is <code>NULL</code> or
+ not the right type.
+
+ @note Either <code>dictP</code> or <code>isInlineP</code> may be <code>NULL</code> if that information
+ is not required.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASBool, PDEBeginContainerGetDict, (
+ IN PDEBeginContainer pdeBeginContainer,
+ OUT CosObj *dictP,
+ OUT ASBool *isInlineP)
+ )
+
+/*------------------------------------------------------------------------
+ PDESoftMask Methods added to support Transparency
+------------------------------------------------------------------------*/
+
+/**
+ Gets the associated CosObj of the soft mask.
+ @param pdeSoftMask IN/OUT The soft mask.
+ @param cosObjP IN/OUT (Filled by the method) A pointer to the
+ Cos object.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDESoftMaskGetCosObj, (
+ IN PDESoftMask pdeSoftMask,
+ OUT CosObj *cosObjP)
+ )
+
+/**
+ Acquires the PDEForm that defines the soft mask.
+ <p>Call PDERelease() to dispose of the PDEForm when finished with it. </p>
+ @param pdeSoftMask IN/OUT An object of type PDESoftMask.
+ @param matrixP IN/OUT A matrix defining the transformation from
+ coordinate space to user space.
+ @return The XObject form of the soft mask.
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEForm, PDESoftMaskAcquireForm, (
+ IN PDESoftMask pdeSoftMask,
+ IN ASFixedMatrixP matrixP)
+ )
+
+/**
+ Gets the array of color values of the backdrop color. Given
+ a pointer to an array and the length of the array, it copies
+ the color values to that array and returns the number of
+ values copied. If the pointer to the array is <code>NULL</code>, the
+ number of color values is returned.
+ @param pdeSoftMask IN/OUT An object of type PDESoftMask.
+ @param pColorValues IN/OUT (Filled by the method) A pointer to an
+ array of color values. If it is <code>NULL</code>, the number of color values
+ is returned.
+ @param numValues IN/OUT The length of the array <code>pColorValues</code>.
+ @return The number of values copied.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASInt32, PDESoftMaskGetBackdropColor, (
+ IN PDESoftMask pdeSoftMask,
+ IN ASFixed *pColorValues,
+ IN ASInt32 numValues)
+ )
+
+/**
+ Gets the transfer function as a CosObj.
+ @param pdeSoftMask IN/OUT The soft mask.
+ @return The transfer function as a CosObj.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( CosObj, PDESoftMaskGetTransferFunction, (
+ IN PDESoftMask pdeSoftMask)
+ )
+
+/*------------------------------------------------------------------------
+ PDEXGroup Methods added to support Transparency
+------------------------------------------------------------------------*/
+
+/**
+ Gets the CosObj of the transparency group.
+ @param pdeXGroup The transparency group object.
+ @param cosObjP (Filled by the method) A pointer to the Cos
+ object.
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC( void, PDEXGroupGetCosObj, (
+ IN PDEXGroup pdeXGroup,
+ OUT CosObj *cosObjP)
+ )
+
+
+/**
+ Gets the knockout boolean value of the transparency group.
+
+ @param pdeXGroup The transparency group object.
+ @return The knockout value.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC( ASBool, PDEXGroupGetKnockout, (
+ IN PDEXGroup pdeXGroup)
+ )
+
+/**
+ Gets the isolated boolean value of the transparency group.
+
+ @param pdeXGroup The transparency group object.
+ @return <code>true</code> if the transparency group is isolated; <code>false</code> otherwise.
+
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC( ASBool, PDEXGroupGetIsolated, (
+ IN PDEXGroup pdeXGroup)
+ )
+
+/**
+ Acquires the color space of the transparency group.
+ <p>Call PDERelease() to dispose of the PDEColorSpace when finished with it. </p>
+ @param pdeXGroup The transparency group object.
+ @return The color space; otherwise it returns <code>NULL</code>.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC( PDEColorSpace, PDEXGroupAcquireColorSpace, (
+ IN PDEXGroup pdeXGroup)
+ )
+
+/**
+ Acquires the transparency group dictionary of the XObject
+ form.
+ <p>Call PDERelease() to dispose of the PDEXGroup when finished with it. </p>
+ @param pdeForm IN/OUT The from.
+ @return The transparency group object.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEXGroup, PDEFormAcquireXGroup, (
+ IN PDEForm pdeForm)
+ )
+
+/**
+ Determines whether the XObject form has a Transparency XGroup
+
+ @param pdeForm IN/OUT The form.
+ @return <code>true</code> if the XObject form has a Transparency XGroup.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASBool, PDEFormHasXGroup, (
+ IN PDEForm pdeForm)
+ )
+
+/**
+ Gets the graphics state information for an element.
+ @param pdeElement The PDEElement whose graphics state
+ is to be obtained.
+ @param stateP (Filled by the method) A pointer to a PDEGraphicStateP
+ structure that contains graphics state information for <code>pdeElement</code>.
+
+ @param stateSize The size of the <code>stateP</code> buffer. Set it to <code>sizeof(PDEGraphicState)</code>.
+ @return <code>true</code> if the element has a graphics state, <code>false</code>
+ otherwise.
+ @exception genErrBadParm
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC(ASBool, PDEElementHasGState, (
+ IN PDEElement pdeElement,
+ OUT PDEGraphicStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/*------------------------------------------------------------------------
+ Methods added to support ExtGState
+------------------------------------------------------------------------*/
+
+/**
+ Returns the overprint mode used by this graphics state.
+
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return The Cos integer value.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASInt32, PDEExtGStateGetOPM, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns whether overprint is enabled for painting operations
+ other than stroking.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return Returns the value of the / op key in the ExtGState dictionary.
+ If the value is not found, the default value of <code>false</code> is
+ returned.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASBool, PDEExtGStateGetOPFill, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns whether overprint is enabled for stroke painting
+ operations.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return Returns the value of the / OP key in the ExtGState dictionary.
+ If the value is not found, the default value of <code>false</code> is
+ returned.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASBool, PDEExtGStateGetOPStroke, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns the opacity value for painting operations other
+ than stroking.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return Returns the value of the / ca key in the ExtGState dictionary.
+ If the value is not found, the default value of <code>1</code> is returned.
+
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASFixed, PDEExtGStateGetOpacityFill, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns the opacity value for stroke painting operations
+ for paths and glyph outlines.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return Returns the value of the / CA key in the ExtGState dictionary.
+ If the value is not found, the default value of <code>1</code> is returned.
+
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASFixed, PDEExtGStateGetOpacityStroke, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns the blend mode for the color composite for each
+ object painted. The following are valid names:
+
+ <ul>
+ <li>Compatible</li>
+ <li>Normal</li>
+ <li>Multiply</li>
+ <li>Screen</li>
+ <li>Difference</li>
+ <li>Darken</li>
+ <li>Lighten</li>
+ <li>ColorDodge</li>
+ <li>ColorBurn</li>
+ <li>Exclusion</li>
+ <li>HardLight</li>
+ <li>Overlay</li>
+ <li>SoftLight</li>
+ <li>Luminosity</li>
+ <li>Hue</li>
+ <li>Saturation</li>
+ <li>Color</li>
+ </ul>
+
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return If the value has not been set, a value of Compatible is returned. See above.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASAtom, PDEExtGStateGetBlendMode, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns the value of the Alpha Is Shape (AIS) member of
+ the graphics state. If AIS is <code>true</code>, the sources of alpha
+ are treated as shape; otherwise they are treated as opacity
+ values. If the value is not set, the default value of <code>false</code>
+ is returned.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return See above.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASBool, PDEExtGStateGetAIS, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns whether the graphics state contains a soft mask.
+
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return Returns <code>true</code> if the ExtGState dictionary contains the / SMask key;
+ otherwise <code>false</code> is returned.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASBool, PDEExtGStateHasSoftMask, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Acquires the soft mask of the extended graphic state.
+ <p>Call PDERelease() to dispose of the PDESoftMask when finished with it. </p>
+ @param pdeExtGState The extended graphics state object.
+ @return The soft mask or <code>NULL</code> if the ExtGState dictionary does not
+ contain the SMask key.
+ @exception peErrWrongPDEObjectType if pdeExtGState is <code>NULL</code> or is not
+ of type
+ @exception kPDEExtGState.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC( PDESoftMask, PDEExtGStateAcquireSoftMask, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Checks whether the image has a soft mask.
+ @param image IN/OUT An object of type PDEImage.
+ @return <code>true</code> if the soft mask exists, <code>false</code> otherwise.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASBool, PDEImageHasSMask, (
+ IN PDEImage image)
+ )
+
+/**
+ Gets the soft mask for an image. Use PDERelease() to dispose
+ of the object when it is no longer referenced.
+ @param image An object of type PDEImage.
+ @return An object of type PDEImage.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC(PDEImage, PDEImageGetSMask, (
+ IN PDEImage image)
+ )
+
+/**
+ Gets the matte array for the image XObject.
+ @param image IN/OUT The image XObject.
+ @param matte IN/OUT (Filled by the method) An array of values.
+
+ @param numComp IN/OUT The number of values in <code>matte</code>.
+ @return The number of values copied.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASUns32, PDEImageGetMatteArray, (
+ IN PDEImage image,
+ OUT ASFixed *matte,
+ IN ASUns32 numComp)
+ )
+
+/**
+ Returns the text state of a character or a text element.
+
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose text state is found.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param stateP IN/OUT (Filled by the method) A pointer to a PDETextState
+ structure to fill with the text state of the specified character
+ or text run.
+ @param stateSize IN/OUT The size of the <code>stateP</code> buffer in bytes.
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @see PDETextRunSetTextState
+ @see PDETextGetTextState
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDETextGetState, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT PDETextStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Returns whether text knockout is enabled in the graphics
+ state.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return Returns the value of the / TK key in the ExtGState dictionary.
+ If the value is not found, the default value of <code>true</code> is
+ returned.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASBool, PDEExtGStateGetTK, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Returns writing mode. <code>0</code> for horizontal writing and <code>1</code> for
+ vertical writing.
+ @param sysEnc IN/OUT An object of type PDSysEncoding.
+ @return <code>0</code> for horizontal writing and <code>1</code> for vertical writing.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASInt16, PDSysEncodingGetWMode, (
+ IN PDSysEncoding sysEnc)
+ )
+
+/**
+ Returns <code>true</code> for Identity-H or Identity-V encoding, <code>false</code>
+ otherwise.
+ @param sysEnc IN/OUT An object of type PDSysEncoding.
+ @return See above.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASBool, PDSysEncodingIsIdentity, (
+ IN PDSysEncoding sysEnc)
+ )
+
+/**
+ Returns <code>true</code> for CMap encoding, <code>false</code> otherwise.
+ @param sysEnc IN/OUT An object of type PDSysEncoding.
+ @return See above.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(ASBool, PDSysEncodingIsMultiByte, (
+ IN PDSysEncoding sysEnc)
+ )
+
+/**
+ Returns whether stroke adjustment is enabled in the graphics
+ state.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @return Returns the value of the / SA key in the ExtGState dictionary.
+ If the value is not set, the default value of <code>false</code> is returned.
+
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASBool, PDEExtGStateGetSA, (
+ IN PDEExtGState pdeExtGState)
+ )
+
+/**
+ Gets the soft mask name.
+ @param pdeSoftMask IN/OUT The soft mask.
+ @return The soft mask name if it is a name; it returns ASAtomNull otherwise.
+
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC( ASAtom, PDESoftMaskGetName, (
+ IN PDESoftMask pdeSoftMask)
+ )
+
+/**
+ Returns the matrix of a character or a text element. Unlike
+ PDETextGetTextMatrix(), this function does not take <code>fontSize</code>,
+ <code>hScale</code>, and <code>textRise</code> in the <code>textState</code> into account.
+ @param pdeText IN/OUT A text object containing a character or text
+ run whose graphics state is found.
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param matrixP IN/OUT (Filled by the method) An ASFixedMatrixP that
+ holds the matrix of the specified character or text run.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetTextMatrix
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDETextGetMatrix, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ OUT ASFixedMatrixP matrixP)
+ )
+
+/* BEGIN Optional Content API calls */
+
+/**
+ Gets an optional-content membership dictionary (OCMD) object
+ associated with the element. The element must be a PDEForm,
+ PDEImage (XObject image), or PDEContainer. If it is not
+ one of these, the method returns <code>NULL</code>.
+ <ul>
+ <li> If the element is a PDEForm or PDEImage, the method returns
+ the dictionary attached to the element's Cos XObject dictionary.</li>
+ <li> If the element is a PDEContainer, and it is for optional
+ content, the method returns the dictionary. If it is not
+ for optional content, the method returns <code>NULL</code>. </li>
+ </ul>
+ @param elem The element from which the dictionary is obtained.
+ @return The dictionary object, or <code>NULL</code> if the element is not a PDEForm,
+ PDEImage (XObject image), or PDEContainer, or if it is a container
+ that is not for optional content.
+ @see PDAnnotGetOCMD
+ @see PDEElementSetOCMD
+ @see PDEElementRemoveOCMD
+ @see PDOCMDFindOrCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC( PDOCMD, PDEElementGetOCMD, (PDEElement elem) )
+
+/**
+ Tests whether an element is visible in a given content and
+ optional-content context. It traverses the content to find
+ the first occurrence of the element, in the supplied content
+ and in all nested contents. It returns <code>true</code> if the first occurrence
+ of the element is visible in the context, taking into account
+ the context's NonOCDrawing and PDOCDrawEnumType values.
+
+ <p>The content can be <code>NULL</code>. In this case: </p>
+ <ul>
+ <li> If the element is a PDEForm, PDEImage, or PDEContainer,
+ the method checks the object to see if it has an optional-content
+ membership dictionary (OCMD) attached to it. If so, the
+ method returns <code>true</code> if the object is visible, without considering
+ whether the PDEContent that the element belongs to is visible. </li>
+ <li> If the element is not one of these types, the method returns
+ <code>true</code>. </li>
+ </ul>
+ @param elem The element to test.
+ @param content The content containing the element.
+ @param ocContext The optional-content context in which
+ the element is tested.
+ @return Returns <code>true</code> if the element is visible in the given content
+ and context, <code>false</code> if it is hidden.
+ @see PDEElementGetAllVisibilities
+ @see PDEElementMakeVisible
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC( ASBool, PDEElementIsCurrentlyVisible, (PDEElement elem, PDEContent content, PDOCContext ocContext) )
+
+/**
+ Tests whether all occurrences of the element are visible
+ in a given content and optional-content context. It traverses
+ the content to find each occurrence of the element, in the
+ supplied content and in all nested contents. To find the
+ visibility of a content element without considering its
+ parent, use PDEElementIsCurrentlyVisible().
+
+ <p>It returns the number of occurrences and an array of boolean
+ values containing <code>true</code> for each occurrence of the element that is
+ visible in the context, taking into account the context's
+ NonOCDrawing and PDOCDrawEnumType values. </p>
+
+ @param elem The element for which to obtain visibilities.
+
+ @param content The content containing the element.
+ @param ocContext The optional-content context in which
+ the element is tested.
+ @param visibilities (Filled by the method) An array of
+ boolean values containing <code>true</code> for each occurrence of the element
+ that is visible in the context.
+ @param capacity The size of the visibilities array.
+ @return The number of occurrences of the element in the content.
+
+ @see PDEElementIsCurrentlyVisible
+ @see PDEElementMakeVisible
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC( ASUns32, PDEElementGetAllVisibilities, (PDEElement elem, PDEContent content, PDOCContext ocContext, ASBool *visibilities, ASUns32 capacity) )
+
+/**
+ Makes an element visible in a given content and optional-content
+ context, by manipulating the <code>ON-OFF</code> states of the optional-content
+ groups.
+ @param elem The element for which to set the visibility
+ state.
+ @param content The content containing the element.
+ @param ocContext The optional-content context in which
+ the element is made visible.
+ @return <code>true</code> if the element is successfully made visible in the
+ given content and context, <code>false</code> otherwise.
+ @see PDEElementGetAllVisibilities
+ @see PDEElementIsCurrentlyVisible
+ @see PDOCMDsMakeContentVisible
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC( ASBool, PDEElementMakeVisible, (PDEElement elem, PDEContent content, PDOCContext ocContext) )
+/* END Optional Content API calls */
+
+/**
+ Tests whether a font is an embedded font in the document
+ in which it was created.
+ @param pdeFont A PDEFont object to test.
+ @return <code>true</code> if the font is embedded, <code>false</code> if it is not, or if
+ it was created in one document and embedded in a different
+ document.
+ @see PDEFontEmbedNow
+ @see PDEFontEmbedNowDontSubset
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(ASBool, PDEFontIsEmbedded, (
+ IN PDEFont pdeFont)
+ )
+
+/**
+ Gets the system font object associated with a font object.
+
+ @param pdeFont A PDEFont whose system font is found.
+ @return The system font object.
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDFindSysFontForPDEFont
+ @see PDEFontSetSysFont
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(PDSysFont, PDEFontGetSysFont, (
+ IN PDEFont pdeFont)
+ )
+
+/**
+ Gets the system encoding object associated with a font object.
+
+ @param pdeFont A PDEFont whose system encoding is found.
+ @return The system encoding object.
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontSetSysEncoding
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(PDSysEncoding, PDEFontGetSysEncoding, (
+ IN PDEFont pdeFont)
+ )
+
+/**
+ Gets the advance width of a character or a text element.
+ Advance width is returned in either character space or user
+ space. The advance width is the amount by which the current
+ point advances when the character is drawn.
+
+ <p>Advance width may be horizontal or vertical, depending on
+ the writing style. Thus <code>advanceP</code> has both a horizontal and
+ vertical component. </p>
+ @param pdeText A text object containing a character or text
+ run whose advance width is found.
+ @param flags A PDETextFlags value that specifies whether
+ index refers to the character offset from the beginning
+ of the text object or the index of the text run in the text
+ object. It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ <p>In addition, set the kPDETextPageSpace
+ flag to obtain the advance width in user space. If it is
+ not set, the advance width is in character space. If this
+ flag is not set, this method returns a value that is independent
+ of any sizes, matrices, or scaling, simply adding up the
+ font's raw glyph widths, supplemented only by unscaled character
+ and word spacing. This differs from the behavior of the
+ older function, PDETextGetAdvanceWidth(). </p>
+
+ @param index The index of the character or text run in <code>pdeText</code>.
+
+ @param advanceP (Filled by the method) A pointer to a ASFixedPoint
+ value indicating the advance width.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextGetAdvanceWidth
+ @since PI_PDFEDIT_READ_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextGetAdvance, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar, kPDETextPageSpace */
+ IN ASInt32 index,
+ OUT ASFixedPointP advanceP)
+ )
+
+/**
+ Gets the font for a text item.
+
+ @note This method does not change the reference count of
+ the returned PDEFont.
+ @param textItem The text item whose font is obtained.
+ @return The font of the specified text item.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemSetFont
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(PDEFont, PDETextItemGetFont, (
+ IN PDETextItem textItem))
+
+/**
+ Gets the text matrix for a character in a text item.
+ @param textItem The text item.
+ @param charOffset The offset of the character whose text
+ matrix is obtained.
+ @param textMatrixP (Filled by the method) A pointer to a
+ ASFixedMatrix structure with the text matrix of the character.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemSetTextMatrix
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemGetTextMatrix, (
+ IN PDETextItem textItem,
+ IN ASUns32 charOffset,
+ OUT ASFixedMatrix *textMatrixP))
+
+/**
+ Gets the text state of a text item.
+ @param textItem The text item whose text state is obtained.
+
+ @param textStateP (Filled by the method) A pointer to a
+ PDETextStateP structure with text state of the text item.
+
+ @param textStateSize The size of the <code>texStateP</code> structure in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemSetTextState
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemGetTextState, (
+ IN PDETextItem textItem,
+ OUT PDETextStateP textStateP,
+ IN ASUns32 textStateSize))
+
+/**
+ Gets the text length for a text item.
+ @param textItem The text item whose text length is obtained.
+ @return The text length in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemCopyText
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(ASUns32, PDETextItemGetTextLen, (
+ IN PDETextItem textItem))
+
+/**
+ Copies the text from a text item element into a character
+ buffer.
+ @param textItem A pointer to the characters to add. Note that
+ passing <code>NULL</code> for text can invalidate the text object but
+ will not raise an error. Callers must not pass <code>NULL</code> for
+ this parameter.
+ @param buffer (Filled by the method) A pointer to a buffer
+ in which to store the copy.
+ @param bufferSize The length of the text buffer in bytes.
+ @return The length in bytes of <code>textItem</code>.
+ @exception pdErrBadResMetrics
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetItem
+ @see PDETextAddItem
+ @see PDETextItemGetTextLen
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(ASUns32, PDETextItemCopyText, (
+ IN PDETextItem textItem,
+ OUT ASUns8 *buffer,
+ IN ASUns32 bufferSize))
+
+/**
+ Gets the graphics state for a text item.
+ @param textItem Text item whose graphic state is obtained.
+
+ @param stateP (Filled by the method) A pointer to a
+ PDEGraphicStateP structure with graphics state of the text
+ item.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemSetGState
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemGetGState, (
+ IN PDETextItem textItem,
+ OUT PDEGraphicStateP stateP,
+ IN ASUns32 stateSize))
+
+/**
+ Obtains a text item from a text element at a given index
+ position.
+ @param text Text object from which the text item is obtained.
+
+ @param index The index of the text item in <code>pdeText</code>.
+ @return The text item object.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextAddItem
+ @see PDETextItemCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC(PDETextItem, PDETextGetItem, (
+ IN PDEText text,
+ IN ASUns32 index))
+
+/**
+ Returns the type of image as <code>"FlateDecode"</code>, <code>"JPXDecode"</code>, or <code>"Unknown"</code>
+ when the image filter is not one of these types.
+ @param image IN/OUT The PDEImage object.
+ @return See above.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC(ASAtom, PDEImageGetType, (
+ IN PDEImage image)
+ )
+
+/**
+ Acquires the PDEImageFlate resource of the PDEImage content element
+ when the image filter type is <code>"FlateDecode"</code>, or <code>0</code> if it is not.
+ <p>Call PDERelease() to dispose of the PDEImageFlate when finished with it. </p>
+ @param image IN/OUT The PDEImage object.
+ @return a PDEImageFlate resource object.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC(PDEImageFlate, PDEImageAcquireImageFlate, (
+ IN PDEImage image)
+ )
+
+
+/**
+ Acquires the PDEImageJPX resource of the PDEImage content element
+ when the image filter type is <code>"JPXDecode"</code>, or <code>0</code> if it is not.
+ <p>Call PDERelease() to dispose of the PDEImageJPX when finished with it. </p>
+ @param image IN/OUT The PDEImage object.
+ @return a PDEImageJPX resource object.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC(PDEImageJPX, PDEImageAcquireImageJPX, (
+ IN PDEImage image)
+ )
+
+
+/**
+ Gets a Cos object for an image.
+ @param pdeImageJPX IN/OUT The JPX image whose Cos object is obtained.
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for the
+ image.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetType
+ @see PDEImageAcquireImageJPX
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( void, PDEImageJPXGetCosObj, (
+ IN PDEImageJPX pdeImageJPX,
+ OUT CosObj *cosObjP)
+ )
+
+
+/**
+ Gets a Cos object for an image.
+ @param pdeImageFlate IN/OUT The flate image whose Cos object is obtained.
+ @param cosObjP IN/OUT (Filled by the method) The Cos object for the
+ image.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetType
+ @see PDEImageAcquireImageFlate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( void, PDEImageFlateGetCosObj, (
+ IN PDEImageFlate pdeImageFlate,
+ OUT CosObj *cosObjP)
+ )
+
+
+/**
+ Gets the attributes of a flate image.
+ @param imgFlate IN/OUT A flate image resource object.
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDEImageFlateAttrs
+ structure containing the attributes of the flate image.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( void, PDEImageFlateGetAttrs, (
+ IN PDEImageFlate imgFlate,
+ OUT PDEImageFlateAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+
+/**
+ Acquires the color space of the flate image. PDERelease should be used
+ to release the color space when it is no longer referenced by the caller.
+ @param imgFlate IN/OUT An object of type PDEImageFlate.
+ @return The color space of the flate image; otherwise it returns <code>NULL</code>.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+ @see PDEImageGetType
+ @see PDEImageAcquireImageFlate
+
+*/
+UNPROC( PDEColorSpace, PDEImageFlateAcquireColorSpace, (
+ IN PDEImageFlate imgFlate)
+ )
+
+
+/**
+ Gets a data stream for a flate compressed image, PDEImageFlate object.
+
+ <p>The caller must dispose of the returned ASStm by calling
+ ASStmClose(). </p>
+ @param imgFlate IN/OUT The flate image whose data stream is obtained.
+ @param flags IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData
+ flag is set, data is returned in encoded form. Otherwise,
+ data is decoded.
+ @return The stream for the image.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEImageGetType
+ @see PDEImageAcquireImageFlate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASStm, PDEImageFlateGetDataStm, (
+ IN PDEImageFlate imgFlate,
+ IN ASUns32 flags)
+ )
+
+
+
+/**
+ Gets the attributes of a JPX encoded PDEImage.
+
+ @param pdeImageJPX IN/OUT A JPX encoded image object.
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDEImageJPXAttrs
+ structure containing the attributes of the JPX encoded image.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetAttrs
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( void, PDEImageJPXGetAttrs, (
+ IN PDEImageJPX pdeImageJPX,
+ OUT PDEImageJPXAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+
+/**
+ Acquires the PDEColorSpace associated with the JPX encoded image,
+ if one exists. If a PDF color space has not been associated with the
+ JPX encoded image, <code>0</code> will be returned. This object is acquired and must
+ be released using PDERelease() when it is no longer in use.
+
+ @param pdeImageJPX IN/OUT A JPX encoded image object.
+ @return A PDF colorspace associated with the JPX encoded image.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetType
+ @see PDEImageAcquireJPX
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( PDEColorSpace, PDEImageJPXAcquireColorSpace, (
+ IN PDEImageJPX pdeImageJPX)
+ )
+
+
+/**
+ Returns a stream containing the image data. Color component values are
+ interlaced. For images with greater then 8 bits per component, the component
+ values occupy the least significant bits of a two byte value.
+ Valid values of flags are <code>0</code>.
+
+ @param pdeImageJPX IN/OUT A JPX encoded image object.
+ @param flags Unused.
+ @return The stream for the image.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASStm, PDEImageJPXGetDataStm, (
+ IN PDEImageJPX pdeImageJPX,
+ IN ASUns32 flags)
+ )
+
+
+/**
+ Returns the number of JPX color spaces reference by the JPX encoded image.
+
+ @param pdeImageJPX IN/OUT A JPX encoded image object.
+ @return The number of JPX color spaces specified by the JPX encoded image.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASInt32, PDEImageJPXGetNumColorSpaces, (
+ IN PDEImageJPX pdeImageJPX)
+ )
+
+
+/**
+ Acquires a link list of JPXColorSpace objects defined with the JPX encoded image.
+ if one exists. This object is acquired and must
+ be released using PDERelease() when it is no longer in use.
+
+ @param pdeImageJPX IN/OUT A JPX encoded image object.
+ @return A JPX colorspace associated with the JPX encoded image.
+ @exception peErrWrongPDEObjectType
+ @see JPXColorSpaceAcquireNext
+ @see JPXColorSpaceGetType
+ @see JPXColorSpaceGetEnumAttrs
+ @see JPXColorSpaceGetProfile
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( JPXColorSpace, PDEImageJPXAcquireJPXColorSpace, (
+ IN PDEImageJPX pdeImageJPX)
+ )
+
+
+/**
+ Returns <code>true</code> if the JPX encoded image has a JPX palette
+
+ @param pdeImageJPX IN/OUT A JPX encoded image object.
+ @return <code>true</code> if the encoded JPX image contains a palette.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquirePalette
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASBool, PDEImageJPXHasPalette, (
+ IN PDEImageJPX pdeImageJPX)
+ )
+
+
+/**
+ Acquires the JPXPalette from the JPX image object
+ This object is acquired and must be released using
+ PDERelease() when it is no longer in use.
+
+ @param pdeImageJPX IN/OUT A JPX encoded image object.
+ @return A JPX palette associated with the JPX encoded image.
+ @exception peErrWrongPDEObjectType
+ @see JPXPaletteGetNumEntries
+ @see JPXPaletteGetBitDepths
+ @see JPXPaletteGetNumComponents
+ @see JPXPaletteGetTable
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( JPXPalette, PDEImageJPXAcquirePalette, (
+ IN PDEImageJPX pdeImageJPX)
+ )
+
+
+
+/**
+ Returns the number of palette entries.
+
+ @param jpxPalette IN/OUT A JPX encoded image object.
+ @return The number of palette entries.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquirePalette
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASInt32, JPXPaletteGetNumEntries, (
+ IN JPXPalette jpxPalette)
+ )
+
+/**
+ Returns the bit depths of the color values represented in the palette.
+ The length of the array must be at least the number of components.
+
+ @param jpxPalette IN/OUT A JPX-encoded image object.
+ @param bitDepths IN/OUT (Filled by the method) An array of bit depths for each component.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquirePalette
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( void, JPXPaletteGetBitDepths, (
+ IN JPXPalette jpxPalette,
+ IN ASInt32* bitDepths)
+ )
+
+/**
+ Returns the number of color components represented by the palette.
+
+ @param jpxPalette IN/OUT A JPX encoded image object.
+ @return The number of components of the JPX image represented by the palette.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquirePalette
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASInt32, JPXPaletteGetNumComponents, (
+ IN JPXPalette jpxPalette)
+ )
+
+/**
+ Returns the palette data as a read only non-seekable ASStm.
+ The returned ASStm should be read with ASStmRead().
+ Each component entry in the palette is represented by the number of bytes
+ needed to contain the bit depth for that component.
+
+ @param jpxPalette IN/OUT A JPX encoded image object.
+ @param paletteLength IN/OUT (Filled by the method) The length of the palette data.
+ @return A stream for the palette data.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXHasPalette
+ @see PDEImageJPXAcquirePalette
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASStm, JPXPaletteGetTable, (
+ IN JPXPalette jpxPalette,
+ OUT ASInt32 *paletteLength)
+ )
+
+
+/**
+ Acquires the next JPX color space defined with the JPX
+ encoded image in the link list, if one exists. This
+ object is acquired and must be released using PDERelease()
+ when it is no longer in use.
+
+ @param jpxColorSpace IN/OUT A JPX color space object.
+ @return The next JPX color space associated with the JPX encoded image.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquireJPXColorSpace
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( JPXColorSpace, JPXColorSpaceAcquireNext, (
+ IN JPXColorSpace jpxColorSpace)
+ )
+
+/**
+ Returns the type of JPX color space:
+ <ul>
+ <li>kJPXCSUnknown</li>
+ <li>kJPXCSEnumerated</li>
+ <li>kJPXCSRestrictedICC</li>
+ <li>kJPXCSAnyICC</li>
+ <li>kJPXCSVenderColor</li>
+ </ul>
+
+ @param jpxColorSpace IN/OUT A JPX color space object.
+ @return The JPX color space type, JPXColorSpaceType.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquireJPXColorSpace
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( JPXColorSpaceType, JPXColorSpaceGetType, (
+ IN JPXColorSpace jpxColorSpace)
+ )
+
+/**
+ Gets the attributes of an enumerated color space. It returns <code>false</code> if the
+ color space is not kJPXCSEnumerated.
+
+ @param jpxColorSpace IN/OUT A JPX color space object.
+ @param jpxCSEnumAttrsP IN/OUT (filled in by the method) Attributes of a JPX
+ enumerated color space.
+ @return <code>true</code> if the JPX color space is kJPXCSEnumerated
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquireJPXColorSpace
+ @ingroup Enumerators
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+*/
+UNPROC( ASBool, JPXColorSpaceGetEnumAttrs, (
+ IN JPXColorSpace jpxColorSpace,
+ OUT JPXCSEnumAttrsP jpxCSEnumAttrsP)
+ )
+
+/**
+ Gets the color profile of an ICC-based JPX color space.
+ If <code>profile</code> is <code>0</code>, it returns the length of the profile in bytes;
+ otherwise it returns the number of bytes copied to <code>profile</code>.
+
+ @param jpxColorSpace IN/OUT A JPX color space object.
+ @param profile IN/OUT (Filled by the method) The profile of the JPX color space.
+ @param profileLength IN/OUT The byte length of the user-supplied profile buffer.
+ @return The byte length of the profile, if <code>profile</code> is <code>0</code>;
+ otherwise returns the byte length copied to <code>profile</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageJPXAcquireJPXColorSpace
+ @since PI_PDFEDIT_READ_VERSION >= 0x00060000
+
+*/
+UNPROC( ASInt32, JPXColorSpaceGetProfile, (
+ IN JPXColorSpace jpxColorSpace,
+ OUT ASUns8 *profile,
+ IN ASInt32 profileLength)
+ )
+
+/**
+ <p>Retrieves a <code>PDEColorSpaceStruct</code> from a <code>PDEColorSpace</code>. It supports all PDF version 1.3 color spaces
+ except the <code>Pattern</code> color space. </p>
+ <p>It is the responsibility of the caller to free the <code>PDEColorSpaceStruct</code> and the underlying allocations.</p>
+
+ @param cs IN/OUT The <code>PDEColorSpace</code> for which the structure is required.
+ @param pdeColorSpaceStruct IN/OUT The <code>PDEColorSpaceStruct</code> created for the color space.
+ @exception peErrUnknownPDEColorSpace
+ @exception genErrBadParm
+ @see PDEColorSpaceCreate
+ @since PI_PDFEDIT_READ_VERSION >= 0x00080001
+*/
+UNPROC( void, PDEColorSpaceGetStruct, (
+ IN PDEColorSpace cs,
+ OUT PDEColorSpaceStruct *pdeColorSpaceStruct)
+ )
+
+/**
+ Retrieves a <code>PDEImage</code> object's color space, in the desired bits per component, based on the <code>flags</code>
+ parameter.
+
+ @param image IN The <code>PDEImage</code> instance whose color space is desired.
+ @param flags IN A set of flags to specify the desired bits per component (bpc) of the returned color space.
+ @see PDEImageGetColorSpace
+ @see PDEImageColorSpaceFlags
+ @since PI_PDFEDIT_READ_VERSION >= 0x00090000
+*/
+UNPROC( PDEColorSpace, PDEImageGetColorSpaceEx, (
+ IN PDEImage image,
+ IN ASUns32 flags)
+ )
+
+/**
+ Retrieves the <code>PDEContentToCosObjFlags</code> for this form. The flags were previously set by <code>PDEFormSetContentToCosObjFlags()</code>.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00090000
+*/
+UNPROC( ASUns32, PDEFormGetContentToCosObjFlags, (
+ IN PDEForm form)
+ )
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PETypes.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PETypes.h
new file mode 100644
index 0000000..59826b5
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PETypes.h
@@ -0,0 +1,57 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PETypes.h
+
+ - Defines PDFEdit error codes.
+
+*********************************************************************/
+
+#ifndef _H_PETypes
+#define _H_PETypes
+
+#include "ASBasic.h"
+#include "ASStm.h"
+#include "ASTypes.h"
+#include "CosTypes.h"
+#include "PDFErrorCodes.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Build Type-specific error codes.
+** Use these macros with the errors defined in the header files listed below,
+** For example: RAISE(CosError(cosErrDocTableFull), NULL);
+**
+** Note that the default severity of an error changes depending on the
+** category.
+*/
+
+#define PDFEditError(e) ASErrBuildCode(ASErrAlways, ASErrSysPDFEdit, e)
+// See PEError.h or PEError.asf for error codes
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_PETypes */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEVers.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEVers.h
new file mode 100644
index 0000000..b3c0ff1
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEVers.h
@@ -0,0 +1,34 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PEVers.h
+
+ - PDFEdit HFT names and versions.
+
+*********************************************************************/
+
+#ifndef _H_PEVers
+#define _H_PEVers
+
+#define PDFEditReadHFTName "PDFEditRead"
+
+#define PDFEditWriteHFTName "PDFEditWrite"
+
+#define PDFEditPrivateHFTName "PDFEditPrivate"
+
+#define PDSysFontHFTName "PDSysFont"
+
+#define PagePDEContentHFTName "PagePDEContent"
+
+#endif /* _H_PEVers */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWCalls.h
new file mode 100644
index 0000000..9a09716
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWCalls.h
@@ -0,0 +1,416 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PEWCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 4, version 5
+ is under development, and you add a new routine for version 5. Increment _~HFT_LATEST_VERSION
+ to 0x00040001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_5 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_5. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00040000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00050000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00050000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 6 in this example).
+
+*********************************************************************/
+
+#ifndef _H_PEWCalls
+#define _H_PEWCalls
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _PDFEditWriteHFT_LATEST_VERSION 0x00090000
+#define _PDFEditWriteHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000
+#define _PDFEditWriteHFT_IS_BETA 0
+
+/* for public use */
+#define PDFEditWriteHFT_LATEST_VERSION (_PDFEditWriteHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDFEditWriteHFT_LATEST_VERSION) : _PDFEditWriteHFT_LATEST_VERSION)
+
+#define PDFEditWriteHFT_VERSION_4 0x00040000
+#define PDFEditWriteHFT_VERSION_5 0x00050000
+#define PDFEditWriteHFT_VERSION_6 0x00060000
+#define PDFEditWriteHFT_VERSION_7 0x00070000
+#define PDFEditWriteHFT_VERSION_7_5 0x00070005
+#define PDFEditWriteHFT_VERSION_8 0x00080000
+#define PDFEditWriteHFT_VERSION_9 PDFEditWriteHFT_LATEST_VERSION
+
+#include "PDBasicExpT.h"
+#include "PEExpT.h"
+#include "PEVers.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif /* NPROC */
+
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define UNPROC NPROC
+#if !READER
+ #define XNPROC NPROC
+#else
+ #define XNPROC(returnType, name, params)
+#endif
+ #define NOPROC(name)
+ #include "PEWProcs.h"
+ #undef NPROC
+ #undef UNPROC
+ #undef NOPROC
+ #undef XNPROC
+
+#endif /* !PLUGIN */
+
+#if PLUGIN
+
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define UNPROC NPROC
+ #define XNPROC NPROC
+ #define NOPROC(name) \
+ name##SEL,
+
+ enum {
+ PDFEditBAD_SELECTOR,
+ #include "PEWProcs.h"
+ PDFEditNUMSELECTORSplusOne
+ };
+
+ #define PDFEditNUMSELECTORS (PDFEditNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef UNPROC
+ #undef NOPROC
+ #undef XNPROC
+
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+ #define NOPROC(name)
+#if READER_PLUGIN
+ #define UNPROC(returnType, name, params)
+ #define XNPROC(returnType, name, params)
+#else
+ #define UNPROC NPROC
+ #define XNPROC NPROC
+#endif
+
+ #include "PEWProcs.h"
+ #undef NPROC
+ #undef NOPROC
+ #undef UNPROC
+ #undef XNPROC
+
+#ifdef THREAD_SAFE_PDFL
+ #define gPDFEditWriteHFT (GetHFTLocations()->pdfEditWriteHFT)
+ #define gPDFEditWriteVersion (GetHFTLocations()->pdfEditWriteVersion)
+#else
+ extern HFT gPDFEditWriteHFT;
+ extern ASUns32 gPDFEditWriteVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+
+
+#if PI_PDFEDIT_WRITE_VERSION != 0 && !STATIC_HFT
+/* PI_PDFEDIT_WRITE_VERSION >= 0x00040000 */
+
+
+ /* Define the macros */
+ #define PDEContentCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContentCreateSELPROTO)(gPDFEditWriteHFT[PDEContentCreateSEL])))
+ #define PDEContentToCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContentToCosObjSELPROTO)(gPDFEditWriteHFT[PDEContentToCosObjSEL])))
+ #define PDEContentRemoveElem (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContentRemoveElemSELPROTO)(gPDFEditWriteHFT[PDEContentRemoveElemSEL])))
+ #define PDEContentAddElem (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContentAddElemSELPROTO)(gPDFEditWriteHFT[PDEContentAddElemSEL])))
+
+ #define PDEElementSetGState (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEElementSetGStateSELPROTO)(gPDFEditWriteHFT[PDEElementSetGStateSEL])))
+ #define PDEElementSetMatrix (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEElementSetMatrixSELPROTO)(gPDFEditWriteHFT[PDEElementSetMatrixSEL])))
+ #define PDEElementSetClip (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEElementSetClipSELPROTO)(gPDFEditWriteHFT[PDEElementSetClipSEL])))
+ #define PDEElementCopy (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEElementCopySELPROTO)(gPDFEditWriteHFT[PDEElementCopySEL])))
+
+ #define PDETextCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextCreateSELPROTO)(gPDFEditWriteHFT[PDETextCreateSEL])))
+ #define PDETextRunSetGState (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextRunSetGStateSELPROTO)(gPDFEditWriteHFT[PDETextRunSetGStateSEL])))
+ #define PDETextRunSetTextState (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextRunSetTextStateSELPROTO)(gPDFEditWriteHFT[PDETextRunSetTextStateSEL])))
+ #define PDETextRunSetFont (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextRunSetFontSELPROTO)(gPDFEditWriteHFT[PDETextRunSetFontSEL])))
+ #define PDETextRunSetTextMatrix (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextRunSetTextMatrixSELPROTO)(gPDFEditWriteHFT[PDETextRunSetTextMatrixSEL])))
+ #define PDETextRunSetStrokeMatrix (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextRunSetStrokeMatrixSELPROTO)(gPDFEditWriteHFT[PDETextRunSetStrokeMatrixSEL])))
+ #define PDETextAdd (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextAddSELPROTO)(gPDFEditWriteHFT[PDETextAddSEL])))
+ #define PDETextRemove (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextRemoveSELPROTO)(gPDFEditWriteHFT[PDETextRemoveSEL])))
+
+ #define PDEPathCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPathCreateSELPROTO)(gPDFEditWriteHFT[PDEPathCreateSEL])))
+ #define PDEPathSetData (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPathSetDataSELPROTO)(gPDFEditWriteHFT[PDEPathSetDataSEL])))
+ #define PDEPathSetPaintOp (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPathSetPaintOpSELPROTO)(gPDFEditWriteHFT[PDEPathSetPaintOpSEL])))
+
+ #define PDEImageCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEImageCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDEImageCreateFromCosObjSEL])))
+ #define PDEImageSetData (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEImageSetDataSELPROTO)(gPDFEditWriteHFT[PDEImageSetDataSEL])))
+ #define PDEImageSetDataStm (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEImageSetDataStmSELPROTO)(gPDFEditWriteHFT[PDEImageSetDataStmSEL])))
+ #define PDEImageCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEImageCreateSELPROTO)(gPDFEditWriteHFT[PDEImageCreateSEL])))
+
+ #define PDEClipCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEClipCreateSELPROTO)(gPDFEditWriteHFT[PDEClipCreateSEL])))
+ #define PDEClipAddElem (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEClipAddElemSELPROTO)(gPDFEditWriteHFT[PDEClipAddElemSEL])))
+ #define PDEClipRemoveElems (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEClipRemoveElemsSELPROTO)(gPDFEditWriteHFT[PDEClipRemoveElemsSEL])))
+
+ #define PDEXObjectCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEXObjectCreateSELPROTO)(gPDFEditWriteHFT[PDEXObjectCreateSEL])))
+
+ #define PDEFormCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFormCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDEFormCreateFromCosObjSEL])))
+ #define PDEFormGetContent (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFormGetContentSELPROTO)(gPDFEditWriteHFT[PDEFormGetContentSEL])))
+
+ #define PDEPSCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPSCreateSELPROTO)(gPDFEditWriteHFT[PDEPSCreateSEL])))
+ #define PDEPSCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPSCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDEPSCreateFromCosObjSEL])))
+ #define PDEPSSetData (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPSSetDataSELPROTO)(gPDFEditWriteHFT[PDEPSSetDataSEL])))
+ #define PDEPSSetDataStm (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPSSetDataStmSELPROTO)(gPDFEditWriteHFT[PDEPSSetDataStmSEL])))
+
+ #define PDEFontCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontCreateSELPROTO)(gPDFEditWriteHFT[PDEFontCreateSEL])))
+ #define PDEFontCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromCosObjSEL])))
+ #define PDEFontCreateFromSysFont (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontCreateFromSysFontSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromSysFontSEL])))
+
+ #define PDEColorSpaceCreateFromName (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEColorSpaceCreateFromNameSELPROTO)(gPDFEditWriteHFT[PDEColorSpaceCreateFromNameSEL])))
+ #define PDEColorSpaceCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEColorSpaceCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDEColorSpaceCreateFromCosObjSEL])))
+
+ #define PDEAddTag (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEAddTagSELPROTO)(gPDFEditWriteHFT[PDEAddTagSEL])))
+ #define PDEGetTag (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEGetTagSELPROTO)(gPDFEditWriteHFT[PDEGetTagSEL])))
+ #define PDERemoveTag (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDERemoveTagSELPROTO)(gPDFEditWriteHFT[PDERemoveTagSEL])))
+ #define PDEMergeResourcesDict (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEMergeResourcesDictSELPROTO)(gPDFEditWriteHFT[PDEMergeResourcesDictSEL])))
+ #define PDEExtGStateCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEExtGStateCreateSELPROTO)(gPDFEditWriteHFT[PDEExtGStateCreateSEL])))
+ #define PDEPlaceCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPlaceCreateSELPROTO)(gPDFEditWriteHFT[PDEPlaceCreateSEL])))
+ #define PDEPlaceSetMCTag (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPlaceSetMCTagSELPROTO)(gPDFEditWriteHFT[PDEPlaceSetMCTagSEL])))
+ #define PDEPlaceSetDict (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPlaceSetDictSELPROTO)(gPDFEditWriteHFT[PDEPlaceSetDictSEL])))
+ #define PDEContainerCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContainerCreateSELPROTO)(gPDFEditWriteHFT[PDEContainerCreateSEL])))
+ #define PDEContainerSetMCTag (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContainerSetMCTagSELPROTO)(gPDFEditWriteHFT[PDEContainerSetMCTagSEL])))
+ #define PDEContainerSetDict (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContainerSetDictSELPROTO)(gPDFEditWriteHFT[PDEContainerSetDictSEL])))
+ #define PDEContainerSetContent (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContainerSetContentSELPROTO)(gPDFEditWriteHFT[PDEContainerSetContentSEL])))
+ #define PDETextSplitRunAt (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextSplitRunAtSELPROTO)(gPDFEditWriteHFT[PDETextSplitRunAtSEL])))
+ #define PDETextRunSetGState (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextRunSetGStateSELPROTO)(gPDFEditWriteHFT[PDETextRunSetGStateSEL])))
+ #define PDEPatternCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPatternCreateSELPROTO)(gPDFEditWriteHFT[PDEPatternCreateSEL])))
+ #define PDETextReplaceChars (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDETextReplaceCharsSELPROTO)(gPDFEditWriteHFT[PDETextReplaceCharsSEL])))
+ #define PDEPurgeCache (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPurgeCacheSELPROTO)(gPDFEditWriteHFT[PDEPurgeCacheSEL])))
+ #define PDEFontSubsetNow (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontSubsetNowSELPROTO)(gPDFEditWriteHFT[PDEFontSubsetNowSEL])))
+ #define PDEPathAddSegment (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEPathAddSegmentSELPROTO)(gPDFEditWriteHFT[PDEPathAddSegmentSEL])))
+ #define PDEFontCreateWithParams (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontCreateWithParamsSELPROTO)(gPDFEditWriteHFT[PDEFontCreateWithParamsSEL])))
+ #define PDEColorSpaceCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEColorSpaceCreateSELPROTO)(gPDFEditWriteHFT[PDEColorSpaceCreateSEL])))
+ #define PDEDeviceNColorsCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEDeviceNColorsCreateSELPROTO)(gPDFEditWriteHFT[PDEDeviceNColorsCreateSEL])))
+ #define PDEShadingCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEShadingCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDEShadingCreateFromCosObjSEL])))
+
+ #define PDEGroupCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEGroupCreateSELPROTO)(gPDFEditWriteHFT[PDEGroupCreateSEL])))
+ #define PDEGroupSetContent (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEGroupSetContentSELPROTO)(gPDFEditWriteHFT[PDEGroupSetContentSEL])))
+
+ #define PDEFontCreateFromSysFontEx (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontCreateFromSysFontExSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromSysFontExSEL])))
+
+ #define PDEClipCopy (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEClipCopySELPROTO)(gPDFEditWriteHFT[PDEClipCopySEL])))
+
+ #define PDEImageSetDecodeArray (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEImageSetDecodeArraySELPROTO)(gPDFEditWriteHFT[PDEImageSetDecodeArraySEL])))
+ #define PDEContentAddPage (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEContentAddPageSELPROTO)(gPDFEditWriteHFT[PDEContentAddPageSEL])))
+ #define PDEFontEmbedNowDontSubset (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontEmbedNowDontSubsetSELPROTO)(gPDFEditWriteHFT[PDEFontEmbedNowDontSubsetSEL])))
+ #define PDEFontGetWidthsNow (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_4), *((PDEFontGetWidthsNowSELPROTO)(gPDFEditWriteHFT[PDEFontGetWidthsNowSEL])))
+
+
+/* PI_PDFEDIT_WRITE_VERSION >= 0x00050000 */
+
+ #define PDEBeginContainerCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEBeginContainerCreateSELPROTO)(gPDFEditWriteHFT[PDEBeginContainerCreateSEL])))
+ #define PDEBeginContainerSetMCTag (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEBeginContainerSetMCTagSELPROTO)(gPDFEditWriteHFT[PDEBeginContainerSetMCTagSEL])))
+ #define PDEBeginContainerSetDict (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEBeginContainerSetDictSELPROTO)(gPDFEditWriteHFT[PDEBeginContainerSetDictSEL])))
+
+ #define PDESoftMaskCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDESoftMaskCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDESoftMaskCreateFromCosObjSEL])))
+ #define PDESoftMaskCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDESoftMaskCreateSELPROTO)(gPDFEditWriteHFT[PDESoftMaskCreateSEL])))
+ #define PDESoftMaskSetXGroup (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDESoftMaskSetXGroupSELPROTO)(gPDFEditWriteHFT[PDESoftMaskSetXGroupSEL])))
+ #define PDESoftMaskSetBackdropColor (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDESoftMaskSetBackdropColorSELPROTO)(gPDFEditWriteHFT[PDESoftMaskSetBackdropColorSEL])))
+ #define PDESoftMaskSetTransferFunction (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDESoftMaskSetTransferFunctionSELPROTO)(gPDFEditWriteHFT[PDESoftMaskSetTransferFunctionSEL])))
+
+ #define PDEXGroupCreateFromCosObj (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEXGroupCreateFromCosObjSELPROTO)(gPDFEditWriteHFT[PDEXGroupCreateFromCosObjSEL])))
+ #define PDEXGroupCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEXGroupCreateSELPROTO)(gPDFEditWriteHFT[PDEXGroupCreateSEL])))
+ #define PDEXGroupSetKnockout (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEXGroupSetKnockoutSELPROTO)(gPDFEditWriteHFT[PDEXGroupSetKnockoutSEL])))
+ #define PDEXGroupSetIsolated (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEXGroupSetIsolatedSELPROTO)(gPDFEditWriteHFT[PDEXGroupSetIsolatedSEL])))
+ #define PDEXGroupSetColorSpace (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEXGroupSetColorSpaceSELPROTO)(gPDFEditWriteHFT[PDEXGroupSetColorSpaceSEL])))
+
+ #define PDEFormSetXGroup (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFormSetXGroupSELPROTO)(gPDFEditWriteHFT[PDEFormSetXGroupSEL])))
+
+ #define PDEExtGStateCreateNew (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateCreateNewSELPROTO)(gPDFEditWriteHFT[PDEExtGStateCreateNewSEL])))
+ #define PDEExtGStateSetOPM (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetOPMSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetOPMSEL])))
+ #define PDEExtGStateSetOPFill (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetOPFillSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetOPFillSEL])))
+ #define PDEExtGStateSetOPStroke (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetOPStrokeSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetOPStrokeSEL])))
+ #define PDEExtGStateSetOpacityFill (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetOpacityFillSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetOpacityFillSEL])))
+ #define PDEExtGStateSetOpacityStroke (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetOpacityStrokeSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetOpacityStrokeSEL])))
+ #define PDEExtGStateSetBlendMode (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetBlendModeSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetBlendModeSEL])))
+ #define PDEExtGStateSetAIS (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetAISSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetAISSEL])))
+ #define PDEExtGStateSetSoftMask (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetSoftMaskSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetSoftMaskSEL])))
+
+ #define PDEImageSetSMask (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEImageSetSMaskSELPROTO)(gPDFEditWriteHFT[PDEImageSetSMaskSEL])))
+ #define PDEImageSetMatteArray (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEImageSetMatteArraySELPROTO)(gPDFEditWriteHFT[PDEImageSetMatteArraySEL])))
+
+ #define PDEEndContainerCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEEndContainerCreateSELPROTO)(gPDFEditWriteHFT[PDEEndContainerCreateSEL])))
+ #define PDEBeginGroupCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEBeginGroupCreateSELPROTO)(gPDFEditWriteHFT[PDEBeginGroupCreateSEL])))
+ #define PDEEndGroupCreate (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEEndGroupCreateSELPROTO)(gPDFEditWriteHFT[PDEEndGroupCreateSEL])))
+
+ #define PDEFontCreateFromSysFontWithParams (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFontCreateFromSysFontWithParamsSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromSysFontWithParamsSEL])))
+ #define PDEFontTranslateGlyphIdsToUnicode (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFontTranslateGlyphIdsToUnicodeSELPROTO)(gPDFEditWriteHFT[PDEFontTranslateGlyphIdsToUnicodeSEL])))
+
+ #define PDEExtGStateSetTK (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetTKSELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetTKSEL])))
+
+ #define PDETextRunSetState (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDETextRunSetStateSELPROTO)(gPDFEditWriteHFT[PDETextRunSetStateSEL])))
+
+ #define PDSysEncodingCreateFromBaseName (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDSysEncodingCreateFromBaseNameSELPROTO)(gPDFEditWriteHFT[PDSysEncodingCreateFromBaseNameSEL])))
+ #define PDSysEncodingCreateFromCMapName (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDSysEncodingCreateFromCMapNameSELPROTO)(gPDFEditWriteHFT[PDSysEncodingCreateFromCMapNameSEL])))
+ #define PDSysFontGetCreateFlags (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDSysFontGetCreateFlagsSELPROTO)(gPDFEditWriteHFT[PDSysFontGetCreateFlagsSEL])))
+ #define PDEFontCreateFromSysFontAndEncoding (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFontCreateFromSysFontAndEncodingSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromSysFontAndEncodingSEL])))
+ #define PDEFontGetCreateNeedFlags (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFontGetCreateNeedFlagsSELPROTO)(gPDFEditWriteHFT[PDEFontGetCreateNeedFlagsSEL])))
+ #define PDEFontEmbedNow (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFontEmbedNowSELPROTO)(gPDFEditWriteHFT[PDEFontEmbedNowSEL])))
+ #define PDEFontCreateWidthsNow (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFontCreateWidthsNowSELPROTO)(gPDFEditWriteHFT[PDEFontCreateWidthsNowSEL])))
+ #define PDEFontCreateToUnicodeNow (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEFontCreateToUnicodeNowSELPROTO)(gPDFEditWriteHFT[PDEFontCreateToUnicodeNowSEL])))
+
+ #define PDEImageSetColorSpace (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEImageSetColorSpaceSELPROTO)(gPDFEditWriteHFT[PDEImageSetColorSpaceSEL])))
+ #define PDEExtGStateSetSA (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDEExtGStateSetSASELPROTO)(gPDFEditWriteHFT[PDEExtGStateSetSASEL])))
+ #define PDESoftMaskCreateFromName (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDESoftMaskCreateFromNameSELPROTO)(gPDFEditWriteHFT[PDESoftMaskCreateFromNameSEL])))
+
+ #define PDETextRunSetMatrix (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_5), *((PDETextRunSetMatrixSELPROTO)(gPDFEditWriteHFT[PDETextRunSetMatrixSEL])))
+
+/* BEGIN Optional Content API calls */
+ #define PDEElementSetOCMD (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDEElementSetOCMDSELPROTO)(gPDFEditWriteHFT[PDEElementSetOCMDSEL])))
+ #define PDEElementRemoveOCMD (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDEElementRemoveOCMDSELPROTO)(gPDFEditWriteHFT[PDEElementRemoveOCMDSEL])))
+ #define PDEContentFlattenOC (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDEContentFlattenOCSELPROTO)(gPDFEditWriteHFT[PDEContentFlattenOCSEL])))
+/* END Optional Content API calls */
+
+ #define PDSysEncodingCreateFromCodePage (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDSysEncodingCreateFromCodePageSELPROTO)(gPDFEditWriteHFT[PDSysEncodingCreateFromCodePageSEL])))
+ #define PDEFontSetSysFont (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDEFontSetSysFontSELPROTO)(gPDFEditWriteHFT[PDEFontSetSysFontSEL])))
+ #define PDEFontSetSysEncoding (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDEFontSetSysEncodingSELPROTO)(gPDFEditWriteHFT[PDEFontSetSysEncodingSEL])))
+ #define PDETextItemCreate (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemCreateSELPROTO)(gPDFEditWriteHFT[PDETextItemCreateSEL])))
+ #define PDETextItemSetFont (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemSetFontSELPROTO)(gPDFEditWriteHFT[PDETextItemSetFontSEL])))
+ #define PDETextItemSetTextMatrix (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemSetTextMatrixSELPROTO)(gPDFEditWriteHFT[PDETextItemSetTextMatrixSEL])))
+ #define PDETextItemSetTextState (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemSetTextStateSELPROTO)(gPDFEditWriteHFT[PDETextItemSetTextStateSEL])))
+ #define PDETextItemSetGState (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemSetGStateSELPROTO)(gPDFEditWriteHFT[PDETextItemSetGStateSEL])))
+ #define PDETextItemReplaceText (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemReplaceTextSELPROTO)(gPDFEditWriteHFT[PDETextItemReplaceTextSEL])))
+ #define PDETextItemReplaceChars (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemReplaceCharsSELPROTO)(gPDFEditWriteHFT[PDETextItemReplaceCharsSEL])))
+ #define PDETextItemRemoveChars (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextItemRemoveCharsSELPROTO)(gPDFEditWriteHFT[PDETextItemRemoveCharsSEL])))
+ #define PDETextAddItem (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextAddItemSELPROTO)(gPDFEditWriteHFT[PDETextAddItemSEL])))
+ #define PDETextRemoveItems (ACROASSERT(gPDFEditWriteVersion >= PDFEditWriteHFT_VERSION_6), *((PDETextRemoveItemsSELPROTO)(gPDFEditWriteHFT[PDETextRemoveItemsSEL])))
+
+/* Newport feature 513825 & ECO 519466 */
+ #define PDEFormSetContent (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_6), *((PDEFormSetContentSELPROTO)(gPDFEditWriteHFT[PDEFormSetContentSEL])))
+ #define PDEFormCreateClone (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_6), *((PDEFormCreateCloneSELPROTO)(gPDFEditWriteHFT[PDEFormCreateCloneSEL])))
+
+/* PDETextAddGlyphs */
+ #define PDETextAddGlyphs (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7), *((PDETextAddGlyphsSELPROTO)(gPDFEditWriteHFT[PDETextAddGlyphsSEL])))
+
+/* PDEFontAddGlyphs */
+ #define PDEFontAddGlyphs (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7), *((PDEFontAddGlyphsSELPROTO)(gPDFEditWriteHFT[PDEFontAddGlyphsSEL])))
+ #define PDEReleaseSpan (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7), *((PDEReleaseSpanSELPROTO)(gPDFEditWriteHFT[PDEReleaseSpanSEL])))
+/* New calls for InDesign */
+ #define PDEContentSetPage (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7), *((PDEContentSetPageSELPROTO)(gPDFEditWriteHFT[PDEContentSetPageSEL])))
+ #define PDEContentSetContainingStream (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7), *((PDEContentSetContainingStreamSELPROTO)(gPDFEditWriteHFT[PDEContentSetContainingStreamSEL])))
+ #define PDEContentSetStreamOwner (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7), *((PDEContentSetStreamOwnerSELPROTO)(gPDFEditWriteHFT[PDEContentSetStreamOwnerSEL])))
+
+/* PDSysFontVerifyEncoding */
+ #define PDSysFontVerifyEncoding (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7), *((PDSysFontVerifyEncodingSELPROTO)(gPDFEditWriteHFT[PDSysFontVerifyEncodingSEL])))
+
+/*Calls for PDEForm*/
+ #define PDEFormGetMatrix (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7_5), *((PDEFormGetMatrixSELPROTO)(gPDFEditWriteHFT[PDEFormGetMatrixSEL])))
+ #define PDEFormGetBBox (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_7_5), *((PDEFormGetBBoxSELPROTO)(gPDFEditWriteHFT[PDEFormGetBBoxSEL])))
+
+/* Calls for creating objects in specific CosDocs */
+ #define PDEImageCreateInCosDoc (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEImageCreateInCosDocSELPROTO)(gPDFEditWriteHFT[PDEImageCreateInCosDocSEL])))
+ #define PDEFontCreateInCosDoc (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEFontCreateInCosDocSELPROTO)(gPDFEditWriteHFT[PDEFontCreateInCosDocSEL])))
+ #define PDEFontCreateFromSysFontInCosDoc (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEFontCreateFromSysFontInCosDocSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromSysFontInCosDocSEL])))
+ #define PDEFontCreateFromSysFontExInCosDoc (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEFontCreateFromSysFontExInCosDocSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromSysFontExInCosDocSEL])))
+ #define PDEFontCreateWithParamsInCosDoc (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEFontCreateWithParamsInCosDocSELPROTO)(gPDFEditWriteHFT[PDEFontCreateWithParamsInCosDocSEL])))
+ #define PDEFontCreateFromSysFontAndEncodingInCosDoc (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEFontCreateFromSysFontAndEncodingInCosDocSELPROTO)(gPDFEditWriteHFT[PDEFontCreateFromSysFontAndEncodingInCosDocSEL])))
+ #define PDEColorSpaceCreateInCosDoc (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEColorSpaceCreateInCosDocSELPROTO)(gPDFEditWriteHFT[PDEColorSpaceCreateSEL])))
+
+#if !defined (_H_PEPCalls) && PDFEditWriteHFT_LATEST_VERSION >= PDFEditWriteHFT_VERSION_8
+ #define PDEContentSetDefaultColorSpace (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEContentSetDefaultColorSpace_PEWCalls_SELPROTO)(gPDFEditWriteHFT[PDEContentSetDefaultColorSpace_PEWCalls_SEL])))
+#endif
+
+ #define PDEImageGetDataLen64 (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEImageGetDataLen64SELPROTO)(gPDFEditWriteHFT[PDEImageGetDataLen64SEL])))
+ #define PDEImageCreateInCosDoc64 (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEImageCreateInCosDoc64SELPROTO)(gPDFEditWriteHFT[PDEImageCreateInCosDoc64SEL])))
+
+ #define PDEScratchDocCleanup (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_8), *((PDEScratchDocCleanupSELPROTO)(gPDFEditWriteHFT[PDEScratchDocCleanupSEL])))
+
+ #define PDSysEncodingCreateFromCMapStream (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_9), *((PDSysEncodingCreateFromCMapStreamSELPROTO)(gPDFEditWriteHFT[PDSysEncodingCreateFromCMapStreamSEL])))
+ #define PDEFormSetContentToCosObjFlags (ACROASSERT(gPDFEditWriteVersion >=PDFEditWriteHFT_VERSION_9), *((PDEFormSetContentToCosObjFlagsSELPROTO)(gPDFEditWriteHFT[PDEFormSetContentToCosObjFlagsSEL])))
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+
+#endif /* PI_PDFEDIT_WRITE_VERSION != 0 && !STATIC_HFT */
+
+#endif
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PEWCalls */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWProcs.h
new file mode 100644
index 0000000..6a9e6e4
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PEWProcs.h
@@ -0,0 +1,3701 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PEWProcs.h
+
+ - Catalog of functions exported by the PDFEditWrite HFT.
+
+*********************************************************************/
+
+/*------------------------------------------------------------------------
+ PDFEdit Public Methods - Generic PDEContent and PDEElement methods.
+------------------------------------------------------------------------*/
+
+/**
+ Creates an empty content object.
+
+ <p>Call PDERelease() to dispose of the returned content object
+ when finished with it. </p>
+ @return An empty content object.
+ @exception peErrPStackUnderflow
+ @see PDEContentCreateFromCosObj
+ @see PDPageAcquirePDEContent
+
+ @note Do not use this method to create a PDEContent to be
+ put into a PDPage. Instead, call PDPageAcquirePDEContent().
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEContent, PDEContentCreate, (void))
+
+/**
+ This is the main method for converting a PDEContent into
+ PDF contents and resources.
+
+ <p>This method does not change the PDEContent object or its
+ reference count. </p>
+
+ <p>The caller of this function is responsible for adding the
+ contents and the resources returned from this method to
+ the Page Object. </p>
+
+ @param pdeContent IN/OUT A content object.
+ @param flags IN/OUT Flags specifying the type of object to create
+ (page contents, form, or charproc) and how it is created.
+ It must be one or more of PDEContentToCosObjFlags.
+ @param attrs IN/OUT A pointer to a PDEContentAttrs structure that
+ contains the appropriate form attributes or cache device/char-width attributes, and so on.
+ If it is zero, no attributes are set.
+ @param attrsSize IN/OUT The size of the <code>attrs</code> buffer in bytes. Zero
+ if <code>attrs</code> is zero.
+ @param cosDoc IN/OUT The document in which the contents and resources
+ are created.
+ @param filtersP IN/OUT A pointer to a PDEFilterArray structure
+ that specifies which filters to use in encoding the contents;
+ it may be <code>NULL</code>. If <code>filtersP</code> contains any <code>encodeParms</code>, they
+ must belong to <code>cosDoc</code>.
+ @param contentsP IN/OUT (Filled by the method) The Cos object for
+ the resulting contents in <code>pdeContent</code>.
+ @param resourcesP IN/OUT (Filled by the method) The Cos object for
+ the resulting resources in <code>pdeContent</code>. Note that the client
+ is responsible for putting the <code>resourcesP</code> dictionary into
+ the <code>contentsP</code> stream for non-page objects. The client must
+ do this for XObject Forms and appearance dictionaries in
+ annotations. For Type 3 fonts, the resource dictionaries
+ must be merged and put into the Type 3 font dictionary.
+ For a page, the contents and resources must be put into
+ the page object.
+ @exception peErrUnknownResType
+ @exception pageErrErrorParsingImage
+ @exception pdErrBadResMetrics
+ @exception peErrWrongPDEObjectType
+ @exception peErrUnknownPDEColorSpace
+ @see PDEContentCreateFromCosObj
+
+ @note Do not use this method to put a PDEContent into a
+ PDPage. Instead, call PDPageSetPDEContent().
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEContentToCosObj, (
+ IN PDEContent pdeContent,
+ IN ASUns32 flags, /* kPDEContentToPage, kPDEContentToForm, kPDEToContentCharProc */
+ IN PDEContentAttrsP attrs,
+ IN ASUns32 attrsSize,
+ IN CosDoc cosDoc,
+ IN PDEFilterArrayP filtersP,
+ OUT CosObj *contentsP,
+ OUT CosObj *resourcesP)
+ )
+
+/**
+ Removes an element from a PDEContent.
+ @param pdeContent IN/OUT A content object.
+ @param index IN/OUT The index in <code>pdeContent</code> of the element to remove
+ whose reference count is decremented.
+ @exception peErrWrongPDEObjectType
+ @see PDEContentAddElem
+
+ @note This decrements the reference count of the element
+ removed.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEContentRemoveElem,(
+ IN PDEContent pdeContent,
+ IN ASInt32 index)
+ )
+
+/**
+ Inserts an element into a PDEContent.
+
+ @param pdeContent The content to which <code>pdeElement</code> is added.
+
+ @param addAfterIndex The location after which <code>pdeElement</code> is
+ added. It should be kPDEBeforeFirst to add to the beginning
+ of the display list.
+ @param pdeElement The element to add to <code>pdeContent</code>. The
+ reference count of <code>pdeElement</code> is incremented.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEContentRemoveElem
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+ @see PDEContentRemoveElem
+
+ @note This method increments the reference count of <code>pdeElement</code>.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEContentAddElem, (
+ IN PDEContent pdeContent,
+ IN ASInt32 addAfterIndex,
+ IN PDEElement pdeElement)
+ )
+/*------------------------------------------------------------------------
+ General methods for PDEPath, PDEImage and PDEXObject.
+------------------------------------------------------------------------*/
+
+/**
+ Sets the graphics state information for an element.
+
+ <p>This method is valid only for PDEForm, PDEImage, PDEPath, and
+ PDEShading elements. </p>
+
+ @param pdeElement An element whose graphics state is set.
+
+ @param stateP A pointer to a PDEGraphicStateP structure
+ with graphics state information to set for <code>pdeContent</code>. Any
+ of the <code>stateP</code> parameter's color space or ExtGState objects have their
+ reference count incremented.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm will be raised if the first parameter, <code>pdeElement</code>,
+ does not have a graphics state associated with it.
+ @see PDEElementGetGState
+
+ @note This method causes any of the <code>stateP</code> parameter's color space or
+ ExtGState objects to have their reference count incremented,
+ and previous graphic state objects to be decremented.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEElementSetGState, (
+ IN PDEElement pdeElement,
+ IN PDEGraphicStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Sets the transformation matrix for an element.
+
+ <p>The element may not be a PDEContainer, a PDEGroup, a PDEPlace,
+ or a PDEText. </p>
+
+ @param pdeElement IN/OUT An element whose transformation matrix
+ is set.
+ @param matrixP IN/OUT A pointer to an ASFixedMatrix that holds the
+ transformation matrix to set for <code>pdeContent</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEElementGetMatrix
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEElementSetMatrix, (
+ IN PDEElement pdeElement,
+ IN ASFixedMatrixP matrixP)
+ )
+
+/**
+ Sets the current clip for an element.
+
+ The <code>pdeElement</code> parameter's previous clip's reference count is decremented
+ (if it had one), and the <code>pdeClip</code> parameter's reference count is incremented.
+
+ @param pdeElement IN/OUT An element whose clip is set.
+ @param pdeClip IN/OUT The clip to set for <code>pdeContent</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEElementGetClip
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEElementSetClip, (
+ IN PDEElement pdeElement,
+ IN PDEClip pdeClip)
+ )
+
+/**
+ Makes a copy of an element. The caller is responsible for
+ releasing the copy with PDERelease().
+ @param pdeElement IN/OUT The element to copy.
+ @param flags IN/OUT A bit field of PDEElementCopyFlags.
+ @return A copy of <code>pdeElement</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEContentGetElem
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEElement, PDEElementCopy, (
+ IN PDEElement pdeElement,
+ IN ASUns32 flags)
+ )
+
+/*------------------------------------------------------------------------
+ PDEText methods.
+------------------------------------------------------------------------*/
+
+/**
+ Sets the graphics state of a text run.
+
+ @note This method increments the reference count of objects
+ in <code>stateP</code>.
+ @param pdeText The text object containing a text run whose
+ graphics state is set.
+ @param runIndex The index of the text run.
+ @param stateP A pointer to a PDEGraphicStateP structure
+ with the graphics state to set.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetGState
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextRunSetGState, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex,
+ IN PDEGraphicStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Sets the text state of a text run.
+ @param pdeText The text object containing a text run whose
+ text state is set.
+ @param runIndex The index of the text run.
+ @param stateP A pointer to a PDETextState structure with
+ text state.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetTextState
+ @see PDETextRunSetState
+
+ @note This method has the following side effect (Acrobat
+ 5 and later): It modifies the text matrix of the run. In order to
+ maintain backward compatibility, this method only directly
+ operates on the first four fields of PDETextState. When
+ it is called, it calculates a new text matrix with three
+ additional fields: <code>fontSize</code>, <code>hScale</code>, and <code>textRise</code> (see PDETextState).
+ To avoid this behavior, use PDETextRunSetState() instead (which
+ was added to address this problem).
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextRunSetTextState, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex,
+ IN PDETextStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Sets the font of a text run.
+
+ @note This method decrements the reference count of the
+ previous font and increments the reference count of the
+ new font.
+ @param pdeText IN/OUT The text object containing a text run whose
+ font is set.
+ @param runIndex IN/OUT The index of the text run.
+ @param font IN/OUT The font set for the text run.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetFont
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDETextRunSetFont, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex,
+ IN PDEFont font)
+ )
+
+/**
+ Sets the text matrix of a text run.
+ @param pdeText IN/OUT The text object containing a text run whose
+ text matrix is set.
+ @param runIndex IN/OUT The index of the text run.
+ @param matrixP IN/OUT A pointer to an ASFixedMatrix that holds the
+ text matrix.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetTextMatrix
+ @see PDETextRunSetMatrix
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDETextRunSetTextMatrix, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex,
+ IN ASFixedMatrixP matrixP)
+ )
+
+/**
+ Sets the stroke matrix of a text run.
+ @param pdeText The text object containing a text run whose
+ stroke matrix is set.
+ @param runIndex The index of the text run.
+ @param matrixP A pointer to an ASFixedMatrix that holds the
+ stroke matrix.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextGetStrokeMatrix
+
+ @note Currently this method is not implemented (Acrobat 5 and later).
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextRunSetStrokeMatrix, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex,
+ IN ASFixedMatrixP matrixP)
+ )
+
+/**
+ Adds a character or a text run to a PDEThe text object.
+
+ @note This method does not change the reference count of
+ <code>pdeText</code>; however, the reference count of the objects in
+ the <code>gstateP</code> parameter are incremented.
+ @param pdeText The text object to which a character or text
+ run is added.
+ @param flags A PDETextFlags that specifies what kind of
+ text to add. It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index The index after which to add the character or text
+ run.
+ @param text A pointer to the characters to add. Note that passing
+ <code>NULL</code> for the text can invalidate the text object, but will not
+ raise an error. Callers must not pass <code>NULL</code> for this parameter.
+
+ @param textLen The length of the text in bytes.
+ @param font The font for the element.
+ @param gstateP A pointer to a PDEGraphicStateP structure
+ with the graphics state for the element.
+ @param gstateLen The length of the graphics state for the element.
+ @param tstateP A pointer to a PDETextState structure with
+ the text state for the element. Note that PDFEdit ignores the <code>wasSetFlags</code>
+ flag of the PDETextState structure, so you must initialize
+ the PDETextState fields.
+ @param tstateLen The length of the text state for the element.
+
+ @param textMatrixP A pointer to an ASFixedMatrix that holds
+ the matrix for the element.
+ @param strokeMatrixP A pointer to an ASFixedMatrix that holds
+ the matrix for the line width when stroking text. It may be
+ <code>NULL</code>. Note that this field is not currently used (Acrobat 5 and later).
+ @exception pdErrBadResMetrics
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextIsAtPoint
+ @see PDETextReplaceChars
+ @see PDETextSplitRunAt
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextAdd, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ IN ASUns8 *text,
+ IN ASInt32 textLen,
+ IN PDEFont font,
+ IN PDEGraphicStateP gstateP,
+ IN ASUns32 gstateLen,
+ IN PDETextStateP tstateP,
+ IN ASUns32 tstateLen,
+ IN ASFixedMatrixP textMatrixP,
+ IN ASFixedMatrixP strokeMatrixP)
+ )
+
+/**
+ Removes characters or text runs from a text object.
+
+ @param pdeText IN/OUT The text object from which text is removed.
+
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param count IN/OUT The number of characters or text runs to remove.
+
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextAdd
+ @see PDETextReplaceChars
+ @see PDETextSplitRunAt
+
+ @note This method decrements the reference count of objects
+ associated with the <code>pdeText</code> in the graphic state and font.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDETextRemove, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ IN ASInt32 count)
+ )
+
+/**
+ Creates an empty text object.
+
+ <p>Call PDERelease() to dispose of the returned text object when
+ finished with it. </p>
+
+ @return An empty text object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEText, PDETextCreate,
+ (void)
+ )
+
+/*------------------------------------------------------------------------
+ PDEPath methods.
+------------------------------------------------------------------------*/
+
+
+/**
+ Sets new path data for a path element.
+ @param path IN/OUT The path whose data is set.
+ @param data IN/OUT A pointer to the path data. It is a variable-sized
+ array of path operators and operands. The format is a 32-bit operator
+ followed by zero to three ASFixedPoint values, depending
+ on the operator. Operators are codes for <code>moveto</code>, <code>lineto</code>,
+ <code>curveto</code>, <code>rect</code>, or <code>closepath</code> operators, and must be one of
+ PDEPathElementType. Operands are ASFixedPoint values. The
+ data is copied into the PDEPath object.
+ @param dataSize IN/OUT The size of the new path data in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEPathGetData
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEPathSetData, (
+ IN PDEPath path,
+ IN ASInt32 *data,
+ IN ASUns32 dataSize)
+ )
+
+/**
+ Sets the fill and stroke attributes of a path.
+ @param path IN/OUT The path whose fill and stroke attributes are
+ set.
+ @param op IN/OUT The operation to set; it must be one of PDEPathOpFlags.
+
+ @exception peErrWrongPDEObjectType
+ @see PDEPathGetPaintOp
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEPathSetPaintOp, (
+ IN PDEPath path,
+ IN ASUns32 op)
+ )
+
+/**
+ Creates an empty path element.
+
+ <p>Call PDERelease() to dispose of the returned path object when
+ finished with it. </p>
+ @return An empty path element.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEPath, PDEPathCreate, (void)
+ )
+
+/*------------------------------------------------------------------------
+ PDEImage methods.
+------------------------------------------------------------------------*/
+
+/* Image filtering -- see the notes in PERProcs.h
+*/
+
+/**
+ Sets data for an image.
+ @param image IN/OUT The image whose data is set.
+ @param flags IN/OUT A set of PDEImageDataFlags flags. If kPDEImageEncodedData
+ is set, the data must be encoded for the current filters,
+ and <code>encodedLen</code> is the length of the encoded data. If the
+ kPDEImageEncodedData flag is not set, data is not encoded
+ and <code>encodedLen</code> is the size of the decoded data.
+ @param buffer IN/OUT The image data.
+ @param encodedLen IN/OUT The length of the encoded data.
+ @exception peErrUnknownPDEColorSpace
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetData
+ @see PDEImageGetDataLen
+ @see PDEImageGetDataStm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEImageSetData, (
+ IN PDEImage image,
+ IN ASUns32 flags,
+ IN ASUns8 *buffer,
+ IN ASUns32 encodedLen)
+ )
+
+/**
+ Sets a data stream for an image. It can only be used for XObject
+ images.
+
+ <p>The caller must dispose of the stream by calling ASStmClose(). </p>
+
+ @param image IN/OUT The image whose data stream is set.
+ @param flags IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData
+ flag is set, the stream must be encoded.
+ @param filtersP IN/OUT A pointer to a PDEFilterArray structure. If
+ it is not <code>NULL</code>, it is used to build Cos objects for the Filter, DecodeParms,
+ and EncodeParms objects. If <code>filtersP</code> is <code>NULL</code>, the existing
+ Filter and DecodeParms are used. EncodeParms is set it to DecodeParms
+ if it exists.
+ @param stm IN/OUT The stream for the image data.
+ @exception peErrUnknownPDEColorSpace
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEImageGetData
+ @see PDEImageGetDataLen
+ @see PDEImageGetDataStm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEImageSetDataStm, (
+ IN PDEImage image,
+ IN ASUns32 flags,
+ IN PDEFilterArrayP filtersP,
+ IN ASStm stm)
+ )
+
+/**
+ Creates an image object.
+
+ <p>The image data may be specified as a stream or as a buffer.
+ If <code>dataStm</code> is non-<code>NULL</code>, <code>data</code> is ignored. </p>
+
+ <p>See PDEImageSetDataStm() for information on handling the stream. </p>
+
+ <p>The caller must dispose of <code>dataStm</code> after calling this method.</p>
+
+ <p>Call PDERelease() to dispose of the returned image object
+ when finished with it. </p>
+
+ @param attrsP IN/OUT A pointer to a PDEImageAttrs object with attributes
+ of the image.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @param matrixP IN/OUT A pointer to an ASFixedMatrix that holds the
+ transformation matrix to use for the image.
+ @param flags IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData
+ flag is set, and the data is provided directly (not as a
+ stream), then <code>encodedLen</code> must specify the length of data.
+
+ @param colorSpace IN/OUT The color space of the image. When the image
+ is an image mask, <code>colorSpace</code> is the color space of the <code>colorValueP</code>
+ argument.
+ @param colorValueP IN/OUT A pointer to a PDEColorValue structure.
+ If the image is an image mask, <code>colorValueP</code> must be provided.
+
+ @param filtersP IN/OUT A pointer to a PDEFilterArray structure that
+ specifies which filters to use in encoding the contents;
+ it may be <code>NULL</code>. Filters will be used to encode the data in
+ the order in which they are specified in the array.
+ @param dataStm IN/OUT The stream holding the image data.
+ @param data IN/OUT The image data. If <code>dataStm</code> is non-<code>NULL</code>, <code>data</code> is
+ ignored. If there is a great deal of data, as for a large
+ image, it is recommended you use the <code>dataStm</code> parameter for
+ the image data or use the PDEImageCreateFromCosObj() method.
+
+ @param encodedLen IN/OUT The encoded length of <code>data</code> in bytes.
+ @return The image.
+ @exception peErrUnknownPDEColorSpace
+ @exception pageErrReadLessImageData
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEImageCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEImage, PDEImageCreate, (
+ IN PDEImageAttrsP attrsP,
+ IN ASUns32 attrsSize,
+ IN ASFixedMatrixP matrixP,
+ IN ASUns32 flags,
+ IN PDEColorSpace colorSpace,
+ IN PDEColorValueP colorValueP,
+ IN PDEFilterArrayP filtersP,
+ IN ASStm dataStm,
+ IN ASUns8 *data,
+ IN ASUns32 encodedLen)
+ )
+
+/**
+ Creates an image object from a Cos object.
+
+ <p>Call PDERelease() to dispose of the returned image object
+ when finished with it. </p>
+ @param imageObjP IN/OUT The Cos object for the image.
+ @param matrixP IN/OUT A pointer to an ASFixedMatrix that holds the
+ transformation matrix to use for the image.
+ @param colorSpace IN/OUT The color space used for the image, if the
+ image is an image mask; otherwise, set it to <code>NULL</code>.
+ @param colorValueP IN/OUT A pointer to a PDEColorValue structure.
+ If the image is an image mask, <code>colorValueP</code> must be provided.
+
+ @return An image corresponding to the Cos object.
+ @exception peErrUnknownPDEColorSpace
+ @exception pageErrReadLessImageData
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEImageCreate
+ @see PDEImageGetCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEImage, PDEImageCreateFromCosObj, (
+ IN const CosObj *imageObjP,
+ IN ASFixedMatrixP matrixP,
+ IN PDEColorSpace colorSpace,
+ IN PDEColorValueP colorValueP)
+ )
+
+
+/*------------------------------------------------------------------------
+ PDEClip methods.
+------------------------------------------------------------------------*/
+
+/* PDEClip objects can contain PDEContainers and PDEGroups to an
+** arbitrary level of nesting. This allows PDEContainers to be used
+** to mark clip objects.
+**
+** PDEGroups inside PDEClips which contain at least one PDEText,
+** and no PDEPaths have a special meaning. All PDEThe text objects contained
+** in such a PDEGroup are considered to be part of the same BT,ET
+** block. This means that the union of these PDETexts makes up a single
+** clipping path, as opposed to the intersection of the PDETexts.
+*/
+
+/**
+ Adds an element to a clip path.
+ @param clip IN/OUT The clip path to which an element is added.
+
+ @param addAfterIndex IN/OUT The index after which to add <code>pdeElement</code>.
+ Use kPDEBeforeFirst to insert an element at the beginning
+ of the clip object.
+ @param pdeElement IN/OUT The element added, which may be a PDEPath,
+ a PDEText, a PDEContainer, a PDEGroup, or a PDEPlace object.
+
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEClipRemoveElems
+
+ @note This method increments the reference count of <code>pdeElement</code>.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEClipAddElem, (
+ IN PDEClip clip,
+ IN ASInt32 addAfterIndex, /* kPDEBeforeFirst */
+ IN PDEElement pdeElement)
+ )
+
+/**
+ Removes one or more elements from a clip object.
+
+ @note This method decrements the reference count of each
+ of the elements.
+ @param clip IN/OUT The clip object from which an element is removed.
+
+ @param index IN/OUT The first element to remove.
+ @param count IN/OUT The number of elements to remove.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEClipAddElem
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEClipRemoveElems, (
+ IN PDEClip clip,
+ IN ASInt32 index,
+ IN ASInt32 count)
+ )
+
+/**
+ Creates an empty clip object. This represents a clipping
+ object that has no effect on elements that refer to it.
+
+ <p>Call PDERelease() to dispose of the returned clip object when
+ finished with it. </p>
+
+ <p>It raises an exception if it is unable to allocate memory.</p>
+
+ @return The newly created clip object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEClip, PDEClipCreate, (void)
+ )
+
+/*------------------------------------------------------------------------
+ PDEXObject methods.
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new PDEXObject from a Cos object.
+
+ <p>Call PDERelease() to dispose of the returned PDEXObject when
+ finished with it. </p>
+
+ @param cosObjP IN/OUT The Cos object for the PDEXObject.
+ @return A PDEXObject corresponding to <code>cosObjP</code>.
+ @see PDEXObjectGetCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEXObject, PDEXObjectCreate, (
+ IN const CosObj *cosObjP)
+ )
+
+/*------------------------------------------------------------------------
+ PDEForm methods.
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new form from an existing Cos object.
+
+ <p>Call PDERelease() to dispose of the returned form object when
+ finished with it. </p>
+
+ @param xObjectP The Cos object from which a PDEForm is created.
+
+ @param resourcesP The <code>xObjectP</code> parameter's Resources dictionary.
+ If you do not pass in a Resource object, subsequent calls
+ to PDPageAcquirePDEContent() will fail (after the file is
+ saved).
+ @param matrixP A pointer to an ASFixedMatrix that holds the
+ transformation matrix to use for the form.
+ @return The newly created form object.
+ @see PDEFormCreateClone
+ @see PDEFormGetCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(PDEForm, PDEFormCreateFromCosObj, (
+ IN const CosObj *xObjectP,
+ IN const CosObj *resourcesP,
+ IN ASFixedMatrixP matrixP)
+ )
+
+/**
+ Gets a PDEContent object for a form.
+
+ @param form The form whose content is obtained.
+ @return The content for <code>form</code>.
+ @exception peErrWrongPDEObjectType
+ @exception peErrPStackUnderflow
+
+ @note Unlike other <code>GetContent</code> methods, this method does
+ increment the reference count of the returned PDEContent.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(PDEContent, PDEFormGetContent, (
+ IN PDEForm form)
+ )
+
+
+/*------------------------------------------------------------------------
+ PDEPS methods. (Passthrough PostScript)
+------------------------------------------------------------------------*/
+
+/**
+ Sets the data for an object of type PDEPS.
+ @param ps IN/OUT An object of type PDEPS.
+ @param buffer IN/OUT Contains the data.
+ @param bufferSize IN/OUT The length of the data in bytes.
+ @see PDEPSGetData
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDEPSSetData, (
+ IN PDEPS ps,
+ IN ASUns8 *buffer,
+ IN ASUns32 bufferSize)
+ )
+
+/**
+ Sets a stream for the data. The data must be unencoded
+ (no filters). The caller must dispose of the stream.
+ @param ps IN/OUT An object of type PDEPS.
+ @param stm IN/OUT A stream for the data.
+ @see PDEPSGetDataStm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00020000
+
+*/
+UNPROC(void, PDEPSSetDataStm, (
+ IN PDEPS ps,
+ IN ASStm stm )
+ )
+
+/**
+ Creates a PDEPS object. <code>data</code> and <code>dataStm</code> may be <code>NULL</code>. If
+ so, use PDEPSSetData() and PDEPSSetDataStm() to attach data
+ to the object. If <code>dataStm</code> is non-<code>NULL</code>, then <code>data</code> will be
+ ignored.
+
+ <p>See the description of PDEPSSetDataStm() for information on how the stream
+ is handled. If <code>data</code> is non-<code>NULL</code> and <code>dataStm</code> is <code>NULL</code>, the
+ data must contain <code>dataSize</code> number of bytes as specified
+ in the PDEPSAttrsP parameter. </p>
+
+ <p>The caller must dispose of the stream after calling this
+ method. </p>
+
+ <p>Call PDERelease() to dispose of the returned PDEPS object when finished with it. </p>
+
+ @param attrsP IN/OUT A pointer to a PDEPSAttrs attributes data structure.
+
+ @param attrsSize IN/OUT The size of the attributes data structure (set to <code>sizeof(PDEPSAttrs)</code>).
+ @param dataStm IN/OUT (May be <code>NULL</code>) Data. See above.
+ @param data IN/OUT (May be <code>NULL</code>) Data stream. See above.
+ @param dataSize IN/OUT The number of bytes of data.
+ @return An object of type PDEPS.
+ @see PDEPSCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00020000
+
+*/
+UNPROC(PDEPS, PDEPSCreate, (
+ IN PDEPSAttrsP attrsP,
+ IN ASUns32 attrsSize,
+ IN ASStm dataStm,
+ IN ASUns8 *data,
+ IN ASUns32 dataSize)
+ )
+
+/**
+ Creates a PDEPS object from a CosObj object.
+ <p>Call PDERelease() to dispose of the returned PDEPS object when finished with it. </p>
+
+ @param cosObjP IN/OUT An object of type CosObj.
+ @return An object of type PDEPS.
+ @exception genErrBadParm
+ @see PDEPSCreate
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00020000
+
+*/
+UNPROC(PDEPS, PDEPSCreateFromCosObj, (
+ const CosObj *cosObjP)
+ )
+
+/*------------------------------------------------------------------------
+ PDEFont methods.
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new PDEFont from the specified parameters.
+
+ <p>The PDEFont may be represented as an embedded font (a FontFile
+ entry in the font descriptor of the PDF file). To create
+ a PDEFont that is stored as an embedded font, the FontFile
+ stream may be passed in <code>fontStm</code>, and the <code>len1</code>, <code>len2</code>, and
+ <code>len3</code> parameters contain the Length1, Length2, and Length3
+ values of the FontFile stream attributes dictionary. See
+ Section 5.8 in the <i>PDF Reference</i> for more information about
+ embedded fonts. </p>
+
+ <p>The caller must close <code>fontStm</code> with ASStmClose() after invoking
+ PDEFontCreate(). </p>
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ @param attrsP A pointer to a PDEFontAttrs structure for
+ the font attributes.
+ @param attrsSize The size of the <code>attrsP</code> buffer in bytes.
+
+ @param firstChar The first character index for the widths
+ array, <code>widthsP</code>.
+ @param lastChar The last character index for the widths array,
+ <code>widthsP</code>.
+ @param widthsP A pointer to the widths array.
+ @param encoding An array of 256 pointers to glyph names
+ specifying the custom encoding. If any pointer is <code>NULL</code>,
+ no encoding information is written for that entry.
+ @param encodingBaseName The encoding base name if the encoding
+ is a custom encoding. If the encoding is <code>NULL</code>, <code>encodingBaseName</code>
+ is used as the value of the encoding, and must be one of
+ <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, or <code>MacExpertEncoding</code>.
+ If no encoding value is desired, use ASAtomNull.
+ @param fontStm The stream with font information.
+ @param len1 The length in bytes of the ASCII portion of the
+ Type 1 font file after it has been decoded. For other font
+ formats, such as TrueType or CFF, only <code>len1</code> is used, and
+ it is the size of the font.
+ @param len2 The length in bytes of the encrypted portion of
+ the Type 1 font file after it has been decoded.
+ @param len3 The length in bytes of the portion of the Type
+ 1 font file that contains the 512 zeros, plus the <code>cleartomark</code>
+ operator, plus any following data.
+ @return The specified PDEFont.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontEx
+ @see PDEFontCreateFromSysFontWithParams
+ @see PDEFontCreateWithParams
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(PDEFont, PDEFontCreate, (
+ IN PDEFontAttrsP attrsP,
+ IN ASUns32 attrsSize,
+ IN ASInt32 firstChar,
+ IN ASInt32 lastChar,
+ IN ASInt16 *widthsP,
+ IN char **encoding,
+ IN ASAtom encodingBaseName,
+ IN ASStm fontStm,
+ IN ASInt32 len1,
+ IN ASInt32 len2,
+ IN ASInt32 len3)
+ )
+
+/**
+ Creates a PDEFont corresponding to a Cos object of type
+ Font.
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ @param cosObjP IN/OUT The Cos object for which a PDEFont is created.
+
+ @return The PDEFont created from cosObjP.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreate
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontWithParams
+ @see PDEFontCreateWithParams
+ @see PDEFontGetCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEFont, PDEFontCreateFromCosObj, (
+ const CosObj *cosObjP)
+ )
+
+/**
+ Gets a PDEFont corresponding to a font in the system.
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ <p>The PDEFontCreateFlags flags kPDEFontCreateEmbedded and
+ kPDEFontWillSubset must both be set in order to subset a
+ font.</p>
+
+ <p>If you create a PDEFont that is a subset, call PDEFontSubsetNow()
+ on this font afterwards. </p>
+ @param sysFont A PDSysFont object referencing a system
+ font.
+ @param flags Indicates whether to embed the font and whether
+ to subset the font. It must be one of PDEFontCreateFlags. If
+ you want to subset a font, set both the kPDEFontCreateEmbedded
+ and kPDEFontWillSubset flags.
+ @return The PDEFont corresponding to sysFont.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreate
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFontAndEncoding
+ @see PDEFontCreateFromSysFontWithParams
+ @see PDEnumSysFonts
+
+ @note If you have an environment with no Acrobat Language kit
+ installed, trying to acquire a PDEFont from the system font
+ may raise an exception for some of the operating system fonts. In other
+ words, if you use PDEnumSysFonts() to get the system font
+ attributes, not all of the system fonts will necessarily
+ be used to create the PDEFont.
+
+ @note If you want to use <code>WinAnsiEncoding</code> on UNIX, do not
+ use this method. Use PDEFontCreateFromSysFontWithParams()
+ or PDEFontCreateFromSysFontAndEncoding() instead.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(PDEFont, PDEFontCreateFromSysFont, (
+ IN PDSysFont sysFont,
+ IN ASUns32 flags)
+ )
+
+/*------------------------------------------------------------------------
+ PDEColorSpace methods.
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new color space object.
+
+ <p>Call PDERelease() to dispose of the returned color space object
+ when finished with it. </p>
+
+ @param name IN/OUT The ASAtom for the name of the color space
+ created. The name must be one of the following: DeviceCMYK,
+ DeviceGray, or DeviceRGB.
+ @return The newly created color space object.
+ @exception cosErrExpectedName
+ @exception genErrBadParm
+ @exception peErrUnknownPDEColorSpace
+ @see PDEColorSpaceCreate
+ @see PDEColorSpaceCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEColorSpace, PDEColorSpaceCreateFromName, (
+ IN ASAtom name)
+ )
+
+/**
+ Creates a new color space object from a Cos object.
+
+ <p>Call PDERelease() to dispose of the returned color space object
+ when finished with it. </p>
+
+ @param cosObjP IN/OUT Supports all PDF 1.3 color spaces, which
+ include:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Type of names</TH><TH>Names</TH></TR>
+ <TR><TD>Device-dependent names</TD><TD><ul><li><code>DeviceCMYK</code></li><li><code>DeviceGray</code></li><li><code>DeviceN</code></li><li><code>DeviceRGB</code></li></ul></TD></TR>
+ <TR><TD>Device-independent names</TD><TD><ul><li><code>CalGray</code></li><li><code>CalRGB</code></li><li><code>Lab</code></li><li><code>ICCBased</code></li></ul></TD></TR>
+ <TR><TD>Special names</TD><TD><ul><li><code>Indexed</code></li><li><code>Pattern</code></li><li><code>Separation</code></li></ul></TD></TR>
+ </TABLE>
+
+ @return The newly created color space object.
+ @exception cosErrExpectedArray
+ @exception genErrBadParm
+ @exception peErrUnknownPDEColorSpace
+ @see PDEColorSpaceCreate
+ @see PDEColorSpaceCreateFromName
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEColorSpace, PDEColorSpaceCreateFromCosObj, (
+ IN const CosObj *cosObjP)
+ )
+/*------------------------------------------------------------------------
+ Client Tag methods.
+------------------------------------------------------------------------*/
+
+/**
+ Adds an identifier-value pair to an object.
+
+ <p>The clientID-tag combination is a unique identifier for
+ the value. Each client has its own identifier space. It
+ is often convenient to use ASAtoms as tags. </p>
+
+ @param object The element to tag. The object may be a PDEElement,
+ PDEContent, PDEFont, PDEColorSpace, and so on.
+ @param clientID Identifies the caller/client. For clients,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, <code>clientID</code> should be zero. If there are multiple
+ clients, each should specify a nonzero, non-negative <code>clientID</code>.
+ (A negative <code>clientID</code> is reserved for the implementation.)
+
+ @param tag The tag to add to <code>object</code>. If <code>tag</code> is <code>0</code>, this
+ is the same as calling PDERemoveTag(). In other words, you
+ cannot tell the difference between a tag whose value is
+ zero and a tag that is nonexistent.
+ @param value A pointer to a value to associate with <code>object</code>.
+ Only the pointer is stored. If the pointer points to data,
+ it is the responsibility of the client to manage the data
+ and its memory.
+ @exception peErrWrongPDEObjectType
+ @see PDEGetTag
+ @see PDERemoveTag
+
+ @note Tags are a purely memory-resident feature. In addition,
+ management of tags is the responsibility of the client.
+ A client must manage any memory pointed to by a tag. This
+ method only contains a pointer to the data passed in by
+ the client. The data and the pointer will not be saved to
+ a file. The generic pointer type is not in the PDF specification.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEAddTag, (
+ IN PDEObject object,
+ IN ASInt32 clientID,
+ IN ASUns32 tag,
+ IN void *value)
+ )
+
+/**
+ Gets an object's value for a given clientID-tag identifier
+ that was added by PDEAddTag.
+ @param object The element whose value is obtained.
+ @param clientID Identifies the caller/client. For clients,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, <code>clientID</code> should be zero. If there are multiple
+ clients, each should specify a nonzero, non-negative <code>clientID</code>.
+ (A negative <code>clientID</code> is reserved for the implementation.)
+
+ @param tag The object's tag. If object has no tag, this
+ is <code>0</code>.
+ @return The value associated with the clientID-tag identifier.
+ @exception peErrWrongPDEObjectType
+ @see PDEAddTag
+ @see PDERemoveTag
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void *, PDEGetTag, (
+ IN PDEObject object,
+ IN ASInt32 clientID,
+ IN ASUns32 tag)
+ )
+
+/**
+ Removes an object's value for a given clientID-tag identifier
+ that was added by PDEAddTag.
+
+ <p>If PDEAddTag is called with a <code>0</code> tag, this is the same as
+ calling PDERemoveTag(). </p>
+ @param object The element whose tag is removed.
+ @param clientID Identifies the caller/client. For clients,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, <code>clientID</code> should be zero. If there are multiple
+ clients, each should specify a nonzero, non-negative <code>clientID</code>.
+ (A negative <code>clientID</code> is reserved for the implementation.)
+
+ @param tag The tag value.
+ @exception peErrWrongPDEObjectType
+ @see PDEAddTag
+ @see PDEGetTag
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDERemoveTag, (
+ IN PDEObject object,
+ IN ASInt32 clientID,
+ IN ASUns32 tag)
+ )
+
+/*------------------------------------------------------------------------
+ Utility methods.
+------------------------------------------------------------------------*/
+
+/**
+ Merges two Resources dictionaries in the same CosDoc; you
+ cannot merge two resource dictionaries from different CosDocs.
+
+ <p>Both dictionaries and what they reference must be in <code>cosDoc</code>.
+ The objects referenced by <code>newResP</code> are appended to <code>resDictP</code>. </p>
+
+ <p>This method only operates on the Cos dictionaries. It assumes
+ there are no resource name conflicts. </p>
+
+ <p>This method is useful for adding form resources to page
+ resource dictionaries. This is only necessary if creating
+ PDF 1.1 or earlier files for use with Acrobat 2.1 or earlier.
+ This is unnecessary if creating PDF 1.2 or later documents. </p>
+
+ @param resDictP IN/OUT (Filled by the method) The dictionary to which
+ <code>newResP</code> is merged. When the method completes, <code>resDictP</code> is
+ the merged dictionary result.
+ @param cosDoc IN/OUT The CosDoc containing both dictionaries.
+ @param newResP IN/OUT The dictionary to merge with <code>resDictP</code>.
+ @exception genErrBadParm
+
+ @note Since PDFEdit resolves resource names across PDEContent
+ objects, this routine is safe for using with PDFEdit methods.
+ This method may be unsafe if you modify streams and dictionaries
+ outside of the PDFEdit API.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEMergeResourcesDict, (
+ OUT CosObj *resDictP,
+ IN CosDoc cosDoc,
+ IN const CosObj *newResP)
+ )
+
+/*------------------------------------------------------------------------
+ Notification methods.
+------------------------------------------------------------------------*/
+
+
+/*------------------------------------------------------------------------
+ Methods added after version 0.2
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new PDEExtGState from a Cos object. See Section
+ 4.3.4 in the <i>PDF Reference</i> for more information about extended
+ graphics states.
+
+ <p>Call PDERelease() to dispose of the returned PDEExtGState
+ when finished with it. </p>
+
+ @param cosObjP A Cos object for a dictionary of type ExtGState.
+ @return The PDEExtGState for <code>cosObjP</code>.
+ @see PDEElementSetGState
+ @see PDEExtGStateGetCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(PDEExtGState, PDEExtGStateCreate, (
+ IN CosObj *cosObjP)
+ )
+
+/**
+ Creates a place object.
+
+ <p>Call PDERelease() to dispose of the returned place object
+ when finished with it. </p>
+
+ @param mcTag IN/OUT The tag name for the place. It must not contain any
+ white space characters (for example, spaces or tabs).
+ @param cosObjP IN/OUT An optional Marked Content dictionary associated
+ with the place.
+ @param isInline If <code>true</code>, it emits the place's dictionary
+ into the content stream inline. If <code>false</code>, then the dictionary
+ is emitted outside of the content stream and referenced by name.
+ See the Property Lists section in the <i>PDF Reference</i> for more details.
+ @return The place object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEPlace, PDEPlaceCreate, (
+ IN ASAtom mcTag,
+ IN CosObj *cosObjP,
+ IN ASBool isInline)
+ )
+
+/**
+ Sets the Marked Content tag for a PDEPlace.
+ @param pdePlace IN/OUT The place whose Marked Content tag is set.
+
+ @param mcTag IN/OUT The tag for <code>pdePlace</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEPlaceGetMCTag
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEPlaceSetMCTag, (
+ IN PDEPlace pdePlace,
+ IN ASAtom mcTag)
+ )
+
+/**
+ Sets the Marked Content dictionary for a PDEPlace. The dictionary can be
+ emitted inline or referenced from the <code>\\Properties</code> key in the <code>\\Resources</code>
+ dictionary of the containing stream.
+
+ @param pdePlace IN/OUT The place whose Marked Content dictionary
+ is set.
+ @param placeDictP IN/OUT The Marked Content dictionary for <code>pdePlace</code>.
+
+ @param isInline If <code>true</code>, it emits the place's dictionary
+ into the content stream inline. If <code>false</code>, then the dictionary
+ is emitted outside of the content stream and referenced by name.
+ See the <i>Property Lists</i> section in the <i>PDF Reference</i> for more details.
+
+ @exception peErrWrongPDEObjectType
+ @see PDEPlaceGetDict
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEPlaceSetDict, (
+ IN PDEPlace pdePlace,
+ IN CosObj *placeDictP,
+ IN ASBool isInline)
+ )
+
+/**
+ Creates a container object.
+
+ <p>Call PDERelease() to dispose of the returned container object
+ when finished with it. </p>
+ @param mcTag IN/OUT The tag name for the container.
+ @param cosObjP IN/OUT An optional Marked Content dictionary for the
+ container.
+ @param isInline If <code>true</code>, it emits the container's dictionary
+ into the content stream inline. If <code>false</code>, then the dictionary
+ is emitted outside of the content stream and referenced by name.
+ See the Property Lists section in the <i>PDF Reference</i> for more details.
+ @return The newly created container object.
+ @exception pdErrOpNotPermitted
+ @see PDEContainerGetMCTag
+ @see PDEContainerSetMCTag
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEContainer, PDEContainerCreate, (
+ IN ASAtom mcTag,
+ IN CosObj *cosObjP,
+ IN ASBool isInline)
+ )
+
+/**
+ Sets the Marked Content tag for a PDEContainer.
+ @param pdeContainer IN/OUT The container to tag.
+ @param mcTag IN/OUT The Marked Content tag.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEContainerCreate
+ @see PDEContainerGetMCTag
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEContainerSetMCTag, (
+ IN PDEContainer pdeContainer,
+ IN ASAtom mcTag)
+ )
+
+/**
+ Sets the Marked Content dictionary for a PDEContainer. The dictionary can be emitted inline
+ or referenced from the <code>\\Properties</code> key in the <code>\\Resources</code>
+ dictionary of the containing stream.
+
+ @param pdeContainer The container whose dictionary is
+ changed.
+ @param placeDictP The Marked Content dictionary being set
+ into <code>pdeContainer</code>.
+ @param isInline If <code>true</code>, it emits the container's dictionary
+ into the content stream inline. If <code>false</code>, then the dictionary
+ is emitted outside of the content stream and referenced by name.
+ See the <i>Property Lists</i> section in the <i>PDF Reference</i> for more details.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEContainerGetDict
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEContainerSetDict, (
+ IN PDEContainer pdeContainer,
+ IN CosObj *placeDictP,
+ IN ASBool isInline)
+ )
+
+/**
+ Sets the content for a container. The existing PDEContent
+ is released by this method.
+
+ @note This method decrements the reference count of the
+ previous content of the container and increments the reference
+ count of the new PDEContent.
+ @param pdeContainer IN/OUT A container.
+ @param pdeContent IN/OUT The content of <code>pdeContainer</code>.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEContainerGetContent
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEContainerSetContent, (
+ IN PDEContainer pdeContainer,
+ IN PDEContent pdeContent)
+ )
+
+/**
+ Splits a text run into two text runs.
+ @param pdeText The text object containing a text run to split.
+
+ @param splitLoc The split location, relative to the text object.
+ The first text run is from character index <code>0</code> up to <code>splitLoc</code>.
+ The second text run is from <code>splitLoc + 1</code> to the end of the
+ run.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextIsAtPoint
+ @see PDETextReplaceChars
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDETextSplitRunAt, (
+ IN PDEText pdeText,
+ IN ASInt32 splitLoc)
+ )
+
+/**
+ Creates a pattern object that can be used for a Pattern
+ color space. See Section 4.6 in the <i>PDF Reference</i> for more
+ information about patterns.
+
+ <p>Call PDERelease() to dispose of the returned pattern object
+ when finished with it. </p>
+ @param cosObjP IN/OUT A CosObj stream for the pattern.
+ @return A pattern.
+ @see PDEPatternGetCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEPattern, PDEPatternCreate, (
+ const CosObj *cosObjP)
+ )
+
+/**
+ Replaces characters in a text object.
+
+ <p>This method does not change the number of characters in
+ the text object; extra characters are ignored. </p>
+
+ @param pdeText IN/OUT The text object in which characters are replaced.
+
+ @param flags IN/OUT A PDETextFlags that specifies whether <code>index</code>
+ refers to the character offset from the beginning of the
+ text object or the index of the text run in the text object.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index IN/OUT The index of the character or text run in <code>pdeText</code>.
+
+ @param textBuffer IN/OUT Replacement text.
+ @param numChars IN/OUT The number of bytes to replace.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextAdd
+ @see PDETextIsAtPoint
+ @see PDETextSplitRunAt
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDETextReplaceChars, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ IN ASUns8 *textBuffer,
+ IN ASInt32 numChars)
+ )
+
+/**
+ Clears the PDE Cache of this PDDoc. This method is only
+ of interest to clients.
+
+ @note It is not recommended that you call this method directly;
+ it is provided only for backwards compatibility.
+ @param doc A PDDoc whose cache is purged.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEPurgeCache, (
+ IN PDDoc doc)
+ )
+
+/**
+ Subsets a given PDEFont in a CosDoc.
+
+ <p>If you created font with PDEFontCreateFromSysFont(), you must
+ have set both the kPDEFontCreateEmbedded and kPDEFontWillSubset
+ set in the <code>flags</code> parameter, to be able to subset the font. </p>
+ @param font IN/OUT The PDEFont to subset.
+ @param cosDoc IN/OUT The CosDoc whose font is subsetted.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreateFromSysFont
+
+ @note This method does not change the reference count.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEFontSubsetNow, (
+ IN PDEFont font,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Adds a segment to a path. The number of ASFixed values used
+ depends upon <code>segType</code>:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH><code>segType</code></TH><TH>ASFixed values</TH></TR>
+ <TR><TD>kPDEMoveTo</TD><TD><ul><li><code>x1</code></li><li><code>y1</code></li></ul></TD></TR>
+ <TR><TD>kPDELineTo</TD><TD><ul><li><code>x1</code></li><li><code>y1</code></li></ul></TD></TR>
+ <TR><TD>kPDECurveTo</TD><TD><ul><li><code>x1</code></li><li><code>y1</code></li><li><code>x2</code></li><li><code>y2</code></li><li><code>y3</code></li></ul></TD></TR>
+ <TR><TD>kPDECurveToV</TD><TD><ul><li><code>x1</code></li><li><code>y1</code></li><li><code>x2</code></li><li><code>y2</code></li></ul></TD></TR>
+ <TR><TD>kPDECurveToY</TD><TD><ul><li><code>x1</code></li><li><code>y1</code></li><li><code>x2</code></li><li><code>y2</code></li></ul></TD></TR>
+ <TR><TD>kPDERect</TD><TD><ul><li><code>x1</code></li><li><code>y1</code></li><li><code>x2</code> (width)</li><li><code>y2</code> (height)</li></ul></TD></TR>
+ <TR><TD>kPDEClosePath</TD><TD>None</TD></TR>
+ </TABLE>
+
+ @param path IN/OUT The path to which a segment is added.
+ @param segType IN/OUT A PDEPathElementType value indicating the type
+ of path to add.
+ @param x1 IN/OUT The x-coordinate of the first point.
+ @param y1 IN/OUT The y-coordinate of the first point.
+ @param x2 IN/OUT The x-coordinate of the second point.
+ @param y2 IN/OUT The y-coordinate of the second point.
+ @param x3 IN/OUT The x-coordinate of the third point.
+ @param y3 IN/OUT The y-coordinate of the third point.
+ @exception genErrBadParm
+ @see PDEPathSetData
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEPathAddSegment, (
+ IN PDEPath path,
+ IN ASUns32 segType,
+ IN ASFixed x1,
+ IN ASFixed y1,
+ IN ASFixed x2,
+ IN ASFixed y2,
+ IN ASFixed x3,
+ IN ASFixed y3)
+ )
+
+/*------------------------------------------------------------------------
+ Methods added after version 0.9
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new PDEFont from <code>params</code>.
+
+ <p>The PDEFont may be represented as an embedded font (a FontFile
+ value in PDF). To create a PDEFont that will be stored as
+ an embedded font, the FontFile stream may be passed as <code>fontStm</code>,
+ and the <code>len1</code>, <code>len2</code>, and <code>len3</code> parameters contain the Length1,
+ Length2, and Length3 values of the FontFile. The caller
+ must close the <code>fontStm</code> after calling this method. This method
+ supports multi-byte fonts. </p>
+
+ <p>This method extends PDEFontCreate() to support multi-byte
+ fonts. </p>
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ @param params IN/OUT A pointer to a structure containing all font
+ parameters necessary to fully define a font.
+ @return A PDEFont object of the font described by the parameters.
+
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreate
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontEx
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEFont, PDEFontCreateWithParams, (
+ IN PDEFontCreateParams params)
+ )
+
+/**
+ Creates a new color space object of the specified type.
+
+ <p>Call PDERelease() to dispose of the returned color space object
+ when finished with it. </p>
+
+ @param family IN/OUT Supports all PDF 1.3 color spaces, which
+ include:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Type of names</TH><TH>Names</TH></TR>
+ <TR><TD>Device-dependent names</TD><TD><ul><li><code>DeviceCMYK</code></li><li><code>DeviceGray</code></li><li><code>DeviceN</code></li><li><code>DeviceRGB</code></li></ul></TD></TR>
+ <TR><TD>Device-independent names</TD><TD><ul><li><code>CalGray</code></li><li><code>CalRGB</code></li><li><code>Lab</code></li><li><code>ICCBased</code></li></ul></TD></TR>
+ <TR><TD>Special names</TD><TD><ul><li><code>Indexed</code></li><li><code>Pattern</code></li><li><code>Separation</code></li></ul></TD></TR>
+ </TABLE>
+
+ @param csStruct IN/OUT Data for the type of color space you want
+ to create.
+ @return The newly created color space object.
+ @exception cosErrExpectedArray
+ @exception genErrBadParm
+ @exception peErrUnknownPDEColorSpace
+ @see PDEColorSpaceCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEColorSpace, PDEColorSpaceCreate, (
+ ASAtom family, PDEColorSpaceStruct *csStruct)
+ )
+
+/**
+ Creates an object that can be used to store <code>n</code> color components
+ when in a DeviceN color space.
+ <p>Call PDERelease() to dispose of the returned PDEDeviceNColors object when finished with it. </p>
+
+ @param pColorValues IN/OUT A pointer to an array of ASFixed values.
+
+ @param numValues IN/OUT The length of the array.
+ @return An object containing values specifying a color in a PDEDeviceNColors
+ color space.
+ @exception genErrNoMemory
+ @see PDEDeviceNColorsGetColorValue
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEDeviceNColors, PDEDeviceNColorsCreate, (
+ IN ASFixed *pColorValues,
+ IN ASInt32 numValues)
+ )
+
+/**
+ Creates a smooth shading object.
+ <p>Call PDERelease() to dispose of the returned PDEShading object when finished with it. </p>
+ @param shadingP IN/OUT The shading dictionary.
+ @param matrixP IN/OUT The location and transformation matrix of
+ the shading object.
+ @return A smooth shading object.
+ @exception peErrUnknownPDEColorSpace
+ @exception cosErrInvalidObj
+ @exception cosErrExpectedName
+ @exception genErrBadParm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEShading, PDEShadingCreateFromCosObj, (
+ IN const CosObj *shadingP,
+ IN ASFixedMatrixP matrixP)
+ )
+
+/**
+ Creates a PDEGroup object.
+ <p>Call PDERelease() to dispose of the returned PDEGroup object when finished with it. </p>
+ @return The newly created PDEGroup.
+ @see PDEGroupSetContent
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEGroup, PDEGroupCreate, (void))
+
+/**
+ Sets the PDEContent for a PDEGroup. The existing PDEContent
+ is released by this method.
+
+ @note This method increments the reference count of <code>pdeContent</code>.
+
+ @param pdeGroup IN/OUT A container object.
+ @param pdeContent IN/OUT The content to set for <code>pdeGroup</code>.
+ @exception peErrWrongPDEObjectType
+ @see PDEGroupGetContent
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEGroupSetContent, (
+ IN PDEGroup pdeGroup,
+ IN PDEContent pdeContent)
+ )
+
+
+/**
+ Creates a PDEFont corresponding to a font in the system.
+
+ <p>If the font is a Multiple Master font, <code>mmDesignVector</code> points
+ to the design vector, whose length must equal the number
+ of design axes of the font. </p>
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ <p>The PDEFontCreateFlags flags kPDEFontCreateEmbedded and
+ kPDEFontWillSubset must both be set in order to subset a
+ font. </p>
+
+ <p>If you create a PDEFont that is subsetted, call PDEFontSubsetNow()
+ on this font afterwards. </p>
+
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font.
+ @param flags IN/OUT Indicates whether to embed the font and whether
+ to subset the font. It must be one of PDEFontCreateFlags. If
+ you want to subset a font, set both the kPDEFontCreateEmbedded
+ and kPDEFontWillSubset flags.
+ @param snapshotName IN/OUT The name to be associated with this particular
+ instantiation of the PDEFont.
+ @param mmDesignVec IN/OUT A pointer to the Multiple Master font design
+ vector.
+ @return The PDEFont corresponding to <code>sysFont</code>.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontWithParams
+ @see PDEFontCreateWithParams
+ @see PDEnumSysFonts
+
+ @note If you have environment with no Acrobat Language kit
+ installed, trying to acquire a PDEFont from the system font
+ may raise an exception for some of the system fonts. In
+ other words, if you use PDEnumSysFonts() to get the system
+ font attributes, not all of the system fonts are necessarily
+ used to create the PDEFont.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEFont, PDEFontCreateFromSysFontEx, (
+ IN PDSysFont sysFont,
+ IN ASUns32 flags,
+ IN ASAtom snapshotName,
+ IN ASFixed *mmDesignVec)
+ )
+
+/**
+ Makes a deep copy of a PDEClip object.
+
+ <p>Call PDERelease() to dispose of the returned clip object when
+ finished with it. </p>
+
+ <p>It raises an exception if it is unable to allocate memory.</p>
+ @param srcClip IN/OUT The clipping path to copy.
+ @return The deep copy of <code>srcClip</code>.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(PDEClip, PDEClipCopy, (
+ IN PDEClip srcClip)
+ )
+
+/**
+ Sets the decode array of an image.
+
+ <p>Normally, the decode array is accessed through the <code>decode</code>
+ field in the PDEImageAttrs structure. However, this method
+ defines a decode array to handle images with a color space
+ that has more than four components. </p>
+
+ @param image The image whose decode array is set.
+ @param decode A pointer to the decode array.
+ @param decodeSize The number of elements in the decode array.
+ @see PDEImageGetDecodeArray
+ @see PDEImageGetFilterArray
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+UNPROC(void, PDEImageSetDecodeArray, (
+ IN PDEImage image,
+ IN ASFixed *decode,
+ IN ASUns32 decodeSize)
+ )
+
+/**
+ Adds the specfied PDPage to the PDEContent as an Xobject form.
+ It adds a reference to the Xobject form at the indicated index in
+ the PDE Content; the index may be less than <code>0</code>, which indicates the object is
+ to be appended to the content.
+ @param theContent The content to set for the page.
+ @param insertAfterIndex The index indicates the location after which the specified
+ element is to be added. The index should be kPDBeforeFirst to add to the beginning
+ of the display list.
+ @param containerDoc The CosDoc in which the page is contained.
+ @param srcPage The page that will be inserted at <code>insertAfterIndex</code> in <code>theContent</code>.
+ @param dstMatrix (May be <code>NULL</code>) The matrix applied to the default matrix of the PDPage that is inserted
+ into the CosDoc.
+ @param annotTypes If the page contains annotations, the <code>annotTypes</code> list is used to determine
+ which annotation types are pumped into the page contents of the CosDoc.
+ @param flags (May be <code>0</code>) kAnnotAll specifies all annotation types. If this is not set, then
+ the <code>annotTypes</code> list will be consulted.
+ @param bbox (May be <code>NULL</code>) specifies the destination <code>BBox</code> for the page being inserted.
+ If it is <code>NULL</code>, the new page's media box is used.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+*/
+XNPROC(void, PDEContentAddPage, (OUT PDEContent theContent,
+ IN ASInt32 insertAfterIndex,
+ IN CosDoc containerDoc,
+ IN PDPage srcPage,
+ IN ASFixedMatrix * dstMatrix,
+ IN ASAtom annotTypes[],
+ IN ASInt32 flags,
+ IN ASFixedRect * bbox)
+ )
+
+/**
+ Embeds the given PDEFont inside doc without creating a subset.
+ Use this method instead of PDEFontSubsetNow() if you created the
+ font with the <code>willSubset</code> flag but changed your mind.
+ @param font The font to embed.
+ @param cosDoc The container document.
+ @see PDEFontEmbedNow
+ @see PDEFontIsEmbedded
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(void, PDEFontEmbedNowDontSubset, (
+ IN PDEFont font,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Gets a Type0 font's width information for only those characters
+ used in the file. Call this routine when the font was created
+ with the kPDEFontDeferWidths flag but without the kPDEFontCreateEmbedded
+ flag (if the font is to be embedded, call PDEFontSubsetNow(),
+ which also gets the width info).
+ @param font The font whose widths are found.
+ @param cosDoc The container document.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(void, PDEFontGetWidthsNow, (
+ IN PDEFont font,
+ IN CosDoc cosDoc)
+ )
+
+/* APIs added for 5.0 start here */
+
+/**
+ Creates a new PDEBeginContainer object. Call PDERelease to dispose of the
+ returned PDEBeginContainer object when finished with it.
+ <p>Call PDERelease() to dispose of the returned PDEBeginContainer object when finished with it. </p>
+ @param mcTag IN/OUT The tag name for the marked-content sequence.
+ @param cosObjP IN/OUT (May be <code>NULL</code>) A CosDict object containing
+ the property list for the sequence.
+ @param isInline If <code>true</code>, it emits the container's dictionary
+ into the content stream inline. If <code>false</code>, then the dictionary
+ is emitted outside of the content stream and referenced by name.
+ See the Property Lists section in the <i>PDF Reference</i> for more details.
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEBeginContainer, PDEBeginContainerCreate, (
+ IN ASAtom mcTag,
+ IN CosObj *cosObjP,
+ IN ASBool isInline)
+ )
+
+/**
+ Sets the marked content tag for a PDEBeginContainer.
+ @param pdeBeginContainer IN/OUT The PDEBeginContainer object.
+
+ @param mcTag IN/OUT The tag name.
+ @exception peErrWrongPDEObjectType if <code>pdeBeginContainer</code> is <code>NULL</code> or
+ is not the right type.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEBeginContainerSetMCTag, (
+ IN PDEBeginContainer pdeBeginContainer,
+ IN ASAtom mcTag)
+ )
+
+/**
+ Sets the property list for a PDEBeginContainer. The property
+ list is passed as a Cos dictionary that can be emitted inline
+ or referenced from the <code>\\Properties</code> key in the <code>\\Resources</code>
+ dictionary of the containing stream.
+
+ @note If cosObjP is <code>NULL</code>, the property list is cleared.
+ @param pdeBeginContainer IN/OUT The PDEBeginContainer object.
+ @param pdeBeginContainerDictP IN/OUT (May be <code>NULL</code>) The Cos dictionary containing
+ the property list.
+ @param isInline If <code>true</code>, it emits the container's dictionary
+ into the content stream inline. If <code>false</code>, then the dictionary
+ is emitted outside of the content stream and referenced by name.
+ See the <i>Property Lists</i> section in the <i>PDF Reference</i> for more details.
+ @exception peErrWrongPDEObjectType is raised if <code>pdeBeginContainer</code> is <code>NULL</code> or
+ not the right type.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEBeginContainerSetDict, (
+ IN PDEBeginContainer pdeBeginContainer,
+ IN CosObj *pdeBeginContainerDictP,
+ IN ASBool isInline)
+ )
+
+/**
+ Creates a new soft mask object from its Cos representation.
+ <p>Call PDERelease() to dispose of the returned PDESoftMask object when finished with it. </p>
+
+ @param cosObjP IN/OUT The soft mask dictionary.
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDESoftMask, PDESoftMaskCreateFromCosObj, (
+ IN const CosObj *cosObjP)
+ )
+
+/**
+ Creates a new soft mask object.
+ <p>Call PDERelease() to dispose of the returned PDESoftMask object when finished with it. </p>
+ @param cosDoc IN/OUT The container document.
+ @param type IN/OUT Specifies how the mask is to be computed. It is one
+ of the PDESoftMaskCreateFlags.
+ @param pdeForm IN/OUT The form XObject that defines the soft mask.
+ It is the source of the mask values and the PDColorSpace
+ in which the composite computation is to be done.
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDESoftMask, PDESoftMaskCreate, (
+ IN CosDoc cosDoc,
+ IN PDESoftMaskCreateFlags type,
+ IN PDEForm pdeForm)
+ )
+
+/**
+ Sets the PDEForm that defines the soft mask.
+ @param pdeSoftMask IN/OUT The soft mask object.
+ @param pdeForm IN/OUT The form XObject.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDESoftMaskSetXGroup, (
+ IN PDESoftMask pdeSoftMask,
+ IN PDEForm pdeForm)
+ )
+
+/**
+ Sets the backdrop color values.
+ @param pdeSoftMask IN/OUT The soft mask object.
+ @param pColorValues IN/OUT A series of color values.
+ @param numValues IN/OUT The number of values pointed to by <code>pColorValues</code>.
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDESoftMaskSetBackdropColor, (
+ IN PDESoftMask pdeSoftMask,
+ IN ASFixed *pColorValues,
+ IN ASInt32 numValues)
+ )
+
+/**
+ Sets the transfer function associated with the soft mask.
+
+ @param pdeSoftMask IN/OUT The soft mask object.
+ @param cosTransferFunction IN/OUT The transfer function dictionary.
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDESoftMaskSetTransferFunction, (
+ IN PDESoftMask pdeSoftMask,
+ IN CosObj cosTransferFunction)
+ )
+
+/*------------------------------------------------------------------------
+ PDEXGroup Methods added to support Transparency
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new XGroup object from its Cos representation.
+ <p>Call PDERelease() to dispose of the returned PDEXGroup object when finished with it. </p>
+
+ @param cosObjP IN/OUT The XGroup object dictionary.
+ @return The PDEXGroup object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEXGroup, PDEXGroupCreateFromCosObj, (
+ IN const CosObj *cosObjP)
+ )
+
+/**
+ Create a new XGroup of the given type.
+ <p>Call PDERelease() to dispose of the returned PDEXGroup object when finished with it. </p>
+ @param cosDoc The document in which the object will be created.
+
+ @param type It must be kPDEXGroupTypeTransparency.
+ @return The newly created transparency group object.
+ @since PI_PDFEDIT_READ_VERSION >= 0x00050000
+*/
+UNPROC( PDEXGroup, PDEXGroupCreate, (
+ IN CosDoc cosDoc,
+ IN PDEXGroupCreateFlags type)
+ )
+
+/**
+ Sets the knockout value.
+ @param pdeXGroup IN/OUT The transparency group object.
+ @param knockout IN/OUT The knockout value.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEXGroupSetKnockout, (
+ IN PDEXGroup pdeXGroup,
+ IN ASBool knockout)
+ )
+
+/**
+ Sets the XGroup to be isolated or not. It corresponds to the
+ / I key within the XGroup's dictionary.
+ @param pdeXGroup IN/OUT The transparency group object.
+ @param isolated IN/OUT <code>true</code> to isolate the XGroup, <code>false</code> otherwise.
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEXGroupSetIsolated, (
+ IN PDEXGroup pdeXGroup,
+ IN ASBool isolated)
+ )
+
+/**
+ Sets the PDEXObject that defines the color space into which
+ colors are converted when painted into this group.
+ @param pdeXGroup The transparency group object.
+ @param pdeColorSpace The color space to associate with
+ the XGroup.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC( void, PDEXGroupSetColorSpace, (
+ IN PDEXGroup pdeXGroup,
+ IN PDEColorSpace pdeColorSpace)
+ )
+
+/**
+ Sets the transparency group dictionary of the form XObject.
+
+ @param pdeForm IN/OUT The font XObject.
+ @param pdeXGroup IN/OUT The transparency dictionary.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEFormSetXGroup, (
+ IN PDEForm pdeForm,
+ IN PDEXGroup pdeXGroup)
+ )
+
+/*------------------------------------------------------------------------
+ Methods added to support ExtGState
+------------------------------------------------------------------------*/
+
+/**
+ Creates a new extended graphics state object.
+ <p>Call PDERelease() to dispose of the returned PDEExtGState object when finished with it. </p>
+ @param cosDoc IN/OUT The document within which the object will be used.
+
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEExtGState, PDEExtGStateCreateNew, (
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Sets the overprint mode. It corresponds to the / OPM key within
+ the ExtGState's dictionary.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param opm IN/OUT Overprint mode.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetOPM, (
+ IN PDEExtGState pdeExtGState,
+ IN ASInt32 opm)
+ )
+
+/**
+ Specifies if overprint is enabled for painting operations
+ other than stroking. It corresponds to the / op key within
+ the ExtGState's dictionary.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param overprint IN/OUT Pass <code>true</code> to enable overprint, <code>false</code> to disable overprint.
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetOPFill, (
+ IN PDEExtGState pdeExtGState,
+ IN ASBool overprint)
+ )
+
+/**
+ Specifies if overprint is enabled for stroke operations.
+ It corresponds to the / OP key within the ExtGState's dictionary.
+
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param overprint IN/OUT Pass <code>true</code> to enable overprint, <code>false</code> to disable overprint.
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetOPStroke, (
+ IN PDEExtGState pdeExtGState,
+ IN ASBool overprint)
+ )
+
+/**
+ Sets the opacity value for painting operations other than
+ stroking. The value must be in the range from <code>0</code> to <code>1</code> inclusive.
+ It corresponds to the / ca key within the ExtGState's dictionary.
+ The value from <code>0</code> to <code>1</code> refers to a float number (not an ASFixed
+ value) that should be converted to ASFixed using FloatToASFixed().
+
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param opacity IN/OUT The new opacity value.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetOpacityFill, (
+ IN PDEExtGState pdeExtGState,
+ IN ASFixed opacity)
+ )
+
+/**
+ Sets the opacity value for stroke operations. The value
+ must be in the range from <code>0</code> to <code>1</code> inclusive. It corresponds
+ to the / CA key within the ExtGState's dictionary. The value
+ from <code>0</code> to <code>1</code> refers to a float number (not an ASFixed value)
+ that should be converted to ASFixed using FloatToASFixed().
+
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param opacity IN/OUT The new opacity value.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetOpacityStroke, (
+ IN PDEExtGState pdeExtGState,
+ IN ASFixed opacity)
+ )
+
+/**
+ Sets the blend mode for the color composites for each object
+ painted.
+
+ <p>The following mode names are valid:</p>
+ <ul>
+ <li>Compatible</li>
+ <li>Normal</li>
+ <li>Multiply</li>
+ <li>Screen</li>
+ <li>Difference</li>
+ <li>Darken</li>
+ <li>Lighten</li>
+ <li>ColorDodge</li>
+ <li>ColorBurn</li>
+ <li>Exclusion </li>
+ <li>HardLight</li>
+ <li>Overlay</li>
+ <li>SoftLight</li>
+ <li>Luminosity</li>
+ <li>Hue</li>
+ <li>Saturation</li>
+ <li>Color </li>
+ </ul>
+
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param blendMode IN/OUT The new blend mode.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetBlendMode, (
+ IN PDEExtGState pdeExtGState,
+ IN ASAtom blendMode)
+ )
+
+/**
+ Specifies if the alpha is to be interpreted as a shape or
+ opacity mask.
+ @param pdeExtGState The extended graphics state object.
+
+ @param alphaIsShape Indicates whether the sources of alpha
+ are to be treated as shape (<code>true</code>) or opacity (<code>false</code>). This
+ determines the interpretation of the constant alpha (ca
+ or CA) and soft mask (SMask) parameters of the graphics
+ state, as well as a soft-mask image (Smask entry) of an
+ image XObject.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC( void, PDEExtGStateSetAIS, (
+ IN PDEExtGState pdeExtGState,
+ IN ASBool alphaIsShape)
+ )
+
+/**
+ Sets the soft mask of the extended graphics state.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param pdeSoftMask IN/OUT The soft mask object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetSoftMask, (
+ IN PDEExtGState pdeExtGState,
+ IN PDESoftMask pdeSoftMask)
+ )
+
+/*------------------------------------------------------------------------
+ PDEImage Methods added to support SMask and Mattes
+------------------------------------------------------------------------*/
+
+/**
+ Sets the soft mask.
+ @param image IN/OUT The image XObject.
+ @param sMask IN/OUT The soft mask.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDEImageSetSMask, (
+ IN PDEImage image,
+ IN PDEImage sMask)
+ )
+
+/**
+ Sets the matte array for the image XObject.
+ @param image IN/OUT The image XObject.
+ @param matte IN/OUT An array of values.
+ @param numComp IN/OUT The number of values in mArray.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDEImageSetMatteArray, (
+ IN PDEImage image,
+ IN ASFixed *matte,
+ IN ASUns32 numComp)
+ )
+
+/**
+ Creates a new PDEEndContainer object. Call PDERelease to dispose of the
+ returned PDEEndContainer object when finished with it.
+ <p>Call PDERelease() to dispose of the returned PDEEndContainer object when finished with it. </p>
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEEndContainer, PDEEndContainerCreate, ()
+ )
+
+/**
+ Creates a new begin group object.
+ <p>Call PDERelease() to dispose of the returned PDEBeginGroup object when finished with it. </p>
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEBeginGroup, PDEBeginGroupCreate, ()
+ )
+
+/**
+ Creates a new end group object.
+ <p>Call PDERelease() to dispose of the returned PDEEndGroup object when finished with it. </p>
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDEEndGroup, PDEEndGroupCreate, ()
+ )
+
+
+/**
+ Used to obtain a PDEFont corresponding to a font in the
+ system.
+ <p>Call PDERelease() to dispose of the returned PDEFont object when finished with it. </p>
+ @param sysFont The system font.
+ @param params The parameters structure.
+ @return The newly created PDEFont object.
+ @exception peErrCantCreateFontSubset
+ @exception genErrBadParm
+
+ @note If you want to use <code>WinAnsiEncoding</code> on UNIX, use this
+ method or PDEFontCreateFromSysFontAndEncoding() instead.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(PDEFont, PDEFontCreateFromSysFontWithParams, (
+ IN PDSysFont sysFont,
+ IN PDEFontCreateFromSysFontParams params)
+ )
+
+/**
+ Translates a string to Unicode values. The PDEFont must
+ have a / ToUnicode table.
+ @param font IN/OUT The font.
+ @param text IN/OUT The string to convert.
+ @param textLen IN/OUT The length of <code>text</code> in bytes.
+ @param unicodeStr IN/OUT (Filled by the method) A buffer to hold
+ the translated string.
+ @param size IN/OUT The size of the <code>unicodeStr</code> buffer.
+ @return <code>0</code> if the string was successfully translated. If <code>unicodeStr</code>
+ is too small for the translated string, it returns the number
+ of bytes required.
+ @exception genErrBadParm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(ASUns32, PDEFontTranslateGlyphIdsToUnicode, (
+ IN PDEFont font,
+ IN ASUns8 *text,
+ IN ASUns32 textLen,
+ OUT ASUns8 *unicodeStr,
+ IN ASUns32 size)
+ )
+
+/**
+ Specifies whether text knockout is enabled in the graphics
+ state. This corresponds to the / TK key in the ExtGState's
+ dictionary.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param bk IN/OUT Pass <code>true</code> to enable text knockout, <code>false</code> to disable text knockout.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetTK, (
+ IN PDEExtGState pdeExtGState,
+ IN ASBool bk)
+ )
+
+/**
+ Sets the text state of a text run.
+ @param pdeText The text object containing a text run whose
+ state is set.
+ @param runIndex The index of the text run.
+ @param stateP A pointer to a PDETextState structure with
+ the state to set.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextRunSetTextState
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(void, PDETextRunSetState, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex,
+ IN PDETextStateP stateP,
+ IN ASUns32 stateSize)
+ )
+
+/**
+ Create an encoding object from the base name.
+ <p>Call PDERelease() to dispose of the returned PDSysEncoding object when finished with it. </p>
+ @param baseEncName IN/OUT The base encoding. See Section 5.5.5
+ in the <i>PDF Reference</i>.
+ @param diffEnc IN/OUT An array of 256 <code>const char*</code> describing the
+ differences from the encoding specified by <code>baseEncName</code>.
+ It may be <code>NULL</code>.
+ @return An object of type PDSysEncoding.
+ @exception genErrBadParm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(PDSysEncoding, PDSysEncodingCreateFromBaseName, (
+ IN ASAtom baseEncName,
+ IN const char **diffEnc)
+ )
+
+/**
+ Create an encoding object from a PDF CMap name.
+ <p>Call PDERelease() to dispose of the returned PDSysEncoding object when finished with it. </p>
+ @param cmapName The CMap name.
+ @return An object of type PDSysEncoding.
+ @exception genErrBadParm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(PDSysEncoding, PDSysEncodingCreateFromCMapName, (
+ IN ASAtom cmapName)
+ )
+
+/**
+ This function returns a <code>createFlags</code> that can be passed to
+ PDEFontCreateFromSysFontAndEncoding(). If the combination
+ of sysFont and sysEnc is not allowed, <code>-1</code> is returned.
+ @param sysFont IN/OUT An object of type PDSysFont.
+ @param sysEnc IN/OUT An object of type PDSysEncoding.
+ @return See above.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(ASInt32, PDSysFontGetCreateFlags, (
+ IN PDSysFont sysFont,
+ IN PDSysEncoding sysEnc)
+ )
+
+/**
+ Similar to PDSysFontGetCreateFlags but avoids compatibility
+ issues with changing PDSysFontGetCreateFlags. If the combination
+ of sysFont and sysEnc is not allowed, <code>-1</code> is returned. If the
+ combination is ok, then <code>0</code> is returned. If the combination only
+ works if the font is embedded, kPDEFontCreateEmbedded is returned.
+ @param sysFont IN/OUT An object of type PDSysFont.
+ @param sysEnc IN/OUT An object of type PDSysEncoding.
+ @return See above.
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070000
+
+*/
+UNPROC(ASInt32, PDSysFontVerifyEncoding, (
+ IN PDSysFont sysFont,
+ IN PDSysEncoding sysEnc)
+ )
+
+/**
+ Create a PDEFont from <code>sysFont</code> and <code>sysEnc</code>. If it fails, it
+ raises an exception. User can call PDSysFontGetCreateFlags()
+ to see if the combination of sysFont and sysEnc makes sense.
+ <p>Call PDERelease() to dispose of the returned PDEFont object when finished with it. </p>
+
+ @note If you want to use <code>WinAnsiEncoding</code> on UNIX, use this
+ method or PDEFontCreateFromSysFontWithParams().
+ @param sysFont A PDSysFont object referencing a system
+ font.
+ @param sysEnc A PDSysEncoding object.
+ @param useThisBaseFont The base font. An exception will
+ be raised if the base font name passed is a subset name
+ <code>(XXXXXX+FontName)</code> or an empty string.
+ @param createFlags One of the PDEFontCreateFlags.
+ @return The newly created PDEFont object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(PDEFont, PDEFontCreateFromSysFontAndEncoding, (
+ IN PDSysFont sysFont,
+ IN PDSysEncoding sysEnc,
+ IN ASAtom useThisBaseFont,
+ IN ASUns32 createFlags)
+ )
+
+/**
+ This function returns flags indicating what needs to be
+ done to make PDEFont complete. kPDEFontCreateNeedWidths
+ can be cleared by PDEFontCreateWidthsNow(). kPDEFontCreateNeedToUnicode
+ can be cleared by PDEFontCreateToUnicodeNow(). kPDEFontCreateNeedEmbed
+ can be cleared by PDEFontEmbedNow().
+ @param font The font object.
+ @return A value corresponding to PDEFontCreateNeedFlags().
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(ASUns32, PDEFontGetCreateNeedFlags, (
+ IN PDEFont font)
+ )
+
+/**
+ This function embeds a font stream. User can check the return
+ value of PDEFontGetCreateNeedFlags() to see if calling PDEFontEmbedNow()
+ is needed.
+ @param font The font to embed.
+ @param cosDoc The container document.
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @see PDEFontEmbedNowDontSubset
+ @see PDEFontIsEmbedded
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+*/
+UNPROC(void, PDEFontEmbedNow, (
+ IN PDEFont font,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ This function creates width entries for <code>font</code>. User can check
+ the return value of PDEFontGetCreateNeedFlags() to see if
+ calling PDEFontCreateWidthsNow() is needed.
+ @param font IN/OUT The font for which to create width entries.
+ @param cosDoc IN/OUT The container document.
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00040000
+
+*/
+UNPROC(void, PDEFontCreateWidthsNow, (
+ IN PDEFont font,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ This function creates the / ToUnicode table. The user can
+ check the return value of PDEFontGetCreateNeedFlags() to see
+ if calling PDEFontCreateToUnicodeNow() is needed.
+ @param font IN/OUT An object of type PDEFont.
+ @param cosDoc IN/OUT The container document.
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDEFontCreateToUnicodeNow, (
+ IN PDEFont font,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Sets the color space of the image.
+ @param image IN/OUT The image whose color space is obtained.
+ @param space IN/OUT An object of type PDEColorSpace.
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetColorSpace
+ @see PDEImageSetColorSpace
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDEImageSetColorSpace, (
+ IN PDEImage image,
+ IN PDEColorSpace space)
+ )
+
+/**
+ Specifies whether stroke adjustment is enabled in the graphics
+ state.
+ @param pdeExtGState IN/OUT The extended graphics state object.
+
+ @param strokeAdjust IN/OUT Pass <code>true</code> to enable stroke adjustment, <code>false</code> to disable stroke adjustment.
+
+ @exception peErrWrongPDEObjectType
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( void, PDEExtGStateSetSA, (
+ IN PDEExtGState pdeExtGState,
+ IN ASBool strokeAdjust)
+ )
+
+/**
+ Create a new soft mask from a name.
+ <p>Call PDERelease() to dispose of the returned PDESoftMask object when finished with it. </p>
+ @param name IN/OUT The new name for the soft mask. Note that, currently,
+ the only valid name is <code>None</code>.
+ @return The newly created object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC( PDESoftMask, PDESoftMaskCreateFromName, (
+ IN ASAtom name)
+ )
+
+/**
+ Sets the matrix of a text run. Unlike PDETextRunSetTextMatrix(),
+ this function does not change <code>fontSize</code>, <code>hScale</code>, and <code>textRise</code>
+ in the <code>textState</code> of PDEText.
+ @param pdeText IN/OUT The text object containing a text run.
+ @param runIndex IN/OUT The index of the text run.
+ @param matrixP IN/OUT ASFixedMatrixP pointer.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextRunSetTextMatrix
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00050000
+
+*/
+UNPROC(void, PDETextRunSetMatrix, (
+ IN PDEText pdeText,
+ IN ASInt32 runIndex,
+ IN ASFixedMatrixP matrixP)
+ )
+
+/* BEGIN Optional Content API calls */
+
+/**
+ Associates an optional-content membership dictionary (OCMD)
+ object with the element. The element must be a PDEForm,
+ a PDEImage (XObject image), or a PDEContainer.
+
+ <p>If it is not one of these, nothing happens: </p>
+
+ <ul>
+ <li> If the element is a PDEForm or PDEImage, the method attaches
+ the dictionary to the element's Cos XObject dictionary. </li>
+ <li> If the element is a PDEContainer, and it is already for
+ optional content, the optional-content information is replaced. </li>
+ <li>If it is not already for optional content, a new PDEContainer
+ for optional content is created and nested inside the specified
+ container. </li>
+ </ul>
+
+ @param elem The element for which to set the dictionary.
+
+ @param pdOCMD The new dictionary.
+ @see PDEElementGetOCMD
+ @see PDEElementRemoveOCMD
+ @see PDOCMDFindOrCreate
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC( void, PDEElementSetOCMD, (PDEElement elem, PDOCMD pdOCMD) )
+
+/**
+ Dissociates an optional-content membership dictionary (OCMD)
+ object from the element. The element must be a PDEForm,
+ a PDEImage (XObject image), or a PDEContainer.
+
+ <p>If it is not one of these, nothing happens: </p>
+
+ <ul>
+ <li> If the element is a PDEForm or PDEImage, the method removes
+ the dictionary from the element's Cos XObject dictionary. </li>
+ <li> If the element is a PDEContainer for optional content,
+ the method removes the dictionary, but does not destroy
+ the container. </li>
+ </ul>
+
+ @param elem The element for which to remove the dictionary.
+ @see PDEElementGetOCMD
+ @see PDEElementSetOCMD
+ @see PDOCMDFindOrCreate
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC( void, PDEElementRemoveOCMD, (PDEElement elem) )
+
+/**
+ Flattens the content, removing any PDEElement objects that are
+ not visible in the given optional-content context, and removing
+ the optional-content information from any visible PDFElement objects.
+
+ @param content The content to be modified.
+ @param context The optional-content context in which <code>content</code>
+ is checked for visibility.
+ @return <code>true</code> if the operation is successful, <code>false</code> otherwise.
+ @see PDDocFlattenOC
+ @see PDPageFlattenOC
+*/
+UNPROC( ASBool, PDEContentFlattenOC, (PDEContent content, PDOCContext context) )
+/* END Optional Content API calls */
+
+
+/**
+ Create an encoding object from a code page.
+ <p>Call PDERelease() to dispose of the returned PDSysEncoding object when finished with it. </p>
+ @param codePage The code page character-mapping construct.
+ See Code Page Values.
+ @param wMode <code>0</code> for horizontal writing, <code>1</code> for vertical
+ writiing.
+ @return An object of type PDSysEncoding.
+ @exception genErrBadParm
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(PDSysEncoding, PDSysEncodingCreateFromCodePage, (
+ IN ASInt32 codePage,
+ IN ASInt16 wMode)
+ )
+
+
+/**
+ Sets the system font object to be used with a font object
+ that does not currently have a system font associated with
+ it.
+ @param pdeFont A PDEFont whose system font is set.
+ @param sysFont The new system font object.
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontGetSysFont
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDEFontSetSysFont, (
+ IN PDEFont pdeFont,
+ IN PDSysFont sysFont)
+ )
+
+/**
+ Sets the system encoding object associated with a font object.
+ @param pdeFont A PDEFont whose system encoding is set.
+
+ @param sysEnc The new system encoding object.
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontGetSysEncoding
+
+ @note Changing the system encoding may produce unexpected
+ results.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDEFontSetSysEncoding, (
+ IN PDEFont pdeFont,
+ IN PDSysEncoding sysEnc)
+ )
+
+/**
+ Creates a text item element containing a character or text
+ run, which can be added to a PDEText text object.
+ <p>Call PDERelease() to dispose of the returned PDETextItem object when finished with it. </p>
+ @param text A pointer to the characters to add. Note that passing
+ <code>NULL</code> for text can invalidate the text object but will not
+ raise an error. Callers must not pass <code>NULL</code> for this parameter.
+
+ @param textLen The length of the text in bytes.
+ @param font The font for the element.
+ @param gStateP A pointer to a PDEGraphicStateP structure
+ with the graphics state for the element.
+ @param gStateLen The length of the graphics state for the element.
+
+ @param textStateP A pointer to a PDETextState structure with the
+ text state for the element. Note that PDFEdit ignores the <code>wasSetFlags</code>
+ flag of the PDETextState structure, so you must initialize
+ the PDETextState fields.
+ @param textStateLen The length of the text state for the element.
+
+ @param textMatrixP A pointer to an ASFixedMatrix that holds
+ the matrix for the element.
+ @exception pdErrBadResMetrics
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextAdd
+ @see PDETextAddItem
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(PDETextItem, PDETextItemCreate, (
+ IN ASUns8 *text,
+ IN ASUns32 textLen,
+ IN PDEFont font,
+ IN PDEGraphicStateP gStateP,
+ IN ASUns32 gStateLen,
+ IN PDETextStateP textStateP,
+ IN ASUns32 textStateLen,
+ IN ASFixedMatrix *textMatrixP))
+
+/**
+ Sets the font for a text item.
+ @param textItem The text item whose font is set.
+ @param font The new font object.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemGetFont
+
+ @note This method decrements the reference count of the
+ previous font and increments the reference count of the
+ new font.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemSetFont, (
+ IN PDETextItem textItem,
+ IN PDEFont font))
+
+/**
+ Sets the text matrix for a text item.
+ @param textItem The text item whose text matrix is set.
+
+ @param textMatrixP A pointer to a ASFixedMatrix structure
+ with the new text matrix of the text item.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemGetTextMatrix
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemSetTextMatrix, (
+ IN PDETextItem textItem,
+ IN ASFixedMatrix *textMatrixP))
+
+/**
+ Sets the text state for a text item.
+ @param textItem The text item whose text state is set.
+
+ @param textStateP A PDETextStateP structure with the new
+ text state of the text item.
+ @param textStateSize The size of the <code>textStateP</code> structure in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemGetTextState
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemSetTextState, (
+ IN PDETextItem textItem,
+ IN PDETextStateP textStateP,
+ IN ASUns32 textStateSize))
+
+/**
+ Sets the graphics state for a text item.
+ @param textItem Text item whose graphics state is set.
+ @param stateP A pointer to a PDEGraphicStateP structure
+ with graphics state of the text item.
+ @param stateSize The size of the <code>stateP</code> buffer in bytes.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemGetGState
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemSetGState, (
+ IN PDETextItem textItem,
+ OUT PDEGraphicStateP stateP,
+ IN ASUns32 stateSize))
+
+/**
+ Replaces all of the text in a text item.
+ @param textItem The text item whose text are replaced.
+
+ @param newText The replacement text.
+ @param newTextLen The number of bytes to replace.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemRemoveChars
+ @see PDETextItemReplaceChars
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemReplaceText, (
+ IN PDETextItem textItem,
+ IN ASUns8 *newText,
+ IN ASUns32 newTextLen))
+
+/**
+ Replaces characters in a text item.
+
+ <p>This method does not change the number of characters in
+ the text item; extra characters are ignored. </p>
+
+ @param textItem The text item whose characters are replaced.
+
+ @param charIndex The index position of the characters to replace.
+
+ @param newChar The replacement text.
+ @param newCharLen The number of bytes to replace.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemRemoveChars
+ @see PDETextItemReplaceText
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemReplaceChars, (
+ IN PDETextItem textItem,
+ IN ASUns32 charIndex,
+ IN ASUns8 *newChar,
+ IN ASUns32 newCharLen))
+
+/**
+ Removes contiguous characters from a text item.
+ @param textItem The text item whose characters are removed.
+
+ @param charOffset The offset of the first character to remove.
+
+ @param count The number of characters to remove.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextItemReplaceChars
+ @see PDETextItemReplaceText
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextItemRemoveChars, (
+ IN PDETextItem textItem,
+ IN ASUns32 charOffset,
+ IN ASUns32 count))
+
+/**
+ Adds a text item to a text element at a given index position.
+ @param text The text object to which the text item is added.
+ @param addIndex The index of the text item in <code>pdeText</code>.
+ @param textItem The text item to add.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextGetItem
+ @see PDETextRemoveItems
+ @see PDETextItemCreate
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextAddItem, (
+ IN PDEText text,
+ IN ASInt32 addIndex,
+ IN PDETextItem textItem))
+
+/**
+ Removes contiguous text items from a text element starting
+ at a given index position.
+ @param text The text object from which the text items are
+ removed.
+ @param index The index of the first text item in <code>pdeText</code> to
+ remove.
+ @param count The number of text items to remove.
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @exception pdErrBadResMetrics
+ @see PDETextAddItem
+ @see PDETextGetItem
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDETextRemoveItems, (
+ IN PDEText text,
+ IN ASUns32 index,
+ IN ASUns32 count))
+
+/****************** For Acrobat 6.0 feature : 513825**********/
+
+/**
+ Sets the underlying CosStream of the form using the specified
+ content object.
+ @param form The form whose content is set.
+ @param content The new content for <code>form</code>.
+ @exception peErrWrongPDEObjectType
+ @exception peErrPStackUnderflow
+ @see PDEFormGetContent
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(void, PDEFormSetContent, (
+ IN PDEForm form,
+ IN PDEContent content)
+ )
+
+/**
+ Creates a new form from an existing form object. Creates
+ a copy of the PDEForm, including the underlying CosStream.
+ <p>Call PDERelease() to dispose of the returned PDEForm object when finished with it. </p>
+
+ @param form The form object from which a new PDEForm is created.
+ @return The newly created form object.
+ @see PDEFormCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00060000
+*/
+UNPROC(PDEForm, PDEFormCreateClone, (
+ IN PDEForm form)
+ )
+
+/**
+ Adds Unicode text to a PDEText object.
+
+ @param pdeText The text object to which a character or text
+ run is added.
+ @param flags A PDETextFlags that specifies what kind of
+ text to add.
+ It must be one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPDETextChar</TD><TD>Used for a text character.</TD></TR>
+ <TR><TD>kPDETextRun</TD><TD>Used for a text run.</TD></TR>
+ </TABLE>
+
+ @param index The index after which to add the character or text
+ run.
+ @param glyphRun A pointer to a PDEGlyphRun structure
+ with Unicode data, GlyphIDs and their correspondence.
+ @param font The font for the element.
+ @param gstateP A pointer to a PDEGraphicStateP structure
+ with the graphics state for the element.
+ @param gstateLen The length of the graphics state for the element.
+ @param tstateP A pointer to a PDETextState structure with
+ text state for the element. Note that PDFEdit ignores the <code>wasSetFlags</code>
+ flag of the PDETextState structure, so you must initialize
+ the PDETextState fields.
+ @param tstateLen The length of the text state for the element.
+ @param textMatrixP A pointer to an ASFixedMatrix that holds
+ the matrix for the element.
+ @param strokeMatrixP A pointer to an ASFixedMatrix that holds
+ the matrix for the line width when stroking text. It may be
+ <code>NULL</code>. Note that, currently, this field is not used. (Acrobat 5)
+ @exception pdErrBadResMetrics
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDETextAdd
+
+ @note This method does not change the reference count of
+ <code>pdeText</code>; however, the reference count of the objects in
+ the <code>gstateP</code> parameter are incremented.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070000
+*/
+UNPROC(void, PDETextAddGlyphs, (
+ IN PDEText pdeText,
+ IN ASUns32 flags, /* kPDETextRun, kPDETextChar */
+ IN ASInt32 index,
+ IN PDEGlyphRunP glyphRun,
+ IN PDEFont font,
+ IN PDEGraphicStateP gstateP,
+ IN ASUns32 gstateLen,
+ IN PDETextStateP tstateP,
+ IN ASUns32 tstateLen,
+ IN ASFixedMatrixP textMatrixP,
+ IN ASFixedMatrixP strokeMatrixP)
+ )
+
+/**
+ Adds glyphs to a PDEFont object for embedding a PDEFont.
+
+ <p>This is used by clients that use PDEFEdit calls to embed
+ the font but create their own content stream. The glyphs
+ added by this routine will be included in the font when
+ PDEFontSubsetNow() is called. It is up to the client to ensure
+ that the encoding used by the PDEFont matches the character
+ codes used in the string arguments to the text operators in
+ the content stream.</p>
+
+ <p>This routine is used to specify which glyphs should be included
+ in the font when embedded. Additionally, it specifies the mapping
+ from the GlyphIDs to Unicode values. This mapping will be used
+ to create the ToUnicode entry in the embedded font object. In
+ the cases where the ToUnicode table cannot accurately reproduce
+ the Unicode string in the PDEGlyphRun structure, this routine
+ will return an array of spans that describe the contents of the
+ ActualText spans that must be included in the content stream.
+ Each span indicates a contiguous range of glyphs and a
+ corresponding contiguous range of Unicode values that correspond
+ to the glyphs. For example, the following ActualText span
+ replace two glyphs with three Unicode values.</p>
+
+ <p><code>/Span<</ActualText(U+vvvvU+xxxU+yyyy)>></code></p>
+ <p><code> BDC [Giii Gjjj] TJ EMC</code></p>
+
+ <p>Note that the routine must be called with the PDEGlyphRuns in display order.</p>
+
+ @param pdeFont The font for the element.
+
+ @param glyphRun A pointer to a PDEGlyphRun structure
+ with Unicode data, GlyphIDs and their correspondence. Note that
+ the <code>xPosition</code> and <code>yPosition</code> fields in the PDEGlyphDescription
+ structure are ignored.
+
+ @param flags Unused, reserved for later use.
+
+ @return A pointer to a PDESpanSet. The span can be released with PDEReleaseSpan().
+ @exception genErrBadParm
+ @see PDEFontSubsetNow
+ @see PDEFontCreateFromSysFont
+ @see PDEReleaseSpan
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070000
+*/
+UNPROC(PDESpanSetP, PDEFontAddGlyphs, (
+ IN PDEFont pdeFont,
+ IN PDEGlyphRunP glyphRun,
+ IN ASUns32 flags)
+ )
+
+/**
+ Releases a PDESpan object that is returned by PDEFontAddGlyphs().
+
+ @exception genErrBadParm
+ @see PDEFontAddGlyphs
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070000
+*/
+UNPROC(void, PDEReleaseSpan, (
+ IN PDESpanSetP pdeSpan)
+ )
+
+/**
+ Sets the page on which marked content is drawn upon for any marked content
+ reference handles attached to containers within the content.
+
+ @param pdeContent The content stream whose marked content reference
+ handles should be updated.
+ @param pageObj The page object upon which contents are drawn.
+ @see PDEContentSetContainingStream
+ @see PDEContentSetStreamOwner
+ @see PDSMCRefCreate
+
+ @note If content is set with PDPageSetPDEContent(), PDEFormSetContent(), or
+ PDEGroupSetContent(), this step occurs automatically.
+
+ @note This call should only be used when the content is being directly added to a
+ page.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070000
+*/
+UNPROC(void, PDEContentSetPage, (
+ IN PDEContent pdeContent,
+ IN CosObj pageObj)
+ )
+
+/**
+ Sets the containing stream and owner stream for any marked content reference
+ handles attached to containers within the content.
+
+ @param pdeContent The content stream within which to update marked content references.
+ @param containingStm The containing stream object for the content stream.
+ @see PDEContentSetPage
+ @see PDEContentSetStreamOwner
+ @see PDEContentSetStreamOwner
+
+ @note This call should not be used when the content is being directly added to a
+ page.
+
+ @note If the content is set with PDPageSetPDEContent(), PDEFormSetContent(), or
+ PDEGroupSetContent(), this step occurs automatically.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070000
+*/
+UNPROC(void, PDEContentSetContainingStream, (
+ IN PDEContent pdeContent,
+ IN CosObj containingStm)
+ )
+
+/**
+ Sets the stream owner for any marked content reference handles
+ attached to containers within the content.
+
+ @param pdeContent The content stream within which to update marked content references.
+ @param streamOwner The owner object for any references attached to the content.
+ @see PDEContentSetPage
+ @see PDEContentSetContainingStream
+
+ @note This call should not be used when the content is being directly added to a
+ page.
+
+ @note If content is set with PDPageSetPDEContent(), PDEFormSetContent(), or
+ PDEGroupSetContent(), this step occurs automatically.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070000
+*/
+UNPROC(void, PDEContentSetStreamOwner, (
+ IN PDEContent pdeContent,
+ IN CosObj streamOwner)
+ )
+
+
+
+/**
+ Gets the matrix for a PDEform.
+ <p>The result is a concatenation of the CTM and the Cos level form matrix, resulting in the transformation from the form space to the device space.</p>
+ @note For the other elements, PDEElementGetMatrix() would give correct results.
+ @param form The form for which the matrix is required.
+ @param matrixP The resultant matrix.
+
+ @see PDEElemetGetMatrix
+ @see PDEFormGetBBox
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070005
+
+*/
+
+UNPROC(void, PDEFormGetMatrix, (
+ IN PDEForm form,
+ OUT ASFixedMatrixP matrixP)
+ )
+/**
+ Gets the bounding box for a PDEform. The result is the concatenation of the CTM and the Cos level form matrix applied on
+ cos level bounding box. The returned bounding box is guaranteed to encompass the PDEForm, but is not guaranteed to be the smallest box that
+ could contain the form object.
+ Note: For other elements, PDEElementGetBBox() would return the correct bounding box values.
+ @param form The PDEForm for which the bounding box is required.
+ @param bboxP The resulting bounding box.
+
+ @see PDEElementGetBBox
+ @see PDEFormGetMatrix
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00070005
+*/
+
+UNPROC(void, PDEFormGetBBox, (
+ IN PDEForm form,
+ OUT ASFixedRectP bboxP)
+ )
+
+ /**
+ Creates an image object like PDEImageCreate(), except that the client can specify the CosDoc
+ in which the image is created.
+
+ <p>The image data may be specified as a stream or as a buffer.
+ If <code>dataStm</code> is non-<code>NULL</code>, <code>data</code> is ignored. </p>
+
+ <p>See PDEImageSetDataStm() for information on handling the stream. </p>
+
+ <p>The caller must dispose of <code>dataStm</code> after calling this method.</p>
+
+ <p>Call PDERelease() to dispose of the returned image object
+ when finished with it. </p>
+
+ @param attrsP IN/OUT A pointer to a PDEImageAttrs object with attributes
+ of the image.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @param matrixP IN/OUT A pointer to an ASFixedMatrix that holds the
+ transformation matrix to use for the image.
+ @param flags IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData
+ flag is set, and the data is provided directly (not as a
+ stream), then <code>encodedLen</code> must specify the length of data.
+
+ @param colorSpace IN/OUT The color space of the image. When the image
+ is an image mask, <code>colorSpace</code> is the color space of the <code>colorValueP</code>
+ argument.
+ @param colorValueP IN/OUT A pointer to a PDEColorValue structure.
+ If the image is an image mask, <code>colorValueP</code> must be provided.
+
+ @param filtersP IN/OUT A pointer to a PDEFilterArray structure that
+ specifies which filters to use in encoding the contents;
+ it may be <code>NULL</code>. Filters will be used to encode the data in
+ the order in which they are specified in the array.
+ @param dataStm IN/OUT The stream holding the image data.
+ @param data IN/OUT The image data. If <code>dataStm</code> is non-<code>NULL</code>, <code>data</code> is
+ ignored. If there is a great deal of data, as for a large
+ image, it is recommended you use the <code>dataStm</code> parameter for
+ the image data or use the PDEImageCreateFromCosObj() method.
+
+ @param encodedLen IN/OUT The encoded length of <code>data</code> in bytes.
+
+ @param cosDoc IN/OUT The document in which the image is created.
+ @param cosDoc IN/OUT Document in which to put Cos representation of resource. May be NULL.
+
+ @return The image.
+ @exception peErrUnknownPDEColorSpace
+ @exception pageErrReadLessImageData
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEImageCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+
+*/
+UNPROC(PDEImage, PDEImageCreateInCosDoc, (
+ IN PDEImageAttrsP attrsP,
+ IN ASUns32 attrsSize,
+ IN ASFixedMatrixP matrixP,
+ IN ASUns32 flags,
+ IN PDEColorSpace colorSpace,
+ IN PDEColorValueP colorValueP,
+ IN PDEFilterArrayP filtersP,
+ IN ASStm dataStm,
+ IN ASUns8 *data,
+ IN ASUns32 encodedLen,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Creates a font object like PDEFontCreate(), except that the client can specify the CosDoc
+ in which the font is created.
+
+ <p>The PDEFont may be represented as an embedded font (a FontFile
+ entry in the font descriptor of the PDF file). To create
+ a PDEFont that is stored as an embedded font, the FontFile
+ stream may be passed in <code>fontStm</code>, and the <code>len1</code>, <code>len2</code>, and
+ <code>len3</code> parameters contain the <code>Length1</code>, <code>Length2</code>, and <code>Length3</code>
+ values of the FontFile stream attributes dictionary. See
+ Section 5.8 in the <i>PDF Reference</i> for more information about
+ embedded fonts. </p>
+
+ <p>The caller must close <code>fontStm</code> with ASStmClose() after invoking
+ PDEFontCreate(). </p>
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ @param attrsP A pointer to a PDEFontAttrs structure for
+ the font attributes.
+ @param attrsSize The size of the <code>attrsP</code> buffer in bytes.
+
+ @param firstChar The first character index for the widths
+ array, <code>widthsP</code>.
+ @param lastChar The last character index for the widths array,
+ <code>widthsP</code>.
+ @param widthsP A pointer to the widths array.
+ @param encoding An array of 256 pointers to glyph names
+ specifying the custom encoding. If any pointer is <code>NULL</code>,
+ no encoding information is written for that entry.
+ @param encodingBaseName The encoding base name if the encoding
+ is a custom encoding. If the encoding is <code>NULL</code>, <code>encodingBaseName</code>
+ is used as the value of the encoding, and must be one of
+ <code>WinAnsiEncoding</code>, <code>MacRomanEncoding</code>, or <code>MacExpertEncoding</code>.
+ If no encoding value is desired, use ASAtomNull.
+ @param fontStm The stream with font information.
+ @param len1 The length in bytes of the ASCII portion of the
+ Type 1 font file after it has been decoded. For other font
+ formats, such as TrueType or CFF, only <code>len1</code> is used, and
+ it is the size of the font.
+ @param len2 The length in bytes of the encrypted portion of
+ the Type 1 font file after it has been decoded.
+ @param len3 The length in bytes of the portion of the Type
+ 1 font file that contains the 512 zeros, plus the <code>cleartomark</code>
+ operator, plus any following data.
+ @param cosDoc IN/OUT The document in which to put the Cos representation of resource. It may be <code>NULL</code>.
+ @return The specified PDEFont.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontEx
+ @see PDEFontCreateFromSysFontWithParams
+ @see PDEFontCreateWithParams
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+*/
+UNPROC(PDEFont, PDEFontCreateInCosDoc, (
+ IN PDEFontAttrsP attrsP,
+ IN ASUns32 attrsSize,
+ IN ASInt32 firstChar,
+ IN ASInt32 lastChar,
+ IN ASInt16 *widthsP,
+ IN char **encoding,
+ IN ASAtom encodingBaseName,
+ IN ASStm fontStm,
+ IN ASInt32 len1,
+ IN ASInt32 len2,
+ IN ASInt32 len3,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Creates a font object like PDEFontCreateFromSysFont(), except that the client can specify the CosDoc
+ in which the font is created.
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ <p>The PDEFontCreateFlags flags kPDEFontCreateEmbedded and
+ kPDEFontWillSubset must both be set in order to subset a
+ font.</p>
+
+ <p>If you create a PDEFont that is a subset, call PDEFontSubsetNow()
+ on this font afterwards. </p>
+ @param sysFont A PDSysFont object referencing a system
+ font.
+ @param flags Indicates whether to embed the font and whether
+ to subset the font. It must be one of PDEFontCreateFlags. If
+ you want to subset a font, set both the kPDEFontCreateEmbedded
+ and kPDEFontWillSubset flags.
+ @param cosDoc IN/OUT The document in which to put the Cos representation of resource. It may be <code>NULL</code>.
+ @return The PDEFont corresponding to <code>sysFont</code>.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreate
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFontAndEncoding
+ @see PDEFontCreateFromSysFontWithParams
+ @see PDEnumSysFonts
+
+ @note If you have an environment with no Acrobat Language kit
+ installed, trying to acquire a PDEFont from the system font
+ may raise an exception for some of the operating system fonts. In other
+ words, if you use PDEnumSysFonts() to get the system font
+ attributes, not all of the system fonts will necessarily
+ be used to create the PDEFont.
+
+ @note If you want to use <code>WinAnsiEncoding</code> on UNIX, do not
+ use this method. Use PDEFontCreateFromSysFontWithParams()
+ or PDEFontCreateFromSysFontAndEncoding() instead.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+*/
+UNPROC(PDEFont, PDEFontCreateFromSysFontInCosDoc, (
+ IN PDSysFont sysFont,
+ IN ASUns32 flags,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Creates a font object like PDEFontCreateFromSysFontEx(), except that the client can specify the CosDoc
+ in which the font is created.
+
+ <p>If the font is a Multiple Master font, <code>mmDesignVector</code> points
+ to the design vector, whose length must equal the number
+ of design axes of the font. </p>
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ <p>The PDEFontCreateFlags flags kPDEFontCreateEmbedded and
+ kPDEFontWillSubset must both be set in order to subset a
+ font. </p>
+
+ <p>If you create a PDEFont that is subsetted, call PDEFontSubsetNow()
+ on this font afterwards. </p>
+
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font.
+ @param flags IN/OUT Indicates whether to embed the font and whether
+ to subset the font. It must be one of PDEFontCreateFlags. If
+ you want to subset a font, set both the kPDEFontCreateEmbedded
+ and kPDEFontWillSubset flags.
+ @param snapshotName IN/OUT The name to be associated with this particular
+ instantiation of the PDEFont.
+ @param mmDesignVec IN/OUT A pointer to the Multiple Master font design
+ vector.
+ @param cosDoc IN/OUT The document in which to put the Cos representation of resource. It may be <code>NULL</code>.
+ @return The PDEFont corresponding to <code>sysFont</code>.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontWithParams
+ @see PDEFontCreateWithParams
+ @see PDEnumSysFonts
+
+ @note If you have environment with no Acrobat Language kit
+ installed, trying to acquire a PDEFont from the system font
+ may raise an exception for some of the system fonts. In
+ other words, if you use PDEnumSysFonts() to get the system
+ font attributes, not all of the system fonts are necessarily
+ used to create the PDEFont.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+
+*/
+UNPROC(PDEFont, PDEFontCreateFromSysFontExInCosDoc, (
+ IN PDSysFont sysFont,
+ IN ASUns32 flags,
+ IN ASAtom snapshotName,
+ IN ASFixed *mmDesignVec,
+ IN CosDoc cosDoc)
+ )
+
+
+/**
+ Creates a font object like PDEFontCreateWithParams(), except that the client can specify the CosDoc
+ in which the font is created.
+ Creates a new PDEFont from <code>params</code>.
+
+ <p>The PDEFont may be represented as an embedded font (a FontFile
+ value in PDF). To create a PDEFont that will be stored as
+ an embedded font, the FontFile stream may be passed as <code>fontStm</code>,
+ and the <code>len1</code>, <code>len2</code>, and <code>len3</code> parameters contain the <code>Length1</code>,
+ <code>Length2</code>, and <code>Length3</code> values of the FontFile. The caller
+ must close the <code>fontStm</code> after calling this method. This method
+ supports multi-byte fonts. </p>
+
+ <p>This method extends PDEFontCreate() to support multi-byte
+ fonts. </p>
+
+ <p>Call PDERelease() to dispose of the returned font object when
+ finished with it. </p>
+
+ @param params IN/OUT A pointer to a structure containing all font
+ parameters necessary to fully define a font.
+ @param cosDoc IN/OUT The document in which to put the Cos representation of resource. It may be <code>NULL</code>.
+ @return A PDEFont object of the font described by the parameters.
+
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @exception peErrCantEmbedFont
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDEFontCreate
+ @see PDEFontCreateFromCosObj
+ @see PDEFontCreateFromSysFont
+ @see PDEFontCreateFromSysFontEx
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+
+*/
+UNPROC(PDEFont, PDEFontCreateWithParamsInCosDoc, (
+ IN PDEFontCreateParams params,
+ IN CosDoc cosDoc)
+ )
+
+
+
+/**
+ Creates a font object like PDEFontCreateFromSysFontAndEncoding(), except that the client can specify the CosDoc
+ in which the font is created.
+ Create a PDEFont from <code>sysFont</code> and <code>sysEnc</code>. If it fails, it
+ raises an exception. User can call PDSysFontGetCreateFlags()
+ to see if the combination of sysFont and sysEnc makes sense.
+
+ <p>Call PDERelease() to dispose of the returned PDEFont object when finished with it. </p>
+ @note If you want to use <code>WinAnsiEncoding</code> on UNIX, use this
+ method or PDEFontCreateFromSysFontWithParams().
+ @param sysFont A PDSysFont object referencing a system
+ font.
+ @param sysEnc A PDSysEncoding object.
+ @param useThisBaseFont The base font. An exception will
+ be raised if the base font name passed is a subset name
+ <code>(XXXXXX+FontName)</code> or an empty string.
+ @param createFlags One of the PDEFontCreateFlags.
+ @param cosDoc IN/OUT The document in which to put the Cos representation of resource. It may be <code>NULL</code>.
+ @return The newly created PDEFont object.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+*/
+UNPROC(PDEFont, PDEFontCreateFromSysFontAndEncodingInCosDoc, (
+ IN PDSysFont sysFont,
+ IN PDSysEncoding sysEnc,
+ IN ASAtom useThisBaseFont,
+ IN ASUns32 createFlags,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Creates a color space object like PDEColorSpaceCreate(), except that the client can specify the CosDoc
+ in which the color space object is created.
+
+ <p>Call PDERelease() to dispose of the returned color space object
+ when finished with it. </p>
+
+ @param family IN/OUT Supports all PDF 1.3 color spaces, which
+ include:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Type of names</TH><TH>Names</TH></TR>
+ <TR><TD>Device-dependent names</TD><TD><ul><li><code>DeviceCMYK</code></li><li><code>DeviceGray</code></li><li><code>DeviceN</code></li><li><code>DeviceRGB</code></li></ul></TD></TR>
+ <TR><TD>Device-independent names</TD><TD><ul><li><code>CalGray</code></li><li><code>CalRGB</code></li><li><code>Lab</code></li><li><code>ICCBased</code></li></ul></TD></TR>
+ <TR><TD>Special names</TD><TD><ul><li><code>Indexed</code></li><li><code>Pattern</code></li><li><code>Separation</code></li></ul></TD></TR>
+ </TABLE>
+
+ @param csStruct IN/OUT Data for the type of color space you want
+ to create.
+ @param cosDoc IN/OUT The document in which to put the Cos representation of resource. It may be <code>NULL</code>.
+ @return The newly created color space object.
+ @exception cosErrExpectedArray
+ @exception genErrBadParm
+ @exception peErrUnknownPDEColorSpace
+ @see PDEColorSpaceCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+
+*/
+UNPROC(PDEColorSpace, PDEColorSpaceCreateInCosDoc, (
+ IN ASAtom family,
+ IN PDEColorSpaceStruct *csStruct,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ Removes unused objects from the PDFEdit scratch document, which is used to
+ hold representations of PDFEdit resources associated with a specific
+ document.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+
+*/
+UNPROC(void, PDEScratchDocCleanup, (void)
+ )
+
+/** Sets the default color space in a PDEContent object.
+ The reference count on any existing default color space
+ is decremented, and the reference count on the new
+ color space is incremented. Note that the new color
+ space can be <code>NULL</code>, indicating that there is no default color space.
+
+ <p>See <i>Section 4.5.4</i> in the <i>PDF Reference</i> for more information
+ about default color spaces.</p>
+ @param pdeContent IN A content object.
+ @param colorSpaceName IN An ASAtom for the name of the desired
+ color space. It must be an ASAtom for one of the following:
+ <ul>
+ <li><code>DefaultRGB</code></li>
+ <li><code>DefaultCMYK</code></li>
+ <li><code>DefaultGray</code></li>
+ </ul>
+ @param colorSpace IN The color space to use as the default.
+
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+
+*/
+/* Note: This function was a friends function from 7.0 to 8.0 and was made public in 8.0*/
+
+ UNPROC(void, PDEContentSetDefaultColorSpace_PEWCalls_, (
+ IN PDEContent pdeContent,
+ IN ASAtom colorSpaceName,
+ IN PDEColorSpace colorSpace)
+ )
+
+/** Gets the length of data for an image.
+ @param image IN/OUT The image whose data length is obtained.
+ @return The number of bytes of image data, specified by the width, height,
+ bits per component, and color space of the image.
+ Clients should switch to this routine. PDEImageGetDataLen() will raise an error if it encounters an image with a length that is larger than <code>2^31 - 1</code>.
+ @exception peErrUnknownPDEColorSpace
+ @exception genErrBadParm
+ @exception peErrWrongPDEObjectType
+ @see PDEImageGetDataLen
+ @since PI_PDFEDIT_READ_VERSION >= 0x00080000
+
+*/
+
+ UNPROC(ASInt64, PDEImageGetDataLen64, (
+ IN PDEImage image)
+ )
+
+/** Creates an image object like PDEImageCreateInCosDoc(), except that the client can create an image
+ with a large amount of data.
+
+ <p>The image data may be specified as a stream or as a buffer.
+ If <code>dataStm</code> is non-<code>NULL</code>, <code>data</code> is ignored. </p>
+
+ <p>See PDEImageSetDataStm() for information on handling the stream. </p>
+
+ <p>The caller must dispose of <code>dataStm</code> after calling this method.</p>
+
+ <p>Call PDERelease() to dispose of the returned image object
+ when finished with it. </p>
+
+
+ @param attrsP IN/OUT A pointer to a PDEImageAttrs object with attributes
+ of the image.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @param matrixP IN/OUT A pointer to an ASFixedMatrix that holds the
+ transformation matrix to use for the image.
+ @param flags IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData
+ flag is set, and the data is provided directly (not as a
+ stream), then <code>encodedLen</code> must specify the length of data.
+
+ @param colorSpace IN/OUT The color space of the image. When the image
+ is an image mask, <code>colorSpace</code> is the color space of the <code>colorValueP</code>
+ argument.
+ @param colorValueP IN/OUT A pointer to a PDEColorValue structure.
+ If the image is an image mask, <code>colorValueP</code> must be provided.
+
+ @param filtersP IN/OUT A pointer to a PDEFilterArray structure that
+ specifies which filters to use in encoding the contents;
+ it may be <code>NULL</code>. Filters will be used to encode the data in
+ the order in which they are specified in the array.
+ @param dataStm IN/OUT The stream holding the image data.
+ @param data IN/OUT The image data. If <code>dataStm</code> is non-<code>NULL</code>, <code>data</code> is
+ ignored. If there is a great deal of data, as for a large
+ image, it is recommended you use the <code>dataStm</code> parameter for
+ the image data or use the PDEImageCreateFromCosObj() method.
+
+ @param encodedLen IN/OUT The encoded length of <code>data</code> in bytes.
+
+ @param cosDoc IN/OUT The document in which the image is created.
+ @param cosDoc IN/OUT The document in which to put the Cos representation of the resource. It may be <code>NULL</code>.
+
+
+ @return The image.
+ @exception peErrUnknownPDEColorSpace
+ @exception pageErrReadLessImageData
+ @exception peErrWrongPDEObjectType
+ @exception genErrBadParm
+ @see PDEImageCreateFromCosObj
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00080000
+
+*/
+
+ UNPROC(PDEImage, PDEImageCreateInCosDoc64, (
+ IN PDEImageAttrsP attrsP,
+ IN ASUns32 attrsSize,
+ IN ASFixedMatrixP matrixP,
+ IN ASUns32 flags,
+ IN PDEColorSpace colorSpace,
+ IN PDEColorValueP colorValueP,
+ IN PDEFilterArrayP filtersP,
+ IN ASStm dataStm,
+ IN ASUns8 *data,
+ IN ASUns64 encodedLen,
+ IN CosDoc cosDoc)
+ )
+
+/**
+ <p>Creates an encoding object from a given PDF CMap stream.</p>
+
+ <p>Call <code>PDERelease()</code> to dispose of the returned <code>PDSysEncoding</code> object when it is no longer needed. </p>
+ @param cmapStream The CMap stream from which to create the encoding object.
+ @return The encoding object to be created.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00090000
+*/
+ UNPROC(PDSysEncoding, PDSysEncodingCreateFromCMapStream, (
+ IN CosObj cmapStream)
+ )
+
+/**
+ Sets the <code>PDEContentToCosObjFlags</code> for this form.
+ @since PI_PDFEDIT_WRITE_VERSION >= 0x00090000
+ @exception genErrBadParm
+*/
+ UNPROC(void, PDEFormSetContentToCosObjFlags, (
+ IN PDEForm form,
+ IN ASUns32 flags)
+ )
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICommon.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICommon.h
new file mode 100644
index 0000000..c5584f3
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICommon.h
@@ -0,0 +1,106 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PICommon.h
+
+ - Globals and function declarations used by every plug-in.
+
+*********************************************************************/
+
+#ifndef _H_PICommon
+#define _H_PICommon
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef PLUGIN
+#define PLUGIN 1
+#endif
+
+#include "PIVersn.h"
+#include "PIRequir.h" /* PIRequir.h may be edited by authors to reduce Plug-in's footprint */
+extern ExtensionID gExtensionID;
+
+
+/*
+** Protype for PIHandshake(), which must be provided by the plug-in author.
+*/
+extern ACCB1 ASBool ACCB2 PIHandshake(ASUns32 handshakeVersion, void *handshakeData);
+
+/*
+** Backwards compatibility section.
+These macros reflect early API architecture. Callback-related things ended up part of the AS
+mechanism. The other three macros are miscellaneous convenience macros.
+*/
+#define CallbackCreate(a,b) ASCallbackCreate(b)
+#define CallbackCreateProto(funcType, proc) ASCallbackCreateProto(funcType, proc)
+#define CallbackCreateReplacement(sel, proc) ASCallbackCreateProto(sel##PROTO, proc)
+#define CallbackCreateNotification(nsel, proc) ASCallbackCreateProto(nsel##NPROTO, proc)
+#if PI_ACROSUPPORT_VERSION >= 0x00050000
+/**
+ Replaces one of the Acrobat viewer's built-in methods. The method being replaced must be one of the ReplaceableMethods.
+ The method's HFTEntryReplaceable flag is automatically set, allowing it to be subsequently replaced.
+
+ <p>All clients, and the Acrobat viewer itself, share a single copy of each HFT. As a result, when a client replaces the
+ implementation of a method, all other clients and the Acrobat viewer also use the new implementation of that method.
+ In addition, once a method's implementation has been replaced, there is no way to remove the new implementation without restarting the Acrobat viewer.</p>
+
+ @note The CALL_REPLACED_PROC macro is available to call the previous HFT entry function that was replaced.
+
+ @param hft The HFT containing the method to replace. For example, gAcroViewHFT.
+ @param sel The selector for the method to replace. The name must have the characters <code>SEL</code> appended. For example, <code>AVAlertSEL</code>.
+ @param proc A callback containing the replacement method. The callback must have been created using ASCallbackCreateReplacement().
+
+ @example <code>myAlertCallback = ASCallbackCreateReplacement(AVAlertSEL, myAlert);
+ <p>REPLACE(gAcroViewHFT, AVAlertSEL, myAlertCallback);</p></code>
+
+ @see CALL_REPLACED_PROC
+ @see ASCallbackCreateReplacement
+ @see HFTReplaceEntry
+ @ref ReplaceableMethods
+*/
+#define REPLACE(hft, sel, proc) HFTReplaceEntryEx((hft), sel, (proc), gExtensionID, HFTEntryReplaceable)
+#else
+#define REPLACE(hft, sel, proc) HFTReplaceEntry((hft), sel, (proc), HFTEntryReplaceable)
+#endif
+/**
+ Calls the previous implementation of a replaced method (that is, the code that would have been executed before the method was replaced
+ using <code>REPLACE</code>).
+
+ @param hft The HFT containing the replaced method to execute. For example, gAcroViewHFT.
+ @param sel The selector for the replaced method to execute. The name must have the characters <code>SEL</code> appended.
+ For example, <code>AVAlertSEL</code>.
+ @param oldProc The callback whose previous implementation is called. A method may be replaced more than once, and all replacements
+ for a particular method are kept in a linked list. <code>oldProc</code> must be an element in that linked list,
+ and the entry before <code>oldProc</code> is the one that is called.
+
+ @example <code>CALL_REPLACED_PROC(gAcroViewHFT, AVAlertSEL, myAlertCallback)(iconType, gsm, button1, button2, button3, beep);</code>
+
+ @see REPLACE
+ @see HFTGetReplacedEntry
+*/
+#define CALL_REPLACED_PROC(hft, sel, oldProc) (*((sel##PROTO)(HFTGetReplacedEntry((hft), sel, (oldProc)))))
+
+/* assuming most people won't cast the second parameter... */
+/**
+ A macro to register a notification. It uses AVAppRegisterNotification().
+*/
+#define REGISTER_NOTIFICATION(nselName, proc, rock) AVAppRegisterNotification(nselName##NSEL, gExtensionID, (void*)(proc), (rock))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PICOMMON */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICrypt.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICrypt.h
new file mode 100644
index 0000000..fed23dd
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PICrypt.h
@@ -0,0 +1,27 @@
+/*
+** PICrypt.h
+**
+** This file is furnished to you by Adobe Systems Incorporated under the terms of the
+** Acrobat (r) Plug-ins Software Development Kit License Agreement.
+** Copyright (C) 1994-2006 Adobe Systems Inc. All Rights Reserved.
+*/
+
+
+/* The first section includes AV-related security stuff. */
+
+/*
+ * This is the standard data used to fill in the Security dialog
+ * and to fill in the Encrypt dict.
+ * It is used by AVCryptDoStdSecurity.
+ */
+
+#ifndef _H_PICrypt
+#define _H_PICrypt
+
+#pragma message("This file is being deleted. Use PDExpT.h and/or AVCalls.h instead.")
+
+#include "PDExpT.h"
+#include "AVCalls.h"
+
+#endif /* _H_PICrypt */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIExcept.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIExcept.h
new file mode 100644
index 0000000..478f4a6
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIExcept.h
@@ -0,0 +1,105 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ Except.h
+
+ - #define's of the setjmp, longjmp and jmp_buf equivalents for Acrobat
+ plug-ins. Plug-in writers will probably not directly #include this
+ file; most likely they will #include "CorCalls.h" and use the
+ DURING/HANDLER/END_HANDLER macros.
+
+*********************************************************************/
+
+#ifndef _H_Except
+#define _H_Except
+
+#if WIN_PLATFORM
+
+ /* If Windows.h has already been included, these things have been defined.
+ * Otherwise, just define what we need.
+ */
+ #ifndef _WINDOWS_ /* NT define for windows.h */
+ #ifndef _INC_WINDOWS /* 3.1 define for windows.h */
+
+ #ifdef _WIN32
+
+ #define _far
+ #define WINAPI __stdcall
+
+ #else
+
+ /* For 32-bit Watcom, identified by the __386__ conditional, we must use
+ setjmp/longjmp, and cannot use Catch/Throw. */
+ #ifndef __386__
+ #define WINAPI _far _pascal
+ #define FAR _far
+ #endif
+
+ typedef int CATCHBUF[9];
+ typedef int FAR* LPCATCHBUF;
+
+ int WINAPI Catch(int FAR*);
+ void WINAPI Throw(const int FAR*, int);
+
+ #undef WINAPI
+ #undef FAR
+
+ #endif
+
+ #endif /* _INC_WINDOWS */
+ #endif /* _WINDOWS_ */
+
+ #ifdef __386__
+
+ /* 32-bit WatCom doesn't implement Catch/Throw correctly, so setjmp/longjmp
+ must be used. */
+ #include <setjmp.h>
+
+ #elif _WIN32
+
+ /* Windows NT doesn't implement Catch/Throw so use setjmp/longjmp */
+ #include <setjmp.h>
+
+ #else /* Win16 */
+
+ /* define setjmp.h names to be Windows equivalents */
+ #define jmp_buf CATCHBUF
+ #define setjmp Catch
+ #define longjmp Throw
+
+ #endif
+
+ #define ACROsetjmp setjmp
+ #define ACROlongjmp longjmp
+ #define ACROjmp_buf jmp_buf
+
+#elif MAC_PLATFORM
+
+ #include <setjmp.h>
+
+ #define ACROsetjmp setjmp
+ #define ACROlongjmp longjmp
+ #define ACROjmp_buf jmp_buf
+
+#else /* !WIN_PLATFORM && !MAC_PLATFORM */
+
+ #include <setjmp.h>
+
+ #define ACROsetjmp setjmp
+ #define ACROlongjmp longjmp
+ #define ACROjmp_buf jmp_buf
+
+#endif
+
+#endif /* defined(_H_Except) */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.c b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.c
new file mode 100644
index 0000000..ee96993
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.c
@@ -0,0 +1,35 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIHeaders.c
+
+ - Source to the Macintosh version of the precompiled header file.
+
+*********************************************************************/
+
+#if !defined(__GNUC__)
+#include <MacTypes.h>
+#endif
+
+#include "PIPrefix.h"
+
+#define MAC_ENV 1
+
+#include "Environ.h"
+#include "CoreExpT.h"
+#include "CosExpT.h"
+#include "ASExpT.h"
+#include "PDExpT.h"
+#include "AVExpT.h"
+#include "NSelExpT.h"
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.pch b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.pch
new file mode 100644
index 0000000..56d2615
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIHeaders.pch
@@ -0,0 +1,30 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIHeaders.pch
+
+ - .pch header file for Acrobat Plug-ins SDK.
+
+*********************************************************************/
+
+#define ACRO_SDK_LEVEL 0x00090000
+#define Platform_Carbon 1
+
+#define PLATFORM "MacPlatform.h"
+#define PRODUCT "Plugin.h"
+#include "Environ.h"
+#include "PIHeaders.h"
+
+#undef PRAGMA_IMPORT
+#define PRAGMA_IMPORT 1
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.c b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.c
new file mode 100644
index 0000000..90e9e32
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.c
@@ -0,0 +1,621 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIMain.c
+
+ - Source code that must be linked into every plug-in.
+
+*********************************************************************/
+
+#include "Environ.h"
+
+#include "PICommon.h"
+#include "PIMain.h"
+#include "ASCalls.h"
+#include "AVCalls.h"
+#include "CorCalls.h"
+#include "ASExtraCalls.h"
+#include "CosCalls.h"
+#include "PDCalls.h"
+#include "PEWCalls.h"
+#include "PERCalls.h"
+#include "PSFCalls.h"
+#include "PDMetadataCalls.h"
+#include "PDSReadCalls.h"
+#include "PDSWriteCalls.h"
+#include "PagePDECntCalls.h"
+#include "AcroColorCalls.h"
+#if WIN_PLATFORM
+#include "WinCalls.h"
+#elif MAC_PLATFORM
+#include "MacCalls.h"
+#elif UNIX_PLATFORM
+#include "UnixCalls.h"
+#else
+#error platform not defined
+#endif
+
+/* This is for testing only. Leave it set to 0xFFFFFFFF for final version */
+#define TEST_OLD_VERSION 0xFFFFFFFF /*set lower to test old versions. set to 0x00050000 to simulate acrobat 5.0*/
+
+HFT gCoreHFT = 0;
+ASUns32 gCoreVersion = 0;
+
+#if DEBUG
+/* For special DURING/HANDLER catching */
+int gBadReturnCatcher;
+#endif
+
+
+HFT gAcroSupportHFT;
+ASUns32 gAcroSupportVersion =0;
+
+#if PI_COS_VERSION != 0
+HFT gCosHFT = 0;
+ASUns32 gCosVersion = 0;
+#endif
+
+#if PI_PDMODEL_VERSION != 0
+HFT gPDModelHFT = 0;
+ASUns32 gPDModelVersion = 0;
+#endif
+
+#if PI_PDFEDIT_READ_VERSION != 0
+HFT gPDFEditReadHFT = 0;
+ASUns32 gPDFEditReadVersion = 0;
+#endif
+
+#if PI_PDFEDIT_WRITE_VERSION != 0
+HFT gPDFEditWriteHFT = 0;
+ASUns32 gPDFEditWriteVersion = 0;
+#endif
+
+#if PI_PDSYSFONT_VERSION != 0
+HFT gPDSysFontHFT = 0;
+ASUns32 gPDSysFontVersion = 0;
+#endif
+
+#if PI_PAGE_PDE_CONTENT_VERSION != 0
+HFT gPagePDEContentHFT = 0;
+ASUns32 gPagePDEContentVersion = 0;
+#endif
+
+#if PI_ACROVIEW_VERSION != 0
+HFT gAcroViewHFT = 0;
+ASUns32 gAcroViewVersion = 0;
+#endif
+
+#if PI_PDSEDIT_WRITE_VERSION != 0
+HFT gPDSWriteHFT = 0;
+ASUns32 gPDSWriteVersion = 0;
+#endif
+
+#if PI_PDSEDIT_READ_VERSION != 0
+HFT gPDSReadHFT = 0;
+ASUns32 gPDSReadVersion = 0;
+#endif
+
+#if PI_MACINTOSH_VERSION != 0
+HFT gMacintoshHFT = 0;
+ASUns32 gMacintoshVersion = 0;
+#endif
+
+#if PI_UNIX_VERSION != 0
+HFT gUnixHFT = 0;
+ASUns32 gUnixVersion = 0;
+#endif
+
+#if PI_WIN_VERSION != 0
+HFT gWinHFT = 0;
+ASUns32 gWinVersion = 0;
+#endif
+
+#if PI_ASEXTRA_VERSION != 0
+HFT gASExtraHFT = 0;
+ASUns32 gASExtraVersion = 0;
+#endif
+
+#if PI_ACROVIEW_SWEETPEA_VERSION != 0
+HFT gAcroViewSweetPeaHFT = 0;
+ASUns32 gAcroViewSweetPeaVersion = 0;
+#endif
+
+#if PI_PDMETADATA_VERSION != 0
+HFT gPDMetadataHFT = 0;
+ASUns32 gPDMetadataVersion = 0;
+#endif
+
+#if PI_ACROCOLOR_VERSION != 0
+HFT gAcroColorHFT;
+ASUns32 gAcroColorVersion = 0;
+#endif
+
+ExtensionID gExtensionID; /* A identifying cookie sometimes needed by the application */
+
+#if WIN_PLATFORM
+
+#include <windows.h>
+#if DEBUG
+#include <tchar.h>
+#endif
+
+HINSTANCE gHINSTANCE;
+HWND gHWND;
+
+#if (!_USRDLL && !_AFXDLL && !CUSTOM_DLLMAIN) /* Omit DllMain for MFC plug-ins and plug-ins with custom DllMain */
+
+/***************************************************************************************************
+The DllMain Function
+
+Unlike Windows 3.x DLLs, Windows NT calls one function, DllMain, for both initialization and
+termination. It also makes calls on both a per-process and per-thread basis, so several initialization
+calls can be made if a process is multithreaded.
+
+DllMain uses the WINAPI convention and three parameters. The function returns
+TRUE (1) to indicate success. If, during per-process initializati
+
+
+The lpReserved parameter is reserved for the system's use and should not
+be manipulated .
+
+Win32 DLL initialization functions are passed the following information:
+
+ The hModule parameter, a module handle for the dll
+ The ul_reason_for_call parameter, an enumerated type that indicates which
+ of four reasons the LibMain procedure is being called:
+ process attach,
+ thread attach,
+ thread detach,
+ or process detach.
+
+ The lpReserved parameter, which is unused.
+
+ All calls to local memory management functions operate on the default heap.
+ The command line can be obtained from GetCommandLine API function.
+********************************************************************/
+
+
+BOOL APIENTRY DllMain( HANDLE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved )
+{
+ switch( ul_reason_for_call ) {
+
+ case DLL_PROCESS_ATTACH: //A new process is attempting to access the DLL; one thread is assumed.
+ DisableThreadLibraryCalls( (HMODULE) hModule); //we do not use the Thread_Attach or Thread_detach cases
+ gHINSTANCE = (HINSTANCE)hModule;
+
+ break;
+ case DLL_THREAD_ATTACH://A new thread of an existing process is attempting to access the DLL; this call is made beginning with the second thread of a process attaching to the DLL.
+ break;
+ case DLL_THREAD_DETACH://One of the additional threads (not the first thread) of a process is detaching from the DLL.
+ break;
+
+ case DLL_PROCESS_DETACH://A process is detaching from the DLL.
+ break;
+ }
+ return TRUE;
+}
+
+#endif /* custom DllMain */
+
+/* This struct contains platform specific data useful to plug-ins. This structure will grow over time
+** to include new things (thread id's in Chicago?). But, we will always support the old structure
+** and only add to the end.
+*/
+
+typedef struct V0200_DATA_t_ {
+ HWND hWnd;
+ HINSTANCE hInstance;
+} V0200_DATA;
+
+#if _WIN32
+ASBool CALLBACK PlugInMain(ASInt32 appHandshakeVersion,
+ ASInt32 *handshakeVersion,
+ PISetupSDKProcType* setupProc,
+ void* windowsData)
+#else
+ASBool _far _pascal _export _loadds PlugInMain(ASInt32 appHandshakeVersion,
+ ASInt32 *handshakeVersion,
+ PISetupSDKProcType* setupProc,
+ void* windowsData)
+#endif /* else _WIN32 */
+
+#elif MAC_PLATFORM
+
+typedef struct _t_PluginMainData
+{
+ size_t size;
+ CFBundleRef bundle;
+ CFBundleRef appBundle;
+} PluginMainData;
+
+CFBundleRef gAppBundle = NULL;
+CFBundleRef gPluginBundle = NULL;
+
+#ifdef __cplusplus
+extern "C"
+#endif
+short GetAcroPluginResourceMap()
+{
+ static short refNum = kResFileNotOpened;
+ if ((refNum == kResFileNotOpened) && gPluginBundle)
+ refNum = CFBundleOpenBundleResourceMap(gPluginBundle);
+ return refNum;
+}
+
+#ifdef __cplusplus
+extern "C"
+#endif
+ACCB1 ASBool ACCB2 AcroPluginMain( ASInt32 appHandshakeVersion,
+ ASInt32 *handshakeVersion,
+ PISetupSDKProcType *setupProc,
+ PluginMainData *mainData)
+
+#elif UNIX_PLATFORM
+
+void *gHandle;
+
+typedef struct V0100_DATA_t_ {
+ void *handle;
+} V0100_DATA;
+
+#ifdef __cplusplus
+extern "C"
+#endif
+#if LINUX
+ACCB1 ASBool ACCB2 __attribute__ ((visibility ("default"))) PluginMain(ASInt32 appHandshakeVersion,
+#else
+ACCB1 ASBool ACCB2 PluginMain(ASInt32 appHandshakeVersion,
+#endif
+ ASInt32 *handshakeVersion,
+ PISetupSDKProcType *setupProc,
+ void *unixData)
+
+#endif
+{
+#if WIN_PLATFORM
+ V0200_DATA* dataPtr = (V0200_DATA*) windowsData;
+ gHWND = dataPtr->hWnd;
+ gHINSTANCE = dataPtr->hInstance;
+#elif MAC_PLATFORM
+ gPluginBundle = (CFBundleRef) CFRetain(mainData->bundle);
+ gAppBundle = (CFBundleRef) CFRetain(mainData->appBundle);
+#elif UNIX_PLATFORM
+ V0100_DATA* dataPtr = (V0100_DATA*) unixData;
+ gHandle = dataPtr->handle;
+#endif
+
+ /*
+ ** appsHandshakeVersion tells us which version of the handshake struct the application has sent us.
+ ** HANDSHAKE_VERSION is the latest version that we, the plug-in, know about (see PIVersn.h)
+ ** Always use the earlier of the two structs to assure compatibility.
+ ** The version we want to use is returned to the application so it can adjust accordingly.
+ */
+ *handshakeVersion = (appHandshakeVersion < HANDSHAKE_VERSION) ? appHandshakeVersion : HANDSHAKE_VERSION;
+
+ /* Provide the routine for the host app to call to setup this plug-in */
+ *setupProc = PISetupSDK;
+
+ return TRUE;
+}
+
+#if !defined(USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS)
+ #error // CorCalls.h must be included to define USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS
+#endif
+
+#if USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS
+
+void miThrowExceptionToHandler(void *asEnviron)
+{
+ _miExceptionInfo exc;
+ throw (exc);
+}
+
+#else /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+ACCB1 void ACCB2 RestorePlugInFrame(void *asEnviron)
+{
+ ACROlongjmp(*(ACROjmp_buf *)asEnviron, 1);
+
+#if MAC_PLATFORM
+ #if DEBUG
+ DebugStr("\pRestorePluginFrame didn't jump anywhere!");
+ #endif
+#endif
+}
+
+#endif /* USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS */
+
+
+/* pass in name of hft and minimum required version.
+ returns hft and version of the returned hft (>= requiredVer) and true if successful
+ on failure, both resultHFT and resultingVer return as NULL
+*/
+ASBool GetRequestedHFT(char* table, ASUns32 requiredVer, ASUns32 *resultingVer, HFT *resultHFT)
+{
+ ASAtom tablename = ASAtomFromString(table);
+ ASVersion resultVer = HFT_ERROR_NO_VERSION;
+ /* these are the versions of Acrobat where we did not support GetVersion of an HFT. */
+ static const ASUns32 versionLessVersions[] = {0x00050001, 0x00050000, 0x00040005, 0x00040000, 0x00020003, 0x00020002, 0x00020001};
+ static const ASInt32 kNUMVERSIONS = sizeof(versionLessVersions) / sizeof(ASUns32);
+
+ ASInt32 i;
+ HFT thft = NULL; /* we use a temp hft in case we are replacing gCoreHFT */
+
+ if (gAcroSupportVersion >= ASCallsHFT_VERSION_6) {
+ thft = ASExtensionMgrGetHFT(tablename, requiredVer);
+ if (thft) {
+ resultVer = HFTGetVersion(thft);
+ ACROASSERT(resultVer != HFT_ERROR_NO_VERSION); /* all Acrobat HFTs support HFTGetVersion */
+ }
+ }
+ if (resultVer == HFT_ERROR_NO_VERSION){
+ /* without a GetVersion version of the HFT, we must try all versions from latest on down and see what we get */
+ for (i=0;i<kNUMVERSIONS;i++) {
+ if (versionLessVersions[i]<requiredVer)
+ break;
+ thft = ASExtensionMgrGetHFT(tablename, versionLessVersions[i]);
+ if (thft)
+ break;
+ }
+ if (thft)
+ resultVer = versionLessVersions[i];
+ else
+ resultVer = 0;
+ }
+ *resultHFT = thft;
+ *resultingVer = resultVer;
+ if (TEST_OLD_VERSION < 0xFFFFFFFF && *resultingVer > TEST_OLD_VERSION)
+ *resultingVer = TEST_OLD_VERSION;
+#if WIN_PLATFORM && DEBUG
+ if (*resultingVer ==0)
+ {
+ TCHAR err[255];
+ wsprintf(err,_T("failed on %s version %s%x\n"),table,(requiredVer & kHFT_IN_BETA_FLAG) ?_T("(beta)"):_T(""),requiredVer & ~kHFT_IN_BETA_FLAG);
+ OutputDebugString(err);
+ }
+#endif
+
+ return *resultingVer != 0;
+}
+typedef struct {char* name; ASUns32 ver; ASUns32* retver; HFT* hft; ASBool optional; } HFTINFO;
+
+/*
+** This routine is called by the host application to set up the plug-in's SDK-provided functionality.
+*/
+ACCB1 ASBool ACCB2 PISetupSDK (ASUns32 handshakeVersion, void *sdkData)
+{
+ ASBool bSuccess;
+ int i;
+ HFTINFO hftInfo[] = {
+#if PI_CORE_VERSION == 0
+#error Define PI_CORE_VERSION to 0x00020000 or over for core HFT. This is not an optional HFT
+#else
+ {"Core",PI_CORE_VERSION,&gCoreVersion,&gCoreHFT,false},
+#endif
+#if PI_COS_VERSION != 0
+ {"Cos",PI_COS_VERSION,&gCosVersion,&gCosHFT,
+#ifdef PI_COS_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_COS_VERSION */
+
+#if PI_PDMODEL_VERSION != 0
+ {"PDModel",PI_PDMODEL_VERSION,&gPDModelVersion,&gPDModelHFT,
+#ifdef PI_PDMODEL_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_PDMODEL_VERSION */
+#if PI_PDFEDIT_WRITE_VERSION != 0
+ {"PDFEditWrite",PI_PDFEDIT_WRITE_VERSION,&gPDFEditWriteVersion,&gPDFEditWriteHFT,
+#ifdef PI_PDFEDIT_WRITE_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /*PI_PDFEDIT_WRITE_OPTIONAL*/
+#if PI_PDFEDIT_READ_VERSION != 0
+ {"PDFEditRead",PI_PDFEDIT_READ_VERSION,&gPDFEditReadVersion,&gPDFEditReadHFT,
+#ifdef PI_PDFEDIT_READ_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_PDFEDIT_READ_VERSION */
+#if PI_PDSYSFONT_VERSION != 0
+ {"PDSysFont",PI_PDSYSFONT_VERSION,&gPDSysFontVersion,&gPDSysFontHFT,
+#ifdef PI_PDSYSFONT_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_PDSYSFONT_VERSION */
+
+#if PI_PAGE_PDE_CONTENT_VERSION != 0
+ {"PagePDEContent",PI_PAGE_PDE_CONTENT_VERSION,&gPagePDEContentVersion,&gPagePDEContentHFT,
+#ifdef PI_PAGE_PDE_CONTENT_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_PAGE_PDE_CONTENT_VERSION */
+
+#if PI_ACROVIEW_VERSION != 0
+ {"AcroView",PI_ACROVIEW_VERSION,&gAcroViewVersion,&gAcroViewHFT,
+#ifdef PI_ACROVIEW_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_ACROVIEW_VERSION */
+
+#if PI_PDSEDIT_WRITE_VERSION != 0
+ {"PDSWrite",PI_PDSEDIT_WRITE_VERSION,&gPDSWriteVersion,&gPDSWriteHFT,
+#ifdef PI_PDSEDIT_WRITE_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_PDSEDIT_WRITE_VERSION */
+
+#if PI_PDSEDIT_READ_VERSION != 0
+ {"PDSRead",PI_PDSEDIT_READ_VERSION,&gPDSReadVersion,&gPDSReadHFT,
+#ifdef PI_PDSEDIT_READ_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_PDSEDIT_READ_VERSION */
+#if PI_MACINTOSH_VERSION != 0
+ {"Macintosh",PI_MACINTOSH_VERSION,&gMacintoshVersion,&gMacintoshHFT,
+#ifdef PI_MACINTOSH_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_MACINTOSH_VERSION */
+
+#if PI_UNIX_VERSION != 0
+ {"Unix",PI_UNIX_VERSION,&gUnixVersion,&gUnixHFT,
+#ifdef PI_UNIX_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_UNIX_VERSION */
+
+#if PI_WIN_VERSION != 0
+ {"Win",PI_WIN_VERSION,&gWinVersion,&gWinHFT,
+#ifdef PI_WIN_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_WIN_VERSION */
+
+#if PI_ASEXTRA_VERSION != 0
+ {"ASExtra",PI_ASEXTRA_VERSION,&gASExtraVersion,&gASExtraHFT,
+#ifdef PI_ASEXTRA_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_ASEXTRA_VERSION */
+
+#if PI_ACROVIEW_SWEETPEA_VERSION != 0
+ {"AcroViewSweetPea",PI_ACROVIEW_SWEETPEA_VERSION,&gAcroViewSweetPeaVersion,&gAcroViewSweetPeaHFT,
+#ifdef PI_ACROVIEW_SWEETPEA_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_ACROVIEW_SWEETPEA_VERSION */
+
+#if PI_PDMETADATA_VERSION != 0
+ {"PDMetadata",PI_PDMETADATA_VERSION,&gPDMetadataVersion,&gPDMetadataHFT,
+#ifdef PI_PDMETADATA_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_PDMETADATA_VERSION */
+
+#if PI_ACROCOLOR_VERSION != 0
+ {"AcroColorHFT",PI_ACROCOLOR_VERSION,&gAcroColorVersion,&gAcroColorHFT,
+#ifdef PI_ACROCOLOR_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_ACROCOLOR_VERSION */
+
+#if PI_ACROCOLOR_PRIVATE_VERSION != 0
+ {"AcroColorPrivateHFT",PI_ACROCOLOR_PRIVATE_VERSION,&gAcroColorPrivateVersion,&gAcroColorPrivateHFT,
+#ifdef PI_ACROCOLOR_PRIVATE_OPTIONAL
+ true},
+#else
+ false},
+#endif
+#endif /* PI_ACROCOLOR_VERSION */
+
+ };
+
+ if (handshakeVersion == HANDSHAKE_V0200)
+ {
+ /* Cast sdkData to the appropriate type */
+ PISDKData_V0200 *data = (PISDKData_V0200 *)sdkData;
+
+ /* Belt and suspenders sanity check */
+ if (data->handshakeVersion != HANDSHAKE_V0200)
+ /* Someone lied */
+ return FALSE;
+
+ /* Get our globals out */
+ gExtensionID = data->extensionID;
+ gCoreHFT = data->coreHFT;
+ gCoreVersion = 0x00020000; /* lowest version that supports v0200 handshake */
+
+ /*
+ ** Note that we just got the Core HFT, so now we can, and are expected to, ASCallbackCreate()
+ ** every function we pass back to the viewer.
+ ** We can now also call functions in the Core HFT (level 2), such as ASExtensionMgrGetHFT().
+ */
+ /* Get the HFTs we want */
+ /* this file wants AcroSupport for the HFTGetVersion call so try to get it if possible */
+ gAcroSupportHFT = ASExtensionMgrGetHFT(ASAtomFromString("AcroSupport"), ASCallsHFT_VERSION_6);
+ if (gAcroSupportHFT) {
+ gAcroSupportVersion = ASCallsHFT_VERSION_6; //to clear ACROASSERT in next call
+ gAcroSupportVersion = HFTGetVersion(gAcroSupportHFT);
+ bSuccess = true;
+#if PI_ACROSUPPORT_VERSION != 0
+ /* got version 6, now check to see if acrosupport is also compatible with rest of plugin */
+ bSuccess = GetRequestedHFT("AcroSupport",PI_ACROSUPPORT_VERSION,&gAcroSupportVersion,&gAcroSupportHFT);
+#endif
+ }
+ else {
+#if PI_ACROSUPPORT_VERSION == 0
+ bSuccess = true;
+#else
+ bSuccess = GetRequestedHFT("AcroSupport",PI_ACROSUPPORT_VERSION,&gAcroSupportVersion,&gAcroSupportHFT);
+#endif
+ }
+#ifndef PI_ACROSUPPORT_OPTIONAL
+ if (!bSuccess)
+ return FALSE;
+#endif
+ for (i=0;i<sizeof(hftInfo)/sizeof(hftInfo[0]);i++) {
+ bSuccess = GetRequestedHFT(hftInfo[i].name,hftInfo[i].ver,hftInfo[i].retver,hftInfo[i].hft);
+ if (!bSuccess && !hftInfo[i].optional)
+ return false;
+ }
+
+ /* Set the plug-in's handshake routine, which is called next by the host application */
+ data->handshakeCallback = (ASCallback)ASCallbackCreateProto(PIHandshakeProcType, PIHandshake);
+
+ /* Return success */
+ return TRUE;
+
+ } /* Each time the handshake version changes, add a new "else if" branch here */
+
+ /*
+ ** If we reach here, then we were passed a handshake version number we don't know about.
+ ** This shouldn't ever happen since our main() routine chose the version number.
+ */
+ return FALSE;
+}
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.h
new file mode 100644
index 0000000..9ba326a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIMain.h
@@ -0,0 +1,174 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIMain.h
+
+ - Include file for PIMain.c.
+ - Contains #defines, macros, function protos, and global variable
+ declarations.
+
+*********************************************************************/
+
+#ifndef _H_PIMain
+#define _H_PIMain
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "PICommon.h"
+#include "PIRequir.h"
+
+#include "CoreExpT.h"
+
+extern HFT gCoreHFT;
+extern ASUns32 gCoreVersion;
+
+/* The following globals are only needed if functions from them are being accessed */
+
+#if PI_ACROSUPPORT_VERSION != 0
+extern HFT gAcroSupportHFT;
+extern ASUns32 gAcroSupportVersion;
+#endif
+
+#if PI_COS_VERSION != 0
+extern HFT gCosHFT;
+extern ASUns32 gCosVersion;
+#endif
+
+#if PI_PDMODEL_VERSION != 0
+extern HFT gPDModelHFT;
+extern ASUns32 gPDModelVersion;
+#endif
+
+#if PI_PDFEDIT_READ_VERSION != 0
+extern HFT gPDFEditReadHFT;
+extern ASUns32 gPDFEditReadVersion;
+#endif
+
+#if PI_PDFEDIT_WRITE_VERSION != 0
+extern HFT gPDFEditWriteHFT;
+extern ASUns32 gPDFEditWriteVersion;
+#endif
+
+#if PI_PDSYSFONT_VERSION != 0
+extern HFT gPDSysFontHFT;
+extern ASUns32 gPDSysFontVersion;
+#endif
+
+#if PI_PAGE_PDE_CONTENT_VERSION != 0
+extern HFT gPagePDEContentHFT;
+extern ASUns32 gPagePDEContentVersion;
+#endif
+
+#if PI_ACROVIEW_VERSION != 0
+extern HFT gAcroViewHFT;
+extern ASUns32 gAcroViewVersion;
+#endif
+
+#if PI_PDSEDIT_WRITE_VERSION != 0
+extern HFT gPDSWriteHFT;
+extern ASUns32 gPDSWriteVersion;
+#endif
+
+#if PI_PDSEDIT_READ_VERSION != 0
+extern HFT gPDSReadHFT;
+extern ASUns32 gPDSReadVersion;
+#endif
+
+#if PI_MACINTOSH_VERSION != 0
+extern HFT gMacintoshHFT;
+extern ASUns32 gMacintoshVersion;
+#endif
+
+#if PI_WIN_VERSION
+extern HFT gWinHFT;
+extern ASUns32 gWinVersion;
+#endif
+
+#if PI_OS2_VERSION
+extern HFT gOS2HFT;
+extern ASUns32 gOS2Version;
+#endif
+
+#if PI_ASEXTRA_VERSION
+extern HFT gASExtraHFT;
+extern ASUns32 gASExtraVersion;
+#endif
+
+#if PI_ACROVIEWSWEETPEA_VERSION
+extern HFT gAcroViewSweetPeaHFT;
+extern ASUns32 gAcroViewSweetPeaVersion;
+#endif
+
+#if PI_PDMETADATA_VERSION != 0
+extern HFT gPDMetadataHFT;
+extern ASUns32 gPDMetadataVersion;
+#endif
+
+#if PI_ACROCOLOR_PRIVATE_VERSION != 0
+extern HFT gAcroColorPrivateHFT;
+extern ASUns32 gAcroColorPrivateVersion;
+#endif
+
+
+#if WIN_PLATFORM
+#include <windows.h>
+extern HINSTANCE gHINSTANCE;
+extern HWND gHWND;
+#endif
+
+#if UNIX_PLATFORM
+extern void *gHandle;
+#endif
+ASBool GetRequestedHFT(char* table, ASUns32 requiredVer, ASUns32 *resultingVer, HFT *resultHFT);
+
+/*
+** Prototypes for PI-provided functions in the handshaking.
+*/
+
+ACCB1 ASBool ACCB2 PISetupSDK(ASUns32 handshakeVersion, void *sdkData);
+
+#if MAC_PLATFORM
+
+/*
+ Acrobat's bundle. Please do not use CFBundleGetMainBundle() -- If you are running in the
+ browser, CFBundleGetMainBundle() returns the bundle of the browser and not Acrobat's. If you're
+ going to hold onto this, remember to call CFRetain() and CFRelease() on it.
+*/
+extern CFBundleRef gAppBundle;
+
+/*
+ The plug-ins bundle. If you're going to hold onto this, remember to call CFRetain() and
+ CFRelease() on it.
+*/
+extern CFBundleRef gPluginBundle;
+
+/*
+ GetAcroPluginResourceMap
+
+ This routine opens the resource map of the plug-in. Opening resources is expensive (performance wise)
+ so only do so if resources are really needed.
+
+ @returns The resource reference number for the plug-ins resource file or kResFileNotOpened if the file cannot be opened
+*/
+short GetAcroPluginResourceMap();
+
+#endif /* MAC_PLATFORM */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PIMAIN */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPokes.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPokes.h
new file mode 100644
index 0000000..c0926c4
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPokes.h
@@ -0,0 +1,2879 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIPokes.h
+
+ - List of prototypes for notifications. Plug-in clients that register
+ for notifications have to register functions that match the prototypes
+ listed below. All notification-callbacks return void.
+
+*********************************************************************/
+
+/* POKE(name, notifier formals, notifiee formals, notifiee actuals) */
+
+/* PDF Library does not define AVWindow (bug 1121523) */
+#if TOOLKIT
+#ifndef AVWindow
+#define AVWindow void*
+#endif
+#endif
+
+/* AvApp-related notifications */
+
+/**
+ The Acrobat viewer has finished initializing and is about
+ to enter its event loop.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVAppWillQuit
+*/
+POKE(AVAppDidInitialize, (void), (void *clientData), (cell->clientData))
+
+/**
+ The Acrobat viewer is quitting. All documents have been
+ closed. To access or enumerate documents when the application
+ is quitting, replace the <code>AVAppCanQuit()</code> method, access or
+ enumerate documents in your replacement for that procedure,
+ and return <code>true</code> to allow the Acrobat viewer to continue
+ quitting.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVAppDidInitialize
+*/
+POKE(AVAppWillQuit, (void), (void *clientData), (cell->clientData))
+
+/**
+ The front-most <code>AVDoc</code> has changed.
+ @param doc The document that was brought to the front.
+ It is <code>NULL</code> if there is no front-most document (for example, the
+ previous front-most document was just closed).
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidActivate
+ @notify AVDocDidDeactivate
+ @see AVWindowBringToFront
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+
+ @note This notification is not broadcast for external windows,
+ such as OLE applications or PDF files being displayed in
+ Netscape Navigator.
+*/
+POKE(AVAppFrontDocDidChange, (AVDoc doc), (AVDoc doc, void *clientData), (doc, cell->clientData))
+
+/* AVDoc-related notifications */
+
+/**
+ An <code>AVDoc</code> will be opened from a file.
+ @param fileName The <code>ASPathName</code> for the file that will
+ be opened.
+ @param fileSys The file system responsible for the file
+ to open.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidOpen
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+*/
+POKE(AVDocWillOpenFromFile, (ASPathName fileName, ASFileSys fileSys), (ASPathName fileName, ASFileSys fileSys, void *clientData), (fileName, fileSys, cell->clientData))
+
+/**
+ <p>A document has been opened. </p>
+
+ <p>Calling <code>AVDocClose()</code> within this notification is forbidden. </p>
+
+ @param doc The document that was opened.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while opening the file. If an error occurred, error
+ contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocWillOpenFromFile
+ @notify AVDocWillOpenFromPDDoc
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+*/
+POKE(AVDocDidOpen, (AVDoc doc, ASInt32 error), (AVDoc doc, ASInt32 error, void *clientData), (doc, error, cell->clientData))
+
+/**
+ An <code>AVDoc</code> has activated. At the time this notification is
+ broadcast, it is possible that the window being activated
+ has not yet been brought to the front. For this reason,
+ the <code>AVAppFrontDocDidChange()</code> notification is often more useful.
+ @param doc The document that was activated.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidDeactivate
+ @notify AVAppFrontDocDidChange
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+
+ @note AVAppGetActiveDoc() will not necessarily return the
+ AVDoc returned in this notification. For instance, if there
+ is An <code>AVDoc</code> in an external window (such as a web browser's window)
+ that becomes active, The <code>AVDoc</code> returned by this notification
+ will not match what AVAppGetActiveDoc() returns.
+
+ @note This notification is not broadcast for external windows,
+ such as OLE applications or PDF files being displayed in
+ Netscape.
+*/
+POKE(AVDocDidActivate, (AVDoc doc), (AVDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ A document was deactivated.
+ @param doc The document that was deactivated.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidActivate
+ @notify AVAppFrontDocDidChange
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+
+ @note This notification is not broadcast for external windows,
+ such as OLE applications or PDF files being displayed in
+ Netscape Navigator.
+*/
+POKE(AVDocDidDeactivate, (AVDoc doc), (AVDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ An <code>AVDoc</code> will be closed. Neither this notification nor <code>AVDocDidClose()</code>
+ are broadcast if the user selects <i>Cancel</i> when prompted
+ to save a modified document as it is closed.
+ @param doc The document that will be closed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidClose AVDocClose
+
+ @note Reads made from AVDocWillClose() on an in-browser document
+ will fail if the data is not already downloaded.
+*/
+POKE(AVDocWillClose, (AVDoc doc),(AVDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ A document has been closed. Although An <code>AVDoc</code> is passed
+ to the routine called by this notification, the document
+ has already been closed but not freed. As a result, all
+ the routine can really do is manipulate any private data
+ in the underlying PDF file at the time this notification
+ occurs.
+ @param doc The document that was closed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocWillClose AVDocClose
+*/
+POKE(AVDocDidClose, (AVDoc doc),(AVDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ A document's selection is about to be cleared.
+ @param doc The document whose selection will be cleared.
+
+ @param selType The <code>ASAtom</code> corresponding to the current
+ selection type.
+ @param selData A pointer to the current selection data.
+ The format and contents of <code>selData</code> depend on <code>selType</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidAddToSelection
+ @notify AVDocDidClearSelection
+ @notify AVDocDidSetSelection
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocSetSelection
+*/
+POKE(AVDocWillClearSelection, (AVDoc doc, ASAtom selType, void* selData), (AVDoc doc, ASAtom selType, void* selData, void *clientData), (doc, selType, selData, cell->clientData))
+
+/**
+ The document's selection has been set.
+ @param doc The document whose selection was set.
+ @param selType The <code>ASAtom</code> corresponding to the current
+ selection type. See <code>AVDocSetSelection()</code> for a list of selection
+ types.
+ @param selData A pointer to the current selection data.
+ The format and contents of <code>selData</code> depend on <code>selType</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidAddToSelection
+ @notify AVDocDidClearSelection
+ @notify AVDocWillClearSelection
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocSetSelection
+*/
+POKE(AVDocDidSetSelection, (AVDoc doc, ASAtom selType, void* selData), (AVDoc doc, ASAtom selType, void* selData, void *clientData), (doc, selType, selData, cell->clientData))
+
+/**
+ <p>An action is about to be performed. </p>
+
+ <p>The following methods broadcast this notification if the
+ document has an open action: </p>
+ <ul>
+ <li>AVDocOpenFromASFileWithParamString()</li>
+ <li>AVDocOpenFromFile()</li>
+ <li>AVDocOpenFromASFileWithParams()</li>
+ <li>AVDocOpenFromPDDoc()</li>
+ <li>AVDocOpenFromPDDocWithParams()</li>
+ </ul>
+
+ @param doc The document containing the action that will
+ be performed.
+ @param action The action that will be performed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidPerformAction
+ @see AVDocPerformAction
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+*/
+POKE(AVDocWillPerformAction, (AVDoc doc, PDAction action), (AVDoc doc, PDAction action, void* clientData), (doc, action, cell->clientData))
+
+/**
+ <p>An action was performed. </p>
+
+ <p>The following methods broadcast this notification if the
+ document has an open action: </p>
+ <ul>
+ <li>AVDocOpenFromASFileWithParamString()</li>
+ <li>AVDocOpenFromFile()</li>
+ <li>AVDocOpenFromASFileWithParams()</li>
+ <li>AVDocOpenFromPDDoc()</li>
+ <li>AVDocOpenFromPDDocWithParams()</li>
+ </ul>
+
+ @param doc The document containing the action that was
+ performed.
+ @param action The action that was performed.
+ @param err The error code. <code>err</code> is set to <code>0</code> if no errors
+ occurred while performing the action. If an error occurred,
+ <code>err</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocWillPerformAction
+ @see AVDocPerformAction
+ @see AVDocOpenFromASFileWithParamString
+ @see AVDocOpenFromFile
+ @see AVDocOpenFromASFileWithParams
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+*/
+POKE(AVDocDidPerformAction, (AVDoc doc, PDAction action, ASInt32 err), (AVDoc doc, PDAction action, ASInt32 err, void* clientData), (doc, action, err, cell->clientData))
+
+/* AVPageView-related notifications */
+
+/**
+ Redrawing occurred in the page view section of the window.
+
+ @param pageView The <code>AVPageView</code> in which drawing occurred.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVPageViewDidChange
+ @notify AVPageViewWillDraw
+ @see AVPageViewDrawNow
+*/
+POKE(AVPageViewDidDraw, (AVPageView pageView), (AVPageView pageView, void *clientData), (pageView, cell->clientData))
+
+/**
+ The page view has changed. Zero or more of the following
+ events has occurred:
+ <ul>
+ <li> The page number has changed.</li>
+ <li> The zoom factor has changed.</li>
+ <li> The window has been resized.</li>
+ <li> The page has been scrolled.</li>
+ </ul>
+
+ @param pageView The <code>AVPageView</code> that has changed.
+ @param how Specifies how the page view did change. <code>how</code>
+ is an OR of zero or more of the following (see AVExpT.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_SCROLL</code></TD><TD>The view has been scrolled.</TD></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_PAGENUM</code></TD><TD>The page number has changed.</TD></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_PAGESIZE</code></TD><TD>A new view has been created.</TD></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_ZOOM</code></TD><TD>The zoom has been changed.</TD></TR>
+ </TABLE>
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocActivePageViewDidChange
+ @notify AVPageViewDidDraw
+ @notify AVPageViewWasCreated
+ @notify AVPageViewWillDestroy
+ @see AVPageViewZoomTo
+ @see AVPageViewScrollTo
+ @see AVPageViewScrollToRect
+ @see AVPageViewGoTo
+ @see AVPageViewReadPageDown
+ @see AVPageViewReadPageUp
+ @see AVPageViewGoBack
+ @see AVPageViewGoForward
+ @see AVPageViewUseDestInfo
+ @see AVPageViewUseThisDestination
+
+ @note If continuous scrolling is turned on (available in
+ Acrobat 3.0 or later) and more than one page is displayed
+ in the <code>AVPageView</code>, alternating mouse clicks in the different
+ pages displayed does not constitute a change to the <code>AVPageView</code>.
+*/
+POKE(AVPageViewDidChange, (AVPageView pageView, ASInt16 how), (AVPageView pageView, ASInt16 how, void *clientData), (pageView, how, cell->clientData))
+
+/* PDDoc-related notifications */
+
+/**
+ One or more pages will be inserted.
+ @param doc The document into which pages will be inserted.
+
+ @param insertAfterThisPage The page number (in <code>doc</code>) after
+ which pages will be inserted.
+ @param srcDoc The document that provides the pages to
+ insert. This is <code>NULL</code> when a new blank page is created and
+ inserted into a document. This is <code>NULL</code> for a notification
+ broadcast by <code>PDDocCreatePage()</code>.
+ @param srcFromPage The page number (in <code>srcDoc</code>) of the
+ first page that will be inserted. It is not valid when a new blank
+ page is created and inserted into a document. This is <code>NULL</code>
+ for a notification broadcast by <code>PDDocCreatePage()</code>.
+ @param srcToPage The page number (in <code>srcDoc</code>) of the last
+ page that will be inserted. It is not valid when a new blank page
+ is created and inserted into a document. This is <code>NULL</code> for
+ a notification broadcast by <code>PDDocCreatePage()</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidInsertPages
+ @notify PDDocWillChangePages
+ @see PDDocCreatePage
+ @see PDDocInsertPages
+*/
+POKE(PDDocWillInsertPages, \
+ (PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage), \
+ (PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, void *clientData), \
+ (doc, insertAfterThisPage, srcDoc, srcFromPage, srcToPage, cell->clientData))
+
+/**
+ One or more pages have been inserted.
+ @param doc The document into which pages were inserted.
+
+ @param insertAfterThisPage The page number (in <code>doc</code>) after
+ which pages were inserted.
+ @param srcDoc The document that provided the pages that
+ were inserted. This is <code>NULL</code> when a new blank page is created
+ and inserted into a document. This is <code>NULL</code> for a notification
+ broadcast by <code>PDDocCreatePage()</code>.
+ @param srcFromPage The page number (in <code>srcDoc</code>) of the
+ first page that was inserted. It is not valid when a new blank
+ page is created and inserted into a document. This is <code>NULL</code>
+ for a notification broadcast by <code>PDDocCreatePage()</code>.
+ @param srcToPage The page number (in <code>srcDoc</code>) of the last
+ page that was inserted. It is not valid when a new blank page
+ is created and inserted into a document. This is <code>NULL</code> for
+ a notification broadcast by <code>PDDocCreatePage()</code>.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while inserting the pages. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillInsertPages
+ @notify PDDocDidChangePages
+ @see PDDocCreatePage
+ @see PDDocInsertPages
+*/
+POKE(PDDocDidInsertPages, \
+ (PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error), \
+ (PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error, void *clientData), \
+ (doc, insertAfterThisPage, srcDoc, srcFromPage, srcToPage, error, cell->clientData))
+
+/**
+ One or more pages will be replaced.
+ @param doc The document in which pages will be replaced.
+
+ @param fromPage The page number (in <code>doc</code>) of the first
+ page that will be replaced.
+ @param toPage The page number (in <code>doc</code>) of the last page
+ that will be replaced.
+ @param srcDoc The document that provides the replacement
+ pages.
+ @param srcFromPage The page number (in <code>srcDoc</code>) of the first
+ replacement page.
+ @param srcToPage The page number (in <code>srcDoc</code>) of the last
+ replacement page.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidReplacePages
+ @notify PDDocWillChangePages
+ @see PDDocReplacePages
+*/
+POKE(PDDocWillReplacePages, \
+ (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage), \
+ (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, void *clientData), \
+ (doc, fromPage, toPage, srcDoc, srcFromPage, srcToPage, cell->clientData))
+
+/**
+ One or more pages have been replaced.
+ @param doc The document in which pages have been replaced.
+
+ @param fromPage The page number (in <code>doc</code>) of the first
+ page that was replaced.
+ @param toPage The page number (in <code>doc</code>) of the last page
+ that was replaced.
+ @param srcDoc The document that provided the replacement
+ pages.
+ @param srcFromPage The page number (in <code>srcDoc</code>) of the first
+ replacement page.
+ @param srcToPage The page number (in <code>srcDoc</code>) of the last
+ replacement page.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while replacing pages. If an error occurred, <code>error</code>
+ contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillReplacePages
+ @notify PDDocDidChangePages
+ @see PDDocReplacePages
+*/
+POKE(PDDocDidReplacePages, \
+ (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error), \
+ (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error, void *clientData), \
+ (doc, fromPage, toPage, srcDoc, srcFromPage, srcToPage, error, cell->clientData))
+
+
+/**
+ One or more pages will be moved.
+ @param doc The document in which pages will be moved.
+
+ @param moveAfterThisPage The page number after which the
+ moved pages will be placed.
+ @param fromPage The page number of the first page to move.
+
+ @param toPage The page number of the last page to move.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidMovePages
+ @notify PDDocWillChangePages
+ @see PDDocMovePage
+*/
+POKE(PDDocWillMovePages, \
+ (PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage), \
+ (PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage, void *clientData), \
+ (doc, moveAfterThisPage, fromPage, toPage, cell->clientData))
+
+/**
+ One or more pages were moved.
+ @param doc The document in which pages were moved.
+ @param moveAfterThisPage The page number after which the
+ moved pages were placed.
+ @param fromPage The page number of the first page that
+ was moved.
+ @param toPage The page number of the last page that was
+ moved.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while moving pages. If an error occurred, <code>error</code>
+ contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillMovePages
+ @notify PDDocDidChangePages
+ @see PDDocMovePage
+*/
+POKE(PDDocDidMovePages, \
+ (PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage, ASInt32 error), \
+ (PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void *clientData), \
+ (doc, moveAfterThisPage, fromPage, toPage, error, cell->clientData))
+
+/**
+ One or more pages will be deleted.
+ @param doc The document from which pages will be deleted.
+
+ @param fromPage The page number of the first page that
+ will be deleted.
+ @param toPage The page number of the last page that will
+ be deleted.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidDeletePages
+ @notify PDDocDidChangePages
+ @see PDDocDeletePages
+*/
+POKE(PDDocWillDeletePages, (PDDoc doc, ASInt32 fromPage, ASInt32 toPage), (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, void *clientData), (doc, fromPage, toPage, cell->clientData))
+
+/**
+ One or more pages were deleted.
+ @param doc The document from which pages were deleted.
+
+ @param fromPage The page number of the first page that
+ was deleted.
+ @param toPage The page number of the last page that was
+ deleted.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while deleting the pages. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillDeletePages
+ @notify PDDocDidChangePages
+ @see PDDocDeletePages
+*/
+POKE(PDDocDidDeletePages, (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error), (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void *clientData), (doc, fromPage, toPage, error, cell->clientData))
+
+/**
+ Pages will be inserted, deleted, moved, or modified.
+ @param doc The document in which pages will be changed.
+
+ @param op The change that will be made. <code>op</code> will be one
+ of the PDOperation values.
+ @param fromPage The page number of the first page that
+ will be modified.
+ @param toPage The page number of the last page that will
+ be modified.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidChangePages
+ @see PDDocDeletePages
+ @see PDPageSetRotate
+ @see PDPageSetMediaBox
+ @see PDPageSetCropBox
+*/
+POKE(PDDocWillChangePages, (PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage), (PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage, void *clientData), (doc, op, fromPage, toPage, cell->clientData))
+
+/**
+ Pages have been inserted, deleted, moved, or modified.
+ @param doc The document in which pages have been changed.
+
+ @param op The change that was made. <code>op</code> will be one of
+ the PDOperation values.
+ @param fromPage The page number of the first page that
+ was modified. For page insertion, this is the number of
+ the page before the first inserted page. For page deletion,
+ this is the page number of the first deleted page.
+ @param toPage The page number of the last page that was
+ modified. If broadcast by <code>PDDocCreatePage()</code>, this is the number
+ of the newly created page. When broadcast by <code>PDDocInsertPages()</code>,
+ <code>toPage</code> is the number of pages in the document post-insertion;
+ that is, it points to a page not in the document. If broadcast
+ by <code>PDDocDeletePages()</code>, <code>toPage</code> is the number of pages in the
+ PDDoc prior to deletion, pointing to a page not in the document.
+
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while changing the pages. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillChangePages
+ @see PDDocCreatePage
+ @see PDDocInsertPages
+ @see PDDocReplacePages
+ @see PDDocMovePage
+ @see PDPageAddCosResource
+ @see PDPageRemoveCosResource
+ @see PDPageAddCosContents
+ @see PDPageRemoveCosContents
+ @see PDDocDeletePages
+ @see PDPageSetRotate
+ @see PDPageSetMediaBox
+ @see PDPageSetCropBox
+*/
+POKE(PDDocDidChangePages, (PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage, ASInt32 error), (PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void *clientData), (doc, op, fromPage, toPage, error, cell->clientData))
+
+/**
+ Thumbnail images have been added or removed. In addition
+ to the expected ways in which this can occur, it can also
+ occur if pages are inserted into a file.
+ @param doc The document in which thumbnail images have
+ been changed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidChangePages
+ @notify PDDocDidDeletePages
+ @notify PDDocDidInsertPages
+ @notify PDDocDidReplacePages
+ @notify PDDocWillChangePages
+ @notify PDDocWillDeletePages
+ @notify PDDocWillInsertPages
+ @notify PDDocWillReplacePages
+ @see PDDocCreatePage
+ @see PDDocCreateThumbs
+ @see PDDocDeleteThumbs
+ @see PDDocInsertPages
+*/
+POKE(PDDocDidChangeThumbs, (PDDoc doc), (PDDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ This notification is broadcast when printing begins, before
+ any pages are printed.
+ @param doc The document from which pages will be printed.
+
+ @param fromPage The page number of the first page that
+ will be printed.
+ @param toPage The page number of the last page that will
+ be printed.
+ @param psLevel When printing to a PostScript printer,
+ <code>psLevel</code> is either <code>1</code> or <code>2</code>, representing the PostScript level
+ available on the printer. When printing to a non-PostScript
+ printer, <code>psLevel</code> is <code>0</code>. <code>psLevel</code> is useful in determining
+ whether the output device is a PostScript printer. In addition,
+ when printing to a PostScript printer, <code>psLevel</code> is useful
+ to determine the operators that can be sent in any printing
+ code downloaded using the <code>PDDocWillPrintDoc()</code>, <code>PDDocWillPrintPage()</code>,
+ and <code>PDDocDidPrintPage()</code> notifications.
+ @param binaryOK Valid only when printing to a PostScript
+ printer. It indicates whether binary data can be sent.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillPrintDoc
+ @notify PDDocWillPrintPage
+ @notify PDDocDidPrintPages
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+
+ @note Page resources and contents cannot be modified reliably
+ at the time this notification is broadcast.
+*/
+POKE(PDDocWillPrintPages, (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 psLevel, ASBool binaryOK),
+ (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 psLevel, ASBool binaryOK, void *clientData),
+ (doc, fromPage, toPage, psLevel, binaryOK, cell->clientData))
+
+/**
+ This notification is broadcast after printing ends.
+ @param doc The document from which pages were printed.
+
+ @param fromPage The page number of the first page that
+ was printed.
+ @param toPage The page number of the last page that was
+ printed.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while printing the pages. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillPrintPages
+ @notify PDDocDidPrintPage
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+*/
+POKE(PDDocDidPrintPages, (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error), (PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void *clientData), (doc, fromPage, toPage, error, cell->clientData))
+
+/**
+ This notification is broadcast once per page that is printed,
+ before any marks are made on the page. When printing to
+ a PostScript printer, printing commands can also be sent
+ that will be placed on the page before any other marks.
+ @param doc The document from which a page is about to
+ be printed.
+ @param page The page number of the page that is about
+ to be printed.
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, or <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> with <code>ASStmWrite()</code> to
+ add marks to the printed page before any other marks have
+ been made. In the 2.x Acrobat viewers, the page printing
+ sequence to a PostScript printer is:
+
+ <p><code>page setup (including setpagedevice) ... save
+ ... gsave ... save ... begin ... begin ... begin
+ ... PDDocWillPrintPage() ... page contents ...
+ PDDocDidPrintPage() ... end ... end ... end ... restore ...
+ restore ... showpage</code></p>
+
+ <p>This sequence must not be relied upon,
+ and depends on the printer driver in use. However, by the
+ time the <code>PDDocWillPrintPage()</code> notification is broadcast, it
+ is too late to perform any <code>setpagedevice</code> operations. </p>
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidPrintPage
+ @notify PDDocWillPrintPages
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+
+ @note Page resources and contents cannot be modified reliably
+ at the time this notification is broadcast.
+*/
+POKE(PDDocWillPrintPage, (PDDoc doc, ASInt32 page, ASStm stm), (PDDoc doc, ASInt32 page, ASStm stm, void *clientData), (doc, page, stm, cell->clientData))
+
+/**
+ This notification is broadcast once per page that is printed,
+ after all marks have been made on the page. When printing
+ to a PostScript printer, printing commands can also be sent
+ that will be placed on the page after all other marks.
+ @param doc The document from which a page was printed.
+
+ @param page The page number of the page that was printed.
+
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, and <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> (using <code>ASStmWrite()</code>)
+ to add marks to the printed page after all other marks have
+ been made. See PDDocWillPrintPage() for a description of the
+ sequence of operations when printing a page to a PostScript
+ printer.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while printing the page. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillPrintPage
+ @notify PDDocDidPrintPages
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+*/
+POKE(PDDocDidPrintPage, (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error), (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error, void *clientData), (doc, page, stm, error, cell->clientData))
+
+/**
+ A thread has been added to a document.
+ @param doc The document to which a thread was added.
+ @param thread The thread that was added.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDThreadDidChange
+ @see PDDocAddThread
+ @see PDDocInsertPages
+*/
+POKE(PDDocDidAddThread, (PDDoc doc, PDThread thread), (PDDoc doc, PDThread thread, void* clientData), (doc, thread, cell->clientData))
+
+/**
+ A thread was removed from a document.
+ @param doc The document from which a thread was removed.
+
+ @param index The index of the thread that was removed.
+ Because the thread has already been removed, it is not possible
+ to access it using <code>index</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillRemoveThread
+ @see PDDocRemoveThread
+*/
+POKE(PDDocDidRemoveThread, (PDDoc doc, ASInt32 index), (PDDoc doc, ASInt32 index, void* clientData), (doc, index, cell->clientData))
+
+/**
+ <p>A document will be saved. </p>
+
+ <p>The <code> PDDocWillSave()</code> notification takes place just before the
+ save operation begins. At the time of a <code>WillSave()</code> notification,
+ the current <code> PDDoc</code> is valid. </p>
+
+ <p>See <code>PDDocWillSaveEx()</code> for important information on releasing
+ objects derived from the <code>PDDoc</code> before it is saved, and <code>PDDocDidSave()</code>
+ for information on reacquiring objects from the <code>PDDoc</code> after
+ it has been saved. </p>
+
+ @param doc The document that will be saved.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidSave
+ @notify PDDocWillSaveEx
+ @see PDDocSave
+ @see PDDocSaveWithParams
+*/
+POKE(PDDocWillSave, (PDDoc doc), (PDDoc doc, void* clientData), (doc, cell->clientData))
+
+/**
+ <p>A document has been saved. </p>
+
+ <p>The <code>PDDocDidSave()</code> notification takes place just after the
+ save operation finishes. At the time of a <code>DidSave()</code> notification,
+ a client or application can reacquire resources from the
+ <code>PDDoc</code> if needed. It should examine the error code <code>err</code> associated
+ with the save. If the save was not successful, the error
+ code is non-zero. In the case of a unsuccessful save, a
+ client or application should not attempt to do anything
+ further with this <code>PDDoc</code>. </p>
+
+ <p>See <code>PDDocWillSaveEx()</code> for important information on releasing
+ objects derived from the <code>PDDoc</code> before it is saved.</p>
+
+ @param doc The document that was saved.
+ @param err The error code. <code>err</code> is set to <code>0</code> if no errors
+ occurred while saving the file. If an error occurred, <code>err</code>
+ contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillSave
+ @notify PDDocWillSaveEx
+ @see CosObjRefreshAfterLinearizedSave
+ @see PDDocSave
+*/
+POKE(PDDocDidSave, (PDDoc doc, ASInt32 err), (PDDoc doc, ASInt32 err, void* clientData), (doc, err, cell->clientData))
+
+
+/**
+ The contents of a page have changed and the page will be
+ redrawn.
+ @param page The page whose contents changed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageContentsDidChangeEx
+ @see PDPageNotifyContentsDidChange
+ @see PDPageNotifyContentsDidChangeEx
+*/
+POKE(PDPageContentsDidChange, (PDPage page),(PDPage page, void *clientData), (page, cell->clientData))
+
+/**
+ An annotation will be added to a page.
+ @param page The page to which the annotation will be added.
+
+ @param addAfter The index in the page's annotation array
+ after which the annotation will be added.
+ @param annot The annotation that will be added.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageDidAddAnnot
+ @see PDPageAddAnnot
+ @see PDPageAddNewAnnot
+*/
+POKE(PDPageWillAddAnnot, (PDPage page, ASInt32 addAfter, PDAnnot annot), (PDPage page, ASInt32 addAfter, PDAnnot annot, void *clientData), (page, addAfter, annot, cell->clientData))
+
+/**
+ An annotation was added to a page.
+ @param page The page to which the annotation was added.
+
+ @param annot The annotation that was added.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while adding the annotation. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageWillAddAnnot
+ @see PDPageAddAnnot
+ @see PDPageAddNewAnnot
+*/
+POKE(PDPageDidAddAnnot, (PDPage page, PDAnnot annot, ASInt32 error), (PDPage page, PDAnnot annot, ASInt32 error, void *clientData), (page, annot, error, cell->clientData))
+
+/**
+ An annotation will be removed from a page.
+ @param page The page from which an annotation will be
+ removed.
+ @param annotIndex The index (in the page's annotation
+ array) of the annotation that will be removed. Use PDPageGetAnnot()
+ to obtain the annotation from its index.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageDidRemoveAnnot
+ @see PDPageRemoveAnnot
+*/
+POKE(PDPageWillRemoveAnnot, (PDPage page, ASInt32 annotIndex), (PDPage page, ASInt32 annotIndex, void *clientData), (page, annotIndex, cell->clientData))
+
+/**
+ <p>Superseded by <code>PDPageDidRemoveAnnotEx()</code> in Acrobat 6.0. </p>
+
+ <p>An annotation has been removed from a page. </p>
+
+ @param page The page from which an annotation was removed.
+
+ @param annotIndex The index (in the page's annotation
+ array) of the annotation that was removed. Because the annotation
+ has already been removed from the array, it is not possible
+ to access the annotation using <code>annotIndex</code>.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while removing the annotation. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageWillRemoveAnnot
+ @see PDPageRemoveAnnot
+
+*/
+POKE(PDPageDidRemoveAnnot, (PDPage page, ASInt32 annotIndex, ASInt32 error), (PDPage page, ASInt32 annotIndex, ASInt32 error, void *clientData), (page, annotIndex, error, cell->clientData))
+
+
+/**
+ An annotation was created.
+ @param annot The annotation that was created.
+ @param page The page to which the annotation was added.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDAnnotDidChange
+ @notify PDAnnotWillChange
+ @see PDPageCreateAnnot
+ @see PDPageAddNewAnnot
+*/
+POKE(PDAnnotWasCreated, (PDAnnot annot, PDPage page), (PDAnnot annot, PDPage page, void *clientData), (annot, page, cell->clientData))
+
+/**
+ An annotation will change in the specified way.
+ @param annot The annotation that will change.
+ @param key The <code>ASAtom</code> specifying how the annotation will
+ change. The <code>ASAtom</code> corresponding to the key that changed
+ in the annotation's Cos dictionary. See Section 8.4 on annotations
+ in the <i>PDF Reference</i> for information on the keys.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDAnnotDidChange
+ @see PDAnnotNotifyWillChange
+ @see PDAnnotSetRect
+ @see PDTextAnnotSetOpen
+ @see PDAnnotSetColor
+ @see PDAnnotSetTitle
+ @see PDAnnotSetDate
+ @see PDAnnotSetFlags
+ @see PDTextAnnotSetContents
+ @see PDLinkAnnotSetBorder
+ @see PDLinkAnnotSetAction
+ @see AVPageViewSetAnnotLocation
+*/
+POKE(PDAnnotWillChange, (PDAnnot annot, ASAtom key), (PDAnnot annot, ASAtom key, void* clientData), (annot, key, cell->clientData))
+
+/**
+ An annotation changed in the specified way.
+ @param annot The annotation that changed.
+ @param key The <code>ASAtom</code> specifying how the annotation changed.
+ The <code>ASAtom</code> corresponding to the key that changed in the
+ annotation's Cos dictionary. See Section 8.4 on annotations
+ in the <i>PDF Reference</i> for information on the keys.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while changing the annotation. If an error occurred,
+ <code>error</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDAnnotWillChange
+ @see PDAnnotNotifyDidChange
+ @see PDAnnotSetRect
+ @see PDTextAnnotSetOpen
+ @see PDAnnotSetColor
+ @see PDAnnotSetTitle
+ @see PDAnnotSetDate
+ @see PDAnnotSetFlags
+ @see PDTextAnnotSetContents
+ @see PDLinkAnnotSetBorder
+ @see PDLinkAnnotSetAction
+ @see AVPageViewSetAnnotLocation
+*/
+POKE(PDAnnotDidChange, (PDAnnot annot, ASAtom key, ASInt32 error), (PDAnnot annot, ASAtom key, ASInt32 error, void* clientData), (annot, key, error, cell->clientData))
+
+
+/**
+ A thread was changed.
+ @param thread The thread that changed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidAddThread
+ @see PDThreadSetInfo
+*/
+POKE(PDThreadDidChange, (PDThread thread), (PDThread thread, void* clientData), (thread, cell->clientData))
+
+
+/**
+ A bookmark was created.
+ @param bookmark The bookmark that was created.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkDidDestroy
+ @notify PDBookmarkWillDestroy
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddNewSibling
+*/
+POKE(PDBookmarkWasCreated, (PDBookmark bookmark), (PDBookmark bookmark, void *clientData), (bookmark, cell->clientData))
+
+/**
+ One or more bookmarks have been moved.
+ @param bookmark The bookmark that was moved.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @see PDBookmarkAddNext
+ @see PDBookmarkAddPrev
+ @see PDBookmarkAddNewChild
+ @see PDBookmarkAddNewSibling
+ @see PDBookmarkAddChild
+ @see PDBookmarkAddSubtree
+*/
+POKE(PDBookmarkDidChangePosition, (PDBookmark bookmark), (PDBookmark bookmark, void* clientData), (bookmark, cell->clientData))
+
+/**
+ A bookmark will be opened or closed, its action will be changed,
+ its title will be changed, or children will be added to
+ it.
+ @param bookmark The bookmark that will be changed.
+ @param key The <code>ASAtom</code> specifying the change that will
+ occur. <code>key</code> will be an <code>ASAtom</code> corresponding to one of the
+ following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH><code>key</code></TH><TH>Description</TH></TR>
+ <TR><TD><code>Count</code></TD><TD>Children will be added, or the bookmark will be opened or closed.</TD></TR>
+ <TR><TD><code>A</code></TD><TD>The action will be changed.</TD></TR>
+ <TR><TD><code>Title</code></TD><TD>The title will be changed.</TD></TR>
+ <TR><TD><code>C</code></TD><TD>The color will be changed (PDF 1.4).</TD></TR>
+ <TR><TD><code>F</code></TD><TD>The flags will be changed (PDF 1.4).</TD></TR>
+ </TABLE>
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkDidChange
+ @notify PDBookmarkDidChangePosition
+ @see PDBookmarkSetOpen
+ @see PDBookmarkSetAction
+ @see PDBookmarkSetTitle
+ @see PDBookmarkAddSubtree
+*/
+POKE(PDBookmarkWillChange, (PDBookmark bookmark, ASAtom key), (PDBookmark bookmark, ASAtom key, void* clientData), (bookmark, key, cell->clientData))
+
+/**
+ A bookmark has been opened/closed, its action has been changed,
+ its title has been changed, or children have been added
+ to it.
+ @param bookmark The bookmark that will be changed.
+ @param key The <code>ASAtom</code> specifying the change that will
+ occur. See <code>PDBookmarkWillChange()</code> for a list of the <code>ASAtom</code> objects
+ and their meaning.
+ @param err The error code. <code>err</code> is set to <code>0</code> if no errors
+ occurred while changing the bookmark. If an error occurred,
+ <code>err</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChangePosition
+ @see PDBookmarkSetOpen
+ @see PDBookmarkSetAction
+ @see PDBookmarkSetTitle
+ @see PDBookmarkAddSubtree
+*/
+POKE(PDBookmarkDidChange, (PDBookmark bookmark, ASAtom key, ASInt32 err), (PDBookmark bookmark, ASAtom key, ASInt32 err, void* clientData), (bookmark, key, err, cell->clientData))
+
+/**
+ A bookmark will be destroyed.
+ @param bookmark The bookmark that will be destroyed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkDidDestroy
+ @see PDBookmarkDestroy
+*/
+POKE(PDBookmarkWillDestroy, (PDBookmark bookmark), (PDBookmark bookmark, void* clientData), (bookmark, cell->clientData))
+
+/**
+ A bookmark was destroyed.
+ @param bookmark The bookmark that was destroyed. Because
+ the bookmark has been destroyed, it is not possible to access
+ it.
+ @param err The error code. <code>err</code> is set to <code>0</code> if no errors
+ occurred while destroying the bookmark. If an error occurred,
+ <code>err</code> contains the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkWillDestroy PDBookmarkDestroy
+*/
+POKE(PDBookmarkDidDestroy, (PDBookmark bookmark, ASInt32 err), (PDBookmark bookmark, ASInt32 err, void* clientData), (bookmark, err, cell->clientData))
+
+/* added 9/30/94 */
+
+
+/**
+ A thread will be removed from a document.
+ @param doc The document from which a thread will be removed.
+
+ @param index The index of the thread that will be removed.
+ Use PDDocGetThread() to obtain the thread from its index.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidRemoveThread
+ @see PDDocRemoveThread
+*/
+POKE(PDDocWillRemoveThread, (PDDoc doc, ASInt32 index), (PDDoc doc, ASInt32 index, void* clientData), (doc, index, cell->clientData))
+
+/* Acrobat 2.1 additions */
+
+/**
+ The contents of a page changed. Unlike <code>PDPageContentsDidChange()</code>,
+ this notification specifies whether the page is redrawn
+ immediately.
+ @param page The page whose contents changed.
+ @param invalidateViews If <code>true</code>, the page is redrawn immediately.
+ If <code>false</code>, redrawing is suppressed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageContentsDidChange
+ @see PDPageNotifyContentsDidChange
+ @see PDPageNotifyContentsDidChangeEx
+*/
+POKE(PDPageContentsDidChangeEx, (PDPage page, ASBool invalidateViews),(PDPage page, ASBool invalidateViews, void *clientData), (page, invalidateViews, cell->clientData))
+
+/* Acrobat 3.0 additions */
+
+/**
+ An <code>AVDoc</code> will be opened from a PDF file.
+ @param pdDoc The PDDoc for the file that will be opened.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidOpen
+ @see AVDocOpenFromPDDoc
+ @see AVDocOpenFromPDDocWithParams
+*/
+POKE(AVDocWillOpenFromPDDoc, (PDDoc pdDoc), (PDDoc pdDoc, void* clientData), (pdDoc, cell->clientData))
+
+/**
+ The document's selection has been added to or had something
+ removed.
+ @param doc The document containing the selection.
+ @param selType The <code>ASAtom</code> corresponding to the current
+ selection type. See <code>AVDocSetSelection()</code> for a list of selection
+ types.
+ @param selData A pointer to the current selection data after
+ the selection has been added. The format and contents of
+ selData depend on <code>selType</code>.
+ @param addData A pointer to the added selection data. The
+ format and contents of <code>addData</code> depend on <code>selType</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidClearSelection
+ @notify AVDocDidSetSelection
+ @notify AVDocDidRemoveFromSelection
+ @notify AVDocWillClearSelection
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocSetSelection
+*/
+POKE(AVDocDidAddToSelection, (AVDoc doc, ASAtom selType, void* selData, void* addData), (AVDoc doc, ASAtom selType, void* selData, void* addData, void *clientData), (doc, selType, selData, addData, cell->clientData))
+
+/**
+ The document's selection has had something removed.
+ @param doc The document whose selection was removed.
+ @param selType The <code>ASAtom</code> corresponding to the current
+ selection type. See <code>AVDocSetSelection()</code> for a list of selection
+ types.
+ @param selData A pointer to the current selection data after
+ the selection has been deleted. The format and contents
+ of <code>selData</code> depend on <code>selType</code>..
+ @param remData The item removed from the selection. The
+ format and contents of <code>remData</code> depend on <code>selType</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidSetSelection
+ @notify AVDocDidAddToSelection
+ @notify AVDocDidClearSelection
+ @notify AVDocWillClearSelection
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocSetSelection
+*/
+POKE(AVDocDidRemoveFromSelection, (AVDoc doc, ASAtom selType, void* selData, void* remData), (AVDoc doc, ASAtom selType, void* selData, void* remData, void *clientData), (doc, selType, selData, remData, cell->clientData))
+
+
+/**
+ An <code>AVDoc</code> object's file stream has been terminated by The <code>AVDoc</code>SetDead()
+ method.
+ @param doc The <code>AVDoc</code> whose file stream has been terminated.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidClose AVDocSetDead
+*/
+POKE(AVDocWantsToDie, (AVDoc doc), (AVDoc doc, void* clientData), (doc, cell->clientData))
+
+/**
+ This notification is broadcast before a document is printed,
+ and before any marks are made on the first page. When printing
+ to a PostScript printer, printing commands can also be sent
+ that are placed on the page before any other marks. For
+ example, a <code>setpagedevice</code> operator could be placed in the
+ print stream.
+ @param doc The document that is about to be printed.
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, and <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> (using <code>ASStmWrite()</code>)
+ to add marks to pages before any other marks have been made.
+ In the 2.x Acrobat viewers, the page printing sequence to
+ a PostScript printer is:
+ <p><code>page setup (including setpagedevice) ... save ...
+ gsave ... save ... begin ... begin ... begin ... PDDocWillPrintPage() ... page
+ contents ... PDDocDidPrintPage() ... end ... end ... end ... restore ... restore ...
+ showpage.</code></p>
+
+ <p>This sequence must not be relied upon, and it is
+ to some extent dependent on the printer driver in use. Nevertheless,
+ it is <code>true</code> that by the time the PDDocWillPrintPage() notification
+ is broadcast, it is too late to perform any <code>setpagedevice</code>
+ operations. </p>
+
+ @param psLevel When printing to a PostScript printer,
+ <code>psLevel</code> is either <code>1</code> or <code>2</code>, representing the PostScript level
+ available on the printer. When printing to a non-PostScript
+ printer, <code>psLevel</code> is <code>0</code>. <code>psLevel</code> is useful in determining
+ whether the output device is a PostScript printer. In addition,
+ when printing to a PostScript printer, <code>psLevel</code> is useful
+ to determine the operators that can be sent in any printing
+ code downloaded using the <code>PDDocWillPrintDoc()</code>, <code>PDDocWillPrintPage()</code>,
+ and <code>PDDocDidPrintPage()</code> notifications.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidPrintPage
+ @notify PDDocWillPrintPages
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+
+ @note Page resources and contents cannot be modified reliably
+ at the time this notification is broadcast.
+*/
+POKE(PDDocWillPrintDoc, (PDDoc doc, ASStm stm, ASInt32 psLevel), (PDDoc doc, ASStm stm, ASInt32 psLevel, void *clientData), (doc, stm, psLevel, cell->clientData))
+
+
+/**
+ <p>A document will be saved. </p>
+
+ <p>The <code>PDDocWillSaveEx()</code> notification takes place just before
+ the save operation begins. At the time of a <code>PDDoc</code> <code>WillSaveEx()</code>
+ notification, the current <code>PDDoc</code> is valid. </p>
+
+ <p>At this time, clients should inspect the save flags field
+ <code>saveFlags</code> in <code>params</code>. In the case of a full save, they should
+ release any objects that they have acquired from the <code>PDDoc</code>
+ with methods, such as <code>PDPageRelease()</code>. During this notification,
+ plug-in's should also forget any PD-level or Cos-level objects
+ that had been derived from the <code>PDDoc</code>; these will not be
+ valid after the save. </p>
+
+ <p>See <code>PDDocDidSave()</code> for information on reacquiring objects
+ from the <code>PDDoc</code> after it has been saved. </p>
+
+ @param doc The document that will be saved.
+ @param params The <code>PDDocSaveParams()</code> parameters used when
+ saving a file using <code>PDDocSaveWithParams()</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidSave
+ @notify PDDocWillSave
+ @see PDDocSave
+ @see PDDocSaveWithParams
+*/
+POKE(PDDocWillSaveEx, (PDDoc doc, PDDocSaveParams params), (PDDoc doc, PDDocSaveParams params, void* clientData), (doc, params, cell->clientData))
+
+/* Acrobat 3.1 additions */
+
+/**
+ This notification is broadcast before a document is printed,
+ before any marks are made on the first page.
+ @param doc IN/OUT The document that is about to be printed.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify AVDocDidPrint
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+
+*/
+POKE(AVDocWillPrint, (AVDoc doc), (AVDoc doc, void* clientData), (doc, cell->clientData))
+
+/**
+ This notification is broadcast after printing ends.
+ @param doc IN/OUT The document that was printed.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify AVDocWillPrint
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+
+*/
+POKE(AVDocDidPrint, (AVDoc doc), (AVDoc doc, void* clientData), (doc, cell->clientData))
+
+/* Acrobat 4.0 additions */
+
+/**
+ A <code>PDDoc</code> will be closed. A <code>PDDoc</code> is closed only if its reference
+ count is zero.
+
+ <p>Neither this notification, <code>PDDocDidClose()</code>, <code>AVDocWillClose()</code>,
+ nor <code>AVDocDidClose()</code> are broadcast if the user selects <i>Cancel</i>
+ when prompted to save a modified document as it is closed. </p>
+
+ @param doc The document to close.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed in by the calling application when
+ this notification was registered for using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidClose
+ @see AVDocClose
+ @see PDDocClose
+*/
+POKE(PDDocWillClose, (PDDoc doc),(PDDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ A range of pages' labels changed in a <code>PDDoc</code>.
+ @param doc IN/OUT The document containing the pages whose labels
+ changed.
+ @param firstPage IN/OUT The number of the first page whose label
+ changed.
+ @param lastPage IN/OUT The number of the last page whose label
+ changed.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @see PDDocSetPageLabel
+
+*/
+POKE(PDDocPageLabelDidChange, (PDDoc doc, ASInt32 firstPage, ASInt32 lastPage),(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, void *clientData),(doc, firstPage, lastPage, cell->clientData))
+
+
+/**
+ The annotations of a document will be exported.
+ @param doc IN/OUT The document whose annotations will be exported.
+
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PDDocDidExportAnnots
+ @notify PDDocDidImportAnnots
+ @notify PDDocWillImportAnnots
+ @see PDDocExportNotes
+
+*/
+POKE(PDDocWillExportAnnots, (PDDoc doc), (PDDoc doc, void* clientData), (doc, cell->clientData))
+
+/**
+ The annotations from one document will be imported into
+ another document.
+ @param doc IN/OUT The document into which annotations will be
+ imported.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PDDocDidExportAnnots
+ @notify PDDocDidImportAnnots
+ @notify PDDocWillImportAnnots
+ @see PDDocImportCosDocNotes
+ @see PDDocImportNotes
+
+*/
+POKE(PDDocWillImportAnnots, (PDDoc doc), (PDDoc doc, void* clientData), (doc, cell->clientData))
+
+/**
+ The annotations of a document were exported.
+ @param doc IN/OUT The document whose annotations were exported.
+
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PDDocDidImportAnnots
+ @notify PDDocWillExportAnnots
+ @notify PDDocWillImportAnnots
+ @see PDDocExportNotes
+
+*/
+POKE(PDDocDidExportAnnots, (PDDoc doc), (PDDoc doc, void* clientData), (doc, cell->clientData))
+
+/* PS print additions */
+
+/**
+ <p>This notification is broadcast after the beginning of the
+ PostScript Prolog (immediately after writing <code>%% BeginPrologue</code>)
+ during the printing of a document to a PostScript printer
+ with the methods <code>PDFLPrintDoc()</code> (only available with PDF Library
+ SDK) or <code>PDDocPrintPages()</code> (only available with PDF Library
+ SDK). The Prolog is a set of application-specific procedure
+ definitions that an application may emit in a PostScript
+ stream.</p>
+
+ <p>At this point nothing should be added to the PostScript
+ print stream that modifies the graphics state or puts marks
+ on the page. Callers should only emit procset resources.</p>
+
+ @param doc IN/OUT The document that is being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintAfterBeginSetup
+ @see PDDocPrintPages (Only available with PDF Library SDK)
+ @see PDFLPrintDoc (Only available with PDF Library SDK)
+
+*/
+POKE(PSPrintAfterBeginProlog, (PDDoc doc, ASStm stm), (PDDoc doc, ASStm stm, void *clientData), (doc, stm, cell->clientData))
+
+/**
+ This notification is broadcast after the beginning of the
+ Document Setup (immediately after writing <code>%% BeginSetup</code>)
+ during the printing of a page to a PostScript printer with
+ the methods <code>PDFLPrintDoc()</code> (only available with PDF Library
+ SDK) or <code>PDDocPrintPages()</code> (only available with PDF Library
+ SDK). During Document Setup, fonts may be downloaded, <code>setpagedevice</code>
+ may be called, procsets may be initialized, the graphics
+ state may be initialized, and so forth.
+ @param doc IN/OUT The document that is being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintBeforeEndSetup
+ @see PDDocPrintPages (Only available with PDF Library SDK)
+ @see PDFLPrintDoc (Only available with PDF Library SDK)
+
+*/
+POKE(PSPrintAfterBeginSetup, (PDDoc doc, ASStm stm), (PDDoc doc, ASStm stm, void *clientData), (doc, stm, cell->clientData))
+
+/**
+ This notification is broadcast before the end of Document
+ Setup (immediately before writing <code>%% EndSetup</code>) during the
+ printing of a page to a PostScript printer with the methods
+ <code>PDFLPrintDoc()</code> (only available with PDF Library SDK) or <code>PDDocPrintPages()</code>
+ (only available with PDF Library SDK). At this point all
+ of the job level resources and procsets have been added
+ to the print stream.
+ @param doc IN/OUT The document that is being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>. Some
+ printer drivers (Windows PS4) may not allow additions to
+ the PostScript stream at this point.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintAfterBeginSetup
+ @see PDDocPrintPages (Only available with PDF Library SDK)
+ @see PDFLPrintDoc (Only available with PDF Library SDK)
+
+*/
+POKE(PSPrintBeforeEndSetup, (PDDoc doc, ASStm stm), (PDDoc doc, ASStm stm, void *clientData), (doc, stm, cell->clientData))
+
+/**
+ This notification is broadcast after the beginning of the
+ Page Setup (immediately after writing <code>%% BeginPageSetup</code>)
+ during the printing of a page to a PostScript printer with
+ the methods <code>PDFLPrintDoc()</code> (only available with PDF Library
+ SDK) or <code>PDDocPrintPages()</code> (only available with PDF Library
+ SDK). At this point it is possible to use setpagedevice
+ and set the graphics state but marks cannot be made on the
+ page.
+ @param doc IN/OUT The document from which a page is printed.
+ @param page IN/OUT The page number of the page being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>. Some
+ printer drivers (Windows PS4) may not allow additions to
+ the PostScript stream at this point.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintAfterPageTrailer
+ @see PDDocPrintPages (Only available with PDF Library SDK)
+ @see PDFLPrintDoc (Only available with PDF Library SDK)
+
+*/
+POKE(PSPrintAfterBeginPageSetup, (PDDoc doc, ASInt32 page, ASStm stm), (PDDoc doc, ASInt32 page, ASStm stm, void *clientData), (doc, page, stm, cell->clientData))
+
+/**
+ This notification is broadcast after the page trailer is
+ emitted (immediately after writing <code>%% PageTrailer</code>) during
+ the printing of a page to a PostScript printer with the
+ methods <code>PDFLPrintDoc()</code> (only available with PDF Library SDK)
+ or <code>PDDocPrintPages()</code> (only available with PDF Library SDK).
+ At this point it is possible to resolve comments (at end)
+ and emit cleanup code.
+ @param doc IN/OUT The document from which a page is printed.
+ @param page IN/OUT The page number of the page being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintAfterBeginPageSetup
+ @see PDDocPrintPages (Only available with PDF Library SDK)
+ @see PDFLPrintDoc (Only available with PDF Library SDK)
+
+*/
+POKE(PSPrintAfterPageTrailer, (PDDoc doc, ASInt32 page, ASStm stm), (PDDoc doc, ASInt32 page, ASStm stm, void *clientData), (doc, page, stm, cell->clientData))
+
+/**
+ This notification is broadcast after the DSC trailer is
+ emitted (immediately after writing <code>%% Trailer</code>) during the
+ printing of a page to a PostScript printer with the methods
+ <code>PDFLPrintDoc()</code> (only available with PDF Library SDK) or <code>PDDocPrintPages()</code>
+ (only available with PDF Library SDK). At this point it
+ is possible to resolve comments (at end) and emit cleanup
+ code.
+ @param doc IN/OUT The document that is being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintBeforeEndSetup
+ @see PDDocPrintPages (Only available with PDF Library SDK)
+ @see PDFLPrintDoc (Only available with PDF Library SDK)
+
+*/
+POKE(PSPrintAfterTrailer, (PDDoc doc, ASStm stm), (PDDoc doc, ASStm stm, void *clientData), (doc, stm, cell->clientData))
+
+/**
+ This notification is broadcast after the DSC page-level
+ comments that apply to all pages have been emitted (immediately
+ before writing <code>%% EndComments</code>) during the printing of a
+ page to a PostScript printer with the methods <code>PDFLPrintDoc()</code>
+ (only available with the PDF Library SDK) or <code>PDDocPrintPages()</code>
+ (only available with the PDF Library SDK).
+ @param doc IN/OUT The document that is being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintAfterBeginSetup
+ @notify PSPrintBeforeEndSetup
+ @see PDDocPrintPages (Only available with PDF Library SDK)
+ @see PDFLPrintDoc (Only available with PDF Library SDK)
+
+*/
+POKE(PSPrintBeforeEndComments, (PDDoc doc, ASStm stm), (PDDoc doc, ASStm stm, void *clientData), (doc, stm, cell->clientData))
+
+/**
+ This notification is broadcast after extended graphics state
+ parameters are emitted while printing to a PostScript printer
+ with the methods <code>PDFLPrintDoc()</code> (only available with the PDF Library
+ SDK) or <code>PDDocPrintPages()</code> (only available with the PDF Library
+ SDK).
+
+ <p>These parameters are typically device-dependent. For information
+ on extended graphics state, see Section 4.3.4 on extended
+ graphics states in the <i>PDF Reference</i>.</p>
+
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @see PDDocPrintPages (Only available with the PDF Library SDK)
+ @see PDFLPrintDoc (Only available with the PDF Library SDK)
+
+*/
+POKE(PSPrintAfterEmitExtGState, (ASStm stm), (ASStm stm, void *clientData), (stm, cell->clientData))
+
+/* New named destination addition */
+
+/**
+ Acrobat executed an action to go to a named destination.
+
+ @param doc The document containing the named destination.
+
+ @param NameObj The Cos object corresponding to the named
+ destination.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE(AVDocDidClickName, (AVDoc doc, CosObj NameObj), ( AVDoc doc, CosObj NameObj, void* clientData ), (doc, NameObj, cell->clientData ) )
+
+
+/**
+ The annotations from one document were imported into another
+ document.
+ @param doc IN/OUT The document into which annotations were imported.
+
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PDDocDidImportAnnots
+ @notify PDDocWillExportAnnots
+ @notify PDDocWillImportAnnots
+ @see PDDocImportCosDocNotes
+ @see PDDocImportNotes
+
+*/
+POKE(PDDocDidImportAnnots, (PDDoc doc), (PDDoc doc, void* clientData), (doc, cell->clientData))
+
+/**
+ All <code>AVDoc</code> objects will be closed.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify AVDocDidClose
+ @notify AVDocWillClose
+
+*/
+POKE(AVAppWillCloseAllInternalDocs, (void), (void *clientData), (cell->clientData))
+
+/* New PDNameTree additions */
+
+/**
+ An entry was added to a name tree.
+ @param NameTree The name tree to which an entry was added.
+
+ @param Key The Cos object of the key for the entry. This object
+ is a Cos integer.
+ @param Value The Cos object for the value associated with
+ key.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed in by the calling application when
+ this notification was registered for using <code>AVAppRegisterNotification()</code>.
+ @notify PDNameTreeNameRemoved
+ @see PDNameTreeNotifyNameAdded
+*/
+POKE(PDNameTreeNameAdded, (PDNameTree NameTree, CosObj Key, CosObj Value), ( PDNameTree NameTree, CosObj Key, CosObj Value, void* clientData ), (NameTree, Key, Value, cell->clientData ) )
+
+/**
+ An entry was removed from a name tree.
+ @param NameTree The name tree from which an entry was
+ removed.
+ @param Key The Cos object of the key for the entry. This
+ object is a Cos integer.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed in by the calling application when
+ this notification was registered for using <code>AVAppRegisterNotification()</code>.
+ @notify PDNameTreeNameAdded
+ @see PDNameTreeNotifyNameRemoved
+*/
+POKE(PDNameTreeNameRemoved, (PDNameTree NameTree, CosObj Key), ( PDNameTree NameTree, CosObj Key, void* clientData ), (NameTree, Key, cell->clientData ) )
+
+
+/**
+ <p>A <code>PDDoc</code> closed. A <code>PDDoc</code> is closed only if its reference
+ count is zero. </p>
+
+ <p>Neither this notification, <code>PDDocWillClose()</code>, <code>AVDocWillClose()</code>,
+ nor <code>AVDocDidClose()</code> are broadcast if the user selects <i>Cancel</i>
+ when prompted to save a modified document as it is closed. </p>
+
+ @param doc The document that closed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed in by the calling application when
+ this notification was registered for using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocWillClose
+ @see AVDocClose
+ @see PDDocClose
+*/
+POKE(PDDocDidClose, (PDDoc doc),(PDDoc doc, void *clientData), (doc, cell->clientData))
+
+/* New InsertPages notifications */
+
+/**
+ Pages were inserted into a document. This notification occurs
+ after the <code>PDDocDidInsertPages()</code> notification.
+ @param params IN/OUT A structure describing how pages were inserted.
+
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PDDocDidInsertPages
+ @notify PDDocWillInsertPages
+ @notify PDDocWillInsertPagesEx
+ @see PDDocCreatePage
+ @see PDDocInsertPages
+
+*/
+POKE(PDDocDidInsertPagesEx, (PDDocInsertPagesParams params), (PDDocInsertPagesParams params, void* clientData), (params, cell->clientData))
+
+/**
+ Pages will be inserted into a document. This notification
+ occurs after the <code>PDDocWillInsertPages()</code> notification.
+ @param params IN/OUT A structure describing how pages will be
+ inserted.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PDDocDidInsertPages
+ @notify PDDocDidInsertPagesEx
+ @notify PDDocWillInsertPages
+ @see PDDocCreatePage
+ @see PDDocInsertPages
+
+*/
+POKE(PDDocWillInsertPagesEx, (PDDocInsertPagesParams params), (PDDocInsertPagesParams params, void* clientData), (params, cell->clientData))
+
+/* New PDNumTree additions */
+
+/**
+ An entry was added to a name tree.
+ @param numTree IN/OUT The name tree to which an entry was added.
+ @param key IN/OUT The key for the entry.
+ @param value IN/OUT The Cos object for the value associated with key.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+ @notify PDNumTreeNumRemoved
+ @see PDNumTreePut
+*/
+POKE(PDNumTreeNumAdded, (PDNumTree numTree, ASInt32 key, CosObj value), ( PDNumTree numTree, ASInt32 key, CosObj value, void* clientData ), (numTree, key, value, cell->clientData ) )
+
+/**
+ An entry was removed from a name tree.
+ @param numTree IN/OUT The name tree from which an entry was removed.
+ @param key IN/OUT The key for the entry.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+ @notify PDNumTreeNumAdded
+ @see PDNumTreePut
+ @see PDNumTreeRemove
+*/
+POKE(PDNumTreeNumRemoved, (PDNumTree numTree, ASInt32 key), ( PDNumTree numTree, ASInt32 key, void* clientData ), (numTree, key, cell->clientData ) )
+
+/* New bookmark notification */
+
+/**
+ A bookmark was unlinked from the bookmark tree.
+ @param bookmark The bookmark that was unlinked. Because
+ the bookmark has not been destroyed, it is possible to access
+ it.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkDidChangePosition PDBookmarkUnlink
+*/
+POKE(PDBookmarkDidUnlink, (PDBookmark bookmark), (PDBookmark bookmark, void* clientData), (bookmark, cell->clientData))
+
+/* 5.0 */
+
+
+/**
+ Called when a user deletes the current selection.
+ @param doc The document containing the selection.
+ @param selType The selection's type. See <code>AVDocSetSelection()</code>
+ for a list of those available.
+ @param selData Server-dependent selection data.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocDidAddToSelection
+ @notify AVDocDidSetSelection
+ @see AVDocDeleteSelection
+*/
+POKE(AVDocDidDeleteSelection, (AVDoc doc, ASAtom selType, void* selData), (AVDoc doc, ASAtom selType, void* selData, void *clientData), (doc, selType, selData, cell->clientData))
+
+/**
+ <p>This notification is obsolete in Acrobat 7.0 and later.</p>
+
+ <p>This notification is broadcast before a tiled page is printed.
+ Tiled pages can be requested by the user from the Advanced
+ print dialog box; clients are made aware of the selection via
+ the tiled page notifications. </p>
+ @param doc The document containing the tiled page.
+ @param page The page to be printed.
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, and <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> (using <code>ASStmWrite()</code>)
+ to add marks to pages before any other marks have been made.
+
+ @param whichTile The sheet to be printed.
+ @param numTiles The total number of sheets to be printed.
+
+ @param cropRegion A pointer to an <code>ASFixedRect</code> that represents
+ the region of the <code>PDPage</code> being <i>cropped to</i> for this sheet.
+
+ @param tile The <code>PDTile</code> currently in use. The fields in
+ this structure can be modified as necessary to affect tiling
+ output.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidPrintTiledPage
+ @notify PDDocPrintingTiledPage
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+*/
+POKE(PDDocWillPrintTiledPage, (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichTile, ASInt32 numTiles, ASFixedRect *cropRegion, PDTile tile), (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichTile, ASInt32 numTiles, ASFixedRect *cropRegion, PDTile tile, void *clientData), (doc, page, stm, whichTile, numTiles, cropRegion, tile, cell->clientData))
+
+/**
+ <p>This notification is obsolete in Acrobat 7.0 and later.</p>
+
+ <p>Clients who register for <code>PDDocPrintingTilePage()</code> will be called
+ just after the page contents have been emitted for this
+ tile. Tiled pages can be requested by the user from the
+ Advanced print dialog box; clients are made aware of the selection
+ via the tiled page notifications. </p>
+ @param doc The document containing the tiled page.
+ @param page The page being printed.
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, and <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> (using <code>ASStmWrite()</code>)
+ to add marks to pages before any other marks have been made.
+
+ @param whichRow The row that is being printed.
+ @param whichColumn The column that is being printed.
+ @param numRows The number of rows to be printed.
+ @param numColumns The number of columns to be printed.
+
+ @param cropRegion A pointer to an <code>ASFixedRect</code> that represents
+ the region of the <code>PDPage</code> being <i>cropped to</i> for this sheet.
+
+ @param tile The <code>PDTile</code> currently in use. The fields in
+ this structure can be modified as necessary to affect tiling
+ output.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidPrintTiledPage
+ @notify PDDocWillPrintTiledPage
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+*/
+POKE(PDDocPrintingTiledPage, (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichRow, ASInt32 whichColumn, ASInt32 numRows, ASInt32 numColumns, ASFixedRect *cropRegion, PDTile tile), (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichRow, ASInt32 whichColumn, ASInt32 numRows, ASInt32 numColumns, ASFixedRect *cropRegion, PDTile tile, void *clientData), (doc, page, stm, whichRow, whichColumn, numRows, numColumns, cropRegion, tile, cell->clientData))
+
+/**
+ <p>This notification is obsolete in Acrobat 7.0 and later.</p>
+
+ <p>Clients who register for <code>PDDocDidPrintTiledPage()</code> will be
+ called after the tile marks (if any) have been emitted for
+ this tiled page. Tiled pages can be requested by the user
+ from the Advanced print dialog box; clients are made aware of
+ the selection via the tiled page notifications. </p>
+ @param doc The document containing the tiled page.
+ @param page The page being printed.
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, and <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> (using <code>ASStmWrite()</code>)
+ to add marks to pages before any other marks have been made.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors
+ occurred while printing the pages. If an error occurred,
+ <code>error</code> contains the error code.
+ @param whichTile The sheet to be printed.
+ @param numTiles The number of sheets to be printed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocPrintingTiledPage
+ @notify PDDocWillPrintTiledPage
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+*/
+POKE(PDDocDidPrintTiledPage, (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error, ASInt32 whichTile, ASInt32 numTiles), (PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error, ASInt32 whichTile, ASInt32 numTiles, void *clientData), (doc, page, stm, error, whichTile, numTiles, cell->clientData))
+
+/**
+ Clients who register for <code>PDPageWillPrintAnnots()</code> will be called
+ before the printed representations of any annotations have
+ been emitted. If a page has no annotations, this will not
+ be called. If a page has annotations, this will be called.
+ There may not be any code emitted for the annotations on
+ that page, however, since they may not have any appearance
+ for printing. The status parameter passed in the <code>PDPageDidPrintAnnot()</code>
+ will indicate this.
+ @param doc The document containing the annotations.
+ @param page The page to be printed.
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, and <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> (using <code>ASStmWrite()</code>)
+ to add marks to pages before any other marks have been made.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageDidPrintAnnot
+ @notify PDPageDidPrintAnnots
+ @notify PDPageWillPrintAnnot
+ @see Numerous
+*/
+POKE(PDPageWillPrintAnnots, (PDDoc doc, ASInt32 page, ASStm stm), (PDDoc doc, ASInt32 page, ASStm stm, void *clientData), (doc, page, stm, cell->clientData))
+
+/**
+ Annotations were printed.
+ @param doc The document containing the annotations.
+ @param page The page containing the annotations.
+ @param stm The PostScript print stream used when printing to
+ a PostScript printer, and <code>NULL</code> when printing to a non-PostScript
+ printer. When printing to a PostScript printer, clients
+ can write printing commands into <code>stm</code> (using <code>ASStmWrite()</code>)
+ to add marks to pages before any other marks have been made.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageDidPrintAnnot
+ @notify PDPageWillPrintAnnot
+ @notify PDPageWillPrintAnnots
+ @see Numerous
+*/
+POKE(PDPageDidPrintAnnots, (PDDoc doc, ASInt32 page, ASStm stm), (PDDoc doc, ASInt32 page, ASStm stm, void *clientData), (doc, page, stm, cell->clientData))
+
+
+/**
+ A document was opened.
+ @param doc The document.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocPermsReady
+*/
+POKE(PDDocDidOpen, (PDDoc doc), (PDDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ The client is requested to calculate and set metadata items
+ that depend on the state of the document. It is issued when a
+ document is saved. It can also be issued explicitly via <code>PDDocCalculateImplicitMetadata()</code>.
+
+ @param doc The document for which implicit metadata
+ is to be calculated.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see Numerous, but especially PDDocCalculateImplicitMetadata
+
+*/
+POKE(PDDocCalculateMetadata, (PDDoc doc), (PDDoc doc, void *clientData), (doc, cell->clientData))
+
+
+/**
+ A new-style preference changed.
+ @param section The section.
+ @param key The key.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVAppOldPrefDidChange
+
+ @note As of Acrobat 5.0, most of the methods used to set
+ and get the new style preferences have not been exported
+ to the public API.
+*/
+POKE(AVAppPrefDidChange,
+ (const char *section, const char *key),
+ (const char *section, const char *key, void *clientData),
+ (section, key, cell->clientData))
+
+
+/**
+ An old-style <code>AVPrefsType</code> was changed.
+ @param preference The preference type that was changed. You
+ can call <code>AVAppGetPreference()</code> to find out the new value.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVAppPrefDidChange
+ @see AVAppSetPreference
+*/
+POKE (AVAppOldPrefDidChange,
+ (AVPrefsType preference),
+ (AVPrefsType preference, void *clientData),
+ (preference, cell->clientData))
+
+
+/**
+ Page areas changed.
+ @param pdDoc The document in which the page areas changed.
+
+ @param areaMask The area mask.
+ @param firstPage The first page.
+ @param lastPage The last page.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidChangePages
+ @see Numerous
+*/
+POKE (PDDocDidChangePageAreas,
+ (PDDoc pdDoc, ASInt32 areaMask, ASInt32 firstPage, ASInt32 lastPage),
+ (PDDoc pdDoc, ASInt32 areaMask, ASInt32 firstPage, ASInt32 lastPage, void *clientData),
+ (pdDoc, areaMask, firstPage, lastPage, cell->clientData))
+
+/**
+ Clients that register for this notification will be called
+ back during PostScript printing, just prior to emission
+ of the Acrobat procsets.
+ @param doc IN/OUT The document that is being printed.
+ @param stm IN/OUT The PostScript print stream. PostScript commands
+ can be added to the print stream using <code>ASStmWrite()</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @notify PSPrintBeforeEndSetup
+ @see PDDocPrintPages() (Only available with PDF Library SDK)
+ @see PDFLPrintDoc() (only available with PDF Library SDK)
+
+*/
+POKE (PSPrintBeforeAcrobatProcsets,
+ (PDDoc doc, ASStm stm),
+ (PDDoc doc, ASStm stm, void *clientData),
+ (doc, stm, cell->clientData))
+
+/**
+ Redrawing will occur in the page view section of the window.
+
+ @param pageView The <code>AVPageView</code> in which drawing will occur.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVPageViewDidChange
+ @notify AVPageViewDidDraw
+ @see AVPageViewDrawNow
+*/
+POKE(AVPageViewWillDraw,
+ (AVPageView pageView),
+ (AVPageView pageView, void *clientData),
+ (pageView, cell->clientData))
+
+
+/**
+ Goes out when an annotation has performed a focus operation (for
+ example, <code>kAVAnnotAcceptFocus</code> or <code>kAVAnnotLostFocus</code>). No notification
+ is issued for <code>kAVAnnotDefaultAction</code> or <code>kAVAnnotShowMenu</code>.
+
+ @param pageView The page view containing the annotation.
+
+ @param pdAnnot The annotation that performed the operation.
+
+ @param annotOp The operation.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see AVPageViewFocusAnnotPerformOp
+*/
+POKE(AVPageViewAnnotDidPerformOp,
+ (AVPageView pageView, PDAnnot pdAnnot, AVAnnotOp annotOp),
+ (AVPageView pageView, PDAnnot pdAnnot, AVAnnotOp annotOp, void *clientData),
+ (pageView, pdAnnot, annotOp, cell->clientData))
+
+/**
+ Clients who register for this notification will be notified
+ just before an annotation is expected to print. This notification
+ allows clients that manage annotations to prepare the appearance
+ of the annotation for printing purposes. There is no requirement
+ that the <code>annot</code> referred to in this parameter list actually
+ has a print appearance.
+ @param annot The annotation to print.
+ @param page The page on which the annotation occurs.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageDidPrintAnnot
+ @notify PDPageDidPrintAnnots
+ @notify PDPageWillPrintAnnot
+*/
+POKE(PDPageWillPrintAnnot,
+ (PDAnnot annot, ASInt32 page),
+ (PDAnnot annot, ASInt32 page, void *clientData),
+ (annot, page, cell->clientData))
+
+
+/**
+ Clients who register for <code>PDPageDidPrintAnnot()</code> will be called
+ after the annotation has printed. <code>status</code> indicates whether
+ Acrobat tried to print any representation of this annotation.
+
+ @param annot The annotation that Acrobat tried to print.
+
+ @param page The page on which the annotation occurs.
+ @param status A status of <code>0</code> indicates that no representation
+ of the annotation was found. A status of <code>1</code> indicates the annotation
+ was printed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageDidPrintAnnot
+ @notify PDPageWillPrintAnnot
+ @notify PDPageWillPrintAnnots
+ @see Numerous
+*/
+POKE(PDPageDidPrintAnnot,
+ (PDAnnot annot, ASInt32 page, ASInt32 status),
+ (PDAnnot annot, ASInt32 page, ASInt32 status, void *clientData),
+ (annot, page, status, cell->clientData))
+
+
+/**
+ Used to let clients know when <code>pdDoc</code> is undergoing batch
+ processing.
+ @param context IN/OUT Placeholder. Reserved for future releases.
+ It is always <code>NULL</code>.
+ @param pdDoc IN/OUT The document undergoing batch processing.
+ @param docInUse IN/OUT When the document is about to be batch processed,
+ the notification is sent with <code>isUsing</code> set to <code>true</code>. When
+ batch processing has finished with the document, the notification
+ is again sent but with <code>isUsing</code> set to <code>false</code>.
+ @param clientData IN/OUT A pointer to a block of user-supplied data
+ that was passed in by the calling application when this
+ notification was registered for using <code>AVAppRegisterNotification()</code>.
+
+ @note This notification is set for any <code>pdDoc</code> that serves
+ as input to batch processing, including <code>pdDoc</code> objects that are
+ attached to <code>AVDoc</code> objects when batching is invoked on the currently
+ open documents.
+*/
+POKE(AVAppUsingPDDocForBatch,
+ (AVBatchContext context, PDDoc pdDoc, ASBool docInUse),
+ (AVBatchContext context, PDDoc pdDoc, ASBool docInUse, void *clientData),
+ (context, pdDoc, docInUse, cell->clientData))
+ /* 6.0 */
+
+/**
+ Called when the document's page view changes.
+ @param avDoc The <code>AVDoc</code> whose page view has changed.
+ @param newPageView The new <code>AVPageView</code>.
+ @param oldPageView The old <code>AVPageView</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVPageViewDocDidChange
+ @notify AVPageViewWasCreated
+ @notify AVPageViewWillDestroy
+ @see AVDocGetNthPageView
+ @see AVDocGetNumPageViews
+ @see AVDocGetPageView
+*/
+POKE(AVDocActivePageViewDidChange,
+ (AVDoc avDoc, AVPageView newPageView, AVPageView oldPageView),
+ (AVDoc avDoc, AVPageView newPageView, AVPageView oldPageView, void *clientData),
+ (avDoc, newPageView, oldPageView, cell->clientData))
+
+/**
+ Sent when a page view is created.
+ @param pageView The <code>AVPageView</code> that was created.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocActivePageViewDidChange
+ @notify AVPageViewDocDidChange
+ @notify AVPageViewDidChange
+ @notify AVPageViewWillDestroy
+ @see AVDocGetNthPageView
+ @see AVDocGetNumPageViews
+ @see AVDocGetPageView
+ @see AVPageViewGetAVDoc
+*/
+POKE(AVPageViewWasCreated,
+ (AVPageView pageView),
+ (AVPageView pageView, void *clientData),
+ (pageView, cell->clientData))
+
+/**
+ Sent before a page view is destroyed.
+ @param pageView The <code>AVPageView</code> that will be destroyed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocActivePageViewDidChange
+ @notify AVPageViewDocDidChange
+ @notify AVPageViewDidChange
+ @see AVDocGetNthPageView
+ @see AVDocGetNumPageViews
+ @see AVDocGetPageView
+ @see AVPageViewGetAVDoc
+*/
+POKE(AVPageViewWillDestroy,
+ (AVPageView pageView),
+ (AVPageView pageView, void *clientData),
+ (pageView, cell->clientData))
+
+/**
+ The page view has changed. Zero or more of the following
+ events has occurred:
+ <ul>
+ <li> The page number has changed.</li>
+ <li> The zoom factor has changed.</li>
+ <li> The window has been resized.</li>
+ <li> The page has been scrolled.</li>
+ </ul>
+
+ @param pageView The <code>AVPageView</code> that has changed.
+ @param how Specifies how the page view did change. <code>how</code>
+ is an OR of zero or more of the following (see AVExpT.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_SCROLL</code></TD><TD>The view has been scrolled.</TD></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_PAGENUM</code></TD><TD>The page number has changed.</TD></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_PAGESIZE</code></TD><TD>A new view has been created.</TD></TR>
+ <TR><TD><code>PAGEVIEW_UPDATE_ZOOM</code></TD><TD>The zoom has been changed.</TD></TR>
+ </TABLE>
+
+ @param rect A pointer to the scroll rectangle for the <code>pageView</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocActivePageViewDidChange
+ @notify AVPageViewDidDraw
+ @notify AVPageViewWasCreated
+ @notify AVPageViewWillDestroy
+ @see AVPageViewZoomTo
+ @see AVPageViewScrollTo
+ @see AVPageViewScrollToRect
+ @see AVPageViewGoTo
+ @see AVPageViewReadPageDown
+ @see AVPageViewReadPageUp
+ @see AVPageViewGoBack
+ @see AVPageViewGoForward
+ @see AVPageViewUseDestInfo
+ @see AVPageViewUseThisDestination
+
+ @note If continuous scrolling is turned on (available in
+ Acrobat 3.0 or later) and more than one page is displayed
+ in the <code>AVPageView</code>, alternating mouse clicks in the different
+ pages displayed does not constitute a change to the <code>AVPageView</code>.
+*/
+POKE(AVPageViewDidChangeEx,
+ (AVPageView pageView, ASInt16 how, const AVDevRectP rect),
+ (AVPageView pageView, ASInt16 how, const AVDevRectP rect, void *clientData),
+ (pageView, how, rect, cell->clientData))
+
+/* 6.0 */
+/* existing PDBookmarkWill/DidChange notifications don't distinguish between new bookmark and open/close */
+
+/**
+ A bookmark will be opened or closed.
+ @param bookmark The bookmark that will be opened or closed.
+ @param open When <code>true</code>, the bookmark will be opened. When <code>false</code>, it will be closed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @see PDBookmarkSetOpen
+*/
+POKE(PDBookmarkWillChangeOpenState, (PDBookmark bookmark, ASBool open), (PDBookmark bookmark, ASBool open, void* clientData), (bookmark, open, cell->clientData))
+
+/**
+ A bookmark was opened or closed.
+ @param bookmark The bookmark that was opened or closed.
+ @param open When <code>true</code>, the bookmark was opened. When <code>false</code>, it was closed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDBookmarkWillChange
+ @notify PDBookmarkDidChange
+ @see PDBookmarkSetOpen
+*/
+POKE(PDBookmarkDidChangeOpenState, (PDBookmark bookmark, ASBool open), (PDBookmark bookmark, ASBool open, void* clientData), (bookmark, open, cell->clientData))
+
+/**
+ Sent on a system running Windows XP when the user does a
+ Switch User (Fast User Switching) operation to log on or switch
+ to another user account. It is typically used to release shared resources,
+ such as fonts or multimedia ports.
+ @param switchState The switch state.
+ <ul>
+ <li> <code>WTS_CONSOLE_CONNECT</code> when a switched out session is switched back in.</li>
+ <li> <code>WTS_CONSOLE_DISCONNECT</code> when a session is switched out.</li>
+ </ul>
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE(AVAppSystemLogonSessionSwitched, (const char* switchState), (const char* switchState, void *clientData), (switchState, cell->clientData))
+
+/* BEGIN Optional Content notifications */
+
+/**
+ An optional-content context is changing in a way that could affect the
+ visibility state of content.
+ @param ocContext The PDOCContext whose visibility state will change.
+ @param whatWillHappen The type of change that will occur.
+ @param objects A pointer to the object that will change. The kind of object this
+ can be depends on the type of change that will occur:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Type of object</TH></TR>
+ <TR><TD><code>kPDOCGCreate</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCGDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGProperties</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCConfigChange</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigCreate</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGReplace</code></TD><TD><code>PDOCG</code> (the replacement)</TD></TR>
+ <TR><TD><code>kPDDocRemoveOC</code></TD><TD><code>NULL</code></TD></TR>
+ </TABLE>
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE(PDOCContextWillChange,
+ (PDOCContext ocContext, PDOCContextChangeType whatWillHappen, void* objects),
+ (PDOCContext ocContext, PDOCContextChangeType whatWillHappen, void* objects, void *clientData),
+ (ocContext, whatWillHappen, objects, cell->clientData))
+
+/**
+ An optional-content context changed in a way that could affect
+ the visibility state of content.
+ @param ocContext The PDOCContext whose visibility state changed.
+ @param whatHappened The type of change that occurred.
+ @param objects A pointer to the object that changed. The kind of object this
+ can be depends on the type of change that occurred:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Type of object</TH></TR>
+ <TR><TD><code>kPDOCGCreate</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCGDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGProperties</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCConfigChange</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigCreate</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGReplace</code></TD><TD><code>PDOCG</code> (the replacement)</TD></TR>
+ <TR><TD><code>kPDDocRemoveOC</code></TD><TD><code>NULL</code></TD></TR>
+ </TABLE>
+
+ @param error If non-zero, indicates an error that occurred while setting the optional-content context.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE(PDOCContextDidChange,
+ (PDOCContext ocContext, PDOCContextChangeType whatHappened, void* objects, ASErrorCode error),
+ (PDOCContext ocContext, PDOCContextChangeType whatHappened, void* objects, ASErrorCode error, void *clientData),
+ (ocContext, whatHappened, objects, error, cell->clientData))
+
+/**
+ An optional-content context is changing in a <code>PDDoc</code> in a way that could affect the
+ visibility state of content.
+ @param doc The document containing the optional-content context whose visibility state is changing.
+ @param whatWillHappen The type of change that will occur.
+ @param object A pointer to the object that will change. The kind of object this
+ can be depends on the type of change that will occur:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Type of object</TH></TR>
+ <TR><TD><code>kPDOCGCreate</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCGDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGProperties</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCConfigChange</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigCreate</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGReplace</code></TD><TD><code>PDOCG</code> (the replacement)</TD></TR>
+ <TR><TD><code>kPDDocRemoveOC</code></TD><TD><code>NULL</code></TD></TR>
+ </TABLE>
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocOCDidChange
+ @notify PDOCContextDidChange
+ @notify PDOCContextWillChange
+*/
+POKE(PDDocOCWillChange,
+ (PDDoc doc, PDDocOCChangeType whatWillHappen, void* object),
+ (PDDoc doc, PDDocOCChangeType whatWillHappen, void* object, void *clientData),
+ (doc, whatWillHappen, object, cell->clientData))
+
+/**
+ An optional-content context changed in a <code>PDDoc</code> in a way that could affect
+ the visibility state of content.
+ @param doc The document containing the optional-content context whose visibility state changed.
+ @param whatHappened The type of change that occurred.
+ @param object A pointer to the object that changed. The kind of object this
+ can be depends on the type of change that occurred:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Type of object</TH></TR>
+ <TR><TD><code>kPDOCGCreate</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCGDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGProperties</code></TD><TD><code>PDOCG</code></TD></TR>
+ <TR><TD><code>kPDOCConfigChange</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigCreate</code></TD><TD><code>PDOCConfig</code></TD></TR>
+ <TR><TD><code>kPDOCConfigDestroy</code></TD><TD><code>NULL</code></TD></TR>
+ <TR><TD><code>kPDOCGReplace</code></TD><TD><code>PDOCG</code> (the replacement)</TD></TR>
+ <TR><TD><code>kPDDocRemoveOC</code></TD><TD><code>NULL</code></TD></TR>
+ </TABLE>
+
+ @param error If non-zero, it indicates an error that occurred while setting the optional-content context.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocOCWillChange
+ @notify PDOCContextDidChange
+ @notify PDOCContextWillChange
+*/
+POKE(PDDocOCDidChange,
+ (PDDoc doc, PDDocOCChangeType whatHappened, void* object, ASErrorCode error),
+ (PDDoc doc, PDDocOCChangeType whatHappened, void* object, ASErrorCode error, void *clientData),
+ (doc, whatHappened, object, error, cell->clientData))
+/* END Optional Content notifications */
+
+/**
+ <p>Supersedes <code>PDPageDidRemoveAnnot()</code> in Acrobat 6.0 and later.</p>
+
+ <p>An annotation has been removed from a page.</p>
+
+ @param page The page from which an annotation was removed.
+ @param removedAnnot The annotation object that was removed.
+ @param error The error code. <code>error</code> is set to <code>0</code> if no errors occurred
+ while removing the annotation. If an error occurred, <code>error</code> contains
+ the error code.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDPageWillRemoveAnnot
+ @see PDPageRemoveAnnot
+*/
+POKE(PDPageDidRemoveAnnotEx,
+ (PDPage page, PDAnnot removedAnnot, ASInt32 error),
+ (PDPage page, PDAnnot removedAnnot, ASInt32 error, void *clientData),
+ (page, removedAnnot, error, cell->clientData))
+
+
+/**
+ Sent before a document is printed, before any marks are
+ made on the first page. Page resources and contents may
+ be modified at the time this notification is broadcast.
+
+ @param doc The document that is about to be printed.
+ @param printMode A constant that describes what is being
+ printed:
+ <ul>
+ <li>The document only.</li>
+ <li>The document with annotations.</li>
+ <li>The form data only. </li>
+ </ul>
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidPrintPages
+ @notify PDDocWillPrintDoc
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+*/
+POKE(PDDocWillPrintDocInMode,
+ (PDDoc doc, PDPrintWhat printMode),
+ (PDDoc doc, PDPrintWhat printMode, void *clientData),
+ (doc, printMode, cell->clientData))
+
+
+
+/**
+ Sent when a page view becomes associated with an <code>AVDoc</code>.
+ When a cross-document link is being performed, the same
+ page view may be re-used with a different <code>AVDoc</code>. In this
+ case this notification is sent twice, once when the old
+ <code>AVDoc</code> is closed and the page view's <code>AVDoc</code> becomes <code>NULL</code>,
+ and again when the new <code>AVDoc</code> is opened and associated with
+ the page view.
+ @param pageView The <code>AVPageView</code> for which the document
+ changed.
+ @param newDoc The new document associated with the page
+ view.
+ @param oldDoc The document that was previously associated
+ with the page view.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocActivePageViewDidChange
+ @notify AVPageViewDidChange
+ @notify AVPageViewWasCreated
+ @notify AVPageViewWillDestroy
+ @see AVDocGetNthPageView
+ @see AVDocGetNumPageViews
+ @see AVDocGetPageView
+ @see AVPageViewGetAVDoc
+*/
+POKE(AVPageViewDocDidChange,
+ (AVPageView pageView, AVDoc newDoc, AVDoc oldDoc),
+ (AVPageView pageView, AVDoc newDoc, AVDoc oldDoc, void *clientData),
+ (pageView, newDoc, oldDoc, cell->clientData))
+
+
+
+ /**
+ A document's selection has been cleared.
+ @param doc The document whose selection was cleared.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVDocWillClearSelection
+ @see AVDocClearSelection
+ @see AVDocDeleteSelection
+ @see AVDocSetSelection
+*/
+POKE(AVDocDidClearSelection,
+ (AVDoc doc),
+ (AVDoc doc, void *clientData),
+ (doc, cell->clientData))
+
+
+/**
+ The Acrobat viewer has finished initializing extensions.
+
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVAppWillTerminateExtensions
+*/
+POKE(AVAppDidInitExtensions, (void), (void *clientData), (cell->clientData))
+
+
+/**
+ The Acrobat viewer will terminate extensions.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @notify AVAppDidInitExtensions
+ @notify AVAppWillQuit
+*/
+POKE(AVAppWillTerminateExtensions, (void), (void *clientData), (cell->clientData))
+
+
+/**
+ A document's active tool changed.
+ @param activeDoc The document.
+ @param prevTool The previously active tool.
+ @param curTool The currently active tool.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see AVDocGetActiveTool
+ @see AVDocSetActiveTool
+*/
+POKE(AVAppToolDidChange,
+ (AVDoc activeDoc, AVTool prevTool, AVTool curTool),
+ (AVDoc activeDoc, AVTool prevTool, AVTool curTool, void *clientData),
+ (activeDoc, prevTool, curTool, cell->clientData))
+
+/**
+ A document was opened and its permissions (if present) have
+ been validated.
+ @param doc The document.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed in by the calling application when
+ this notification was registered for using <code>AVAppRegisterNotification()</code>.
+ @notify PDDocDidOpen
+*/
+POKE(PDDocPermsReady, (PDDoc doc), (PDDoc doc, void *clientData), (doc, cell->clientData))
+
+/**
+ A new window was created for a document. This will be
+ called for all windows created for a document, including
+ the initial window. It will arrive before <code>AVDocDidOpen()</code>.
+
+ @param doc The document.
+ @param window The new <code>AVWindow</code>.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see AVDocGetAVWindow
+ @see AVDocWindowWasRemoved
+*/
+POKE(AVDocWindowWasAdded,
+ (AVDoc doc, AVWindow window),
+ (AVDoc doc, AVWindow window, void* clientData),
+ (doc, window, cell->clientData))
+
+/**
+ A window was removed from a document. This is called
+ after the association between the window and document
+ has been severed but before the window is destroyed.
+
+ @param doc The document.
+ @param window The <code>AVWindow</code> being removed.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see AVDocGetAVWindow
+ @see AVDocWindowWasAdded
+*/
+POKE(AVDocWindowWasRemoved,
+ (AVDoc doc, AVWindow window),
+ (AVDoc doc, AVWindow window, void* clientData),
+ (doc, window, cell->clientData))
+
+/**
+ The active window associated with a document has changed. This
+ is the window returned by <code>AVDocGetAVWindow()</code>.
+
+ @param doc The document.
+ @param oldWindow The previous active window for the document (which may be <code>NULL</code>).
+ @param newWindow The new active window for the document.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see AVDocGetAVWindow
+*/
+POKE(AVDocAVWindowDidChange,
+ (AVDoc doc, AVWindow oldWindow, AVWindow newWindow),
+ (AVDoc doc, AVWindow oldWindow, AVWindow newWindow, void* clientData),
+ (doc, oldWindow, newWindow, cell->clientData))
+
+/** An entry will be removed from the <code>PDNameTree</code>. */
+POKE(PDNameTreeNameWillRemove,
+ (PDNameTree tree, const char *key, ASInt32 keyLen),
+ (PDNameTree tree, const char *key, ASInt32 keyLen, void *clientData),
+ (tree, key, keyLen, cell->clientData))
+
+/**
+ Sent when the page direction of the
+ document changes. The page direction
+ is determined by the Direction key
+ in the ViewerPreferences dictionary.
+ @param doc The document.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE(PDDocPageDirectionDidChange,
+ (PDDoc doc),
+ (PDDoc doc, void* clientData),
+ (doc, cell->clientData))
+
+
+/**
+ The contents of a popup note have change but have not yet been
+ set in the <code>PDAnnot</code>, thus the change is intermediate. The contents
+ will be changed when input focus is lost by the popup note.
+
+ @param doc The <code>AVDoc</code> in which the annotation lives.
+ @param annot The <code>PDAnnot</code> representing the popup (possibly the parent of the popup).
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE( AVDocPopupContentsWillChange, ( AVDoc doc, PDAnnot annot ), ( AVDoc doc, PDAnnot annot, void *clientData ), ( doc, annot, cell->clientData ) )
+
+/**
+ The visibility of the <code>AVPanel</code> with the specified name changed.
+
+ @param doc The <code>AVDoc</code> for which the panel's visiblity changed. If <code>NULL</code>, the panel is floating.
+ @param name The <code>const char*</code> name of the panel for which the visibility has changed
+ @param visible The new visiblity state: <code>true</code> for visible, <code>false</code> otherwise.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE( AVAppPanelVisibilityDidChangeForAVDoc, ( AVDoc doc, const char* name, ASBool visible ), ( AVDoc doc, const char* name, ASBool visible, void *clientData ), ( doc, name, visible, cell->clientData ) )
+
+/**
+ The XMP metadata describing the document as a whole has changed.
+
+ @param pdDoc The <code>PDDoc</code> whose describing XMP metadata has changed.
+ @param newMetadata A serialized representation of the new describing XMP metadata.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see PDDocSetXAPMetadata
+*/
+POKE( PDDocXAPMetadataDidChange,
+ (PDDoc pdDoc, ASText newMetadata),
+ (PDDoc pdDoc, ASText newMetadata, void *clientData),
+ (pdDoc, newMetadata, cell->clientData))
+
+/**
+ The XMP metadata describing the object represented by a Cos dictionary
+ has changed.
+
+ @param dict The Cos dictionary or stream representing an object whose describing XMP metadata has changed.
+ @param newMetadata A serialized representation of the new describing XMP metadata.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+ @see CosDictSetXAPMetadata
+*/
+POKE( CosDictXAPMetadataDidChange,
+ (CosObj dict, ASText newMetadata),
+ (CosObj dict, ASText newMetadata, void *clientData),
+ (dict, newMetadata, cell->clientData))
+
+/*
+ The XMP metadata describing a marked content sequence has changed.
+
+ @param container The <code>PDEContainer</code> representing a marked content sequence whose describing XMP metadata has changed.
+ @param newMetadata A serialized representation of the new describing XMP metadata.
+ @see PDEContainerSetXAPMetadata
+
+*/
+/*
+POKE( PDEContainerXAPMetadataDidChange,
+ (PDEContainer container, ASText newMetadata),
+ (PDEContainer container, ASText newMetadata, void *clientData),
+ (container, newMetadata, cell->clientData))
+
+*/
+
+/**
+ This notification will be broadcast when the user cancels
+ the print dialog. It serves as the alternate to <code>AVDocDidPrint()</code>. The <code>AVDocDidPrint()</code>
+ notification is not sent when the print dialog is cancelled.
+
+ @param doc The <code>AVDoc</code> for which the print dialog was invoked.
+
+ @notify AVDocDidPrint
+ @see AVDocPrintPages
+ @see AVDocPrintPagesWithParams
+
+*/
+POKE(AVDocPrintDialogWasCancelled,
+ (AVDoc doc),
+ (AVDoc doc, void *clientData),
+ (doc, cell->clientData))
+
+/**
+ Sent when the inks for the document change.
+ @param doc The document.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE(PDDocInksDidChange,
+ (PDDoc doc),
+ (PDDoc doc, void *clientData),
+ (doc, cell->clientData))
+/**
+ Sent when the page is redrawn via <code>PDPageRedraw()</code>.
+ @param page The page being redrawn.
+ @param clientData A pointer to a block of user-supplied
+ data that was passed when the client registered for this
+ notification using <code>AVAppRegisterNotification()</code>.
+*/
+POKE(PDPageDidRedraw,
+ (PDPage page),
+ (PDPage page, void *clientData),
+ (page, cell->clientData))
+
+
+#if TOOLKIT
+ /**
+ Sent when the PDF Library has calculated the PostScript Print Page matrix.
+ The PostScript Print Page matrix provides the mapping from user space to PS output space.
+ The matrix can be used to calculate the PostScript page bounding box.
+ @param page The <code>PDPage</code> that is being printed.
+ @param matrix The Page matrix, which is passed to the client.
+ @param clientData A pointer to a block of user-supplied data that was passed when the client registered for this
+ notification using <code>PDFLibraryRegisterNotification()</code>.
+ */
+
+ POKE(PDPageGetPrintMatrix,
+ (PDPage page, ASFixedMatrix *matrix),
+ (PDPage page, ASFixedMatrix *matrix, void* clientData),
+ (page, matrix, cell->clientData))
+
+
+ /**
+ Sent during PostScript printing, when a form or image containing an OPI dictionary is encountered.
+ If it returns <code>true</code> (by filling the boolean variable passed to it), the client is presumed to have taken care of the entire
+ form or image, and <code>PDPrint</code> will emit nothing. Otherwise, <code>PDPrint</code> will generate OPI comments
+ based on the dictionary.
+ @param opi The OPI dictionary.
+ @param stm The PostScript print stream.
+ @param bl The pointer to a bool variable which the client returns.
+ @param clientData Client data.
+ */
+
+ POKE(PDDocCallOPIHandler,
+ (OPIdict *opi, ASStm stm, ASBool *bl),
+ (OPIdict *opi, ASStm stm, ASBool *bl, void *clientData),
+ (opi, stm, bl, cell->clientData))
+
+ /**
+ Sent during PostScript/Non-PostScript printing, before the page is actually
+ printed. The notification is not raised if the file is exported to PostScript.
+ This is Windows specific.
+
+ @param dm A pointer to a <code>DEVMODEW</code> which the client may modify.
+ @param bl A pointer to a boolean variable which the client sets to <code>true</code> after modifying the <code>DEVMODEW</code>.
+ @param clientData Client data.
+ */
+
+ POKE(PDPageCreatePrintRecord,
+ (void *devmode, ASBool *bl),
+ (void *devmode, ASBool *bl, void *clientData),
+ (devmode, bl, cell->clientData))
+
+
+ /**
+ Sent during PostScript/Non-PostScript printing on the Windows platform. This
+ notification is sent after PDF Library finishes printing the page. Control is returned
+ to the client, enable the client to draw extra content.
+
+ @param clientData Client data.
+ */
+
+ POKE(PDPageDirectDrawToPlatform,
+ (),
+ (void *clientData),
+ (cell->clientData))
+
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPrefix.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPrefix.h
new file mode 100644
index 0000000..b4c376e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIPrefix.h
@@ -0,0 +1,36 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIPrefix.h
+
+ - The bare minimum prefix file required to compile a Macintosh
+ plug-in for the Acrobat Viewer.
+
+*********************************************************************/
+
+#ifndef _H_PIPrefix
+#define _H_PIPrefix
+
+/**
+ Defines the platform-specific header file. It must be <code>"MacPlatform.h"</code> on the Mac OS and <code>"WINPLTFM.H"</code> on Windows.
+ PLATFORM is automatically set by the header file.
+*/
+#define PLATFORM "MacPlatform.h"
+/**
+ Defines the platform-specific header file. It must be <code>"Plugin.h"</code> on the Mac OS and Windows.
+ PRODUCT is automatically set by the header file.
+*/
+#define PRODUCT "Plugin.h"
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIRequir.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIRequir.h
new file mode 100644
index 0000000..fa27a34
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIRequir.h
@@ -0,0 +1,303 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIRequir.h
+
+ - Used to determine which HFTs (and which versions of those HFTS)
+ the plug-in requires.
+
+ - The SDK provided version of this file provides minimum requirements
+ to run on Acrobat 5.0. If your plugin is designed to run on earlier
+ versions you will need to lower the version numbers, while if your
+ plugin requires routines from higher versions, you will need to raise
+ the version numbers. See the API Overview for details on how to build
+ for multiple versions of Acrobat.
+
+ To reduce the footprint and overhead of your plug-in, as
+ well as provide for maximum future compatibility, we suggest that
+ when your plug-in is "done" you edit this file to remove references
+ to HFTs that are not being used. This is simply accomplished by
+ setting the version number of the HFT to zero.
+
+ For instance, if you don't use any of the Cos functions you should
+ change the #define for PI_COS_VERSION to:
+
+ #define PI_COS_VERSION 0
+
+ - ALL plug-ins use one or more functions in the Core HFT. NEVER set
+ PI_CORE_VERSION to zero.
+
+*********************************************************************/
+
+#ifndef _H_PIRequir
+#define _H_PIRequir
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "Environ.h"
+
+
+#ifdef MI_VERSN
+#include MI_VERSN
+#endif
+
+/*
+** Everybody needs the Core HFT, so don't omit this one.
+*/
+#ifndef PI_CORE_VERSION
+/**
+ Specifies the version of the HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i><plug-in name></i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROVIEW_VERSION
+ @see PI_ACROSUPPORT_VERSION
+ @see PI_COS_VERSION
+ @see PI_MACINTOSH_VERSION
+ @see PI_PDMODEL_VERSION
+ @see PI_UNIX_VERSION
+ @see PI_WIN_VERSION
+*/
+#define PI_CORE_VERSION CoreHFT_VERSION_5
+#endif
+
+/*
+** Most plug-ins will use calls from the AdobeSupport family
+*/
+#ifndef PI_ACROSUPPORT_VERSION
+/**
+ Specifies the version of the Acrobat support level HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i><plug-in name></i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROVIEW_VERSION
+ @see PI_CORE_VERSION
+ @see PI_COS_VERSION
+ @see PI_MACINTOSH_VERSION
+ @see PI_PDMODEL_VERSION
+ @see PI_UNIX_VERSION
+ @see PI_WIN_VERSION
+*/
+#define PI_ACROSUPPORT_VERSION ASCallsHFT_VERSION_8
+#endif
+
+/*
+** Many plug-ins will not need to access the low-level Cos functionality
+*/
+#ifndef PI_COS_VERSION
+/**
+ Specifies the version of the Cos-level HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i><plug-in name></i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROVIEW_VERSION
+ @see PI_CORE_VERSION
+ @see PI_ACROSUPPORT_VERSION
+ @see PI_MACINTOSH_VERSION
+ @see PI_PDMODEL_VERSION
+ @see PI_UNIX_VERSION
+ @see PI_WIN_VERSION
+*/
+#define PI_COS_VERSION CosHFT_VERSION_6
+#endif
+
+/*
+** PDModel methods
+*/
+#ifndef PI_PDMODEL_VERSION
+/**
+ Specifies the version of the PD level HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i><plug-in name></i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROSUPPORT_VERSION
+ @see PI_CORE_VERSION
+ @see PI_COS_VERSION
+ @see PI_MACINTOSH_VERSION
+ @see PI_ACROVIEW_VERSION
+ @see PI_UNIX_VERSION
+ @see PI_WIN_VERSION
+*/
+#define PI_PDMODEL_VERSION PDModelHFT_VERSION_6
+#endif
+
+/*
+** AcroView methods
+*/
+#ifndef PI_ACROVIEW_VERSION
+/**
+ Specifies the version of the Acrobat viewer level HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i><plug-in name></i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROSUPPORT_VERSION
+ @see PI_CORE_VERSION
+ @see PI_COS_VERSION
+ @see PI_MACINTOSH_VERSION
+ @see PI_PDMODEL_VERSION
+ @see PI_UNIX_VERSION
+ @see PI_WIN_VERSION
+*/
+#define PI_ACROVIEW_VERSION AcroViewHFT_VERSION_6
+#endif
+
+
+/*
+** ASExtra methods
+*/
+#ifndef PI_ASEXTRA_VERSION
+#define PI_ASEXTRA_VERSION ASExtraHFT_VERSION_6
+#endif
+
+/*
+** AcroViewSweetPea methods
+*/
+#ifndef PI_ACROVIEW_SWEETPEA_VERSION
+#if defined(PDFLPI)
+#define PI_ACROVIEW_SWEETPEA_VERSION 0
+#else
+#define PI_ACROVIEW_SWEETPEA_VERSION SweetPeaHFT_VERSION_5
+#endif
+#endif
+
+#ifndef PI_MACINTOSH_VERSION
+#if MAC_PLATFORM
+/*
+** Macintosh specific methods (AppleEvents, AVRect conversions, etc.)
+*/
+/**
+ Specifies the version of the Mac OS-only methods HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i>&lt;plug-in name&gt;</i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROSUPPORT_VERSION
+ @see PI_CORE_VERSION
+ @see PI_COS_VERSION
+ @see PI_ACROVIEW_VERSION
+ @see PI_PDMODEL_VERSION
+ @see PI_UNIX_VERSION
+ @see PI_WIN_VERSION
+*/
+#define PI_MACINTOSH_VERSION MacintoshHFT_VERSION_2_2
+#else
+#define PI_MACINTOSH_VERSION (0L)
+#endif
+#endif
+
+#if UNIX_PLATFORM
+/**
+ Specifies the version of the UNIX-only methods HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i><plug-in name></i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROSUPPORT_VERSION
+ @see PI_CORE_VERSION
+ @see PI_COS_VERSION
+ @see PI_ACROVIEW_VERSION
+ @see PI_PDMODEL_VERSION
+ @see PI_MACINTOSH_VERSION
+ @see PI_WIN_VERSION
+*/
+#define PI_UNIX_VERSION UnixHFT_VERSION_5
+#else
+#define PI_UNIX_VERSION (0L)
+#endif
+
+#if WIN_PLATFORM
+#ifndef PI_WIN_VERSION
+/**
+ Specifies the version of the Windows-only methods HFT. This is automatically set by PIRequir.h.
+
+ <p>If the HFT version is higher than the viewer loading the client supports, it displays an alert box with the message
+ "There was an error while loading the client <i><plug-in name></i>. The client is incompatible with this version of the Viewer."</p>
+
+ @see PI_ACROSUPPORT_VERSION
+ @see PI_CORE_VERSION
+ @see PI_COS_VERSION
+ @see PI_ACROVIEW_VERSION
+ @see PI_PDMODEL_VERSION
+ @see PI_MACINTOSH_VERSION
+ @see PI_UNIX_VERSION
+*/
+#define PI_WIN_VERSION WINHFT_VERSION_5
+#endif
+#else
+#define PI_WIN_VERSION (0L)
+#endif
+
+
+/*
+** PDFEdit Write methods
+*/
+#ifndef PI_PDFEDIT_WRITE_VERSION
+#define PI_PDFEDIT_WRITE_VERSION PDFEditWriteHFT_VERSION_6
+#endif
+
+
+/*
+** PDFEdit Read methods
+*/
+#ifndef PI_PDFEDIT_READ_VERSION
+#define PI_PDFEDIT_READ_VERSION PDFEditReadHFT_VERSION_6
+#endif
+
+/*
+** PDSysFont methods
+*/
+#ifndef PI_PDSYSFONT_VERSION
+#define PI_PDSYSFONT_VERSION PDSysFontHFT_VERSION_4
+#endif
+
+/*
+** PagePDEContent methods
+*/
+#ifndef PI_PAGE_PDE_CONTENT_VERSION
+#define PI_PAGE_PDE_CONTENT_VERSION PagePDEContentHFT_VERSION_6
+#endif
+
+
+#ifndef PI_PDSEDIT_WRITE_VERSION
+#define PI_PDSEDIT_WRITE_VERSION PDSWrite_VERSION_6
+#endif
+
+#ifndef PI_PDSEDIT_READ_VERSION
+#define PI_PDSEDIT_READ_VERSION PDSRead_VERSION_6
+#endif
+
+#if PDMETADATA_HFT
+
+#ifndef PI_PDMETADATA_VERSION
+#define PI_PDMETADATA_VERSION PDMetadataHFT_VERSION_6
+#endif
+
+#endif /* PDMETADATA_HFT */
+
+#ifndef PI_ACROCOLOR_VERSION
+#define PI_ACROCOLOR_VERSION 0 /* define to AcroColorHFT_VERSION_6 or later to get this (not available in Reader) */
+#endif /* PI_ACROCOLOR_VERSION */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PIRequir */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIVersn.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIVersn.h
new file mode 100644
index 0000000..7f6f475
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PIVersn.h
@@ -0,0 +1,128 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIVersn.h
+
+ - Data structures, types, and other things related to plug-ins and
+ version changes. This file is shared between Acrobat applications
+ and plug-ins.
+
+ - Contains handshaking versioning types and data.
+
+*********************************************************************/
+
+#ifndef _H_PIVersn
+#define _H_PIVersn
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "Environ.h"
+#include "CoreExpT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+/*
+** Prototypes for plug-in supplied functions.
+** These are not expected to change, but they could if we really needed them to.
+*/
+/* The implementation of this proc is provided in the SDK */
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PISetupSDKProcType)(ASUns32 handshakeVersion, void *sdkData);
+
+/* The implemention of the following is the responsibility of the Plug-in author */
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PIHandshakeProcType)(ASUns32 handshakeVersion, void *handshakeData);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PIExportHFTsProcType)(void);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PIImportReplaceAndRegisterProcType)(void);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PIInitProcType)(void);
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PIUnloadProcType)(void);
+
+
+/*
+** Known handshake versions and data structures should be listed below:
+** Top 2 bytes contains the major version; bottom 2 bytes the minor version.
+** All shipping versions have a zero minor version.
+** All apps and plugs-ins must support all previous shipping versions.
+** Interpet last 4 digits of the name as MMmm, where MM is the major #; mm is the minor.
+*/
+
+/*
+** Exporting of HFT support. Old plug-ins could be supported, but we decided to break
+** them anyway.
+*/
+#define HANDSHAKE_V0200 ((ASUns32)((2L<<16) + 0))
+
+/* Data Types follow: */
+/*
+** SDKData_V0200
+** Structure containing data to be passed in and out of the plug-in's PISetupSDK() routine.
+** This routine is implemented in the PIMain.c routine supplied with the Plug-in SDK.
+** The first field of any SDKData_VMMmm struct must be handshakeVersion.
+*/
+typedef struct {
+ ASUns32 handshakeVersion; /* IN - Will always be HANDSHAKE_VERSION_V0200 */
+ ExtensionID extensionID; /* IN - Opaque to extensions, used to identify the Extension */
+ HFT coreHFT; /* IN - Host Function Table for "core" functions */
+ ASCallback handshakeCallback; /* OUT - Address of PIHandshake() */
+} PISDKData_V0200;
+
+
+/* PIHandshakeData_V0200
+** Structure containing data top be passed in and out of the plug-ins PIHandshake() routine.
+** This routine MUST be implemented with that name by the plug-in writer.
+** The first field of any PIHandshakeData_VMMmm struct must be handshakeVersion.
+*/
+typedef struct {
+ ASUns32 handshakeVersion; /* IN - Will always be HANDSHAKE_V0200 */
+ ASAtom appName; /* IN - Name of host application */
+ ASAtom extensionName; /* OUT - Name of the plug-in */
+ ASCallback exportHFTsCallback; /* OUT - Routine to register HFTs this plug-in is providing */
+ ASCallback importReplaceAndRegisterCallback; /* OUT - Routine to import other plug-in's HFTs, replace HFT functions, and register notifications */
+ ASCallback initCallback; /* OUT - Routine for plug-in to initialize itself */
+ ASCallback unloadCallback; /* OUT - Routine to unreplace, etc. the plug-in */
+} PIHandshakeData_V0200;
+
+/*
+** If handshake version changes, insert subsequent handshake #defines and structure
+** definitions above, and change the HANDSHAKE_VERSION #define, below.
+**
+** If you add a shipping version, you can safely remove ALL of the non-shipping stuff:
+** Non-shipping built plug-ins will operate in the previous (if any) shipping application.
+** Non-shipping applications will load all previous shipping-built plug-ins.
+** Naturally, for version 01.00 we don't have any previous anythings to worry about, but
+** the version 01.00 app does not need to support any version 00.XX plug-ins.
+*/
+
+/*
+** Current handshake version number.
+*/
+#define HANDSHAKE_VERSION HANDSHAKE_V0200
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_PIVersn */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFCalls.h
new file mode 100644
index 0000000..7573290
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFCalls.h
@@ -0,0 +1,192 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PSFCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_PSFCalls
+#define _H_PSFCalls
+#include "acroassert.h"
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _PDSysFontHFT_LATEST_VERSION 0x00040000
+#define _PDSysFontHFT_LAST_BETA_COMPATIBLE_VERSION 0x00040000
+#define _PDSysFontHFT_IS_BETA 0
+
+/* for public use */
+#define PDSysFontHFT_LATEST_VERSION (_PDSysFontHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _PDSysFontHFT_LATEST_VERSION) : _PDSysFontHFT_LATEST_VERSION)
+
+#define PDSysFontHFT_VERSION_4 0x00040000
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "PEExpT.h"
+#include "PDSysFontExpT.h"
+#include "PEVers.h"
+
+#ifdef NPROC /* This might be defined in sys/procs.h */
+#undef NPROC
+#endif /* NPROC */
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define UNPROC NPROC
+ #include "PSFProcs.h"
+ #undef NPROC
+ #undef UNPROC
+#endif /* !PLUGIN */
+
+#if PLUGIN
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define UNPROC NPROC
+
+ enum {
+ PDSysFontBAD_SELECTOR,
+ #include "PSFProcs.h"
+ PDSysFontNUMSELECTORSplusOne
+ };
+
+ #define PDSysFontNUMSELECTORS (PDSysFontNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef UNPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+#if READER_PLUGIN
+ /* Force an error for Exchange procs */
+ #define UNPROC(returnType, name, params)
+#else
+ #define UNPROC NPROC
+#endif
+ #include "PSFProcs.h"
+ #undef NPROC
+ #undef UNPROC
+
+#if PI_PDSYSFONT_VERSION != 0
+#ifdef THREAD_SAFE_PDFL
+ #define gPDSysFontHFT (GetHFTLocations()->pdSysFontHFT)
+ #define gPDSysFontVersion (GetHFTLocations()->pdSysFontVersion)
+#else
+ extern HFT gPDSysFontHFT;
+ extern ASUns32 gPDSysFontVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+#if !STATIC_HFT
+ /* Define the macros */
+ #define PDEnumSysFonts (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), ((PDEnumSysFontsSELPROTO)(gPDSysFontHFT[PDEnumSysFontsSEL])))
+ #define PDFindSysFont (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDFindSysFontSELPROTO)(gPDSysFontHFT[PDFindSysFontSEL])))
+ #define PDFindSysFontEx (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDFindSysFontExSELPROTO)(gPDSysFontHFT[PDFindSysFontExSEL])))
+ #define PDFindSysFontForPDEFont (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDFindSysFontForPDEFontSELPROTO)(gPDSysFontHFT[PDFindSysFontForPDEFontSEL])))
+ #define PDSysFontGetAttrs (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetAttrsSELPROTO)(gPDSysFontHFT[PDSysFontGetAttrsSEL])))
+ #define PDSysFontGetWidths (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetWidthsSELPROTO)(gPDSysFontHFT[PDSysFontGetWidthsSEL])))
+ #define PDSysFontGetWidthsEx (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetWidthsExSELPROTO)(gPDSysFontHFT[PDSysFontGetWidthsExSEL])))
+ #define PDSysFontGetEncoding (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetEncodingSELPROTO)(gPDSysFontHFT[PDSysFontGetEncodingSEL])))
+ #define PDSysFontGetInfo (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetInfoSELPROTO)(gPDSysFontHFT[PDSysFontGetInfoSEL])))
+ #define PDSysFontGetName (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetNameSELPROTO)(gPDSysFontHFT[PDSysFontGetNameSEL])))
+ #define PDSysFontAcquirePlatformData (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontAcquirePlatformDataSELPROTO)(gPDSysFontHFT[PDSysFontAcquirePlatformDataSEL])))
+ #define PDSysFontReleasePlatformData (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontReleasePlatformDataSELPROTO)(gPDSysFontHFT[PDSysFontReleasePlatformDataSEL])))
+ #define PDSysFontGetCIDSystemInfo (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetCIDSystemInfoSELPROTO)(gPDSysFontHFT[PDSysFontGetCIDSystemInfoSEL])))
+ #define PDSysFontGetType0Widths (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDSysFontGetType0WidthsSELPROTO)(gPDSysFontHFT[PDSysFontGetType0WidthsSEL])))
+ #define PDEmbedSysFontForPDEFont (ACROASSERT(gPDSysFontVersion >=PDSysFontHFT_VERSION_4), *((PDEmbedSysFontForPDEFontSELPROTO)(gPDSysFontHFT[PDEmbedSysFontForPDEFontSEL])))
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* !STATIC_HFT */
+
+#endif /* PI_PDSYSFONT_VERSION != 0 */
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PSFCalls */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFProcs.h
new file mode 100644
index 0000000..c2189b0
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PSFProcs.h
@@ -0,0 +1,467 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PSFProcs.h
+
+ - Catalog of functions exported by the PDSysFont HFT.
+
+*********************************************************************/
+
+
+/**
+ Enumerates all of the system fonts with a user-supplied
+ procedure.
+
+ <p>The PDSysFont must be acquired during the enumeration if
+ the font is needed beyond the <code>enumProc</code>. </p>
+
+ <p>Developers should not assume that the <code>enumProc</code> will be
+ called. If no system fonts are found (for example, if the
+ <code>PSRESOURCEPATH</code> environment variable is not set on UNIX platforms),
+ <code>enumProc</code> is never called, and PDEnumSysFonts() does not raise
+ an exception. </p>
+
+ @note The font names that are returned from the methods
+ PDEnumSysFonts() and PDSysFontsGetAttrs() are different in 5.0
+ (compared to 4.05). The differences are shown in the table
+ below:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Acrobat 4.05 Name</TH><TH>Acrobat 4.05 PSname</TH><TH>Acrobat 5.0 Name</TH><TH>Acrobat 5.0 Psname</TH></TR>
+ <TR><TD><code>MS-Mincho</code></TD><TD><code>NULL</code></TD><TD><code>MSMincho</code></TD><TD><code>MS-Mincho</code></TD></TR>
+ <TR><TD><code>MS-Gothic</code></TD><TD><code>NULL</code></TD><TD><code>MSGothic</code></TD><TD><code>MS-Gothic</code></TD></TR>
+ <TR><TD><code>MS-PMincho</code></TD><TD><code>NULL</code></TD><TD><code>MSPMincho</code></TD><TD><code>MS-PMincho</code></TD></TR>
+ <TR><TD><code>MS-PGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSPGothic</code></TD><TD><code>MS-PGothic</code></TD></TR>
+ <TR><TD><code>MS-UIGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSUIGothic</code></TD><TD><code>MS-UIGothic</code></TD></TR>
+ </TABLE>
+
+ @param enumProc IN/OUT A user-supplied callback to call once for
+ each system font. Enumeration continues until all fonts
+ have been enumerated, or until <code>enumProc</code> returns <code>false</code>.
+ @param clientData IN/OUT A pointer to user-supplied data to pass
+ to <code>enumProc</code> each time it is called.
+ @see PDFindSysFont
+ @see PDFindSysFontForPDEFont
+ @ingroup Enumerators
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+UNPROC (void, PDEnumSysFonts, (
+ IN PDSysFontEnumProc enumProc,
+ IN void *clientData)
+ )
+
+/**
+ Finds a system font that matches the requested attributes.
+
+ <p>The method gets the PDSysFont rather than acquiring it, so
+ do not call PDERelease() on the returned PDSysFont when you are done
+ with it. </p>
+
+ @param attrs IN/OUT A pointer to a PDEFontAttrs structure with the
+ attributes of the font you are searching for.
+ @param attrsSize IN/OUT The size of the <code>attrs</code> buffer in bytes.
+ @param flags IN/OUT Flags from PDSysFontMatchFlags.
+ @return The desired system font.
+ @see PDEnumSysFonts
+ @see PDFindSysFontForPDEFont
+ @see PDFindSysFontEx
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (PDSysFont, PDFindSysFont, (
+ IN PDEFontAttrsP attrs,
+ IN ASUns32 attrsSize,
+ IN ASUns32 flags)
+ )
+
+
+/**
+ Finds a system font that matches the requested attributes.
+
+ <p>If the requested font is a multiple master font instance,
+ the base font is returned, and the specified design vector
+ is decoded and returned in <code>mmDesignVector</code>. </p>
+
+ <p>The method gets the PDSysFont rather than acquiring it, so
+ do not call PDERelease() on the returned PDSysFont when done
+ with it. </p>
+
+ @param attrs IN/OUT A pointer to a PDEFontAttrs structure with the
+ attributes of the font you are searching for.
+ @param attrsSize IN/OUT The size of the <code>attrs</code> buffer in bytes.
+ @param flags IN/OUT Flags from PDSysFontMatchFlags.
+ @param mmDesignVector IN/OUT (Filled by the method) If the requested
+ font is a multiple master font instance, the specified design
+ vector is decoded and returned in <code>mmDesignVector</code>.
+ @param designVecLength IN/OUT (Filled by the method) Pass the
+ length of <code>mmDesignVector</code>. This parameter also returns the
+ number of elements filled in <code>mmDesignVector</code> (the maximum is <code>4</code>).
+
+ @return The desired system font.
+ @see PDEnumSysFonts
+ @see PDFindSysFont
+ @see PDFindSysFontForPDEFont
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (PDSysFont, PDFindSysFontEx, (
+ IN PDEFontAttrsP attrs,
+ IN ASUns32 attrsSize,
+ IN ASUns32 flags,
+ OUT ASFixed *mmDesignVector,
+ OUT ASInt32 *designVecLength)
+ )
+
+/**
+ Find a system font that matches the requested PDEFont.
+
+ <p>The method gets the PDSysFont rather than acquiring it, so
+ do not call PDERelease() on the returned PDSysFont when done
+ with it. </p>
+
+ @param font A PDEFont whose matching system font is found.
+
+ @param flags A bit field comprised of PDSysFontMatchFlags
+ values.
+ <ul>
+ <li> kPDSysFontMatchNameAndCharSet</li>
+ <li> kPDSysFontMatchFontType</li>
+ <li> PDSysFontMatchFlags</li>
+ <li> Passing zero matches the font by name only.</li>
+ </ul>
+
+ @return The system font corresponding to <code>font</code>.
+ @exception peErrCantGetAttrs
+ @exception genErrBadParm
+ @exception genErrResourceLoadFailed
+ @see PDFindSysFont
+ @see PDEFontGetSysFont
+ @since PI_PDSYSFONT_VERSION >= 0x00050000
+*/
+UNPROC (PDSysFont, PDFindSysFontForPDEFont, (
+ IN PDEFont font,
+ IN ASUns32 flags)
+ )
+
+/**
+ Gets the attributes of a system font.
+
+ <p>The attributes will be returned in the buffer pointed to
+ by <code>attrsP</code>. </p>
+
+ <p>No more than <code>attrsSize</code> bytes will be written to the buffer. </p>
+
+ <p>This call can be expensive to execute, as it may involve
+ parsing the font in order to determine attributes. </p>
+
+ @note The font names that are returned from the methods
+ PDEnumSysFonts and PDSysFontsGetAttrs are different in 5.0
+ (compared to 4.05). The differences are shown in the table
+ below:
+
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Acrobat 4.05 Name</TH><TH>Acrobat 4.05 PSname</TH><TH>Acrobat 5.0 Name</TH><TH>Acrobat 5.0 Psname</TH></TR>
+ <TR><TD><code>MS-Mincho</code></TD><TD><code>NULL</code></TD><TD><code>MSMincho</code></TD><TD><code>MS-Mincho</code></TD></TR>
+ <TR><TD><code>MS-Gothic</code></TD><TD><code>NULL</code></TD><TD><code>MSGothic</code></TD><TD><code>MS-Gothic</code></TD></TR>
+ <TR><TD><code>MS-PMincho</code></TD><TD><code>NULL</code></TD><TD><code>MSPMincho</code></TD><TD><code>MS-PMincho</code></TD></TR>
+ <TR><TD><code>MS-PGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSPGothic</code></TD><TD><code>MS-PGothic</code></TD></TR>
+ <TR><TD><code>MS-UIGothic</code></TD><TD><code>NULL</code></TD><TD><code>MSUIGothic</code></TD><TD><code>MS-UIGothic</code></TD></TR>
+ </TABLE>
+
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose attributes are obtained.
+ @param attrsP IN/OUT (Filled by the method) A pointer to a PDEFontAttrs
+ structure with the attributes of a system font.
+ @param attrsSize IN/OUT The size of the <code>attrsP</code> buffer in bytes.
+ @exception peErrCantGetAttrs
+ @see PDSysFontGetEncoding
+ @see PDSysFontGetInfo
+ @see PDSysFontGetName
+ @see PDSysFontGetType0Widths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (void, PDSysFontGetAttrs, (
+ IN PDSysFont sysFont,
+ OUT PDEFontAttrsP attrsP,
+ IN ASUns32 attrsSize)
+ )
+
+/**
+ Gets the widths of a single byte encoded system font.
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose widths are obtained.
+ @param widthsP IN/OUT (Filled by the method) A pointer to the widths
+ array. <code>widthsP</code> must have room for 256 entries.
+ @exception peErrCantGetWidths
+ @see PDSysFontGetType0Widths
+ @see PDSysFontGetWidthsEx
+ @see PDFontGetWidths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (void, PDSysFontGetWidths, (
+ IN PDSysFont sysFont,
+ OUT ASInt16 *widthsP)
+ )
+
+/**
+ Gets the widths of a single-byte encoded system font.
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose widths are obtained.
+ @param widthsP IN/OUT (Filled by the method) A pointer to the widths
+ array. <code>widthsP</code> must have room for 256 entries.
+ @param mmDesignVector IN/OUT If <code>sysFont</code> is a multiple master font,
+ it points to the design vector, whose length must equal the
+ number of design axes of <code>sysFont</code>.
+ @exception peErrCantGetWidths
+ @see PDSysFontGetType0Widths
+ @see PDSysFontGetWidths
+ @see PDFontGetWidths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (void, PDSysFontGetWidthsEx, (
+ IN PDSysFont sysFont,
+ OUT ASInt16 *widthsP,
+ IN ASFixed *mmDesignVector)
+ )
+
+/**
+ Gets the encoding of a single-byte encoded system font.
+
+ @param sysFont A PDSysFont object referencing a system
+ font whose encoding is obtained.
+ @param encodingNameP (Filled by the method) An encoding
+ name if the standard encoding is used. For Windows, it is <code>WinAnsiEncoding</code>; for Mac OS, this
+ is <code>MacRomanEncoding</code>.
+ @return If the return value is non-<code>NULL</code>, it is a pointer to an encoding
+ array of 256 C strings. Each entry in the array either contains
+ a glyph name or <code>NULL</code>; if it is <code>NULL</code>, the corresponding entry uses
+ the font's built in encoding value.
+
+ <p>The returned encoding must be freed via a call to ASfree(). </p>
+
+ @see PDSysFontAcquirePlatformData
+ @see PDSysFontGetInfo
+ @see PDSysFontGetName
+ @see PDSysFontGetType0Widths
+
+ @note This encoding array is returned only on Mac
+ platforms; on all others the function returns <code>NULL</code>.
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+UNPROC (ASUns8 **, PDSysFontGetEncoding, (
+ IN PDSysFont sysFont,
+ OUT ASAtom *encodingNameP)
+ )
+
+/**
+ Gets high-level information about a system font.
+ @param sysFont A PDSysFont object referencing a system
+ font whose information is obtained.
+ @param infoP (Filled by the method) A pointer to PDEFontInfoP
+ structure to fill with font information for <code>sysFont</code>. No
+ more than <code>infoSize</code> bytes are written to this buffer.
+ @param infoSize The size of the <code>infoP</code> buffer in bytes.
+ @see PDSysFontAcquirePlatformData
+ @see PDSysFontGetEncoding
+ @see PDSysFontGetName
+ @see PDSysFontGetType0Widths
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSysFontGetInfo, (
+ IN PDSysFont sysFont,
+ OUT PDEFontInfoP infoP,
+ IN ASUns32 infoSize)
+ )
+
+/**
+ Gets the PostScript or TrueType styled name for a system
+ font.
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font whose name is obtained.
+ @return The ASAtom for the system font's name.
+ @see PDSysFontAcquirePlatformData
+ @see PDSysFontGetEncoding
+ @see PDSysFontGetInfo
+ @see PDSysFontGetType0Widths
+ @since PI_PDSYSFONT_VERSION >= 0x00050000
+
+*/
+UNPROC (ASAtom, PDSysFontGetName, (
+ IN PDSysFont sysFont)
+ )
+
+/**
+ Acquires platform-specific data for use by user interface
+ code. It must be released when finished by PDSysFontReleasePlatformData().
+
+ @param sysFont IN/OUT A PDSysFont object referencing a system
+ font returned by either PDFindSysFont() or PDFindSysFontForPDEFont().
+
+ @return A pointer to a platform-dependent structure PDSysFontPlatData
+ containing information relating to a system font. It returns
+ <code>NULL</code> if it is out of memory.
+ @see PDSysFontReleasePlatformData
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (PDSysFontPlatDataP, PDSysFontAcquirePlatformData, (
+ IN PDSysFont sysFont)
+ )
+
+/**
+ Releases platform-specific data for the specified PDSysFont.
+
+ @param platDataP A pointer to a PDSysFontPlatDataP structure
+ containing platform-specific data.
+ @see PDSysFontAcquirePlatformData
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+*/
+UNPROC (void, PDSysFontReleasePlatformData, (
+ IN PDSysFontPlatDataP platDataP)
+ )
+
+/* PDSysFontGetScript
+** Returns a PDScript value for the specified PDSysFont
+
+UNPROC (PDScript, PDSysFontGetScript, (
+ IN PDSysFont sysFont)
+ )
+*/
+
+
+/**
+ If there is a font on the system that matches this PDEFont,
+ embed the full font, regardless of whether it was subsetted
+ or not embedded at all in the first place. This will not
+ work for CID fonts, because they must be subsetted.
+
+ <p>The matching is based on the PDSysFontMatchFlags. </p>
+
+ <p>Only the font object itself is modified: no content streams
+ are changed. </p>
+ @param font IN/OUT A PDEFont object returned from one of the PDEFontCreate
+ methods.
+ @param flags IN/OUT Flags from PDSysFontMatchFlags that determine
+ matches.
+ @param cosDoc IN/OUT Currently unused.
+ @exception peErrFontToEmbedNotOnSys is raised if there is no system font
+ that matches this.
+ @exception PDEFont.
+ @exception genErrBadParm is raised if the PDEFont is a CID font.
+ @exception peErrCantCreateFontSubset
+ @exception peErrCantGetAttrs
+ @exception peErrCantGetWidths
+ @see PDEFontCreateFromSysFont
+ @see PDFindSysFontForPDEFont
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+ @note This method does not change the reference count of
+ the font.
+*/
+UNPROC (void, PDEmbedSysFontForPDEFont, (
+ IN PDEFont font,
+ IN ASUns32 flags,
+ IN CosDoc cosDoc)
+)
+
+/**
+ Derives the registry, ordering, and supplement information
+ of a multi-byte system font. This information can be used
+ to create a PDEFont from a system font. For more information
+ on CID fonts, see PDFontGetCIDSystemInfo().
+ @param sysFont IN/OUT A PDSysFont object referencing a multi-byte
+ system font.
+ @param registry IN/OUT (Filled by the method) The ASAtom representing
+ the CIDFont's Registry information (for example, <code>"Adobe</code>).
+ @param ordering IN/OUT (Filled by the method) The ASAtom representing
+ the CIDFont's Ordering information (for example, <code>"Japan1"</code>).
+
+ @param supplement IN/OUT (Filled by the method) The SystemSupplement
+ field from the CIDFont.
+ @see PDFontGetCIDSystemInfo
+ @see PDFontGetCIDSystemSupplement
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (void, PDSysFontGetCIDSystemInfo, (
+ IN PDSysFont sysFont,
+ OUT ASAtom* registry,
+ OUT ASAtom* ordering,
+ OUT ASInt32* supplement)
+ )
+
+/**
+ Gets width information from a Type 0 system font. This information
+ can be used to create a PDEFont from a system font.
+
+ @param sysFont IN/OUT A PDSysFont object referencing a multibyte
+ system font.
+ @param ordering IN/OUT An ASAtom representing the CIDFont's Ordering
+ information. It is used to get a CMap object for <code>sysFont</code>.
+ @param hasDW IN/OUT (Filled by the method) <code>true</code> if <code>sysFont</code> has
+ a valid <code>dw</code> value, <code>false</code> otherwise.
+ @param dw IN/OUT (Filled by the method) Default width for glyphs
+ in a CIDFont. Currently, always 1000. See Section 5.6 on
+ CIDFontType 0 in the <i>PDF Reference</i> for more information.
+
+ @param w IN/OUT (Filled by the method) A Cos array of a set of
+ lists that define the widths for the glyphs in the CIDFont.
+ Each list can specify individual widths for consecutive
+ CIDs, or one width for a range of CIDs. See Section 5.6.3
+ on character widths in CIDFonts in the <i>PDF Reference</i> for
+ information on the format of this array.
+ @param hasDW2 IN/OUT (Filled by the method) <code>true</code> if <code>sysFont</code> has
+ a valid <code>dw2</code> value. The default is <code>false</code>.
+ @param dw2 IN/OUT (Filled by the method) The default metrics for
+ writing mode <code>1</code>. This entry is an array of two ASInt32 numbers:
+ the y component of the position vector and the y component
+ of the displacement vector for writing mode <code>1</code>. The x component
+ of the position vector is always half the width of the character.
+ The x component of the displacement vector is always <code>0</code>.
+ The default value is <code>[880-1000]</code>. For information on writing
+ mode <code>1</code>, see Section 5.6.3 on vertical writing in the <i>PDF
+ Reference</i>.
+ @param w2 IN/OUT (Filled by the method) A Cos array defining the
+ metrics for vertical writing. Its format is similar to the
+ format of the array in w. It defines the x and y components
+ of the position vector, and the y component of the displacement
+ vector. The x component of the displacement vector is always
+ <code>0</code>. See Section 5.6.3 on character widths in CIDFonts in
+ the <i>PDF Reference</i> for information on the format of this
+ array.
+ @see PDSysFontGetWidths
+ @see PDSysFontGetWidthsEx
+ @see PDFontGetWidths
+
+ @note In general, you are discouraged from using this method.
+ Instead, use PDEFontCreateFromSysFontAndEncoding() followed
+ by PDEFontCreateWidthsNow() to create the W entry in a font.
+ @since PI_PDSYSFONT_VERSION >= 0x00040000
+
+*/
+UNPROC (void, PDSysFontGetType0Widths, (
+ IN PDSysFont sysFont,
+ IN ASAtom ordering,
+ OUT ASBool* hasDW,
+ OUT ASInt32* dw,
+ OUT CosObj* w,
+ OUT ASBool* hasDW2,
+ OUT ASInt32* dw2,
+ OUT CosObj* w2)
+ )
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageE.h
new file mode 100644
index 0000000..99e4432
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageE.h
@@ -0,0 +1,19 @@
+/* PageE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "PageEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageEASF.h
new file mode 100644
index 0000000..e9a3937
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PageEASF.h
@@ -0,0 +1,160 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(pageErrNoError, "No error.")
+
+DefineErr(pageErrTooFewOps, "Too few operands.")
+
+DefineErr(pageErrWrongOpType, "Wrong operand type.")
+
+DefineErr(pageErrOpTooLarge, "Operand too large.")
+
+DefineErr(pageErrBadContents, "The page contents object has the wrong type.")
+
+DefineErr(pageErrImageExpectedNumber, "Expected a number while parsing an image.")
+
+DefineErr(pageErrExpectedEndOfColor, "Expected end of color space.")
+
+DefineErr(pageErrExpectedHexOrASC85, "Expected AsciiHex or Ascii85 string.")
+
+DefineErr(pageErrErrorParsingImage, "There was an error while trying to parse an image.")
+
+DefineErr(pageErrBadTypeInXTextArray, "Bad object type within a text operator array.")
+
+DefineErr(pageErrUnexpectedOpInDisplay, "Found an unexpected operator in the display list.")
+
+DefineErr(pageErrInvalidGRestore, "Invalid restore.")
+
+DefineErr(pageErrFontNotSet, "Font has not been set.")
+
+DefineErr(pageErrTooFewPathOps, "Too few operands in path.")
+
+DefineErr(pageErrImageTooBig, "Image in Form, Type 3 font, or Pattern is too big.")
+
+DefineErr(pageErrParseContextError, "Error while parsing a Form, Type 3 font, or Pattern.")
+
+DefineErr(pageErrBadType3Font, "Invalid Type 3 font.")
+
+DefineErr(pageErrFontNotInResources, "A font is not in the Resources dictionary.")
+
+DefineErr(pageErrInvalidDash, "Dash arguments are invalid.")
+
+DefineErr(pageErrArrayLenWrong, "Array length is out of range.")
+
+DefineErr(pageErrNumberOutOfRange, "A number value is out of range.")
+
+DefineErr(pageErrColorOutOfRange, "A color value is out of range.")
+
+DefineErr(pageErrIllegalOpInTextOutline, "There is an illegal operator inside a text outline object.")
+
+DefineErr(pageErrWrongNumOpsInCurve, "A curve operator has the wrong number of operands.")
+
+DefineErr(pageErrSeveralParsingErrors, "There were several parsing errors on this page.")
+
+DefineErr(pageErrWrongOperand, "Wrong operand type - expected type '%s'.")
+
+DefineErr(pageErrFontNotInResDict, "Could not find a font in the Resources dictionary - using Helvetica instead.")
+
+DefineErr(pageErrXObjectNotFound, "Could not find the XObject named '%s'.")
+
+DefineErr(pageErrFormNotFound, "Could not find the Form named '%s'.")
+
+DefineErr(pageErrUnknownXObjectType, "Unknown XObject type '%s'.")
+
+DefineErr(pageErrReadLessImageData, "Insufficient data for an image.")
+
+DefineErr(pageErrUnrecognizedToken, "An unrecognized token '%s' was found.")
+
+DefineErr(pageErrTokenTypeNotRec, "Token type not recognized.")
+
+DefineErr(pageErrTooFewArgs, "There were too few arguments.")
+
+DefineErr(pageErrTooManyArgs, "There were too many arguments.")
+
+DefineErr(pageErrOperandTooLarge, "An operand is too large.")
+
+DefineErr(pageErrErrorReadingPage, "There was an error reading page %s near the contents: ")
+
+DefineErr(pageErrImageExpectedEI, "Expected 'EI' while parsing an image.")
+
+DefineErr(pageErrUnknownFilterName, "Unknown filter name.")
+
+DefineErr(pageErrBadDecodeArray, "Bad decode array.")
+
+DefineErr(pageErrIllegalOpInPath, "Illegal operation inside a path.")
+
+DefineErr(pageErrIllegalOpInTextObj, "Illegal operation '%s' inside a text object.")
+
+DefineErr(pageErrReadLessImageColor, "An indexed color table is too small.")
+
+DefineErr(pageErrWrongArgsForSetColor, "Wrong number of arguments for a setcolor operator.")
+
+DefineErr(pageErrUnknownColorSpace, "Unknown ColorSpace '%s'.")
+
+DefineErr(pageErrColorSpaceNotFound, "Could not find the ColorSpace named '%s'.")
+
+DefineErr(pageErrBadForm, "Invalid Form.")
+
+DefineErr(pageErrIllegalTextOp, "Illegal operation '%s' outside text object.")
+
+DefineErr(pageErrFormTypeNotAvailable, "Form type '%s' is not supported.")
+
+DefineErr(pageErrOBSOLETE, "")
+
+DefineErr(pageErrRecursiveMachine, "Internal error - machine called recursively.")
+
+DefineErr(pageErrInvalidImageMaskDepth, "An image is specified as an image mask with more than 1 bit per pixel.")
+
+DefineErr(pageErrBadPattern, "Invalid Pattern.")
+
+DefineErr(pageErrPatternTypeNotAvailable, "Pattern type '%s' is not supported.")
+
+DefineErr(pageErrPatternNotFound, "Could not find the Pattern named '%s'.")
+
+DefineErr(pageErrBadColorSpace, "Invalid ColorSpace.")
+
+DefineErr(pageErrMissingResource, "A resource is missing")
+
+DefineErr(pageErrMissingKey, "Dictionary is missing the key '%s'.")
+
+DefineErr(pageErrEGStateNotFound, "Could not find the Extended Graphics State named '%s'.")
+
+DefineErr(pageErrBadEGS, "Invalid Extended Graphics State.")
+
+DefineErr(pageErrBadFunction, "Invalid Function resource.")
+
+DefineErr(pageErrBadEPSColorSpace, "An image uses a color space which will not separate correctly in some applications.")
+
+DefineErr(pageErrBadShading, "Error in Shading dictionary.")
+
+DefineErr(pageErrBadMaskImage, "Error in Masked Image.")
+
+DefineErr(pageErrTooManyComps, "There were too many color components.")
+
+DefineErr(pageErrNotLevel3, "A feature requires PostScript 3.")
+
+DefineErr(pageErrBadAltXObject, "Invalid alternate image for the XObject named '%s'.")
+
+DefineErr(pageErrBadTGroup, "Invalid Transparency Group")
+
+DefineErr(pageErrBadSoftMask, "Invalid Soft Mask")
+
+DefineErr(pageErrBadHalftone, "Invalid Halftone")
+
+DefineErr(pageErrIllegalColorOp, "A color operator was used where it is not permitted.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PagePDECntCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PagePDECntCalls.h
new file mode 100644
index 0000000..d5728ba
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PagePDECntCalls.h
@@ -0,0 +1,200 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PagePDEContentCalls.h
+
+ - HFT and prototypes for Page PDEContent methods.
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_PAGEPDECONTENTCALLS
+#define _H_PAGEPDECONTENTCALLS
+
+#include "Environ.h"
+
+#if PLUGIN
+#include "acroassert.h"
+#endif
+#ifdef THREAD_SAFE_PDFL
+#include "PDFLInitCommon.h"
+#endif /* not defined THREAD_SAFE_PDFL */
+
+/* for Adobe use only */
+#define _PagePDEContentHFT_LATEST_VERSION 0x00060000
+#define _PagePDEContentHFT_LAST_BETA_COMPATIBLE_VERSION 0x00060000
+#define _PagePDEContentHFT_IS_BETA 0
+
+/* for public use */
+#define PagePDEContentHFT_LATEST_VERSION (_PagePDEContentHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _PagePDEContentHFT_LATEST_VERSION) : _PagePDEContentHFT_LATEST_VERSION)
+
+#define PagePDEContentHFT_VERSION_4 0x00040000
+#define PagePDEContentHFT_VERSION_5 0x00050000
+#define PagePDEContentHFT_VERSION_6 0x00060000
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "PEExpT.h"
+#include "PEVers.h"
+
+/* Prototypes for notification procs (mirrored in PagePDEContent.h) */
+typedef ACCBPROTO1 void (ACCBPROTO2 *PagePDEContentDidChangeNPROTO)(PDPage pdPage, PDEContent pagesPDEContent);
+
+typedef ACCBPROTO1 void (ACCBPROTO2 *PagePDEContentNotCachedNPROTO)(PDPage pdPage, PDEContent pagesPDEContent);
+
+#ifdef NPROC /* may be already defined */
+#undef NPROC
+#endif
+
+#if !PLUGIN
+ /* Static link */
+ #define NPROC(returnType, name, params) \
+ ACEX1 returnType ACEX2 name params;
+ #define UNPROC NPROC
+ #include "PgCntProcs.h"
+ #undef NPROC
+ #undef UNPROC
+#else
+ /* HFT version */
+ #include "PIRequir.h"
+
+ /* Enumerate the selectors */
+ #define NPROC(returnType, name, params) \
+ name##SEL,
+ #define UNPROC NPROC
+ enum {
+ PageContentServerBAD_SELECTOR,
+ #include "PgCntProcs.h"
+ PageContentServerNUMSELECTORSplusOne
+ };
+
+ #define PageContentServerNUMSELECTORS (PageContentServerNUMSELECTORSplusOne - 1)
+
+ /* Create the prototypes */
+ #undef NPROC
+ #undef UNPROC
+ #define NPROC(returnType, name, params) \
+ typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;
+#if READER_PLUGIN
+ #define UNPROC(returnType, name, params)
+#else
+ #define UNPROC NPROC
+#endif
+ #include "PgCntProcs.h"
+ #undef NPROC
+ #undef UNPROC
+
+#ifdef THREAD_SAFE_PDFL
+ #define gPagePDEContentHFT (GetHFTLocations()->pagePDEContentHFT)
+ #define gPagePDEContentVersion (GetHFTLocations()->pagePDEContentVersion)
+#else
+ extern HFT gPagePDEContentHFT;
+ extern ASUns32 gPagePDEContentVersion;
+#endif /* defined THREAD_SAFE_PDFL */
+
+ /* Define the macros */
+#if PI_PAGE_PDE_CONTENT_VERSION != 0
+ /* PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000 */
+ #define PDPageAcquirePDEContent (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageAcquirePDEContentSELPROTO)(gPagePDEContentHFT[PDPageAcquirePDEContentSEL])))
+ #define PDPageReleasePDEContent (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageReleasePDEContentSELPROTO)(gPagePDEContentHFT[PDPageReleasePDEContentSEL])))
+ #define PDPageSetPDEContent (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageSetPDEContentSELPROTO)(gPagePDEContentHFT[PDPageSetPDEContentSEL])))
+ #define PDPagePDEContentWasChanged (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPagePDEContentWasChangedSELPROTO)(gPagePDEContentHFT[PDPagePDEContentWasChangedSEL])))
+ #define PDPageRegisterForPDEContentChanged (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageRegisterForPDEContentChangedSELPROTO)(gPagePDEContentHFT[PDPageRegisterForPDEContentChangedSEL])))
+ #define PDPageUnRegisterForPDEContentChanged (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageUnRegisterForPDEContentChangedSELPROTO)(gPagePDEContentHFT[PDPageUnRegisterForPDEContentChangedSEL])))
+ #define PDPageRegisterForPDEContentNotCached (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageRegisterForPDEContentNotCachedSELPROTO)(gPagePDEContentHFT[PDPageRegisterForPDEContentNotCachedSEL])))
+ #define PDPageUnRegisterForPDEContentNotCached (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageUnRegisterForPDEContentNotCachedSELPROTO)(gPagePDEContentHFT[PDPageUnRegisterForPDEContentNotCachedSEL])))
+
+ #define PDPageGetPDEContentFlags (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageGetPDEContentFlagsSELPROTO)(gPagePDEContentHFT[PDPageGetPDEContentFlagsSEL])))
+ #define PDPageSetPDEContentFlags (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageSetPDEContentFlagsSELPROTO)(gPagePDEContentHFT[PDPageSetPDEContentFlagsSEL])))
+ #define PDPageGetPDEContentFilters (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageGetPDEContentFiltersSELPROTO)(gPagePDEContentHFT[PDPageGetPDEContentFiltersSEL])))
+ #define PDPageSetPDEContentFilters (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_4), *((PDPageSetPDEContentFiltersSELPROTO)(gPagePDEContentHFT[PDPageSetPDEContentFiltersSEL])))
+
+ /* PI_PAGE_PDE_CONTENT_VERSION >= 0x00050000 */
+ #define PDPageSuspendPDEContentChanged (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_5), *((PDPageSuspendPDEContentChangedSELPROTO)(gPagePDEContentHFT[PDPageSuspendPDEContentChangedSEL])))
+ #define PDPageResumePDEContentChanged (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_5), *((PDPageResumePDEContentChangedSELPROTO)(gPagePDEContentHFT[PDPageResumePDEContentChangedSEL])))
+ /* PI_PAGE_PDE_CONTENT_VERSION >= 0x00060000 */
+ #define PDPageSetPDEContentCanRaise (ACROASSERT(gPagePDEContentVersion >=PagePDEContentHFT_VERSION_6), *((PDPageSetPDEContentCanRaiseSELPROTO)(gPagePDEContentHFT[PDPageSetPDEContentCanRaiseSEL])))
+#endif /* PI_PAGE_PDE_CONTENT_VERSION != 0 */
+
+#endif /* PLUGIN */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_PAGEPDECONTENTCALLS */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PgCntProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PgCntProcs.h
new file mode 100644
index 0000000..6fe14ad
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PgCntProcs.h
@@ -0,0 +1,352 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PagePDEContentProcs.h
+
+ - Header for for PDF page content server methods.
+
+*********************************************************************/
+
+
+/**
+ Creates a PDEContent from the PDPage object's contents and resources.
+ The PDEContent is cached, so that subsequent calls on the
+ same PDPage return the same PDEContent, even if the request
+ is from another PDFEdit client. The PDEContent remains in
+ the cache as long as someone has it acquired - until someone
+ not using the PDFEdit API changes the PDPage object's contents,
+ such as the viewer rotating a page 90 degrees.
+
+ <p>Do not call PDERelease() on PDEContent you have acquired with
+ PDPageAcquirePDEContent(); call PDPageReleasePDEContent() to
+ release it. </p>
+
+ @param pdPage The page whose content object is acquired.
+
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @return A PDEContent representing the page's contents.
+ @see PDEContentCreateFromCosObj
+ @see PDPageReleasePDEContent
+ @see PDPageSetPDEContent
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+
+NPROC(PDEContent, PDPageAcquirePDEContent, (
+ IN PDPage pdPage, IN ASExtension self)
+ )
+
+/**
+ Decrements a PDPage object's PDEContent internal reference count.
+
+ <p>The PDEContent is not automatically deleted when the reference
+ count becomes zero: it remains in the cache until the cache
+ slot is needed for another PDPage. Thus, you do not need
+ to keep a PDEContent acquired for performance reasons. There
+ is a notification for which you can register that is sent when
+ a PDEContent is actually removed from the cache, thus enabling
+ the use of PDFEdit object's tagging methods PDEAddTag(), PDEGetTag(),
+ and PDERemoveTag() on the PDEContent object. </p>
+
+ @param pdPage The page whose content object's use count
+ is decremented.
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @return The updated reference count.
+ @see PDPageAcquirePDEContent
+ @see PDPageSetPDEContent
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(ASInt32, PDPageReleasePDEContent,(
+ IN PDPage pdPage, IN ASExtension self)
+ )
+
+/**
+ Sets the page's PDEContent back into the PDPage object's Cos object,
+ using the same compression filters with which the content
+ was previously encoded.
+
+ <p>In order to properly synchronize the page's contents after setting
+ them with PDPageSetPDEContent(), you must call PDPageNotifyContentsDidChange().
+ If you do not call PDPageNotifyContentsDidChange(), the page displayed will
+ use the old page contents.</p>
+
+ @param pdPage The page whose PDEContent is set.
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @return <code>true</code> if PDEContent successfully set, <code>false</code> otherwise.
+
+ @notify PDPageContentsDidChangeEx
+ @see PDEContentToCosObj
+ @see PDPageAcquirePDEContent
+ @see PDPageGetPDEContentFlags
+ @see PDPageNotifyContentsDidChange
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDPageSetPDEContent, (
+ IN PDPage pdPage, IN ASExtension self)
+ )
+
+/**
+ Indicates a page's PDEContent has changed.
+
+ <p>Call this after you alter a PDPage object's PDEContent but do not
+ call PDPageSetPDEContent(), so others who have acquired the
+ PDEContent know it has changed. </p>
+
+ @param pdPage The page whose content was changed.
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @notify PagePDEContentDidChange
+ @see PDPageSetPDEContent
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(void, PDPagePDEContentWasChanged, (
+ IN PDPage pdPage, IN ASExtension self)
+ )
+
+/**
+ Registers for the PagePDEContentDidChange() notification.
+
+ @param proc A callback for the function to call when an acquired
+ PDPage object's PDEContent has changed.
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @notify PagePDEContentDidChange
+ @see PDPageRegisterForPDEContentNotCached
+ @see PDPageUnRegisterForPDEContentChanged
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(void, PDPageRegisterForPDEContentChanged, (
+ IN PagePDEContentDidChangeNPROTO proc, IN ASExtension self)
+ )
+
+/**
+ Un-registers for the PagePDEContentDidChange() notification.
+
+ @param proc A callback for the function to call when an acquired
+ PDPage object's PDEContent has changed.
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @notify PagePDEContentDidChange
+ @see PDPageRegisterForPDEContentChanged
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(void, PDPageUnRegisterForPDEContentChanged, (
+ IN PagePDEContentDidChangeNPROTO proc, IN ASExtension self)
+ )
+
+/**
+ Register for the PagePDEContentNotCached() notification.
+
+ <p>This notification is also sent when others change (or delete)
+ a PDPage object's contents without using PDFEdit methods. For instance,
+ rotating or deleting a page in the viewer results in this
+ notification being sent. </p>
+
+ <p>PDFEdit registers for almost a half dozen different notifications
+ for the different ways Acrobat can alter page contents; you
+ may need only this notification. </p>
+
+ @param proc A callback for the function to call when an acquired
+ PDPage object's PDEContent is no longer valid.
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @notify PagePDEContentNotCached
+ @see PDPageRegisterForPDEContentChanged
+ @see PDPageUnRegisterForPDEContentNotCached
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(void, PDPageRegisterForPDEContentNotCached, (
+ IN PagePDEContentNotCachedNPROTO proc, IN ASExtension self)
+ )
+
+/**
+ Un-registers for the PagePDEContentNotCached() notification.
+
+ @param proc IN/OUT A callback for the function to call when an acquired
+ PDPage object's PDEContent is no longer valid.
+ @param self IN/OUT Identifies the caller/client. For plug-ins, this should be the gExtensionID extension.
+ For the Adobe PDF Library, if there is only one client of the PDFEdit
+ subsystem, <code>clientID</code> should be zero. If there are multiple
+ clients, each should specify a nonzero, non-negative <code>clientID</code>.
+ (A negative <code>clientID</code> is reserved for the implementation.)
+
+ @notify PagePDEContentNotCached
+ @see PDPageRegisterForPDEContentNotCached
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+
+*/
+NPROC(void, PDPageUnRegisterForPDEContentNotCached, (
+ IN PagePDEContentNotCachedNPROTO proc, IN ASExtension self)
+ )
+
+/**
+ Gets flags used by PDPageSetPDEContent().
+ @param pdPage The page whose content flags are obtained.
+
+ @param flags (Filled by the method) PDEContentToCosObjFlags flags.
+ @return <code>true</code> if flags obtained, <code>false</code> if the page's contents
+ are not cached.
+ @see PDPageSetPDEContent
+ @see PDPageSetPDEContentFlags
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDPageGetPDEContentFlags, (
+ IN PDPage pdPage, OUT ASUns32 *flags))
+
+/**
+ Sets flags used by PDPageSetPDEContent(). The flags are not
+ instantiated until PDPageSetPDEContent() is called.
+ @param pdPage The page whose content flags are set.
+ @param flags PDEContentToCosObjFlags flags. The following
+ flags are ignored, since the content is always a page:
+
+ <ul>
+ <li>kPDEContentToForm </li>
+ <li>kPDEContentToCharProc </li>
+ </ul>
+
+ @return <code>true</code> if <code>flags</code> were set, <code>false</code> if the page's contents
+ are not cached (meaning that nothing was done).
+ @see PDPageGetPDEContentFlags
+ @see PDPageSetPDEContent
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDPageSetPDEContentFlags, (
+ IN PDPage pdPage, IN ASUns32 flags))
+
+/**
+ Gets filters used by PDPageSetPDEContent().
+
+ <p>The caller is responsible for allocating the filter array
+ <code>filters</code> that receives the filters. <code>filters</code> can be <code>NULL</code> to
+ just obtain the number of filters. </p>
+
+ @param pdPage The page whose content filters are obtained.
+
+ @param numFilters (Filled by the method) The number of filters
+ used by PDPageSetPDEContent().
+ @param filters (Filled by the method) The filters used by
+ PDPageSetPDEContent(). If it is <code>NULL</code>, <code>numFilters</code> contains the number
+ of filters.
+ @return <code>true</code> if <code>filters</code> are obtained, <code>false</code> if the page's contents
+ are not cached.
+ @see PDPageSetPDEContent
+ @see PDPageSetPDEContentFilters
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDPageGetPDEContentFilters, (
+ IN PDPage pdPage, OUT ASInt32 *numFilters, OUT ASAtom **filters))
+
+/**
+ Sets the filters used by PDPageSetPDEContent(). The filters are
+ not instantiated until PDPageSetPDEContent() is called.
+ @param pdPage The page whose content filters are set.
+ @param numFilters The number of filters used by PDPageSetPDEContent().
+
+ @param filters An array of filters to use by PDPageSetPDEContent().
+
+ @return <code>true</code> if filters were set, <code>false</code> if the page's contents
+ are not cached (meaning that nothing was done).
+ @see PDPageGetPDEContentFilters
+ @see PDPageSetPDEContent
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00040000
+*/
+NPROC(ASBool, PDPageSetPDEContentFilters, (
+ IN PDPage pdPage, IN ASInt32 numFilters, IN ASAtom *filters))
+
+/**
+ Suspends destruction of PDEContent objects when a PagePDEContentDidChange()
+ notification occurs. Only use this API if you are about
+ to call PDPageNotifyContentsDidChange() and you do not want
+ PDFEdit to destroy all PDEContent objects associated with
+ that PDPage. This is used, for example, when AVAppSetPreference()
+ is called. Make sure to call PDPageSuspendPDEContentChanged()
+ on the PDPage object after you call PDPageNotifyContentsDidChange().
+
+ @param pdPage IN/OUT The page whose content is changed.
+ @see PDPageResumePDEContentChanged
+ @since PI_PDMODEL_VERSION >= 0x00050000
+
+*/
+NPROC(void, PDPageSuspendPDEContentChanged, (
+ IN PDPage pdPage))
+
+/**
+ Resumes destruction of PDEContent objects when a PDPageContentsDidChange()
+ notification occurs. Only use this API if you called PDPageSuspendPDEContentChanged().
+
+ @param pdPage IN/OUT The page whose content is changed.
+ @see PDPageSuspendPDEContentChanged
+ @since PI_PDMODEL_VERSION >= 0x00050000
+
+*/
+NPROC(void, PDPageResumePDEContentChanged, (
+ IN PDPage pdPage))
+
+/**
+ Sets the page's PDEContent back into the PDPage object's Cos object,
+ using the same compression filters with which the content
+ was previously encoded. This method calls PDPageNotifyContentsDidChangeEx().
+
+ <p>This method differs from PDPageSetPDEContent() in that it
+ returns no value, but does raise an exception if it is unable
+ to set the content. </p>
+
+ @param pdPage The page whose PDEContent is set.
+ @param self Identifies the caller or client. For plug-ins,
+ this should be the gExtensionID extension. For the Adobe
+ PDF Library, if there is only one client of the PDFEdit
+ subsystem, this should be zero. If there are multiple clients,
+ each should specify a nonzero, non-negative value. (A negative
+ value is reserved for the implementation.)
+ @notify PDPageContentsDidChangeEx
+ @see PDEContentToCosObj
+ @see PDPageAcquirePDEContent
+ @see PDPageGetPDEContentFlags
+ @see PDPageSetPDEContent
+ @since PI_PAGE_PDE_CONTENT_VERSION >= 0x00060000
+*/
+UNPROC(void, PDPageSetPDEContentCanRaise, (
+ IN PDPage pdPage, IN ASExtension self)
+ )
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Plugin.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Plugin.h
new file mode 100644
index 0000000..bd72b99
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Plugin.h
@@ -0,0 +1,26 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ Plugin.h
+
+ - PRODUCT file for plugin product configuration
+
+*********************************************************************/
+
+#ifndef _H_Plugin
+#define _H_Plugin
+
+#define PLUGIN 1
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFT.h
new file mode 100644
index 0000000..ecca632
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFT.h
@@ -0,0 +1,2154 @@
+/*************************************************************************
+ * PubSecHFT.h
+ *
+ * Copyright (c) 2000-2006 Adobe Systems Inc. All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains the
+ * property of Adobe Systems Incorporated and its suppliers, if any.
+ * The intellectual and technical concepts contained herein are
+ * proprietary to Adobe Systems Incorporated and its suppliers and may
+ * be covered by U.S. and Foreign Patents, patents in process, and are
+ * protected by trade secret or copyright law. Adobe permits you to
+ * use, modify, and distribute this file in accordance with the terms
+ * of the Adobe license agreement accompanying it. If you have
+ * received this file from a source other than Adobe, then your use,
+ * modification, or distribution of it requires the prior written
+ * permission of Adobe.
+ *
+ * Description:
+ *
+ * Public key security interface for Acrobat public-key security
+ * handlers. Handlers can register as PubSec handlers to provide
+ * crypto services for private key signing, for signature validation,
+ * as a crypto source for decrypting using private keys, and as a
+ * directory source.
+ *
+ * Handlers can also call back into the PubSecHFT for various
+ * services, including a signature appearance handler and a trusted
+ * address book.
+ *
+ * Update History: (most recent first)
+ * 30-Mar-2003 -- Acrobat 6.0 SDK cleanup
+ * 13-Dec-2002 -- Acrobat 6.0 beta cleanup
+ * 18-Oct-2002 -- Added Confidentiality notice
+ * 11-Aug-2002 -- Added FDF data exchange import/export calls
+ * 02-Aug-2002 -- Added new notification API for AAB, removed old API
+ * 10-Mar-2002 -- Added routines to support CosDoc and generic signature API
+ * 11-Jan-2001 -- Wrote hftbuild perl script to autogenerate portions of this file
+ * 09-Jan-2001 -- Created for Acrobat 6.0
+ ************************************************************************/
+
+#ifndef PUBSECHFT_H
+#define PUBSECHFT_H
+
+#include "CosExpT.h"
+#include "PDExpT.h"
+#include "ASExpT.h" /* Required for ASText */
+#include "DigSigHFT.h"
+#include "DirectoryHFT.h"
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/************************************************************************************
+ * PubSecHFT globals
+ ***********************************************************************************/
+/* ---- Global typedefs, consts, and enums ---- */
+#define PUBSEC_HFT_NAME "PubSecHFT"
+#define PUBSEC_HFT_LATEST_VERSION (0x00010000) //Not currently in use
+
+extern HFT gPubSecHFT;
+
+/************************************************************************************
+ * PubSecHFT - Enumerations and structure declarations
+ ***********************************************************************************/
+
+/** The maximum size of the binary signature blob in bytes.
+ @note This translates to <code>SIG_MAX_SIZE * 2 + 2</code> in the file, as it is hex-encoded
+ currently <code>(* 2)</code> and the delimiters at the two end <code>(+2)</code>.
+ */
+/* This was based on the maximum size of a CosString, but there is no maximum after Acrobat 6 */
+#define PS_SIG_MAX_SIZE 2097152 // Bug 2266569 leave even more room for CRLs
+
+
+/**
+ A PubSec engine object. There can be multiple engine objects per handler.
+ @see PSCloseEncryptedDocs
+ @see PSCountEncryptedDocs
+*/
+typedef void* PubSecEngine;
+
+/**
+ A signature appearance file object to be used by handlers to access the built-in APIcon
+ appearance handler.
+ @see DSAPFileAcquire
+*/
+typedef struct CAPIconFile *DSAPFile;
+
+/** Operations for which a PubSec session can be acquired. */
+typedef enum {
+ /** None */
+ kPSOpTypeNone=0,
+ /** Sign a PDDoc to create a PDDoc signature. */
+ kPSOpTypePDDocSign,
+ /** Validate a PDDoc signature. */
+ kPSOpTypePDDocSigValidate,
+ /** Sign a CosDoc. */
+ kPSOpTypeCosDocSign,
+ /** Validate a CosDoc signature. */
+ kPSOpTypeCosDocSigValidate,
+ /** Sign bytes. */
+ kPSOpTypeDataSign,
+ /** Validate bytes. */
+ kPSOpTypeDataSigValidate,
+ /** Read and export My Contact information. */
+ kPSOpTypeMyContactExport,
+ /** Import contacts into address book. */
+ kPSOpTypeContactImport,
+ /** Modify credential access policy (used by EScript). */
+ kPSOpTypePolicyModify,
+ /** Read an appearance file (used by EScript). */
+ kPSOpTypeAPRead,
+ /** Prepare to encrypt documents. */
+ kPSOpTypePDCryptDocCreate,
+ /** Prepare to open encrypted documents. */
+ kPSOpTypePDCryptDocOpen,
+ /** Authenticate or login user (used by EScript). */
+ kPSOpTypeLogin,
+ /** De-authenticate or logout user (used by EScript). */
+ kPSOpTypeLogout,
+ /** Enumerate certificates available for signing and encryption. */
+ kPSOpTypeCertEnum,
+ /** Enumerate directories and get directory information. */
+ kPSOpTypeDirEnum,
+ /** Connect to and use a directory. */
+ kPSOpTypeDirGet,
+ /* Enumerate credential stores. */
+ kPSOpTypeStoreEnum
+} PSSessionOpType;
+
+/** A signature type to use for generating a signature appearance.
+ @see PSSigCreateAPNXObjProc
+ */
+typedef enum {
+ /** Signing a prexisting signature field. */
+ kPSAPSigPreExists=0,
+ /** Creating a signature, on the fly, on a page. */
+ kPSAPSigTentative,
+ /** Creating a preview of a signature. */
+ kPSAPSigPreview
+} PSAPSigType;
+
+
+/************************************************************************************
+ * Enumerations and structures used for signing and validation
+ ***********************************************************************************/
+
+/** A buffer of data to be hashed when signing or verifying signatures. The buffer contains the
+ bytes to be signed (by ByteRange) when signing a PDF file.
+ @see PSDataBufferDigest
+ @see PSDataBufferEnum
+*/
+typedef struct _s_PSDataBufferRec PSDataBufferRec, *PSDataBuffer;
+
+/** Types of PDDoc signatures. */
+typedef enum {
+ /** */
+ kPSSigTypeUnknown=0,
+ /** An ordinary signature. */
+ kPSSigTypeUser,
+ /** An ordinary signature, plus an MDP object signature. */
+ kPSSigTypeAuthor,
+ /** An Adobe Reader rights-enabling object signature. */
+ kPSSigTypeUbiquity,
+ /** */
+ kPSSigTypeEnumSize
+} PSSigType;
+
+/** The type of document being signed.
+ @see PSSigPDDocParams
+ @see PSSigSigPropParams
+ @see PSSigValidateDialogParams
+*/
+typedef enum {
+ /** */
+ kPSSigDocTypeNone=0,
+ /** A PDF document. */
+ kPSSigDocTypePDDoc,
+ /** An FDF file. */
+ kPSSigDocTypeCosDoc,
+ /** Transactional data (for example, XFA). */
+ kPSSigDocTypeTransData,
+ /** */
+ kPSSigDocTypeEnumSize
+} PSSigDocType;
+
+/** A constant value that indicates the file type and environment in which data is being signed,
+ used to set up buttons and text in the signing dialog.
+ @see PSSigSigPropParams
+*/
+typedef enum {
+ /** Uninitialized. */
+ kPSFileNone=0,
+ /** Normal PDDoc signing. Enable the Save and SaveAs buttons. */
+ kPSFileAVDoc,
+ /** External browser window. Enable the Sign button. */
+ kPSFileBrowserDoc,
+ /** External non-browser window. Enable the Sign button. */
+ kPSFileExternalDoc,
+ /** Temp file. Enable the SaveAs button. */
+ kPSFileTempDoc,
+ /** Signing an FDF Data Exchange file. Enable the Sign button. */
+ kPSFileFDFData,
+ /** Signing a CosDoc. Enable the Sign button. */
+ kPSFileCosDoc,
+ /** Signing transactional data. */
+ kPSFileTransData,
+ /** */
+ kPSFileEnumSize
+} PSSigFileType;
+
+/** Constants that specify the method to use for creating a signature. For details, see the <i>PDF
+ Reference</i>.
+ @see PSSigGetSigValueParams
+ @see PSSigGetSigValueProc
+*/
+typedef enum {
+ /** None */
+ kPSSigMethodNone=0,
+ /** <code>PKCS#1</code>, <code>adbe.x509.rsa.sha1</code> */
+ kPSSigMethodPKCS1,
+ /** <code>adbe.pkcs7.detached</code> */
+ kPSSigMethodPKCS7Detached,
+ /** <code>adbe.pkcs7.sha1</code> */
+ kPSSigMethodPKCS7SHA1,
+ /** */
+ kPSSigMethodEnumSize
+} PSSigMethod;
+
+/** Dialog information, returned from GetSigProperties() and other
+ calls to tell PubSec what flow of subsequent dialogs or actions to
+ execute. Not all values are legal for all procs. */
+typedef enum {
+ /** No further dialogs are required. */
+ kPSSigDialogNone=0,
+ /** PubSec's sign dialog box should be executed. */
+ kPSSigDialogSign,
+ /** PubSec's sign dialog box should be executed, and should ask for a password. */
+ kPSSigDialogSignWithPassword,
+ /** PubSec's sign dialog box should be executed, then SigAuthenticate() should be called. */
+ kPSSigDialogSignThenAuthenticate,
+ /** The size of the PSSigDialogStatus enum. */
+ kPSSigDialogStatusEnumSize
+} PSSigDialogStatus;
+
+// Enum of whether signature validation is supported
+/** Constant values indicating how a handler supports validation for a particular signature. */
+typedef enum {
+ /** The handler does not support validation of this signature. */
+ kPSSigValSupportFalse,
+ /** The handler supports validation of this signature. */
+ kPSSigValSupportTrue,
+ /** A handler software update is needed to support validation of this signature. */
+ kPSSigValSupportUpdate,
+ /** The signature was created with a pre-release or invalid release of the software. The user is warned. */
+ kPSSigValSupportPreRelease,
+ /** The size of the PSSigValSupport enum. */
+ kPSSigValSupportEnumSize
+} PSSigValSupport;
+
+/** A structure containing parameters and return values for
+ PSSigGetSigPropertiesProc().
+ @see SigGetSigPropertiesProc
+*/
+typedef struct _t_PSSigSigPropParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (Constant) The PDDoc being signed. If a PDDoc is not being signed,
+ this is only used for window parenting and can be <code>NULL</code>.
+ */
+ PDDoc pdDoc;
+ /** (Constant) The file type and signing environment, which the
+ handler uses to display appropriate save buttons.
+ */
+ PSSigFileType fileOptions;
+ /** (Constant) When it is <code>true</code>, the call is being made from the user interface;
+ when it is <code>false</code> it is being made from a script or batch file.
+ */
+ ASBool bUI;
+ /** The title to use for the signing dialog, if <code>bUI</code> is <code>true</code>. It is usually
+ <code>NULL</code>, which allows the handler to use the default.
+ */
+ ASText dialogTitle;
+ /** (Constant) It represents the parameters passed in by EScript converted to an
+ ASCab, or <code>NULL</code> if the call is not from EScript.
+ */
+ ASCab sigParamsCab;
+ /** If you are not providing your own sign dialog, set this value to
+ DSSignSave.
+
+ <p>If you are providing your own sign dialog, return the result of your
+ sign dialog. Setting the value to DSignCancel cancels the
+ signing operation.</p>
+ */
+ DSSaveType outSaveOptions;
+ /** Return status information that tells PubSec what dialogs to
+ display and how to authenticate the handler.
+
+ <p>The legal return values are:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPSSigDialogNone</TD><TD>The handler provides its own sign dialog.</TD></TR>
+ <TR><TD>kPSSigDialogSign</TD><TD>PubSec provides a sign dialog.</TD></TR>
+ <TR><TD>kPSSigDialogSignWithPassword</TD><TD>PubSec provides a sign dialog box with a password.</TD></TR>
+ <TR><TD>kPSSigDialogSignThenAuthenticate</TD><TD>PubSec provides a sign dialog, then afterwards calls the handler to allow the handler to authenticate the user.</TD></TR>
+ </TABLE>
+ */
+ PSSigDialogStatus outDialogStatus;
+ /** (Required) Return an ASCab containing an ordered certificate chain, signing certificate first (at key <code>0</code>). */
+ ASCab outCertListCab;
+ /** (Required) Populate this existing ASCab with signature
+ properties that will be written to the signature dictionary
+ when the signature is committed.
+ */
+ ASCab outNewSigPropCab;
+ /** (Optional) Populate this existing ASCab with return build
+ properties that will be written to the signature dictionary
+ when the signature is committed.
+ */
+ ASCab outNewSigBuildCab;
+ /** (Constant) The type of document being signed. */
+ PSSigDocType docType;
+ /** A structure containing signature parameters appropriate to
+ the type of document. Depending on <code>sigType</code>, it is a structure
+ of type PSSigPDDocParams, PSSigCosDocParams, or
+ PSSigDataBufferParams.
+ */
+ void* docParams;
+ /** (Constant) A specification for SignatureValue. See the <i>PDF Reference</i> for details. */
+ PSSigMethod sigMethod;
+ /** (Constant) A method used to create a digest. */
+ DSDigestMethod digestMethod;
+
+ /**
+ Additions for Acrobat 7.
+ */
+ /** The type of the signature being created
+ */
+ PSSigType inSigType;
+
+} PSSigSigPropParamsRec, *PSSigSigPropParams;
+
+/** A structure containing parameters and return values for PSSigGetSigValueProc(). */
+typedef struct _t_PSSigGetSigValueParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (Constant) The method used to create the signature value. */
+ PSSigMethod sigMethod;
+ /** (Constant) The method used to create the digest. */
+ DSDigestMethod digestMethod;
+ /** (Constant) A digest value to be signed, or <code>NULL</code>. */
+ const ASUns8* digestValue;
+ /** The handle to use for fetching bytes to digest. */
+ PSDataBuffer dataBuffer;
+ /** (Constant) If <code>true</code>, get a signature value,
+ otherwise return the size of the signature
+ value.
+ */
+ ASBool bGetSigValue;
+ /** Return the signature value data. The caller will call
+ ASfree() to destroy the structure.
+ */
+ ASUns8* outSigValueData;
+ /** The return size of <code>SignatureValue</code>. */
+ ASUns32 outSigValueSize;
+ /** Return an ASCab containing signature
+ properties that should be displayed instead of
+ signature dictionary entries.
+ */
+ ASCab outSigPropCab;
+} PSSigGetSigValueParamsRec, *PSSigGetSigValueParams;
+
+/** A structure containing signature parameters for PSSigValidateSupportedProc().
+ @see PSSigValidateSupportedProc */
+typedef struct _t_PSSigValidateSupportParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (Constant) The value of the /Filter attribute for the signature. */
+ ASAtom filter;
+ /** (Constant) The value of the /SubFilter attribute for the signature. */
+ ASAtom subFilter;
+ /** (Constant) The value of the /V attribute for the signature. */
+ ASInt32 version;
+ /** (Constant) The value of the /R attribute for the signature. */
+ ASInt32 revision;
+ /** (Constant) The handler's build properties dictionary, as an ASCab. */
+ ASCab buildCab;
+} PSSigValidateSupportParamsRec, *PSSigValidateSupportParams;
+
+/** A structure containing parameters and return values for PSSigValidateProc().
+ @see PSSigValidateProc */
+typedef struct _t_PSSigValidateParamsRecRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (Constant) The method used to create the
+ signature value. */
+ PSSigMethod sigMethod;
+ /** (Constant) The method used to create the
+ digest. */
+ DSDigestMethod digestMethod;
+ /** (Constant) A digest value to be signed, or <code>NULL</code>. */
+ ASUns8* digestValue;
+ /** (Constant) A signature value to be verified. */
+ ASUns8* sigValueData;
+ /** (Constant) The size of the signature value. */
+ ASUns32 sigValueSize;
+ /** (In and out)
+ <p>For a PKCS#1 signature, PubSec fills in the certificate chain.</p>
+ <p>For a PKCS#7 signature, PubSec returns an empty ASCab.</p>
+ <p> For both signature types, the handler must provide the certificate chain that was validated.</p>
+ */
+ ASCab certListCab;
+ /** Informs the handler whether revocation
+ checks are required. Handlers should always
+ do revocation checks, but return failure only
+ when this value is <code>true</code>.
+ */
+ ASBool reqRevokeChecks;
+ /** The maximum lifetime (in minutes) of the
+ cached information that is used for revocation
+ checking. This is relevant for some types of
+ revocation checking (such as CRL-based revocation checking) and
+ not for others (such as OCSP).
+ */
+ ASInt32 maxRevokeInfoCacheLifetime;
+ /** Returns an ASCab containing the validity of
+ the signature. It must not be <code>NULL</code>.
+ The handler must set the values for
+ PROP_SigVal_Id and
+ PROP_SigVal_TrustFlags, and can
+ optionally set PROP_SigVal_IdPriv and/or
+ PROP_SigVal_IDPrivTextValidity. The
+ handler should also set the value of
+ PROP_SigVal_Digest, if it is not already
+ set. All other values should be left unmodified,
+ since they will not be preserved by PubSec.
+ */
+ ASCab sigValCab;
+ /** Returns signature properties to display instead
+ of signature dictionary entries.
+ */
+ ASCab outSigPropCab;
+ /** The handle to use for fetching bytes to digest. */
+ PSDataBuffer dataBuffer;
+
+ /*
+ Additions for Acrobat 7.
+ */
+ /** PubSec provides the time that it thinks signing occured.
+ */
+ ASTimeRec *inSignTime;
+ /** The type of signature being validated.
+ */
+ PSSigType inSigType;
+ /** Cos document to which signature belongs */
+ CosDoc cosDoc;
+} PSSigValidateParamsRec, *PSSigValidateParams;
+
+/** A structure containing parameters and return values for PSSigValidateDialogProc().
+ @see PSSigValidateDialogProc
+ @see PSSigPropDialogProc
+*/
+typedef struct _t_PSSigValidateDialogParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (In and out)
+ <p>For a PKCS#1 signature, PubSec fills in the certificate chain.</p>
+ <p>For a PKCS#7 signature, PubSec returns an empty ASCab.</p>
+ <p> For both signature types, the handler must provide the certificate chain that was validated.</p>
+ */
+ ASCab certListCab;
+ /** Informs the handler whether revocation
+ checks are required. Handlers should always
+ do revocation checks, but return failure only
+ when this value is <code>true</code>.
+ */
+ ASBool reqRevokeChecks;
+ /** The maximum lifetime (in minutes) of the
+ cached information that is used for revocation
+ checking. This is relevant for some types of
+ revocation checking (such as CRL-based revocation checking) and
+ not for others (such as OCSP).
+ */
+ ASInt32 maxRevokeInfoCacheLifetime;
+ /** An ASCab containing the validity of the
+ signature. It is never <code>NULL</code>.
+ The handler can validate the signature and
+ update this object if desired.
+ */
+ ASCab sigValCab;
+ /** Indicates whether it is being called when a modal
+ parent dialog box is open. If it is <code>true</code>, rollback and
+ verify buttons should be disabled because:
+ <ul>
+ <li>Rollback is not possible while the modal parent is open.</li>
+ <li>The verify status may not be propagated properly to various caching locations. </li>
+ </ul>
+ */
+ ASBool bModalParent;
+ /** Returns a value that tells PubSec whether to
+ roll back the signature or show a properties
+ dialog box for the signature.
+ */
+ DSPropertyType dsPropType;
+ /** (Constant) The type of document being signed. */
+ PSSigDocType docType;
+ /** A structure containing signature parameters
+ appropriate to the type of document.
+ Depending on <code>sigType</code>, it is a structure of type
+ PSSigPDDocParams or
+ PSSigCosDocParams.
+ */
+ void* docParams;
+ ASCab sigPropCab;
+ ASCab sigDictCab;
+} PSSigValidateDialogParamsRec, *PSSigValidateDialogParams;
+
+/** Validation parameters for validating a document signature or specific signature field.
+ @see PSSigValidatePDDocSigField
+ @see PSSigGetSigPropertiesProc
+ @see PSSigCreateAPNXObjProc
+ @see PSSigSigPropParams
+*/
+typedef struct _t_PSSigPDDocParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (Constant) It is always kPSSigDocTypePDDoc. */
+ PSSigDocType sigType;
+ /** (Constant) The document being signed. */
+ PDDoc pdDoc;
+ /** (Constant) The field being signed. */
+ CosObj sigField;
+ /** (Constant) The annotation associated with this field. */
+ CosObj sigAnnot;
+ /** (Constant) The width of the annotion, if the signature is visible. */
+ ASFixed annotWidth;
+ /** (Constant) The height of the annotion, if the signature is visible. */
+ ASFixed annotHeight;
+ /** Returns handler-specific appearance information for
+ PSSigGetSigPropertiesProc(). */
+ ASCab sigAPCab;
+} PSSigPDDocParamsRec, *PSSigPDDocParams;
+
+/** Signature parameters for a CosDoc. It is used internally.
+ @see PSSigGetSigPropertiesProc
+ @see PSSigSigPropParams */
+typedef struct _t_PSSigCosDocParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (Constant) Always kPSSigDocTypeCosDoc. */
+ PSSigDocType sigType;
+ /** (Constant) <code>NULL</code> if there is no parent. */
+ PDDoc pdDoc;
+ /** (Constant) The document being signed. */
+ CosDoc cosDoc;
+ /* (Constant) The signature dictionary. */
+/* CosObj sigDict; */
+} PSSigCosDocParamsRec, *PSSigCosDocParams;
+
+/** Signature parameters for signing transitional data, such as XFA.
+ @see PSSigGetSigPropertiesProc
+ @see PSSigSigPropParams
+*/
+typedef struct _t_PSSigDataBufferParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** (Constant) Always kPSSigDocTypeTransData. */
+ PSSigDocType sigType;
+ /** (Constant) <code>NULL</code> if there is no parent. */
+ PDDoc pdDoc;
+ /** (Constant) The document being signed. */
+ CosDoc cosDoc;
+ /* const */
+/* CosObj sigDict; */
+} PSSigDataBufferParamsRec, *PSSigDataBufferParams;
+
+/** Reasons why opening a CMS envelope could be requested */
+typedef enum {
+ kPSDecryptionReasonUnspecified = 0,
+ /** Decrypting a document. */
+ kPSDecryptingDocument,
+ /** Decrypting a file attachment. */
+ kPSDecryptingAttachment,
+ /** Obtaining access to an encrypted batch command. */
+ kPSDecryptingBatchCommand
+} PSDecryptionReason;
+
+/** Parameters that are used when opening a CMS envelope. */
+typedef struct _t_PSOpenCMSEnvelopeParamsRec {
+ /** The size of this structure. */
+ ASSize_t size;
+
+ /** (Constant) The ASN1 encoded PKCS#7 Enveloped
+ Data to open. */
+ const ASUns8* cmsEnvelopeData;
+ /** The size in bytes of the data pointed to by
+ <code>cmsEnvelopeData</code>. */
+ ASUns32 cmsEnvelopeSize;
+
+ /** Returns the envelope contents data. PubSec
+ owns, allocates and frees the memory. */
+ ASUns8* outEnvelopeContentsData;
+ /** The size in bytes of the data pointed to by
+ <code>cmsEnvelopeContentsData</code>. */
+ ASUns32 outEnvelopeContentsSize;
+
+ /** (Optional) Returns the session key recovered
+ when opening the envelope. If a session key is
+ returned by the handler, PubSec uses it to open
+ other recipient groups and enable the user to
+ edit them.
+*/
+ ASUns8* outSessionKeyData;
+ /** The size in bytes of the data pointed to by
+ <code>outSessionKeyData</code>. */
+ ASUns32 outSessionKeySize;
+
+ /** (Optional) The certificate corresponding to the
+ private key used to open the envelope. When it is
+ provided, PubSec displays the name of the
+ opener when the user edits the recipient list.
+ */
+ ASCab outCertificates;
+
+ /** The reason why the opening of a CMS envelope is requested. */
+ PSDecryptionReason inReason;
+
+} PSOpenCMSEnvelopeParamsRec, *PSOpenCMSEnvelopeParams;
+
+typedef struct _t_PSSigSignReportParamsRec
+{
+ /** The size of this structure. */
+ ASSize_t size;
+ /** Signature properties of the signature we would like to report on. */
+ ASCab sigPropCab;
+} PSSigSignReportParamsRec, *PSSigSignReportParams;
+
+
+
+/*************************************************************************
+ * Validity Cab public properties and property values. This Cab is
+ * populated by PubSec and its handlers when validating signatures. It
+ * contains the validity state of the signature, and is cached by
+ * PubSec so that validity information is immediately available to
+ * javascript calls and UI. Handlers can populate the ASCab with
+ * additional custom values as required. PubSec takes care of most of these values.
+ * The PubSec handler must set PROP_SigVal_Id and may set PROP_SigVal_IdPriv.
+ * The PubSec handler must set PROP_SigVal_Digest with the result of the
+ * digest comparison: this occurs when comparing the signed digest
+ * to the passed-in digest, or when calculating a byte range digest.
+ * The PubSec handler also must set PROP_SigVal_TrustFlags, though
+ * these values may be 'tested' by PubSec.
+ * PubSec will update the ASCab itself, just after signing,
+ * to set the state to 'just signed' (kDSSigValJustSigned).
+ ************************************************************************/
+
+/* Public Validity Cab entries. Engines can add their own private
+ entries, but must do so using their own namespace
+ (e.g. "Acme:Identity") to prevent future name clashes. */
+#define PROP_SigVal_DS "ds" /* value is ASInt32(DSValidState), state returned through DigSigHFT */
+#define PROP_SigVal_Digest "digest" /* value is ASInt32(DSSigValState), handler digest result, indicates if signature digest is valid */
+#define PROP_SigVal_Doc "doc" /* value is ASInt32(DSSigValState), byte range digest result */
+#define PROP_SigVal_Obj "obj" /* value is ASInt32(DSSigValState), object signature results, used by author sigs and ordinary sigs when MDP+ is used */
+#define PROP_SigVal_Id "id" /* value is ASInt32(DSValidState), Indicates whether identity is valid */
+#define PROP_SigVal_IdPriv "idPriv" /* value is handler-specific ASInt32. Indicates identity validity. */
+#define PROP_SigVal_IdPrivText "idPrivText" /* Language-independent, machine readible version of PROP_SigVal_IdPriv (eg. 'kIdUnknown') */
+#define PROP_SigVal_AuthSig "authSig" /* value is ASInt32(DSSigValState), indicates the status of the author sig for this document */
+#define PROP_SigVal_Mod "mod" /* value is ASBool, <code>true</code> if doc has been modified after this sig was applied */
+#define PROP_SigVal_Author "auth" /* value is ASBool, <code>true</code> if this signature is an author signature */
+#define PROP_SigVal_Ubiquity "ubiquity" /* value is ASBool, <code>true</code> if this signature is an ubiquity signature. This if for Adobe's internal user only*/
+#define PROP_SigVal_Data "data" /* value is ASBool, <code>true</code> if this signature is an data signature */
+#define PROP_SigVal_FDF "fdf" /* value is ASBool, <code>true</code> if this signature is an FDF signature */
+#define PROP_SigVal_TrustFlags "trustFlags" /* value is ASInt32(PSSigTrust), stores the actions that the signer is trusted for */
+
+/** The types of text requested by PSSigValGetTextProc() for a signature-validity ASCab
+ object. The strings are generated by the handler, usually on the fly, when requested. A
+ handler can cache the values in the <code>sigVal</code> ASCab (Acrobat plug-ins do not do this).
+ PubSec copies values for DSTop, DSDetail, DSDetails and DSTooltip to the
+ signature-propeties ASCab.
+
+ <p>For optional entries, returning <code>NULL</code> causes PubSec to generate the values.
+ Depending on the context, one of the <code>*IdValidity</code> entries is required to specify the
+ signer identity validity.</p>
+
+*/
+typedef enum {
+ /** Never called. It should return <code>NULL</code>. */
+ kDSSigValTextNull,
+ /* (Optional) Get text to show in the AVPanel,
+ added to the end of signature summary line. */
+ kDSSigValTextDSTop,
+ /** (Optional) Get text to show in the AVPanel,
+ shown in the signature detail title line. */
+ kDSSigValTextDSDetail,
+ /** (Optional) Get text to show in the tooltip when
+ the mouse is over the signature annotation. */
+ kDSSigValTextDSTooltip,
+ /** (Optional) Get text to show in the EScript
+ SignatureInfo object. */
+ kDSSigValTextSigInfo,
+ /** (Optional) Get text to show in the validate alert
+ dialog. */
+ kDSSigValTextVal,
+ /** (Optional) Get text to show in the signature
+ properties dialog. */
+ kDSSigValTextProp,
+ /** (Optional) Get text to show in the appearance, if
+ the signature appearance uses layer n4 (not
+ recommended). In this case, you must also
+ pass an index. */
+ kDSSigValTextAP,
+ /* Get text to describe the validity of the signer
+ certificate (used in properties and validity
+ dialogs). */
+ kDSSigValTextPropIdValidity,
+ /** Get text to describe the validity of the signer
+ certificate (used in AVPanel). */
+ kDSSigValTextDSAVIdValidity,
+ /** Get text to describe the validity of the signer
+ certificate (appended to the tooltip, and called only
+ when describing why the certificate is invalid). */
+ kDSSigValTextDSTTIdValidity,
+ /** */
+ kDSSigValTextEnumSize
+} DSSigValText;
+
+/** Bit flag constants that specify a level of trust for a certificate.
+ @see AABGetTrustedCerts
+ @see PSImportDataParams
+*/
+typedef ASInt32 PSSigTrust;
+/** The certificate is untrusted.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustUntrusted 0x0000
+/** Trusted for signing (creating recipient signatures).
+ @note Starting with Acrobat 7, this flag can no longer be (un)set by the user. This
+ flag is always set internally .
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustSigning 0x0001
+
+/** Trusted for authoring documents (creating author signatures).
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustAuthenticDocuments 0x0002
+
+/** Trusted for authoring documents with dyamic (multimedia) content.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustDynamicContent 0x0004
+
+/** Trusted for feature-enabling signatures (Adobe internal use only).
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustUbiquity 0x0008
+
+/** Trusted for authoring documents with full access JavaScript.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustJavaScript 0x0010
+
+/** Trusted for identity: it must be present to use in trust calculations.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustIdentity 0x0020
+
+/** Trusted as an anchor: no checks are done for certificates above this certificate.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustAnchor 0x0040
+
+/** Trusted for by-passing Crossdomain check.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustCrossDomain 0x0080
+
+/** Trusted for accessing external resources/Streams.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustExternalStream 0x0100
+
+/** Trusted for silent printing.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustSilentPrint 0x0200
+
+/** Trusted for Connecting to Web.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustWebLink 0x0400
+
+/** Trusted for Forms data injection.
+@ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustDataInjection 0x0800
+
+/** Trusted for Forms Script injection.
+@ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustScriptInjection 0x1000
+
+/** Trusted for everything.
+ @ingroup BitFlagConstantsCertTrust
+*/
+#define kPSSigTrustAll 0x0000FFFF
+
+/*************************************************************************
+ * Import and Export data
+ ************************************************************************/
+
+/** The format of data to be imported using PSImportDataProc().
+ The operation is only executed if the corresponding property (PROP_ImportContact or
+ PROP_ImportDirSettings) is set, which indicates that the handler supports this
+ format. If PROP_ImportContact is set, both of the corresponding formats must be
+ supported. */
+typedef enum {
+ /** None. No import operation is performed. */
+ kPSImportDataNone=0,
+ /** An ASCab containing a list (<code><code>"0", "1", ...</code></code>) of
+ contact cabs. Contact cabs have the entries
+ PROP_ContactCab_*. */
+ kPSImportDataContactsCab,
+ /** An ASCab containing a list (<code>"0", "1", ...</code>)
+ containing a single contact cab. This Contact
+ cab will have only the
+ PROP_ContactCab_Certs entry set.
+ This is sent only when trusting the signer of a
+ signature. */
+ kPSImportDataContactsCabFromSig,
+ /** An ASCab containing a list (<code>"0", "1", ...</code>) of directory
+ setting cabs, which have the entries
+ <code>PROP_DirSettingCab_*</code>. */
+ kPSImportDataDirsCab,
+ /** The size of the PSImportDataType. */
+ kPSImportDataEnumSize
+} PSImportDataType;
+
+/** Parameters for importing data from a file into PubSec; it is used in PSImportDataProc().
+ @see PSImportDataProc */
+typedef struct _t_PSImportDataParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** The format of the data to be imported. */
+ PSImportDataType dataType;
+ /** If <code>dataType</code> is kPSImportDataSigDict, it is the signature dictionary.
+ If <code>dataType</code> is kPSImportDataFDFImportArray, it is the import array.
+ If <code>dataType</code> is kPSImportDataFDFDirArray, it is the directory settings array.
+ */
+ ASCab dataCab;
+ /** A flag that indicates whether this data comes from a trusted source. */
+ PSSigTrust sigTrust;
+} PSImportDataParamsRec, *PSImportDataParams;
+
+/** The format of data to be exported using PSExportDataProc() or
+ PSExportDataExchange().
+ @see PSExportDataProc
+ @see PSExportDataExchange
+*/
+typedef enum {
+ /** None. No export operation is performed. */
+ kPSExportDataNone=0,
+ /** Export certificates for self.
+ This operation is performed only if the
+ PROP_PSENG_ExportContact property is
+ set, indicating that the handler supports this
+ format.
+ */
+ kPSExportDataMyContact,
+ /* Export a list of entries from an address book.
+ This operation is performed only if the
+ PROP_PSENG_ExportContact property is
+ set, indicating that the handler supports this
+ format.
+ */
+ kPSExportDataContacts,
+ /** Export a list of directory settings.
+ This operation is performed only if the
+ PROP_PSENG_ExportDirSettings
+ property is set, indicating that the handler
+ supports this format.
+ */
+ kPSExportDataDirSettings,
+ /** The enum size. */
+ kPSExportDataEnumSize
+} PSExportDataType;
+
+/** File output options for PSExportDataExchangeParams().
+ @see PSExportDataProc
+ @see PSExportDataExchange
+*/
+typedef enum {
+ /** None. Prompt for the output file type. This is recommended. */
+ kPSExportDestNone=0,
+ /** Save as an unspecified file type, possibly prompting for the file type. */
+ kPSExportDestFile,
+ /** Save as a CMS file (.p7c). */
+ kPSExportDestCMSFile,
+ /** Save as a Certificate file (.cer). */
+ kPSExportDestCertFile,
+ /** Save as an FDF file. */
+ kPSExportDestFDFFile,
+ /** Email an FDF file. */
+ kPSExportDestEMailFDF,
+ /** Send a single certificate to the URL. */
+ kPSExportDestCertURL,
+ /** */
+ kPSExportDestEnumSize
+} PSExportDestType;
+
+
+/*************************************************************************
+ * Engine Public Properties
+ * The properties listed here are public and common to all engines.
+ * An engine is free to define its own additional properties.
+ * Many of these property names are also used by EScript or as ASCab keys,
+ * which is why (char*) is used for the keys.
+ ************************************************************************/
+
+/* Common engine ASText properties */
+#define PROP_PSENG_Exception "exception" /* Exception string if return code is kDSException */
+#define PROP_PSENG_ProfilePath "loginPath" /* Used by JavaScript to get path to DigitalID file */
+#define PROP_PSENG_CN "loginName" /* Used by JavaScript to get active signing credential */
+#define PROP_PSENG_HandlerUIName "uiName" /* Language dependent name */
+#define PROP_PSENG_Text_HandlerVersion "version" /* Engine version as text*/
+#define PROP_PSENG_Appearances "appearances"
+#define PROP_PSENG_Directories "directories" /* list of directories for this pubsec handler */
+#define PROP_PSENG_DirectoryHandlers "directoryHandlers" /* list of directory handlers for this pubsec handler */
+#define PROP_PSENG_BuildDate "buildDate" /* Build date/time for handler */
+
+/* Common engine ASBool properties */
+#define PROP_PSENG_PDSignVisible "signVisible" /* If true then can create signatures with visible on-page appearances */
+#define PROP_PSENG_PDSignInvisible "signInvisible" /* If true then can create signatures that do not have a signature appearance */
+#define PROP_PSENG_PDSignAuthor "signAuthor" /* If true then can create author sigs, that include MDP */
+#define PROP_PSENG_PDSignValidate "signValidate" /* If true then can validate signatures */
+#define PROP_PSENG_CosSign "signFDF" /* If true then can sign CosDocs */
+#define PROP_PSENG_CosValidate "validateFDF" /* If true then can validate CosDoc signatures */
+#define PROP_PSENG_PDEncrypt "docEncrypt"
+#define PROP_PSENG_PDDecrypt "docDecrypt"
+#define PROP_PSENG_IsLoggedOn "isLoggedIn" /* Do we have a persitent contect? Does not indicate if authentication required. */
+#define PROP_PSENG_PDSignCustomAP "signCustomAP" /* set to <code>true</code> if you want to do your own signature appearances */
+#define PROP_PSENG_UserInterface "userInterface" /* Can operate with UI (not just an escript engine) */
+#define PROP_PSENG_ImportContact "importContact" /* Must be true if PSImportDataProc and kPSImportDataSigDict or kPSImportDataFDFImportArray are supported */
+#define PROP_PSENG_ImportDirSettings "importDirSettings" /* Must be true if PSImportDataProc and kPSImportDataFDFDirArray are supported */
+#define PROP_PSENG_ExportContact "exportContact" /* Must be true if PSExportDataProc and kPSExportDataMyContact are supported */
+#define PROP_PSENG_ExportDirSettings "exportDirSettings" /* Must be true if PSExportDataProc and kPSExportDataDirSettings are supported */
+
+/** Return <code>true</code> if the handler is capable of signing and verifying PKCS#1 signatures.
+ The handler is then required to support <code>adbe.x509.rsa_sha1</code> signatures. */
+#define PROP_PSENG_SignFormatPKCS1 "signPKCS1"
+/** Return <code>true</code> if the handler is capable of signing and verifying PKCS#7 signatures.
+ The handler is then required to support both <code>adbe.pkcs7.sha1</code> and <code>adbe.pkcs7.detached</code> formats. */
+#define PROP_PSENG_SignFormatPKCS7 "signPKCS7"
+/** Return <code>true</code> if the handler must do its own digesting when signing and verifying <code>adbe.x509.rsa_sha1</code>
+ signatures (the handler cannot directly sign the digest). */
+#define PROP_PSENG_SignFormatPKCS1Digest "signPKCS1Digest"
+/** Return <code>true</code> if the handler must do its own digesting when signing and verifying <code>adbe.pkcs7.detached</code>
+ signatures (the handler cannot directly sign the digest). */
+#define PROP_PSENG_SignFormatPKCS7DetachedDigest "signPKCS7DetachedDigest"
+
+/** Return <code>true</code> if the handler is capable of hashing using SHA256.
+ @note New in Acrobat 8. In previous versions it was always assumed that the handler could
+ handle MD5 and SHA1 (the only hashing algorithms supported at that time). Hence, if the hashing
+ algorithms are MD5 and SHA1, it is assumed that the handlers can handle those, and they are not queried.
+ The handler can use the function PSDataBufferDigest(), if they want PubSec to hash the data. */
+#define PROP_PSENG_HashAlgoSHA256 "hashSHA256"
+/** Return <code>true</code> if the handler is capable of hashing using SHA384. */
+#define PROP_PSENG_HashAlgoSHA384 "hashSHA384"
+/** Return <code>true</code> if the handler is capable of hashing using SHA152. */
+#define PROP_PSENG_HashAlgoSHA512 "hashSHA512"
+/** Return <code>true</code> if the handler is capable of hashing using RIPEMD160.*/
+#define PROP_PSENG_HashAlgoRIPEMD160 "hashRIPEMD160"
+
+
+/** Return an ASInt32 indicating the number of appearances the handler has.
+ This is used for JavaScript. */
+#define PROP_PSENG_ASInt32_AppearanceNum "appearances"
+/** Return an ASInt32 indicating the number of directories the handler has.
+ This is used for JavaScript. */
+#define PROP_PSENG_ASInt32_DirectoryNum "directories"
+/** Return the version of this plug-in. The handler should be careful about setting this value
+ in relation to the build dictionary that is created. If a handler ever needs to revoke
+ signatures that are created with a version of software that has errors, and the PreRelease
+ flag in the build dictionary is not set, then the handler will probably need to use the
+ value of this number. */
+#define PROP_PSENG_ASInt32_HandlerVersion "version"
+
+/** The name by which this handler is to be registered with DigSigHFT.
+*/
+#define PROP_PSENG_ASAtom_DigSigHandlerName "DigSigHandlerName"
+/** The alias of the handler registered with DigSigHFT
+ (primarily used for backward compatibility, where the handler has changed its name over time).
+*/
+#define PROP_PSENG_ASAtom_DigSigHandlerAlias "DigSigHandlerAlias"
+
+/** The name by which this handler is to be registered with PubSecHFT (usually the same name as DigSig).
+*/
+#define PROP_PSENG_ASAtom_PubSecHandlerName "PubSecHandlerName"
+/** The alias of the handler registered with PubSecHFT.
+*/
+#define PROP_PSENG_ASAtom_PubSecHandlerAlias "PubSecHandlerAlias"
+
+/** The preferred signing format to use, specifing the value of the SubFilter. It is overridden by SeedValue and SigInfo. */
+#define PROP_PSENG_ASAtom_DefaultSubFilter "SubFilter"
+
+/*************************************************************************
+ * PSPerformOperation parameters
+ * Currently called only from EScript.
+ * The PubSec plug-in interprets relevant calls and dispatches
+ * then to handlers for the operation to be performed.
+ ************************************************************************/
+
+/** The type of operation to be performed by PSPerformOperationProc(). The PubSec
+ plug-in interprets relevant calls and dispatches them to handlers for the operation to be
+ performed.
+ @see PSPerformOperationProc
+*/
+typedef enum {
+ /** None */
+ kPSOpPerformNone=0,
+ /** Silent scripted operation. Access/select the file/store containing digital IDs. */
+ kPSOpPerformESLogin,
+ /** Silent scripted operation. Deaccess the file/store containing digital IDs. */
+ kPSOpPerformESLogout,
+ /** Silent scripted operation. Create a new self-sign digital ID. */
+ kPSOpPerformESNewUser,
+ /** Silent scripted operation. Deprecated. */
+ kPSOpPerformESSetValidateMethod,
+ /** Silent scripted operation. Set the password timeout policy. */
+ kPSOpPerformESPasswordTimeout,
+ /** Brings up a user interface to display a list of
+ certificates contained in an ASCab.
+ It returns <code>true</code> if it is implemented by the
+ handler.
+ */
+ kPSOpPerformDisplayCertList,
+ /** Returns a list of certificates in an ASCab. */
+ kPSOpPerformGetCerts,
+ /** Returns a list of credential stores. */
+ kPSOpPerformGetStores,
+ kPSOpPerformEnumSize
+} PSPerformOpType;
+
+/*************************************************************************
+ * APPreviewRec - parameter to DSAPFileEditNthEntry
+ ************************************************************************/
+
+/** Data with which to build a signature preview in the
+ edit dialog box for a signature appearance file entry.
+*/
+typedef struct _t_APPreviewRec {
+ /** The logo string. */
+ const char* logo;
+ /** The bounding box for the logo string. */
+ ASFixedRect* logoBBox;
+ /** The entry name. */
+ ASText fName;
+ /** The distinguished name. */
+ ASText fDN;
+ /** The reason for signing. */
+ ASText fReason;
+ /** The location of the signature. */
+ ASText fLocation;
+ /** The width that determines the aspect ratio of the preview image. */
+ ASFixed fWidth;
+ /** The height that determines the aspect ratio of the preview image. */
+ ASFixed fHeight;
+ /** <code>true</code> if this is an author signature, <code>false</code> otherwise. */
+ bool fbAuthSig;
+} APPreviewRec, *APPreview;
+
+/*************************************************************************
+ * Parameters to EScript and cabs
+ ************************************************************************/
+
+/* EScript ESRDN object public properties */
+#define PROP_ESRDN_CN "cn"
+#define PROP_ESRDN_O "o"
+#define PROP_ESRDN_OU "ou"
+#define PROP_ESRDN_C "c"
+#define PROP_ESRDN_E "e"
+// The following are new for Acrobat 8
+#define PROP_ESRDN_NAME "name"
+#define PROP_ESRDN_SURNAME "sn"
+#define PROP_ESRDN_GIVENNAME "givenName"
+#define PROP_ESRDN_INITIALS "initials"
+#define PROP_ESRDN_GENQUALIFIER "generationQualifier"
+#define PROP_ESRDN_DNQUALIFIER "dnQualifier"
+#define PROP_ESRDN_LOCALITY "l"
+#define PROP_ESRDN_STATE "st"
+#define PROP_ESRDN_TITLE "title"
+#define PROP_ESRDN_SERIALNUM "serialNumber"
+#define PROP_ESRDN_DC "dc"
+#define PROP_ESRDN_PSEUDONYM "pseudonym"
+#define PROP_ESRDN_BIZCATEGORY "businessCategory"
+#define PROP_ESRDN_STREET "street"
+#define PROP_ESRDN_POSTALCODE "postalCode"
+#define PROP_ESRDN_POSTALADDR "postalAddress"
+#define PROP_ESRDN_DOB "dateOfBirth"
+#define PROP_ESRDN_POB "placeOfBirth"
+#define PROP_ESRDN_GENDER "gender"
+#define PROP_ESRDN_CITIZENSHIP "countryOfCitizenship"
+#define PROP_ESRDN_RESIDENCE "countryOfResidence"
+#define PROP_ESRDN_NAMEATBIRTH "nameAtBirth"
+
+
+/* EScript ESCPS object public properties */
+#define PROP_ESCPS_OID "oid"
+#define PROP_ESCPS_URL "url"
+#define PROP_ESCPS_NOTICE "notice"
+
+/* EScript Security object public method parameters (also passed to PSPerformOperation) */
+#define PARAM_ESSecurity_Password "cPassword" /* This is a string */
+#define PARAM_ESSecurity_DIPath "cDIPath" /* This is an ASPathName */
+#define PARAM_ESSecurity_PFX "cPFX" /* Instead of a Path to a PFX, the entire PFX can be put here */
+#define PARAM_ESSecurity_RDN "oRDN" /* If true then acquiring with new user fields */
+#define PARAM_ESSecurity_CPS "oCPS" /* Generic object containing CPS info to be
+ added to the Self signed certificate */
+#define PARAM_ESSecurity_Timeout "iTimeout" /* An ASInt32 */
+#define PARAM_ESSecurity_DigestSHA1 "cDigestSHA1" /* SHA-1 digest of certificate */
+#define PARAM_ESSecurity_Message "cMsg" /* Message to display in login dialog */
+#define PARAM_ESSecurity_Method "cMethod" /* An ASInt32 */
+#define PARAM_ESSecurity_Params "oParams" /* */
+#define PARAM_ESSecurity_Select "oSelect" /* Select Digital ID */
+#define PARAM_ESSecurity_Type "cType" /* Type of data, operation, etc */
+#define PARAM_ESSecurity_Cert "oCert" /* Certificate Object */
+#define PARAM_ESSecurity_Object "oObject" /* Object of unspecified type */
+#define PARAM_ESSecurity_EndUserSignCert "oEndUserSignCert" /* Cert that is selected to use when signing */
+#define PARAM_ESSecurity_EndUserCryptCert "oEndUserCryptCert" /* Cert that is selected to use when encrypting */
+#define PARAM_ESSecurity_Certs "certs" /* Returned array of certificates */
+#define PARAM_ESSecurity_Stores "stores" /* Stores where the above credentials are stored */
+#define PARAM_ESSecurity_URI "cURI" /* String - URI for APS connection */
+#define PARAM_ESSecurity_UserId "cUserId" /* String - User id for APS authentication */
+#define PARAM_ESSecurity_Domain "cDomain" /* String - Domain name for APS authentication */
+
+/* EScript Security object public method parameters specific to importSettings method */
+#define PARAM_ESSecurity_Document "oDocObj" /* Object containing a PDDoc document */
+#define PARAM_ESSecurity_Filename "cFilename" /* UCString - the filename for an attached embedded file */
+#define PARAM_ESSecurity_SimplifiedUI "bSimplifiedUI" /* Boolean - if true and applicable use a simplified UI */
+
+#define PROP_Op_Certificates "certificates" /* r */
+#define PROP_Op_ContactInfo "contactInfo"
+
+/** Signature properties that are written to the signature dictionary.
+ These property names exactly match the corresponding signature dictionary names.
+ These are used in <code>PSSigSigPropParamsRec.outNewSigPropCab</code>.
+ Handlers can specify custom signature properties. These should be named using
+ the format <code>ACME_Prop_MyProperty</code>, where <code>ACME</code> is the abbreviated company name. */
+#define PROP_SigProp_Name "Name"
+#define PROP_SigProp_Reason "Reason"
+#define PROP_SigProp_Location "Location"
+#define PROP_SigProp_ContactInfo "ContactInfo"
+#define PROP_SigProp_Date "M"
+#define PROP_SigProp_Filter "Filter" /* Handler can override value put in /Filter */
+#define PROP_SigProp_AuthType "Prop_AuthType"
+#define PROP_SigProp_AuthTime "Prop_AuthTime"
+#define PROP_SigProp_MDP "Prop_MDP"
+
+#define PROP_SigProp_PDFMinorVersion "PDFMinorVersion" /* PDF minor version */
+
+/** Signature properties that are written to the build dictionary.
+ These property names exactly match the corresponding build dictionary names.
+ These are used in PSSigSigPropParamsRec.outNewSigBuildCab
+ Handlers can specify custom sig properties. These should be named using
+ format <code>ACME_MyProperty</code>, where <code>ACME</code> is the abbreviated company name. */
+/** Signature dictionary formatting version number, for specific/private use by the handler.
+ The handler may use this to determine whether the handler supports verification of this signature.
+ Set it to <code>0</code> if it is unused. */
+#define PROP_SigBuild_V "V"
+/** Indicates if the signature was created by pre-release software. Its default value is <code>false</code>. */
+#define PROP_SigBuild_PreRelease "PreRelease"
+
+/* Common engine APCab properties */
+#define PROP_APCab_Type "type"
+#define PROP_APCab_Name "text"
+#define PROP_APCab_Index "index"
+
+/* Value (char*) of PROP_APCab_Type when using DSAPIcon APHandler */
+#define VALUE_APCab_TypeDSAPIcon "apIcon"
+
+/* Preference settings? */
+#define PROP_Reasons "reasons" // this is an array when in a cab
+#define PROP_More "more"
+#define PROP_Left "left"
+#define PROP_Top "top"
+#define PROP_APIndex "apIndex"
+
+/************************************************************************************
+ * Directory Handler - Declarations
+ ***********************************************************************************/
+
+/** Directory Service Provider (DSP) Object. As of Acrobat 6.0 this is a
+ PubSecEngine object that acts as a DSP. In future releases this may
+ become a stand-alone structure. */
+typedef void* DirDSP;
+
+ /** A directory information list ASCab contains a vector of nested DirectoryInfo ASCab objects,
+ one for every directory contained within the engine. Each directory ASCab contains a user interface
+ name as an ASText and a unique ID as an ASAtom.
+ @see PSGetDirList
+ */
+typedef ASCab DirectoryList;
+
+/** A directory handler information ASCab contains a vector of nested ASCab objects, one for every
+ directory handler contained within the engine. Each directory handler ASCab contains a user interface
+ name and a unique ID (for example, <code>"Adobe.PPKMS.LDAP"</code>).
+ @see PSGetDirHandlerInfo
+*/
+typedef ASCab DirHandlerInfo;
+
+/* DirHandlerInfo object properties */
+/** (Required) The user interface name for the handler. */
+#define PROP_DirHandlerInfo_Name "name" /* ASText, required. UI friendly name for the handler */
+/** (Required) A unique identifier for the
+ directory handler. The handler is
+ rejected if the ASAtom conflicts with
+ one already registered.
+*/
+#define PROP_DirHandlerInfo_ID "id" /* Unique ASAtom identifying the directory handler. Example is Adobe.PPKMS.LDAP. Required */
+
+/** An ASCab object containing authentication details such as the user name and password. It
+ could be used to override the default authentication entries, or to avoid repeated
+ authentications in case the context could be cached. The actual contents depend on the
+ directory handlers. The currently supported directory handlers (AAB and LDAP) do not
+ support this feature.
+ @see PSOpenConnection
+*/
+typedef ASCab DirAuthenticationContext;
+
+
+/*************************************************************************
+ * PubSecHFT Procedure Declarations
+ ************************************************************************/
+
+/** Create a new public key security engine for this handler.
+ This engine would not be associated with any user interface.
+ @see PSDestroyEngineProc
+*/
+typedef ACCBPROTO1 PubSecEngine (ACCBPROTO2 *PSNewEngineProc) ( );
+
+/** Destroys a public key security engine for this handler, freeing the memory.
+ @param engine The engine to be destroyed.
+ @see PSNewEngineProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PSDestroyEngineProc)
+ ( PubSecEngine engine );
+
+/** Gets an ASBool property of an engine. For a list of public properties of a
+ PubSecEngine, see PubSecHFT.h.
+ @param engine The engine for which the property value is obtained.
+ @param szPropertyName The name of the ASBool property whose value is obtained.
+ @param defaultValue The value to return if the property value is not set.
+ @return The boolean property value, or the specified default value if the property value is not set.
+ @see PSGetAtomPropertyProc
+ @see PSGetInt32PropertyProc
+ @see PSGetTextPropertyProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *PSGetBoolPropertyProc)
+ ( PubSecEngine engine, const char* szPropertyName, const ASBool defaultValue );
+
+/** Gets an ASAtom property of an engine. For a list of public properties of a
+ PubSecEngine, see PubSecHFT.h.
+ @param engine The engine for which the property value is obtained.
+ @param szPropertyName The name of the ASAtom property whose value is obtained.
+ @return The ASAtom property value, or ASAtomNull if the property value is not set.
+ @see PSGetBoolPropertyProc
+ @see PSGetInt32PropertyProc
+ @see PSGetTextPropertyProc
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *PSGetAtomPropertyProc)
+ ( PubSecEngine engine, const char* szPropertyName );
+
+/** Gets an ASInt32 property of an engine. For a list of public properties of a
+ PubSecEngine, see PubSecHFT.h.
+ @param engine The engine for which the property value is obtained.
+ @param szPropertyName The name of the ASInt32 property whose value is obtained.
+ @param defaultValue The value to return if the property value is not set.
+ @return The ASInt32 property value, or the specified default value if the property value is not set.
+ @see PSGetAtomPropertyProc
+ @see PSGetBoolPropertyProc
+ @see PSGetTextPropertyProc
+*/
+typedef ACCBPROTO1 ASInt32 (ACCBPROTO2 *PSGetInt32PropertyProc)
+ ( PubSecEngine engine, const char* szPropertyName, const ASInt32 defaultValue );
+
+/** Gets an ASText property of an engine. For a list of public properties of a
+ PubSecEngine, see PubSecHFT.h.
+
+ <p>For the PROP_PSENG_Exception property, <code>index</code> is a DSRetCode value. If a handler
+ receives a a call to get PROP_PSENG_Exception, it must reset its exception status so
+ that subsequent calls to get an exception string return <code>NULL</code>.
+ <code>NULL</code> return values are legal for all properties.</p>
+
+ @param engine The engine for which the property value is obtained.
+ @param szPropertyName The name of the ASText property whose value is obtained.
+ @param index The index of the string to obtain if the property contains a list of values. If it does not, <code>index</code> is ignored.
+ @return The ASText property value, or <code>NULL</code> if the property value is not set.
+ @see PSGetAtomPropertyProc
+ @see PSGetBoolPropertyProc
+ @see PSGetInt32PropertyProc
+*/
+typedef ACCBPROTO1 ASText (ACCBPROTO2 *PSGetTextPropertyProc)
+ ( PubSecEngine engine, const char* szPropertyName, const ASInt32 index );
+
+
+/** Called to acquire resources that will be needed to begin a PubSec session. For example, it
+ might need to log on before performing a desired operation. If resources are already
+ available, the handler may not need to do anything.
+ When the function completes successfully, PubSec calls PSSessionReleaseProc() with
+ the same operation type. Multiple calls can be made to acquire the same or different
+ operation types, before a previously acquired resource is released. Handlers should keep a
+ reference count if required for a particular resource.
+
+ <p>Despite the name, this function does not acquire a session; it just acquires the resources that will be
+ needed by the session. For example, to begin a signing session, PubSec calls
+ PSSessionAcquire() with kPSOpTypePDDocSign. The PubSec handler should select
+ the resources and credentials that are to be used for signing. If the call is successful,
+ PubSec will proceed with the PSSigGetSigPropertiesProc() and PSSigGetSigValueProc() calls.</p>
+
+ @param engine The engine for which the information is obtained.
+ @param pdDoc The PDF document for which the session is acquired.
+ @param opType The operation that is the reason for acquiring the session.
+ @param opText A human-readable version of the reason for acquiring the session. If it is
+ not supplied, <code>opType</code> is used to build text.
+ @param cabParams An ASCab object containing information about the acquisition,
+ owned by PubSec. It is currently not used, and is passed as <code>NULL</code>.
+ @param bUIAllowed When it is <code>true</code>, the call can invoke the user-interface dialogs if needed.
+ @return A positive value on success.
+ @see PSSessionReadyProc
+ @see PSSessionReleaseProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSessionAcquireProc)
+ ( PubSecEngine engine, PDDoc pdDoc, PSSessionOpType opType, ASText opText, ASCab cabParams, ASBool bUIAllowed );
+
+/** Releases any resources that were required for the specified operation, such as file handles.
+ It is up to a handler to decide what resources to release. A handler can, for example, leave a
+ user logged on, even after a session is released.
+ This call can fail. For example, you might want the call to fail if the operation is
+ kPSOpTypeEScriptLogin and encrypted documents are open.
+ @param engine The engine for which the session was acquired.
+ @param opType The operation for which the session was needed.
+ @return kDSTrue if the session is successfully released, kDSFalse otherwise.
+ @see PSSessionAcquireProc
+ @see PSSessionReadyProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSessionReleaseProc)
+ ( PubSecEngine engine, PSSessionOpType opType );
+
+/** Returns kDSTrue if the resources and information needed to perform the specified
+ operation have been acquired.
+ @param engine The engine for which the information is obtained.
+ @param opType The operation for which the session is needed.
+ @return kDSTrue if the session is ready, kDSFalse otherwise.
+ @see PSSessionAcquireProc
+ @see PSSessionReleaseProc
+ */
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSessionReadyProc)
+ ( PubSecEngine engine, PSSessionOpType opType );
+
+/** Performs the specified operation using parameters contained in cab. This interface is used
+ by EScript.
+ @param engine The engine for which the operation is performed.
+ @param type The type of operation to perform.
+ @param cab An ASCab containing parameters for the requested operation, or <code>NULL</code> to test whether the operation is supported.
+ @param bUI When it is <code>true</code>, the call can invoke the user interface dialogs if necessary.
+ @return If cab is <code>NULL</code>, returns kDSTrue if the operation is supported, kDSFalse if it is not.
+ If cab contains data, it returns kDSOk if the operation is successful, an exception code if it is not.
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSPerformOperationProc)
+ ( PubSecEngine engine, PSPerformOpType type, const ASCab cab, ASBool bUI );
+
+
+/** Called when creating a new signature. For PDDoc signatures, this call replaces SigNew()
+and SigCommit() calls. It returns the values that PubSec writes into the signature dictionary
+in the parameters structure.
+Before making this call, the handler should use PSSessionAcquireProc() to choose the
+credential to be used for signing.
+The handler can use the user interface during this call to allow authentication and to bring up the
+signing dialog.
+ @param engine The engine for which signature properties are retrieved.
+ @param params A signature properties parameters structure.
+ @return kDSOk if successful, otherwise an exception code is returned.
+ @see PSGetLogoProc
+ @see PSSessionAcquireProc
+ @see PSSigValGetAPLabelProc
+ @see PSSigGetSigValueProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSigGetSigPropertiesProc)
+ ( PubSecEngine engine, PSSigSigPropParams params );
+
+/**
+ Called to authenticate the signer. The caller can determine
+ whether authentication is required by calling PSGetBoolPropertyProc()
+ with the property PROP_PSENG_IsAuthenticated.
+
+ <p>This procedure is called only if specified by the PSSigSigPropParams
+ passed to PSSigGetSigPropertiesProc(). If your handler does
+ not need this call, it should be defined to always return
+ kDSTrue. </p>
+ @param engine The engine for which signature authentication
+ is performed.
+ @param pdDoc A PDF document for window parenting. It is <code>NULL</code>
+ if there is no PDDoc.
+ @param inESParams (Optional) An ASCab containing authentication
+ parameters. If it is not supplied or if authentication fails,
+ and if <code>bInUIAllowed</code> is <code>true</code>, it brings up the authentication
+ user interface to obtain parameters.
+ @param bInUIAllowed When it is <code>true</code>, the call can invoke the
+ authentication user interface.
+ @return kDSTrue if authentication succeeds, kDSFalse if authentication
+ fails.
+ @see PSGetBoolPropertyProc
+ @see PSSigGetSigValueProc
+ @see PSSigValidateProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSigAuthenticateProc)
+ ( PubSecEngine engine, const PDDoc pdDoc, ASCab inESParams, ASBool bInUIAllowed );
+
+/**
+ Called to sign the digest and return the signature value.
+ The memory for the signature value becomes the property
+ of the caller.
+
+ <p>When it is called for a PKCS #7 signature, there is a <i>size-only</i>
+ option: if the value of <code>pOutSigValueData</code> in the <code>inOutParams</code>
+ structure is <code>NULL</code>, it returns the expected size of the signature
+ value. </p>
+
+ <p>For most values of <code>digestMethod</code> in the <code>inOutParams</code> structure,
+ the digest is passed into the handler, and the handler needs
+ to sign it. However if a handler specifies that it must
+ do its own digest (for example, for the legacy EntrustFile
+ toolkit) then a <code>NULL</code> digest is passed in. The handler can
+ specify this using PROP_PSENG_SignFormatPKCS7Digest. If
+ this property is <code>true</code>, the digest is not passed
+ to the handler. </p>
+
+ <p>This procedure should not show any user interface and should not
+ allow a user to cancel the signing operation. </p>
+
+ @param engine The engine for which a signature value is
+ created.
+ @param inOutParams (Modified by the method) A structure containing
+ signature-value parameters and return values.
+ @return kDSOk if successful, otherwise an exception code is returned.
+ @see PSSigAuthenticateProc
+ @see PSSigGetSigPropertiesProc
+ @see PSSigValidateProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSigGetSigValueProc)
+ ( PubSecEngine engine, PSSigGetSigValueParams inOutParams );
+
+/**
+ Called to determine whether the handler can validate a signature.
+
+ @param engine The engine for which the signature is validated.
+
+ @param params A parameters structure containing information
+ about the signature to be validated.
+ @return A signature-validation support value.
+ @see PSSigAuthenticateProc
+ @see PSSigGetSigValueProc
+ @see PSSigValidateDialogProc
+ @see PSSigValidateProc
+*/
+typedef ACCBPROTO1 PSSigValSupport (ACCBPROTO2 *PSSigValidateSupportedProc)
+ ( PubSecEngine engine, PSSigValidateSupportParams params );
+
+/**
+ Called to validate a signature.
+ @param engine The engine for which the signature is validated.
+
+ @param params (Modified by the method) A structure containing signature validation
+ parameters and return values. The result of validation
+ is stored in the <code>sigValCab</code> field.
+ @return kDSOk if successful, otherwise an exception code is returned.
+ @see PSSigAuthenticateProc
+ @see PSSigGetSigValueProc
+ @see PSSigValidateDialogProc
+ @see PSSigValidateSupportedProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSigValidateProc)
+ ( PubSecEngine engine, PSSigValidateParams params );
+
+/**
+ Called to show a dialog box that shows validation status after
+ the signature is validated.
+
+ <p>If this procedure is <code>NULL</code> (which is recommended), PubSec
+ opens its own validation dialog. </p>
+
+ @param engine The engine for which the validation status
+ is shown.
+ @param valParams A validation dialog box parameters structure.
+ The validation state resulting from the previous validation
+ operation is passed in the <code>sigValCab</code> field. The handler
+ can update the <code>dsPropType</code> field if the properties dialog box
+ should be opened next.
+ @return kDSOk if successful, otherwise an exception code is returned.
+ @see PSSigAuthenticateProc
+ @see PSSigGetSigValueProc
+ @see PSSigPropDialogProc
+ @see PSSigValidateProc
+ @see PSSigValidateSupportedProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSigValidateDialogProc)
+ ( PubSecEngine engine, PSSigValidateDialogParams valParams );
+
+/**
+ Called to display a dialog box that shows signature properties.
+
+ <p>If this procedure is <code>NULL</code> (which is recommended), PubSec
+ opens its own properties dialog. The default properties
+ dialog box includes buttons that allow the user to import and
+ to display certificates: </p>
+
+ <ul>
+ <li>The import button calls PSImportDataProc(). </li>
+ <li>If the handler implements the kPSOpPerformDisplayCertList
+ operation (see PSPerformOperationProc()) the show-certificate
+ button can open the handler-provided display dialog. Otherwise,
+ the button opens the default certificate-display dialog. </li>
+ </ul>
+
+ @param engine The engine for which the validation status
+ is shown.
+ @param valParams (Modified by the method) A structure containing properties-dialog box
+ parameters and return values. The handler can
+ set the <code>dsPropType</code> to kSDPropViewVersion to request rollback
+ to this signature when the dialog box is closed.
+ @return kDSOk if successful, otherwise an exception code is returned.
+ @see PSSigValidateDialogProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSigPropDialogProc)
+ ( PubSecEngine engine, PSSigValidateDialogParams valParams );
+
+/**
+ Called to get the text result of validation. For most values
+ of <code>textType</code>, the handler should return <code>NULL</code>, causing PubSec
+ to use the default text strings (<code>"Valid"</code>, <code>"Invalid"</code>, or
+ <code>"Unknown"</code>, depending on the validity state). Handlers will
+ normally need to provide their own ID validity strings.
+
+ @param valCab The ASCab containing the validation result.
+ (See <code>sigValCab</code> in PSSigValidateParams.)
+ @param textType The type of result text to obtain for
+ a specific context.
+ @param index If the type is kDSSigValTextAP, it is the corresponding
+ index value. Otherwise it is ignored.
+ @return The text result of validation as a new ASText object.
+ @see PSSigValidateProc
+ @see PSSigValidateDialogProc
+*/
+typedef ACCBPROTO1 ASText (ACCBPROTO2 *PSSigValGetTextProc)
+ ( ASCab valCab, const DSSigValText textType, const ASInt32 index );
+
+/**
+ Creates the signature appearance that is put into the /AP
+ dictionary /N entry.
+
+ <p>It is recommended that you set this procedure to <code>NULL</code>,
+ which allows PubSec to use the default APHandler to generate
+ the XObj for the appearance. </p>
+
+ @param engine The engine for which an appearance is created.
+
+ @param pOutXObj (Filled by the method) The XObject to
+ use for the signature appearance.
+ @param docParams A validation parameters structure containing
+ information that is needed to create the signature appearance,
+ such as the PDDoc and annotation.
+ @param sigType The signature type.
+ @return kDSOk if successful, otherwise an exception code is returned.
+ @see PSGetLogoProc
+ @see PSSigValGetAPLabelProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSigCreateAPNXObjProc)
+ ( PubSecEngine engine, CosObj *pOutXObj, PSSigPDDocParams docParams, PSAPSigType sigType );
+
+/**
+ Gets custom artwork from the handler, to be used as a label
+ for a particular validity state. The artwork for standard
+ labels does not need to be specifically retrieved. If you
+ are not using dynamic signature appearances or not using
+ custom artwork, the handler need only handle the null label
+ case.
+ @param label A validity state, as returned by PSSigValGetAPLabelProc(),
+ for which to use this logo. If it is ASAtomNull, the logo is used
+ as an invariable watermark of the signature appearance.
+
+ @param pcLogo (Filled by the method) A string of the uncompressed
+ graphics stream for the logo artwork.
+ @param pRect (Filled by the method) The precise bounding
+ box that the artwork occupies.
+ @see PSSigCreateAPNXObjProc
+ @see PSSigValGetAPLabelProc
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *PSGetLogoProc)
+ ( ASAtom label, const char* *pcLogo, const ASFixedRect* *pRect );
+
+/**
+ Called to get a name to use for a particular layer of signature
+ appearance. This is used when the signature appearance uses
+ the n1 and n3 layers for dynamic signature appearances.
+ Beginning in Acrobat 6.0, Acrobat is discouraging the use
+ of dynamic signature appearances and is instead showing
+ the signature validity as an icon that is rendered at run
+ time.
+
+ <p>Provide this procedure for handlers that need to be backward
+ compatible with earlier implementations that use custom
+ artwork. The procedure can be set to <code>NULL</code> when you are not using
+ dynamic signature appearances. </p>
+
+ <p>If the value DSAPValid, DSAPDoubleValid, or DSAPInvalid
+ is returned, Acrobat uses standard labels. Otherwise Acrobat
+ calls PSGetLogoProc() to return logo artwork to use for the
+ XObject. A return value of ASAtomNull causes Acrobat to
+ use a blank XObject for the specified layer. </p>
+
+ @param valCab An ASCab containing the signature validation
+ result for which the label is obtained.
+ @param layerNum The layer for which a label is obtained.
+ @return The label of a signature appearance layer as an ASAtom.
+
+ @see PSGetLogoProc
+ @see PSSigCreateAPNXObjProc
+*/
+typedef ACCBPROTO1 ASAtom (ACCBPROTO2 *PSSigValGetAPLabelProc)
+ ( ASCab valCab, const ASInt32 layerNum );
+
+/**
+ This function sends data of a particular type to a handler
+ to import into its own data store. This is call is executed
+ in response to data received (for example, through an FDF
+ file or through the signature dictionary).
+
+ <p>Acrobat calls PSGetBoolPropertyProc() to see if the relevant
+ data type is supported in the handler implementation. See
+ PSImportDataType. </p>
+
+ @param engine The engine for which the data is exported.
+
+ @param params A structure that contains the data to be
+ imported.
+ @param bInUIAllowed When it is <code>true</code>, the call can invoke the
+ user interface dialogs if needed.
+ @return A positive value on success.
+ @see PSExportDataProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSImportDataProc)
+ ( PubSecEngine engine, PSImportDataParams params, ASBool bInUIAllowed );
+
+/**
+ This function gets data of the specified type from a handler,
+ to be exported to an FDF or CMS file and possibly sent as
+ an email attachment. The function is called when exporting
+ to FDF, for example, in response to an FDF Data Exchange
+ certificate request.
+
+ <p>Acrobat calls PSGetBoolPropertyProc() to see if the relevant
+ data type is supported in the handler implementation. See
+ PSExportDataType. </p>
+
+ @param engine The engine for which the data is exported.
+
+ @param dataType The type of data to be exported.
+ @param outCab The ASCab containing the data to be exported.
+
+ @param bInUIAllowed When it is <code>true</code>, the call can invoke the
+ user interface to export the data.
+ @return A positive value on success.
+ @see PSImportDataProc
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSExportDataProc)
+ ( PubSecEngine engine, PSExportDataType dataType, ASCab outCab, ASBool bInUIAllowed );
+
+/**
+ This procedure is required. It is called to open the provided
+ PKCS#7 cryptographic message service (CMS) enveloped data
+ object and return the data contained in it.
+ @param engine The engine for which the data is exported.
+ @param inCMSEnvelope The buffer that contains the enveloped data object.
+ @param inCMSEnvelopeSize The size of the buffer pointed to by <code>inCMSEnvelope</code>
+ @param pOutData The buffer containing the decrypted data, if successful.
+ @param pOutDataSize The size of the buffer pointed to by <code>pOutData</code>.
+ @param bInUIAllowed When it is <code>true</code>, the call can invoke the
+ user interface for anything required to open the envelope. For instance,
+ a login may be needed to access the user's private key.
+ @return kDSTrue if the envelope was opened, kDSFalse if the envelope
+ could not be opened, or an error code in case of error.
+
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSOpenCMSEnvelopeProc)
+ ( PubSecEngine engine,
+ ASUns8* inCMSEnvelope, ASUns32 inCMSEnvelopeSize,
+ ASUns8** pOutData, ASUns32* pOutDataSize,
+ ASBool bInUIAllowed );
+
+/** Open the provided PKCS#7 (CMS) Enveloped Data object and return the
+ data contained in it.
+ @param engine The engine for which the data is exported.
+ @param params Contains the envelope data and fields for the handler to
+ return opened envelope data contents, and optionally, the session key
+ and opening certificate.
+ @param bInUIAllowed Indicates whether the handler can pop up any user interface to open the envelope. For
+ instance, a login may be required to access the user's private key.
+ @return kDSTrue if the envelope was opened, kDSFalse if the envelope could not be opened.
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSOpenCMSEnvelopeExProc)
+ ( PubSecEngine engine,
+ PSOpenCMSEnvelopeParams params,
+ ASBool bInUIAllowed );
+
+/**
+ Gets information about directory handlers in an engine that
+ is acting as a directory service provider.
+ @param engine The engine for which the information is
+ obtained.
+ @param outCertList (Filled by the method) An ASCab
+ containing an array of ASCab directory handlers.
+ @param bInUIAllowed When it is <code>true</code>, the call can invoke the
+ user interface to display the directory handlers.
+ @return A positive value on success.
+ @see PSGetDirInfo
+ @see PSGetDirList
+ @see PSSetDirInfo
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSGetImplicitRecipientsProc)
+ ( PubSecEngine engine, ASCab outCertList, ASBool bInUIAllowed );
+
+
+/**
+ Gets information about directory handlers in an engine that
+ is acting as a directory service provider.
+ @param engine The engine for which the information is
+ obtained.
+ @param outDirHandlerInfo (Filled by the method) A structure
+ containing an array of ASCab directory handlers.
+ @return A positive value on success.
+ @see PSGetDirInfo
+ @see PSGetDirList
+ @see PSOpenConnection
+ @see PSSetDirInfo
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSGetDirHandlerInfo)
+ ( PubSecEngine engine, DirHandlerInfo outDirHandlerInfo );
+
+/**
+ Gets a list of directories in an engine that is acting as
+ a directory service provider.
+ @param engine The engine for which the information is
+ obtained.
+ @param outDirList (Filled by the method) An ASCab containing
+ an array of DirectoryInfo ASCab objects.
+ @return A positive value on success.
+ @see PSGetDirHandlerInfo
+ @see PSGetDirInfo
+ @see PSOpenConnection
+ @see PSSetDirInfo
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSGetDirList)
+ ( PubSecEngine engine, DirectoryList outDirList );
+
+/**
+ Gets information about directories in an engine that is
+ acting as a directory service provider.
+ @param engine The engine for which the information is
+ obtained.
+ @param inDirID The unique identifier associated with the
+ directory. See DirHandlerInfo.
+ @param outDirInfo (Filled by the method) An ASCab containing
+ information about the directory.
+ @return A positive value on success.
+ @see PSGetDirHandlerInfo
+ @see PSGetDirList
+ @see PSOpenConnection
+ @see PSSetDirInfo
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSGetDirInfo)
+ ( PubSecEngine engine, ASAtom inDirID, DirectoryInfo outDirInfo );
+
+/**
+ Sets information about a directory in an engine that is
+ acting as a directory service provider.
+ @param engine The engine for which the information is
+ obtained.
+ @param inDirInfo An ASCab containing information about
+ the directory:
+ <ul>
+ <li>If the PROP_DirectoryInfo_ID value matches
+ one of the existing directories, that directory's information
+ is overwritten.</li>
+ <li>If it does not match any existing directory,
+ a new directory is created.</li>
+ </ul>
+ @return kDSOk if successful, otherwise an exception code is returned.
+ @see PSGetDirHandlerInfo
+ @see PSGetDirInfo
+ @see PSGetDirList
+ @see PSOpenConnection
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSSetDirInfo)
+ ( PubSecEngine engine, DirectoryInfo inDirInfo );
+
+/**
+ Opens a connection to a specified directory to use for authentication.
+
+ @param engine The engine for which the connection is opened.
+
+ @param inDirID The identifier for the directory to which
+ the connection is opened.
+ @param inAuthCtx Not currently supported. Pass as <code>NULL</code>.
+
+ @param inUI Determines whether the authentication user interface should be shown.
+
+ @param pOutConnection (Filled by the method) A pointer
+ to the new connection object.
+ @return kDSTrue if the connection is opened, kDSFalse if it is not.
+ @see PSGetDirHandlerInfo
+ @see PSGetDirInfo
+ @see PSGetDirList
+ @see PSSetDirInfo
+*/
+typedef ACCBPROTO1 DSRetCode (ACCBPROTO2 *PSOpenConnection)
+ ( PubSecEngine engine, ASAtom inDirID, DirAuthenticationContext inAuthCtx, ASBool inUI,
+ DirConnection* pOutConnection );
+
+/** Ask the handler to report a summary on a signature that has just been signed by this handler. */
+typedef ACCBPROTO1 void (ACCBPROTO2 *PSSigSignReportProc)
+ ( PubSecEngine engine, PSSigSignReportParams);
+
+
+/** PubSecHandlerRec Definition.
+ See PSRegisterHandler for registration of PubSecHandlers.
+ @see PSRegisterHandler
+*/
+typedef struct _t_PubSecHandlerRec {
+ /** */
+ ASSize_t size;
+ /** Used internally. */
+ _t_PubSecHandlerRec *next;
+ /** Used internally. */
+ DigSigHandler dsHandler;
+ /** Used internally. */
+ PDCryptHandler cryptHandler;
+ /** Engine to use for user interface-based execution. */
+ PubSecEngine engine;
+
+ /* Engine constructor/destructor */
+ /** */
+ PSNewEngineProc newEngine;
+ /** */
+ PSDestroyEngineProc destroyEngine;
+
+ /* Properties */
+ /** */
+ PSGetBoolPropertyProc getBoolProperty;
+ /** */
+ PSGetAtomPropertyProc getAtomProperty;
+ /** */
+ PSGetInt32PropertyProc getInt32Property;
+ /** */
+ PSGetTextPropertyProc getTextProperty;
+
+ /* Engine acquire/release/performOperation */
+ /** */
+ PSSessionAcquireProc sessionAcquire;
+ /** */
+ PSSessionReleaseProc sessionRelease;
+ /** */
+ PSSessionReadyProc sessionReady;
+ /** */
+ PSPerformOperationProc performOperation;
+
+ /* Signing methods */
+ /** */
+ PSSigGetSigPropertiesProc sigGetSigProperties;
+ /** */
+ PSSigAuthenticateProc sigAuthenticate;
+ /** */
+ PSSigGetSigValueProc sigGetSigValue;
+
+ /* Validation methods */
+ /** */
+ PSSigValidateSupportedProc sigValidateSupported;
+ /** */
+ PSSigValidateProc sigValidate;
+ /** */
+ PSSigValidateDialogProc sigValidateDialog;
+ /** */
+ PSSigPropDialogProc sigPropDialog;
+ /** */
+ PSSigValGetTextProc sigValGetText;
+
+ /* Signature appearance methods */
+ /** */
+ PSGetLogoProc getLogo;
+ /** */
+ PSSigValGetAPLabelProc sigValGetAPLabel;
+ /** */
+ PSSigCreateAPNXObjProc sigCreateAPNXObj;
+
+ /* Contact Exchange */
+ /** */
+ PSImportDataProc importData;
+ /** */
+ PSExportDataProc exportData;
+
+ /* Encryption methods */
+ /** */
+ PSOpenCMSEnvelopeProc cryptOpenCMSEnvelope;
+ /** */
+ PSGetImplicitRecipientsProc cryptGetImplicitRecipients;
+
+ /* Directory Service Provider methods */
+ /** */
+ PSGetDirHandlerInfo dirGetDirHandlerInfo;
+ /** */
+ PSGetDirList dirGetDirList;
+ /** */
+ PSGetDirInfo dirGetDirInfo;
+ /** */
+ PSSetDirInfo dirSetDirInfo;
+ /** */
+ PSOpenConnection dirOpenConnection;
+
+ /* Additional methods */
+ /** */
+ PSOpenCMSEnvelopeExProc cryptOpenCMSEnvelopeEx;
+
+ PSSigSignReportProc sigSignReport;
+} PubSecHandlerRec, *PubSecHandler;
+
+/************************************************************************************
+ * PubSecHFT - HFT index table
+ ***********************************************************************************/
+
+
+/* Enumerate the selectors */
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+enum
+{
+ PubSecHFTDUMMYBLANKSELECTOR,
+#include "PubSecHFTProcs.h"
+ PubSecHFTNUMSELECTORSPlusOne
+};
+#undef PIPROC
+#define PubSecHFT_NUMSELECTORS (PubSecHFTNUMSELECTORSPlusOne - 1)
+
+/* HFTEndEnum - do not alter/remove this line! */
+
+/************************************************************************************
+ * PubSecHFT - Declarations of structs used by prototypes
+ ***********************************************************************************/
+
+/* Top level entries in PSExportDataExchangeParamsRec.dataCab. */
+#define PROP_ExportDataCab_CN "cn" /* Text, used to identify originator of FDF */
+#define PROP_ExportDataCab_EMail "EMail" /* Text, request reply-email-address */
+#define PROP_ExportDataCab_URL "URL" /* Text, request reply-URL */
+#define PROP_ExportDataCab_Filter "Filter" /* Text, language independent name of the (pubsec) handler that generated this file */
+#define PROP_ExportDataCab_Contacts "Contacts" /* A cab array of Contact cabs */
+#define PROP_ExportDataCab_DirSettings "DirSettings" /* A cab array of DirSetting cabs */
+
+/* Entries in Contact Cab */
+#define PROP_ContactCab_CN "cn" /* Text, common name */
+#define PROP_ContactCab_EMail "EMail" /* Text, email address */
+#define PROP_ContactCab_O "o" /* Text, corporation */
+#define PROP_ContactCab_ContactInfo "ContactInfo" /* Text, 'contact info', eg phone number, used to verify origin of cert */
+#define PROP_ContactCab_CMS "CMS" /* Binary CMS object, in lieu of certificates */
+#define PROP_ContactCab_Certs "Certs" /* A cab array of binary certificates, in lieu of CMS */
+#define PROP_ContactCab_Trust "Trust" /* A cab array of trust flags associate with this contacts certificates */
+#define PROP_ContactCab_Policy "Policy" /* A cab array of policy cabs associated with this contacts certificates */
+#define PROP_ContactCab_Group "Group" /* Text, the name of a group, if this contact belongs to a group */
+#define PROP_ContactCab_Contact "Contact" /* Text, the name of the contact, if this is an exported contact */
+
+/* Entries in DirSetting Cab */
+#define PROP_DirSettingCab_Type "Type" /* Text, always 'DirSetting' */
+#define PROP_DirSettingCab_Attr "Attr" /* Cab containing DirectoryInfo entries as specified in the DirectoryHFT */
+
+/* Entries in certificate's Policy cab */
+#define PROP_CertPolicyCab_OID "PolicyOID" /* A cab array of Text policy OIDs in dotted notation */
+#define PROP_CertPolicyCab_UFName "PolicyUFName" /* Text, a human-readable description for the OID */
+
+/** Parameters for importing data from a file into PubSec. */
+typedef struct _t_PSImportDataExchangeParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** The handler to use to accept the import data, if it accepts the specified type. */
+ PubSecHandler psHandler;
+ /** The engine to use to accept the import data. If it is not supplied, the method uses the default (user interface) engine. */
+ PubSecEngine psEngine;
+ /** The type of data to be imported. If data of this type is not found in the FDF, the operation fails. */
+ PSExportDataType dataType;
+ /** The file system used for <code>filePath</code>. */
+ ASFileSys fileSys;
+ /** The path of the file to be opened for import. */
+ ASPathName filePath;
+} PSImportDataExchangeParamsRec, *PSImportDataExchangeParams;
+
+/** Parameters for exporting data from PubSec to a file.
+ <p>The <code>PSExportDataExchangeParamsRec.dataCab</code> format is as follows: A
+ top level cab will contain lists of PROP_ExportDataCab_Contacts,
+ PROP_ExportDataCab_DirSettings or whatever other data is to be
+ included. This top level cab can include entries for an email
+ address (used as the return email address) and a common name (<code>cn</code>). It is
+ recommended that the <code>cn</code> entry be set to the common name of the
+ user; this will be used only in creating the file name for the FDF
+ (or PKCS#7) file. If either the <code>cn</code> or email address is not provided,
+ they will be fetched from the AVIdentity preference
+ settings.</p>
+
+ <p>Contents of the individual list entries are added as
+ CosDict objects to the FDF file with almost no filtering. The filtering
+ is to add a /Type attribute and to turn /Certs entries into /CMS
+ entries (meaning that a contact can contain a Certs entry that is a
+ list of certificates). Refer to the FDF Data Exchange specification for
+ details on attributes. Each contact can include a list of certificates
+ and an email address. Contacts that contain lists of certificates will
+ have these lists turned into a CMS object because the FDF format
+ supports only CMS. Contacts can directly provide the CMS object if
+ they choose. Each directory entry contains directory-specific
+ information that can be converted to a CosDict before storing in
+ the FDF file. File entries give device-independent paths to files that are to be
+ embedded. PubSecHandler and PubSecEngine are used to specify the
+ handler to use to sign the data exchange file (if it is signed at
+ all).</p>
+
+ <p>Example cab for exporting <code>MyContact</code>:</p>
+ <p><code>dataCab : Cab</code></p>
+ <p><code>"Contacts" : Cab</code></p>
+ <p><code>"0" : Cab</code></p>
+ <p><code>"EMail" : "jsmith@smithcorp.com"</code></p>
+ <p><code>"Certs" : Cab</code></p>
+ <p><code>"0" : binary end entity cert</code></p>
+ <p><code>"cn" : "John Smith"</code></p>
+ <p><code>"EMail" : "jsmith@smithcorp.com"</code></p>
+
+ <p>Example cab for exporting directory settings:</p>
+ <p><code>dataCab : Cab</code></p>
+ <p><code>"DirSettings" : Cab</code></p>
+ <p><code>"0" : Cab</code></p>
+ <p><code>"Port" : 369</code></p>
+
+ @see PSExportDataExchange
+*/
+typedef struct _t_PSExportDataExchangeParamsRec {
+ /** The size of the structure. */
+ ASSize_t size;
+ /** If exporting FDF, it is the handler to use to sign the FDF. If it is not supplied,
+ the user is prompted for a handler.
+ */
+ PubSecHandler psHandler;
+ /** If exporting FDF, it is the engine to use to sign the FDF. If it is not supplied,
+ the method uses the default (user interface) engine.
+ */
+ PubSecEngine psEngine;
+ /** The type of data to be exported. It is one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPSExportDataNone</TD><TD>Not specified.</TD></TR>
+ <TR><TD>kPSExportDataMyContact</TD><TD>Export the user's own contact information (certificates for encryption and/or signing).</TD></TR>
+ <TR><TD>kPSExportDataContacts</TD><TD>Export a list of contacts from an address book or directory that are to be shared.</TD></TR>
+ <TR><TD>kPSExportDataDirSettings</TD><TD>Export a list of directory settings that can be used to help someone else configure his directory.</TD></TR>
+ </TABLE>
+
+ */
+ PSExportDataType dataType;
+ /** (Required) Data to export, or an empty ASCab if there is no data to export. The format is defined below. */
+ ASCab dataCab;
+ /** The type of data to be requested. If it is supplied, the method adds a
+ request to the FDF for this data type and forces the export format to
+ be FDF. It has the same possible values as <code>dataType</code>.
+ */
+ PSExportDataType requestType;
+ /** The destination type that specifies how data should be delivered.
+ It is one of the following values:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kPSExportDestNone</TD><TD>Not specified, prompt the user (recommended).</TD></TR>
+ <TR><TD>kPSExportDestFile</TD><TD>Save as unspecified file type, possibly prompting for the file type.</TD></TR>
+ <TR><TD>kPSExportDestCMSFile</TD><TD>Save as CMS file.</TD></TR>
+ <TR><TD>kPSExportDestFDFFile</TD><TD>Save as FDF file.</TD></TR>
+ <TR><TD>kPSExportDestEMailFDF</TD><TD>Save an email FDF file.</TD></TR>
+ <TR><TD>kPSExportDestCertURL</TD><TD>Send single certificate to URL.</TD></TR>
+ </TABLE>
+ */
+ PSExportDestType destType;
+} PSExportDataExchangeParamsRec, *PSExportDataExchangeParams;
+
+/*
+ */
+
+/************************************************************************************
+ * PubSecHFT
+ ***********************************************************************************/
+/* Create the prototypes */
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+ #include "PubSecHFTProcs.h"
+#undef PIPROC
+
+#define PSRegisterHandler (*((PSRegisterHandler_SELPROTO)(gPubSecHFT[PSRegisterHandler_SEL])))
+#define PSUnregisterHandler (*((PSUnregisterHandler_SELPROTO)(gPubSecHFT[PSUnregisterHandler_SEL])))
+#define PSCountEncryptedDocs (*((PSCountEncryptedDocs_SELPROTO)(gPubSecHFT[PSCountEncryptedDocs_SEL])))
+#define PSCloseEncryptedDocs (*((PSCloseEncryptedDocs_SELPROTO)(gPubSecHFT[PSCloseEncryptedDocs_SEL])))
+#define PSDataBufferEnum (*((PSDataBufferEnum_SELPROTO)(gPubSecHFT[PSDataBufferEnum_SEL])))
+#define PSDataBufferDigest (*((PSDataBufferDigest_SELPROTO)(gPubSecHFT[PSDataBufferDigest_SEL])))
+#define PSDataBufferReset (*((PSDataBufferReset_SELPROTO)(gPubSecHFT[PSDataBufferReset_SEL])))
+#define PSSigValidatePDDocSigField (*((PSSigValidatePDDocSigField_SELPROTO)(gPubSecHFT[PSSigValidatePDDocSigField_SEL])))
+#define DSAPFileAcquire (*((DSAPFileAcquire_SELPROTO)(gPubSecHFT[DSAPFileAcquire_SEL])))
+#define DSAPFileRelease (*((DSAPFileRelease_SELPROTO)(gPubSecHFT[DSAPFileRelease_SEL])))
+#define DSAPFileSave (*((DSAPFileSave_SELPROTO)(gPubSecHFT[DSAPFileSave_SEL])))
+#define DSAPFileGetCount (*((DSAPFileGetCount_SELPROTO)(gPubSecHFT[DSAPFileGetCount_SEL])))
+#define DSAPFileCanDeleteNthEntry (*((DSAPFileCanDeleteNthEntry_SELPROTO)(gPubSecHFT[DSAPFileCanDeleteNthEntry_SEL])))
+#define DSAPFileGetNewNthName (*((DSAPFileGetNewNthName_SELPROTO)(gPubSecHFT[DSAPFileGetNewNthName_SEL])))
+#define DSAPFileRemoveNthEntry (*((DSAPFileRemoveNthEntry_SELPROTO)(gPubSecHFT[DSAPFileRemoveNthEntry_SEL])))
+#define DSAPFileEditNthEntry (*((DSAPFileEditNthEntry_SELPROTO)(gPubSecHFT[DSAPFileEditNthEntry_SEL])))
+#define DSAPFileCopyNthEntry (*((DSAPFileCopyNthEntry_SELPROTO)(gPubSecHFT[DSAPFileCopyNthEntry_SEL])))
+#define AABIsCertPresent (*((AABIsCertPresent_SELPROTO)(gPubSecHFT[AABIsCertPresent_SEL])))
+#define AABGetCertTrust (*((AABGetCertTrust_SELPROTO)(gPubSecHFT[AABGetCertTrust_SEL])))
+#define AABFindCertsByName (*((AABFindCertsByName_SELPROTO)(gPubSecHFT[AABFindCertsByName_SEL])))
+#define AABGetTrustedCerts (*((AABGetTrustedCerts_SELPROTO)(gPubSecHFT[AABGetTrustedCerts_SEL])))
+#define AABGetCertChain (*((AABGetCertChain_SELPROTO)(gPubSecHFT[AABGetCertChain_SEL])))
+#define PSExportDataExchange (*((PSExportDataExchange_SELPROTO)(gPubSecHFT[PSExportDataExchange_SEL])))
+#define PSImportDataExchange (*((PSImportDataExchange_SELPROTO)(gPubSecHFT[PSImportDataExchange_SEL])))
+#define PSCertIssuedUnderTestCP (*((PSCertIssuedUnderTestCP_SELPROTO)(gPubSecHFT[PSCertIssuedUnderTestCP_SEL])))
+#define AABIsCertUnderAdobeRoot (*((AABIsCertUnderAdobeRoot_SELPROTO)(gPubSecHFT[AABIsCertUnderAdobeRoot_SEL])))
+#define PSInsertDocInEEnvelope (*((PSAddSecureAttachmentToDoc_SELPROTO)(gPubSecHFT[PSAddSecureAttachmentToDoc_SEL])))
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif // PUBSECHFT_H
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFTProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFTProcs.h
new file mode 100644
index 0000000..84c9650
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/PubSecHFTProcs.h
@@ -0,0 +1,577 @@
+/*************************************************************************
+ * PubSecHFTProcs.h
+ *
+ * Copyright (c) 2007 Adobe Systems Inc. All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains the
+ * property of Adobe Systems Incorporated and its suppliers, if any.
+ * The intellectual and technical concepts contained herein are
+ * proprietary to Adobe Systems Incorporated and its suppliers and may
+ * be covered by U.S. and Foreign Patents, patents in process, and are
+ * protected by trade secret or copyright law. Adobe permits you to
+ * use, modify, and distribute this file in accordance with the terms
+ * of the Adobe license agreement accompanying it. If you have
+ * received this file from a source other than Adobe, then your use,
+ * modification, or distribution of it requires the prior written
+ * permission of Adobe.
+ *
+ * Description:
+ *
+ * Public key security interface for Acrobat public-key security
+ * handlers. Handlers can register as PubSec handlers to provide
+ * crypto services for private key signing, for signature validation,
+ * as a crypto source for decrypting using private keys, and as a
+ * directory source.
+ *
+ * Handlers can also call back into the PubSecHFT for various
+ * services, including a signature appearance handler and a trusted
+ * address book.
+ *
+ * Update History: (most recent first)
+ * 11-May-2007 -- Created from PubSecHFT.h for Acrobat 9.0
+ ************************************************************************/
+/************************************************************************************
+ * PubSecHFT - Prototype declarations
+ ***********************************************************************************/
+
+/* HFTBeginProto - do not alter/remove this line! */
+
+
+/**
+ Registers a handler with the PubSec HFT. The caller retains
+ ownership of the PubSecHandlerRec.
+ @param owner The handler's plug-in ExtensionID, assigned
+ at initialization.
+ @param psHandler The handler structure containing the
+ handler methods to register.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see PSUnregisterHandler
+*/
+PIPROC(ASBool, PSRegisterHandler,
+ ( ExtensionID owner, PubSecHandler psHandler ), owner, psHandler)
+
+
+/**
+ Unregisters a handler from the PubSec HFT. This does not
+ destroy the handler; the caller owns the PubSecHandlerRec.
+
+ @param psHandler The handler to unregister.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see PSRegisterHandler
+*/
+PIPROC(void, PSUnregisterHandler,
+ ( PubSecHandler psHandler ), psHandler)
+
+
+/*************************************************************************
+ * Doc Cache methods. PubSec keeps a list of all encrypted documents
+ * that are open. For security reasons handlers will want these
+ * documents to all be closed when a handler releases access to
+ * critical resources, for example when logging out.
+ ************************************************************************/
+
+/**
+ Returns the number of encrypted documents associated with
+ a PubSec engine. It returns separate values for documents that
+ need to be saved, and for those that do not need to be saved
+ and can be safely closed.
+ @param engine The engine for which the encrypted docs
+ are counted.
+ @param outNeedSave (Filled by the method) A pointer to
+ the number of encrypted documents associated with the engine
+ that need to be saved.
+ @param outCanClose (Filled by the method) A pointer to
+ the number of encrypted documents associated with the engine
+ that do not need to be saved and can be safely closed.
+ @see PSCloseEncryptedDocs
+*/
+PIPROC(void, PSCountEncryptedDocs,
+ ( PubSecEngine engine, ASUns32 *outNeedSave, ASUns32 *outCanClose ), engine, outNeedSave, outCanClose )
+
+
+/**
+ Closes all encrypted documents associated with a PubSec
+ engine, regardless of whether they need to be saved.
+ Use PSCountEncryptedDocs() to determine if there are any documents
+ that will need to be opened or saved.
+
+ <p>PubSec keeps a list of all open encrypted documents. For
+ security reasons, handlers will want all of these documents
+ to be closed when it releases access to critical resources,
+ (for example, when logging out). Use this method (rather than
+ closing the documents directly) so that PubSec can maintain
+ its cache correctly. </p>
+
+ @param engine The engine for which the encrypted documents
+ are closed.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see PSCountEncryptedDocs
+*/
+PIPROC(ASBool, PSCloseEncryptedDocs, ( PubSecEngine engine ), engine)
+
+PIPROC(ASBool, PSSigValidatePDDocSigField, ( PSSigPDDocParams docParams ), docParams)
+
+/*************************************************************************
+ * Signature operations
+ ************************************************************************/
+
+/**
+ Validates a specified signature field in a PDDoc. For example,
+ you might call this from the validate button of a signature
+ properties dialog, or if any information used during validation
+ is changed. It does not bring up any user interface.
+
+ <p>A return value of <code>true</code> indicates that the validation operation
+ was successfully peformed, but does not provide any information
+ about the result of the validation (that is, the signature's
+ validity value). The method does not return validity information,
+ but simply updates the DigSig and PubSec validation caches. </p>
+ @param docParams The validation parameters.
+ @return <code>true</code> if the validation was successfully performed, <code>false</code>
+ otherwise.
+
+ @note This method cannot validate a signature whose cache
+ has not been updated or is <code>NULL</code>. In this case, use DigSigVerifySig().
+*/
+
+/**
+ Gets bytes of data to digest when signing or verifying,
+ in chunks of a specified size. It continues getting data chunks
+ until all of the data in the data buffer has been returned.
+
+ <p>A handler will use this call when computing its own data
+ digest, to get the next blob of bytes to digest. The <code>dataBuffer</code>
+ object keeps track of the bytes that have been returned,
+ of how many bytes remain to be returned, and of the byte
+ ranges of data to be provided. </p>
+
+ <p>When signing or verifying a PDDoc, the data buffer object
+ is a PDDoc handle and the bytes returned will be those defined
+ by /ByteRange in the signature object dictionary. See the
+ PDF Reference for details. </p>
+
+ <p>PSDataBufferDigest() uses this method when computing the digest for the data. </p>
+ @param dataBuffer The buffer containing the data.
+ @param maxSize The maximum number of bytes to return in
+ the return buffer.
+ @param pReturnBuffer (Filled by the method) A pointer
+ to the buffer containing the current bytes to be processed.
+ If it is <code>NULL</code>, an error occurred and you should abort the enumeration.
+
+ @param pReturnSize (Filled by the method) A pointer to
+ the size in bytes of the return buffer. When it is <code>0</code>, do not process
+ the return buffer, but continue enumerating until the method
+ returns <code>false</code>. It is always less than <code>maxSize</code>.
+ @return <code>true</code> as long as there is more data to process, <code>false</code> when
+ the end of the buffer is reached.
+ @see PSDataBufferReset
+ @see PSDataBufferDigest
+*/
+PIPROC(ASBool, PSDataBufferEnum,
+ ( PSDataBuffer dataBuffer, ASInt32 maxSize, ASUns8 **pReturnBuffer, ASInt32 *pReturnSize ),
+ dataBuffer, maxSize, pReturnBuffer, pReturnSize )
+
+
+/**
+ Computes the digest for a set of data. A handler will use
+ this call to make PubSec compute the digest for a data buffer
+ when signing or verifying signatures. This method calls
+ PSDataBufferEnum() to get the bytes and computes an MD5 or
+ SHA-1 digest.
+ @param dataBuffer The buffer containing the data.
+ @param digestValue (Filled by the method) A pointer to
+ the digest value. The buffer must large enough for the requested
+ digest method:
+ <ul>
+ <li>For an MD5 digest, it must be at least 16 bytes.</li>
+ <li>For an SHA-1 digest, it must be at least 20 bytes.</li>
+ </ul>
+ @param digestMethod The method to use to compute the digest.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see PSDataBufferReset
+ @see PSDataBufferEnum
+*/
+PIPROC(ASBool, PSDataBufferDigest,
+ ( PSDataBuffer dataBuffer, ASUns8* digestValue, DSDigestMethod digestMethod ),
+ dataBuffer, digestValue, digestMethod )
+
+/**
+ Acquires the DSAP file and opens it, if it has not already
+ been acquired.
+
+ <p>PubSec calls this method to access a file, so a handler
+ does not need to acquire a DSAP file unless it needs to
+ access it for other reasons. </p>
+
+ @param bResolveProblems When it is <code>true</code>, if there are problems
+ trying to open the file, PubSec opens a user interface that gives a
+ user the option to delete the corrupted file.
+ @param bCreate When it is <code>true</code>, if the file does not exist it
+ is created. It is normally <code>true</code>.
+ @return <code>true</code> if the file was acquired and opened, <code>false</code> otherwise.
+
+ @see DSAPFileRelease
+*/
+PIPROC(ASBool, DSAPFileAcquire, ( const ASBool bResolveProblems, const ASBool bCreate ), bResolveProblems, bCreate )
+
+
+/**
+ Closes the digital signature appearance (DSAP) file.
+ @see DSAPFileAcquire
+ @see DSAPFileSave
+*/
+PIPROC(void, DSAPFileRelease, (void), )
+
+
+/**
+ Saves the DSAP file if it is dirty, leaving it open.
+ @see DSAPFileRelease
+*/
+PIPROC(void, DSAPFileSave,(void), )
+
+/**
+ Gets the number of configured signature appearance entries
+ in the DSAP file,
+ @return The number of configured AP entries.
+ @see DSAPFileCanDeleteNthEntry
+*/
+PIPROC(ASInt32, DSAPFileGetCount, (void), )
+
+/**
+ Tests whether a signature appearance entry at a specified
+ index in the DSAP file can be edited or is read-only.
+ @param index The position of the entry to test. The first
+ entry is at index <code>0</code>. A negative value gets the default entry.
+ @return <code>true</code> if the entry is editable, <code>false</code> otherwise.
+ @see DSAPFileGetCount
+ @see DSAPFileRemoveNthEntry
+*/
+PIPROC(ASBool, DSAPFileCanDeleteNthEntry, ( const ASInt32 index ), index)
+
+/**
+ Gets a copy of the name of the specified signature appearance
+ entry in the DSAP file. Use this when building a list of
+ signatures for a user to choose from or edit.
+ @param index The position of the entry whose name to obtain.
+ The first entry is at index <code>0</code>. A negative value gets the
+ default entry.
+ @return A copy of the name as an ASText object.
+ @see DSAPFileGetCount
+ Closes the digital signature appearance (DSAP) file.
+ @see DSAPFileAcquire
+ @see DSAPFileSave
+*/
+PIPROC(ASText, DSAPFileGetNewNthName, ( const ASInt32 index ), index)
+
+/**
+ Deletes the specified signature appearance entry from the
+ DSAP file.
+ @param index The position of the entry to remove. The
+ first entry is at index <code>0</code>. A negative value gets the default
+ entry.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see DSAPFileCanDeleteNthEntry
+ @see DSAPFileGetCount
+*/
+PIPROC(ASBool, DSAPFileRemoveNthEntry, ( const ASInt32 index ), index)
+
+/**
+ Opens the user interface that allows the user to edit the specified
+ signature appearance entry of the DSAP file.
+ @param previewData Data with which to create a signature
+ preview in the edit dialog.
+ @param index The position of the entry to edit. The first
+ entry is at index <code>0</code>. A negative value gets the default entry.
+ An index larger than the current number of entries creates
+ a new entry.
+ @return <code>true</code> if successful (the changes to the entry were made and
+ saved), <code>false</code> otherwise.
+ @see DSAPFileCanDeleteNthEntry
+ @see DSAPFileCopyNthEntry
+*/
+PIPROC(ASBool, DSAPFileEditNthEntry,
+ ( const APPreview previewData, const ASInt32 index ), previewData, index )
+
+/**
+ Creates a copy of the specified entry in the default DSAP
+ file and appends the copy to the end of the list of signature
+ appearances in the file.
+
+ <p>When you copy a default appearance entry, the copy is not
+ considered a default appearance entry. </p>
+ @param index The position of the entry to copy. The first
+ entry is at index <code>0</code>. A negative value gets the default entry.
+ @return <code>true</code> if the copy was successful and the appearance file
+ was successfully edited and saved, <code>false</code> otherwise.
+ @see DSAPFileCanDeleteNthEntry
+ @see DSAPFileEditNthEntry
+*/
+PIPROC(ASBool, DSAPFileCopyNthEntry, ( const ASInt32 index ), index)
+
+/************************************************************************************
+ * PubSec Acrobat Address Book (AAB) API
+ ***********************************************************************************/
+
+/**
+ Finds the specified certificate in the Acrobat Address Book.
+ Use this method to distinguish a certificate that is not
+ found by AABGetCertTrust from one whose trust level is reported
+ as untrusted.
+ @param x509 The certificate identifier, as defined in
+ X.509 (RFC 3280).
+ @param size The size of the certificate pointed to by
+ <code>x509</code>.
+ @return <code>true</code> if the certificate is found, <code>false</code> otherwise.
+ @see AABGetCertTrust
+*/
+PIPROC(ASBool, AABIsCertPresent, ( const ASUns8* x509, ASInt32 size ), x509, size )
+
+
+/**
+ Finds the specified certificate in the Acrobat Address Book
+ and returns the trust level.
+ @param inX509Cert The certificate identifier, as defined
+ in X.509 (RFC 3280). This is a generic 8-bit pointer to
+ the certificate data.
+ @param inX509CertSize The size in bytes of the X.509 certificate
+ pointed to by <code>inX509Cert</code>.
+ @param inCertChain An ASCab containing the certificate
+ chain for the certificate, with the trust level for each
+ certificate. It starts with the <code>inX509Cert</code> parameter's issuer at index
+ <code>0</code> and continues in the issuing order. Can be <code>NULL</code> if the
+ chain is not available.
+ @param inHelperCerts An ASCab containing an unordered
+ sequence of certificates that can be used to build the certificate
+ chain. If <code>inCertChain</code> is <code>NULL</code> and <code>inX509Cert</code> is not self-signed,
+ PubSec attempts to build a chain of certificates using a
+ default mechanism. A certificate ASCab contains an entry
+ for each certificate,with a 0-based index followed by the
+ X509 certificate as ASN1-encoded binary data.
+ For example:
+ <p><code>{ ("0", cert1), ("1", cert2), ... }</code></p>
+
+ @return The trust value for the specified certificate, if found.
+ If no certificate is found, it returns kPSSigTrustUntrusted.
+ To distinguish a certificate that is not found from one
+ whose trust level is reported as untrusted, use AABIsCertPresent().
+
+ @see AABGetTrustedCerts
+ @see AABIsCertPresent
+*/
+PIPROC(PSSigTrust, AABGetCertTrust,
+ ( const ASUns8* inX509Cert, ASInt32 inX509CertSize, ASCab inCertChain, ASCab inHelperCerts ),
+ inX509Cert, inX509CertSize, inCertChain, inHelperCerts )
+
+/**
+ Performs a lookup in the Acrobat Address Book by certificate
+ subject name. It returns all certificates that match the name
+ along with trust information associated with them.
+
+ <p>The returned ASCab contains: </p>
+ <ul>
+ <li>An entry for each certificate, with a 0-based index followed by the X509 certificate as ASN1-encoded binary data. </li>
+ <li>An entry with a key <code>Tn</code> containing the associated trust value of each certificate, where <code>n</code> corresponds to the certificate's index key. </li>
+ </ul>
+
+ <p>If a trust key is missing, the value should be assumed to
+ be untrusted. For example: </p>
+
+ <p><code>{ ("0", cert1), ("1", cert2), ("T1", kPSSigTrustAuthenticDocuments) } </code></p>
+
+ <p>In this case, <code>cert1</code> is untrusted, <code>cert2</code> is trusted for authentic documents. </p>
+
+ @param inCertNameData The subject name of the certificates
+ to find. Specify a BER-encoded value of <code>ASN.1 type Name</code>
+ defined in X.509 (RFC 3280).
+ @param inCertNameSize The size of the certificate subject
+ name data.
+ @param outResults (Filled by the method) An ASCab containing
+ any certificates, and their trust information, found by the lookup.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see AABGetCertTrust
+ @see AABGetTrustedCerts
+*/
+PIPROC(void, AABFindCertsByName,
+ ( const ASUns8* inCertNameData, ASInt32 inCertNameSize, ASCab outResults ),
+ inCertNameData, inCertNameSize, outResults )
+
+/**
+ Finds the certificates with a specified level of trust in
+ the Acrobat Address Book.
+ @param inTrust The level of trust for which to find certificates.
+ It is a logical <code>OR</code> of PSSigTrust bit flags.
+ @param outResults (Filled by the method) An ASCab containing
+ the trusted certificates found in the AAB. A certificate
+ ASCab contains an entry for each certificate, with a 0-based
+ index followed by the X509 certificate as ASN1-encoded binary
+ data. For example:
+ <p><code>{ ("0", cert1), ("1", cert2), ... }</code></p>
+
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see AABGetCertTrust
+*/
+PIPROC(void, AABGetTrustedCerts,
+ ( PSSigTrust inTrust, ASCab outResults ), inTrust, outResults )
+
+/**
+ Finds the certificate chain for the specified certificate
+ in the Acrobat Address Book.
+
+ <p>A certificate ASCab contains an entry for each certificate,with
+ a 0-based index followed by the X509 certificate as ASN1-encoded
+ binary data. For example: </p>
+
+ <p><code>{ ("0", cert1), ("1", cert2), ... } </code></p>
+
+ @param inX509Cert The certificate identifier, as defined
+ in X.509 (RFC 3280). This is a generic 8-bit pointer to
+ the certificate data.
+ @param inX509CertSize The size in bytes of the X.509 certificate
+ pointed to by <code>inX509Cert</code>.
+ @param inTrustedCerts An ASCab containing the user's trusted
+ certificates.
+ @param inUntrustedCerts An ASCab containing additional
+ certificates needed to build the certificate chain.
+ @param outChain (Filled by the method) An ASCab containing
+ the certificate chain. The specified certificate itself
+ is at index <code>0</code>, followed by the chain certificates in issuing
+ order.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see AABGetTrustedCerts
+*/
+PIPROC(ASBool, AABGetCertChain,
+ ( const ASUns8* inX509Cert, ASInt32 inX509CertSize, ASCab inTrustedCerts, ASCab inUntrustedCerts, ASCab outChain ),
+ inX509Cert, inX509CertSize, inTrustedCerts, inUntrustedCerts, outChain )
+
+/************************************************************************************
+ * Import/Export Facilities
+ * Use to import/export certificates, requests for certificates, etc to FDF
+ * files or other file types. Includes support to export to a file or
+ * to email. Uses wizard-like user interface
+ ***********************************************************************************/
+
+/**
+ Exports certificates, requests for certificates, and so
+ on, to FDF files or other file types, using a user interface wizard.
+ It includes support to export to a file or to email.
+
+ <p>The specified type of data is exported to a file and optionally
+ emailed to a destination that is chosen using the wizard: </p>
+
+ <ul>
+ <li>If the data is saved to a file and is the user's own contact information, it can be a PKCS#7 file (.p7c). </li>
+ <li>If the data contains just one certificate and is saved to a file, it can be a raw certificate file (.cer). </li>
+ <li>Otherwise, it is always an FDF file. </li>
+ </ul>
+
+ <p>It does not raise or throw exceptions. It displays an alert if it is unsuccessful. </p>
+
+ @param params A structure containing the export parameters.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see PSImportDataExchange
+*/
+PIPROC(ASBool, PSExportDataExchange,
+ ( PSExportDataExchangeParams params ), params)
+
+/**
+ Imports FDF data from a file, using a user interface wizard.
+ The parameters structure specifies the type and location
+ of the data. This call is used, for example, by the Directory
+ configuration dialog box to import directory settings from an
+ FDF file.
+
+ <p>When you use this call (rather than opening the FDF file
+ directly) the PubSec FDF handling code is used, which provided
+ support for FDF signature verification. PubSec opens the
+ FDF file, and then calls the handler's PSImportDataProc() using
+ the handler and engine specified in the parameters structure. </p>
+
+ <p>The operation fails if the data is not of the specified
+ type. It does not raise or throw exceptions. It displays an alert if unsuccessful. </p>
+
+ @param params A structure containing the import parameters.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see PSExportDataExchange
+*/
+PIPROC(ASBool, PSImportDataExchange,
+ ( PSImportDataExchangeParams params ), params)
+
+/**
+ Tests whether any certificate in a chain has been issued
+ under the Adobe Test Certificate Policy.
+
+ <p>If this function returns <code>true</code>, PubSec handlers are recommended
+ to provide feedback to the user regarding the test nature
+ of the certificate, which may render it untrustworthy. </p>
+ @param inCertChain The certificate chain to test, as an
+ ASCab array. The first certificate is the end entity, and
+ certificates should follow in the issuing order. For example:
+
+ <p><code>{ ("0", cert1), ("1", cert2), ... }</code></p>
+
+ <p><code>certn</code> is an X509 certificate as ASN1-encoded binary data.</p>
+
+ @return <code>true</code> if any certificate in the chain was issued under the Adobe Test Certificate Policy.
+*/
+PIPROC(ASBool, PSCertIssuedUnderTestCP,
+ ( ASCab inCertChain ), inCertChain)
+
+/**
+ As functions PSDataBufferEnum() or PSDataBufferDigest() are stateful (for example, the <code>dataBuffer</code>
+ object keeps track of the bytes that have been returned), call this function whenever
+ the state maintained within the <code>dataBuffer</code> need to be re-initialized.
+ @param dataBuffer The buffer containing the stateful information.
+ @see PSDataBufferEnum
+ @see PSDataBufferDigest
+*/
+PIPROC(void, PSDataBufferReset, ( PSDataBuffer dataBuffer ), dataBuffer )
+
+
+/**
+ Tests whether any certificate in a chain has been issued
+ under the Adobe Root Certificate Policy.
+
+ @param inCertChain The certificate chain to test, as an
+ ASCab array. The first certificate is the end entity, and
+ certificates should follow in the issuing order. For example:
+ <p><code>{ ("0", cert1), ("1", cert2), ... }</code></p>
+
+ @return <code>true</code> if any certificate in the chain was issued
+ under the Adobe Root Certificate Policy.
+*/
+PIPROC(ASBool, AABIsCertUnderAdobeRoot,
+ ( ASCab inCertChain ), inCertChain)
+
+/**
+ Attach the a document to an eEnvelope using the specified
+ certificate data.
+
+ <p> This function calls <code>addRecipientListCryptFilter</code> and
+ <code>importDataObject</code>.</p>
+
+ @param inDIPath Path to the document to add and secure as an attachment
+ to <code>pdDoc</code>.
+ @param szAttName The attachment's name.
+ @param inCertChain The certificate identifier. This is a generic 8-bit
+ pointer to the hex-encoded raw value of the certificate data.
+ @param inCertSize The size in bytes of the certificate pointed to by
+ <code>inCertChain</code>.
+ @param pdDoc The document provided by the caller to which <code>szAttName</code>
+ will be attached and secured.
+
+ @return <code>true</code> if the the <code>pddAttachment</code> is
+ secured and attached properly to the <code>pdDoc</code>.
+
+ @see addRecipientListCryptFilter
+ @see importDataObject
+*/
+PIPROC(ASBool, PSAddSecureAttachmentToDoc,
+ (ASText inDIPath, ASText inAttName,const ASUns8* inCertChain, ASInt32 inCertSize, PDDoc pdDoc),
+ inDIPath, inAttName,inCertChain, inCertSize, pdDoc)
+
+
+
+
+
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterE.h
new file mode 100644
index 0000000..245247d
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterE.h
@@ -0,0 +1,19 @@
+/* RasterE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "RasterEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterEASF.h
new file mode 100644
index 0000000..8259174
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/RasterEASF.h
@@ -0,0 +1,28 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(rasErrNoError, "No error.")
+
+DefineErr(rasErrInitFailed, "Initialization of the rasterizer module failed.")
+
+DefineErr(rasErrCreatePort, "Creation of rasterizer port failed.")
+
+DefineErr(rasErrDraw, "A drawing error occurred.")
+
+DefineErr(rasErrGPUFailed, "GPU drawing failed; reverted to CPU.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.cpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.cpp
new file mode 100644
index 0000000..29f1e8f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.cpp
@@ -0,0 +1,520 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ SafeResources.cpp
+
+ - Glue implementation of "safe" version of Macintosh toolbox routines
+ that put the plug-in's resource file on top of the resource chain
+ before calling the "real" implementation of the trap. Note that all
+ routines also save and restore the current resource file.
+
+*********************************************************************/
+
+#include <string.h>
+
+#include "PICommon.h"
+#include "SafeResources.h"
+#include "PIMain.h"
+
+static short gLocaleResFile = 0;
+static ASInt16 GetResRefNumFromFCB(ASInt16 vRefNum, ASInt32 dirID, ConstStr255Param fileName);
+static Boolean SearchDirectory( UInt16 volID, UInt32 dirID, UInt8 * targetName, OSType signature, UInt32 depth );
+
+#pragma options align=mac68k
+struct LanguageDescriptor
+{
+ OSType mSignature; /* distinguish between Acrobat application kinds */
+ OSType mLocale3Letters; /* 'FRA ', 'ITA ', ... */
+ NumVersionVariant mVersion; /* a copy of the 'vers' 1 version field */
+ short mLangCode; /* the language code */
+ short mScriptCode; /* the script code */
+ short mRegionCode; /* the region code (same as in 'vers' resource) */
+/* Str255 mEnglishName; */ /* same in english */
+/* Str255 mLocaleName; */ /* The localized language name */
+
+// short Compare(const LanguageDescriptor& inOther) const; /* Not needed */
+};
+#pragma options align=reset
+
+/****************************************************************************
+
+ SetupResourceChain
+
+ Makes sure that the locale and plugin files are on the top of the
+ resource chain.
+
+****************************************************************************/
+
+pascal Handle SafeGet1Resource(ResType type, short resNum)
+{
+ Handle result = NULL;
+
+ if (gLocaleResFile)
+ {
+ StAcroResourceContext resContext(gLocaleResFile);
+ result = Get1Resource(type, resNum);
+ }
+ if (result == NULL && GetAcroPluginResourceMap())
+ {
+ StAcroResourceContext resContext(GetAcroPluginResourceMap());
+ result = Get1Resource(type, resNum);
+ }
+ return result;
+}
+
+pascal Handle SafeGet1NamedResource(ResType type, ConstStr255Param name)
+{
+ Handle result = NULL;
+
+ if (gLocaleResFile)
+ {
+ StAcroResourceContext resContext(gLocaleResFile);
+ result = Get1NamedResource(type, name);
+ }
+ if (result == NULL && GetAcroPluginResourceMap())
+ {
+ StAcroResourceContext resContext(GetAcroPluginResourceMap());
+ result = Get1NamedResource(type, name);
+ }
+ return result;
+}
+
+pascal Handle SafeGetResource(ResType type, short resNum)
+{
+ StAcroResourceContext resContext;
+
+ return GetResource(type, resNum);
+}
+
+pascal void SafeGetIndString(Str255 str, short strListID, short index)
+{
+ StAcroResourceContext resContext;
+
+ GetIndString(str, strListID, index);
+}
+
+pascal StringHandle SafeGetString(short strID)
+{
+ StAcroResourceContext resContext;
+
+ return GetString(strID);
+}
+
+pascal WindowRef SafeGetNewWindow(short windowID, void *wStorage, WindowRef behind)
+{
+ StAcroResourceContext resContext;
+
+ return GetNewWindow(windowID, wStorage, behind);
+}
+
+pascal WindowRef SafeGetNewCWindow(short windowID, void *wStorage, WindowRef behind)
+{
+ StAcroResourceContext resContext;
+
+ return GetNewCWindow(windowID, wStorage, behind);
+}
+
+pascal DialogRef SafeGetNewDialog(short dialogID, void *dStorage, WindowRef behind)
+{
+ StAcroResourceContext resContext;
+
+ return GetNewDialog(dialogID, dStorage, behind);
+}
+
+pascal short SafeAlert(short alertID, ModalFilterUPP modalFilter)
+{
+ StAcroResourceContext resContext;
+
+ return Alert(alertID, modalFilter);
+}
+
+pascal short SafeStopAlert(short alertID, ModalFilterUPP modalFilter)
+{
+ StAcroResourceContext resContext;
+
+ return StopAlert(alertID, modalFilter);
+}
+
+pascal short SafeNoteAlert(short alertID, ModalFilterUPP modalFilter)
+{
+ StAcroResourceContext resContext;
+
+ return NoteAlert(alertID, modalFilter);
+}
+
+pascal short SafeCautionAlert(short alertID, ModalFilterUPP modalFilter)
+{
+ StAcroResourceContext resContext;
+
+ return CautionAlert(alertID, modalFilter);
+}
+
+pascal ControlHandle SafeGetNewControl(short ctrlID, WindowPtr window)
+{
+ StAcroResourceContext resContext;
+
+ return GetNewControl(ctrlID, window);
+}
+
+pascal CursHandle SafeGetCursor(short cursID)
+{
+ StAcroResourceContext resContext;
+
+ // Under OS X, doing a GetCursor() has the side-effect of opening up QD.rsrc in
+ // the OS -- so that it can provide the OS cursors just if we ask for them. In most
+ // cases we don't want 'em and don't want to take the performance hit (which is
+ // pretty high). Our solution is to check the app and locale contexts for the
+ // cursors, and then, only if we fail, ask QD for them. Hopefully the
+ // latter will never happen, but we have to do this just in case 3rd parties
+ // depend on that behavior.
+ CursHandle cursor = (CursHandle) GetResource('CURS', cursID);
+ if (cursor == NULL)
+ cursor = GetCursor(cursID);
+
+ return cursor;
+}
+
+pascal Handle SafeGetIcon(short iconID)
+{
+ StAcroResourceContext resContext;
+
+ return GetIcon(iconID);
+}
+
+static pascal OSErr AddIconsToSuite(ResType theType, Handle *theIcon, void *yourDataPtr)
+{
+ IconSuiteRef iconSuite = (IconSuiteRef)yourDataPtr;
+
+ AddIconToSuite(*theIcon, iconSuite, theType);
+
+ return noErr;
+}
+
+static ASBool SafeGetIconSuitePart(IconSuiteRef theIconSuite, short theResID, ResType theType)
+{
+ ASBool foundAnIcon = false;
+
+ Handle h = SafeGet1Resource(theType, theResID);
+ if (h)
+ {
+ DetachResource(h);
+
+ AddIconToSuite(h, theIconSuite, theType);
+
+ foundAnIcon = true;
+ }
+
+ return foundAnIcon;
+}
+
+pascal OSErr SafeGetIconSuite(IconSuiteRef *theIconSuite, short theResID, IconSelectorValue selector)
+{
+ ASBool foundAnIcon = false;
+
+ *theIconSuite = NULL;
+ OSErr err = noErr;
+
+ err = NewIconSuite(theIconSuite);
+ if (err == noErr)
+ {
+ if (selector & kSelectorLarge1Bit)
+ if (SafeGetIconSuitePart(*theIconSuite, theResID, 'ICN#'))
+ foundAnIcon = true;
+
+ if (selector & kSelectorLarge4Bit)
+ if (SafeGetIconSuitePart(*theIconSuite, theResID, 'icl4'))
+ foundAnIcon = true;
+
+ if (selector & kSelectorLarge8Bit)
+ if (SafeGetIconSuitePart(*theIconSuite, theResID, 'icl8'))
+ foundAnIcon = true;
+
+ if (selector & kSelectorSmall1Bit)
+ if (SafeGetIconSuitePart(*theIconSuite, theResID, 'ics#'))
+ foundAnIcon = true;
+
+ if (selector & kSelectorSmall4Bit)
+ if (SafeGetIconSuitePart(*theIconSuite, theResID, 'ics4'))
+ foundAnIcon = true;
+
+ if (selector & kSelectorSmall8Bit)
+ if (SafeGetIconSuitePart(*theIconSuite, theResID, 'ics8'))
+ foundAnIcon = true;
+
+ if (IconFamilyToIconSuite != NULL)
+ {
+ Handle iconFamily = SafeGet1Resource('icns', theResID);
+ if (iconFamily)
+ {
+ IconSuiteRef icnsIconSuite = NULL;
+ IconFamilyToIconSuite((IconFamilyHandle)iconFamily, selector, &icnsIconSuite);
+ if (icnsIconSuite)
+ {
+ IconActionUPP AddIconsToSuiteUPP = NewIconActionUPP(AddIconsToSuite);
+ ForEachIconDo(icnsIconSuite, selector, AddIconsToSuiteUPP, *theIconSuite);
+ DisposeIconActionUPP(AddIconsToSuiteUPP);
+ foundAnIcon = true;
+ }
+
+ ReleaseResource(iconFamily);
+ }
+ }
+
+ if (!foundAnIcon)
+ {
+ DisposeIconSuite(*theIconSuite, true);
+ *theIconSuite = NULL;
+ err = noSuchIconErr;
+ }
+ }
+
+ return err;
+}
+
+pascal CIconHandle SafeGetCIcon(short iconID)
+{
+ StAcroResourceContext resContext;
+
+ return GetCIcon(iconID);
+}
+
+pascal PicHandle SafeGetPicture(short picID)
+{
+ StAcroResourceContext resContext;
+
+ return GetPicture(picID);
+}
+
+pascal PatHandle SafeGetPattern(short patternID)
+{
+ StAcroResourceContext resContext;
+
+ return GetPattern(patternID);
+}
+
+pascal void SafeGetIndPattern(Pattern *thePat, short patternListID, short index)
+{
+ StAcroResourceContext resContext;
+
+ GetIndPattern(thePat, patternListID, index);
+}
+
+pascal MenuHandle SafeGetMenu(short resourceID)
+{
+ StAcroResourceContext resContext;
+
+ return GetMenu(resourceID);
+}
+
+pascal void SafeModalDialog(ModalFilterUPP modalFilter, short *itemHit)
+{
+ StAcroResourceContext resContext;
+
+ ModalDialog(modalFilter, itemHit);
+}
+
+/****************************************************************************
+
+ SetLocalFile
+
+ While we still support the SetLocaleFile mechansim,
+ we suggest you use Mac OS X's localization support
+ and bundle your plugin instead.
+
+ Scans the plugin folder for the specified locale file. The locale file
+ name must be the concatinatin of the plugin name and the language string
+ returned by AVAppGetLanguage, i.e. ExportPS FRA. If Debug is on, it
+ attempts to remove ".Debug" from the plugin name.
+
+ Input:
+ Language String (c string)
+
+ Output:
+ gLocaleResFile set to locale fileref if found, otherwise it is zero
+
+/****************************************************************************/
+
+void SetLocaleFile( UInt8 * langStr, OSType signature )
+{
+ FCBPBRec resPb;
+ Str31 fileName;
+ OSErr err;
+
+ resPb.ioCompletion = nil; // Find the plugin directory using
+ resPb.ioNamePtr = fileName; // the res file ref num as a base.
+ resPb.ioRefNum = GetAcroPluginResourceMap();
+ resPb.ioFCBIndx = 0; // Look up GetAcroPluginResourceMap()
+
+ err = PBGetFCBInfoSync( &resPb );
+
+ if( err != noErr ) { // Something bad happened. Set locale
+ gLocaleResFile = 0; // to nil and default to English
+ return;
+ }
+ SearchDirectory( resPb.ioFCBVRefNum, resPb.ioFCBParID, langStr, signature, 1 );
+}
+
+/****************************************************************************
+
+ SearchDirectory
+
+ Recursively searches a plugin directory for file targetName. It is limited
+ to a single level search, since all locale files should be in plugin folder.
+
+****************************************************************************/
+
+static Boolean SearchDirectory( UInt16 volID, UInt32 dirID, UInt8 * targetLang, OSType sig, UInt32 depth )
+{
+ Str31 fileName;
+ UInt16 fileIndex = 1;
+ OSErr err = noErr;
+ CInfoPBRec catPb;
+ Boolean found = false;
+ struct LanguageDescriptor ** locaRSRC;
+
+ gLocaleResFile = 0; /* Set locale file to invalid number */
+
+ while( err == noErr ) {
+ catPb.dirInfo.ioCompletion = nil;
+ catPb.dirInfo.ioNamePtr = fileName;
+ catPb.dirInfo.ioVRefNum = volID;
+ catPb.dirInfo.ioFDirIndex = fileIndex++;
+ catPb.dirInfo.ioDrDirID = dirID;
+
+ err = PBGetCatInfoSync( &catPb );
+
+ // If I found a folder, then look inside. But only go to the specified depth
+ if( err == noErr) {
+ if( catPb.dirInfo.ioFlAttrib & (1<<4) ) { // Look in the folder, if I haven't exceeded the depth
+
+ if( depth ) {
+ if( SearchDirectory( volID, catPb.dirInfo.ioDrDirID, targetLang, sig, depth - 1 ) )
+ return true; /* A locale file was found, so exit */
+ else
+ continue; /* Nothing so far, so keep looking */
+ }
+ else {
+ continue;
+ }
+ }
+ else { // Check if its a locale file
+ if( catPb.hFileInfo.ioFlFndrInfo.fdType == 'LANG'
+ && catPb.hFileInfo.ioFlFndrInfo.fdCreator == 'CARO' ) {
+ ASInt16 curLocaleFile;
+
+ /* Fix for 408144.
+ ** Check for an open resource file. Skip already open files.
+ ** If another Plugin has it open this will cause great confusion.
+ ** Example is "WHA" and "WHA Library". "WHA Library" close the "WHA lang"
+ ** file while looking for the "WHA Library lang" file.
+ */
+ curLocaleFile = GetResRefNumFromFCB(volID, dirID, fileName);
+ if( curLocaleFile != -1 )
+ continue; /* continue on to the next file */
+
+ curLocaleFile = HOpenResFile( volID, dirID, fileName, fsCurPerm );
+
+ if( curLocaleFile == -1 ) /* Check for a valid file. If its bad, then */
+ continue; /* continue on to the next file */
+
+ locaRSRC = (struct LanguageDescriptor **) Get1Resource( 'LOCA', 2010 );
+ if( locaRSRC ) {
+
+ if( (*locaRSRC)->mSignature == sig ) { /* Check the client signature */
+
+ if( (*locaRSRC)->mLocale3Letters == *( UInt32 * )targetLang )
+ {
+ gLocaleResFile = curLocaleFile;
+ }
+ }
+
+ ReleaseResource( ( Handle )locaRSRC );
+ }
+
+ if( gLocaleResFile != curLocaleFile ) {
+ CloseResFile( curLocaleFile ); /* Release the locale file */
+ continue; /* Didn't find it, so try the next one */
+ }
+ else
+ return true; /* Got it, so exit */
+ }
+ }
+ }
+ }
+ return false; /* Found nothing */
+}
+
+
+/*
+** GetResRefNumFromFCB
+**
+** Search open files for this resource file and return the file reference number if found.
+** Otherwise return -1.
+**
+*/
+static ASInt16 GetResRefNumFromFCB(ASInt16 vRefNum, ASInt32 dirID, ConstStr255Param fileName)
+{
+ StrFileName fcbFileName;
+ FCBPBRec fcbPB;
+ ASInt16 ioFCBIndx;
+ ASInt16 plugResFile = -1;
+ OSErr err = noErr;
+
+ /* search for open plugin resource file reference number */
+/* miMemset( &fcbPB, 0, sizeof(fcbPB) ); /* can not use miUtils in pdfviewer */
+ memset( &fcbPB, 0, sizeof(fcbPB) );
+ fcbPB.ioNamePtr = fcbFileName;
+ fcbPB.ioVRefNum = vRefNum;
+ for (ioFCBIndx = 1; err == noErr && plugResFile == -1; ioFCBIndx++) {
+ fcbPB.ioFCBIndx = ioFCBIndx;
+ err = PBGetFCBInfoSync(&fcbPB);
+ if (err == noErr &&
+ fcbPB.ioFCBParID == dirID &&
+ fcbPB.ioFCBFlags & kioFCBResourceMask &&
+ EqualString(fcbFileName, fileName, true, true) )
+ {
+ plugResFile = fcbPB.ioRefNum;
+ }
+ }
+
+ return plugResFile;
+
+} /* GetResRefNumFromFCB */
+
+
+StAcroResourceContext::StAcroResourceContext()
+ : mCurResFile(GetAcroPluginResourceMap())
+{
+ mOldResFile = CurResFile();
+
+ if( mCurResFile )
+ UseResFile(mCurResFile);
+
+ if( gLocaleResFile )
+ UseResFile(gLocaleResFile);
+}
+
+StAcroResourceContext::StAcroResourceContext(short resFile)
+ : mCurResFile(resFile)
+{
+ mOldResFile = CurResFile();
+
+ if( mCurResFile )
+ UseResFile(mCurResFile);
+}
+
+StAcroResourceContext::~StAcroResourceContext( )
+{
+ ::UseResFile( mOldResFile );
+}
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.h
new file mode 100644
index 0000000..76faa9f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SafeResources.h
@@ -0,0 +1,126 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ SafeResources.h
+
+*********************************************************************/
+
+#ifndef _H_SafeResources
+#define _H_SafeResources
+
+#if !defined(__GNUC__)
+#include <Resources.h>
+#include <OSUtils.h>
+#include <Icons.h>
+#include <Dialogs.h>
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+#ifdef __cplusplus
+
+class StAcroResourceContext
+{
+public:
+ StAcroResourceContext();
+ StAcroResourceContext(short resFile);
+ virtual ~StAcroResourceContext();
+
+protected :
+ short mOldResFile;
+ short mCurResFile;
+};
+
+#endif /* __cplusplus */
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+pascal Handle SafeGet1Resource(ResType type, short resNum);
+
+pascal Handle SafeGet1NamedResource(ResType type, ConstStr255Param name);
+
+pascal Handle SafeGetResource(ResType type, short resNum);
+
+pascal void SafeGetIndString(Str255 str, short strListID, short index);
+
+pascal StringHandle SafeGetString(short strID);
+
+pascal WindowRef SafeGetNewWindow(short windowID, void *wStorage, WindowRef behind);
+
+pascal WindowRef SafeGetNewCWindow(short windowID, void *wStorage, WindowRef behind);
+
+pascal DialogRef SafeGetNewDialog(short dialogID, void *dStorage, WindowRef behind);
+
+pascal short SafeAlert(short alertID, ModalFilterUPP modalFilter);
+
+pascal short SafeStopAlert(short alertID, ModalFilterUPP modalFilter);
+
+pascal short SafeNoteAlert(short alertID, ModalFilterUPP modalFilter);
+
+pascal short SafeCautionAlert(short alertID, ModalFilterUPP modalFilter);
+
+pascal ControlHandle SafeGetNewControl(short ctrlID, WindowPtr window);
+
+pascal CursHandle SafeGetCursor(short cursID);
+
+pascal Handle SafeGetIcon(short iconID);
+
+pascal OSErr SafeGetIconSuite(IconSuiteRef *theIconSuite, short theResID, IconSelectorValue selector);
+
+pascal CIconHandle SafeGetCIcon(short iconID);
+
+pascal PicHandle SafeGetPicture(short picID);
+
+pascal PatHandle SafeGetPattern(short patternID);
+
+pascal void SafeGetIndPattern(Pattern *thePat, short patternListID, short index);
+
+pascal MenuHandle SafeGetMenu(short menuID);
+
+pascal void SafeModalDialog(ModalFilterUPP modalFilter, short *itemHit);
+
+/* While we still support the SetLocaleFile mechansim, */
+/* we suggest you use Mac OS X's localization support */
+/* and bundle your plugin instead. */
+void SetLocaleFile( UInt8 * langStr, OSType signature );
+
+#if TARGET_API_MAC_OS8
+short PreCarbonSetupResourceChain( void );
+#endif /* TARGET_API_MAC_OS8 */
+
+
+OSErr AcroPluginCFragInitFunction( const CFragInitBlock * initBlock );
+void AcroPluginCFragTermProcedure( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_SafeResources */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SmartPDPage.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SmartPDPage.h
new file mode 100644
index 0000000..699a1d4
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SmartPDPage.h
@@ -0,0 +1,373 @@
+/*********************************************************************************
+ File: SmartPDPage.h
+ Created: June 16, 2003
+ Purpose: This class contains a thin wrapper for PDPage objects that
+ ensures the reference count is decremented when the object
+ is destroyed.
+*
+* ___________________
+*
+* (c) Copyright 2002-2006 Adobe Systems, Inc.
+* All Rights Reserved.
+*
+* NOTICE: Adobe permits you to use, modify, and distribute this file
+* in accordance with the terms of the Adobe license agreement
+* accompanying it. If you have received this file from a source other
+* than Adobe, then your use, modification, or distribution of it
+* requires the prior written permission of Adobe.
+************************************************************************************/
+#ifndef _SMARTPDPAGE_H
+#define _SMARTPDPAGE_H
+
+#if defined (__cplusplus)
+
+/* Include common macros */
+#include "PDClassDefs.h"
+
+/* Set ENABLE_SMARTPDPAGETESTS to 1 to enable unit tests for the class */
+#define ENABLE_SMARTPDPAGETESTS 0
+
+/**
+ This class ensures that PDPage objects are released even in case
+ of exceptions and <code>RAISE</code>. There are many ways to acquire a Page that
+ we need to be careful about, and those APIs are listed below:
+ <ul>
+ <li>PDDocAcquirePage</li>
+ <li>PDPageAcquireFromCosPage</li>
+ <li>PDCosAcquirePage</li>
+ <li>PDBeadAcquirePage</li>
+ </ul>
+
+ <p>Note that PDPage objects retrieved using AVPageViewGetPage() should not be released.</p>
+
+ <p>This class is modeled based on a <code>SmartPointer</code> class. It does not
+ have a <code>release()</code> API, as there was a clash in the meaning of the API
+ in the <code>auto_ptr</code> domain and the <code>PD</code> API domain.</p>
+
+ <p>This class is designed to be a <code>Final</code> class, and hence does not
+ have a virtual destructor. Classes that need this functionality
+ should encapsulate it using containment.</p>
+*/
+
+#if CPP_EXCEPTIONS
+#define ERRFILE "SmartPDPage.h"
+#endif
+
+RAISEAWARECLASS(CSmartPDPage)
+class CSmartPDPage
+#ifdef BASECLASS
+: public BASECLASS
+#endif
+{
+ RAISEAWARE_WITH_COPY_CONSTRUCTOR(CSmartPDPage)
+public:
+
+ /**
+ Constructor.
+ <p>This is the default constructor. It is used along with
+ AssignAndTakeOwnership() or the AcquirePage() method.</p>
+ */
+ CSmartPDPage(): m_pdPage(NULL)
+ {
+ CTOR; /* Macro for creating a RaiseAwareConstructor */
+ }
+
+ /**
+ Constructor.
+ <p>This is a constructor for the most common PDPage creation APIs. Modules using this
+ class should never call the PDDocAcquirePage() directly.</p>
+
+ @param pdDoc The PDDoc containing the page that is requested. This
+ cannot be <code>NULL</code>.
+ @param nPageNum The page number of the page that is requested. This cannot
+ be negative and should be in the page range of the document.
+ */
+ CSmartPDPage(PDDoc pdDoc, ASInt32 nPageNum): m_pdPage(NULL)
+ {
+ CTOR; /* Macro for creating a RaiseAwareConstructor */
+ AssignPage(pdDoc, nPageNum);
+ }
+
+ /**
+ Constructor.
+ <p>This constructor takes a PDPage pointer as parameter. It increases the
+ reference count of the object before taking ownership of the PDPage
+ pointer passed in. It is to be used in cases where the PDPage pointer
+ is acquired by APIs that do not increase the reference count (for example, AVPageViewGetPage()).</p>
+
+ @param pdPage The Page object. This should not be <code>NULL</code>.
+ @example <code>CSmartPDPage cPDPage(AVPageViewGetPage(avPageView));</code>
+ */
+ explicit CSmartPDPage( PDPage pdPage): m_pdPage(NULL)
+ {
+ CTOR; /* Macro for creating a RaiseAwareConstructor */
+ AssignPage(pdPage);
+ }
+
+ /**
+ Copy Constructor.
+ <p>It increases the reference count of the contained PDPage object in case
+ it is not <code>NULL</code>.</p>
+
+ @param cAutoPage The CSmartPDPage object.
+ */
+ CSmartPDPage (const CSmartPDPage &cAutoPage): m_pdPage(NULL)
+ {
+ CTOR; /* Macro for creating a RaiseAwareConstructor */
+ /* Increase the refcount for the page. */
+ if (cAutoPage.m_pdPage != NULL)
+ AssignPage(cAutoPage.m_pdPage);
+ }
+
+ /**
+ Destructor.
+ <p>If the PDPage object is not empty, then it
+ releases the PDPage object. This method is not a virtual method,
+ since the class is supposed to be a <code>Final</code> class.</p>
+ */
+ ~CSmartPDPage ()
+ {
+ DTOR; /* Macro for creating a RaiseAwareDestructor */
+ if (m_pdPage != NULL)
+ {
+ /* Destructor should not Raise and hence is different from Reset */
+ PDPage tmpPage = m_pdPage;
+ m_pdPage = NULL;
+ DURING
+ PDPageRelease(tmpPage);
+ HANDLER
+ END_HANDLER
+ }
+ }
+
+ /**
+ The PDPage object is released. It then acquires a new PDPage
+ pointer using PDDocAcquirePage(). Modules using this class should never call
+ PDDocAcquirePage() directly.
+
+ <p>In the case of an exception, the object will be set to the empty state.</p>
+
+ @param pdDoc The PDDoc containing the page that is requested. This
+ cannot be <code>NULL</code>.
+ @param nPageNum The page number of the page that is requested. This cannot
+ be negative and should be in the page range of the document.
+ */
+ void AcquirePage(PDDoc pdDoc, ASInt32 nPageNum)
+ {
+ /* Release the current PDPage object. */
+ Reset();
+ /* Acquire a new page */
+ AssignPage(pdDoc, nPageNum);
+ }
+
+ /**
+ The old PDPage pointer contained within is released. It then takes ownership
+ of the PDPage pointer passed in as parameter. The method does not increase the
+ reference count of the passed in PDPage object. This method is used in scenarios
+ where the <code>Smart</code> pointer needs to be constructed before
+ the page object becomes available. It is also used with APIs like
+ PDPageAcquireFromCosPage() that have already increased the reference count for
+ the PDPage object but are not encapsulated by the class methods.
+
+ <p>In the case of an exception, the object will be set to the empty state.</p>
+
+ @param pdPage The Page object. It cannot be <code>NULL</code>.
+ */
+ void AssignAndTakeOwnership(PDPage pdPage)
+ {
+ ACROASSERT(pdPage != NULL);
+ /* Release the current PDPage object. */
+ Reset();
+ /* Take ownership of the new PDPage object. */
+ m_pdPage = pdPage;
+ }
+
+ /**
+ PDPage operator.
+ <p>This is an operator to access the PDPage pointer contained within. This gives access to
+ the raw pointer within and hence should not be released. The lifetime of the
+ PDPage pointer returned is bound to the CSmartPDPage object that returned it.</p>
+
+ <p>This does not raise exceptions.</p>
+
+ @return The PDPage contained in this object. It may be <code>NULL</code>.
+ */
+ inline operator PDPage ( void ) const
+ {
+ return m_pdPage;
+ }
+
+ /**
+ Assignment operator.
+ <p>This copies the PDPage pointer contained within the CSmartPDPage object passed
+ in as parameter. It increases the reference count in case the PDPage pointer
+ contained within the passed in object is not <code>NULL</code>.</p>
+
+ <p>In the case of an exception, the object will be set to the empty state.</p>
+
+ @param hRhs The Page object.
+ @return A reference to <code>this</code>.
+ */
+ CSmartPDPage& operator=( const CSmartPDPage& hRhs )
+ {
+ if( this != &hRhs )
+ {
+ /* Release the current PDPage object. */
+ Reset();
+ /* Assign and increase the refcount for the page. */
+ if (hRhs.m_pdPage != NULL)
+ AssignPage(hRhs.m_pdPage);
+ }
+ return *this;
+ }
+
+ /**
+ This method releases ownership of the internal PDPage object. The caller
+ will be responsible for releasing the PDPage object. The PDPage object
+ contained within will be empty once this API is called, and hence should not
+ be used.
+
+ <p>This does not raise exceptions.</p>
+
+ @return the PDPage that was contained in this object. This can be <code>NULL</code>.
+ */
+ PDPage GiveOwnershipToCaller()
+ {
+ PDPage pdRetVal = m_pdPage;
+ m_pdPage = NULL;
+ return pdRetVal;
+ }
+
+ /**
+ Releases the PDPage object. In case the object
+ is empty, this method does not do anything. The PDPage object will
+ no longer be valid once this method is called, and hence should not be used.
+
+ <p>In the case of an exception, the object will be set to the empty state.</p>
+ */
+ void Reset()
+ {
+ if (m_pdPage != NULL)
+ {
+ // The method 'PDPageRelease' may raise and hence we need to reset the value before this
+ PDPage tmpPage = m_pdPage;
+ m_pdPage = NULL;
+ ASTRY
+ {
+ PDPageRelease(tmpPage);
+ }
+ END_ASTRY
+ }
+ }
+/* Run the following tests when changing the class */
+#if (ENABLE_SMARTPDPAGETESTS)
+ static void UnitTestSmartPDPage(PDPage pdPageOwnedByCaller, PDDoc pdDoc, ASInt32 nPageNum)
+ {
+ //////////////////////////////////////
+ // Test Code to test CSmartPDPage
+ // ASRaise test
+ DURING
+ {
+ CSmartPDPage pdPage(pdPageOwnedByCaller);
+ ASRaise(0);
+ }
+ HANDLER
+ END_HANDLER
+ // Method tests
+ {
+ // Constructor
+ CSmartPDPage pdPage(pdDoc, nPageNum);
+ // PDPage operator
+ CSmartPDPage pdCopy = pdPage;
+ // Copy constructor
+ CSmartPDPage pdCopy2;
+ CSmartPDPage pdCopy3(pdCopy2);
+ CSmartPDPage pdCopy4(pdCopy);
+ // Release
+ PDPageRelease(pdCopy.GiveOwnershipToCaller());
+ //Assignment operator
+ pdPage = pdCopy4;
+ pdPage = pdCopy;
+ //Assign and take ownership
+ pdPage.AssignAndTakeOwnership(pdCopy4.GiveOwnershipToCaller());
+ // Acquire page
+ pdPage.AcquirePage(pdDoc, nPageNum);
+ // Reset
+ pdPage.Reset();
+ // Destructor
+ {
+ CSmartPDPage pdPageDesTest, nullPDPageTest;
+ pdPageDesTest.AcquirePage(pdDoc, nPageNum);
+ }
+ }
+ }
+#endif /* ENABLE_SMARTPDPAGETESTS */
+
+private:
+
+#if (NEEDS_RAISEAWARE)
+ /* The volatile keyword is needed in a RAISE scenario */
+ PDPage volatile m_pdPage;
+#else
+ PDPage m_pdPage;
+#endif
+
+ /**
+ PDPage assignment operator.
+ <p>There is no clear way to handle this operator. It could be used as
+ <code>AssignAndTakeOwnership()</code> (the reference count is unchanged) or AcquirePage(),
+ where the reference count is increased by <code>1</code>. Hence we have made this
+ private so that the unambiguous APIs are explicitly used.</p>
+ @param hRhs The Page object.
+ */
+ CSmartPDPage& operator=( const PDPage& hRhs );
+
+ /**
+ Wrapper for PDPageAcquirePage(). This API assumes that there is no
+ PDPage object.
+
+ <p>In the case of an exception, the object will be set to the empty state.</p>
+
+ @param pdPage The Page object. This should not be <code>NULL</code>.
+ */
+ void AssignPage(PDPage pdPage)
+ {
+ ACROASSERT((m_pdPage == NULL) && (pdPage != NULL));
+ /* Assign and increase the refcount for the page. */
+ ASTRY
+ {
+ PDPageAcquirePage(pdPage);
+ m_pdPage = pdPage;
+ }
+ END_ASTRY;
+ }
+ /**
+ Wrapper for PDDocAcquirePage(). This API assumes that there is no
+ PDPage object.
+
+ <p>In the case of an exception, the object will be set to the empty state.</p>
+
+ @param pdDoc The PDDoc containing the page that is requested. This
+ cannot be <code>NULL</code>.
+ @param nPageNum The page number of the page that is requested. This cannot
+ be negative and should be in the page range of the document.
+ */
+ void AssignPage(PDDoc pdDoc, ASInt32 nPageNum)
+ {
+ ACROASSERT((m_pdPage == NULL) && (pdDoc != NULL) && (nPageNum >= 0));
+ /* Acquire the page. */
+ ASTRY
+ {
+ m_pdPage = PDDocAcquirePage(pdDoc, nPageNum);
+ }
+ END_ASTRY;
+ }
+};
+
+#if CPP_EXCEPTIONS
+#undef ERRFILE
+#endif
+
+#endif /* __cplusplus */
+
+#endif /* _SMARTPDPAGE_H */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFT.h
new file mode 100644
index 0000000..3cf2298
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFT.h
@@ -0,0 +1,554 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ SpellerHFT.h
+
+ - HFT definitions for Acrobat Spell Check procedures.
+
+ - Acrobat Spelling plug-in provides a spell check API. To use the
+ Spelling HFT, a plug-in must include the header file SpellerHFT.h,
+ which includes Speller_Sel.h. The plug-in must also import the HFT
+ using ASExtensionMgrGetHFT and assign the HFT returned by this call
+ to a plug-in-defined global variable named gSpellerHFT.
+
+ The easiest way to do this is to use the Init_SpellingHFT macro
+ defined below.
+
+*********************************************************************/
+
+#ifndef _H_SpellerHFT
+#define _H_SpellerHFT
+
+
+#if __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+extern HFT gSpellerHFT;
+
+#include "Speller_Sel.h"
+
+
+/* Init_SpellingHFT
+** Use this to initialize and make the Spelling HFT functions available to your plug-in.
+*/
+#define Init_SpellerHFT ASExtensionMgrGetHFT(ASAtomFromString(SpellerHFT_NAME), SpellerHFT_LATEST_VERSION)
+
+
+/* =============================== */
+/* === Spelling check services === */
+/* =============================== */
+
+/*
+** ASBool SpellCheck(AVDoc avd, const char* textBuffer, ASInt16* dialogResult, ASBool bLastBuffer, char** dictionaryArray, ASInt32 dictionaryCount)
+**
+** Call the Spelling PI to have it check a text buffer and interact with the user.
+** This service will display the Spell Check dialog.
+**
+** avd - The current active document.
+** textBuffer - The input text buffer to be checked for spelling.
+** dialogResult - see enum SpellDialogResult for possible dialog results.
+** When dialogResult == kSpellDone, the client should terminate any domain search loops.
+** bLastBuffer - when this is true, the Spelling PI will close the dialog box when the end
+** of the inTextBuffer is reached. Otherwise, the dialog will stay open
+** expecting another SpellCheck call form the same spelling client.
+** dictionaryArray - optional char* array of dictionary names to be searched
+** dictionaryCount - count of dictionary names in dictionaryArray
+**
+** Returns: - a new text buffed if the user made any changes to the inTextBuffer,
+** otherwise NULL == no changes.
+*/
+#define SpellCheck (*((SpellCheck_SELPROTO)(gSpellerHFT[SpellCheck_SEL])))
+
+/*
+** ASBool SpellCheckRTF(AVDoc avd, void* vReserved, ASText astPlainText, char** dictionaryArray, ASInt32 dictionaryCount, SCRTFChangeProc pRTFchangeProc, void* vClientData);
+**
+** Check a text buffer and receive a call back for each change as the user interacts with the Spelling dialog.
+** This service will display the Spell Check dialog.
+**
+** This service is the same as SpellCheck (above) except a call back procedure is used to see each change to the
+** plain text input buffer as it occurs.
+**
+** avd - The current active document.
+** vReserved - reserved for future use.
+** astPlainText - The input plain text buffer to be checked for spelling.
+** dictionaryArray - optional char* array of dictionary names to be searched
+** dictionaryCount - count of dictionary names in dictionaryArray
+** pRTFchangeProc - change proc, called with each user change as it occurs, see SCRTFChangeProc in Speller_Sel.h
+** vClientData - client data, passed back to caller's change proc
+**
+** Returns: - SpellDialogResult.
+*/
+#define SpellCheckRTF (*((SpellCheckRTF_SELPROTO)(gSpellerHFT[SpellCheckRTF_SEL])))
+
+/*
+** ASBool SpellCheckText(const char* textbuffer, ASUns32* startOffset, ASUns32* endOffset, char** dictionaryArray, ASInt32 dictionaryCount)
+**
+** Check the spelling of the words in a text buffer starting at startOffset and ending at endOffset.
+** This service DOES NOT display the Spell Check dialog.
+** Returns true if all the words in the range were in the current dictionaries.
+** Returns false and the startOffset and endOffset of the first misspelled word found in the text buffer.
+**
+** textbuffer - Text buffer to be checked for spelling.
+** startOffset - Spelling PI returns the starting offset of the first misspelled word
+** in the textBuffer.
+** endOffset - Spelling PI returns the ending offset of the first misspelled word
+** in the textBuffer.
+** dictionaryArray - optional char* array of dictionary names to be searched
+** dictionaryCount - count of dictionary names in dictionaryArray
+**
+** Returns: - true if all words in the buffer are correct, false if a misspelled word was found.
+**
+** Notes: typically you would call this function when you want to silently check the spelling of a text buffer.
+** AcroForms uses this call to underline unknown words in a form text field.
+*/
+#define SpellCheckText (*((SpellCheckText_SELPROTO)(gSpellerHFT[SpellCheckText_SEL])))
+
+/*
+** ASBool SpellCheckWord(AVDoc avd, const char* cWord, char** dictionaryArray, ASInt32 dictionaryCount, char** alternativeArray, ASInt32 *alternativeCount)
+**
+** Call the Spelling PI to have it check a word.
+** This service DOES NOT display the Spell Check dialog.
+**
+** avd - The current active document.
+** textBuffer - Text buffer containing the word to be checked for spelling.
+** wordLength - length of text buffer.
+** dictionaryArray - optional char* array of dictionary names to be searched
+** dictionaryCount - count of dictionary names in dictionaryArray
+** alternativeArray - optional pointer for a char* array of alternative spellings of an incorrect word if any
+** NOTE: The caller is responsible for freeing this memory.
+** alternativeCount - count of alternative words in alternativeArray
+**
+** Returns: - true if the word in the buffer is correct, false if the word is unknown.
+**
+** Notes: typically you would call this function when you want to silently check the spelling of a word.
+*/
+#define SpellCheckWord (*((SpellCheckWord_SELPROTO)(gSpellerHFT[SpellCheckWord_SEL])))
+
+/*
+** ASBool SpellCountKnownWords(const char* textBuffer, ASInt32 dictionaryCount, char** dictionaryArray, ASInt32* counterArray)
+**
+** Call the Spelling PI to have it count the known words in a text buffer.
+** This service DOES NOT display the Spell Check dialog.
+**
+** textBuffer - Text buffer.
+** dictionaryCount - count of dictionary names in dictionaryArray and counters in counterArray
+** dictionaryArray - char* array of dictionary names to be searched
+** counterArray - array of counters. For each dictionary in dictionaryArray the Spelling PI
+** will increment the corresponding counter in this array when a word is found in that
+** dictionary.
+**
+** Returns: - index of dictionary with the highest correct count, -1 on error
+**
+** Notes: typically you would call this function when you want to attempt to discover the language of a text buffer.
+*/
+#define SpellCountKnownWords (*((SpellCountKnownWords_SELPROTO)(gSpellerHFT[SpellCountKnownWords_SEL])))
+
+/*
+** ASText SpellGetNextWord(ASText inBuffer, ASText outWord, ASInt32* nStart, ASInt32* nEnd, ASBool bFilter);
+**
+** Scan a text buffer and return the next word.
+**
+** inBuffer - text buffer.
+** nStart - character offset from start of buffer, if scan is successful the offset to the word start will be returned.
+** nEnd - character offset to terminate the scan set to zero to scan to the end of the text buffer,
+** If scan is successful the offset to the character past the last character of the word will be returned.
+** To scan for the next word, set nStart to this new offset.
+** bFilter - if true, apply standard ignore filters: single character words,
+** long words (48 characters max),
+** words that have digits,
+** all UPPERCASE,
+** Roman Numerals,
+** words that have non-roman unicode (CJK) characters
+**
+** Returns: - ASText with word if one was found.
+*/
+#define SpellGetNextWord (*((SpellGetNextWord_SELPROTO)(gSpellerHFT[SpellGetNextWord_SEL])))
+
+
+/* ======================================= */
+/* === Spelling client domain handling === */
+/* ======================================= */
+
+/*
+** ASBool SpellDomainNames(char** domainArray, ASInt32 *domainCount)
+**
+** Returns an array of the current domain names.
+**
+** domainArray - the spelling plugin will allocate and return a char* array of the domain names
+** NOTE: The caller is responsible for freeing this memory.
+** domainCount - the spelling plugin will return the count of names in the array
+**
+** Returns: - true if successful; domain names if any are listed in the output domainArray.
+*/
+#define SpellDomainNames (*((SpellDomainNames_SELPROTO)(gSpellerHFT[SpellDomainNames_SEL])))
+
+/*
+** ASBool SpellAddDomain(SpellCheckParamPtr scp)
+**
+** Add a spelling domain (search scope) to the Spell Check dialog Search menu.
+**
+** Returns: - true if successful; domain name was added to the menu, false otherwise.
+*/
+#define SpellAddDomain (*((SpellAddDomain_SELPROTO)(gSpellerHFT[SpellAddDomain_SEL])))
+
+/*
+** ASBool SpellRemoveDomain(SpellCheckParamPtr scp)
+**
+** Remove a spelling domain (search scope) from the Spell Check dialog Search menu.
+**
+** Returns: - true if successful; domain name was removed to the menu, false if the domain was not in the menu.
+*/
+#define SpellRemoveDomain (*((SpellRemoveDomain_SELPROTO)(gSpellerHFT[SpellRemoveDomain_SEL])))
+
+
+/* ==================================== */
+/* === Spelling dictionary handling === */
+/* ==================================== */
+
+/*
+** ASBool SpellDictionaryNames(char** dictionaryArray, ASInt32 *dictionaryCount)
+**
+** Returns an array of the currently available dictionary names.
+**
+** dictionaryArray - the spelling plugin will allocate and return a char* array of the dictionary names
+** NOTE: The caller is responsible for freeing this memory.
+** dictionaryCount - the spelling plugin will return the count of names in the array
+**
+** Returns: - true if successful; dictionary names if any are listed in the output dictionaryArray.
+*/
+#define SpellDictionaryNames (*((SpellDictionaryNames_SELPROTO)(gSpellerHFT[SpellDictionaryNames_SEL])))
+
+/** Add Dictionary *** OBSOLETE *** **/
+/*
+** ASBool SpellAddDictionary(char* cName, char *cFile, ASBool bShow)
+**
+** *** OBSOLETE ***
+**
+** Returns: - false.
+*/
+#define SpellAddDictionary (*((SpellAddDictionary_SELPROTO)(gSpellerHFT[SpellAddDictionary_SEL])))
+
+/*
+** ASBool SpellRemoveDictionary(char* cName)
+**
+** *** OBSOLETE ***
+**
+** Returns: - false.
+*/
+#define SpellRemoveDictionary (*((SpellRemoveDictionary_SELPROTO)(gSpellerHFT[SpellRemoveDictionary_SEL])))
+
+
+/* =========================================== */
+/* === Spelling custom dictionary handling === */
+/* =========================================== */
+
+/*
+** ASBool SpellCustomDictionaryOpen(ASText astName, ASPathName filePath, ASBool bShow)
+**
+** Open a custom dictionary file and add it to the list of available dictionaries.
+**
+** astName - the dictionary name to be used in the spelling dialogs and can be
+** used as the input parameter to the SpellCheck, SpellCheckText, and SpellCheckWord methods.
+** filePath - path of the dictionary file.
+** bShow - when bShow is true, Spelling will combine the cName parameter with "User: " and show
+** that name in all lists and menus. For example if cName is "Test", Spelling will
+** add "User: Test" to all lists and menus. When bShow is false, Spelling will not show
+** this custom dictionary in any lists or menus.
+**
+** Returns: - true if successful; the dictionary is now available for use.
+*/
+#define SpellCustomDictionaryOpen (*((SpellCustomDictionaryOpen_SELPROTO)(gSpellerHFT[SpellCustomDictionaryOpen_SEL])))
+
+/*
+** ASBool SpellCustomDictionaryCreate(ASText astName, ASPathName folderPath, ASBool bShow)
+**
+** Create a custom dictionary file and add it to the list of available dictionaries.
+**
+** astName - the dictionary name to be used in the spelling dialogs and can be
+** used as the input parameter to the SpellCheck, SpellCheckText, and SpellCheckWord methods.
+** astLanguage - one of the language codes returned by SpellLanguages.
+** bShow - when bShow is true, Spelling will combine the cName parameter with "User: " and show
+** that name in all lists and menus. For example if cName is "Test", Spelling will
+** add "User: Test" to all lists and menus. When bShow is false, Spelling will not show
+** this custom dictionary in any lists or menus.
+**
+** Returns: - true if successful; the dictionary is now available for use.
+*/
+#define SpellCustomDictionaryCreate (*((SpellCustomDictionaryCreate_SELPROTO)(gSpellerHFT[SpellCustomDictionaryCreate_SEL])))
+
+/*
+** ASBool SpellCustomDictionaryClose(ASText astName)
+**
+** This method will remove a custom dictionary that was opened via SpellCustomDictionaryOpen,
+** or created via SpellCustomDictionaryCreate.
+** cName must be the same name as was used with SpellCustomDictionaryOpen or SpellCustomDictionaryCreate.
+**
+** astName - the same dictionary name that was passed to SpellCustomDictionaryOpen or SpellCustomDictionaryCreate.
+**
+** Returns: - true if successful; the dictionary is no longer available for use.
+*/
+#define SpellCustomDictionaryClose (*((SpellCustomDictionaryClose_SELPROTO)(gSpellerHFT[SpellCustomDictionaryClose_SEL])))
+
+/*
+** ASBool SpellCustomDictionaryDelete(ASText astName)
+**
+** This method will delete a custom dictionary that was opened via SpellCustomDictionaryOpen,
+** or created via SpellCustomDictionaryCreate.
+** cName must be the same name as was used with SpellCustomDictionaryOpen or SpellCustomDictionaryCreate.
+** The delete will fail if the user does not have write permission to the dictionary file.
+**
+** astName - the same dictionary name that was passed to SpellCustomDictionaryOpen or SpellCustomDictionaryCreate.
+**
+** Returns: - true if successful; the dictionary is no longer available for use.
+*/
+#define SpellCustomDictionaryDelete (*((SpellCustomDictionaryDelete_SELPROTO)(gSpellerHFT[SpellCustomDictionaryDelete_SEL])))
+
+/*
+** ASBool SpellCustomDictionaryExport(ASText astName, ASPathName folderPath, void* reserved)
+**
+** Export an open custom dictionary file to the specified directory.
+** Export will fail if the user does not have read and write permissions to the dictionary folder.
+**
+** astName - the same dictionary name that was passed to SpellCustomDictionaryOpen or SpellCustomDictionaryCreate.
+** folderPath - path of the directory where the exported custom dictionary file will be created.
+** reserved - reserved for future use.
+**
+** Returns: - true if successful; the dictionary has been exported.
+*/
+#define SpellCustomDictionaryExport (*((SpellCustomDictionaryExport_SELPROTO)(gSpellerHFT[SpellCustomDictionaryExport_SEL])))
+
+
+/* =================================== */
+/* === Spelling Languages handling === */
+/* =================================== */
+
+/*
+** ASBool SpellLanguages(char*** languageArrayPtr, ASInt32 *languageCount)
+**
+** Returns an array of the currently available dictionaries as an array of ISO 639-2 and 3166 language codes.
+**
+** languageArray - the spelling plugin will allocate and return a char* array of the language codes
+** NOTE: The caller is responsible for freeing this memory.
+** languageCount - the spelling plugin will return the count of language codes in the array
+**
+** Returns: - true if successful; language codes if any are listed in the output languageArray.
+*/
+#define SpellLanguages (*((SpellLanguages_SELPROTO)(gSpellerHFT[SpellLanguages_SEL])))
+
+/*
+** ASBool SpellUserDictionaryOrder(char*** languageArrayPtr, ASInt32 *languageCount)
+**
+** Returns the user's dictionary search order from the Spelling Preference Panel as an array of ISO 639-2 and 3166 language codes.
+**
+** languageArray - the spelling plugin will allocate and return a char* array of the language codes.
+** The order in the list is the dictionary search order from the Spelling Preferences Panel.
+** NOTE: The caller is responsible for freeing this memory.
+** languageCount - the spelling plugin will return the count of codes in the array
+**
+** Returns: - true if successful; dictionary search order names are listed in the output languageArray.
+*/
+#define SpellUserLanguageOrder (*((SpellUserLanguageOrder_SELPROTO)(gSpellerHFT[SpellUserLanguageOrder_SEL])))
+
+/*
+** ASBool SpellGetDocLanguageOrder(AVDoc avd, char*** languageArrayPtr, ASInt32 *languageCount)
+**
+** Returns the document search order as an array of ISO 639-2 and 3166 language codes.
+** If this array is NULL then Spelling will use the order defined by the user in the Spelling Preference Panel.
+** Spelling will search the document order first followed by the users' order.
+**
+** avd - The document.
+** languageArray - the spelling plugin will allocate and return a char* array of the language codes.
+** The order in the list is the dictionary search order for this document.
+** NOTE: The caller is responsible for freeing this memory.
+** languageCount - the spelling plugin will return the count of codes in the array
+**
+** Returns: - true if successful; dictionary search order names are listed in the output languageArray.
+*/
+#define SpellGetDocLanguageOrder (*((SpellGetDocLanguageOrder_SELPROTO)(gSpellerHFT[SpellGetDocLanguageOrder_SEL])))
+
+/*
+** ASBool SpellSetDocLanguageOrder(AVDoc avd, char** languageArray, ASInt32 languageCount)
+**
+** Sets the document search order from an array of ISO 639-2 and 3166 language codes.
+** If this array is NULL then Spelling will use the order defined by the user in the Spelling Preference Panel.
+** Spelling will search the document order first followed by the users' order.
+**
+** avd - The document.
+** languageArray - This required parameter is a char* array of ordered language codes to be searched
+** before searching the list specified by the user in Spelling Preferences Panel.
+** languageCount - number of language codes in the languageArray.
+** Pass zero to clear the document order list.
+**
+** Returns: - true if successful; the dictionary search order for this document has been set.
+*/
+#define SpellSetDocLanguageOrder (*((SpellSetDocLanguageOrder_SELPROTO)(gSpellerHFT[SpellSetDocLanguageOrder_SEL])))
+
+
+/* =================================== */
+/* === Spelling user word handling === */
+/* =================================== */
+
+/*
+** ASBool SpellUserWords(char* cName, ASBool bAdded, char** wordArray, ASInt32 *wordCount)
+**
+** Returns an array of the currently available dictionary names.
+**
+** cName - the dictionary name. This must be on of the dictionaries from SpellDictionaryNames.
+** bAdded - if true, the list of added words will be returned. if false, the removed words list will be returned.
+** wordArray - the spelling plugin will allocate and return a char* array of the user added/removed words
+** NOTE: The caller is responsible for freeing this memory.
+** wordCount - the spelling plugin will return the count of words in the array
+**
+** Returns: - true if successful; the user words if any are listed in the output wordArray.
+*/
+#define SpellUserWords (*((SpellUserWords_SELPROTO)(gSpellerHFT[SpellUserWords_SEL])))
+
+/*
+** ASBool SpellAddWord(char* cName, char *cWord)
+**
+** Add a word to a dictionary.
+**
+** cName - the dictionary name. An array of the currently installed dictionaries can be
+** obtained using SpellDictionaryNames.
+** cWord - the word to be added to the cName dictionary.
+**
+** Note: Internally the Spelling plug-in will scan the user "Not-A-Word" dictionary and remove the word
+** if it is listed there. Otherwise, the word is added to the user dictionary.
+** The actual dictionary is not modifed.
+**
+** Returns: - true if successful; the dictionary is now available for use.
+*/
+#define SpellAddWord (*((SpellAddWord_SELPROTO)(gSpellerHFT[SpellAddWord_SEL])))
+
+/*
+** ASBool SpellRemoveWord(char* cName, char *cWord)
+**
+** Remove a word from a dictionary.
+**
+** cName - the dictionary name. An array of the currently installed dictionaries can be
+** obtained using SpellDictionaryNames.
+** cWord - the word to be removed to the cName dictionary.
+**
+** Note: Internally the Spelling plug-in will scan the user dictionary and remove the previously added
+** word if it is there. Otherwise the word will be added to the userÕs "Not-A-Word" dictionary.
+** The actual dictionary is not modifed.
+**
+** Returns: - true if successful; the dictionary is now available for use.
+*/
+#define SpellRemoveWord (*((SpellRemoveWord_SELPROTO)(gSpellerHFT[SpellRemoveWord_SEL])))
+
+/*
+** Ignore a word in a document.
+**
+** avd - The document.
+** cWord - the word to be ingored. The input string is PDText which is either a big-endian
+** Unicode string pre-pended with the bytes 0xFE 0xFF or a string with PDFDocEncoding.
+** In either case the string is expected to have the appropriate NULL-termination.
+**
+** Returns: - true if successful; the word will be ignored.
+*/
+#define SpellIgnoreAll (*((SpellIgnoreAll_SELPROTO)(gSpellerHFT[SpellIgnoreAll_SEL])))
+
+
+/* ======================================== */
+/* === Spelling dictionary search order === */
+/* ======================================== */
+
+/*
+** ASBool SpellUserDictionaryOrder(char** dictionaryArray, ASInt32 *dictionaryCount)
+**
+** Returns the user's dictionary search order from the Spelling Preference Panel.
+**
+** dictionaryArray - the spelling plugin will allocate and return a char* array of the dictionary names.
+** The order in the list is the dictionary search order from the Spelling Preferences Panel.
+** NOTE: The caller is responsible for freeing this memory.
+** dictionaryCount - the spelling plugin will return the count of names in the array
+**
+** Returns: - true if successful; dictionary search order names are listed in the output dictionaryArray.
+*/
+#define SpellUserDictionaryOrder (*((SpellUserDictionaryOrder_SELPROTO)(gSpellerHFT[SpellUserDictionaryOrder_SEL])))
+
+/*
+** ASBool SpellGetDocDictionaryOrder(AVDoc avd, char** dictionaryArray, ASInt32 *dictionaryCount)
+**
+** Returns the document search order if any. If this array is NULL then Spelling will use the order defined by the user
+** in the Spelling Preference Panel. Spelling will search the document order first followed by the users' order.
+**
+** avd - The document.
+** dictionaryArray - the spelling plugin will allocate and return a char* array of the dictionary names.
+** The order in the list is the dictionary search order for this document.
+** NOTE: The caller is responsible for freeing this memory.
+** dictionaryCount - the spelling plugin will return the count of names in the array
+**
+** Returns: - true if successful; dictionary search order names are listed in the output dictionaryArray.
+*/
+#define SpellGetDocDictionaryOrder (*((SpellGetDocDictionaryOrder_SELPROTO)(gSpellerHFT[SpellGetDocDictionaryOrder_SEL])))
+
+/*
+** ASBool SpellSetDocDictionaryOrder(AVDoc avd, char** dictionaryArray, ASInt32 dictionaryCount)
+**
+** Sets the document search order. If this array is NULL then Spelling will use the order defined by the user
+** in the Spelling Preference Panel. Spelling will search the document order first followed by the users' order.
+**
+** avd - The document.
+** dictionaryArray - This required parameter is a char* array of ordered dictionary names to be searched
+** before searching the list specified by the user in Spelling Preferences Panel.
+** dictionaryCount - number of dictionaries in the dictionaryArray.
+** Pass zero to clear the document order list.
+**
+** Returns: - true if successful; the dictionary search order for this document has been set.
+*/
+#define SpellSetDocDictionaryOrder (*((SpellSetDocDictionaryOrder_SELPROTO)(gSpellerHFT[SpellSetDocDictionaryOrder_SEL])))
+
+/** Call the Spelling plug-in to have it hyphenate a word.
+
+ <p>Sets the document search order. If this array is <code>NULL</code>, Spelling will use the order defined by the user
+ in the Spelling Preferences panel. Spelling will search the document order first followed by the users' order.</p>
+
+ @example
+ <p><code>HyphenationRecordPtr hyphenArray = NULL; </code></p>
+ <p><code>ASInt32 nHyphenations = SpellHyphenateWord(avd, cWord, <code>NULL</code>, 0, &hyphenArray); </code></p>
+ <p><code>for (ASInt32 nIndex = 0; nIndex < nHyphenations; nIndex++) { </code></p>
+ <p><code> HyphenationRecordPtr pHyphenRecord = hyphenArray[nIndex]; </code></p>
+ <p><code> if (pHyphenRecord->eType == kHyphenType_preferred) { </code></p>
+ <p><code> char* cLeft = ASTextGetEncodedCopy(pHyphenRecord->astLeft, ASHostEncoding(PDGetHostEncoding())); </code></p>
+ <p><code> char* cRight = ASTextGetEncodedCopy(pHyphenRecord->astRight, ASHostEncoding(PDGetHostEncoding())); </code></p>
+ <p><code> } </code></p>
+ <p><code>} // don't forget to free cLeft, cRight, each element of hyphenArray and the hyphenArray itself. </code></p>
+
+
+ @param avd IN The document.
+ @param astWord IN ASText containing the word to be hyphenated.
+ @param dictionaryArray IN An optional array of dictionary names to be used for hyphenation.
+ When provided, this dictionary list overrides the default dictionary list for this document.
+ Use SpellDictionaryNames() to obtain a list of the currently available dictionaries.
+ The dictionary names are PDText which is either a big-endian Unicode string prepended with the
+ bytes <code>0xFE 0xFF</code>, or a string with PDFDocEncoding. In either case the
+ string is expected to have the appropriate <code>NULL</code>-termination.
+ @param dictionaryCount IN A count of dictionary names in <code>dictionaryArray</code>
+ @param hyphenationArrayPtr IN An optional pointer for an an arrray of HyphenationRecord pointers, if any.
+ Note that the caller is responsible for freeing this memory.
+
+ @return The count of hyphenations for this word.
+
+
+#define SpellHyphenateWord (*((SpellHyphenateWord_SELPROTO)(gSpellerHFT[SpellHyphenateWord_SEL])))
+*/
+
+#if __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _H_SpellerHFT */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFTProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFTProcs.h
new file mode 100644
index 0000000..7aa0017
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SpellerHFTProcs.h
@@ -0,0 +1,82 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ SpellerHFT.h
+
+ - HFT definitions for Acrobat Spell Check procedures.
+
+ - Acrobat Spelling plug-in provides a spell check API. To use the
+ Spelling HFT, a plug-in must include the header file SpellerHFT.h,
+ which includes Speller_Sel.h. The plug-in must also import the HFT
+ using ASExtensionMgrGetHFT and assign the HFT returned by this call
+ to a plug-in-defined global variable named gSpellerHFT.
+
+ The easiest way to do this is to use the Init_SpellingHFT macro
+ defined below.
+
+*********************************************************************/
+
+/* Init_SpellingHFT
+** Use this to initialize and make the Spelling HFT functions available to your plug-in.
+*/
+#if !defined(Init_SpellerHFT)
+#define Init_SpellerHFT ASExtensionMgrGetHFT(ASAtomFromString(SpellerHFT_NAME), SpellerHFT_LATEST_VERSION)
+#endif
+
+/* =============================== */
+/* === Spelling check services === */
+/* =============================== */
+
+PIPROC(char*, SpellCheck, (AVDoc avd, const char* textBuffer, ASInt16* dialogResult, ASBool bReserved, char** dictionaryArray, ASInt32 dictionaryCount), avd, textBuffer, dialogResult, bReserved, dictionaryArray, dictionaryCount)
+PIPROC(ASBool, SpellCheckText,(AVDoc avd, const char* textBuffer, ASUns32* startOffset, ASUns32* endOffset, char** dictionaryArray, ASInt32 dictionaryCount),avd, textBuffer, startOffset, endOffset, dictionaryArray, dictionaryCount)
+PIPROC(ASBool, SpellCheckWord, (AVDoc avd, const char* cWord, char** dictionaryArray, ASInt32 dictionaryCount, char*** alternativeArrayPtr, ASInt32 *alternativeCount), avd, cWord, dictionaryArray, dictionaryCount, alternativeArrayPtr, alternativeCount)
+
+PIPROC(ASBool, SpellDomainNames, (char*** domainArrayPtr, ASInt32 *domainCount), domainArrayPtr, domainCount)
+PIPROC(ASBool, SpellAddDomain, (SpellCheckParamPtr scp), scp)
+PIPROC(ASBool, SpellRemoveDomain, (SpellCheckParamPtr scp), scp)
+
+PIPROC(ASBool, SpellDictionaryNames, (char*** dictionaryArrayPtr, ASInt32 *dictionaryCount), dictionaryArrayPtr, dictionaryCount)
+PIPROC(ASBool, SpellAddDictionary, (char* cName, char *cFile, ASBool bShow), cName, cFile, bShow)
+PIPROC(ASBool, SpellRemoveDictionary, (char* cName), cName)
+
+PIPROC(ASBool, SpellUserWords, (ASBool bAdded, char*** wordArrayPtr, ASInt32 *wordCount), bAdded, wordArrayPtr, wordCount)
+PIPROC(ASBool, SpellAddWord, (char *cWord), cWord)
+PIPROC(ASBool, SpellRemoveWord, (char *cWord), cWord)
+
+PIPROC(ASBool, SpellUserDictionaryOrder, (char*** dictionaryArrayPtr, ASInt32 *dictionaryCount), dictionaryArrayPtr, dictionaryCount)
+PIPROC(ASBool, SpellGetDocDictionaryOrder, (AVDoc avd, char*** dictionaryArrayPtr, ASInt32 *dictionaryCount), avd, dictionaryArrayPtr, dictionaryCount)
+PIPROC(ASBool, SpellSetDocDictionaryOrder, (AVDoc avd, char** dictionaryArray, ASInt32 dictionaryCount), avd, dictionaryArray, dictionaryCount)
+
+PIPROC(ASInt32, SpellCountKnownWords, (const char* textBuffer, ASInt32 dictionaryCount, char** dictionaryArray, ASInt32* counterArray), textBuffer, dictionaryCount, dictionaryArray, counterArray)
+
+PIPROC(ASBool, SpellIgnoreAll, (AVDoc avd, char *cWord), avd, cWord)
+
+PIPROC(ASInt32, SpellHyphenateWord, (AVDoc avd, const ASText astWord, char** dictionaryArray, ASInt32 dictionaryCount, HyphenationRecordPtr* hyphenationArrayPtr), avd, astWord, dictionaryArray, dictionaryCount, hyphenationArrayPtr)
+
+PIPROC(ASText, SpellGetNextWord, (ASConstText inBuffer, ASInt32* nStart, ASInt32* nEnd, ASBool bFilter), inBuffer, nStart, nEnd, bFilter)
+
+PIPROC(ASInt32, SpellCheckRTF, (AVDoc avd, void* vReserved, ASText astPlainText, char** dictionaryArray, ASInt32 dictionaryCount, SCRTFChangeProc pRTFchangeProc, void* vClientData),avd, vReserved, astPlainText, dictionaryArray, dictionaryCount, pRTFchangeProc, vClientData)
+
+PIPROC(ASBool, SpellLanguages, (char*** languageArrayPtr, ASInt32 *languageCount), languageArrayPtr, languageCount)
+PIPROC(ASBool, SpellUserLanguageOrder, (char*** languageArrayPtr, ASInt32 *languageCount), languageArrayPtr, languageCount)
+PIPROC(ASBool, SpellGetDocLanguageOrder, (AVDoc avd, char*** languageArrayPtr, ASInt32 *languageCount), avd, languageArrayPtr, languageCount)
+PIPROC(ASBool, SpellSetDocLanguageOrder, (AVDoc avd, char** languageArray, ASInt32 languageCount), avd, languageArray, languageCount)
+
+PIPROC(ASBool, SpellCustomDictionaryClose, (ASText astName), astName)
+PIPROC(ASBool, SpellCustomDictionaryCreate, (ASText astName, ASText astLanguage, ASBool bShow), astName, astLanguage, bShow)
+PIPROC(ASBool, SpellCustomDictionaryDelete, (ASText astName), astName)
+PIPROC(ASBool, SpellCustomDictionaryExport,(ASText astName, ASPathName folderPath, void* reserved), astName, folderPath, reserved)
+PIPROC(ASBool, SpellCustomDictionaryOpen, (ASText astName, ASPathName filePath, ASBool bShow), astName, filePath, bShow)
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Speller_Sel.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Speller_Sel.h
new file mode 100644
index 0000000..0474031
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/Speller_Sel.h
@@ -0,0 +1,380 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ Speller_Sel.h
+
+ - Selectors for all Spelling HFT functions.
+
+*********************************************************************/
+
+#ifndef _H_Speller_SEL
+#define _H_Speller_SEL
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+/* For creating selector (index to HFT)
+*/
+#ifdef PIPROC
+#undef PIPROC
+#endif
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+
+/* This defines enum for selectors
+*/
+typedef enum {
+ SpellerFirst_SEL = 0,
+#include "SpellerHFTProcs.h"
+ SpellerLast_SEL
+} SpellProcSelectors;
+#undef PIPROC
+
+#define SpellerNum_SEL SpellerLast_SEL - 1
+#define SpellerHFT_NAME "Spell"
+#define SpellerHFT_VERSION_1_1 0x00010001
+#define SpellerHFT_VERSION_1_2 0x00010002
+#define SpellerHFT_VERSION_1_3 0x00010003
+#define SpellerHFT_LATEST_VERSION SpellerHFT_VERSION_1_3
+
+#define kSpellLastBuffer true
+#define kSpellNotLastBuffer false
+#define kSpellMaxName 48
+
+/** Possible results of the spell check when the SpellCheck() method is called.
+ @see SpellCheck
+*/
+enum SpellDialogResult
+{
+ /** The user clicked the Done button to dismiss the dialog box and
+ did not complete the spell check, but may have made
+ changes to the text buffer.
+ */
+ kSpellDone = 0,
+
+ /** The user completed spell checking the input buffer, or all
+ words were correct. A new text buffer is returned if
+ corrections where made.
+ */
+ kSpellCompleted,
+
+ /** The spell check dialog box failed due to an internal error. */
+ kSpellFailed = -1,
+
+ /** */
+ kSpellResultLast
+};
+
+/** SpellingDomainFlags
+ Valid values for the <code>scFlags</code> field of the <code>SpellCheckParam</code> block. For Acrobat 5 and
+ higher, all clients should set this field to kSpellFlagAllDomain. All other bits in this
+ flag are reserved for future use. The spelling client's private data and flags can be stored in the
+ <code>scClientData</code> field.
+*/
+enum SpellDomainFlags
+{
+ /** Default domain behavior. */
+ kSpellFlagNone = 0x0000,
+ /** For Acrobat 5 and later, all registered spelling domains
+ should set this flag. Only the All domains are called by
+ spelling when the user clicks the Start button on the
+ Spell Check dialog box.
+ */
+ kSpellFlagAllDomain = 0x0001,
+ /** Announce to the client that the spell dialog box has just been popped. */
+ kSpellCheckStart = 0x0002,
+ /** */
+ kSpellFlagLast = 0xFFFF
+};
+
+
+/** This parameter block is used for communication between the Spelling plug-in and a client
+plug-in. The client must allocate it, initialize all fields, and pass it to the Spelling plug-in
+when adding a domain with SpellAddDomain(). Spelling passes it back to the client when
+the SCEnableProc(), SCGetTextProc(), and SCCompletionProc() are called.
+It is passed to the client's SCGetTextProc() from the Spelling plug-in when it needs to
+request a text buffer from the client. After the user has completed the spell check on the
+<code>scInBuffer</code>, this same parameter block is passed to the client's
+SCCompletionProc() with the result of the spell check in <code>scOutBuffer</code>.
+When the SCGetTextProc() is called, <code>scPageNum</code>, <code>scIndex</code> and <code>scAVDoc</code> are filled in
+by the Spelling plugin.
+
+<p>The SCGetTextProc should fill in <code>scInBuffer</code> and clear scOutBuffer if it is not
+already <code>NULL</code>.</p>
+
+<p>When the spell check is completed, SCCompletionProc() is called with <code>scOutBuffer</code> if
+the user made changes to <code>scInBuffer</code>.</p>
+Note that the spelling client is responsible for all memory allocated including the
+<code>scOutBuffer</code> returned from the Spelling plug-in.
+The client is responsible for all parameters except where indicated.
+*/
+typedef struct SpellCheckParam SpellCheckParam;
+/** */
+typedef SpellCheckParam * SpellCheckParamPtr;
+
+
+/* ---- Spell Check CallBack Procs ---- */
+/** */
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *SCInitProc)(void* clientData);
+/** */
+typedef ACCBPROTO1 void (ACCBPROTO2 *SCTermProc)(void* clientData);
+
+/**
+ Called by the Spelling plug-in to determine whether the
+ Spelling menu items and toolbar button should be enabled.
+ An SCEnableProc() must be provided for each domain a plug-in
+ registers with SpellAddDomain().
+ @param scp The Spelling plug-in passes this SpellCheckParam
+ parameter block (which the client set up in SpellAddDomain())
+ to the SCEnableProc() after the spell check is complete. The
+ result of the spell check is in <code>scOutBuffer</code>.
+ @return <code>true</code> if spell checking can be performed on
+ the <code>scName</code> domain.
+ @see SCCompletionProc
+ @see SCGetTextProc
+ @see SpellAddDomain
+ @see SpellRemoveDomain
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *SCEnableProc)(SpellCheckParamPtr scp);
+
+/**
+ This procedure is called by Spelling to request a text buffer
+ to be checked by the user in the Spelling dialog box.
+ @param scp The Spelling plug-in passes this SpellCheckParam
+ parameter block, which the client set up in SpellAddDomain(),
+ to the SCGetTextProc() to request a text buffer. The Spelling
+ plug-in will fill in the <code>scAVDoc</code>, <code>scPageNum</code>, and <code>scIndex</code>
+ members. SCGetTextProc() should return a text buffer in <code>scInBuffer</code>.
+ @return This callback should pass back a text buffer to be checked
+ in the <code>scInBuffer</code> member of <code>scp</code>, and return <code>true</code>. Spelling
+ will call the client's SCCompletionProc() after the user has
+ processed this buffer.
+
+ <p>If there is no more data to be checked on this page, SCGetTextProc
+ should return <code>false</code> and set <code>scInBuffer</code> to <code>NULL</code>. </p>
+ @see SCCompletionProc
+ @see SCEnableProc
+ @see SpellAddDomain
+ @see SpellRemoveDomain
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *SCGetTextProc)(SpellCheckParamPtr scp);
+
+/**
+ An SCCompletionProc() must be provided for each domain a plug-in
+ registers with SpellAddDomain(). It is called by the Spelling
+ plug-in when the user has completed the spell check.
+ @param scp The SpellCheckParam parameter block (which
+ the client set up in SpellAddDomain()) passed to the client
+ by the Spelling plug-in after the spell check of <code>scInBuffer</code>
+ is complete. This procedure will be called with <code>scOutBuffer</code>
+ filled in by the Spelling plug-in if the user made changes
+ to <code>scInBuffer</code> (<code>scOutBuffer</code> could be <code>NULL</code>).
+ @return <code>true</code> if the changes were successfully committed.
+
+ @note In the current version of the Spelling plug-in, this
+ value is ignored.
+ @see SCEnableProc
+ @see SCGetTextProc
+ @see SpellAddDomain
+ @see SpellRemoveDomain
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *SCCompletionProc)(SpellCheckParamPtr scp);
+
+/** Called by the Spelling plug-in each time <code>scOutBufferAStext</code> is about to change.
+ An SCChangeProc() is optional.
+ @param scp IN The SpellCheckParam parameter block (which the client set up in
+ SpellAddDomain()) passed to the client by the Spelling plug-in when
+ the user makes a change to the <code>scInBufferASText</code>. When called, <code>scOutBufferAStext</code>
+ is about to be changed and <code>scChangeStart</code> and <code>scChangeEnd</code> are
+ set to the the character offsets of the change from the start of <code>scOutBufferAStext</code>,
+ and <code>scChangeText</code> is the new text that will replace the current text in the range.
+ @return TBD
+ @exception None
+ @see SCEnableProc
+ @see SCGetTextProc
+ @see SpellAddDomain
+ @see SpellRemoveDomain
+ @see SCCompletionProc
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *SCChangeProc)(SpellCheckParamPtr scp);
+
+/** Callback proc for SpellCheckRTF.
+ This proc is called each time the user changes something in the original input buffer.
+ This allows the caller of SpellCheckRTF() to track text changes to a rich text buffer and
+ overlay the plain text change onto the rich text spans to perserve formatting.
+
+ @param vReserved IN Reserved for future use.
+ @param astNewText IN The new plain text of the change
+ @param nStartIndex IN The character offset from the start of the current plain text buffer of the change start.
+ @param nEndIndex IN The character offset from the start of the current plain text buffer of the change end.
+ @param vData IN The client data.
+ @return <code>true</code> to continue the dialog with user, <code>false</code> to terminate.
+ @see SpellCheckRTF
+*/
+typedef ACCBPROTO1 ASBool (ACCBPROTO2 *SCRTFChangeProc)(void* vReserved, ASConstText astNewText, ASInt32 nStartIndex, ASInt32 nEndIndex, void *vData);
+
+#define kSCparam_VERSION_1 0x0001
+#define kSCparam_VERSION_2 0x0002 /* Acrobat 6 and earlier */
+#define kSCparam_VERSION_3 0x0003 /* Acrobat 7: scMenuText added */
+#define kSCparam_LATEST_VERSION kSCparam_VERSION_3
+
+/** Spell Check parameters
+ This parameter block is used for communication between the Spelling plug-in and a
+ client plug-in. The client must allocate it, initialize all fields, and pass it to the Spelling
+ plug-in when adding a domain with SpellAddDomain. Spelling passes it back to the
+ client when the SCEnableProc(), SCGetTextProc(), and SCCompletionProc() are
+ called.
+
+ <p>It is passed to the client's SCGetTextProc() from the Spelling plug-in when it needs to
+ request a text buffer from the client. After the user has completed the spell check on
+ the <code>scInBuffer</code>, this same parameter block is passed to the client's
+ SCCompletionProc() with the result of the spell check in <code>scOutBuffer</code>.
+ When the SCGetTextProc() is called, <code>scPageNum</code>, <code>scIndex</code> and <code>scAVDoc</code> are filled
+ in by the Spelling plugin.</p>
+
+ <p>The SCGetTextProc should fill in <code>scInBuffer</code> and clear <code>scOutBuffer</code> if it is not
+ already <code>NULL</code>.</p>
+
+ <p>When the spell check is completed, SCCompletionProc() is called with <code>scOutBuffer</code>
+ if the user made changes to <code>scInBuffer</code>.</p>
+
+ Note that the spelling client is responsible for all memory allocated including the
+ <code>scOutBuffer</code> returned from the Spelling plug-in.
+ The client is responsible for all parameters except where indicated.
+*/
+struct SpellCheckParam {
+ /** Version number of this structure (kSCparam_LATEST_VERSION). */
+ ASInt16 scVersion;
+ /** Domain control flags; see SpellDomainFlags. It should normally be set to kSpellFlagAllDomain. */
+ ASInt16 scFlags;
+ /** This name will be returned by SpellDomainNames(). */
+ char scName[kSpellMaxName];
+
+ /** */
+ SCEnableProc scEnableProc;
+
+ /** */
+ SCGetTextProc scGetTextProc;
+ /** */
+ SCCompletionProc scCompletionProc;
+
+ /** (Passed by Spelling plug-in) The active AVDoc during this Spell Check session. */
+ AVDoc scAVDoc;
+ /** (Passed by Spelling plug-in) The 0-based PDDoc page number of <code>scAVDoc</code>. */
+ ASInt32 scPageNum;
+ /** (Passed by Spelling plug-in) The 0-based index of this domain item.
+ The Spelling plug-in will set <code>scIndex</code> to zero to start or restart, and request the first text buffer from
+ this domain on <code>scPageNum</code>.
+
+ <p>The Spelling plug-in will increment <code>scIndex</code> after each call to <code>scGetTextProc</code>.
+ The client can increment <code>scIndex</code> if desired to track non-sequential domain items. </p>
+ */
+ ASInt32 scIndex;
+ /** The text buffer from the client to the Spelling plug-in when scGetTextProc() is called by the Spelling plug-in. */
+ char * scInBuffer;
+ /** (Passed by Spelling plug-in) The buffer returned from the
+ Spelling plug-in to scCompletionProc().
+ Note that the client must release this memory.
+ */
+ char * scOutBuffer;
+ /** Can be used by the client to store private state data. The
+ client is responsible for allocating memory where necessary.
+ */
+ void * scClientData;
+
+/* new with version kSCparam_VERSION_2... */
+ /** The text buffer from the client to the Spelling plug-in when <code>scGetTextProc</code> is called by the Spelling plug-in.
+ Note that the client must release this memory.
+ */
+ ASText scInBufferASText;
+ /** Returned buffer from Spelling PI to scCompletionProc().
+ @note This memory is owned by the Spelling plug-in. Do not free it.
+ */
+ ASConstText scOutBufferAStext;
+ /** This optional callback will be invoked each time <code>scOutBufferAStext</code> is about to change. */
+ SCChangeProc scChangeProc;
+ /** New text that will replace the text from scChangeStart to <code>scChangeEnd</code>.
+ @note This memory is owned by the Spelling plug-in. Do not free it.
+ */
+ ASConstText scChangeText;
+ /** Character offset of the start of the change when scChangeProc() is called */
+ ASInt32 scChangeStart;
+ /** Character offset of the end of the change when scChangeProc() is called */
+ ASInt32 scChangeEnd;
+
+ /*new with version kSCparam_VERSION_3... */
+ /** The menu title in case this is the only enabled domain (for example, <b>"In Form Fields..."</b> or <b>"In Comments..."</b>). */
+ ASConstText scMenuTitle;
+};
+
+/* ================================== */
+/* === Hyphenation check services === */
+/* ================================== */
+
+/** The types of hyphenations. */
+enum {
+ /** */
+ kHyphen_all = -1,
+ /** */
+ kHyphenType_preferred = 0,
+ /** */
+ kHyphenType_normal,
+ /** */
+ kHyphenType_nonpreferred
+};
+typedef ASEnum16 eHyphenType;
+
+/**
+ The hyphenation record.
+ <p>One of these is returned by HyphenateWord() in the optional hyphenation array for each known hyphenation.</p>
+*/
+struct _t_HyphenationRecord {
+ /** The type of hyphenation: preferred, normal, or non-preferred. */
+ eHyphenType eType;
+ /** The hyphen index. The hyphen should follow this character. */
+ ASInt32 nPosition;
+ /** The word part before the hyphen. */
+ ASText astLeft;
+ /** The word part after the hyphen. */
+ ASText astRight;
+};
+/** */
+typedef struct _t_HyphenationRecord HyphenationRecord;
+/** */
+typedef HyphenationRecord * HyphenationRecordPtr;
+
+/* ======================================= */
+/* ======== Spelling HFT services ======== */
+/* ======================================= */
+
+/* Define API/Function prototypes
+*/
+#ifdef PIPROC
+#undef PIPROC
+#endif
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+#include "SpellerHFTProcs.h"
+#undef PIPROC
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif /* _H_Speller_SEL */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchClls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchClls.h
new file mode 100644
index 0000000..90b811e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchClls.h
@@ -0,0 +1,53 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ SrchClls.h
+
+*********************************************************************/
+
+#ifndef _H_SrchClls
+#define _H_SrchClls
+
+#ifdef DEBUG_EXTENSIONS
+#undef PRODUCT
+#define PRODUCT "Plugin.h"
+#endif
+
+#include "SrchType.h"
+#include "SrchHFT.h"
+
+#define SearchExecuteQuery (*((SearchExecuteQuery_SELPROTO)(gSearchHFT[SearchExecuteQuery_SEL])))
+#define SearchGetIndexList (*((SearchGetIndexList_SELPROTO)(gSearchHFT[SearchGetIndexList_SEL])))
+#define SearchCountIndexList (*((SearchCountIndexList_SELPROTO)(gSearchHFT[SearchCountIndexList_SEL])))
+#define SearchGetNthIndex (*((SearchGetNthIndex_SELPROTO)(gSearchHFT[SearchGetNthIndex_SEL])))
+#define SearchGetIndexByPath (*((SearchGetIndexByPath_SELPROTO)(gSearchHFT[SearchGetIndexByPath_SEL])))
+#define SearchAddIndex (*((SearchAddIndex_SELPROTO)(gSearchHFT[SearchAddIndex_SEL])))
+#define SearchRemoveIndex (*((SearchRemoveIndex_SELPROTO)(gSearchHFT[SearchRemoveIndex_SEL])))
+#define SearchGetIndexFlags (*((SearchGetIndexFlags_SELPROTO)(gSearchHFT[SearchGetIndexFlags_SEL])))
+#define SearchSetIndexFlags (*((SearchSetIndexFlags_SELPROTO)(gSearchHFT[SearchSetIndexFlags_SEL])))
+#define SearchGetIndexTitle (*((SearchGetIndexTitle_SELPROTO)(gSearchHFT[SearchGetIndexTitle_SEL])))
+#define SearchGetIndexPath (*((SearchGetIndexPath_SELPROTO)(gSearchHFT[SearchGetIndexPath_SEL])))
+
+#define SearchGetIndexByPathEx (*((SearchGetIndexByPathEx_SELPROTO)(gSearchHFT[SearchGetIndexByPathEx_SEL])))
+#define SearchAddIndexEx (*((SearchAddIndexEx_SELPROTO)(gSearchHFT[SearchAddIndexEx_SEL])))
+#define SearchGetIndexTitleEx (*((SearchGetIndexTitleEx_SELPROTO)(gSearchHFT[SearchGetIndexTitleEx_SEL])))
+#define SearchGetIndexPathEx (*((SearchGetIndexPathEx_SELPROTO)(gSearchHFT[SearchGetIndexPathEx_SEL])))
+#define SearchGetIndexFileSys (*((SearchGetIndexFileSys_SELPROTO)(gSearchHFT[SearchGetIndexFileSys_SEL])))
+
+#define SearchIsLegacySearchAvailable (*((SearchIsLegacySearchAvailable_SELPROTO)(gSearchHFT[SearchIsLegacySearchAvailable_SEL])))
+#define SearchExecuteQueryEx (*((SearchExecuteQueryEx_SELPROTO)(gSearchHFT[SearchExecuteQueryEx_SEL])))
+
+#endif
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchHFT.h
new file mode 100644
index 0000000..88c54b1
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchHFT.h
@@ -0,0 +1,56 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ SrchHFT.h
+
+ - Catalog of functions exported by Acrobat Search.
+
+*********************************************************************/
+
+#ifndef _H_SrchHFT
+#define _H_SrchHFT
+
+#include "SrchType.h"
+
+/* Extension name : "Search" */
+
+#define SearchHFT_NAME "Search"
+#define SearchHFT_LATEST_VERSION (0L)
+
+#define Init_SearchHFT ASExtensionMgrGetHFT(ASAtomFromString(SearchHFT_NAME), SearchHFT_LATEST_VERSION)
+
+/* Enumerate the selectors */
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+
+typedef enum _SearchSelector {
+ SearchBAD_SELECTOR,
+ #include "SrchPrcs.h"
+ SearchNUMSELECTORSplusOne
+} SearchSelector;
+
+#undef PIPROC
+
+#define SearchNUMSELECTORS (SearchNUMSELECTORSplusOne - 1)
+
+
+/* Define API/Function prototypes
+*/
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+#include "SrchPrcs.h"
+#undef PIPROC
+
+extern HFT gSearchHFT;
+extern ASBool SetUpSearchHFTServer(void);
+#endif
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchPrcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchPrcs.h
new file mode 100644
index 0000000..bf8e1f5
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchPrcs.h
@@ -0,0 +1,344 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ SrchPrcs.h
+
+ - Catalog of functions exported by Acrobat Search.
+
+*********************************************************************/
+
+/**
+ Superseded in Acrobat 6.0 by SearchExecuteQueryEx(),
+ which allows a broader range of search locations.
+
+ <p>Executes a specified query, using the set of indices currently
+ on the shelf. The search results are displayed in the Acrobat
+ Search plug-in's Results window. </p>
+
+ @param cQuery The query. Its format is the same as what
+ a user would type into the Search query dialog, and depends
+ on the search language specified by <code>parserID</code>.
+ @param nParserID The search language used in the query.
+ It must be one of the following values (see SrchType.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kParserSimple</TD><TD>Allows only simple phrase searches; it does not allow boolean searching.</TD></TR>
+ <TR><TD>kParserCQL</TD><TD>Allows boolean searches using <code>AND</code>, <code>OR</code>, and <code>NOT</code>, as described in the Acrobat Search plug-in's online help file.</TD></TR>
+ <TR><TD>kParserBPlus</TD><TD>The Verity BooleanPlus query language. Contact Verity for further information on this language.</TD></TR>
+ </TABLE>
+
+ @param nSortCount The number of entries in the <code>sortSpec</code>
+ list.
+ @param cSortNames An array of strings, each specifying a
+ key whose value is used to sort the search results. The
+ first entry is the primary sort key, the second is the secondary
+ sort key, and so forth. Each string may be any field that
+ appears in the index, plus <code>Score</code> (which sorts results by
+ relevance ranking). Some common fields are <code>Title</code>, <code>ModificationDate</code>,
+ <code>CreationDate</code>, and <code>Keywords</code>.
+ @param bSortWays An array of boolean values indicating sort order,
+ corresponding to the array of sortSpecs with <code>true</code> meaning ascending and
+ <code>false</code> meaning descending.
+ @param nWordOptions Search options. It must be an <code>OR</code> of the
+ following values (see SrchType.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kWordOptionCase</TD><TD>The search is case-sensitive.</TD></TR>
+ <TR><TD>kWordOptionStemming</TD><TD>Find not only the specified word, but other words that have the same stem (for example, <code>run</code> and <code>ran</code> have the same stem).</TD></TR>
+ <TR><TD>kWordOptionSoundsLike</TD><TD>Find not only the specified word, but other words that sound like it.</TD></TR>
+ <TR><TD>kWordOptionThesaurus</TD><TD>Find not only the specified word, but other words that have the same meaning.</TD></TR>
+ <TR><TD>kWordOptionProximity</TD><TD>Consider the proximity of results
+ when using the <code>AND</code> operator to look for more than one word
+ in a document. Without this option, <code>AND</code>ed terms can be anywhere
+ in a document. Searching for <code>"red"</code> and <code>"blue"</code>, for example,
+ finds a document where <code>"red"</code> is the first word on the first
+ page and <code>"blue"</code> is the last word on the last page.
+ With this option, however, <code>AND</code>ed terms must be within two
+ or three pages of each other to be found. Also, the closer
+ <code>AND</code>ed terms appear together, the higher the relevance ranking
+ of the document that contains them. </TD></TR>
+ <TR><TD>kWordOptionRefine</TD><TD>Do not search the entire list of indices, but only the
+ documents that matched the previous search. This is used
+ to refine the results of the previous search. The manner
+ in which <code>wordOptions</code> is used depends on the value of <code>overrideWordOptions</code>.</TD></TR>
+ </TABLE>
+
+ @param bOverrideWordOptions Flag that indicates whether
+ <code>wordOptions</code> is <code>OR</code>ed with the search options set in the user
+ interface, or is used instead of them. If it is <code>0</code>, <code>wordOptions</code> is
+ <code>OR</code>ed with the user interface search options, and the resulting
+ value is used. If it is non-zero, <code>wordOptions</code> is used instead
+ of the user interface search options.
+ @param nMaxDocs The maximum number of documents to display
+ in the Results window. If more documents than this have
+ hits, only the first maxDocs are displayed. <code>maxDocs</code> must
+ be no greater than <code>9999</code>.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+*/
+PIPROC(ASInt32, SearchExecuteQuery, (char *cQuery, ASInt16 nParserID, ASUns16 nSortCount, char **cSortNames, ASBool *bSortWays, ASUns32 nWordOptions, ASBool bOverrideWordOptions, ASUns16 nMaxDocs), cQuery, nParserID, nSortCount, cSortNames, bSortWays, nWordOptions, bOverrideWordOptions, nMaxDocs)
+/**
+ Gets a list of the indices currently on the shelf.
+ @return The list of indices currently on the shelf. This value can
+ subsequently be used by other Search plug-in methods to
+ obtain information about a specific index, the number of
+ indices on the shelf, and so forth.
+*/
+PIPROC(SearchIndexListPtr, SearchGetIndexList, (void), )
+/**
+ Gets the number of indices currently on the shelf.
+ @param list The list of indices on the shelf, obtained
+ using SearchGetIndexList().
+ @return The number of indices on the shelf.
+*/
+PIPROC(ASUns32, SearchCountIndexList, (SearchIndexListPtr list), list)
+/**
+ Gets the <code>n</code>th index on the shelf. The index can be passed
+ to other Search plug-in methods to remove it from the
+ shelf, obtain its title, and so forth.
+ @param list The list of indices on the shelf, obtained
+ using SearchGetIndexList().
+ @param n The index to get. The first index on the shelf
+ is index zero.
+ @return The <code>n</code>th index on the shelf. This value may be used in subsequent
+ calls to remove the index, obtain its title, and so forth.
+
+*/
+PIPROC(SearchIndexPtr, SearchGetNthIndex, (SearchIndexListPtr list, ASUns32 n), list, n)
+/**
+ Superseded by SearchGetIndexPathEx() in Acrobat 6.0.
+
+ <p>Gets the index that has the specified path. The index must
+ already be on the shelf. The index can be passed to other
+ Search plug-in methods to remove it from the shelf,
+ obtain its title, and so forth. </p>
+
+ @param list The list of indices on the shelf, obtained
+ using SearchGetIndexList().
+ @param fullPath A platform-dependent path to the index:
+ <ul>
+ <li>On Mac OS, it is of the form <code>MyDisk:TopFolder:BottomFolder:Strange.pdx</code>. </li>
+ <li>On Windows, it is of the form <code>C:\\LVL1\\MYFILES\\INDEX</code>. The .PDX extension is automatically added to the
+ specified path name.</li>
+ </ul>
+ @return The specified index. This value may be used in subsequent
+ calls to remove the index, obtain its title, and so forth.
+*/
+PIPROC(SearchIndexPtr, SearchGetIndexByPath, (SearchIndexListPtr list, char *fullPath), list, fullPath)
+/**
+ Superseded in Acrobat 6.0 by SearchAddIndexEx().
+
+ <p>Adds a specified index to the shelf. </p>
+
+ @param list The list of indices on the shelf, obtained
+ using SearchGetIndexList().
+ @param fullPath A platform-dependent path to the index.
+ @param fullPath A platform-dependent path to the index:
+ <ul>
+ <li>On Mac OS, it is of the form <code>MyDisk:TopFolder:BottomFolder:Strange.pdx</code>. </li>
+ <li>On Windows, it is of the form <code>C:\\LVL1\\MYFILES\\INDEX</code>. On UNIX and Windows, the .PDX extension is automatically added to the
+ specified path name.</li>
+ </ul>
+ @param flags Flags that indicate the state of the index.
+ It must be an <code>OR</code> of the following values (see SrchType.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kIndexAvailableFlag</TD><TD>The index is available for searching. Indices that are not available appear grayed out in the Search plug-in's user interface.</TD></TR>
+ <TR><TD>kIndexSelectedFlag</TD><TD>The index is used for searching. Indices that are selected appear with a filled in check box in the Search plug-in's user interface.</TD></TR>
+ <TR><TD>kIndexPtrInvalidFlag</TD><TD>(Read only: cannot be set). The index cannot be located; it does not exist.</TD></TR>
+ </TABLE>
+
+ <p>In practice, kIndexAvailableFlag should always be set.</p>
+
+ @return The index that was added. This value may be used in subsequent
+ calls to remove the index, obtain its title, and so forth.
+*/
+PIPROC(SearchIndexPtr, SearchAddIndex, (SearchIndexListPtr list, char *fullPath, ASUns32 flags), list, fullPath, flags)
+/** Removes the specified index from the shelf.
+
+ @param list IN The list of indices on the shelf, obtained using SearchGetIndexList().
+ @param index IN The index to be removed. The index may be obtained using
+ SearchGetIndexByPath(), SearchGetNthIndex(), or SearchAddIndex().
+*/
+PIPROC(void, SearchRemoveIndex, (SearchIndexListPtr list, SearchIndexPtr index), list, index)
+/**
+ Gets the flags for a specified index.
+ @param index The index whose flags are to be obtained
+ (set). The index may be obtained using SearchGetIndexByPath(),
+ SearchGetNthIndex(), or SearchAddIndex().
+ @return The flags returned are the actual values set, and may not
+ always be the same as the requested value.
+ It gets a list of the indices currently on the shelf.
+
+ <p>The list of indices currently on the shelf is returned. This value can
+ subsequently be used by other Search plug-in methods to
+ obtain information about a specific index, the number of
+ indices on the shelf, and so forth.</p>
+*/
+PIPROC(ASUns32, SearchGetIndexFlags, (SearchIndexPtr index), index)
+/**
+ Sets the flags for a specified index.
+ @param index The index whose flags are to be set. The
+ index may be obtained using SearchGetIndexByPath(), SearchGetNthIndex(),
+ or SearchAddIndex().
+ @param flags Flags that indicate the status of the index.
+ <code>flags</code> must be an <code>OR</code> of the values (see SrchType.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kIndexAvailableFlag</TD><TD>The index is available for searching. Indices that are not available appear grayed out in the Search plug-in's user interface.</TD></TR>
+ <TR><TD>kIndexSelectedFlag</TD><TD>The index is used for searching. Indices that are selected appear with a filled in check box in the Search plug-in's user interface.</TD></TR>
+ <TR><TD>kIndexPtrInvalidFlag</TD><TD>(Read only: cannot be set). The index cannot be located; it does not exist.</TD></TR>
+ </TABLE>
+
+ <p>In practice, kIndexAvailableFlag should always be set.</p>
+
+ @return The flags returned are the actual values set, and may not
+ always be the same as the requested value.
+*/
+PIPROC(ASUns32, SearchSetIndexFlags, (SearchIndexPtr index, ASUns32 flags), index, flags)
+/**
+ Superseded in Acrobat 6.0 by SearchGetIndexTitleEx().
+
+ <p>Gets the title of a specified index. </p>
+
+ @param index The index whose title is obtained. The index
+ may be obtained using SearchGetIndexByPath(), SearchGetNthIndex(),
+ or SearchAddIndex().
+ @return The title of the specified index.
+*/
+PIPROC(char *, SearchGetIndexTitle, (SearchIndexPtr index), index)
+/**
+ Superseded in Acrobat 6.0 by SearchGetIndexPathEx().
+
+ Gets the platform-dependent path for a specified index.
+
+ @param index The index whose path is obtained. The index
+ may be obtained using SearchGetIndexByPath(), SearchGetNthIndex(),
+ or SearchAddIndex().
+ @return A platform-dependent path to the index:
+ <ul>
+ <li>On Windows, it is of the form <code>C:\\LVL1\\MYFILES\\INDEX</code>. The .PDX extension is automatically added to the
+ specified path name.</li>
+ <li>On Mac OS, it is of the form <code>MyDisk:TopFolder:BottomFolder:Strange.pdx</code>. </li>
+ </ul>
+*/
+PIPROC(char *, SearchGetIndexPath, (SearchIndexPtr index), index)
+/**
+ Supersedes SearchGetIndexPath() in Acrobat 6.0.
+
+ <p>Gets the index that has the specified path. The index must
+ already be on the shelf. The index can be passed to other
+ Search plug-in methods to remove it from the shelf,
+ obtain its title, and so forth. </p>
+
+ @param list The list of indices on the shelf, obtained
+ using SearchGetIndexList().
+ @param fileSys The file system on which the index is found.
+
+ @param indexPath The path to the index.
+ @return The specified index. This value may be used in subsequent
+ calls to remove the index, obtain its title, and so forth.
+
+*/
+PIPROC(SearchIndexPtr, SearchGetIndexByPathEx, (SearchIndexListPtr list, ASFileSys fileSys, ASPathName indexPath), list, fileSys, indexPath)
+/**
+ Supersedes SearchAddIndex() in Acrobat 6.0.
+
+ <p>Adds a specified index to the shelf, using the Acrobat 6.0
+ file system and path mechanism. </p>
+
+ @param list The list of indices on the shelf, obtained
+ using SearchGetIndexList().
+ @param fileSys The file system on which the index is found.
+
+ @param indexPath The path to the index.
+ @param flags Flags that indicate the state of the index.
+ It must be an <code>OR</code> of the following values (see SrchType.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Value</TH><TH>Description</TH></TR>
+ <TR><TD>kIndexAvailableFlag</TD><TD>The index is available for searching. Indices that are not available appear grayed out in the Search plug-in's user interface.</TD></TR>
+ <TR><TD>kIndexSelectedFlag</TD><TD>The index is used for searching. Indices that are selected appear with a filled in check box in the Search plug-in's user interface.</TD></TR>
+ <TR><TD>kIndexPtrInvalidFlag</TD><TD>(Read only: cannot be set). The index cannot be located; it does not exist.</TD></TR>
+ </TABLE>
+
+ <p>In practice, kIndexAvailableFlag should always be set.</p>
+
+ @return The index that was added. This value may be used in subsequent
+ calls to remove the index, obtain its title, and so forth.
+
+ <p>It returns kAddIndexFailed if the specified index could not
+ be added to the shelf. It returns kIndexExists if the index
+ is already on the shelf.</p>
+*/
+PIPROC(SearchIndexPtr, SearchAddIndexEx, (SearchIndexListPtr list, ASFileSys fileSys, ASPathName indexPath, ASUns32 flags), list, fileSys, indexPath, flags)
+/**
+ Supersedes SearchGetIndexTitle() in Acrobat 6.0.
+
+ <p>Gets the title of a specified index as an ASText object. </p>
+
+ @param index The index whose title is obtained. The index
+ may be obtained using SearchGetIndexByPath(), SearchGetNthIndex(),
+ or SearchAddIndex().
+ @return The title of the specified index as an ASText object.
+*/
+PIPROC(ASText, SearchGetIndexTitleEx, (SearchIndexPtr index), index)
+/**
+ Supersedes SearchGetIndexPath() in Acrobat 6.0.
+
+ <p>Gets the path for a specified index as an ASPathName object. </p>
+
+ @param index The index whose path is obtained. The index
+ may be obtained using SearchGetIndexByPath(), SearchGetNthIndex(),
+ or SearchAddIndex().
+ @return The ASPathName object.
+*/
+PIPROC(ASPathName, SearchGetIndexPathEx, (SearchIndexPtr index), index)
+/**
+ Gets the file system for a specified index as an ASFileSys
+ object.
+ @param index The index whose path is obtained. The index
+ may be obtained using SearchGetIndexByPath(), SearchGetNthIndex(),
+ or SearchAddIndex().
+ @return The ASFileSys object.
+*/
+PIPROC(ASFileSys, SearchGetIndexFileSys, (SearchIndexPtr index), index)
+
+/**
+ Tests whether the search mechanism (Search5) for previous
+ Acrobat versions (prior to 6.0) is available for the current
+ system. When Search5 is available, you can search indexes
+ from Acrobat 5.0 and earlier.
+ @return <code>true</code> if legacy searches are available, <code>false</code> otherwise.
+*/
+PIPROC(ASBool, SearchIsLegacySearchAvailable, (void), )
+/**
+ Supersedes SearchExecuteQuery() in Acrobat 6.0.
+
+ <p>Executes a specified query, using the given set of search
+ parameters. The search results are displayed in the Acrobat
+ Search plug-in's Results window. </p>
+
+ @param queryData A pointer to the structure containing
+ the search parameters.
+ @return <code>true</code> if successful, <code>false</code> otherwise.
+ @see maxDocs The maximum number of documents to display in the
+ Results window. If more documents than this have hits, only
+ the first maxDocs are displayed. <code>maxDocs</code> must be no greater
+ than <code>999</code>.
+*/
+PIPROC(ASBool, SearchExecuteQueryEx, (const SearchQueryDataRec *queryData), queryData)
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchType.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchType.h
new file mode 100644
index 0000000..308d264
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/SrchType.h
@@ -0,0 +1,270 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ srchtype.h
+
+*********************************************************************/
+
+#ifndef _H_SrchType
+#define _H_SrchType
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+/** The search is case-sensitive.
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionCase 0x00000001L
+/** Find not only the specified word, but other words that have the same stem (for
+ example, <code>run</code> and <code>ran</code> have the same stem).
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionStemming 0x00000002L
+/** Consider the proximity of
+ results when using the <code>AND</code> operator to look for more
+ than one word in a document. Without this option, <code>AND</code>ed
+ terms can be anywhere in a document. Searching for
+ <code>"red"</code> and <code>"blue"</code>, for example, finds a document where
+ <code>"red"</code> is the first word on the first page and <code>"blue"</code> is
+ the last word on the last page. With this option, however,
+ <code>AND</code>ed terms must be within two or three pages of each
+ other to be found. Also, the closer <code>AND</code>ed terms appear
+ together, the higher the relevance ranking of the
+ document that contains them.
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionProximity 0x00000010L
+/** Do not search the entire list of
+ indices, but only the documents that matched the
+ previous search. This is used to refine the results of the
+ previous search.
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionRefine 0x00000020L
+/**
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionWholeWord 0x00000040L
+/**
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionIgnoreFH 0x00000080L
+
+/**
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionIgnoreDiacritics 0x00000100L
+
+/**
+ The client must supply all the search word options in the scope parameter
+ by doing an <code>OR</code> (<code>|</code>) operation on all options where the search needs to be executed.
+ For example, if the client needs to search on attachments, and within attachments
+ the search needs to be done on document text and XMP data, then it can be
+ specified as follows:
+
+ <p><code>scope = kSearchDocumentText | kSearchDocumentXMP | kSearchPDFAttachments;</code></p>
+
+ <p>In most cases, however, the client might want to search on all the places
+ possible, so it would suffice to write:</p>
+
+ <p><code>scope = kSearchEveryWhere;</code></p>
+
+ @ingroup SearchWordOptions
+*/
+typedef ASUns32 SearchWordOptions;
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchDocumentText 0x00000001L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchBookmarks 0x00000002L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchMarkup 0x00000004L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchDocumentXMP 0x00000008L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchSignatures 0x00000010L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchDocInfo 0x00000020L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchJPEGExif 0x00000040L
+/**
+ By including the kSearchUserProperties option, you will ensure
+ that the object level data is the same as that
+ seen by the menu item Object Data Tool
+ in Acrobat. This is <i>not</i> the metadata associated with
+ individual COS level objects in the PDF document.
+
+ @ingroup SearchWordOptions
+*/
+#define kSearchUserProperties 0x00000080L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchPDFAttachments 0x00000100L
+/**
+ @ingroup SearchWordOptions
+*/
+#define kSearchEveryWhere ASMAXUns32
+
+
+
+/** */
+typedef ASUns32 SearchScope;
+
+/** */
+typedef enum
+{
+ /** */
+ kSearchActiveDoc,
+ /** */
+ kSearchFolder,
+ /** */
+ kSearchIndex,
+ /** */
+ kSearchActiveIndexes
+} SearchType;
+
+/** Search Match Options */
+typedef enum
+{
+/** */
+ kMatchPhrase,
+/** */
+ kMatchAllWords,
+/** */
+ kMatchAnyWords,
+/** */
+ kBooleanQuery
+} SearchMatchOption;
+
+/** */
+typedef struct _t_SearchQueryDataRec {
+ /** The size of the data structure. It must be set to <code>sizeof(SearchQueryDataRec)</code>. */
+ ASSize_t size;
+
+ /** The text to be searched. */
+ ASText query;
+
+ /** The location to search in. */
+ SearchType type;
+
+ /** How the <i>query</i> text should be matched in the document. */
+ SearchMatchOption match;
+
+ /** The search options. */
+ SearchWordOptions options;
+
+ /** The content in the PDFs that should be searched.
+ It should be an <code>OR</code> of values specified in SearchScope. */
+ SearchScope scope;
+
+ /** The path of the folder or index.
+ It is required only when <code>type</code> is kSearchFolder or kSearchIndex. */
+ ASPathName path;
+
+ /** The ASFileSys of the folder or index.
+ It is required only when <code>type</code> is kSearchFolder or kSearchIndex. */
+ ASFileSys fs;
+
+ /** The maximum number of documents to display in the Results window. If
+ more documents than this have hits, only the first <code>maxDocs</code> are
+ displayed. <code>maxDocs</code> must be no greater than <code>999</code>.
+ */
+ ASUns16 maxDocs;
+
+ /** The page number to start the search; <code>0</code> is the first page. */
+ ASUns32 startPage;
+
+ /** The range of words for proximity searches. */
+ ASUns32 proximityRange;
+} SearchQueryDataRec;
+
+
+/* opaque types for primitive types */
+/** */
+typedef void *SearchIndexListPtr;
+/** */
+typedef void *SearchIndexPtr;
+
+
+/** The index is available for searching.
+
+ <p>Indices that are not available appear grayed out in the Search
+ plug-in's user interface.</p>
+
+ @ingroup SearchIndexFlags
+*/
+#define kIndexAvailableFlag (1L << 0)
+/** The index is used for searching.
+
+ <p>Indices that are selected appear with a filled in check box in the
+ Search plug-in's user interface.</p>
+
+ @ingroup SearchIndexFlags
+*/
+#define kIndexSelectedFlag (1L << 1)
+/** (Read only - cannot be set)
+ <p>The index cannot be located; it does not exist.
+ In practice, kIndexAvailableFlag should always be set. </p>
+
+ @ingroup SearchIndexFlags
+*/
+#define kIndexPtrInvalidFlag (1L << 31)
+
+#define kAddIndexFailed ((SearchIndexPtr)0)
+#define kIndexExists ((SearchIndexPtr)-1)
+
+/* deprecated */
+
+/* parser types */
+#define kParserSimple 0
+#define kParserCQL 1
+#define kParserBPlus 2
+
+/** Find not only the specified word, but other words that sound like it.
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionSoundsLike 0x00000004L
+/** Find not only the specified word, but other words that have the same meaning.
+ @ingroup SearchWordOptionsFlags
+*/
+#define kWordOptionThesaurus 0x00000008L
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+#endif
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/StAcroResourceContext.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/StAcroResourceContext.h
new file mode 100644
index 0000000..f46a2b1
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/StAcroResourceContext.h
@@ -0,0 +1,8 @@
+#ifndef _H_StAcroResourceContext
+#define _H_StAcroResourceContext
+
+/* This file is deprecated */
+
+#include "SafeResources.h"
+
+#endif /* _H_StAcroResourceContext */ \ No newline at end of file
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitE.h
new file mode 100644
index 0000000..cd6ab20
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitE.h
@@ -0,0 +1,19 @@
+/* ToolkitInitE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "ToolkitInitEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitEASF.h
new file mode 100644
index 0000000..ed5b9b9
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/ToolkitInitEASF.h
@@ -0,0 +1,20 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(tkErr2ndInit, "Attempt to initialize the library a second time.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFT.h
new file mode 100644
index 0000000..65622bd
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFT.h
@@ -0,0 +1,108 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ TTSHFT.h
+
+ - HFT definitions for Acrobat TTS procedures.
+
+ - The Acrobat Forms plug-in now provides a speech server API
+ implemented over SAPI (Windows Speech API) to deal with
+ text-to-speech conversion in accessibility for people with visual
+ and reading disabilities, and document vocalization issues in Acrobat.
+
+ It exports another HFT in parallel to its common AcroForms HFT. To
+ use the AcroTTS HFT, a plug-in must include the header file
+ TTSHFT.H, which includes AFTTS_SEL.H. Plug-ins must also import the
+ HFT using ASExtensionMgrGetHFT and assign the HFT returned by this
+ call to a plug-in-defined global variable named gAcroTTSHFT.
+
+ The easiest way to do this is to use the Init_AcroTTSHFT macro
+ defined in TTSHFT.h.
+
+*********************************************************************/
+
+#ifndef _H_TTSHFT
+#define _H_TTSHFT
+
+/*****************************************************************************
+ Selectors for all AcroForms TTS HFT functions.
+*****************************************************************************/
+#include "AFTTS_Sel.h"
+
+#if __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+extern HFT gAcroTTSHFT;
+
+#if __cplusplus
+}
+#endif /* __cplusplus */
+
+/** Use this to initialize and make the TTS HFT functions available to your plug-in. */
+#define Init_AcroTTSHFT ASExtensionMgrGetHFT(ASAtomFromString(AcroTTSHFT_NAME), AcroTTSHFT_LATEST_VERSION)
+
+#define AFTTSEnd (*((AFTTSEnd_SELPROTO)(gAcroTTSHFT[AFTTSEnd_SEL])))
+
+#define AFTTSQueueTextData (*((AFTTSQueueTextData_SELPROTO)(gAcroTTSHFT[AFTTSQueueTextData_SEL])))
+
+#define AFTTSTalk (*((AFTTSTalk_SELPROTO)(gAcroTTSHFT[AFTTSTalk_SEL])))
+
+#define AFTTSQSound (*((AFTTSQSound_SELPROTO)(gAcroTTSHFT[AFTTSQSound_SEL])))
+
+#define AFTTSQTone (*((AFTTSQTone_SELPROTO)(gAcroTTSHFT[AFTTSQTone_SEL])))
+
+#define AFTTSQSilence (*((AFTTSQSilence_SELPROTO)(gAcroTTSHFT[AFTTSQSilence_SEL])))
+
+#define AFTTSResume (*((AFTTSResume_SELPROTO)(gAcroTTSHFT[AFTTSResume_SEL])))
+
+#define AFTTSPause (*((AFTTSPause_SELPROTO)(gAcroTTSHFT[AFTTSPause_SEL])))
+
+#define AFTTSStop (*((AFTTSStop_SELPROTO)(gAcroTTSHFT[AFTTSStop_SEL])))
+
+#define AFTTSReset (*((AFTTSReset_SELPROTO)(gAcroTTSHFT[AFTTSReset_SEL])))
+
+#define AFTTSGetVoiceName (*((AFTTSGetVoiceName_SELPROTO)(gAcroTTSHFT[AFTTSGetVoiceName_SEL])))
+
+#define AFTTSIsAvailable (*((AFTTSIsAvailable_SELPROTO)(gAcroTTSHFT[AFTTSIsAvailable_SEL])))
+
+#define AFTTSGetSpeaker (*((AFTTSGetSpeaker_SELPROTO)(gAcroTTSHFT[AFTTSGetSpeaker_SEL])))
+
+#define AFTTSGetPunctuations (*((AFTTSGetPunctuations_SELPROTO)(gAcroTTSHFT[AFTTSGetPunctuations_SEL])))
+
+#define AFTTSGetSpeechRate (*((AFTTSGetSpeechRate_SELPROTO)(gAcroTTSHFT[AFTTSGetSpeechRate_SEL])))
+
+#define AFTTSGetCharacterScale (*((AFTTSGetCharacterScale_SELPROTO)(gAcroTTSHFT[AFTTSGetCharacterScale_SEL])))
+
+#define AFTTSGetVolume (*((AFTTSGetVolume_SELPROTO)(gAcroTTSHFT[AFTTSGetVolume_SEL])))
+
+#define AFTTSGetPitch (*((AFTTSGetPitch_SELPROTO)(gAcroTTSHFT[AFTTSGetPitch_SEL])))
+
+#define AFTTSGetNumberOfVoices (*((AFTTSGetNumberOfVoices_SELPROTO)(gAcroTTSHFT[AFTTSGetNumberOfVoices_SEL])))
+
+#define AFTTSSetSpeaker (*((AFTTSSetSpeaker_SELPROTO)(gAcroTTSHFT[AFTTSSetSpeaker_SEL])))
+
+#define AFTTSSetPunctuations (*((AFTTSSetPunctuations_SELPROTO)(gAcroTTSHFT[AFTTSSetPunctuations_SEL])))
+
+#define AFTTSSetSpeechRate (*((AFTTSSetSpeechRate_SELPROTO)(gAcroTTSHFT[AFTTSSetSpeechRate_SEL])))
+
+#define AFTTSSetCharacterScale (*((AFTTSSetCharacterScale_SELPROTO)(gAcroTTSHFT[AFTTSSetCharacterScale_SEL])))
+
+#define AFTTSSetVolume (*((AFTTSSetVolume_SELPROTO)(gAcroTTSHFT[AFTTSSetVolume_SEL])))
+
+#define AFTTSSetPitch (*((AFTTSSetPitch_SELPROTO)(gAcroTTSHFT[AFTTSSetPitch_SEL])))
+
+#define AFTTSSetNotify (*((AFTTSSetNotify_SELPROTO)(gAcroTTSHFT[AFTTSSetNotify_SEL])))
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFTProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFTProcs.h
new file mode 100644
index 0000000..3cc6ae8
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/TtsHFTProcs.h
@@ -0,0 +1,234 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1998-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+TtsHFTProcs.h
+
+ - for AcroTTS HFT functions.
+
+*********************************************************************/
+
+/**
+ Finalizes a speech section shutting down the speech engines used by the TTS object.
+ AFTTSIsAvailable() should return <code>false</code> after that. Its use by a plug-in should not be
+ needed at any time, since AcroForms already handles TTS termination. Initialization of TTS
+ is also handled automatically. By calling any function below, AFTTSIsAvailable() should
+ then return <code>true</code>, in case a SAPI engine is installed on the system.
+*/
+PIPROC(ASBool, AFTTSEnd, (void), )
+/**
+ Puts text into the queue to be performed by AFTTSTalk().
+ @param textdata The text that will be put into the queue.
+
+ @param UseDefaultSpeaker Whether to use the default speaker.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+
+ @see AFTTSQSilence
+ @see AFTTSQSound
+*/
+PIPROC(ASBool, AFTTSQueueTextData, (const char* textdata, ASBool UseDefaultSpeaker), textdata, UseDefaultSpeaker)
+/**
+ Sends whatever is in the queue to be spoken by the SAPI
+ TTS engine. If the text output had been paused, it resumes
+ playback of the queued text.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+
+ @see AFTTSQueueTextData
+*/
+PIPROC(ASBool, AFTTSTalk, (void), )
+/**
+ Puts a sound into the queue. The sound can then be performed
+ by AFTTSTalk().
+ @param soundName The sound name, which can be one of the following:
+
+ <ul>
+ <li><code>ActionCopy</code></li>
+ <li><code>ActionCut</code></li>
+ <li><code>ActionDelete</code></li>
+ <li><code>ActionPaste</code></li>
+ <li><code>DocActive</code></li>
+ <li><code>DocClose</code></li>
+ <li><code>DocOpen</code></li>
+ <li><code>DocPrint</code></li>
+ <li><code>DocSave</code></li>
+ <li><code>KeyEnd</code></li>
+ <li><code>KeyHome</code></li>
+ <li><code>PageTurn</code></li>
+ </ul>
+
+ <p>This list can be augmented by adding sound files to the
+ <code>SoundCues</code> folder in Acrobat's installation, in 22kHz 16-bit
+ PCM .wav format.</p>
+
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+ @see AFTTSQSilence
+ @see AFTTSQueueTextData Puts text into the queue to be performed by AFTTSTalk().
+ @see AFTTSQSilence
+ @see AFTTSQSound
+*/
+PIPROC(ASBool, AFTTSQSound, (const char* soundName), soundName)
+/** Not implemented in 4.05. */
+PIPROC(ASBool, AFTTSQTone, (ASUns32 frequency, ASUns32 duration), frequency, duration)
+
+/**
+ Queues a period of silence into the text.
+ @param duration The amount of silence in milliseconds.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+
+ @see AFTTSQSound
+ @see AFTTSQueueTextData
+*/
+PIPROC(ASBool, AFTTSQSilence, (ASUns32 duration), duration)
+/**
+ Resumes playback of text on a paused TTS object.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+
+ @see AFTTSPause
+*/
+PIPROC(ASBool, AFTTSResume, (void), )
+/**
+ Immediately pauses TTS output on a TTS object. Playback
+ of the remaining queued text can be resumed via AFTTSResume().
+
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+ @see AFTTSResume
+ @see AFTTSQSound
+ @see AFTTSQueueTextData
+*/
+PIPROC(ASBool, AFTTSPause, (void), )
+/**
+ Stops playback of currently queued text, and flushes the
+ queue. Playback of queued text cannot be resumed.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+ @see AFTTSReset
+ @see AFTTSQueueTextData
+*/
+PIPROC(ASBool, AFTTSStop, (void), )
+/**
+ Stops playback of the currently queued text, and flushes
+ the queue. It resets all the properties of the TTS object to
+ their default values.
+
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+ @see AFTTSStop
+ @see AFTTSPause
+ @note Text playback cannot be resumed via AFTTSResume().
+*/
+PIPROC(ASBool, AFTTSReset, (void), )
+/**
+ Gets the voice name of any of the available speakers in
+ the installed TTS engine.
+ @param index The index of the speaker.
+ @return The name of the voice.
+ @see AFTTSSetSpeaker
+*/
+PIPROC(char*, AFTTSGetVoiceName, (ASInt32 index), index)
+/**
+ Determines whether the TTS object is available and the Text-to-Speech
+ engine can be used.
+
+ @return <code>true</code> if the Text-to-Speech engine can be used, <code>false</code> otherwise.
+ @note Calling any method in this API causes the Forms plug-in
+ to initialize TTS automatically if an SAPI engine is installed
+ on the system.
+*/
+PIPROC(ASBool, AFTTSIsAvailable, (void), )
+/**
+ Gets the name of the current speaker.
+ @return The name of the current speaker.
+ @see AFTTSSetSpeaker
+*/
+PIPROC(char*, AFTTSGetSpeaker, (void), )
+/** Not implemented in 4.05. */
+PIPROC(char*, AFTTSGetPunctuations, (void), )
+/**
+ Gets the speed at which text is being spoken by the TTS
+ engine.
+ @return The speed, in words per minute, at which text
+ is being spoken.
+ @see AFTTSSetSpeechRate
+ @see AFTTSSetSpeaker
+*/
+PIPROC(ASUns32, AFTTSGetSpeechRate, (void), )
+/** Not implemented in 4.05. */
+PIPROC(ASUns32, AFTTSGetCharacterScale, (void), )
+/**
+ Gets the volume for the speaker.
+ @return The volume. Valid values are from <code>0</code> (mute) to <code>10</code> (loudest).
+ The default is <code>5</code>.
+ @see AFTTSSetVolume
+
+ @note Calling any method in this API causes the Forms plug-in
+ to initialize TTS automatically if an SAPI engine is installed
+ on the system.
+
+*/
+PIPROC(ASUns32, AFTTSGetVolume, (void), )
+/**
+ Gets the baseline pitch for the voice of a speaker.
+ @return The baseline pitch. The valid range is from <code>0</code> to <code>10</code>, with
+ <code>5</code> being the default for the speaker.
+ @see AFTTSSetPitch
+ Gets the name of the current speaker.
+ @see AFTTSSetSpeaker
+*/
+PIPROC(ASUns32, AFTTSGetPitch, (void), )
+/**
+ Gets the number of different speakers available to the current
+ TTS engine.
+ @return The number of speakers available.
+ @see AFTTSGetVoiceName
+*/
+PIPROC(ASUns32, AFTTSGetNumberOfVoices, (void), )
+/**
+ Sets the current voice. Valid values are any of those enumerated
+ via AFTTSGetVoiceName() and AFTTSGetNumberOfVoices().
+ @param voiceName The speaker name.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+ @see AFTTSGetSpeaker
+*/
+PIPROC(ASBool, AFTTSSetSpeaker, (const char* voiceName), voiceName)
+/** Not implemented in 4.05. */
+PIPROC(ASBool, AFTTSSetPunctuations, (const char* punctuations), punctuations)
+/**
+ Sets the speed at which text is being spoken by the TTS
+ engine.
+ @param speed The speed in words per minute.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+ @see AFTTSGetSpeechRate
+ @see AFTTSGetVolume
+*/
+PIPROC(ASBool, AFTTSSetSpeechRate, (ASUns32 speed), speed)
+/** Not implemented in 4.05. */
+PIPROC(ASBool, AFTTSSetCharacterScale, (ASUns32 chrScale), chrScale)
+/**
+ Sets the speech volume.
+ @param volume The volume. Valid values are from <code>0</code> (mute)
+ to <code>10</code> (loudest).
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+ @see AFTTSGetVolume
+*/
+PIPROC(ASBool, AFTTSSetVolume, (ASUns32 volume), volume)
+/**
+ Sets the baseline pitch for the voice of a speaker.
+ @param pitch The baseline pitch. The valid range is from
+ <code>0</code> to <code>10</code>, with <code>5</code> being the default for the speaker.
+ @return <code>true</code> if the speech engine is available, <code>false</code> otherwise.
+
+ @see AFTTSGetPitch
+ @see AFTTSGetSpeaker
+*/
+PIPROC(ASBool, AFTTSSetPitch, (ASUns32 pitch), pitch)
+/** Sets the function to be called when TTS finished speaking. <code>NULL</code> disables
+ callbacks. */
+PIPROC(void, AFTTSSetNotify, (AFTTSNotifyProc proc), proc)
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixCalls.h
new file mode 100644
index 0000000..b288884
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixCalls.h
@@ -0,0 +1,434 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1995-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ UnixCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+
+#ifndef _H_UnixCalls
+#define _H_UnixCalls
+
+#include "acroassert.h"
+
+/* for Adobe use only */
+#define _UnixHFT_LATEST_VERSION 0x00080000
+#define _UnixHFT_IS_BETA 0
+
+/* for public use */
+#define UnixHFT_LATEST_VERSION (_UnixHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _UnixHFT_LATEST_VERSION) : _UnixHFT_LATEST_VERSION)
+
+#define UnixHFT_VERSION_4 0x00040000
+#define UnixHFT_VERSION_5 0x00040001
+#define UnixHFT_VERSION_8 0x00080000
+
+#include <X11/Intrinsic.h>
+#include <gtk/gtk.h>
+
+#include "PIRequir.h"
+#include "CoreExpT.h" /* HFT */
+#include "AVUIExpT.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PI_UNIX_VERSION != 0
+
+extern HFT gUnixHFT;
+extern ASUns32 gUnixVersion;
+
+/* UnixAppGetAppShellWidget */
+#define UnixAppGetAppShellWidgetSEL 1
+
+/**
+ Not supported due to movement to Gtk. If you wanted this for a dialog, ADM is the preferred way now.
+ @see UnixAppGetAppShellGtkWidget
+*/
+typedef ACCBPROTO1 Widget (ACCBPROTO2 *UnixAppGetAppShellWidgetSELPROTO)
+ (void);
+#define UnixAppGetAppShellWidget (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppGetAppShellWidgetSELPROTO)(gUnixHFT[1])))
+
+/* UnixAppLoadPlugInAppDefaults */
+#define UnixAppLoadPlugInAppDefaultsSEL 2
+
+/**
+ Not Supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *UnixAppLoadPlugInAppDefaultsSELPROTO)
+ (String className, String *fallbackResources);
+#define UnixAppLoadPlugInAppDefaults (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppLoadPlugInAppDefaultsSELPROTO)(gUnixHFT[2])))
+
+/* UnixAppClipboardGetItemId */
+#define UnixAppClipboardGetItemIdSEL 3
+
+/**
+ Not supported. If you wanted this for the selection server Gtk is the preferred way.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 long (ACCBPROTO2 *UnixAppClipboardGetItemIdSELPROTO)
+ (Display **displayPtr, Window *windowPtr);
+#define UnixAppClipboardGetItemId (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppClipboardGetItemIdSELPROTO)(gUnixHFT[3])))
+
+/* UnixAppDispatchEvent */
+#define UnixAppDispatchEventSEL 4
+
+/**
+ Not supported. Not required with Gtk. Try <code>gtk_main</code>, or better still, <code>g_main_context_iteration(NULL, FALSE)</code>.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 Boolean (ACCBPROTO2 *UnixAppDispatchEventSELPROTO)
+ (XEvent *eventPtr);
+#define UnixAppDispatchEvent (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppDispatchEventSELPROTO)(gUnixHFT[4])))
+
+/* UnixAppProcessEvent */
+#define UnixAppProcessEventSEL 5
+
+/**
+ Not supported. Not required with Gtk. Try <code>gtk_main</code>, or better still, <code>g_main_context_iteration(NULL, FALSE)</code>.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *UnixAppProcessEventSELPROTO)
+ (XtAppContext appContext, XtInputMask mask);
+#define UnixAppProcessEvent (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppProcessEventSELPROTO)(gUnixHFT[5])))
+
+/* UnixAppWaitForWm */
+#define UnixAppWaitForWmSEL 6
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *UnixAppWaitForWmSELPROTO)
+ (Widget shellWidget);
+#define UnixAppWaitForWm (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppWaitForWmSELPROTO)(gUnixHFT[6])))
+
+/* UnixAppGetPlugInFilename */
+#define UnixAppGetPlugInFilenameSEL 7
+
+/**
+ Gets the plug-in's file name. The directory can be used to
+ find auxiliary files for that plug-in.
+
+ <p>The Acrobat viewer searches all the directories specified
+ in the <code>systemPlugInPath</code> and <code>userPlugInPath</code> resources to
+ find plug-ins. </p>
+
+ @param thePI IN/OUT The gExtensionID extension registering the
+ plug-in.
+ @return The plug-in's file name. The string returned must not be
+ altered or freed.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixAppGetPlugInFilenameSELPROTO)
+ (ExtensionID thePI);
+#define UnixAppGetPlugInFilename (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppGetPlugInFilenameSELPROTO)(gUnixHFT[7])))
+
+/* UnixSysGetHomeDirectory */
+#define UnixSysGetHomeDirectorySEL 8
+
+/**
+ Gets the home directory of the user running the Acrobat
+ viewer. If the <code>HOME</code> environment variable is set, its value
+ is returned. Otherwise the method looks in the <code>passwd</code> database.
+
+ @return The user's home directory. The string returned by this method
+ must not be altered or freed.
+ @see UnixSysGetCwd
+ @see UnixSysGetHostname
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixSysGetHomeDirectorySELPROTO)
+ (void);
+#define UnixSysGetHomeDirectory (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetHomeDirectorySELPROTO)(gUnixHFT[8])))
+
+/* UnixSysGetInstallDirectory */
+#define UnixSysGetInstallDirectorySEL 9
+
+/**
+ Gets the directory in which the Acrobat viewer is installed.
+ The launch shell script sets the installation directory
+ in the environment variable <code>ACRO_INSTALL_DIR</code>.
+
+ <p>Auxiliary files can be found by concatenating the installation
+ directory with the configuration name sub-directory: </p>
+
+ <p><code>"< installation_dir>/< config_name>" </code></p>
+
+ @return The Acrobat viewer's installation directory.
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixSysGetInstallDirectorySELPROTO)
+ (void);
+#define UnixSysGetInstallDirectory (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetInstallDirectorySELPROTO)(gUnixHFT[9])))
+
+/* UnixSysGetConfigName */
+#define UnixSysGetConfigNameSEL 10
+
+/**
+ Gets the Acrobat viewer's configuration name.
+
+ <p>The name will be one of the following:</p>
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating system</TH><TH>Configuration name</TH></TR>
+ <TR><TD>SunOS</TD><TD><code>sparcsun</code></TD></TR>
+ <TR><TD>Solaris</TD><TD><code>sparcsolaris</code></TD></TR>
+ <TR><TD>HP-UX</TD><TD><code>hppahpux</code></TD></TR>
+ <TR><TD>Linux</TD><TD><code>intellinux</code></TD></TR>
+ <TR><TD>IBM AIX</TD><TD><code>rs6000aix</code></TD></TR>
+ </TABLE>
+
+ <p>Auxiliary files can be found by concatenating the installation
+ directory with the configuration name sub-directory: </p>
+
+ <p><code>"< installation_dir>/< config_name>" </code></p>
+
+ @return The Acrobat viewer's configuration name.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixSysGetConfigNameSELPROTO)
+ (void);
+#define UnixSysGetConfigName (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetConfigNameSELPROTO)(gUnixHFT[10])))
+
+/* UnixSysGetHostname */
+#define UnixSysGetHostnameSEL 11
+
+/**
+ Gets the host name.
+ @return The host name.
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixSysGetHostnameSELPROTO)
+ (void);
+#define UnixSysGetHostname (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetHostnameSELPROTO)(gUnixHFT[11])))
+
+/* UnixSysGetTempFileDirectory */
+#define UnixSysGetTempFileDirectorySEL 12
+
+/**
+ Gets the temporary file directory specified by the user.
+ The default is <code>"/tmp"</code>.
+ @return The temporary file directory.
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixSysGetTempFileDirectorySELPROTO)
+ (void);
+#define UnixSysGetTempFileDirectory (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetTempFileDirectorySELPROTO)(gUnixHFT[12])))
+
+/* UnixSysGetCwd */
+#define UnixSysGetCwdSEL 13
+
+/**
+ Gets the current working directory. This method tries to
+ eliminate <code>automounter tmp</code> directories and symbol links.
+ Using <code>stat</code>, it checks if the environment variable <code>PWD</code> specifies
+ the same directory returned by <code>getcwd</code>.
+ @return The current working directory.
+ @exception genErrNoMemory
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixSysGetCwdSELPROTO)
+ (void);
+#define UnixSysGetCwd (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetCwdSELPROTO)(gUnixHFT[13])))
+
+/* UnixSysGetString */
+#define UnixSysGetStringSEL 14
+
+/**
+ Not supported. The strings can be handled as resources.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 char * (ACCBPROTO2 *UnixSysGetStringSELPROTO)
+ (Widget widget, char *resourceName, char *defaultString);
+#define UnixSysGetString (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetStringSELPROTO)(gUnixHFT[14])))
+
+/* UnixSysGetCursor */
+#define UnixSysGetCursorSEL 15
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 Cursor (ACCBPROTO2 *UnixSysGetCursorSELPROTO)
+ (Widget widget, char *resourceName, char *defaultName, char *defaultBits, char *defaultMaskBits, unsigned int defaultWidth, unsigned int defaultHeight, int defaultHotX, int defaultHotY);
+#define UnixSysGetCursor (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetCursorSELPROTO)(gUnixHFT[15])))
+
+/* UnixSysGetIcon */
+#define UnixSysGetIconSEL 16
+
+/**
+ Not supported. The Icons should be bundled as a resource.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 Pixmap (ACCBPROTO2 *UnixSysGetIconSELPROTO)
+ (Widget widget, char *resourceName, char *defaultName, char *defaultBits, unsigned int defaultWidth, unsigned int defaultHeight);
+#define UnixSysGetIcon (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetIconSELPROTO)(gUnixHFT[16])))
+
+/* UnixSysGetPixmap */
+#define UnixSysGetPixmapSEL 17
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 Pixmap (ACCBPROTO2 *UnixSysGetPixmapSELPROTO)
+ (Widget widget, char *resourceName, char *defaultFilename, char **defaultXpmData, int defaultXpmDataCount, unsigned int *widthPtr, unsigned int *heightPtr);
+#define UnixSysGetPixmap (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysGetPixmapSELPROTO)(gUnixHFT[17])))
+
+/* UnixAppAddModifierCallback */
+#define UnixAppAddModifierCallbackSEL 18
+/*
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *UnixAppAddModifierCallbackSELPROTO)
+ (XtCallbackProc callback, XtPointer closure);
+#define UnixAppAddModifierCallback (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppAddModifierCallbackSELPROTO)(gUnixHFT[18])))
+
+/* UnixAppRemoveModifierCallback */
+#define UnixAppRemoveModifierCallbackSEL 19
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *UnixAppRemoveModifierCallbackSELPROTO)
+ (XtCallbackProc callback, XtPointer closure);
+#define UnixAppRemoveModifierCallback (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixAppRemoveModifierCallbackSELPROTO)(gUnixHFT[19])))
+
+/* UnixSysPrefInit */
+#define UnixSysPrefInitSEL 20
+
+/**
+ Not supported
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *UnixSysPrefInitSELPROTO)
+ (Widget widget, String name, String Xclass, char *prefFilename, XtResourceList resources, Cardinal numResources, XtPointer base, XrmDatabase *dbPtr, void **resourceDataPtr);
+#define UnixSysPrefInit (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysPrefInitSELPROTO)(gUnixHFT[20])))
+
+/* UnixSysPrefUpdate */
+#define UnixSysPrefUpdateSEL 21
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *UnixSysPrefUpdateSELPROTO)
+ (Widget widget, char *prefFilename, XtPointer base, XtResourceList resources, Cardinal numResources, void *resourceData);
+#define UnixSysPrefUpdate (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_4), *((UnixSysPrefUpdateSELPROTO)(gUnixHFT[21])))
+
+/* UnixAppGetAppShellGtkWidget */
+#define UnixAppGetAppShellGtkWidgetSEL 22
+
+/**
+ Gets the topmost widget of the application. The window is of the type GtkWindow.
+ @return The Acrobat viewer's application shell widget.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 GtkWidget * (ACCBPROTO2 *UnixAppGetAppShellGtkWidgetSELPROTO)
+ (void);
+#define UnixAppGetAppShellGtkWidget (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_5), *((UnixAppGetAppShellGtkWidgetSELPROTO)(gUnixHFT[22])))
+
+/**
+ Retrieves an appropriate top-level parent window, from which a modal dialog can be parented.
+ @param avdoc IN The currently active document if known. It can be <code>NULL</code>.
+ @return An appropriate parent will be determined and returned. This will be a top-level GTK window.
+*/
+typedef ACCBPROTO1 GtkWidget * (ACCBPROTO2 *UnixAppGetModalParentSELPROTO) (AVDoc avdoc);
+#define UnixAppGetModalParent (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_8), *((UnixAppGetModalParentSELPROTO)(gUnixHFT[23])))
+
+/**
+ Returns an appropriate top-level parent window, from which a dialog can be parented.
+ @return An appropriate parent will be determined and returned. This will be a top-level GTK window.
+*/
+typedef ACCBPROTO1 GtkWidget * (ACCBPROTO2 *UnixAppGetModelessParentSELPROTO) (void);
+#define UnixAppGetModelessParent (ACROASSERT(gUnixVersion >=UnixHFT_VERSION_8), *((UnixAppGetModelessParentSELPROTO)(gUnixHFT[24])))
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+#endif /* PI_UNIX_VERSION != 0 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(_H_UnixCalls) */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixPlatform.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixPlatform.h
new file mode 100644
index 0000000..a5f3935
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixPlatform.h
@@ -0,0 +1,171 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ UnixPlatform.h
+
+ - PLATFORM file for Unix development.
+
+*********************************************************************/
+
+#ifndef _H_UnixPlatform
+#define _H_UnixPlatform
+/*
+** Platform defines
+**
+** Predefined symbols can be split into three general categories,
+** predefined (compiler) hardware specific, Acrobat defined hardware
+** specific, and operating system interface specific (acrobat defined).
+**
+**
+** Hardware specific defines are predefined by the compiler and
+** include:
+** __i386 Intel 80x86 processors
+** __alpha Digital 21x64 processors (alpha)
+** __sparc Sun Sparc compatible processors
+** __mips Mips (a tiny division of SGI) processors
+**
+** Acrobat hardware specific defines are defined in this module
+** and use only the predefined hardware defines or each other to
+** decide their value. They should not use the operating system
+** symbols. They include:
+** IEEEFLOAT Should be true for all high-level processors
+** AS_LITTLEENDIAN True if most significant byte is in low byte
+** POINTER_64_BITS True if a pointer is represented by 64 bits
+**
+** Operating system interface specific symbols are defined in the
+** system specific makefiles for each platform and include:
+** SOLARIS
+** LINUX
+** HPUX
+** SGI
+** AIX
+** OSF
+** SUN (For SunOS not Solaris)
+**
+** The exception (isn't there always one) is SWAPBITS. SWAPBITS is an AGM
+** thing for the most part and is defined in IntCnfig.h in the AGM world but
+** AcroCore filters which came from the PS world also use it. For simplicities
+** sake, SWAPBITS is defined here so that it doesn't have to be put on the
+** compiler line with a -D.
+**
+** Note: SOLARIS is an operating system interface and has nothing necessarily
+** to due hardware since Solaris runs on Sparc and Intel. Conversely,
+** __alpha does not imply OSF as the operating system since an Alpha
+** can run OSF (Digital Unix), Linux, or NT.
+*/
+
+#define IEEEFLOAT 1
+
+#if i386 || defined(__i386) || defined(__alpha)
+#ifndef AS_LITTLEENDIAN
+#define AS_LITTLEENDIAN 1
+#endif
+#ifndef SWAPBITS
+#define SWAPBITS 1
+#endif
+
+#else
+#define AS_LITTLEENDIAN 0
+#endif /* end if intel or alpha */
+
+#if __alpha
+#define ASIntPtrSize long int
+#define POINTER_64_BITS 1
+#endif
+
+#define IEEESOFT 0
+#define UNSIGNEDCHARS 0
+#define FIXED_DEFINED 0
+#define FRACT_DEFINED 0
+
+#define WORD_ALIGN (sizeof(void *))
+
+#define HUGEPTRTYPE
+#define nENDLINE_CHARS 1
+#define sENDLINE "\n"
+#define nENDLINE_CHARS_UCS 2
+#define sENDLINE_UCS "\0\n"
+#define REPLACEABLE
+#define ACROEXPORT
+#define ACROEXPORTCDECL
+#define ACROEXPORTDATA
+#define ACROEXPORTPRIV
+#define ACROCALLBACK
+#define AVEXPORT
+#define AVEXPORTCDECL
+#define AVEXPORTDATA
+#define AVEXPORTPRIV
+#define AVEX1
+#define AVEX2
+#define AVCB1
+#define AVCB2
+#define ASKEY "ASKeyUnix.h"
+#define ACEX1
+#define ACEX2
+#define ACCB1
+#define ACCB2
+#define ACCBPROTO1
+#define ACCBPROTO2
+
+#define ACROEXPORTDATA1
+#define ACROEXPORTDATA2
+#define ACROIMPORTDATA1
+#define ACROIMPORTDATA2
+#define AVEXPORTDATA1
+#define AVEXPORTDATA2
+#define AVIMPORTDATA1
+#define AVIMPORTDATA2
+
+/**
+ (UNIX only) Defined if the client is being compiled for a UNIX platform, undefined otherwise. MAC_PLATFORM, WIN_PLATFORM, and UNIX_PLATFORM
+ should be used by client developers to conditionally compile platform-dependent code.
+
+ <p>UNIX_PLATFORM must be defined in the arguments to the C compiler. The make files for the sample clients in the Acrobat SDK do this automatically.</p>
+
+ @see MAC_PLATFORM
+ @see WIN_PLATFORM
+*/
+#define UNIX_PLATFORM 1
+
+#define MULTI_TASKS 1
+
+#define HAS_LEAVE_NOTIFY 1
+#define USE_NULLDOC 0
+
+/* The following are required for Filter */
+#ifndef TOOLKIT
+//#define ENVIRONMENT "PS2Prefix.h" //removing this, as PS2Prefix.h does not exist in local codebase
+#define ACROBAT 1
+#endif
+
+/* The following are used (but not required) by Error.h */
+#define MDSYSERR "UnixSysE.h"
+#define DefineMDSysErr(unixErrNum, mdErrName, msg) mdErrName = unixErrNum,
+
+/* The following is used (but not required) by Error.h */
+#define MDAPPERR "UnixAppE.h"
+
+/* The following is used (but not required by Error.h */
+#define MDERRINC <errno.h>
+
+/* Define the maximum number of characters allowed in a directory
+** path specification. POSIX standard is at least 255 as defined in limits.h.
+*/
+#include <limits.h>
+#ifndef _MAX_PATH
+#define _MAX_PATH PATH_MAX
+#endif
+
+#endif /* _H_UnixPlatform */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixProcs.h
new file mode 100644
index 0000000..1e2e1a2
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/UnixProcs.h
@@ -0,0 +1,229 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ UnixProcs.h
+
+ - Catalog of functions exported by the Unix Viewer.
+
+*********************************************************************/
+
+
+/**
+ Not Supported. If you wanted this for a dialog, ADM is the preferred way now.
+ @ see UnixAppGetAppShellGtkWidget
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppGetAppShellWidget)
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppLoadPlugInAppDefaults)
+
+/**
+ Not supported. If you wanted this for the selection server Gtk is the preferred way.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppClipboardGetItemId)
+
+/**
+ Not supported. Not required with Gtk. Try <code>gtk_main</code>, or better still, <code>g_main_context_iteration(NULL, FALSE)</code>.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppDispatchEvent)
+
+/**
+ Not supported. Not required with Gtk. Try <code>gtk_main</code>, or better still, <code>g_main_context_iteration(NULL, FALSE)</code>.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppProcessEvent)
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppWaitForWm)
+
+/**
+ Gets the client's file name. The directory can be used to
+ find auxiliary files for that client.
+
+ <p>The Acrobat viewer searches all the directories specified
+ in the <code>systemPlugInPath</code> and <code>userPlugInPath</code> resources to
+ find clients. </p>
+
+ @param thePI The gExtensionID extension registering the
+ client.
+ @return The client's file name. The string returned must not be altered
+ or freed.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(char *, UnixAppGetPlugInFilename, (ASExtension thePI))
+
+/**
+ Gets the home directory of the user running the Acrobat
+ viewer. If the <code>HOME</code> environment variable is set, its value
+ is returned. Otherwise the method looks in the <code>passwd</code> database.
+
+ @return The user's home directory. The string returned by this method
+ must not be altered or freed.
+ @see UnixSysGetCwd
+ @see UnixSysGetHostname
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(char *, UnixSysGetHomeDirectory, (void))
+
+/**
+ Gets the directory in which the Acrobat viewer is installed.
+ The launch shell script sets the installation directory
+ in the environment variable <code>ACRO_INSTALL_DIR</code>.
+
+ <p>Auxiliary files can be found by concatenating the installation
+ directory with the configuration name sub-directory: </p>
+
+ <p><code>installation_dir/config_name </code></p>
+
+ @return The Acrobat viewer's installation directory.
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(char *, UnixSysGetInstallDirectory, (void))
+
+/**
+ Gets the Acrobat viewer's configuration name. The name is
+ one of the following:
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Operating system</TH><TH>Configuration name</TH></TR>
+ <TR><TD>SunOS</TD><TD><code>sparcsun</code></TD></TR>
+ <TR><TD>Solaris</TD><TD><code>sparcsolaris</code></TD></TR>
+ <TR><TD>HP-UX</TD><TD><code>hppahpux</code></TD></TR>
+ <TR><TD>Linux</TD><TD><code>intellinux</code></TD></TR>
+ <TR><TD>IBM AIX</TD><TD><code>rs6000aix</code></TD></TR>
+ </TABLE>
+
+ <p>The Acrobat viewer's launch shell script uses <code>uname</code> to set
+ the configuration name in the environment variable <code>ACRO_CONFIG</code>. </p>
+
+ <p>Auxiliary files can be found by concatenating the installation
+ directory with the configuration name sub-directory: </p>
+
+ <p><code>installation_dir/config_name </code></p>
+
+ @return The Acrobat viewer's configuration name.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(char *, UnixSysGetConfigName, (void))
+
+/**
+ Gets the host name.
+ @return The host name.
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(char *, UnixSysGetHostname, (void))
+
+/**
+ Gets the temporary file directory specified by the user.
+ The default is <code>/tmp</code>.
+ @return The temporary file directory.
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(char *, UnixSysGetTempFileDirectory, (void))
+
+/**
+ Gets the current working directory. This method tries to
+ eliminate <code>automounter tmp</code> directories and symbol links.
+ Using <code>stat</code>, it checks if the environment variable <code>PWD</code> specifies
+ the same directory returned by <code>getcwd</code>.
+ @return The current working directory.
+ @exception genErrNoMemory
+ @see UnixSysGetHomeDirectory
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(char *, UnixSysGetCwd, (void))
+
+/**
+ Not supported. The strings can be handled as resources.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixSysGetString)
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixSysGetCursor)
+
+/**
+ Not supported. The Icons should be bundled as a resource.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixSysGetIcon)
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixSysGetPixmap)
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppAddModifierCallback)
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixAppRemoveModifierCallback)
+
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixSysPrefInit)
+
+/**
+ Not supported.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NOPROC(UnixSysPrefUpdate)
+
+/**
+ Gets the topmost widget of the application. The window is of the type GtkWindow.
+ @return The Acrobat viewer's application shell widget.
+ @since PI_UNIX_VERSION >= 0x00020000
+*/
+NPROC(GtkWidget *, UnixAppGetAppShellGtkWidget, (void))
+
+
+
+/**
+ Returns an appropriate top-level parent window, from which a modal dialog can be parented.
+ @param avdoc IN The currently active document if known. It can be <code>NULL</code>.
+ @return An appropriate parent will be determined and returned. This will be a top-level GTK window.
+*/
+NPROC(GtkWidget * , UnixAppGetModalParent, (AVDoc avdoc))
+
+
+/**
+ Returns an appropriate top-level parent window off which a dialog can be parented.
+ @return An appropriate parent will be determined and returned. This will be a top-level GTK window.
+*/
+NPROC(GtkWidget * , UnixAppGetModelessParent, (void))
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFT.h
new file mode 100644
index 0000000..ed861d2
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFT.h
@@ -0,0 +1,430 @@
+/**********************************************************************
+
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ WLHFT.h
+
+ - Contains all of the public definitions for using WebLink.
+
+*********************************************************************/
+
+#ifndef __WLHFT__
+#define __WLHFT__
+
+/* -------------------------------- includes ---------------------------------*/
+
+#if PLUGIN
+#include "ASExpT.h"
+#include "PDExpT.h"
+#endif /* PLUGIN */
+
+#if PRAGMA_STRUCT_ALIGN
+ #if __MWERKS__
+ #pragma options align=power_gcc
+ #elif __GNUC__
+ #pragma options align=power
+ #else
+ #error
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ------------------------- WebLink datatypes ------------------------------ */
+
+/** A data structure that specifies the path name to the web browser.
+ @see WDAppSupportPredicate
+ @see GetAppSpecifier
+*/
+#if MAC_PLATFORM
+typedef FSSpec *WDAppSpecifier;
+#endif
+
+#if WIN_PLATFORM || OS2_PLATFORM
+typedef char *WDAppSpecifier;
+#endif
+
+#if UNIX_PLATFORM
+typedef char *WDAppSpecifier;
+#endif
+
+#define WDVCURRENTREV (0L)
+
+/** Put a thermometer-style meter in the progress display.
+ @ingroup ProgressMonitorFlagOptions
+*/
+#define PROGRESS_HAS_METER (1L << 0)
+/** Add either a Cancel button or a message directing the user how to abort the operation.
+ @ingroup ProgressMonitorFlagOptions
+*/
+#define PROGRESS_HAS_CANCEL (1L << 1)
+
+
+/** A parameter block specifying the target frame of a URL.
+ @see WWWOpenURLWithParams
+ @see WDFollowLinkWithParamsFunction
+*/
+typedef struct {
+ /** Should be initialized to <code>sizeof(WWWOpenURLParamsRec)</code>. */
+ ASSize_t size;
+ /** The name of the frame to open.
+ @note <code>cFrame</code> is exactly the same as the <code>TARGET</code> attribute of a link
+ in HTML. You can target a frame by a name you have
+ assigned to it. In HTML, <code>TARGET</code> also has four predefined
+ values which can be used as if certain windows and frames
+ already have names without you having to assign them:
+ <ul>
+ <li><code>_blank</code></li>
+ <li><code>_parent</code></li>
+ <li><code>_self</code></li>
+ <li><code>_top</code></li>
+ </ul>
+
+ <p>In Weblink, only <code>_blank</code> and <code>_self</code> are supported.</p>
+ */
+ char * cFrame;
+}
+WWWOpenURLParamsRec, *WWWOpenURLParams;
+
+
+/** A data structure that implements a progress monitor. */
+typedef void *WebProgressMonitor;
+
+/* typedefs for function defintions */
+/** Callback functions to test a driver.
+ It tests whether a driver can support a given web browser application.
+ @param driverRock IN A pointer to a driver-defined data structure provided in
+ RegisterWebDriver().
+ WDAppSpecifier A platform-specific data structure used to identify the web
+ browser application. On Mac OS, it is a pointer to an FSSpec.
+ @param timeoutTime IN data structure. On Windows, it is a pointer to a
+ string (<code>char*</code>) representing the full path of the executable
+ application.
+ @return <code>true</code> if the driver is compatible with the given web browser application, <code>false</code> otherwise.
+*/
+typedef ACCB1 ASBool (ACCB2 WDAppSupportPredicateProc)(void *driverRock, WDAppSpecifier timeoutTime);
+
+/** Callback functions for to Follow a Link.
+
+ <p>Follows and retrieves the link specified by <code>cURL</code> from the PDF document specified by
+ <code>theDoc</code>. Weblink supplies the driver a fully resolved URL. The driver is solely
+ responsible for launching a web browser, if it requires one. If the driver depends on an
+ external web browser, the driver or the web browser is responsible for bringing that
+ browser to the foreground if the link data is not displayed by the Acrobat viewer.
+ For relative links, Weblink prepends a base URL if specified; otherwise, it prepends
+ the appropriate portion from the current document's URL to resolve a relative link.
+ Weblink automatically handles mapped links, which are links that generate different
+ results based on the location of the mouse within the links. (Such links are specified
+ by checking the Mapped Coordinates Link box in the Edit URL dialog box. These
+ links have the <code>isMap</code> attribute). Weblink appends <code>"?"</code> to the URL, followed by the x-
+ and y-coordinates of the mouse at the time the link was selected, relative to the
+ upper-left corner of the link's rectangle.</p>
+
+ @param driverRock IN A pointer to a driver-defined data structure provided in RegisterWebDriver().
+ @param theDoc IN The PDF document that contains the link.
+ @param cURL IN A <code>NULL</code>-terminated C string containing the URL the link points to.
+ @param cFormData IN Data from a form to be sent with the URL as post data. The
+ default MIME type of form data is <code>"application/x-www-formunencoded"</code>.
+ @return <code>true</code> if the driver has successfully begun the process of following the link, <code>false</code> otherwise.
+*/
+typedef ACCB1 ASBool (ACCB2 WDFollowLinkFunctionProc)(void *driverRock, AVDoc theDoc, char *cURL, char *cFormData);
+
+/** Callback functions for to Follow a Link with parameters.
+
+ <p>Follows and retrieves the link specified by <code>cURL</code> from the PDF document specified by
+ <code>theDoc</code>. Weblink supplies the driver a fully resolved URL. The driver is solely
+ responsible for launching a web browser, if it requires one. If the driver depends on an
+ external web browser, the driver or the web browser is responsible for bringing that
+ browser to the foreground if the link data is not displayed by the Acrobat viewer.
+ For relative links, Weblink prepends a base URL if specified; otherwise, it prepends
+ the appropriate portion from the current document's URL to resolve a relative link.
+ Weblink automatically handles mapped links, which are links that generate different
+ results based on the location of the mouse within the links. (Such links are specified
+ by checking the Mapped Coordinates Link box in the Edit URL dialog box. These
+ links have the <code>isMap</code> attribute). Weblink appends <code>"?"</code> to the URL, followed by the x-
+ and y-coordinates of the mouse at the time the link was selected, relative to the
+ upper-left corner of the link's rectangle. </p>
+
+ @param driverRock IN A pointer to a driver-defined data structure provided in RegisterWebDriver().
+ @param theDoc IN The PDF document that contains the link.
+ @param cURL A <code>NULL</code>-terminated C string containing the URL the link points to.
+ @param cFormData Data from a form to be sent with the URL as post data. The
+ default MIME type of form data is <code>"application/x-www-formunencoded"</code>.
+ @param params IN A parameter block specifying a target frame.
+
+ @return <code>true</code> if the driver has successfully begun the process of following the link, <code>false</code> otherwise.
+*/
+typedef ACCB1 ASBool (ACCB2 WDFollowLinkWithParamsFunctionProc)(void *driverRock, AVDoc theDoc, char *cURL, char *cFormData, WWWOpenURLParams params);
+
+/** Callback functions for driver state changes.
+
+ <p>It is called whenever the state of the driver changes from inactive to current, or vice versa.</p>
+
+ @param driverRock IN A pointer to a driver-defined data structure provided in RegisterWebDriver().
+ @param bComing IN Tells the driver whether it should become current or relinquish control.
+ If it is <code>true</code>, the driver is being requested to become the current
+ Weblink driver, and it should take any action that is
+ appropriate, such as installing IAC message handlers,
+ opening TCP drivers, and so on. If it is <code>false</code>, the driver is being
+ asked to relinquish its status as current driver and should
+ take whatever action is necessary to accomplish this.
+ @return <code>false</code> if the driver fails to change its state to that requested in <code>bComing</code>, <code>true</code> otherwise.
+*/
+typedef ACCB1 ASBool (ACCB2 WDBecomeDriverFunctionProc)(void *driverRock, ASBool bComing);
+
+
+/** Callback functions for Weblink toolbar button click.
+
+ <p>It is called when the user clicks on the Weblink toolbar button to switch to the browser application.</p>
+ @param driverRock IN A pointer to a driver-defined data structure provided in RegisterWebDriver().
+*/
+typedef ACCB1 void (ACCB2 WDBringFrontFunctionProc)(void *driverRock);
+
+/** Callback functions for a Weblink Options button click.
+
+ <p>It is called when the user clicks on the Options button in the Weblink
+ Preferences dialog box. If this function is <code>NULL</code>, the Options button is disabled.
+ Optional: set it to <code>NULL</code> if there no options dialog.</p>
+ @param driverRock IN A pointer to a driver-defined data structure provided in RegisterWebDriver().
+*/
+typedef ACCB1 void (ACCB2 WDOptionsFunctionProc)(void *driverRock);
+
+/** Callback functions to check driver transaction status
+ (Optional) Called to determine if the driver is performing a transaction or not. Weblink
+ uses this to check that the driver is not busy before allowing a user to change preferences.
+ @param driverRock IN A pointer to a driver-defined data structure provided in RegisterWebDriver().
+ @return <code>true</code> if the driver is busy (driver-defined), <code>false</code> otherwise. The driver should
+ return busy whenever it is not convenient for it to become the current driver as
+ requested by \<DXRef\>WDBecomeDriverFunction.
+*/
+typedef ACCB1 ASBool (ACCB2 WDIsDriverBusyFunctionProc)(void *driverRock);
+
+/**
+ Tests whether a driver can support a given web browser
+ application.
+ @param driverRock A pointer to a driver-defined data structure
+ provided in RegisterWebDriver().
+ @param WDAppSpecifier A platform-specific data structure
+ used to identify the web browser application. On Mac OS,
+ it is a pointer to an FSSpec. On Windows,
+ it is a pointer to a string (<code>char*</code>) representing the full
+ path of the executable application.
+ @return <code>true</code> if the driver is compatible with the given web browser
+ application, <code>false</code> otherwise.
+*/
+typedef WDAppSupportPredicateProc *WDAppSupportPredicate;
+/**
+ Follows and retrieves the link specified by a URL from the
+ PDF document specified by <code>theDoc</code>. Weblink supplies the driver
+ a fully resolved the URL. The driver is solely responsible
+ for launching a web browser, if it requires one. If the
+ driver depends on an external web browser, the driver or
+ the web browser is responsible for bringing that browser
+ to the foreground if the link data is not displayed by the
+ Acrobat viewer.
+
+ <p>For relative links, Weblink prepends a base URL if specified;
+ otherwise, it prepends the appropriate portion from the
+ current document's URL to resolve a relative link. </p>
+
+ <p>Weblink automatically handles mapped links, that is, links
+ that generate different results based on the location of
+ the mouse within the links. (Such links are specified by
+ checking the Mapped Coordinates Link box in the Edit URL
+ dialog box. These links have the <code>isMap</code> attribute). Weblink
+ appends <code>"?"</code> to the URL, followed by the x- and y-coordinates
+ of the mouse at the time the link was selected, relative
+ to the upper-left corner of the link's rectangle. </p>
+
+ @param driverRock A pointer to a driver-defined data structure
+ provided in RegisterWebDriver().
+ @param theDoc The PDF document that contains the link.
+
+ @param URL A <code>NULL</code>-terminated C string containing the URL
+ the link points to.
+ @param cFormData Data from a form to be sent with the
+ URL as post data. The default MIME type of form data is
+ <code>"application/x-www-form-unencoded"</code>.
+ @return <code>true</code> if the driver has successfully begun the process of
+ following the link, <code>false</code> otherwise.
+*/
+typedef WDFollowLinkFunctionProc *WDFollowLinkFunction;
+/**
+ Follows and retrieves the link specified by a URL from the
+ PDF document specified by <code>theDoc</code>, going to a target frame.
+ Weblink supplies the driver a fully resolved the URL. The
+ driver is solely responsible for launching a web browser,
+ if it requires one. If the driver depends on an external
+ web browser, the driver or the web browser is responsible
+ for bringing that browser to the foreground if the link
+ data is not displayed by the Acrobat viewer.
+
+ <p>For relative links, Weblink prepends a base URL if specified;
+ otherwise, it prepends the appropriate portion from the
+ current document's URL to resolve a relative link. </p>
+
+ <p>Weblink automatically handles mapped links, that is, links
+ that generate different results based on the location of
+ the mouse within the links. (Such links are specified by
+ checking the Mapped Coordinates Link box in the Edit URL
+ dialog box. These links have the <code>isMap</code> attribute). Weblink
+ appends <code>"?"</code> to the URL, followed by the x- and y-coordinates
+ of the mouse at the time the link was selected, relative
+ to the upper-left corner of the link's rectangle.</p>
+
+ @param driverRock A pointer to a driver-defined data structure
+ provided in RegisterWebDriver().
+ @param theDoc The PDF document that contains the link.
+
+ @param cURL A <code>NULL</code>-terminated C string containing the
+ URL the link points to.
+ @param cFormData Data from a form to be sent with the
+ URL as post data. The default MIME type of form data is
+ <code>"application/x-www-form-unencoded"</code>.
+ @param params A parameter block specifying a target frame.
+ @return <code>true</code> if the driver has successfully begun the process of
+ following the link, <code>false</code> otherwise.
+
+*/
+typedef WDFollowLinkWithParamsFunctionProc *WDFollowLinkWithParamsFunction;
+/**
+ Called whenever the state of the driver changes from inactive
+ to current, or vice versa.
+ @param driverRock A pointer to a driver-defined data structure
+ provided in RegisterWebDriver().
+ @param bComing Tells the driver whether it should become
+ current or relinquish control. If it is <code>true</code>, the driver is being
+ requested to become the current Weblink driver, and it should
+ take any action that is appropriate, such as installing
+ IAC message handlers, opening TCP drivers, and so on. If it is
+ <code>false</code>, the driver is being asked to relinquish its status
+ as current driver and should take whatever action is necessary
+ to accomplish this.
+ @return <code>false</code> if the driver fails to change state to that requested
+ in <code>bComing</code>, <code>true</code> otherwise.
+*/
+typedef WDBecomeDriverFunctionProc *WDBecomeDriverFunction;
+/**
+ Called when the user clicks on the Weblink toolbar button
+ to switch to the browser application.
+ @param driverRock A pointer to a driver-defined data structure
+ provided in RegisterWebDriver().
+
+*/
+typedef WDBringFrontFunctionProc *WDBringFrontFunction;
+/**
+ (Optional) Called when the user clicks the Options button
+ in the Weblink Preferences dialog box. If this function
+ is <code>NULL</code>, the Options button is disabled.
+ @param driverRock A pointer to a driver-defined data structure
+ provided in RegisterWebDriver().
+*/
+typedef WDOptionsFunctionProc *WDOptionsFunction;
+/**
+ (Optional) Called to determine if the driver is performing
+ a transaction. Weblink uses this to check that the
+ driver is not busy (driver-defined) before allowing a user to change preferences.
+
+ <p>The driver should return busy whenever
+ it is not convenient for it to become the current driver
+ as requested by <code>WDBecomeDriverFunction()</code>. </p>
+
+ @param driverRock A pointer to a driver-defined data structure
+ provided in RegisterWebDriver().
+ @return <code>true</code> if the driver is busy, <code>false</code> otherwise.
+*/
+typedef WDIsDriverBusyFunctionProc *WDIsDriverBusyFunction;
+
+/** A data structure containing callbacks that implement a Weblink driver.
+ @see RegisterWebDriver
+*/
+typedef struct {
+ /** Driver version number. */
+ ASUns32 WDVRev;
+ /** Currently unused. */
+ ASUns32 nReserved;
+/** */
+ WDAppSupportPredicate doYouSupport;
+/** */
+ WDFollowLinkFunction followLink;
+/** */
+ WDBecomeDriverFunction becomeDriver;
+/** */
+ WDBringFrontFunction bringFront;
+/** */
+ WDOptionsFunction options;
+/** */
+ WDIsDriverBusyFunction isDriverBusy;
+/** */
+ WDFollowLinkWithParamsFunction followLinkWithParams;
+} WebDriverVector;
+
+/* -------------------------- WebLink defines ------------------------------- */
+
+
+#define WEB_LINK_HFT_LATEST_VERSION (2L)
+
+/* For creating selector (index to HFT)
+*/
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+
+enum
+{
+ WLBAD_SELECTOR,
+#include "WLHFTProcs.h"
+ WLNUMSELECTORSplusOne
+};
+#undef PIPROC
+
+#define WebLinkNUMSELECTORS (WLNUMSELECTORSplusOne - 1)
+
+extern HFT gWLHFT;
+
+
+//typedef ACCB1 ASInt32 (ACCB2 WLCreateOrDeleteWebLinksPROTO)(ASBool bCreate, PDDoc pdd, ASInt32 nStart, ASInt32 nEnd, ProgressMonitor pm, void *vPMData, CancelProc cp, void *vCPData);
+//typedef WLCreateOrDeleteWebLinksPROTO* WLCreateOrDeleteWebLinksSELPROTO;
+//#define WLCreateOrDeleteWebLinks ((*((WLCreateOrDeleteWebLinksSELPROTO)(gWLHFT[WLCreateOrDeleteWebLinksSEL]))))
+
+
+#define WLHFTNAME "WebLink"
+
+#define Init_gWLHFT ASExtensionMgrGetHFT( ASAtomFromString(WLHFTNAME), WEB_LINK_HFT_LATEST_VERSION);
+/* Define API/Function prototypes
+*/
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##_SELPROTO)params;
+#include "WLHFTProcs.h"
+#undef PIPROC
+
+#define RegisterWebDriver ((*((RegisterWebDriver_SELPROTO)(gWLHFT[RegisterWebDriver_SEL]))))
+#define BeginWebProgress ((*((BeginWebProgress_SELPROTO)(gWLHFT[BeginWebProgress_SEL]))))
+#define UpdateWebProgress ((*((UpdateWebProgress_SELPROTO)(gWLHFT[UpdateWebProgress_SEL]))))
+#define EndWebProgress ((*((EndWebProgress_SELPROTO)(gWLHFT[EndWebProgress_SEL]))))
+#define GetAppSpecifier ((*((GetAppSpecifier_SELPROTO)(gWLHFT[GetAppSpecifier_SEL]))))
+#define WebProgressDidCancel ((*((WebProgressDidCancel_SELPROTO)(gWLHFT[WebProgressDidCancel_SEL]))))
+#define WWWOpenURL ((*((WWWOpenURL_SELPROTO)(gWLHFT[WWWOpenURL_SEL]))))
+#define WLCreateOrDeleteWebLinks ((*((WLCreateOrDeleteWebLinks_SELPROTO)(gWLHFT[WLCreateOrDeleteWebLinks_SEL]))))
+#define WWWOpenURLWithParams ((*((WWWOpenURLWithParams_SELPROTO)(gWLHFT[WWWOpenURLWithParams_SEL]))))
+
+#ifdef __cplusplus
+}
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#endif
+
+
+#endif /************** End of WLHFT.h **************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFTProcs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFTProcs.h
new file mode 100644
index 0000000..92896b4
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WLHFTProcs.h
@@ -0,0 +1,169 @@
+/**********************************************************************
+
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ WLHFTProcs.h
+
+*********************************************************************/
+
+/** Register Web Driver.
+
+ <p>Registers a driver with the Weblink plug-in. It must be called during the import, replace,
+ and register phase of the plug-in initialization process of any plug-ins that want to use
+ Weblink services.</p>
+
+ @param driverName IN The driver's name. It is a <code>NULL</code>-terminated C string shown to
+ the user to identify the current driver. The string is limited
+ to 255 characters and is copied internally.
+ @param driverRock IN A pointer to a driver-defined data structure. This value is
+ passed to the driver for every driver-supplied function call.
+ @param wdVec IN A pointer to a data structure of driver-supplied callback
+ functions. It is not copied; therefore, the structure must be
+ either statically or dynamically allocated, rather than
+ automatically allocated as a local variable. It must not be
+ modified, moved, or deallocated until the plug-in
+ terminates within Acrobat.
+ @return Registration status. <code>true</code> if the registration was successful, <code>false</code> otherwise. Failure
+ occurs if there is insufficient memory or the version number in <code>wdVec</code> is incompatible
+ with the Weblink plug-in.
+
+*/
+PIPROC(ASBool, RegisterWebDriver, (char *driverName, void *driverRock, WebDriverVector *wdVec), driverName, driverRock, wdVec)
+
+/** Creates a new Weblink progress.
+ <p>It creates a new Weblink progress monitor to provide feedback during long operations.
+ Current web browsers follow links asynchronously and use BeginWebProgress(),
+ UpdateWebProgress(), and EndWebProgress() to assure a user that a request is making progress.</p>
+
+ @param message IN Message text. A <code>NULL</code>-terminated C string that represents a
+ message to display with the progress monitor.
+ @param flags IN Possible flag options for the progress monitor. There are two
+ flags defined (in WLHft.h):
+
+ <TABLE rules="all" cellspacing="1">
+ <TR><TH>Flag option</TH><TH>Description</TH></TR>
+ <TR><TD><code>PROGRESS_HAS_METER</code></TD><TD>Put a thermometer-style meter in the progress display.</TD></TR>
+ <TR><TD><code>PROGRESS_HAS_CANCEL</code></TD><TD>Add either a Cancel button or a message directing the user how to abort the operation.</TD></TR>
+ </TABLE>
+
+ @param timeoutTime IN Timeout period. The amount of time in seconds before the
+ progress monitor indicates that progress is not being made.
+ @return Monitor creation status. A non-<code>NULL</code> value if the monitor's creation was successful,
+ <code>NULL</code> otherwise. In the current implementation, there can be at most one progress monitor.
+*/
+PIPROC(WebProgressMonitor, BeginWebProgress, (char *message, ASUns32 flags, ASInt32 timeoutTime), message, flags, timeoutTime)
+
+
+/** Updates Web Progress.
+ <p>It updates the state of the current progress monitor.</p>
+
+ @param progMon IN The current progress monitor returned from BeginWebProgress().
+ @param message IN Message text. If non-<code>NULL</code>, the text displayed is changed to
+ that represented by <code>message</code>. If <code>message</code> is <code>NULL</code>, the text is not changed.
+ @param from IN The lower bound of a sub-range between <code>0</code> and <code>outOf</code> to
+ highlight: <code>from</code> and <code>to</code> are the lower and upper bounds of
+ a subrange between <code>0</code> and <code>outOf</code> to highlight. Typically the
+ lower bound, <code>from</code>, is zero, but a driver may wish to
+ indicate the progress of an operation that has no known magnitude
+ as a priority. It could do so with a <i>chaser light</i>
+ display by cycling the lower bound, <code>from</code>, through the range
+ between <code>0</code> and <code>outOf - 1</code>, and defining the upper bound,
+ <code>to</code>, as <code>from + 1</code>.
+ @param to IN The upper bound of a sub-range between <code>0</code> and <code>outOf</code> to highlight.
+ @param outOf IN If <code>progMon</code> was created with the <code>PROGRESS_HAS_METER</code>
+ flag, the <code>from</code>, <code>to</code>, and <code>outOf</code> arguments are used to
+ change the state of the bar. The range of the meter is
+ defined from <code>0</code> to <code>outOf</code>.
+ @param timeoutTime IN (Optional) The new timeout period in seconds. If it is non-zero, a
+ new timeout is set.
+
+ @return Update status. <code>true</code> if the update was successful, <code>false</code> if the monitor timed out or
+ the user canceled the operation. The latter case only happens when the progress
+ monitor was created with the <code>PROGRESS_HAS_CANCEL</code> flag in BeginWebProgress().
+
+*/
+PIPROC(ASBool, UpdateWebProgress, (WebProgressMonitor progMon, char *message, ASInt32 from, ASInt32 to, ASInt32 outOf, ASInt32 timeoutTime),
+ progMon, message, from, to, outOf, timeoutTime)
+/** Ends Web Progress.
+ <p>Terminates the current progress monitor.</p>
+ @param progMon IN The current progress monitor.
+*/
+PIPROC(void, EndWebProgress, (WebProgressMonitor progMon), progMon)
+
+
+/** Get App Specifier.
+ <p>Obtains a platform-specific structure specifying the application the user has chosen
+ as the web browser.</p>
+
+ @param promptUser IN <code>true</code> if there is no current web browser and the user is
+ prompted to choose one, <code>false</code> otherwise.
+ @return A pointer to a platform-specific data structure that specifies the web browser. On the
+ Mac OS, it is a pointer to an FSSpec. On Windows and UNIX platforms,
+ it is a pointer to a string (<code>char*</code>) representing the full path of the executable
+ application.
+*/
+PIPROC(WDAppSpecifier, GetAppSpecifier, (ASBool promptUser), promptUser)
+
+/** Checks if the Cancel button was clicked.
+ <p>It tests whether the user clicked the Cancel button in the progress monitor dialog.</p>
+
+ @param progMon IN The current progress monitor.
+ @return <code>true</code> if the progress monitor has been canceled, <code>false</code> otherwise.
+*/
+PIPROC(ASBool, WebProgressDidCancel, (WebProgressMonitor progMon), progMon)
+
+/** Opens a new URL.
+ <p>Asks Weblink to follow the specified URL. If the URL specifies a PDF document,
+ it opens it in a new window (an AVDoc view). It is used by other plug-ins that wish to start a download.</p>
+
+ @param avd IN If specified, it is the AVDoc that contains the source of the URL.
+ @param cURL IN The URL to be opened.
+ @param cFormData IN The data for a form to be posted.
+ @return <code>true</code> if the request succeeded, <code>false</code> otherwise.
+*/
+PIPROC(ASBool, WWWOpenURL, (AVDoc avd, char *cURL, char *cFormData), avd, cURL, cFormData)
+
+
+/** Creates Or Deletes WebLinks
+ <p>Used by other plug-ins that want to create or delete weblinks in a document.</p>
+ <p>Adobe Reader does not, by default, create or delete items in a PDF document.</p>
+ @param bCreate IN A boolean to indicate whether links should be created. If it is <code>false</code>, links will be deleted.
+ @param pdd IN The PDDoc in which to create or delete weblinks.
+ @param nStart IN The starting page
+ @param nEnd IN The ending page
+ @param pm IN The current progress monitor.
+ @param vPMData IN The data to be passed to the progress monitor.
+ @param cp IN The cancel proc
+ @param vCPData IN The data to be passed to the cancel proc.
+ @return The number of web links created or deleted.
+ @product_exclude RDR
+*/
+PIPROC(ASInt32, WLCreateOrDeleteWebLinks, (ASBool bCreate, PDDoc pdd, ASInt32 nStart, ASInt32 nEnd, ProgressMonitor pm, void *vPMData, CancelProc cp, void *vCPData),
+ bCreate, pdd, nStart, nEnd, pm, vPMData, cp, vCPData)
+
+
+/** Opens a new URL With Parameters .
+ <p>Asks Weblink to follow a URL, specifying a target frame. If the URL specifies a PDF
+ document, it opens it in a new window (an AVDoc view). It is used by other plug-ins that wish to start a download and specify a target frame.</p>
+ @param avd If specified, it is the AVDoc that contains the source of the URL.
+ @param cURL The URL to be opened.
+ @param cFormData The data for a form to be posted.
+ @param params The parameter block specifying the name of the frame.
+ @return <code>true</code> if the request succeeded, <code>false</code> otherwise.
+*/
+PIPROC(ASBool, WWWOpenURLWithParams, (AVDoc avd, char *cURL, char *cFormData, WWWOpenURLParams params), avd, cURL, cFormData, params)
+
+
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinCalls.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinCalls.h
new file mode 100644
index 0000000..cb1a1d2
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinCalls.h
@@ -0,0 +1,298 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2007 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ WinCalls.h
+
+ ******************************************************************************************
+ **** Instructions for Plugin Developers ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ To use this file you must declare two global variables: g~HFT and g~Version. You can
+ see them declared as extern about one page down from here. Your plugin should set a
+ #define of PI_~_VERSION to some non zero value. Suggested values are given below in
+ the "for public use" section. ~HFT_LATEST_VERSION is not recommended because you will
+ not be able to support backwards compatible versions. It is recommended that you use the lowest
+ ~HFT_VERSION you require. Later versions are compatible with earlier versions, so if
+ you require ~HFT_VERSION_4, your plugin will work with ~HFT_VERSION_5, ~HFT_VERSION_6, and so on.
+
+ You can support old versions and still use newer versions of this HFT by checking the
+ value of g~Version. If you use the standard PiMain.c supplied in the SDK, this will be
+ set to the actual version of the HFT returned to you (For example, if you require version 4,
+ you are returned version 7, which is compatible, and g~Version is set to 7). You can write
+ code that looks something like this:
+ if (g~Version >= ~HFT_VERSION_5)
+ CallNewSpeedyCode();
+ else {
+ assert(g~Version >= ~HFT_VERSION_4); //PI_~_VERSION was defined as ~HFT_VERSION_4
+ CallOldSlowCode();
+ }
+ ******************************************************************************************
+ **** Instructions for HFT Developer ****
+ (In the instructions below ~ is used to refer to the HFT this file is for. For
+ example, this file would be called "~Calls.h")
+
+ Important: routines that have been released can never be deleted or changed.
+ If you want to make a new version, create a new call, add it to the end of this file and
+ increment _~_LATEST_VERSION (note the leading underscore).
+
+ If this is the first new routine in a new version, change the _~_IS_BETA flag
+ to 1. Next, create a new ~_VERSION_# for plugins to use and set it to
+ ~HFT_LATEST_VERSION. For example, suppose the last release of Acrobat was version 20, version 21
+ is under development, and you add a new routine for version 21. Increment _~HFT_LATEST_VERSION
+ to 0x00200001 and set _~_IS_BETA to 1. Add "#define ~HFT_VERSION_21 ~HFT_LATEST_VERSION".
+ Add your routine and assert that g~Version >= ~HFT_VERSION_21. Leave
+ _~_LAST_BETA_COMPATIBLE_VERSION unchanged (0x00200000 in this example).
+
+ If the ~_IS_BETA flag is set to 1, you may change or delete the beta routines at will.
+ Before checking in the modifications, however, increment the _~HFT_LATEST_VERSION number.
+ If the change is not compatible (delete, change, and so on) set _~_LAST_BETA_COMPATIBLE_VERSION equal
+ to the new _~HFT_LATEST_VERSION. If the change is compatible, leave the LAST_BETA version
+ as is.
+
+ Plugins that require a BETA HFT will be refused unless they ask for a beta version greater than or equal to
+ (>=) LAST_BETA_COMPATIBLE_VERSION and less than or equal to (<=) HFT_LATEST_VERSION.
+ By incrementing the version number, you ensure the plugin will refuse to load until it
+ has been recompiled with your changes. You also ensure plugins compiled with your changes
+ will not load on older versions of Acrobat. In other words, it makes sure both sides are in sync.
+
+ Important: Whenever you make a change to this file, you must increment _~HFT_LATEST_VERSION.
+
+ Once the product reaches RC or a similar milestone, change the _~_IS_BETA flag to 0, jump
+ the _~HFT_LATEST_VERSION to the final version (0x00210000 in our example), do the same for
+ _~_LAST_BETA_COMPATIBLE_VERSION, and set the
+ ~HFT_VERSION_# to the final version number (0x00210000 in this example). Once the HFT
+ has left beta, the routines cannot be changed and a new beta must ensue (beta for version
+ 22 in this example).
+
+*********************************************************************/
+#ifndef _H_WinCalls
+#define _H_WinCalls
+
+#include "acroassert.h"
+
+/* for Adobe use only */
+#define _WINHFT_LATEST_VERSION 0x00090000
+#define _WINHFT_IS_BETA 0
+
+/* for public use */
+#define WINHFT_LATEST_VERSION (_WINHFT_IS_BETA ? (kHFT_IN_BETA_FLAG | _WINHFT_LATEST_VERSION) : _WINHFT_LATEST_VERSION)
+
+#define WINHFT_VERSION_4 0x00040000
+#define WINHFT_VERSION_5 0x00050000
+#define WINHFT_VERSION_8 0x00080000
+#define WINHFT_VERSION_9 WINHFT_LATEST_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "WinExpT.h"
+
+#if PI_WIN_VERSION != 0
+
+#include <windows.h>
+
+extern HFT gWinHFT;
+extern ASUns32 gWinVersion;
+
+#define WinAppRegisterModelessDialogSEL 1
+
+/**
+ (Windows only) Registers modeless dialogs with the viewer
+ so that the dialog gets the correct messages.
+ @param dialog IN/OUT The <code>HWND</code> for the dialog to register.
+ @see WinAppUnRegisterModelessDialog
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *WinAppRegisterModelessDialogSELPROTO)
+ (HWND dialog);
+#define WinAppRegisterModelessDialog (ACROASSERT(gWinVersion >=WINHFT_VERSION_4), *((WinAppRegisterModelessDialogSELPROTO)(gWinHFT[WinAppRegisterModelessDialogSEL])))
+
+#define WinAppUnRegisterModelessDialogSEL 2
+
+/**
+ (Windows only) Un-registers modeless dialogs with the viewer.
+
+ @param dialog IN/OUT The <code>HWND</code> for the dialog to un-register.
+ @see WinAppRegisterModelessDialog
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *WinAppUnRegisterModelessDialogSELPROTO)
+ (HWND dialog);
+#define WinAppUnRegisterModelessDialog (ACROASSERT(gWinVersion >=WINHFT_VERSION_4), *((WinAppUnRegisterModelessDialogSELPROTO)(gWinHFT[WinAppUnRegisterModelessDialogSEL])))
+
+#define WinAppEnableIdleTimerSEL 3
+
+/** Windows-specific Methods
+
+ <p>(Windows only) Allows a plug-in to turn the <code>AVAppIdle</code> timer
+ on and off, which is needed when a plug-in calls another
+ process and thus blocks Acrobat for an extended period of
+ time. </p>
+
+ @param enable IN/OUT <code>true</code> to turn the timer on, <code>false</code> to turn
+ it off.
+ @return The previous state of the <code>AVAppIdle</code> timer.
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 BOOL (ACCBPROTO2 *WinAppEnableIdleTimerSELPROTO)
+ (BOOL enable);
+#define WinAppEnableIdleTimer (ACROASSERT(gWinVersion >=WINHFT_VERSION_4), *((WinAppEnableIdleTimerSELPROTO)(gWinHFT[WinAppEnableIdleTimerSEL])))
+
+#define WinAppGetModalParentSEL 4
+
+/**
+ (Windows only) Gets the appropriate parent for any modal dialogs
+ created by a plug-in. This method is only useful if there
+ is an AVDoc; it cannot be used, for example, to put up a
+ modal dialog while a file is being opened.
+
+ <p>In circumstances where there is no AVDoc, use the <code>gHWND</code>
+ provided in PIMAIN.C. Although this does not give perfect
+ results in some cases, there is no real alternative. For
+ example, if a file is opened in an external application's
+ window, the dialog is not hidden if the external application
+ is hidden. </p>
+
+ @param doc IN/OUT The AVDoc for a PDF file if the dialog is acting
+ on an PDF document, which is generally the case. The AVDoc
+ must be provided so that for external documents, the viewer
+ can parent the dialog of the external application instead
+ of the viewer.
+ @return The <code>HWND</code> for the modal dialog's parent.
+ @see AVAppBeginModal
+ @see AVAppEndModal
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 HWND (ACCBPROTO2 *WinAppGetModalParentSELPROTO)
+ (AVDoc doc);
+#define WinAppGetModalParent (ACROASSERT(gWinVersion >=WINHFT_VERSION_4), *((WinAppGetModalParentSELPROTO)(gWinHFT[WinAppGetModalParentSEL])))
+
+/* Return the Application's palette. Return is NULL if no palette is being used */
+/* DON'T release this palette handle -- it may be used by other plugins */
+#define WinAppGetPaletteSEL 5
+
+/**
+ (Windows only) Gets the application's color palette in the
+ case where the system is running in 256 color mode or less.
+ It is used when you want to set and realize a palette in an external
+ window before drawing to it.
+
+ <p>Do not release this palette handle: it may be in use by
+ other plug-ins. </p>
+ @return The application's color palette. It is <code>NULL</code> if the system is running
+ direct colors (15/ 16/ 24/ 32-bit) or no palette is being
+ used.
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+typedef ACCBPROTO1 HPALETTE (ACCBPROTO2 *WinAppGetPaletteSELPROTO)
+ (void);
+#define WinAppGetPalette (ACROASSERT(gWinVersion >=WINHFT_VERSION_4), *((WinAppGetPaletteSELPROTO)(gWinHFT[WinAppGetPaletteSEL])))
+
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_WIN_VERSION in PIRequir.h to
+** 0x00040000.
+*/
+
+/* WinAppGetPrinterHDC */
+#define WinAppGetPrinterHDCSEL 6
+
+/**
+ Gets the device context for a printer, which is the <code>HDC</code>
+ used to print a document.
+
+ <p>It is used if you need to modify the device context Acrobat creates
+ when printing to a non-PostScript printer. You should register
+ for the notification PDDocWillPrintPage() and acquire the
+ printer <code>DC</code> for the page you wish to modify. </p>
+
+ @return The printer device context.
+ @since PI_WIN_VERSION >= 0x00040000
+*/
+typedef ACCBPROTO1 HDC (ACCBPROTO2 *WinAppGetPrinterHDCSELPROTO)
+ (void);
+#define WinAppGetPrinterHDC (ACROASSERT(gWinVersion >=WINHFT_VERSION_5), *((WinAppGetPrinterHDCSELPROTO)(gWinHFT[WinAppGetPrinterHDCSEL])))
+
+
+/*
+** If you need to use these calls from within your plug-in, you will
+** need to bump up the value of PI_WIN_VERSION in PIRequir.h to
+** 0x00050000.
+*/
+
+/* WinAppGetPrinterHDC */
+#define WinAppRegisterInterfaceSEL 7
+
+/**
+ (Windows only) Register a COM interface.
+ @param COMServer IN/OUT A pointer to <code>COMServerRec</code>.
+ @return <code>true</code> if the interface was registered with Acrobat; <code>false</code>
+ otherwise.
+ @since PI_WIN_VERSION >= 0x00050000
+*/
+typedef ACCBPROTO1 BOOL (ACCBPROTO2 *WinAppRegisterInterfaceSELPROTO)
+ (COMServer);
+
+#define WinAppRegisterInterface (ACROASSERT(gWinVersion >=WINHFT_VERSION_5), *((WinAppRegisterInterfaceSELPROTO)(gWinHFT[WinAppRegisterInterfaceSEL])))
+
+/**
+ This function is designed for internal use only. It is deprecated in
+ Acrobat 6.0 and will not be available in future releases.
+*/
+#define WinAppLockViewerSEL 8
+typedef ACCBPROTO1 void (ACCBPROTO2 *WinAppLockViewerSELPROTO)
+ (BOOL);
+#define WinAppLockViewer (ACROASSERT(gWinVersion >=WINHFT_VERSION_5), *((WinAppLockViewerSELPROTO) \
+ (gWinHFT[WinAppLockViewerSEL])))
+
+/**
+ (Windows only) Gets the appropriate parent for any modeless dialogs
+ created by a plug-in.
+
+ <p>In previous versions of Acrobat the correct parent for modeless
+ dialogs was always <code>gHWND</code> and was provided in PIMAIN.C.</p>
+
+ @return The <code>HWND</code> for the modeless dialog's parent.
+ @see WinAppRegisterModelessDialog
+ @see WinAppUnregisterModelessDialog
+ @since PI_WIN_VERSION >= 0x00080000
+*/
+#define WinAppGetModelessParentSEL 9
+typedef ACCBPROTO1 HWND (ACCBPROTO2 *WinAppGetModelessParentSELPROTO)();
+#define WinAppGetModelessParent (ACROASSERT(gWinVersion >=WINHFT_VERSION_8), *((WinAppGetModelessParentSELPROTO)(gWinHFT[WinAppGetModelessParentSEL])))
+
+#define WinAppUnregisterInterfaceSEL 10
+
+/**
+ (Windows only) Unregisters a COM interface.
+ @param COMServer IN/OUT A pointer to a <code>COMServerRec</code>.
+ @since PI_WIN_VERSION >= 0x00090000
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *WinAppUnregisterInterfaceSELPROTO)
+ (COMServer);
+
+#define WinAppUnregisterInterface (ACROASSERT(gWinVersion >=WINHFT_VERSION_9), *((WinAppUnregisterInterfaceSELPROTO)(gWinHFT[WinAppUnregisterInterfaceSEL])))
+
+/* If you add, delete, or modify procs listed in this file please read the instructions at the top about how to properly change the version number */
+
+#endif /* PI_WIN_VERSION */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_WinCalls */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinExpT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinExpT.h
new file mode 100644
index 0000000..ad9eaf5
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinExpT.h
@@ -0,0 +1,57 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ WinExpT.h
+
+ - Types required to use the Windows HFT.
+
+*********************************************************************/
+
+#ifndef _H_WIN_EXPT
+#define _H_WIN_EXPT
+
+#include <oaidl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef ACCBPROTO1 ASAtom(ACCBPROTO2 *COMServerGetNameProcType)(void);
+typedef ACCBPROTO1 ASAtom(ACCBPROTO2 *COMServerGetNameProcTypeEx)(void* clientData);
+//you can use either IDispatch call, depending on if you need to have your COMServer clientData passed back
+typedef ACCBPROTO1 IDispatch*(ACCBPROTO2 *COMServerGetIDispatchProcType)(void);
+typedef ACCBPROTO1 IDispatch*(ACCBPROTO2 *COMServerGetIDispatchProcTypeEx)(void* clientData);
+
+// Try to minimize C4786 compiler warnings
+#if _DEBUG
+#define _t_COMServer _CSvr
+#endif
+
+typedef struct _t_COMServer {
+ ASSize_t size;
+ COMServerGetNameProcType GetName;
+ COMServerGetIDispatchProcType GetIDispatch;
+
+ COMServerGetNameProcTypeEx GetNameEx; //if not null this is called instead of GetName
+ COMServerGetIDispatchProcTypeEx GetIDispatchEx; //if not null this is called instead of GetIDispatch
+ void* clientData; //passed back to the Ex routines
+} COMServerRec, *COMServer;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H_WIN_EXPT */
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinPltfm.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinPltfm.h
new file mode 100644
index 0000000..c6968b0
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/WinPltfm.h
@@ -0,0 +1,179 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ WinPltfm.h
+
+ - PLATFORM file for Windows development.
+
+*********************************************************************/
+
+#define MDSYSERR "wfileerr.h"
+#define DefineMDSysErr(mdNum, mdName, msg) mdName = mdNum,
+
+#define ASKEY "askeywin.h"
+
+#define AS_LITTLEENDIAN 1
+#define IEEEFLOAT 0
+#define IEEESOFT 0
+#define UNSIGNEDCHARS 0
+#define FRACT_DEFINED 0
+
+#ifdef _WIN32
+#define MEMSET_IMPLEMENTED 0
+#define MEMCPY_IMPLEMENTED 0
+#else
+#define MEMSET_IMPLEMENTED 1
+#define MEMCPY_IMPLEMENTED 1
+#endif // _WIN32
+
+/* 32 bit mode changes */
+#ifdef _WIN32
+#define WORD_ALIGN 4
+#define os_size_t_IS_Uns32 1
+#define HUGEPTRTYPE
+#else
+#define WORD_ALIGN 2
+#define os_size_t_IS_Uns32 0
+#define HUGEPTRTYPE __huge
+#endif /* _WIN32 */
+
+/* Define the linefeed termination for this system */
+#define nENDLINE_CHARS 2
+#define sENDLINE "\015\012"
+
+#define REPLACEABLE
+
+#ifdef _WIN32
+#define far
+#define _huge
+#define __huge
+#define AVEX1 __declspec(dllexport)
+#define AVEX2
+#else
+#define AVEX1
+#define AVEX2 __export
+#endif
+
+#define ACROCALLBACKPROTO
+/**
+ A macro used when declaring function prototypes. Its definition is platform-dependent. Use this macro in every function prototype you declare.
+ Use <code>ACCBPROTO1</code> before the return value in a function prototype.
+
+ @example <code>static ACCBPROTO1 void (ACCBPROTO2 *DrawImageSelectionCallback)(AVPageView pageView, AVRect* updateRect, void *data);</code>
+
+ @see ACCB1
+ @see ACCB2
+ @see ACCBPROTO2
+*/
+#define ACCBPROTO1
+/**
+ A macro used when declaring function prototypes. Its definition is platform-dependent. Use this macro in every function prototype you declare.
+ Use <code>ACCBPROTO2</code> after the return value in a function prototype.
+
+ @example <code>static ACCBPROTO1 void (ACCBPROTO2 *DrawImageSelectionCallback)(AVPageView pageView, AVRect* updateRect, void *data);</code>
+
+ @see ACCB1
+ @see ACCB2
+ @see ACCBPROTO1
+*/
+#define ACCBPROTO2
+
+#ifdef _WIN32
+#define ACROCALLBACK
+/**
+ A macro used when declaring callback functions. Its definition is platform-dependent. Use this macro in every callback function you declare.
+ Use <code>ACCB2</code> after the return value in a function declaration.
+
+ @example <code>static ACCB1 ASAtom ACCB2 SnapZoomToolGetType(AVTool tool){...}</code>
+
+ @see ACCB1
+ @see ACCBPROTO1
+ @see ACCBPROTO2
+*/
+#define ACCB2
+#else
+#define ACROCALLBACK __loadds
+#define ACCB2 __loadds
+#endif
+/**
+ A macro used when declaring callback functions. Its definition is platform-dependent. Use this macro in every callback function you declare.
+ Use <code>ACCB1</code> before the return value in a function declaration.
+
+ @example <code>static ACCB1 ASAtom ACCB2 SnapZoomToolGetType(AVTool tool){...}</code>
+
+ @see ACCB2
+ @see ACCBPROTO1
+ @see ACCBPROTO2
+*/
+#define ACCB1
+
+#ifdef _WIN32
+#define ACROEXPORT AVEX1
+#define ACEX1 AVEX1
+#define ACEX2
+#else
+#define ACROEXPORT __loadds __export
+#define ACEX1
+#define ACEX2 __loadds __export
+#endif
+
+#ifdef _WIN32
+#define ACROEXPORTPRIV AVEX1
+#define ACROEXPORTCDECL AVEX1
+#define ACROEXPORTDATA
+#define ACROIMPORTDATA extern __declspec(dllimport)
+#define ACROIMPORTDATA1 __declspec(dllimport)
+#define ACROIMPORTDATA2
+#else
+#define ACROEXPORTPRIV __loadds __export
+#define ACROEXPORTCDECL __cdecl __loadds __export
+#define ACROEXPORTDATA __export
+#define ACROIMPORTDATA extern
+#define ACROIMPORTDATA1
+#define ACROIMPORTDATA2
+#endif
+
+/**
+ (Windows only, previously known as <code>WIN_ENV</code>) Defined if the client is being compiled for a Windows machine, undefined otherwise.
+ MAC_PLATFORM, WIN_PLATFORM, and UNIX_PLATFORM should be used by client developers to conditionally compile platform-dependent code.
+
+ <p>WIN_PLATFORM must be defined in the arguments to the C compiler. The make files for the sample clients in the Acrobat SDK do this automatically.</p>
+
+ @see MAC_PLATFORM
+ @see UNIX_PLATFORM
+*/
+#define WIN_PLATFORM 1
+
+/* XXX we should only have DEBUG in ACROCORE */
+#if _DEBUG
+ /**
+ Enables and disables compile-time type-checking in various declarations.
+ <p>Define DEBUG as <code>1</code> to enable type-checking (when developing and testing clients), and as <code>0</code> to disable
+ type-checking (before shipping your client).</p>
+
+ @example <code>#define DEBUG 1</code>
+
+ @see ASCallbackCreateNotification
+ @see ASCallbackCreateProto
+ @see ASCallbackCreateReplacement
+ */
+ #define DEBUG 1
+ #define DODEBUG 1
+#endif
+
+/* The following defines are required to compile the Filter sources */
+#define ENVIRONMENT "PS2Prefi.h"
+#define CAROUSEL 1
+#define ANSI_C 1
+#define WIN 1
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrE.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrE.h
new file mode 100644
index 0000000..dc9331a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrE.h
@@ -0,0 +1,19 @@
+/* XtnMgrE.h */
+
+/* (c) Copyright 2006 Adobe Systems Incorporated.
+All rights reserved. All information contained herein is the property
+of Adobe Systems Incorporated or its Licensors, and are protected trade
+secrets and copyrights, and may be covered by U.S. and foreign patents
+or patents pending and/or mask works. Any reproduction or dissemination
+of any portion of this document or of software or other works derived
+from it is strictly forbidden unless prior written permission is
+obtained from Adobe Systems Incorporated.
+
+Patents Pending
+
+PostScript and Display PostScript are trademarks of Adobe Systems
+Incorporated which may be registered in certain jurisdictions.
+*/
+
+#include "XtnMgrEASF.h"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrEASF.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrEASF.h
new file mode 100644
index 0000000..c54b3e5
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/XtnMgrEASF.h
@@ -0,0 +1,48 @@
+/*
+* DO NOT EDIT THIS FILE MANNUALLY.
+*
+*
+* Header file generated AUTOMATICALLY by The batch file ...\Tools\win\makePDFLHfromASF.bat.
+* The batch file calls ZBFGen2, a ZString2.0 library program, using the template ...\Tools\win\ztrings\PDFLError_Str.tmpl.
+*
+* DO NOT EDIT THIS FILE MANNUALLY. THIS IS CLOSELY TIED WITH THE ZString2.0 Binary
+* Format. Regenerate this whenever the corresponding .asfx file changes.
+*
+*/
+
+
+DefineErr(xmErrNoError, "No error.")
+
+DefineErr(xmErrOutOfDateHFT, "The plug-in was compiled with an out-of-date HFT.")
+
+DefineErr(xmErrNoPLUGResource, "The plug-in appears to be damaged or in use.")
+
+DefineErr(xmErrPlugInIncompatible, "The plug-in is incompatible with this version of the Acrobat.")
+
+DefineErr(xmErrInitializationFailed, "The plug-in failed to initialize.")
+
+DefineErr(xmErrDuplicatePlugInName, "Two plug-ins are attempting to register with the same name.")
+
+DefineErr(xmErrCannotReplaceSelector, "Attempt to replace an unreplaceable selector.")
+
+DefineErr(xmErrCalledObsoleteProc, "An unimplemented or obsolete function was called.")
+
+DefineErr(xmErrPlugInLoadFailed, "The plug-in failed to load.")
+
+DefineErr(xmErrNotPrivileged, "The Adobe Reader cannot load this plug-in.")
+
+DefineErr(xmErr68KOnly, "Only the 68K Viewer can load this plug-in.")
+
+DefineErr(xmErrPPCOnly, "Only the PowerPC Viewer can load this plug-in.")
+
+DefineErr(xmErrPlugInNotTrusted, "This is not a trusted plug-in.")
+
+DefineErr(xmErrPlugInNotCarbonized, "This plugin cannot load on MacOS X.")
+
+DefineErr(xmErrPluginResourceMismatch, "The currently selected language resources are not supported by this plugin.")
+
+
+
+/* End of automatic generated header file */
+
+/***** End of file ***********************************************************/
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h
new file mode 100644
index 0000000..bdf39fc
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h
@@ -0,0 +1,67 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2003-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+*********************************************************************/
+
+#ifndef _H_CASSERT_ADOBE_API
+#define _H_CASSERT_ADOBE_API
+
+#if !DEBUG
+/* ANSI assert.h requires preprocessor definition of NDEBUG in order to disable.
+ We can use the DEBUG setting */
+#define ACROASSERT(ignore) ((void*)0)
+
+#else
+
+#include "Environ.h"
+
+#if WIN_PLATFORM || WIN_ENV
+/* Win version of assert brings up dialog with file/line and allows user to go to debugger. We'll use it */
+#include <assert.h>
+/**
+ A platform-independent version of the ANSI <code>assert</code> function.
+*/
+#define ACROASSERT assert
+
+#elif MAC_PLATFORM || MAC_ENV
+/* Mac version of assert just quits. We prefer to give a message and break at the problem */
+#if defined(__MWERKS__)
+#else
+#include <CoreServices/CoreServices.h>
+#endif
+#define ACROASSERT(b) ((b)?0: (DebugStr("\pACROASSERT Failed"), **(int**)0)) /* stop here, there is a problem */
+
+#elif UNIX_PLATFORM || UNIX_ENV
+ /* Unix version of assert. Use default implementation */
+
+ /* There is a compiler issue we've seen on x86 Linux gcc 3.2 when using the native assert */
+ #if ((__GNUC__ == 3) && (__GNUC_MINOR__ == 2) && (__i386__) && (defined(PLUGIN)))
+ #include <stdio.h>
+ #define ACROASSERT(expr) ((void) ((expr) ? 0 : (fprintf (stderr, "%s failed at %s:%d\n", #expr, __FILE__, __LINE__), (*(int *)0 = 1) )))
+
+ #else /* not Linux/gcc 3.2/Plugins */
+
+ /* normal Unix version -- just use assert() */
+ #include <assert.h>
+ #define ACROASSERT assert
+ #endif /* not Linux/gcc 3.2/Plugins */
+#else
+/* should define one of the platforms above. setting ACROASSERT to ANSI assert */
+#pragma message("PLATFORM not defined")
+#include <assert.h>
+#define ACROASSERT assert
+#endif /* PLATFORM */
+#endif /*!DEBUG */
+
+
+#endif /*_H_CASSERT_ADOBE_API*/
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/cathft.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/cathft.h
new file mode 100644
index 0000000..9adcb39
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/cathft.h
@@ -0,0 +1,105 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ CatHFT.h
+
+ - Catalog of functions exported by Acrobat Catalog.
+
+*********************************************************************/
+
+#ifndef _H_CatHFT
+#define _H_CatHFT
+
+#define CatalogHFT_NAME "Catalog"
+#define CatalogRealHFT_NAME ("$"CatalogHFT_NAME)
+#define CatalogHFT_LATEST_VERSION (0L)
+#define CatalogHFT_Error 1
+
+#define Init_CatalogHFT ASExtensionMgrGetHFT(ASAtomFromString(CatalogHFT_NAME), CatalogHFT_LATEST_VERSION)
+
+/* Extension name : "Catalog"*/
+
+/* Enumerate the selectors */
+#define PIPROC(returnType, name, params, ...) name##_SEL,
+enum {
+ CatalogBAD_SELECTOR,
+ #include "catprocs.h"
+ CatalogNUMSELECTORSplusOne
+};
+#undef PIPROC
+
+
+/**
+ Return values for the current state of Catalog.
+ If Catalog is currently busy performing some operation, it returns the relevant
+ state, which could be <code>CatalogBuilding</code>, <code>CatalogPurging</code>, or <code>CatalogWaiting</code>.
+*/
+typedef enum
+{
+/** */
+CatalogIdle = 0,
+/** */
+CatalogBuilding,
+/** */
+CatalogPurging,
+/** */
+CatalogWaiting
+}
+CatalogStatus;
+
+/**
+ Return values for the current state of the Index after a call to Purge, Build, or Load an index.
+*/
+typedef enum
+{
+/** Input path is not correct, or Catalog was not able to load the index. */
+ IndexInvalid = 0,
+/** Catalog was unable to save the index at the given path. */
+ IndexCouldNotBeSaved,
+/** The build operation was valid and was completed. */
+ IndexBuildDone,
+/** The purge operation was valid and was completed. */
+ IndexPurgeDone,
+/** The index was loaded successfully. */
+ IndexLoadDone,
+/** Catalog is currently busy and could not process the request. */
+ CatalogBusy,
+/** */
+ IndexJobAdded
+} IndexStatus;
+
+
+#define CatalogNUMSELECTORS (CatalogNUMSELECTORSplusOne - 1)
+
+extern HFT gCatalogHFT;
+extern ASBool SetUpCatalogHFTServer(void);
+
+// ------------ Create the Prototypes ---------------
+#define PIPROC(returnType, name, params, ...) typedef ACCBPROTO1 returnType (ACCBPROTO2 name##_PROTO)params;
+#include "catprocs.h"
+#undef PIPROC
+
+#define PIPROC(returnType, name, params, ...) typedef name##_PROTO *name##_SELPROTO;
+#include "catprocs.h"
+#undef PIPROC
+
+#define CatalogActivate (*((CatalogActivate_SELPROTO)(gCatalogHFT[CatalogActivate_SEL])))
+#define CatalogLoadIndex (*((CatalogLoadIndex_SELPROTO)(gCatalogHFT[CatalogLoadIndex_SEL])))
+#define CatalogBuildIndex (*((CatalogBuildIndex_SELPROTO)(gCatalogHFT[CatalogBuildIndex_SEL])))
+#define CatalogPurgeIndex (*((CatalogPurgeIndex_SELPROTO)(gCatalogHFT[CatalogPurgeIndex_SEL])))
+#define CatalogGiveStatus (*((CatalogGiveStatus_SELPROTO)(gCatalogHFT[CatalogGiveStatus_SEL])))
+
+
+#endif
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/catprocs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/catprocs.h
new file mode 100644
index 0000000..a88686d
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/catprocs.h
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * CatProcs.h
+ *
+ * Copyright (c) 2007 Adobe Systems Inc. All Rights Reserved.
+ *
+ * NOTICE: All information contained herein is, and remains the
+ * property of Adobe Systems Incorporated and its suppliers, if any.
+ * The intellectual and technical concepts contained herein are
+ * proprietary to Adobe Systems Incorporated and its suppliers and may
+ * be covered by U.S. and Foreign Patents, patents in process, and are
+ * protected by trade secret or copyright law. Dissemination of this
+ * information or reproduction of this material is strictly forbidden
+ * unless prior written permission is obtained from Adobe Systems Inc.
+ *
+ ************************************************************************/
+
+
+/** Launch Catalog.
+ If Catalog is already launched, its window is activated.
+ @see CatalogGiveStatus
+ @see CatalogLoadIndex
+*/
+PIPROC ( void, CatalogActivate, (void), )
+
+/** Opens an already existing index. If Catalog is not already
+ open, it is launched.
+ @param szIndex The full path of the index (including the .pdx
+ extension). If it is invalid, the method does nothing.
+ @return The status after the index definition dialog box is closed. If Catalog
+ is busy, it returns <code>CatalogBusy</code>.
+ @see CatalogActivate
+ @see CatalogPurgeIndex
+ @exception None
+*/
+PIPROC ( IndexStatus, CatalogLoadIndex, (char *szIndex), szIndex)
+
+
+/**
+ Builds an index. If Catalog is not already open, it is launched.
+
+ @param szIndex The destination path of the index (including
+ the .pdx extension).
+ @return The status after the build is done. If Catalog is busy, it returns
+ <code>CatalogBusy</code>.
+ @see CatalogActivate
+ @see CatalogLoadIndex
+ @see CatalogPurgeIndex
+*/
+PIPROC ( IndexStatus, CatalogBuildIndex, (char *szIndex), szIndex)
+
+/** Purges an already existing index.
+ If Catalog is not already open, it is launched.
+ @param szIndex IN The full path of the index (including the .pdx extension). If it is invalid, the method does nothing.
+ @return The status after the purge is done. If Catalog is busy, it returns <code>CatalogBusy</code>.
+ @see CatalogActivate
+ @see CatalogBuildIndex
+ @see CatalogPurgeIndex
+*/
+PIPROC ( IndexStatus, CatalogPurgeIndex, (char *szIndex), szIndex)
+
+/** Returns the current status of Catalog.
+ @return The current status of Catalog.
+*/
+PIPROC ( CatalogStatus, CatalogGiveStatus, (void), )
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/winprocs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/winprocs.h
new file mode 100644
index 0000000..b16ea1e
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/winprocs.h
@@ -0,0 +1,153 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ WinProcs.h
+
+ - Catalog of functions exported by the Windows Viewer.
+
+*********************************************************************/
+
+
+/**
+ (Windows only) Registers modeless dialog boxes with the viewer
+ so that the dialog box gets the correct messages.
+ @param dialog IN/OUT The <code>HWND</code> for the dialog box to register.
+ @see WinAppUnRegisterModelessDialog
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+NPROC(void, WinAppRegisterModelessDialog, (HWND dialog))
+
+/**
+ (Windows only) Un-registers modeless dialog boxes with the viewer.
+
+ @param dialog IN/OUT The <code>HWND</code> for the dialog box to un-register.
+ @see WinAppRegisterModelessDialog
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+NPROC(void, WinAppUnRegisterModelessDialog, (HWND dialog))
+
+/**
+ <p>(Windows only) Allows a plug-in to turn the <code>AVAppIdle</code> timer
+ on and off, which is needed when a plug-in calls another
+ process and thus blocks Acrobat for an extended period of
+ time. </p>
+
+ @param enable IN/OUT <code>true</code> to turn the timer on, <code>false</code> to turn
+ it off.
+ @return The previous state of the <code>AVAppIdle</code> timer.
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+NPROC(BOOL, WinAppEnableIdleTimer, (BOOL enable))
+
+/**
+ (Windows only) Gets appropriate parent for any modal dialog boxes
+ created by a plug-in. This method is only useful if there
+ is an AVDoc; it cannot be used, for example, to put up a
+ modal dialog box while a file is being opened.
+
+ <p>In circumstances where there is no AVDoc, use the <code>gHWND</code>
+ provided in PIMAIN.C. Although this does not give perfect
+ results in some cases, there is no real alternative. For
+ example, if a file is opened in an external application's
+ window, the dialog box is not hidden if the external application
+ is hidden. </p>
+
+ @param doc IN/OUT The AVDoc for a PDF file if the dialog box is acting
+ on an PDF document, which is generally the case. The AVDoc
+ must be provided so that for external documents, the viewer
+ can parent the dialog box of the external application instead
+ of the viewer.
+ @return The <code>HWND</code> for the modal dialog box' parent.
+ @see AVAppBeginModal
+ @see AVAppEndModal
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+NPROC(HWND, WinAppGetModalParent, (AVDoc doc))
+
+/**
+ (Windows only) Gets the application's color palette in the
+ case where the system is running in 256-color mode or less.
+ Used when you want to set and realize a palette in an external
+ window before drawing to it.
+
+ <p>Do not release this palette handle: it may be in use by
+ other plug-ins.</p>
+
+ @return The application's color palette. It is <code>NULL</code> if the system is running
+ direct colors (15/ 16/ 24/ 32-bit) or no palette is being
+ used.
+ @since PI_WIN_VERSION >= 0x00020000
+*/
+NPROC(HPALETTE, WinAppGetPalette, (void))
+
+/* New for Acrobat 4.0 */
+
+/**
+ Gets the device context for a printer, which is the <code>HDC</code>
+ used to print a document.
+
+ <p>It is used if you need to modify the device context Acrobat creates
+ when printing to a non-PostScript printer. You should register
+ for the notification PDDocWillPrintPage() and acquire the
+ printer <code>DC</code> for the page you wish to modify.</p>
+
+ @return The printer device context.
+ @since PI_WIN_VERSION >= 0x00040000
+*/
+NPROC(HDC, WinAppGetPrinterHDC, (void))
+
+/* New for Acrobat 5.0 */
+
+/**
+ (Windows only) Register a COM interface.
+ @param pServer A pointer to <code>COMServerRec</code>.
+ @return <code>true</code> if the interface was registered with Acrobat, <code>false</code>
+ otherwise.
+ @since PI_WIN_VERSION >= 0x00050000
+*/
+NPROC(BOOL, WinAppRegisterInterface, (COMServer pServer))
+
+/**
+ This API is used to ensure that the application does not quit until the
+ work that needs to be done by the interface registered with
+ WinAppRegisterInterface() is done.
+ @param lock <code>TRUE</code> locks the Viewer, preventing it from quitting.
+ <code>FALSE</code> allows the Viewer to quit. Calling WinAppLockViewer() with
+ <code>FALSE</code> does not automatically quit the Viewer; it decrements an
+ a reference count.
+ @see WinAppRegisterInterface
+ @since PI_WIN_VERSION >= 0x00050000
+*/
+NPROC(void, WinAppLockViewer, (BOOL lock))
+
+/**
+ (Windows only) Gets the appropriate parent for any modeless dialog boxes
+ created by a plug-in.
+
+ <p>In previous versions of Acrobat, the correct parent was always
+ <code>gHWND</code> and was provided in PIMAIN.C.</p>
+
+ @return The <code>HWND</code> for the modeless dialog box' parent.
+ @see WinAppRegisterModelessDialog
+ @see WinAppUnregisterModelessDialog
+ @since PI_WIN_VERSION >= 0x00080000
+*/
+NPROC(HWND, WinAppGetModelessParent, (void))
+
+/**
+ (Windows only) Unregisters a COM interface.
+ @param pServer A pointer to a <code>COMServerRec</code>.
+ @since PI_WIN_VERSION >= 0x00090000
+*/
+NPROC(void, WinAppUnregisterInterface, (COMServer pServer))
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDataStream.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDataStream.h
new file mode 100644
index 0000000..1e004c8
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDataStream.h
@@ -0,0 +1,112 @@
+#ifndef __ASDataStream__
+#define __ASDataStream__
+
+/*
+ * Name: ASDataStream.h
+ * $Revision: 6 $
+ * Author:
+ * Date:
+ * Purpose: Adobe AS 2.0 Data Filter Suite.
+ *
+ * Copyright (c) 1986-1998,2002 Adobe Systems Incorporated, All Rights Reserved.
+ *
+ */
+
+
+/*******************************************************************************
+ **
+ ** Imports
+ **
+ **/
+
+#ifndef __ASTypes__
+#include "ASTypes.h"
+#endif
+
+#ifndef __ASNameSpace__
+#include "ASNameSpace.h"
+#endif
+
+#ifndef __SPFiles__
+#include "SPFiles.h"
+#endif
+
+#ifndef __SPPlugins__
+#include "SPPlugs.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef UNIX_ENV
+#pragma PRAGMA_ALIGN_BEGIN
+#pragma PRAGMA_IMPORT_BEGIN
+#elif defined(HPUX) && defined(__HP_aCC)
+HPUX_Pragma (PRAGMA_ALIGN_BEGIN)
+#else
+_Pragma (PRAGMA_ALIGN_BEGIN)
+#endif
+
+
+/*******************************************************************************
+ **
+ ** Constants
+ **
+ **/
+
+#define kASDataStreamSuite "AS Data Filter Suite"
+#define kASDataStreamSuiteVersion 2
+
+
+#define kASDataStreamErr 'DFER'
+
+
+/*******************************************************************************
+ **
+ ** Types
+ **
+ **/
+
+#ifndef ASDataStreamRef
+typedef struct t_ASDataStream *ASDataStreamRef;
+#endif
+
+/*******************************************************************************
+ **
+ ** Suite
+ **
+ **/
+
+typedef struct {
+
+ ASAPI ASErr (*LinkDataStream) ( ASDataStreamRef prev, ASDataStreamRef next );
+ ASAPI ASErr (*UnlinkDataStream) ( ASDataStreamRef next, ASDataStreamRef *prev );
+ ASAPI ASErr (*ReadDataStream) ( ASDataStreamRef filter, char *store, long *count );
+ ASAPI ASErr (*WriteDataStream) ( ASDataStreamRef filter, char *store, long *count );
+ ASAPI ASErr (*SeekDataStream) ( ASDataStreamRef filter, long *count );
+ ASAPI ASErr (*MarkDataStream) ( ASDataStreamRef filter, long *count );
+ ASAPI ASErr (*NewFileDataStream) ( SPPlatformFileSpecification *spec, char *mode, long creator, long type, ASDataStreamRef *filter );
+ ASAPI ASErr (*NewBufferDataStream) ( long size, ASDataStreamRef *filter );
+ ASAPI ASErr (*NewHexdecDataStream) ( char *state, long shift, ASDataStreamRef *filter );
+ ASAPI ASErr (*NewBlockDataStream) ( void *address, long size, ASDataStreamRef *filter );
+ ASAPI ASErr (*NewResourceDataStream) ( SPPluginRef plugin, long type, long id, char *name, ASDataStreamRef *filter);
+
+} ASDataStreamSuite;
+
+
+#ifndef UNIX_ENV
+#pragma PRAGMA_IMPORT_END
+#pragma PRAGMA_ALIGN_END
+#elif defined(HPUX) && defined(__HP_aCC)
+HPUX_Pragma (PRAGMA_ALIGN_END)
+#else
+_Pragma (PRAGMA_ALIGN_END)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDebug.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDebug.h
new file mode 100644
index 0000000..86aafb5
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASDebug.h
@@ -0,0 +1,105 @@
+/***********************************************************************/
+/* */
+/* ASDebug.h */
+/* */
+/* Copyright 1999 Adobe Systems Incorporated. */
+/* All Rights Reserved. */
+/* */
+/* Patents Pending */
+/* */
+/* NOTICE: All information contained herein is the property of Adobe */
+/* Systems Incorporated. Many of the intellectual and technical */
+/* concepts contained herein are proprietary to Adobe, are protected */
+/* as trade secrets, and are made available only to Adobe licensees */
+/* for their internal use. Any reproduction or dissemination of this */
+/* software is strictly forbidden unless prior written permission is */
+/* obtained from Adobe. */
+/* */
+/* Started by Eric Scouten, 06/14/1999 */
+/* */
+/***********************************************************************/
+
+
+#ifndef __ASDebug__
+#define __ASDebug__
+
+ // ASAPI
+#include "ASTypes.h"
+
+
+#pragma PRAGMA_ALIGN_BEGIN
+#pragma PRAGMA_IMPORT_BEGIN
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+// -----------------------------------------------------------------------------
+
+// ASDebugAction enum defines what to do when an exception or assertion happens.
+
+typedef enum {
+ kASDebugAction_Nothing = 0,
+ kASDebugAction_Alert = 1,
+ kASDebugAction_LowLevelDebugger = 2,
+ kASDebugAction_SourceDebugger = 3,
+ kASDebugAction_Log = 4,
+ kASDebugAction_DummyAction = 0xFFFFFFFF
+} ASDebugAction;
+
+
+// =============================================================================
+// * ASDebugSuite
+// =============================================================================
+
+#define kASDebugSuite "AS Debug Suite"
+#define kASDebugSuiteVersion1 1
+
+// -----------------------------------------------------------------------------
+
+typedef struct
+{
+
+ // debugging traps
+
+ void ASAPI (*RaiseSignal)(const char* inMessage, const char* inPlugin,
+ const char* inFile, ASUInt32 inLineNumber);
+
+ void ASAPI (*AboutToThrow)(const char* inMessage, const char* inPlugin,
+ const char* inFile, ASUInt32 inLineNumber);
+
+ // debugging log
+
+ void ASAPI (*LogMessage)(const char* inMessage);
+ void ASAPI (*IndentLog)();
+ void ASAPI (*UnindentLog)();
+
+ // debugging behavior control
+
+ ASDebugAction ASAPI (*GetSignalAction)();
+ void ASAPI (*SetSignalAction)(ASDebugAction inSignalAction);
+
+ ASDebugAction ASAPI (*GetThrowAction)();
+ void ASAPI (*SetThrowAction)(ASDebugAction inThrowAction);
+
+ // debugging message dialog
+
+ void ASAPI (*ShowDebugAlert)(const char* inHeading, const char* inMessage,
+ const char* inPlugin, const char* inFile, ASUInt32 inLineNumber);
+
+} ASDebugSuite1;
+
+
+// -----------------------------------------------------------------------------
+
+#pragma PRAGMA_IMPORT_END
+#pragma PRAGMA_ALIGN_END
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASFunctionLogger.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASFunctionLogger.h
new file mode 100644
index 0000000..3eccb71
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASFunctionLogger.h
@@ -0,0 +1,67 @@
+/***********************************************************************/
+/* */
+/* ASFunctionLogger.h */
+/* */
+/* Copyright 1999 Adobe Systems Incorporated. */
+/* All Rights Reserved. */
+/* */
+/* Patents Pending */
+/* */
+/* NOTICE: All information contained herein is the property of Adobe */
+/* Systems Incorporated. Many of the intellectual and technical */
+/* concepts contained herein are proprietary to Adobe, are protected */
+/* as trade secrets, and are made available only to Adobe licensees */
+/* for their internal use. Any reproduction or dissemination of this */
+/* software is strictly forbidden unless prior written permission is */
+/* obtained from Adobe. */
+/* */
+/* Started by Eric Scouten, 08/02/1999 */
+/* */
+/***********************************************************************/
+
+#ifndef __ASFunctionLogger__
+#define __ASFunctionLogger__
+
+ // ASAPI
+#include "ASTypes.h"
+
+
+#pragma PRAGMA_ALIGN_BEGIN
+#pragma PRAGMA_IMPORT_BEGIN
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+// =============================================================================
+// * ASFunctionLoggerSuite
+// =============================================================================
+
+#define kASFunctionLoggerSuite "AS Function Logger Suite"
+#define kASFunctionLoggerSuiteVersion1 1
+
+// -----------------------------------------------------------------------------
+
+typedef struct
+{
+
+ void ASAPI (*EnterFunction)(const char* inSuiteName, const char* inFunctionName);
+ void ASAPI (*ExitFunction)(const char* inSuiteName, const char* inFunctionName);
+ void ASAPI (*FunctionParameter)(const char* inParamName, const char* inParamValue);
+
+} ASFunctionLoggerSuite1;
+
+
+// -----------------------------------------------------------------------------
+
+#pragma PRAGMA_IMPORT_END
+#pragma PRAGMA_ALIGN_END
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASHelp.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASHelp.h
new file mode 100644
index 0000000..df90719
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASHelp.h
@@ -0,0 +1,212 @@
+#ifndef __ASHelp__
+#define __ASHelp__
+
+/*
+ * Name: ASHelp.h
+ * $Revision: 3 $
+ * Author: Rob Sargent
+ * Date: 2/15/97
+ * Purpose: AS Help suite
+ *
+ * Copyright (c) 1986-1997 Adobe Systems Incorporated, All Rights Reserved.
+ *
+ */
+
+
+/*
+ * Includes
+ */
+
+#include "ASTypes.h"
+#include "SPFiles.h"
+#include "SPPlugs.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#pragma PRAGMA_ALIGN_BEGIN
+#pragma PRAGMA_IMPORT_BEGIN
+
+
+
+/*******************************************************************************
+ **
+ ** Constants
+ **
+ **/
+#define kASHelpSuite "AS Help Suite"
+#define kASHelpSuiteVersion1 1
+#define kASHelpSuiteVersion kASHelpSuiteVersion1
+#define kASHelpVersion kASHelpSuiteVersion1
+#define kASHelpSuiteVersion2 2
+
+#define kHelpInfoVersion 1L
+
+
+#define kHelpError '!Hlp'
+
+
+#define kHelpMenuType 'Menu'
+#define kHelpDialogType 'Dlog'
+#define kHelpToolType 'Tool'
+#define kHelpPaletteMenuType 'PMnu'
+#define kHelpEndType 0L
+
+
+#define kNoHelpID 0L
+
+#define kHelpFileStrIDProperty 'HlpS'
+#define kHelpNativeStrIndex 1
+
+
+/*******************************************************************************
+ **
+ ** Types
+ **
+ **/
+
+// WARNING: The size of these types
+// must match the resources
+typedef ASUInt32 ASHelpType;
+typedef ASInt32 ASHelpKey; // can be an integer or a pooled string pointer
+
+typedef ASInt32 ASHelpID;
+
+
+// WinHelp/QuickHelp Commands
+typedef enum
+{
+ /* #if(WINVER >= 0x0400) */
+ kASHelpCmd_CONTEXTMENU = 0x000a,
+ kASHelpCmd_FINDER = 0x000b,
+ kASHelpCmd_WM_HELP = 0x000c,
+ kASHelpCmd_SETPOPUP_POS = 0x000d,
+
+ kASHelpCmd_TCARD = 0x8000,
+ kASHelpCmd_TCARD_DATA = 0x0010,
+ kASHelpCmd_TCARD_OTHER_CALLER = 0x0011,
+ /* #endif // WINVER >= 0x0400 */
+
+ kASHelpCmd_CONTEXT = 0x0001L, /* Display topic in ulTopic */
+ kASHelpCmd_QUIT = 0x0002L, /* Terminate help */
+ kASHelpCmd_CONTENTS = 0x0003L, /* NOTE: HELP_INDEX = HELP_CONTENTS in Windows.h */
+ kASHelpCmd_HELPONHELP = 0x0004L, /* Display help on using help */
+ kASHelpCmd_SETCONTENTS = 0x0005L, /* NOTE: HELP_SETINDEX = HELP_SETCONTENTS */
+ kASHelpCmd_CONTEXTPOPUP = 0x0008L,
+ kASHelpCmd_FORCEFILE = 0x0009L,
+ kASHelpCmd_KEY = 0x0101L, /* Display topic for keyword in offabData */
+ kASHelpCmd_COMMAND = 0x0102L,
+ kASHelpCmd_PARTIALKEY = 0x0105L,
+ kASHelpCmd_MULTIKEY = 0x0201L,
+ kASHelpCmd_SETWINPOS = 0x0203L
+} ASHelpCommand;
+
+
+typedef struct ASHelpInitInfo
+{
+ ASInt32 version;
+ ASWindowRef appWindow;
+ SPPluginRef appPluginRef;
+ ASInt16 helpFolderNameStrID;
+ ASInt16 appHelpFileNameStrID;
+ ASInt16 helpFolderNameStrIndex;
+ ASInt16 appHelpFileNameStrIndex;
+} ASHelpInitInfo;
+
+
+typedef struct PIHelpFileDesc
+{
+ long fVersion;
+ long fFileNameStrID;
+} PIHelpFileDesc;
+
+
+ /*******************************************************************************
+ **
+ ** Suite
+ **
+ **/
+
+typedef struct t_ASHelpSuite1
+{
+ ASAPI ASErr (*Init) (ASHelpInitInfo *info);
+ ASAPI ASErr (*Quit) (void);
+
+ ASAPI ASErr (*SetContextHelpMode) (ASBoolean helpMode);
+ ASAPI ASBoolean (*InContextHelpMode) (void);
+
+ ASAPI ASErr (*Help) (ASWindowRef asWinRef, SPPlatformFileSpecification *spFile,
+ ASHelpCommand asHelpCommand, ASUInt32 dwData);
+ // spFile == NULL uses the App's help file
+
+ ASAPI ASErr (*HelpContents) (SPPluginRef pluginRef);
+ ASAPI ASErr (*SearchHelp) (SPPluginRef pluginRef);
+ ASAPI ASErr (*HowToUseHelp) (SPPluginRef pluginRef);
+ ASAPI ASErr (*ContextHelp) (SPPluginRef pluginRef, ASHelpID helpID);
+
+ ASAPI ASErr (*GetHelpID) (SPPluginRef pluginRef, ASHelpType helpType,
+ ASHelpKey key1, ASHelpKey key2, ASHelpID *helpID);
+
+ ASAPI ASErr (*TypedHelp) (SPPluginRef pluginRef, ASHelpType helpType, ASHelpKey key1, ASHelpKey key2);
+
+ ASAPI ASErr (*MenuHelp) (SPPluginRef pluginRef, ASHelpKey commandID);
+
+ ASAPI ASErr (*DialogHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey itemID);
+ // itemID == 0 means whole dialog
+
+ ASAPI ASErr (*PaletteMenuHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey menuItem );
+
+ ASAPI ASErr (*ToolHelp) (SPPluginRef pluginRef, ASHelpKey toolName );
+ // toolName should be a pooled string pointer cast to ASHelpKey
+
+} ASHelpSuite1;
+
+typedef ASHelpSuite1 ASHelpSuite; //For historical reasons.
+
+typedef struct t_ASHelpSuite2
+{
+ ASAPI ASErr (*Init) (ASHelpInitInfo *info);
+ ASAPI ASErr (*Quit) (void);
+
+ ASAPI ASErr (*SetContextHelpMode) (ASBoolean helpMode);
+ ASAPI ASBoolean (*InContextHelpMode) (void);
+
+ ASAPI ASErr (*Help) (ASWindowRef asWinRef, SPPlatformFileSpecification *spFile,
+ ASHelpCommand asHelpCommand, ASUInt32 dwData);
+ // spFile == NULL uses the App's help file
+
+ ASAPI ASErr (*HelpContents) (SPPluginRef pluginRef);
+ ASAPI ASErr (*SearchHelp) (SPPluginRef pluginRef);
+ ASAPI ASErr (*HowToUseHelp) (SPPluginRef pluginRef);
+ ASAPI ASErr (*ContextHelp) (SPPluginRef pluginRef, ASHelpID helpID);
+
+ ASAPI ASErr (*GetHelpID) (SPPluginRef pluginRef, ASHelpType helpType,
+ ASHelpKey key1, ASHelpKey key2, ASHelpID *helpID);
+
+ ASAPI ASErr (*TypedHelp) (SPPluginRef pluginRef, ASHelpType helpType, ASHelpKey key1, ASHelpKey key2);
+
+ ASAPI ASErr (*MenuHelp) (SPPluginRef pluginRef, ASHelpKey commandID);
+
+ ASAPI ASErr (*DialogHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey itemID);
+ // itemID == 0 means whole dialog
+
+ ASAPI ASErr (*PaletteMenuHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey menuItem );
+
+ ASAPI ASErr (*ToolHelp) (SPPluginRef pluginRef, ASHelpKey toolName );
+ // toolName should be a pooled string pointer cast to ASHelpKey
+
+ ASAPI ASErr (*ContextHelpQRC) (SPPluginRef pluginRef, ASHelpID helpID);
+
+} ASHelpSuite2;
+
+#pragma PRAGMA_IMPORT_END
+#pragma PRAGMA_ALIGN_END
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASLib.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASLib.h
new file mode 100644
index 0000000..906895f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASLib.h
@@ -0,0 +1,78 @@
+
+#ifndef _ASLIB_H_
+#define _ASLIB_H_
+
+/*
+ * Name: ASTypes.h
+ * $Revision: 7 $
+ * Author:
+ * Date: 10/8/96
+ * Purpose: Adobe Standard Functions (from stdio, stlib, etc.).
+ *
+ * Copyright (c) 1986-1996 Adobe Systems Incorporated, All Rights Reserved.
+ *
+ */
+
+/*
+ * Includes
+ */
+
+#include <stdlib.h>
+
+#include "ASTypes.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#pragma PRAGMA_ALIGN_BEGIN
+#pragma PRAGMA_IMPORT_BEGIN
+
+/*
+ * Constants
+ */
+
+#define kASLibSuite "AS Lib Suite"
+#define kASLibSuiteVersion 1
+#define kASLibVersion kASLibSuiteVersion
+
+typedef struct
+{
+ // functions from stdio.h
+ ASCAPI int (*sprintf) (char *, const char *, ...);
+
+ // functions from stdlib.h
+
+ // functions from string.h
+
+ ASAPI char * (*strchr) (const char *, int);
+ ASAPI void * (*memcpy) (void *, const void *, size_t);
+ ASAPI int (*memcmp) (const void *, const void *, size_t);
+ ASAPI void * (*memset) (void *, int, size_t);
+ ASAPI void * (*memmove) (void *, const void *, size_t);
+ ASAPI char * (*strcpy) (char *, const char *);
+ ASAPI char * (*strcat) (char *, const char *);
+ ASAPI int (*strcmp) (const char *, const char *);
+ ASAPI size_t (*strlen) (const char *);
+ ASAPI char * (*strncat) (char *, const char *, size_t);
+ ASAPI int (*strncmp) (const char *, const char *, size_t);
+ ASAPI char * (*strncpy) (char *, const char *, size_t);
+ ASAPI char * (*strrchr) (const char *, int);
+ ASAPI char * (*strstr) (const char *, const char *);
+
+ // functions that "should" be in one of the above (:-)
+
+ ASAPI char * (*strsubst)(char *pszStr, int iMaxLen, const char *pszSearch, const char *pszReplace);
+
+} ASLibSuite;
+
+#pragma PRAGMA_IMPORT_END
+#pragma PRAGMA_ALIGN_END
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ASLIB_H_
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASNameSpace.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASNameSpace.h
new file mode 100644
index 0000000..cb9bebf
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASNameSpace.h
@@ -0,0 +1,117 @@
+#ifndef __ASNameSpace__
+#define __ASNameSpace__
+
+/*
+ * Name: ASNameSpace.h
+ * $Revision: 4 $
+ * Author:
+ * Date:
+ * Purpose: AS Name Space Suite (from Adobe Illustrator).
+ *
+ * Copyright (c) 1986-1996 Adobe Systems Incorporated, All Rights Reserved.
+ *
+ */
+
+
+/*******************************************************************************
+ **
+ ** Imports
+ **
+ **/
+
+#ifndef __ASTypes__
+#include "ASTypes.h"
+#endif
+
+#ifndef __PlatformPragma__
+#include "PlatformPragma.h"
+#endif
+
+#ifndef __SPStrings__
+#include "SPStrngs.h"
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef UNIX_ENV
+#pragma PRAGMA_ALIGN_BEGIN
+#pragma PRAGMA_IMPORT_BEGIN
+#elif defined(HPUX) && defined(__HP_aCC)
+HPUX_Pragma (PRAGMA_ALIGN_BEGIN)
+#else
+_Pragma (PRAGMA_ALIGN_BEGIN)
+#endif
+
+
+/*******************************************************************************
+ **
+ ** Constants
+ **
+ **/
+
+#define kASNameSpaceSuite "AS Name Space Suite"
+#define kASNameSpaceSuiteVersion 2
+#define kASNameSpaceVersion kASNameSpaceSuiteVersion
+
+#define kASNameSpaceErr 'NAME'
+
+
+/*******************************************************************************
+ **
+ ** Types
+ **
+ **/
+
+typedef struct _t_ASNameSpace *ASNameSpaceRef;
+typedef struct t_ASDataStream *ASDataStreamRef;
+
+#if __BUILD_PLUGIN__
+#define kNSMaxNameLength (100)
+#define kNSMaxPathLength ((kNSMaxNameLength + 1) * 5)
+#define kNSPathSeparator '/'
+#endif
+
+
+/*******************************************************************************
+ **
+ ** Suite
+ **
+ **/
+
+typedef struct {
+
+ ASErr (*AllocateNameSpace) ( SPStringPoolRef pool, ASNameSpaceRef *space );
+ ASErr (*DisposeNameSpace) ( ASNameSpaceRef space );
+
+ ASErr (*SetValue) ( ASNameSpaceRef space, char *path, char *type, ... );
+ ASErr (*GetValue) ( ASNameSpaceRef space, char *path, char *type, ... );
+
+ ASErr (*GetType) ( ASNameSpaceRef space, char *path, char **type );
+ ASErr (*GetChangeCount) ( ASNameSpaceRef space, char *path, long *count );
+ ASErr (*RemoveValue) ( ASNameSpaceRef space, char *path );
+ ASErr (*CountPaths) ( ASNameSpaceRef space, char *path, long *count );
+ ASErr (*GetNthPath) ( ASNameSpaceRef space, char *path, long n, char *nthPath );
+
+ ASErr (*ParseValue) ( ASNameSpaceRef space, char *path, ASDataStreamRef filter );
+ ASErr (*FlushValue) ( ASNameSpaceRef space, char *path, ASDataStreamRef filter );
+
+} ASNameSpaceSuite;
+
+
+#ifndef UNIX_ENV
+#pragma PRAGMA_IMPORT_END
+#pragma PRAGMA_ALIGN_END
+#elif defined(HPUX) && defined(__HP_aCC)
+HPUX_Pragma (PRAGMA_ALIGN_END)
+#else
+_Pragma (PRAGMA_ALIGN_END)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASTypes.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASTypes.h
new file mode 100644
index 0000000..35f6119
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASTypes.h
@@ -0,0 +1,277 @@
+/* ASTypes.h file for Plug-ins ONLY
+*/
+
+#ifndef _ASTYPES_H_
+#define _ASTYPES_H_
+
+#include "Environ.h"
+
+#if PLUGIN
+
+#include "ASExpT.h"
+#include "CoreExpT.h"
+
+#endif
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+**
+** The following definitions are ONLY to be used when accessing ADM -
+** DO NOT USE THEM FOR ANY OTHER PURPOSE!!!!!!
+**
+** ADM is only available in the Mac and Windows Viewer - it is not available in the Reader or in
+** any configuration on UNIX.
+**
+** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+*/
+
+/* ---- Begin new types for ADM ---- */
+
+#ifdef MAC_ENV
+#define PRAGMA_ALIGN_BEGIN options align=mac68k
+#define PRAGMA_ALIGN_END options align=reset
+#define PRAGMA_IMPORT_BEGIN import on
+#define PRAGMA_IMPORT_END import off
+#endif
+
+#ifdef WIN_ENV
+#define PRAGMA_ALIGN_BEGIN pack(push, 4)
+#define PRAGMA_ALIGN_END pack(pop)
+#define PRAGMA_IMPORT_BEGIN
+#define PRAGMA_IMPORT_END
+#endif
+
+/*
+ * Constants
+ */
+
+/* true and false */
+
+#ifndef __cplusplus
+
+#ifndef true
+#define true 1
+#endif
+
+#ifndef false
+#define false 0
+#endif
+
+#endif /* __cplusplus */
+
+#ifndef TRUE
+#define TRUE true
+#endif
+
+#ifndef FALSE
+#define FALSE false
+#endif
+
+/* error codes */
+#define kNoErr 0
+#define kOutOfMemoryErr '!MEM'
+#define kBadParameterErr 'PARM'
+#define kNotImplementedErr '!IMP'
+#define kCantHappenErr 'CANT'
+
+#ifndef NULL
+
+#ifdef MAC_ENV
+#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
+#define NULL ((void *) 0)
+#else
+#define NULL 0
+#endif
+#endif
+
+#ifdef WIN_ENV
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#ifdef UNIX_ENV
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#endif
+
+/* dhearst 8/11/99 - we now specifically prefer NULL, so nil
+** is obsolete. We no longer provide it, but can't enforce this
+** policy because platform headers often provide nil.
+**#ifndef nil
+**#define nil NULL
+**#endif
+*/
+
+
+/* AMPAPI Adobe Standard Plugin API calling convention. */
+
+#ifndef AMPAPI
+#ifdef MAC_ENV
+#define ASAPI
+#endif
+#ifdef WIN_ENV
+#define ASAPI
+#endif
+#ifdef UNIX_ENV
+#define ASAPI
+#endif
+#endif
+
+/* C calling convention for those places that need it.
+** This doesn't really do anything, but is more for
+** an explicity declaration when it matters.
+*/
+#define ASCAPI
+
+
+/*
+ * Types
+ */
+
+/* Integer Types */
+
+typedef unsigned char ASUInt8;
+typedef unsigned short ASUInt16;
+typedef unsigned long ASUInt32;
+
+typedef long ASErr;
+
+/* Storage Types */
+
+#if !UNIX_ENV
+typedef unsigned char ASByte;
+#endif
+typedef ASByte *ASBytePtr;
+
+/* Unicode Types */
+typedef ASUTF16Val ASUnicode;
+
+/* Pointer Types */
+
+typedef void *ASPtr, **ASHandle;
+
+/* Fixed and Real Types - These are already defined in ASExpT.h*/
+
+
+/* Platform Structures */
+
+#ifdef MAC_ENV
+
+
+/* ASBoolean is the same a Macintosh Boolean. */
+typedef unsigned char ASBoolean;
+
+/* ASPortRef is the same as a Macintosh GrafPtr. */
+typedef struct OpaqueGrafPtr *ASPortRef;
+
+/* ASWindowRef is the same as a Macintosh WindowPtr. */
+typedef struct OpaqueWindowPtr *ASWindowRef;
+
+/* ASRect is the same size and layout as a Macintosh Rect. */
+typedef struct _t_ASRect {
+ short top, left, bottom, right;
+} ASRect;
+
+/* ASPoint is the same size and layout as a Macintosh Point. */
+typedef struct _t_ASPoint {
+ short v, h;
+} ASPoint;
+
+#endif /* MAC_ENV */
+
+
+#ifdef WIN_ENV
+
+/* ASBoolean is the same a Windows BOOL. */
+typedef int ASBoolean;
+
+/* ASPortRef is the same as a Windows HDC. */
+typedef void * ASPortRef;
+
+/* ASWindowRef is the same as a Windows HWND. */
+typedef void * ASWindowRef;
+
+/* ASRect is the same size and layout as a Windows RECT. */
+typedef struct _t_ASRect {
+ long left, top, right, bottom;
+} ASRect;
+
+/* ASPoint is the same size and layout as a Windows POINT. */
+typedef struct _t_ASPoint {
+ long h, v;
+} ASPoint;
+
+#endif /* WIN_ENV */
+
+
+#ifdef UNIX_ENV
+
+/* ASBoolean is the same as gboolean. */
+typedef int ASBoolean;
+
+/* ASRect is not the same size and layout as a GdkRectangle, 'cos that is { left, top, width, height }. */
+typedef struct _t_ASRect {
+ int left, top, right, bottom;
+} ASRect;
+
+/* ASPoint is the same size and layout as a GdkPoint. */
+typedef struct _t_ASPoint {
+ int h, v;
+} ASPoint;
+
+#endif /* UNIX_ENV */
+
+/* ASRGBColor is the same as a Macintosh RGBColor on Macintosh and Windows. */
+typedef struct _t_ASRGBColor {
+ unsigned short red, green, blue;
+} ASRGBColor;
+
+
+/* AIEvent is the same as a Macintosh EventRecord on Macintosh and Windows. */
+typedef struct _t_ASEvent {
+ unsigned short what;
+ unsigned long message;
+ unsigned long when;
+ ASPoint where;
+ unsigned short modifiers;
+} ASEvent;
+
+/* This is a generic reference to a resource/plugin file. If not otherwise stated,
+** it is assumed to be equivalent to an SPPluginRef (see "SPPlugs.h")
+*/
+typedef struct ASAccess *ASAccessRef;
+
+/* ---- End new types for ADM ---- */
+
+/* The above ADM definitions are ONLY to be used when accessing ADM -
+** DO NOT USE THEM FOR ANY OTHER PURPOSE!!!!!!
+**
+** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+*/
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#endif /* _ASTYPES_H_ */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASZStringSuite.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASZStringSuite.h
new file mode 100644
index 0000000..a401f57
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/ASZStringSuite.h
@@ -0,0 +1,153 @@
+/*
+ * Name:
+ * ASZStringSuite.h
+ *
+ * Copyright 1986-1998,2003 Adobe Systems Incorporated.
+ * All Rights Reserved.
+ *
+ * Purpose:
+ * ZString handling suite.
+ *
+ * Distribution:
+ * PUBLIC
+ *
+ * Version history:
+ * 1.0.0 1/26/1996 DL First version.
+ * Created by Dave Lazarony.
+ */
+
+#ifndef _ASZSTRING_H_
+#define _ASZSTRING_H_
+
+#include "ASTypes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Constants
+ */
+
+#define kASZStringSuite "AS ZString Suite"
+#define kASZStringDictionarySuite "AS ZString Dictionary Suite"
+
+
+#define kASUnknownErr 'UNK '
+#define kASBufferTooSmallErr 'BUFF'
+#define kASMemoryErr 'MEM '
+
+/*
+ * Types
+ */
+
+// aja 4.5.98 moved this into PIActions.h to accommodate SuspendHistory
+#ifndef ASZString_defined
+#define ASZString_defined
+struct ASZByteRun;
+typedef struct ASZByteRun *ASZString;
+#endif
+
+// FIX_ME (jreid 98.12.14) -- ASUnicode is now defined in ASTypes.h, so I'm
+// commenting this out for now. The definition is ASTypes.h is slightly different
+// (unsigned instead of signed).
+//typedef short ASUnicode;
+
+/*
+ * ZString Suite
+ */
+
+/******************************************************************************/
+
+#define kASZStringSuiteVersion1 1
+
+typedef struct ASZStringSuite
+{
+
+ ASErr ASAPI(*MakeFromUnicode)( ASUnicode *src, size_t byteCount, ASZString *newZString );
+ ASErr ASAPI(*MakeFromCString)( const char *src, size_t byteCount, ASZString *newZString );
+ ASErr ASAPI(*MakeFromPascalString)( const unsigned char *src, size_t byteCount,
+ ASZString *newZString );
+
+ ASErr ASAPI (*MakeRomanizationOfInteger)( ASInt32 value, ASZString *newZString );
+ ASErr ASAPI (*MakeRomanizationOfFixed)( ASInt32 value, ASInt16 places, ASBoolean trim,
+ ASBoolean isSigned, ASZString *newZString);
+ ASErr ASAPI (*MakeRomanizationOfDouble)( double value, ASZString *newZString );
+ ASZString ASAPI (*GetEmpty)();
+
+ ASErr ASAPI (*Copy)( ASZString source, ASZString *copy);
+ ASErr ASAPI (*Replace)( ASZString zstr, ASUInt32 index, ASZString replacement);
+ ASErr ASAPI (*TrimEllipsis)( ASZString zstr );
+ ASErr ASAPI (*TrimSpaces)( ASZString zstr );
+ ASErr ASAPI (*RemoveAccelerators)( ASZString zstr );
+
+ /* These functions support reference counting of ASZStrings. When the
+ * ASZString is created its reference count is one. When the reference
+ * count goes to zero, the ASZString referred to is deleted.
+ */
+ ASErr ASAPI (*AddRef)( ASZString zstr);
+ ASErr ASAPI (*Release)( ASZString zstr );
+
+
+
+ ASBoolean ASAPI (*IsAllWhiteSpace)( ASZString zstr );
+ ASBoolean ASAPI (*IsEmpty)( ASZString zstr );
+
+ ASBoolean ASAPI (*WillReplace)( ASZString zstr, ASUInt32 index );
+
+ ASUInt32 ASAPI (*LengthAsUnicodeCString)( ASZString zstr );
+ ASErr ASAPI (*AsUnicodeCString)( ASZString zstr, ASUnicode *str, ASUInt32 strSize,
+ ASBoolean checkStrSize );
+
+ ASUInt32 ASAPI (*LengthAsCString)( ASZString zstr );
+ ASErr ASAPI (*AsCString)( ASZString zstr, char *str, ASUInt32 strSize,
+ ASBoolean checkStrSize );
+
+ ASUInt32 ASAPI (*LengthAsPascalString)( ASZString zstr );
+ ASErr ASAPI (*AsPascalString)( ASZString zstr, char *str, ASUInt32 strBufferSize,
+ ASBoolean checkBufferSize );
+
+} ASZStringSuite1;
+
+
+
+/******************************************************************************/
+
+#define kASZStringDictionarySuiteVersion1 1
+
+typedef struct
+{
+ /* This functions set up the ZString tag-value pairs dictionary. The
+ * dictionary is scoped by the SPPluginRef to reduce naming conflicts
+ * between plug-ins.
+ */
+ ASErr ASAPI (*DictionaryAddTags)( SPPluginRef context, const char *tags );
+ ASErr ASAPI (*DictionaryAddTagsRsrc)( SPPluginRef context, ASUInt32 rsrcType, ASInt16 rsrcID );
+ ASErr ASAPI (*MakeFromTag)( SPPluginRef context, const char *tag, ASZString *newZString );
+
+} ASZStringDictionarySuite1;
+
+#define kASZStringDictionarySuiteVersion2 2
+
+typedef struct
+{
+ /* This functions set up the ZString tag-value pairs dictionary. The
+ * dictionary is scoped by the SPPluginRef to reduce naming conflicts
+ * between plug-ins.
+ */
+ ASErr ASAPI (*DictionaryAddTags)( SPPluginRef context, const char *tags );
+ ASErr ASAPI (*DictionaryAddTagsRsrc)( SPPluginRef context, ASUInt32 rsrcType, ASInt16 rsrcID );
+ ASErr ASAPI (*MakeFromTag)( SPPluginRef context, const char *tag, ASZString *newZString );
+
+ ASBoolean ASAPI (*DictionaryExists)( SPPluginRef context );
+ ASErr ASAPI (*DictionaryAddTagsLength)( SPPluginRef context, const char *tags,long length);
+
+} ASZStringDictionarySuite2;
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ASZSTRING_H_ */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/AVCmdDefs.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/AVCmdDefs.h
new file mode 100644
index 0000000..fe098dc
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/AVCmdDefs.h
@@ -0,0 +1,736 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2003 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+*********************************************************************/
+
+/**
+ AVCmdDefs.h
+
+ - Defines the AVCommand names, parameters, etc. to allow developers
+ to drive the built-in AVCommands.
+
+ - Built-in commands are organized into groups:
+ - Comments Command Group
+ - Document Command Group
+ - JavaScript Command Group
+ - Page Command Group
+ - PDF Consultant Command Group
+*/
+
+/**
+ For all commands
+
+ kAVCommandUIPolicy
+*/
+#define kAVCommandUIPolicy "UIPolicy"
+
+/*-----------------------------------
+ Comments Command Group
+-------------------------------------*/
+
+/**
+ Registered Names - Comments Group
+
+ kAVCommandGroupComments
+ kAVCommandDeleteAllComments
+ kAVCommandSummarizeComments
+*/
+#define kAVCommandGroupComments "Comments"
+#define kAVCommandDeleteAllComments "DeleteAll"
+#define kAVCommandSummarizeComments "Summarize"
+
+/**
+ Parameters for Summarize Comments
+
+ kCommentsCmdKeySortBy: ASInt32
+ kCommentsCmdKeyOutputPath: ASPathName
+ kCommentsCmdKeySaveWithOriginal: ASBool
+ If true, the command writes the file to the path specified by
+ the OutputPath parameter.
+*/
+#define kCommentsCmdKeySortBy "SortBy"
+#define kCommentsCmdKeyOutputPath "OutputPath"
+#define kCommentsCmdKeySaveWithOriginal "SaveInOriginalDir"
+
+/**
+ Enumeration for the "SortBy" parameter
+
+ kAVSortByPage
+ kAVSortByAuthor
+ kAVSortByModDate
+ kAVSortByType
+*/
+enum {
+ kAVSortByPage = 1,
+ kAVSortByAuthor = 3,
+ kAVSortByModDate,
+ kAVSortByType
+};
+
+enum {
+ kAVFontSizeSmall = 1,
+ kAVFontSizeMedium = 2,
+ kAVFontSizeLarge = 3
+};
+
+/*-------------------------------------------------------
+ Document Group
+-------------------------------------------------------*/
+
+/**
+ Shared Command Parameters
+
+ kDocCmdKeyLeaveAsIs: ASCab
+ All values that are to be left untouched. If cabinet is not
+ present, or a key is not present, it is assumed to be a valid
+ value in the cab.
+*/
+#define kDocCmdKeyLeaveAsIs "LeaveAsIs"
+
+/**
+ Registered Names - Document Group
+
+ kAVCommandGroupDocument
+ kAVCommandAccessibilityCheck
+ If keypages is selected page and AVDoc is NULL, the first page is processed.
+ kAVCommandDocumentSummary
+ kAVCommandEmbedAllThumbs
+ No dialog shown
+ kAVCommandExtractAsJpeg
+ kAVCommandExtractAsPng
+ kAVCommandExtractAsTiff
+ kAVCommandPrint
+ If UIPolicy is Interactive, the standard print dialog is displayed;
+ otherwise the default print settings are used.
+ kAVCommandRemovedEmbeddedThumbs
+ No dialog shown
+ kAVCommandSecurity
+ kAVCommandSetOpenOptions
+ kAVCommandAddHeadFoot
+ kAVCommandFlattenOCGs
+ kAVCommandMakeAccessible
+*/
+#define kAVCommandGroupDocument "Document"
+#define kAVCommandAccessibilityCheck "AccessibilityCheck"
+#define kAVCommandDocumentSummary "GeneralInfo"
+#define kAVCommandEmbedAllThumbs "CreateAllThumbs"
+#define kAVCommandExtractAsJpeg "ExtractAsJpeg"
+#define kAVCommandExtractAsPng "ExtractAsPng"
+#define kAVCommandExtractAsTiff "ExtractAsTiff"
+#define kAVCommandPrint "Print"
+#define kAVCommandRemovedEmbeddedThumbs "DeleteAllThumbs"
+#define kAVCommandSecurity "DocSecurity"
+#define kAVCommandSetOpenOptions "OpenInfo"
+#define kAVCommandAddHeadFoot "HeadFootCmd"
+#define kAVCommandFlattenOCGs "FlattenOCGs"
+#define kAVCommandMakeAccessible "MakeAccessible"
+
+/**
+ HeadFootCmd parameters
+
+ kHeadFootCmdHeadFootCab
+ kHeadFootCmdHeadFootCmdCab
+ kHeadFootCmdHeadCab
+ kHeadFootCmdFootCab
+ kHeadFootCmdDefCharSet
+ kHeadFootCmdDefFontName
+ kHeadFootCmdEven
+ kHeadFootCmdOdd
+ kHeadFootCmdStart
+ kHeadFootCmdEnd
+ kHeadFootCmdLeftMargin
+ kHeadFootCmdRightMargin
+ kHeadFootCmdTopMargin
+ kHeadFootCmdBottommargin
+ kHeadFootCmdMakeOptional
+ kHeadFootCmdLeftCab
+ kHeadFootCmdCenterCab
+ kHeadFootCmdRightCab
+*/
+#define kHeadFootCmdHeadFootCab "HeadFoot"
+#define kHeadFootCmdHeadFootCmdCab "HeadFootCmd"
+#define kHeadFootCmdHeadCab "HEADER"
+#define kHeadFootCmdFootCab "FOOTER"
+#define kHeadFootCmdDefCharSet "DefaultFontCharset"
+#define kHeadFootCmdDefFontName "DefaultFontName"
+#define kHeadFootCmdEven "Even"
+#define kHeadFootCmdOdd "Odd"
+#define kHeadFootCmdStart "START"
+#define kHeadFootCmdEnd "END"
+#define kHeadFootCmdLeftMargin "LeftMargin"
+#define kHeadFootCmdRightMargin "RightMargin"
+#define kHeadFootCmdTopMargin "TopMargin"
+#define kHeadFootCmdBottommargin "BottomMargin"
+#define kHeadFootCmdMakeOptional "MAKE_OPTIONAL"
+#define kHeadFootCmdLeftCab "HeadFoot:Left"
+#define kHeadFootCmdCenterCab "HeadFoot:Center"
+#define kHeadFootCmdRightCab "HeadFoot:Right"
+
+/**
+ Accessibility Check Parameters
+
+ kAccCheckCmdKeyCreateLog: ASBool - default is true
+ kAccCheckCmdKeyPathText: ASText
+ Log file destination. If FileSys is NULL, the log file is
+ written to the destination directory. If PathText is not
+ specified, the log is written to the same directory as the
+ source document. If FileSys is supplied, the file is
+ opened through that file system; otherwise the default is
+ used.
+ kAccCheckCmdKeyCreateComments: ASBool - default is flase
+ kAccCheckCmdKeyAlternateText: kASValueBool - default is true
+ kAccCheckCmdKeyLanguageSpecified: kASValueBool - default is true
+ kAccCheckCmdKeyCharEncodings: kASValueBool - default is true
+ kAccCheckCmdKeyFieldDescriptions: kASValueBool - default is true
+ kAccCheckCmdKeyCheckStructure: kASValueBool - default is true
+ kAccCheckCmdKeyPages: kASValueInteger
+ Default is all pages. If keypages is selected page and avdoc
+ is NULL, the first page is processed.
+ kAccCheckCmdKeyFromPage: kASValueInteger - default is 0
+ kAccCheckCmdKeyToPage: kASValueInteger - default is 0
+ kAccCheckCmdKeyInBatch: kASValueBool
+ kAccCheckCmdKeyHints
+*/
+#define kAccCheckCmdKeyCreateLog "OutputOurLog"
+#define kAccCheckCmdKeyPathText "ChosenPathText"
+#define kAccCheckCmdKeyCreateComments "AttachAnnots"
+#define kAccCheckCmdKeyAlternateText "AltText"
+#define kAccCheckCmdKeyLanguageSpecified "LangSpec"
+#define kAccCheckCmdKeyCharEncodings "CharEnc"
+#define kAccCheckCmdKeyFieldDescriptions "FieldNames"
+#define kAccCheckCmdKeyCheckStructure "CheckStruct"
+#define kAccCheckCmdKeyPages "Pages"
+#define kAccCheckCmdKeyFromPage "FromPage"
+#define kAccCheckCmdKeyToPage "ToPage"
+#define kAccCheckCmdKeyInBatch "IsBatch"
+#define kAccCheckCmdKeyHints "Hints"
+
+/**
+ Enumeration for the "Pages" parameter: kASValueInteger
+
+ kAccCheckAllPages
+ kAccCheckCurrentPage
+ kAccCheckSelectedPages
+*/
+enum {
+ kAccCheckAllPages,
+ kAccCheckCurrentPage,
+ kAccCheckSelectedPages
+};
+
+/**
+ Document Summary Parameters.
+
+ kDocInfoCmdKeyTitle: ASText
+ kDocInfoCmdKeySubject: ASText
+ kDocInfoCmdKeyAuthor: ASText
+ kDocInfoCmdKeyKeywords: ASText
+ kDocInfoCmdKeyBinding: ASText
+*/
+#define kDocInfoCmdKeyTitle "Title"
+#define kDocInfoCmdKeySubject "Subject"
+#define kDocInfoCmdKeyAuthor "Author"
+#define kDocInfoCmdKeyKeywords "Keywords"
+#define kDocInfoCmdKeyBinding "Binding"
+
+/**
+ Shared Image Extraction Parameters.
+
+ kExtractImgCmdKeyResolution: kASValueInteger
+ kExtractImgCmdKeyColorSpace: kASValueInteger
+ kExtractImgCmdKeyConvFormat: kASValueInteger
+ Set to the format that you are exporting to.
+ kExtractImgCmdKeyConfigured: kASValueBool
+ Must be set to true to mark the command parameters as being in a valid state.
+ kExtractImgCmdKeyOverwriteFiles: kASValueBool - default is true
+ Whether files are overwritten. Default is true. If set to false, and output
+ file is found to exist, alert is show if in batch; otherwise the user is
+ given the option to overwrite.
+ kExtractImgCmdKeyInBatch: kASValueBool - default is true
+ Used to control the format of the settings dialog. true gets the dest folder
+ info.
+ kExtractImgCmdKeyDestDirectory: kASValuePathName
+ Must be passed, or command returns an error. Default is the
+ kAVSCUser/kAVSFDocuments folder
+*/
+#define kExtractImgCmdKeyResolution "Resolution"
+#define kExtractImgCmdKeyColorSpace "ColorSpace"
+#define kExtractImgCmdKeyConvFormat "ConversionFormat"
+#define kExtractImgCmdKeyConfigured "Configured"
+#define kExtractImgCmdKeyOverwriteFiles "Overwrite"
+#define kExtractImgCmdKeyInBatch "Batch"
+#define kExtractImgCmdKeyDestDirectory "DestDirectory"
+
+/**
+ Image Extraction Parameters - Format Specific.
+
+ kExtractJpegCmdKeyCompression: kASValueInteger
+ kExtractJpegCmdKeyFormat: kASValueInteger
+ kExtractPngCmdKeyInterlace: kASValueInteger
+ kExtractPngCmdKeyFilter: kASValueInteger
+ kExtractTiffCmdKeyMonoCompression: kASValueInteger
+ kExtractTiffCmdKeyColorCompression: kASValueInteger
+*/
+#define kExtractJpegCmdKeyCompression "Compression"
+#define kExtractJpegCmdKeyFormat "Format"
+#define kExtractPngCmdKeyInterlace "Interlace"
+#define kExtractPngCmdKeyFilter "Filter"
+#define kExtractTiffCmdKeyMonoCompression "MonoCompression"
+#define kExtractTiffCmdKeyColorCompression "ColorCompression"
+
+/**
+ Enumeration for "ConversionFormat" parameter: kASValueInteger
+
+ kImgConversionFormatTiff
+ kImgConversionFormatJpeg
+ kImgConversionFormatPng
+
+ Default is appropriate value—JPEG, TIFF, PNG
+*/
+enum {
+ kImgConversionFormatTiff = 1,
+ kImgConversionFormatJpeg,
+ kImgConversionFormatPng,
+};
+
+/**
+ Enumeration for "Resolution" parameter: kASValueInteger
+
+ kImgResolutionAuto = -1 - default
+ kImgResolution72 = 72
+ kImgResolution96 = 96
+ kImgResolution150 = 150
+ kImgResolution300 = 300
+ kImgResolution600 = 600
+*/
+enum {
+ kImgResolutionAuto = -1,
+ kImgResolution72 = 72,
+ kImgResolution96 = 96,
+ kImgResolution150 = 150,
+ kImgResolution300 = 300,
+ kImgResolution600 = 600
+};
+
+/**
+ Enumeration for "ColorSpace" parameter: kASValueInteger
+
+ kColorSpaceAuto - default
+ kColorSpaceRGB
+ kColorSpaceGrayscale
+ kColorSpaceMonochrome
+*/
+enum {
+ kColorSpaceAuto = 1,
+ kColorSpaceRGB,
+ kColorSpaceGrayscale,
+ kColorSpaceMonochrome
+};
+
+/**
+ Enumeration for Tiff
+ "MonoCompression" and
+ "ColorCompression" parameters: kASValueInteger
+
+ kTiffCompressionNone
+ kTiffCompressionCCITT_G3
+ kTiffCompressionCCITT_G4 - default for mono
+ kTiffCompressionLzw - default for color
+ kTiffCompressionZip
+ kTiffCompressionJpegLow
+ kTiffCompressionJpegMediumLow
+ kTiffCompressionJpegMedium
+ kTiffCompressionJpegMediumHigh
+ kTiffCompressionJpegHigh
+*/
+enum {
+ kTiffCompressionNone = 1,
+ kTiffCompressionCCITT_G3,
+ kTiffCompressionCCITT_G4,
+ kTiffCompressionLzw,
+ kTiffCompressionZip,
+ kTiffCompressionJpegLow,
+ kTiffCompressionJpegMediumLow,
+ kTiffCompressionJpegMedium,
+ kTiffCompressionJpegMediumHigh,
+ kTiffCompressionJpegHigh
+};
+
+/**
+ Enumeration for Jpeg "Compression" parameter: kASValueInteger
+
+ kJpegCompressionLow
+ kJpegCompressionMediumLow
+ kJpegCompressionMedium - default
+ kJpegCompressionMediumHigh
+ kJpegCompressionHigh
+*/
+enum {
+ kJpegCompressionLow = 1,
+ kJpegCompressionMediumLow,
+ kJpegCompressionMedium,
+ kJpegCompressionMediumHigh,
+ kJpegCompressionHigh
+};
+
+/**
+ Enumeration for Jpeg "Format" parameter: ASValueInteger
+
+ kJpegFormatBaseline - default
+ kJpegFormatOptimized
+ kJpegFormatProgressive3
+ kJpegFormatProgressive4
+ kJpegFormatProgressive5
+*/
+enum {
+ kJpegFormatBaseline = 1,
+ kJpegFormatOptimized,
+ kJpegFormatProgressive3,
+ kJpegFormatProgressive4,
+ kJpegFormatProgressive5
+};
+
+/**
+ Enumeration for Png "Interlace" parameter: kASValueInteger
+
+ kPngInterlaceNone - default
+ kPngInterlaceAdam7
+*/
+enum {
+ kPngInterlaceNone = 1,
+ kPngInterlaceAdam7
+};
+
+/**
+ Enumeration for Png "Filter" parameter: kASValueInteger
+
+ kPngFilterNone
+ kPngFilterSub
+ kPngFilterUp
+ kPngFilterAverage
+ kPngFilterPaeth
+ kPngFilterAdaptive - default
+*/
+enum {
+ kPngFilterNone = 1,
+ kPngFilterSub,
+ kPngFilterUp,
+ kPngFilterAverage,
+ kPngFilterPaeth,
+ kPngFilterAdaptive
+};
+
+/**
+ Security Parameters
+
+ kDocSecurityCmdKeyHandler: kASValueAtom - default is ASAtomNull
+ kDocSecurityCmdKeySettings: kASValueCab
+*/
+#define kDocSecurityCmdKeyHandler "CryptHandler"
+#define kDocSecurityCmdKeySettings "SecuritySettings"
+
+/**
+ Set Open Options Parameters
+
+ kOpenOptionsCmdKeyPageNum: kASValueText
+ kOpenOptionsCmdKeyMagnification: kASValueText
+ For example, "100%" : Open action
+ kOpenOptionsCmdKeyPageLayout: kASValueInteger
+ For example, PDLayoutSinglePage
+ kOpenOptionsCmdKeyPageMode: kASValueInteger
+ For example, PDUseThumbs
+ kOpenOptionsCmdKeyFullScreen: kASValueBool
+ kOpenOptionsCmdKeyHideToolbar: kASValueBool
+ kOpenOptionsCmdKeyHideMenubar: kASValueBool
+ kOpenOptionsCmdKeyHideWindowUI: kASValueBool
+ kOpenOptionsCmdKeyFitWindow: kASValueBool
+ kOpenOptionsCmdKeyCenterWindow: kASValueBool
+ kOpenOptionsCmdKeyDisplayDocTitle: kASValueBool
+*/
+#define kOpenOptionsCmdKeyPageNum "PageNum"
+#define kOpenOptionsCmdKeyMagnification "Magnification"
+#define kOpenOptionsCmdKeyPageLayout "PageLayout"
+#define kOpenOptionsCmdKeyPageMode "PageMode"
+#define kOpenOptionsCmdKeyFullScreen "FullScreen"
+#define kOpenOptionsCmdKeyHideToolbar "HideToolbar"
+#define kOpenOptionsCmdKeyHideMenubar "HideMenubar"
+#define kOpenOptionsCmdKeyHideWindowUI "HideWindowUI"
+#define kOpenOptionsCmdKeyFitWindow "FitWindow"
+#define kOpenOptionsCmdKeyCenterWindow "CenterWindow"
+#define kOpenOptionsCmdKeyDisplayDocTitle "DisplayDocTitle"
+
+/*-------------------------------------------------------
+ JavaScript Command Group
+-------------------------------------------------------*/
+
+/**
+ Registered Names - JavaScript
+
+ kAVCommandGroupJavaScript
+ kAVCommandExecuteJavaScript
+*/
+#define kAVCommandGroupJavaScript "JavaScript"
+#define kAVCommandExecuteJavaScript "JavaScript"
+
+/**
+ Execute JavaScript Parameters
+
+ kExecJavaScriptCode: kASValueText
+ kExecJavaScriptName: kASValueText (Not currently used)
+*/
+#define kExecJavaScriptCode "ScriptCode"
+#define kExecJavaScriptName "ScriptName"
+
+/*-------------------------------------------------------
+ Page Command Group
+-------------------------------------------------------*/
+
+/**
+ Registered Names - Page
+
+ kAVCommandGroupPage
+ kAVCommandCropPages
+ kAVCommandDeletePages
+ kPageCmdKeyEvenOdd not supported.
+ kPageCmdKeyGroup default is kAVPagesFromTo.
+ kAVPagesSelected must be combined with an AVDoc.
+ kAVCommandInsertPages
+ kAVCommandNumberPages
+ kAVCommandRotatePages
+*/
+#define kAVCommandGroupPage "Page"
+#define kAVCommandCropPages "CropPages"
+#define kAVCommandDeletePages "DeletePages"
+#define kAVCommandInsertPages "InsertPages"
+#define kAVCommandNumberPages "NumberPages"
+#define kAVCommandRotatePages "RotatePages"
+
+/**
+ Common Page Parameters.
+
+ kPageCmdKeyGroup: kASValueInteger
+ kPageCmdKeyEvenOdd: kASValueInteger
+ kPageCmdKeyFrom: kASValueText
+ kPageCmdKeyTo: kASValueText
+*/
+#define kPageCmdKeyGroup "Group"
+#define kPageCmdKeyEvenOdd "EvenOdd"
+#define kPageCmdKeyFrom "From"
+#define kPageCmdKeyTo "To"
+
+/**
+ Enumeration for "Group" parameter: kASValueInteger
+
+ kAVPagesAll
+ kAVPagesSelected
+ kAVPagesFromTo
+*/
+enum {
+ kAVPagesAll,
+ kAVPagesSelected,
+ kAVPagesFromTo
+};
+
+/**
+ Enumeration for "EvenOdd" parameter: kASValueInteger
+
+ kAVPagesEvenOdd
+ kAVPagesEven
+ kAVPagesOdd
+*/
+enum {
+ kAVPagesEvenOdd,
+ kAVPagesEven,
+ kAVPagesOdd
+};
+
+/**
+ Crop Pages Parameters.
+
+ - kPageCmdKeyGroup default is kAVPagesAll.
+ - kPageCmdKeyEvenOdd default is kAVPagesEvenOdd.
+ - If cropping to bounding box, the dimension params are ignored.
+
+ kCropPagesCmdKeyCropType: kASValueInteger
+ kCropPagesCmdKeyLeft: kASValueDouble - Default is 0.0
+ kCropPagesCmdKeyRight: kASValueDouble - Default is 0.0
+ kCropPagesCmdKeyTop: kASValueDouble - Default is 0.0
+ kCropPagesCmdKeyBottom: kASValueDouble - Default is 0.0
+*/
+#define kCropPagesCmdKeyCropType "CropType"
+#define kCropPagesCmdKeyLeft = "Left";
+#define kCropPagesCmdKeyRight = "Right";
+#define kCropPagesCmdKeyTop = "Top";
+#define kCropPagesCmdKeyBottom = "Bottom";
+
+/**
+ Enumeration for "CropType" parameter: kASValueInteger
+
+ kAVCropCustom - default
+ kAVCropToBoundingBox
+*/
+enum {
+ kAVCropCustom,
+ kAVCropToBoundingBox,
+};
+
+/**
+ Insert Pages Parameters.
+
+ kInsertPagesCmdKeyInsertBefore: kASValueBool
+ Default is false, meaning insert after.
+ kInsertPagesCmdKeyPosition: kASValueInteger
+ kInsertPagesCmdKeyPageString: kASValueText
+ kInsertPagesCmdKeySrcFileName: kASValueText
+ kInsertPagesCmdKeySourcePathNames: kASValueCab
+*/
+#define kInsertPagesCmdKeyInsertBefore "InsertBefore"
+#define kInsertPagesCmdKeyPosition "Position"
+#define kInsertPagesCmdKeyPageString "PageString"
+#define kInsertPagesCmdKeySrcFileName "SrcFileName"
+#define kInsertPagesCmdKeySourcePathNames "SourcePathNames"
+
+/**
+ Enumeration for "InsertBefore" parameter: kASValueInteger
+
+ kAVPosRelativeToFirst
+ kAVPosRelativeToLast
+ kAVPosRelativeToPage - default
+*/
+enum {
+ kAVPosRelativeToFirst = 1,
+ kAVPosRelativeToLast,
+ kAVPosRelativeToPage
+};
+
+/**
+ Number Pages Parameters.
+
+ - kPageCmdKeyGroup: Default is kAVPagesAll.
+ - kPageCmdKeyEvenOdd: Default is kAVPagesEvenOdd.
+
+ kNumberPagesCmdKeyStyle: kASValueInteger
+ kNumberPagesCmdKeyStart: kASValueInteger - default is 1
+ kNumberPagesCmdKeyMergePrevious: kASValueBool - default is false
+ kNumberPagesCmdKeyPrefix: kASValueString - default is ""
+*/
+#define kNumberPagesCmdKeyStyle "Style"
+#define kNumberPagesCmdKeyStart "Start"
+#define kNumberPagesCmdKeyMergePrevious "MergePrevious"
+#define kNumberPagesCmdKeyPrefix "Prefix"
+
+/**
+ Enumeration for "Style" parameter.
+
+ kPageLabelStyleNone - default
+ kPageLabelStyleDecimal
+ kPageLabelStyleRomanLower
+ kPageLabelStyleRomanUpper
+ kPageLabelStyleAlphaLower
+ kPageLabelStyleAlphaUpper
+*/
+enum {
+ kPageLabelStyleNone = 1,
+ kPageLabelStyleDecimal,
+ kPageLabelStyleRomanLower,
+ kPageLabelStyleRomanUpper,
+ kPageLabelStyleAlphaLower,
+ kPageLabelStyleAlphaUpper
+};
+
+/**
+ Rotate Pages Parameters.
+
+ - kPageCmdKeyGroup default is kAVPagesAll.
+ - kPageCmdKeyEvenOdd default is kAVPagesEvenOdd.
+
+ kRotatePagesCmdKeyDegrees: kASValueInteger - default is pdRotate90
+ kRotatePagesCmdKeyAction: kASValueInteger
+*/
+#define kRotatePagesCmdKeyDegrees "Degrees"
+#define kRotatePagesCmdKeyAction "Action"
+
+/**
+ Enumeration for "Action" parameter: kASValueInteger
+
+ kAVRotateLandscapePages
+ kAVRotatePortraitPages
+ kAVRotateEveryPage - default
+*/
+enum {
+ kAVRotateLandscapePages,
+ kAVRotatePortraitPages,
+ kAVRotateEveryPage
+};
+
+/*-------------------------------------------------------
+ PDF Consultant Command Group
+-------------------------------------------------------*/
+
+/**
+ Registered Names - Comments Group.
+
+ kAVCommandGroupConsultant "PDF Consultant"
+ kAVCommandAuditSpace
+ Entirely interactive
+ kAVCommandDetectAndRemove "VirusCheck"
+ kAVCommandOptimizeSpace "SpaceReductionAgent"
+*/
+#define kAVCommandGroupConsultant "PDF Consultant"
+#define kAVCommandAuditSpace "SpaceAuditAgent"
+#define kAVCommandDetectAndRemove "VirusCheck"
+#define kAVCommandOptimizeSpace "SpaceReductionAgent"
+
+/**
+ OptimizeSpace Parameters.
+
+ kOptSpaceCmdKeyRemoveBmarks: kASValueBool - default is true
+ kOptSpaceCmdKeyRemoveLinks: kASValueBool - default is true
+ kOptSpaceCmdKeyRemoveDests: kASValueBool - default is true
+ kOptSpaceCmdKeyDestConversionType: kASValueInteger
+*/
+#define kOptSpaceCmdKeyRemoveBmarks "KillBrokenBookmarks"
+#define kOptSpaceCmdKeyRemoveLinks "KillBrokenLinkAnnots"
+#define kOptSpaceCmdKeyRemoveDests "KillUnusedNamedDests"
+#define kOptSpaceCmdKeyDestConversionType "ConversionType"
+
+/**
+ Enumeration for "ConversionType" parameter: kASValueInteger
+
+ kOptSpaceRemoveUnused - default
+ kOptSpaceConvertIfSpaceSaved
+ kOptSpaceConvertAll
+*/
+enum {
+ kOptSpaceRemoveUnused,
+ kOptSpaceConvertIfSpaceSaved,
+ kOptSpaceConvertAll
+};
+
+/**
+ DetectAndRemove Parameters
+
+ kVirusCheckCmdKeyOptions: kASValueCab - default is stuff
+ kVirusCheckCmdKeyNumOptions: kASValueInteger - default is 5
+ kVirusCheckCmdKeyRemove: kASValueBool - default is false
+*/
+#define kVirusCheckCmdKeyOptions "SelectedOptions"
+#define kVirusCheckCmdKeyNumOptions "NumOptions"
+#define kVirusCheckCmdKeyRemove "ShouldRepair"
+#define kVirusCheckCmdKeyJavaScript "idcJavaScript"
+#define kVirusCheckCmdKeyAltImage "idcAltImage"
+#define kVirusCheckCmdKeyFileEmbed "idcFileEmbed"
+#define kVirusCheckCmdKeyAllAnnots "idcAllAnnots"
+#define kVirusCheckCmdKeyExternalRefs "idcExternalRefs"
+#define kVirusCheckCmdKeyMultiMedia "idcMultiMedia"
+#define kVirusCheckCmdKeyFormActions "idcForm"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/DebugWindowHFT.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/DebugWindowHFT.h
new file mode 100644
index 0000000..7e24849
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/DebugWindowHFT.h
@@ -0,0 +1,46 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2003 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ DebugWindow.h
+
+ - Catalog of functions exported by the SnippetRunner plug-in.
+
+*********************************************************************/
+
+#ifndef _H_DEBUGWINDOWHFT
+#define _H_DEBUGWINDOWHFT
+
+enum
+{
+ DebugWindowBAD_SELECTOR,
+ DebugEmitStringSEL,
+ DebugWindowNUMSELECTORSPlusOne
+};
+
+extern HFT gDebugWindowHFT;
+
+#define DebugWindowNUMSELECTORS (DebugWindowNUMSELECTORSPlusOne - 1)
+
+#define DebugWindowHFT_NAME "ADBE:DebugWindow"
+#define DebugWindowHFT_LATEST_VERSION (0x00000002)
+#define InitDebugWindowHFT ASExtensionMgrGetHFT (ASAtomFromString(DebugWindowHFT_NAME), DebugWindowHFT_LATEST_VERSION)
+
+/* DebugEmitString
+** Emits a string to the CommonInterface window.
+** Strings with %% at start are treated as unicode (UCS-16)
+*/
+typedef ACCBPROTO1 void (ACCBPROTO2 *DebugEmitStringSELPROTO)(const char *msg);
+#define DebugEmitString (*((DebugEmitStringSELPROTO)(gDebugWindowHFT[DebugEmitStringSEL])))
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASPoint.hpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASPoint.hpp
new file mode 100644
index 0000000..31620fc
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASPoint.hpp
@@ -0,0 +1,2 @@
+// This has been renamed
+#include "IADMPoint.hpp"
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASRect.hpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASRect.hpp
new file mode 100644
index 0000000..09cac03
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASRect.hpp
@@ -0,0 +1,2 @@
+// This has been renamed
+#include "IADMRect.hpp"
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASTypes.hpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASTypes.hpp
new file mode 100644
index 0000000..2b414cb
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASTypes.hpp
@@ -0,0 +1,2 @@
+// This has been renamed
+#include "IADMTypes.hpp"
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASfixed.hpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASfixed.hpp
new file mode 100644
index 0000000..23ba29f
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/IASfixed.hpp
@@ -0,0 +1,2 @@
+// This has been renamed
+#include "IADMFixed.hpp"
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/MacPIHeaders.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/MacPIHeaders.h
new file mode 100644
index 0000000..c44949c
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/MacPIHeaders.h
@@ -0,0 +1,30 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1994-2003 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ MacPIHeaders.h
+
+ - Macintosh specific includes and defines here.
+
+*********************************************************************/
+
+#include "PIPrefix.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#define MAC_ENV 1
+#define _NEWLINE "\r"
+
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders++.pch b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders++.pch
new file mode 100644
index 0000000..dd06461
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders++.pch
@@ -0,0 +1,54 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 1996-2008 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIHeaders.pch
+
+ - .pch header file for Acrobat Plug-ins SDK.
+
+
+//*****************************************************************/
+
+#if !defined(REZ)
+
+#include <Carbon/Carbon.h>
+#include <ApplicationServices/ApplicationServices.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreServices/CoreServices.h>
+
+#define TARGET_API_MAC_OS8 0 /* use MacOS 8 resource calls */
+#define TARGET_API_MAC_CARBON 1 /* use Carbon MacOS */
+#define Platform_Carbon 1 /* use Carbon MacOS */
+#define _MSL_USING_MW_C_HEADERS 1
+
+#define SAFE_MIUTILS 1 /* use safe string manipulation functions */
+#define ACRO_SDK_LEVEL 0x00090000 /* SDK version 9 */
+
+#ifndef READER_PLUGIN
+ #define PI_ACROCOLOR_VERSION AcroColorHFT_VERSION_6
+#endif
+
+#include "PIHeaders.c"
+
+#endif
+
+
+#pragma precompile_target "AcrobatPIHeadersPCH++"
+
+#define PLATFORM "MacPlatform.h"
+#define PRODUCT "Plugin.h"
+#include "Environ.h"
+#include "PIHeaders.h"
+
+#undef PRAGMA_IMPORT
+#define PRAGMA_IMPORT 1
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders.h
new file mode 100644
index 0000000..6bcfddf
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/PIHeaders.h
@@ -0,0 +1,109 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2003 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ PIHeaders.h
+
+ - A general include file for Acrobat Headers. This file is included
+ in the Macintosh precompiled header file "PIHeaders.pch".
+
+*********************************************************************/
+#ifndef _H_PIHEADERS
+#define _H_PIHEADERS
+
+#define NEW_PDFEDIT_HFTS 1
+#define NEW_PDSEDIT_HFTS 1
+#define PDMETADATA_HFT 1
+
+#ifdef WIN_PLATFORM
+#include "WinPIHeaders.h"
+#endif
+#ifdef MAC_PLATFORM
+#include "MacPIHeaders.h"
+#include "SafeResources.h"
+#endif
+#ifdef UNIX_PLATFORM
+#include "UnixPIHeaders.h"
+#endif
+
+/* Pointer-integer conversion */
+/* if the size of a pointer is not 32 bits,
+ * then ASIntPtrSize is defined (in Environ.h) */
+#ifdef ASIntPtrSize
+#define ASPtrToInt32(_p) ((ASInt32)(ASIntPtrSize)(_p))
+#define ASInt32ToPtr(_i) ((void*)(ASIntPtrSize)(_i))
+#else
+#define ASIntPtrSize ASInt32
+#define ASPtrToInt32(_p) ((ASInt32)(_p))
+#define ASInt32ToPtr(_i) ((void*)(_i))
+#endif
+
+#define ASPtrToInt(_p) ((ASIntPtrSize)(_p))
+#define ASPtrToBool(_p) ((ASBool)ASPtrToInt(_p))
+/* *********************** */
+
+#include "PIExcept.h"
+#include "Environ.h"
+#if PLUGIN
+#include "ASExpT.h"
+#include "CoreExpT.h"
+#endif
+#include "AcroColorCalls.h"
+#include "ASCalls.h"
+#include "ASExtraCalls.h"
+#include "AVCalls.h"
+#include "CorCalls.h"
+#include "CosCalls.h"
+#include "DigSigHFT.h"
+#include "FormsHFT.h"
+#include "PagePDECntCalls.h"
+#include "PDCalls.h"
+#include "PDMetadataCalls.h"
+#include "PDSReadCalls.h"
+#include "PDSWriteCalls.h"
+#include "PERCalls.h"
+#include "PEWCalls.h"
+#include "PSFCalls.h"
+#include "SpellerHFT.h"
+#include "SrchHFT.h"
+#ifndef UNIX_PLATFORM
+#include "TtsHFT.h"
+#endif
+#include "WLHFT.h"
+#ifndef UNIX_PLATFORM
+#include "CatHFT.h"
+#endif
+#include "ConsHFT.h"
+
+
+// Acrobat 6.0 Headers
+#include "AcroColorCalls.h"
+#include "ASKey.h"
+#include "CAVAlert.h"
+#include "PSFCalls.h"
+#include "PubSecHFT.h"
+
+#ifdef WIN_PLATFORM
+#include "WinCalls.h"
+#endif
+#ifdef MAC_PLATFORM
+#include "MacCalls.h"
+#endif
+
+
+
+#ifdef UNIX_PLATFORM
+#include "UnixCalls.h"
+#endif
+
+#endif
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/SimpleUnicode.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/SimpleUnicode.h
new file mode 100644
index 0000000..3fd6ad7
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/SimpleUnicode.h
@@ -0,0 +1,71 @@
+/***********************************************************************/
+/* */
+/* Copyright 1990-1998 Adobe Systems Incorporated. */
+/* All Rights Reserved. */
+/* */
+/* Patents Pending */
+/* */
+/* NOTICE: All information contained herein is the property of Adobe */
+/* Systems Incorporated. Many of the intellectual and technical */
+/* concepts contained herein are proprietary to Adobe, are protected */
+/* as trade secrets, and are made available only to Adobe licensees */
+/* for their internal use. Any reproduction or dissemination of this */
+/* software is strictly forbidden unless prior written permission is */
+/* obtained from Adobe. */
+/* */
+/* PostScript and Display PostScript are trademarks of Adobe Systems */
+/* Incorporated or its subsidiaries and may be registered in certain */
+/* jurisdictions. */
+/* */
+/***********************************************************************/
+
+/*
+ * Name: SimpleUnicode.h
+ * Purpose: SweetPea interfaces for SimpleUnicode suites.
+ * Author: Jon Reid
+ * Created: December 7, 1998
+ */
+
+#ifndef __SimpleUnicode__
+#define __SimpleUnicode__
+
+
+#ifndef __UnicodeAPI__
+#include "UnicodeAPI.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ Ordinarily when writing a Unicode conversion suite, you should define
+ the encoding(s) it recognizes, but the SimpleUnicode functions ignore
+ the encoding argument. The Mac version assumes you want the script
+ corresponding to the application font; the Win version assumes you
+ want ANSI 1252 (Windows Latin-1).
+*/
+
+
+/*
+ * SimpleUnicode Suite
+ */
+
+#define kSimpleUnicodeSuite "SimpleUnicode Suite"
+#define kSimpleUnicodeSuiteVersion 1
+
+typedef struct SimpleUnicodeSuite
+{
+ ToUnicodeSizeProc ToUnicodeSize;
+ ConvertToUnicodeProc ConvertToUnicode;
+ FromUnicodeSizeProc FromUnicodeSize;
+ ConvertFromUnicodeProc ConvertFromUnicode;
+} SimpleUnicodeSuite;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SimpleUnicode__ */
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/StAcroResourceContext.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/StAcroResourceContext.h
new file mode 100644
index 0000000..92a0afb
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/StAcroResourceContext.h
@@ -0,0 +1,25 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2003 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ StAcroResourceContext.h
+
+*********************************************************************/
+#ifndef _H_StAcroResourceContext
+#define _H_StAcroResourceContext
+
+/* This file is deprecated */
+
+#include "SafeResources.h"
+
+#endif /* _H_StAcroResourceContext */ \ No newline at end of file
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnicodeAPI.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnicodeAPI.h
new file mode 100644
index 0000000..ad5c683
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnicodeAPI.h
@@ -0,0 +1,171 @@
+/***********************************************************************/
+/* */
+/* Copyright 1990-1998 Adobe Systems Incorporated. */
+/* All Rights Reserved. */
+/* */
+/* Patents Pending */
+/* */
+/* NOTICE: All information contained herein is the property of Adobe */
+/* Systems Incorporated. Many of the intellectual and technical */
+/* concepts contained herein are proprietary to Adobe, are protected */
+/* as trade secrets, and are made available only to Adobe licensees */
+/* for their internal use. Any reproduction or dissemination of this */
+/* software is strictly forbidden unless prior written permission is */
+/* obtained from Adobe. */
+/* */
+/* PostScript and Display PostScript are trademarks of Adobe Systems */
+/* Incorporated or its subsidiaries and may be registered in certain */
+/* jurisdictions. */
+/* */
+/***********************************************************************/
+
+/*
+ * Name: UnicodeAPI.h
+ * Purpose: Unicode conversion engine API.
+ * Author: Jon Reid
+ * Created: December 7, 1998
+ */
+
+#ifndef __UnicodeAPI__
+#define __UnicodeAPI__
+
+
+#ifndef __ASTypes__
+#include "ASTypes.h"
+#endif
+
+#include <stddef.h> // Define size_t.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ ZStrings are represented internally as unterminated Unicode strings.
+ A conversion engine handles conversions between Unicode and local
+ encodings. Different clients can provide different conversion engines
+ according to their needs.
+
+ Each conversion engine can represent encodings in different ways. To
+ pass different representations through the same C-based API, we use
+ "poor man's run-time type identification." The following data structure
+ identifies the type:
+*/
+
+typedef struct EncodingInfo
+{
+ long typeID;
+} EncodingInfo;
+
+/*
+ The typeID is an arbitrary value that identifies the actual
+ representation. To use "poor man's inheritance," EncodingInfo must be
+ the first element of the actual data structure. Here is an example of
+ a simple representation of a Mac script:
+
+ struct MacScript
+ {
+ EncodingInfo type; // Set type.typeID to 'MacS'
+ short script;
+ };
+
+ A pointer to an actual representation is cast to an EncodingInfo* for
+ use in one of the following functions:
+*/
+
+// Return size of buffer needed to convert multi-byte string to Unicode
+// string without terminating null character.
+typedef ASAPI ASErr
+(*ToUnicodeSizeProc)(
+ const ASByte* source, // Multi-byte string.
+ ASUInt32 sourceLength, // Number of bytes to convert.
+ ASUInt32* bufferSize,
+ EncodingInfo* encodingInfo
+ );
+
+// Convert multi-byte string to Unicode, up to destBufferSize characters.
+// Do not add terminating null character.
+typedef ASAPI ASErr
+(*ConvertToUnicodeProc)(
+ const ASByte* source, // Multi-byte string.
+ ASUInt32 sourceLength, // Number of bytes to convert.
+ ASUnicode* destination,
+ ASUInt32 destBufferSize, // Size of destination buffer.
+ EncodingInfo* encodingInfo
+ );
+
+// Return size of buffer needed to convert from Unicode. Be sure to include
+// extra byte for terminating null character or Pascal length.
+typedef ASAPI ASErr
+(*FromUnicodeSizeProc)(
+ const ASUnicode* source, // Unterminated Unicode string.
+ ASUInt32 sourceLength, // Number of characters to convert.
+ ASUInt32* bufferSize,
+ EncodingInfo* encodingInfo
+ );
+
+// Convert Unicode to multi-byte string, up to destBufferSize-1 bytes.
+// Do *not* add a terminating null character, because this routine is used
+// for both C and Pascal strings.
+typedef ASAPI ASErr
+(*ConvertFromUnicodeProc)(
+ const ASUnicode* source, // Unterminated Unicode string.
+ ASUInt32 sourceLength, // Number of characters to convert.
+ ASByte* destination,
+ ASUInt32 destBufferSize, // Size of destination buffer.
+ ASUInt32* convertedLength, // Number of converted bytes (without null).
+ EncodingInfo* encodingInfo
+ );
+
+/*
+ These functions must be registered as callbacks with the ZString
+ plug-in. If the Unicode conversion engine is packaged as a plug-in,
+ make sure it cannot be unloaded so that its callbacks are always
+ available.
+
+ The conversion engine takes the encodingInfo and casts it back to a
+ pointer to the data structure associated with the particular typeID.
+ If it does not recognize the typeID, it should return kUnknownEncodingType.
+*/
+
+#define kUnknownEncodingType 'UETp'
+
+
+/*
+ The Unicode conversion engine may modify the contents of the data
+ structure passed in encodingInfo. This allows the conversion engine to
+ pass back more than just an error value and the converted string; it
+ can more fully describe the conversion results, such as whether
+ fallback representations were used for characters that do not have
+ precise representations in the local encoding. One could also ask that
+ a Unicode string be converted to an encoding that best represents the
+ string, and the conversion engine would pass back the encoding it chose.
+
+ The byte-order of the Unicode data (big-endian / little-endian) is the
+ platform's native order, unless specified otherwise in encodingInfo.
+
+ If a conversion routine detects that the buffer is not large enough to
+ hold the result of a conversion, it should convert as much as it can
+ and then return an error value of kBufferTooSmallErr.
+*/
+
+#define kBufferTooSmallErr 'BUFF'
+
+
+/*
+ The following function is registered separately from the other callbacks:
+*/
+
+// Compare two Unicode strings, analogous to strcmp except that the strings
+// are not null-terminated.
+typedef ASAPI int
+(*UnicodeCompareProc)( const ASUnicode* str1, ASUInt32 len1,
+ const ASUnicode* str2, ASUInt32 len2 );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __UnicodeAPI__
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnixPIHeaders.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnixPIHeaders.h
new file mode 100644
index 0000000..8b6eaab
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/UnixPIHeaders.h
@@ -0,0 +1,30 @@
+/**********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2005 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ -------------------------------------------------------------------
+
+ UnixPIHeaders.h
+
+ - Unix specific includes and defines here
+
+***********************************************************************/
+
+#ifndef UNIXPIHEADERS_H
+#define UNIXPIHEADERS_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#endif
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/WinPIHeaders.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/WinPIHeaders.h
new file mode 100644
index 0000000..244f361
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/WinPIHeaders.h
@@ -0,0 +1,27 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2000-2003 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ WinPIHeaders.h
+
+ - Windows specific includes and defines here
+
+*********************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define _NEWLINE "\n"
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.cpp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.cpp
new file mode 100644
index 0000000..b7ae374
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.cpp
@@ -0,0 +1,52 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2008 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+ ---------------------------------------------------------------------
+
+ wxInit.cpp
+
+ - Initialization code for wxWidgets.
+
+*********************************************************************/
+#include "wx/app.h"
+#include "wxInit.h"
+#include "PIMain.h"
+
+IMPLEMENT_APP_NO_MAIN(PluginApp)
+
+wxPoint offscreenPoint(-5000,-5000);
+
+bool PluginApp::OnInit()
+{
+ return true;
+}
+
+
+BEGIN_EVENT_TABLE(PluginApp, wxApp)
+ END_EVENT_TABLE()
+
+AcrobatFrame::AcrobatFrame() : wxFrame(NULL, -1, "", offscreenPoint)
+{
+#ifdef WIN_PLATFORM
+ HWND oldHWnd = (HWND)GetHandle();
+ SetHWND((WXHWND)gHWND);
+ if(oldHWnd)
+ ::DestroyWindow(oldHWnd);
+#endif
+}
+
+
+BEGIN_EVENT_TABLE(AcrobatFrame, wxFrame)
+ END_EVENT_TABLE()
+
+
+
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.h
new file mode 100644
index 0000000..0a016aa
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/SDK/wxInit.h
@@ -0,0 +1,39 @@
+#ifndef __WXINIT__
+#define __WXINIT__
+
+#include "wx/init.h"
+#include "wx/app.h"
+#include "wx/frame.h"
+#ifdef MAC_PLATFORM
+#include "wx/cocoa/ObjcPose.h"
+#endif
+
+// Define a new application type
+class PluginApp: public wxApp
+{
+public:
+ bool OnInit();
+ DECLARE_EVENT_TABLE()
+};
+
+class AcrobatFrame : public wxFrame
+{
+ public:
+ AcrobatFrame();
+ private:
+ DECLARE_EVENT_TABLE()
+};
+#ifdef MAC_PLATFORM
+//without this, Acrobat crashes, I think based on deleting something it shouldn't
+class myPoseAsInitializer : public wxPoseAsInitializer
+{
+public:
+ myPoseAsInitializer()
+ {
+ m_next = NULL;
+ }
+};
+#endif
+extern AcrobatFrame* mainFrame;
+
+#endif \ No newline at end of file
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/AcroDspOptions.rsp b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/AcroDspOptions.rsp
new file mode 100644
index 0000000..1b9c465
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/AcroDspOptions.rsp
@@ -0,0 +1,13 @@
+/D ACRO_SDK_LEVEL=0x00080000
+/D PI_ACROCOLOR_VERSION=0x00060000
+/D PDMETADATA_HFT=1
+/D PLUGIN=1
+/D ACRO_SDK_PLUGIN_SAMPLE=1
+
+/I "."
+/I "..\sources"
+/I "..\sources\import"
+/I "..\sources\import\API"
+/I "..\sources\import\SDK"
+
+/D _CRT_SECURE_NO_DEPRECATE \ No newline at end of file
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/Debug/BuildLog.htm b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/Debug/BuildLog.htm
new file mode 100644
index 0000000..1382e6b
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/Debug/BuildLog.htm
Binary files differ
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln
new file mode 100644
index 0000000..3469143
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln
@@ -0,0 +1,17 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PDF-AS.SigHandler", "PDF-AS.SigHandler.vcproj", "{B6489A24-5179-4191-BF7F-0D41658AAF12}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B6489A24-5179-4191-BF7F-0D41658AAF12}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B6489A24-5179-4191-BF7F-0D41658AAF12}.Debug|Win32.Build.0 = Debug|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln.no b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln.no
new file mode 100644
index 0000000..23a02c7
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.sln.no
@@ -0,0 +1,16 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocSign", "DocSign.vcproj", "{8DC2CFA8-DD6B-4461-AA52-9A4A072A0A13}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8DC2CFA8-DD6B-4461-AA52-9A4A072A0A13}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8DC2CFA8-DD6B-4461-AA52-9A4A072A0A13}.Debug|Win32.Build.0 = Debug|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.suo b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.suo
new file mode 100644
index 0000000..e65d3a3
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.suo
Binary files differ
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj
new file mode 100644
index 0000000..bde0c9a
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="PDF-AS.SigHandler"
+ ProjectGUID="{B6489A24-5179-4191-BF7F-0D41658AAF12}"
+ RootNamespace="PDF-AS.SigHandler"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/PDF-AS.SigHandler.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="@&quot;.\AcroDspOptions.rsp&quot; "
+ Optimization="0"
+ PreprocessorDefinitions="_DEBUG;WIN_PLATFORM;WIN32;_WINDOWS;WIN_ENV;_CRT_SECURE_NO_DEPRECATE;READER_PLUGIN"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ PrecompiledHeaderFile=".\Debug/PDF-AS.SigHandler.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\PDF-AS.SigHandler.pdb"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalOptions="/EXPORT:PlugInMain"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile="Debug/PDF-AS.Sig.api"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/PDF-AS.SigHandler.pdb"
+ SubSystem="2"
+ ImportLibrary=".\Debug/PDF-AS.SigHandler.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy to Acrobat Plug-ins..."
+ CommandLine="if not &quot;%AcroSDKPIDir%&quot;a == &quot;&quot;a if not exist &quot;%AcroSDKPIDir%&quot; mkdir &quot;%AcroSDKPIDir%&quot;&#x0D;&#x0A;if not &quot;%AcroSDKPIDir%&quot;a == &quot;&quot;a copy &quot;$(targetpath)&quot; &quot;%AcroSDKPIDir%&quot;&#x0D;&#x0A;if not &quot;%AcroSDKPIDir%&quot;a == &quot;&quot;a echo &quot;$(targetname)&quot; copied to &quot;%AcroSDKPIDir%&quot;.&#x0D;&#x0A;if &quot;%AcroSDKPIDir%&quot;a == &quot;&quot;a echo not performed. AcroSDKPIDir environment variable not set.&#x0D;&#x0A;&#x0D;&#x0A;copy /Y d:\dferbas\adobe-dev\Adobe_SigHandler\Adobe.PDF-AS-SigHandler\win32\Debug\PDF-AS.Sig.api &quot;c:\Programme\Adobe\Acrobat 8.0\Acrobat\plug_ins&quot;&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+ >
+ <File
+ RelativePath="..\sources\PDF-AS.SigHandler.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="_DEBUG;WIN_PLATFORM;WIN32;_WINDOWS;WIN_ENV;$(NoInherit)"
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\sources\import\API\PIMain.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h"
+ >
+ <File
+ RelativePath="..\sources\PDF-AS.SigHandler.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="import"
+ >
+ <File
+ RelativePath="..\sources\import\API\DigSigHFT.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj.E-NNOVATION.dferbas.user b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj.E-NNOVATION.dferbas.user
new file mode 100644
index 0000000..eee4897
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/win32/PDF-AS.SigHandler.vcproj.E-NNOVATION.dferbas.user
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="E-NB-DFERBAS2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>