// PDFlibrary
// ActiveX Edition
// Version 3.0
// C++ import header
// http://www.loslab.com/

#include "stdafx.h"
#include "PDFlibDLL.h"
#include <string>

bool PDFlibDLL::LibraryLoaded()
{
	return !loadError;
}

FARPROC PDFlibDLL::AttachFunction(char* funcName)
{
	FARPROC address = GetProcAddress(dllHandle, funcName);
	if (address == 0) loadError = true;
	return address;
}

PDFlibDLL::PDFlibDLL(const std::string& dllFileName)
{
	loadError = false;
	instanceID = 0;
	dllHandle = LoadLibraryA(dllFileName.c_str());
	if (dllHandle > 0) {
		PDFlibAddArcToPath = (PDFlibFuncType43)AttachFunction("DLAddArcToPath");
		PDFlibAddCJKFont = (PDFlibFuncType64)AttachFunction("DLAddCJKFont");
		PDFlibAddCurveToPath = (PDFlibFuncType52)AttachFunction("DLAddCurveToPath");
		PDFlibAddEmbFile = (PDFlibFuncType24)AttachFunction("DLAddEmbFile");
		PDFlibAddFileAttachment = (PDFlibFuncType34)AttachFunction("DLAddFileAttachment");
		PDFlibAddFormFieldSub = (PDFlibFuncType65)AttachFunction("DLAddFormFieldSub");
		PDFlibAddFormFont = (PDFlibFuncType64)AttachFunction("DLAddFormFont");
		PDFlibAddGlobalJScript = (PDFlibFuncType24)AttachFunction("DLAddGlobalJScript");
		PDFlibAddImageFromFile = (PDFlibFuncType34)AttachFunction("DLAddImageFromFile");
		PDFlibAddImageFromFileOffset = (PDFlibFuncType37)AttachFunction("DLAddImageFromFileOffset");
		PDFlibAddImageFromString = (PDFlibFuncType34)AttachFunction("DLAddImageFromString");
		PDFlibAddLGIDictToPage = (PDFlibFuncType23)AttachFunction("DLAddLGIDictToPage");
		PDFlibAddLineToPath = (PDFlibFuncType40)AttachFunction("DLAddLineToPath");
		PDFlibAddLinkToEmbFile = (PDFlibFuncType58)AttachFunction("DLAddLinkToEmbFile");
		PDFlibAddLinkToFile = (PDFlibFuncType48)AttachFunction("DLAddLinkToFile");
		PDFlibAddLinkToJScript = (PDFlibFuncType47)AttachFunction("DLAddLinkToJScript");
		PDFlibAddLinkToPage = (PDFlibFuncType59)AttachFunction("DLAddLinkToPage");
		PDFlibAddLinkToWeb = (PDFlibFuncType47)AttachFunction("DLAddLinkToWeb");
		PDFlibAddNoteAnnot = (PDFlibFuncType62)AttachFunction("DLAddNoteAnnot");
		PDFlibAddPageLabels = (PDFlibFuncType82)AttachFunction("DLAddPageLabels");
		PDFlibAddSVGAnnotFromFile = (PDFlibFuncType47)AttachFunction("DLAddSVGAnnotFromFile");
		PDFlibAddSeparationColor = (PDFlibFuncType33)AttachFunction("DLAddSeparationColor");
		PDFlibAddStandardFont = (PDFlibFuncType64)AttachFunction("DLAddStandardFont");
		PDFlibAddSubsettedFont = (PDFlibFuncType35)AttachFunction("DLAddSubsettedFont");
		PDFlibAddToBuffer = (PDFlibFuncType28)AttachFunction("DLAddToBuffer");
		PDFlibAddToFileList = (PDFlibFuncType24)AttachFunction("DLAddToFileList");
		PDFlibAddTTF = (PDFlibFuncType34)AttachFunction("DLAddTTF");
		PDFlibAddTTFFromFile = (PDFlibFuncType23)AttachFunction("DLAddTTFFromFile");
		PDFlibAddT1Font = (PDFlibFuncType23)AttachFunction("DLAddT1Font");
		PDFlibAddU3DAnnotFromFile = (PDFlibFuncType47)AttachFunction("DLAddU3DAnnotFromFile");
		PDFlibAnalyseFile = (PDFlibFuncType24)AttachFunction("DLAnalyseFile");
		PDFlibAnnotCount = (PDFlibFuncType22)AttachFunction("DLAnnotCount");
		PDFlibAppendSpace = (PDFlibFuncType38)AttachFunction("DLAppendSpace");
		PDFlibAppendTableCol = (PDFlibFuncType74)AttachFunction("DLAppendTableCol");
		PDFlibAppendTableRow = (PDFlibFuncType74)AttachFunction("DLAppendTableRow");
		PDFlibAppendText = (PDFlibFuncType23)AttachFunction("DLAppendText");
		PDFlibApplyStyle = (PDFlibFuncType23)AttachFunction("DLApplyStyle");
		PDFlibBeginPageUpdate = (PDFlibFuncType22)AttachFunction("DLBeginPageUpdate");
		PDFlibCapturePage = (PDFlibFuncType64)AttachFunction("DLCapturePage");
		PDFlibCapturePageEx = (PDFlibFuncType74)AttachFunction("DLCapturePageEx");
		PDFlibCharWidth = (PDFlibFuncType64)AttachFunction("DLCharWidth");
		PDFlibCheckObject = (PDFlibFuncType22)AttachFunction("DLCheckObject");
		PDFlibCheckPageAnnot = (PDFlibFuncType22)AttachFunction("DLCheckPageAnnot");
		PDFlibClearFileList = (PDFlibFuncType23)AttachFunction("DLClearFileList");
		PDFlibClearPageLabel = (PDFlibFuncType22)AttachFunction("DLClearPageLabel");
		PDFlibClearTextFormat = (PDFlibFuncType22)AttachFunction("DLClearTextFormat");
		PDFlibCloneOutlineAct = (PDFlibFuncType64)AttachFunction("DLCloneOutlineAct");
		PDFlibClonePages = (PDFlibFuncType81)AttachFunction("DLClonePages");
		PDFlibCloseOutline = (PDFlibFuncType64)AttachFunction("DLCloseOutline");
		PDFlibClosePath = (PDFlibFuncType22)AttachFunction("DLClosePath");
		PDFlibCombineLayer = (PDFlibFuncType22)AttachFunction("DLCombineLayer");
		PDFlibCompressContent = (PDFlibFuncType22)AttachFunction("DLCompressContent");
		PDFlibCompressFont = (PDFlibFuncType64)AttachFunction("DLCompressFont");
		PDFlibCompressImage = (PDFlibFuncType64)AttachFunction("DLCompressImage");
		PDFlibCompressPage = (PDFlibFuncType22)AttachFunction("DLCompressPage");
		PDFlibCopyPageRange = (PDFlibFuncType65)AttachFunction("DLCopyPageRange");
		PDFlibCreateBuffer = (PDFlibFuncType8)AttachFunction("DLCreateBuffer");
		PDFlibCreateLibrary = (PDFlibFuncType21)AttachFunction("DLCreateLibrary");
		PDFlibCreateTable = (PDFlibFuncType74)AttachFunction("DLCreateTable");
		PDFlibDAAppendFile = (PDFlibFuncType64)AttachFunction("DLDAAppendFile");
		PDFlibDACapturePage = (PDFlibFuncType74)AttachFunction("DLDACapturePage");
		PDFlibDACapturePageEx = (PDFlibFuncType81)AttachFunction("DLDACapturePageEx");
		PDFlibDACloseFile = (PDFlibFuncType64)AttachFunction("DLDACloseFile");
		PDFlibDADrawCapturedPage = (PDFlibFuncType84)AttachFunction("DLDADrawCapturedPage");
		PDFlibDAExtractPageText = (PDFlibFuncType11)AttachFunction("DLDAExtractPageText");
		PDFlibDAFindPage = (PDFlibFuncType74)AttachFunction("DLDAFindPage");
		PDFlibDAGetFormFieldCount = (PDFlibFuncType64)AttachFunction("DLDAGetFormFieldCount");
		PDFlibDAGetFormFieldTitle = (PDFlibFuncType10)AttachFunction("DLDAGetFormFieldTitle");
		PDFlibDAGetFormFieldValue = (PDFlibFuncType10)AttachFunction("DLDAGetFormFieldValue");
		PDFlibDAGetImgToString = (PDFlibFuncType11)AttachFunction("DLDAGetImgToString");
		PDFlibDAGetImgDblProp = (PDFlibFuncType20)AttachFunction("DLDAGetImgDblProp");
		PDFlibDAGetImgIntProp = (PDFlibFuncType85)AttachFunction("DLDAGetImgIntProp");
		PDFlibDAGetImgListCount = (PDFlibFuncType74)AttachFunction("DLDAGetImgListCount");
		PDFlibDAGetInfo = (PDFlibFuncType9)AttachFunction("DLDAGetInfo");
		PDFlibDAGetObjCount = (PDFlibFuncType64)AttachFunction("DLDAGetObjCount");
		PDFlibDAGetObjSource = (PDFlibFuncType10)AttachFunction("DLDAGetObjSource");
		PDFlibDAGetPageContent = (PDFlibFuncType10)AttachFunction("DLDAGetPageContent");
		PDFlibDAGetPageCount = (PDFlibFuncType64)AttachFunction("DLDAGetPageCount");
		PDFlibDAGetPageHeight = (PDFlibFuncType19)AttachFunction("DLDAGetPageHeight");
		PDFlibDAGetPageImgList = (PDFlibFuncType74)AttachFunction("DLDAGetPageImgList");
		PDFlibDAGetPageWidth = (PDFlibFuncType19)AttachFunction("DLDAGetPageWidth");
		PDFlibDAHidePage = (PDFlibFuncType74)AttachFunction("DLDAHidePage");
		PDFlibDAMovePage = (PDFlibFuncType85)AttachFunction("DLDAMovePage");
		PDFlibDANewPage = (PDFlibFuncType64)AttachFunction("DLDANewPage");
		PDFlibDANewPages = (PDFlibFuncType74)AttachFunction("DLDANewPages");
		PDFlibDAOpenFile = (PDFlibFuncType24)AttachFunction("DLDAOpenFile");
		PDFlibDAOpenFileRO = (PDFlibFuncType24)AttachFunction("DLDAOpenFileRO");
		PDFlibDAPageRot = (PDFlibFuncType74)AttachFunction("DLDAPageRot");
		PDFlibDARenderToDC = (PDFlibFuncType85)AttachFunction("DLDARenderToDC");
		PDFlibDARenderToFile = (PDFlibFuncType86)AttachFunction("DLDARenderToFile");
		PDFlibDARenderToString = (PDFlibFuncType12)AttachFunction("DLDARenderToString");
		PDFlibDARotPage = (PDFlibFuncType85)AttachFunction("DLDARotPage");
		PDFlibDASaveAsFile = (PDFlibFuncType65)AttachFunction("DLDASaveAsFile");
		PDFlibDASaveImgToFile = (PDFlibFuncType82)AttachFunction("DLDASaveImgToFile");
		PDFlibDASetInfo = (PDFlibFuncType66)AttachFunction("DLDASetInfo");
		PDFlibDASetPageSize = (PDFlibFuncType77)AttachFunction("DLDASetPageSize");
		PDFlibDecrypt = (PDFlibFuncType22)AttachFunction("DLDecrypt");
		PDFlibDecryptFile = (PDFlibFuncType25)AttachFunction("DLDecryptFile");
		PDFlibDeleteAnalysis = (PDFlibFuncType64)AttachFunction("DLDeleteAnalysis");
		PDFlibDeleteAnnot = (PDFlibFuncType64)AttachFunction("DLDeleteAnnot");
		PDFlibDeleteFormField = (PDFlibFuncType64)AttachFunction("DLDeleteFormField");
		PDFlibDeleteLayer = (PDFlibFuncType22)AttachFunction("DLDeleteLayer");
		PDFlibDeleteOptContGroup = (PDFlibFuncType64)AttachFunction("DLDeleteOptContGroup");
		PDFlibDeletePageLGIDict = (PDFlibFuncType64)AttachFunction("DLDeletePageLGIDict");
		PDFlibDeletePages = (PDFlibFuncType74)AttachFunction("DLDeletePages");
		PDFlibDocJsAction = (PDFlibFuncType24)AttachFunction("DLDocJsAction");
		PDFlibDocCount = (PDFlibFuncType22)AttachFunction("DLDocCount");
		PDFlibDrawArc = (PDFlibFuncType56)AttachFunction("DLDrawArc");
		PDFlibDrawBarcode = (PDFlibFuncType49)AttachFunction("DLDrawBarcode");
		PDFlibDrawBox = (PDFlibFuncType57)AttachFunction("DLDrawBox");
		PDFlibDrawCaptPage = (PDFlibFuncType71)AttachFunction("DLDrawCaptPage");
		PDFlibDrawCircle = (PDFlibFuncType61)AttachFunction("DLDrawCircle");
		PDFlibDrawDataMatrixSymbol = (PDFlibFuncType45)AttachFunction("DLDrawDataMatrixSymbol");
		PDFlibDrawEllipse = (PDFlibFuncType57)AttachFunction("DLDrawEllipse");
		PDFlibDrawEllipticArc = (PDFlibFuncType54)AttachFunction("DLDrawEllipticArc");
		PDFlibDrawHTMLText = (PDFlibFuncType44)AttachFunction("DLDrawHTMLText");
		PDFlibDrawHTMLTextBox = (PDFlibFuncType7)AttachFunction("DLDrawHTMLTextBox");
		PDFlibDrawImg = (PDFlibFuncType46)AttachFunction("DLDrawImg");
		PDFlibDrawLine = (PDFlibFuncType46)AttachFunction("DLDrawLine");
		PDFlibDrawMultiLineText = (PDFlibFuncType42)AttachFunction("DLDrawMultiLineText");
		PDFlibDrawPath = (PDFlibFuncType64)AttachFunction("DLDrawPath");
		PDFlibDrawPathEvenOdd = (PDFlibFuncType64)AttachFunction("DLDrawPathEvenOdd");
		PDFlibDrawPsXObject = (PDFlibFuncType64)AttachFunction("DLDrawPsXObject");
		PDFlibDrawRotCaptPage = (PDFlibFuncType72)AttachFunction("DLDrawRotCaptPage");
		PDFlibDrawRotImg = (PDFlibFuncType50)AttachFunction("DLDrawRotImg");
		PDFlibDrawRotText = (PDFlibFuncType44)AttachFunction("DLDrawRotText");
		PDFlibDrawRotTextBox = (PDFlibFuncType51)AttachFunction("DLDrawRotTextBox");
		PDFlibDrawRoundBox = (PDFlibFuncType55)AttachFunction("DLDrawRoundBox");
		PDFlibDrawScaledImg = (PDFlibFuncType43)AttachFunction("DLDrawScaledImg");
		PDFlibDrawSpacedText = (PDFlibFuncType44)AttachFunction("DLDrawSpacedText");
		PDFlibDrawTableRow = (PDFlibFuncType18)AttachFunction("DLDrawTableRow");
		PDFlibDrawText = (PDFlibFuncType41)AttachFunction("DLDrawText");
		PDFlibDrawTextArc = (PDFlibFuncType47)AttachFunction("DLDrawTextArc");
		PDFlibDrawTextBox = (PDFlibFuncType47)AttachFunction("DLDrawTextBox");
		PDFlibDrawWrappedText = (PDFlibFuncType44)AttachFunction("DLDrawWrappedText");
		PDFlibEditableLayer = (PDFlibFuncType22)AttachFunction("DLEditableLayer");
		PDFlibEmbFile = (PDFlibFuncType25)AttachFunction("DLEmbFile");
		PDFlibEmbFileCount = (PDFlibFuncType22)AttachFunction("DLEmbFileCount");
		PDFlibEncapsulateLayer = (PDFlibFuncType22)AttachFunction("DLEncapsulateLayer");
		PDFlibEncodePermissions = (PDFlibFuncType96)AttachFunction("DLEncodePermissions");
		PDFlibEncrypt = (PDFlibFuncType29)AttachFunction("DLEncrypt");
		PDFlibEncryptFile = (PDFlibFuncType27)AttachFunction("DLEncryptFile");
		PDFlibEncryptWithFingerprint = (PDFlibFuncType23)AttachFunction("DLEncryptWithFingerprint");
		PDFlibEncryptionAlgorithm = (PDFlibFuncType22)AttachFunction("DLEncryptionAlgorithm");
		PDFlibEncryptionStatus = (PDFlibFuncType22)AttachFunction("DLEncryptionStatus");
		PDFlibEncryptionStrength = (PDFlibFuncType22)AttachFunction("DLEncryptionStrength");
		PDFlibEndPageUpdate = (PDFlibFuncType22)AttachFunction("DLEndPageUpdate");
		PDFlibExtractFilePageContent = (PDFlibFuncType3)AttachFunction("DLExtractFilePageContent");
		PDFlibExtractFilePageText = (PDFlibFuncType4)AttachFunction("DLExtractFilePageText");
		PDFlibExtractFilePages = (PDFlibFuncType25)AttachFunction("DLExtractFilePages");
		PDFlibExtractPageRanges = (PDFlibFuncType23)AttachFunction("DLExtractPageRanges");
		PDFlibExtractPages = (PDFlibFuncType74)AttachFunction("DLExtractPages");
		PDFlibFileListCount = (PDFlibFuncType23)AttachFunction("DLFileListCount");
		PDFlibFileListItem = (PDFlibFuncType5)AttachFunction("DLFileListItem");
		PDFlibFindFonts = (PDFlibFuncType22)AttachFunction("DLFindFonts");
		PDFlibFindFormFieldByTitle = (PDFlibFuncType23)AttachFunction("DLFindFormFieldByTitle");
		PDFlibFindImages = (PDFlibFuncType22)AttachFunction("DLFindImages");
		PDFlibFitImage = (PDFlibFuncType60)AttachFunction("DLFitImage");
		PDFlibFitRotatedTextBox = (PDFlibFuncType51)AttachFunction("DLFitRotatedTextBox");
		PDFlibFitTextBox = (PDFlibFuncType47)AttachFunction("DLFitTextBox");
		PDFlibFlattenFormField = (PDFlibFuncType64)AttachFunction("DLFlattenFormField");
		PDFlibFontCount = (PDFlibFuncType22)AttachFunction("DLFontCount");
		PDFlibFontFamily = (PDFlibFuncType1)AttachFunction("DLFontFamily");
		PDFlibFontHasKerning = (PDFlibFuncType22)AttachFunction("DLFontHasKerning");
		PDFlibFontName = (PDFlibFuncType1)AttachFunction("DLFontName");
		PDFlibFontReference = (PDFlibFuncType1)AttachFunction("DLFontReference");
		PDFlibFontSize = (PDFlibFuncType22)AttachFunction("DLFontSize");
		PDFlibFontType = (PDFlibFuncType22)AttachFunction("DLFontType");
		PDFlibFormFieldCount = (PDFlibFuncType22)AttachFunction("DLFormFieldCount");
		PDFlibFormFieldHasParent = (PDFlibFuncType64)AttachFunction("DLFormFieldHasParent");
		PDFlibFormFieldJScriptAction = (PDFlibFuncType66)AttachFunction("DLFormFieldJScriptAction");
		PDFlibFormFieldWebLinkAction = (PDFlibFuncType66)AttachFunction("DLFormFieldWebLinkAction");
		PDFlibGetActionType = (PDFlibFuncType8)AttachFunction("DLGetActionType");
		PDFlibGetAnalysisInfo = (PDFlibFuncType10)AttachFunction("DLGetAnalysisInfo");
		PDFlibGetAnnotActionID = (PDFlibFuncType64)AttachFunction("DLGetAnnotActionID");
		PDFlibGetAnnotDblProperty = (PDFlibFuncType19)AttachFunction("DLGetAnnotDblProperty");
		PDFlibGetAnnotIntProperty = (PDFlibFuncType74)AttachFunction("DLGetAnnotIntProperty");
		PDFlibGetAnnotStrProperty = (PDFlibFuncType10)AttachFunction("DLGetAnnotStrProperty");
		PDFlibGetBarcodeWidth = (PDFlibFuncType16)AttachFunction("DLGetBarcodeWidth");
		PDFlibGetCanvasDC = (PDFlibFuncType74)AttachFunction("DLGetCanvasDC");
		PDFlibGetCatalogInfo = (PDFlibFuncType2)AttachFunction("DLGetCatalogInfo");
		PDFlibGetCustomInfo = (PDFlibFuncType2)AttachFunction("DLGetCustomInfo");
		PDFlibGetCustomKeys = (PDFlibFuncType8)AttachFunction("DLGetCustomKeys");
		PDFlibGetDefaultPrinter = (PDFlibFuncType1)AttachFunction("DLGetDefaultPrinter");
		PDFlibGetDestPage = (PDFlibFuncType64)AttachFunction("DLGetDestPage");
		PDFlibGetDestType = (PDFlibFuncType64)AttachFunction("DLGetDestType");
		PDFlibGetDestValue = (PDFlibFuncType19)AttachFunction("DLGetDestValue");
		PDFlibGetDocJavaScript = (PDFlibFuncType2)AttachFunction("DLGetDocJavaScript");
		PDFlibGetDocID = (PDFlibFuncType64)AttachFunction("DLGetDocID");
		PDFlibGetDocIdentifier = (PDFlibFuncType10)AttachFunction("DLGetDocIdentifier");
		PDFlibGetDocMetadata = (PDFlibFuncType1)AttachFunction("DLGetDocMetadata");
		PDFlibGetDocResourceList = (PDFlibFuncType1)AttachFunction("DLGetDocResourceList");
		PDFlibGetEmbFileContToFile = (PDFlibFuncType65)AttachFunction("DLGetEmbFileContToFile");
		PDFlibGetEmbFileContToString = (PDFlibFuncType8)AttachFunction("DLGetEmbFileContToString");
		PDFlibGetEmbFileIntProp = (PDFlibFuncType74)AttachFunction("DLGetEmbFileIntProp");
		PDFlibGetEmbFileStrProp = (PDFlibFuncType10)AttachFunction("DLGetEmbFileStrProp");
		PDFlibGetEncFingerprint = (PDFlibFuncType1)AttachFunction("DLGetEncFingerprint");
		PDFlibGetFileMetadata = (PDFlibFuncType2)AttachFunction("DLGetFileMetadata");
		PDFlibGetFirstChildOutline = (PDFlibFuncType64)AttachFunction("DLGetFirstChildOutline");
		PDFlibGetFirstOutline = (PDFlibFuncType22)AttachFunction("DLGetFirstOutline");
		PDFlibGetFontID = (PDFlibFuncType64)AttachFunction("DLGetFontID");
		PDFlibGetFontObjectNumber = (PDFlibFuncType22)AttachFunction("DLGetFontObjectNumber");
		PDFlibGetFormFieldAlignment = (PDFlibFuncType64)AttachFunction("DLGetFormFieldAlignment");
		PDFlibGetFormFieldAnnotFlags = (PDFlibFuncType64)AttachFunction("DLGetFormFieldAnnotFlags");
		PDFlibGetFormFieldBackgroundColor = (PDFlibFuncType19)AttachFunction("DLGetFormFieldBackgroundColor");
		PDFlibGetFormFieldBorderColor = (PDFlibFuncType19)AttachFunction("DLGetFormFieldBorderColor");
		PDFlibGetFormFieldBorderProperty = (PDFlibFuncType19)AttachFunction("DLGetFormFieldBorderProperty");
		PDFlibGetFormFieldBorderStyle = (PDFlibFuncType64)AttachFunction("DLGetFormFieldBorderStyle");
		PDFlibGetFormFieldBound = (PDFlibFuncType19)AttachFunction("DLGetFormFieldBound");
		PDFlibGetFormFieldCaption = (PDFlibFuncType8)AttachFunction("DLGetFormFieldCaption");
		PDFlibGetFormFieldChildTitle = (PDFlibFuncType8)AttachFunction("DLGetFormFieldChildTitle");
		PDFlibGetFormFieldChoiceType = (PDFlibFuncType64)AttachFunction("DLGetFormFieldChoiceType");
		PDFlibGetFormFieldColor = (PDFlibFuncType19)AttachFunction("DLGetFormFieldColor");
		PDFlibGetFormFieldComb = (PDFlibFuncType64)AttachFunction("DLGetFormFieldComb");
		PDFlibGetFormFieldDefaultValue = (PDFlibFuncType8)AttachFunction("DLGetFormFieldDefaultValue");
		PDFlibGetFormFieldDescription = (PDFlibFuncType8)AttachFunction("DLGetFormFieldDescription");
		PDFlibGetFormFieldFlags = (PDFlibFuncType64)AttachFunction("DLGetFormFieldFlags");
		PDFlibGetFormFieldFontName = (PDFlibFuncType8)AttachFunction("DLGetFormFieldFontName");
		PDFlibGetFormFieldJavaScript = (PDFlibFuncType9)AttachFunction("DLGetFormFieldJavaScript");
		PDFlibGetFormFieldKidCount = (PDFlibFuncType64)AttachFunction("DLGetFormFieldKidCount");
		PDFlibGetFormFieldMaxLen = (PDFlibFuncType64)AttachFunction("DLGetFormFieldMaxLen");
		PDFlibGetFormFieldPage = (PDFlibFuncType64)AttachFunction("DLGetFormFieldPage");
		PDFlibGetFormFieldPrintable = (PDFlibFuncType64)AttachFunction("DLGetFormFieldPrintable");
		PDFlibGetFormFieldReadOnly = (PDFlibFuncType64)AttachFunction("DLGetFormFieldReadOnly");
		PDFlibGetFormFieldRotation = (PDFlibFuncType64)AttachFunction("DLGetFormFieldRotation");
		PDFlibGetFormFieldSubCount = (PDFlibFuncType64)AttachFunction("DLGetFormFieldSubCount");
		PDFlibGetFormFieldSubName = (PDFlibFuncType10)AttachFunction("DLGetFormFieldSubName");
		PDFlibGetFormFieldSubTempIndex = (PDFlibFuncType74)AttachFunction("DLGetFormFieldSubTempIndex");
		PDFlibGetFormFieldTabOrder = (PDFlibFuncType64)AttachFunction("DLGetFormFieldTabOrder");
		PDFlibGetFormFieldTextFlags = (PDFlibFuncType74)AttachFunction("DLGetFormFieldTextFlags");
		PDFlibGetFormFieldTextSize = (PDFlibFuncType17)AttachFunction("DLGetFormFieldTextSize");
		PDFlibGetFormFieldTitle = (PDFlibFuncType8)AttachFunction("DLGetFormFieldTitle");
		PDFlibGetFormFieldType = (PDFlibFuncType64)AttachFunction("DLGetFormFieldType");
		PDFlibGetFormFieldValue = (PDFlibFuncType8)AttachFunction("DLGetFormFieldValue");
		PDFlibGetFormFieldValueByTitle = (PDFlibFuncType2)AttachFunction("DLGetFormFieldValueByTitle");
		PDFlibGetFormFieldVisible = (PDFlibFuncType64)AttachFunction("DLGetFormFieldVisible");
		PDFlibGetFormFieldWebLink = (PDFlibFuncType9)AttachFunction("DLGetFormFieldWebLink");
		PDFlibGetFormFontCount = (PDFlibFuncType22)AttachFunction("DLGetFormFontCount");
		PDFlibGetFormFontName = (PDFlibFuncType8)AttachFunction("DLGetFormFontName");
		PDFlibGetGlobalJavaScript = (PDFlibFuncType2)AttachFunction("DLGetGlobalJavaScript");
		PDFlibGetHTMLTextHeight = (PDFlibFuncType15)AttachFunction("DLGetHTMLTextHeight");
		PDFlibGetHTMLTextLineCount = (PDFlibFuncType39)AttachFunction("DLGetHTMLTextLineCount");
		PDFlibGetHTMLTextWidth = (PDFlibFuncType15)AttachFunction("DLGetHTMLTextWidth");
		PDFlibGetImageID = (PDFlibFuncType64)AttachFunction("DLGetImageID");
		PDFlibGetImagePageCount = (PDFlibFuncType23)AttachFunction("DLGetImagePageCount");
		PDFlibGetInformation = (PDFlibFuncType8)AttachFunction("DLGetInformation");
		PDFlibGetKerning = (PDFlibFuncType23)AttachFunction("DLGetKerning");
		PDFlibGetNamedDestination = (PDFlibFuncType23)AttachFunction("DLGetNamedDestination");
		PDFlibGetNextOutline = (PDFlibFuncType64)AttachFunction("DLGetNextOutline");
		PDFlibGetObjectCount = (PDFlibFuncType22)AttachFunction("DLGetObjectCount");
		PDFlibGetObjectSource = (PDFlibFuncType8)AttachFunction("DLGetObjectSource");
		PDFlibGetOpenActionDestination = (PDFlibFuncType22)AttachFunction("DLGetOpenActionDestination");
		PDFlibGetOpenActionJavaScript = (PDFlibFuncType1)AttachFunction("DLGetOpenActionJavaScript");
		PDFlibGetOptionalContentGroupID = (PDFlibFuncType64)AttachFunction("DLGetOptionalContentGroupID");
		PDFlibGetOptionalContentGroupName = (PDFlibFuncType8)AttachFunction("DLGetOptionalContentGroupName");
		PDFlibGetOrigin = (PDFlibFuncType22)AttachFunction("DLGetOrigin");
		PDFlibGetOutlineActionID = (PDFlibFuncType64)AttachFunction("DLGetOutlineActionID");
		PDFlibGetOutlineColor = (PDFlibFuncType19)AttachFunction("DLGetOutlineColor");
		PDFlibGetOutlineDest = (PDFlibFuncType64)AttachFunction("DLGetOutlineDest");
		PDFlibGetOutlineID = (PDFlibFuncType64)AttachFunction("DLGetOutlineID");
		PDFlibGetOutlineJavaScript = (PDFlibFuncType8)AttachFunction("DLGetOutlineJavaScript");
		PDFlibGetOutlineOpenFile = (PDFlibFuncType8)AttachFunction("DLGetOutlineOpenFile");
		PDFlibGetOutlinePage = (PDFlibFuncType64)AttachFunction("DLGetOutlinePage");
		PDFlibGetOutlineStyle = (PDFlibFuncType64)AttachFunction("DLGetOutlineStyle");
		PDFlibGetOutlineWebLink = (PDFlibFuncType8)AttachFunction("DLGetOutlineWebLink");
		PDFlibGetPageBox = (PDFlibFuncType19)AttachFunction("DLGetPageBox");
		PDFlibGetPageContent = (PDFlibFuncType1)AttachFunction("DLGetPageContent");
		PDFlibGetPageJavaScript = (PDFlibFuncType2)AttachFunction("DLGetPageJavaScript");
		PDFlibGetPageLGIDictContent = (PDFlibFuncType8)AttachFunction("DLGetPageLGIDictContent");
		PDFlibGetPageLGIDictCount = (PDFlibFuncType22)AttachFunction("DLGetPageLGIDictCount");
		PDFlibGetPageLabel = (PDFlibFuncType8)AttachFunction("DLGetPageLabel");
		PDFlibGetPageLayout = (PDFlibFuncType22)AttachFunction("DLGetPageLayout");
		PDFlibGetPageMode = (PDFlibFuncType22)AttachFunction("DLGetPageMode");
		PDFlibGetPageText = (PDFlibFuncType8)AttachFunction("DLGetPageText");
		PDFlibGetParentOutline = (PDFlibFuncType64)AttachFunction("DLGetParentOutline");
		PDFlibGetPrevOutline = (PDFlibFuncType64)AttachFunction("DLGetPrevOutline");
		PDFlibGetPrinterBins = (PDFlibFuncType2)AttachFunction("DLGetPrinterBins");
		PDFlibGetPrinterNames = (PDFlibFuncType1)AttachFunction("DLGetPrinterNames");
		PDFlibGetSubsetString = (PDFlibFuncType2)AttachFunction("DLGetSubsetString");
		PDFlibGetTableCellDblProperty = (PDFlibFuncType20)AttachFunction("DLGetTableCellDblProperty");
		PDFlibGetTableCellIntProperty = (PDFlibFuncType85)AttachFunction("DLGetTableCellIntProperty");
		PDFlibGetTableCellStrProperty = (PDFlibFuncType12)AttachFunction("DLGetTableCellStrProperty");
		PDFlibGetTableColumnCount = (PDFlibFuncType64)AttachFunction("DLGetTableColumnCount");
		PDFlibGetTableLastDrawnRow = (PDFlibFuncType64)AttachFunction("DLGetTableLastDrawnRow");
		PDFlibGetTableRowCount = (PDFlibFuncType64)AttachFunction("DLGetTableRowCount");
		PDFlibGetTempPath = (PDFlibFuncType1)AttachFunction("DLGetTempPath");
		PDFlibGetTextAscent = (PDFlibFuncType13)AttachFunction("DLGetTextAscent");
		PDFlibGetTextBound = (PDFlibFuncType17)AttachFunction("DLGetTextBound");
		PDFlibGetTextDescent = (PDFlibFuncType13)AttachFunction("DLGetTextDescent");
		PDFlibGetTextHeight = (PDFlibFuncType13)AttachFunction("DLGetTextHeight");
		PDFlibGetTextSize = (PDFlibFuncType13)AttachFunction("DLGetTextSize");
		PDFlibGetTextWidth = (PDFlibFuncType14)AttachFunction("DLGetTextWidth");
		PDFlibGetViewerPreferences = (PDFlibFuncType64)AttachFunction("DLGetViewerPreferences");
		PDFlibGetWrappedText = (PDFlibFuncType6)AttachFunction("DLGetWrappedText");
		PDFlibGetWrappedTextBreakString = (PDFlibFuncType6)AttachFunction("DLGetWrappedTextBreakString");
		PDFlibGetWrappedTextHeight = (PDFlibFuncType15)AttachFunction("DLGetWrappedTextHeight");
		PDFlibGetWrappedTextLineCount = (PDFlibFuncType39)AttachFunction("DLGetWrappedTextLineCount");
		PDFlibGetXFAFormFieldCount = (PDFlibFuncType22)AttachFunction("DLGetXFAFormFieldCount");
		PDFlibGetXFAFormFieldName = (PDFlibFuncType8)AttachFunction("DLGetXFAFormFieldName");
		PDFlibGetXFAFormFieldNames = (PDFlibFuncType2)AttachFunction("DLGetXFAFormFieldNames");
		PDFlibGetXFAFormFieldValue = (PDFlibFuncType2)AttachFunction("DLGetXFAFormFieldValue");
		PDFlibGlobalJavaScriptCount = (PDFlibFuncType22)AttachFunction("DLGlobalJavaScriptCount");
		PDFlibGlobalJavaScriptPackageName = (PDFlibFuncType8)AttachFunction("DLGlobalJavaScriptPackageName");
		PDFlibHasFontResources = (PDFlibFuncType22)AttachFunction("DLHasFontResources");
		PDFlibHasPageBox = (PDFlibFuncType64)AttachFunction("DLHasPageBox");
		PDFlibHidePage = (PDFlibFuncType22)AttachFunction("DLHidePage");
		PDFlibImageCount = (PDFlibFuncType22)AttachFunction("DLImageCount");
		PDFlibImageFillColor = (PDFlibFuncType22)AttachFunction("DLImageFillColor");
		PDFlibImageHeight = (PDFlibFuncType22)AttachFunction("DLImageHeight");
		PDFlibImageHorizontalResolution = (PDFlibFuncType22)AttachFunction("DLImageHorizontalResolution");
		PDFlibImageResolutionUnits = (PDFlibFuncType22)AttachFunction("DLImageResolutionUnits");
		PDFlibImageType = (PDFlibFuncType22)AttachFunction("DLImageType");
		PDFlibImageVerticalResolution = (PDFlibFuncType22)AttachFunction("DLImageVerticalResolution");
		PDFlibImageWidth = (PDFlibFuncType22)AttachFunction("DLImageWidth");
		PDFlibImportEMFFromFile = (PDFlibFuncType36)AttachFunction("DLImportEMFFromFile");
		PDFlibInsertPages = (PDFlibFuncType74)AttachFunction("DLInsertPages");
		PDFlibInsertTableColumns = (PDFlibFuncType81)AttachFunction("DLInsertTableColumns");
		PDFlibInsertTableRows = (PDFlibFuncType81)AttachFunction("DLInsertTableRows");
		PDFlibLastErrorCode = (PDFlibFuncType22)AttachFunction("DLLastErrorCode");
		PDFlibLastRenderError = (PDFlibFuncType1)AttachFunction("DLLastRenderError");
		PDFlibLayerCount = (PDFlibFuncType22)AttachFunction("DLLayerCount");
		PDFlibVersion = (PDFlibFuncType1)AttachFunction("DLLibraryVersion");
		PDFlibLinearized = (PDFlibFuncType22)AttachFunction("DLLinearized");
		PDFlibLoadFromCanvasDC = (PDFlibFuncType63)AttachFunction("DLLoadFromCanvasDC");
		PDFlibLoadFromFile = (PDFlibFuncType23)AttachFunction("DLLoadFromFile");
		PDFlibLoadFromString = (PDFlibFuncType23)AttachFunction("DLLoadFromString");
		PDFlibLoadState = (PDFlibFuncType22)AttachFunction("DLLoadState");
		PDFlibMergeDocument = (PDFlibFuncType64)AttachFunction("DLMergeDocument");
		PDFlibMergeFileList = (PDFlibFuncType24)AttachFunction("DLMergeFileList");
		PDFlibMergeFileListFast = (PDFlibFuncType24)AttachFunction("DLMergeFileListFast");
		PDFlibMergeFiles = (PDFlibFuncType25)AttachFunction("DLMergeFiles");
		PDFlibMergeTableCells = (PDFlibFuncType88)AttachFunction("DLMergeTableCells");
		PDFlibMoveLayer = (PDFlibFuncType74)AttachFunction("DLMoveLayer");
		PDFlibMoveOutlineAfter = (PDFlibFuncType74)AttachFunction("DLMoveOutlineAfter");
		PDFlibMoveOutlineBefore = (PDFlibFuncType74)AttachFunction("DLMoveOutlineBefore");
		PDFlibMovePage = (PDFlibFuncType64)AttachFunction("DLMovePage");
		PDFlibMovePath = (PDFlibFuncType40)AttachFunction("DLMovePath");
		PDFlibMultiplyScale = (PDFlibFuncType38)AttachFunction("DLMultiplyScale");
		PDFlibNewCustomPrinter = (PDFlibFuncType2)AttachFunction("DLNewCustomPrinter");
		PDFlibNewDocument = (PDFlibFuncType22)AttachFunction("DLNewDocument");
		PDFlibNewFormField = (PDFlibFuncType34)AttachFunction("DLNewFormField");
		PDFlibNewLayer = (PDFlibFuncType22)AttachFunction("DLNewLayer");
		PDFlibNewOptionalContentGroup = (PDFlibFuncType23)AttachFunction("DLNewOptionalContentGroup");
		PDFlibNewOutline = (PDFlibFuncType68)AttachFunction("DLNewOutline");
		PDFlibNewPage = (PDFlibFuncType22)AttachFunction("DLNewPage");
		PDFlibNewPages = (PDFlibFuncType64)AttachFunction("DLNewPages");
		PDFlibNewPostScriptXObject = (PDFlibFuncType23)AttachFunction("DLNewPostScriptXObject");
		PDFlibNewRGBAxialShader = (PDFlibFuncType32)AttachFunction("DLNewRGBAxialShader");
		PDFlibNewStaticOutline = (PDFlibFuncType65)AttachFunction("DLNewStaticOutline");
		PDFlibOpenOutline = (PDFlibFuncType64)AttachFunction("DLOpenOutline");
		PDFlibOptionalContentGroupCount = (PDFlibFuncType22)AttachFunction("DLOptionalContentGroupCount");
		PDFlibOutlineCount = (PDFlibFuncType22)AttachFunction("DLOutlineCount");
		PDFlibOutlineTitle = (PDFlibFuncType8)AttachFunction("DLOutlineTitle");
		PDFlibPageCount = (PDFlibFuncType22)AttachFunction("DLPageCount");
		PDFlibPageHeight = (PDFlibFuncType13)AttachFunction("DLPageHeight");
		PDFlibPageJavaScriptAction = (PDFlibFuncType24)AttachFunction("DLPageJavaScriptAction");
		PDFlibPageRotation = (PDFlibFuncType22)AttachFunction("DLPageRotation");
		PDFlibPageWidth = (PDFlibFuncType13)AttachFunction("DLPageWidth");
		PDFlibPrintDocument = (PDFlibFuncType37)AttachFunction("DLPrintDocument");
		PDFlibPrintOptions = (PDFlibFuncType75)AttachFunction("DLPrintOptions");
		PDFlibReleaseBuffer = (PDFlibFuncType23)AttachFunction("DLReleaseBuffer");
		PDFlibReleaseLibrary = (PDFlibFuncType22)AttachFunction("DLReleaseLibrary");
		PDFlibRemoveAppearanceStream = (PDFlibFuncType64)AttachFunction("DLRemoveAppearanceStream");
		PDFlibRemoveDocument = (PDFlibFuncType64)AttachFunction("DLRemoveDocument");
		PDFlibRemoveOutline = (PDFlibFuncType64)AttachFunction("DLRemoveOutline");
		PDFlibRemoveSharedLayers = (PDFlibFuncType22)AttachFunction("DLRemoveSharedLayers");
		PDFlibRemoveStyle = (PDFlibFuncType23)AttachFunction("DLRemoveStyle");
		PDFlibRenderDocumentToFile = (PDFlibFuncType86)AttachFunction("DLRenderDocumentToFile");
		PDFlibRenderPageToDC = (PDFlibFuncType81)AttachFunction("DLRenderPageToDC");
		PDFlibRenderPageToFile = (PDFlibFuncType82)AttachFunction("DLRenderPageToFile");
		PDFlibRenderPageToString = (PDFlibFuncType11)AttachFunction("DLRenderPageToString");
		PDFlibReplaceFonts = (PDFlibFuncType22)AttachFunction("DLReplaceFonts");
		PDFlibReplaceImage = (PDFlibFuncType74)AttachFunction("DLReplaceImage");
		PDFlibReplaceTag = (PDFlibFuncType24)AttachFunction("DLReplaceTag");
		PDFlibRetrieveCustomDataToFile = (PDFlibFuncType28)AttachFunction("DLRetrieveCustomDataToFile");
		PDFlibRetrieveCustomDataToString = (PDFlibFuncType5)AttachFunction("DLRetrieveCustomDataToString");
		PDFlibReverseImage = (PDFlibFuncType64)AttachFunction("DLReverseImage");
		PDFlibRotatePage = (PDFlibFuncType64)AttachFunction("DLRotatePage");
		PDFlibSaveFontToFile = (PDFlibFuncType23)AttachFunction("DLSaveFontToFile");
		PDFlibSaveImageToFile = (PDFlibFuncType23)AttachFunction("DLSaveImageToFile");
		PDFlibSaveState = (PDFlibFuncType22)AttachFunction("DLSaveState");
		PDFlibSaveStyle = (PDFlibFuncType23)AttachFunction("DLSaveStyle");
		PDFlibSaveToFile = (PDFlibFuncType23)AttachFunction("DLSaveToFile");
		PDFlibSaveToString = (PDFlibFuncType1)AttachFunction("DLSaveToString");
		PDFlibSecurityInfo = (PDFlibFuncType64)AttachFunction("DLSecurityInfo");
		PDFlibSelectDocument = (PDFlibFuncType64)AttachFunction("DLSelectDocument");
		PDFlibSelectFont = (PDFlibFuncType64)AttachFunction("DLSelectFont");
		PDFlibSelectImage = (PDFlibFuncType64)AttachFunction("DLSelectImage");
		PDFlibSelectLayer = (PDFlibFuncType64)AttachFunction("DLSelectLayer");
		PDFlibSelectPage = (PDFlibFuncType64)AttachFunction("DLSelectPage");
		PDFlibSelectedDocument = (PDFlibFuncType22)AttachFunction("DLSelectedDocument");
		PDFlibSelectedFont = (PDFlibFuncType22)AttachFunction("DLSelectedFont");
		PDFlibSelectedImage = (PDFlibFuncType22)AttachFunction("DLSelectedImage");
		PDFlibSelectedPage = (PDFlibFuncType22)AttachFunction("DLSelectedPage");
		PDFlibSetAdvancePassword = (PDFlibFuncType23)AttachFunction("DLSetAdvancePassword");
		PDFlibSetAnnotContents = (PDFlibFuncType65)AttachFunction("DLSetAnnotContents");
		PDFlibSetAnnotStrProperty = (PDFlibFuncType75)AttachFunction("DLSetAnnotStrProperty");
		PDFlibSetBaseURL = (PDFlibFuncType23)AttachFunction("DLSetBaseURL");
		PDFlibSetBlendMode = (PDFlibFuncType64)AttachFunction("DLSetBlendMode");
		PDFlibSetBreakString = (PDFlibFuncType23)AttachFunction("DLSetBreakString");
		PDFlibSetCapturedPageOptional = (PDFlibFuncType74)AttachFunction("DLSetCapturedPageOptional");
		PDFlibSetCatalogInformation = (PDFlibFuncType24)AttachFunction("DLSetCatalogInformation");
		PDFlibSetCharWidth = (PDFlibFuncType74)AttachFunction("DLSetCharWidth");
		PDFlibSetClippingPath = (PDFlibFuncType22)AttachFunction("DLSetClippingPath");
		PDFlibSetClippingPathEvenOdd = (PDFlibFuncType22)AttachFunction("DLSetClippingPathEvenOdd");
		PDFlibSetCropBox = (PDFlibFuncType46)AttachFunction("DLSetCropBox");
		PDFlibSetCustomInformation = (PDFlibFuncType24)AttachFunction("DLSetCustomInformation");
		PDFlibSetCustomLineDash = (PDFlibFuncType30)AttachFunction("DLSetCustomLineDash");
		PDFlibSetPDFiumFileName = (PDFlibFuncType99)AttachFunction("DLSetPDFiumFileName");
		PDFlibSetDocumentMetadata = (PDFlibFuncType23)AttachFunction("DLSetDocumentMetadata");
		PDFlibSetFillColor = (PDFlibFuncType43)AttachFunction("DLSetFillColor");
		PDFlibSetFillColorCMYK = (PDFlibFuncType46)AttachFunction("DLSetFillColorCMYK");
		PDFlibSetFillColorSep = (PDFlibFuncType30)AttachFunction("DLSetFillColorSep");
		PDFlibSetFillShader = (PDFlibFuncType23)AttachFunction("DLSetFillShader");
		PDFlibSetFontEncoding = (PDFlibFuncType64)AttachFunction("DLSetFontEncoding");
		PDFlibSetFontFlags = (PDFlibFuncType96)AttachFunction("DLSetFontFlags");
		PDFlibSetFormFieldAlignment = (PDFlibFuncType74)AttachFunction("DLSetFormFieldAlignment");
		PDFlibSetFormFieldAnnotFlags = (PDFlibFuncType74)AttachFunction("DLSetFormFieldAnnotFlags");
		PDFlibSetFormFieldBackgroundColor = (PDFlibFuncType70)AttachFunction("DLSetFormFieldBackgroundColor");
		PDFlibSetFormFieldBackgroundColorCMYK = (PDFlibFuncType71)AttachFunction("DLSetFormFieldBackgroundColorCMYK");
		PDFlibSetFormFieldBackgroundColorSep = (PDFlibFuncType67)AttachFunction("DLSetFormFieldBackgroundColorSep");
		PDFlibSetFormFieldBorderColor = (PDFlibFuncType70)AttachFunction("DLSetFormFieldBorderColor");
		PDFlibSetFormFieldBorderColorCMYK = (PDFlibFuncType71)AttachFunction("DLSetFormFieldBorderColorCMYK");
		PDFlibSetFormFieldBorderColorSep = (PDFlibFuncType67)AttachFunction("DLSetFormFieldBorderColorSep");
		PDFlibSetFormFieldBorderStyle = (PDFlibFuncType73)AttachFunction("DLSetFormFieldBorderStyle");
		PDFlibSetFormFieldBounds = (PDFlibFuncType71)AttachFunction("DLSetFormFieldBounds");
		PDFlibSetFormFieldCalcOrder = (PDFlibFuncType74)AttachFunction("DLSetFormFieldCalcOrder");
		PDFlibSetFormFieldCaption = (PDFlibFuncType65)AttachFunction("DLSetFormFieldCaption");
		PDFlibSetFormFieldCheckStyle = (PDFlibFuncType81)AttachFunction("DLSetFormFieldCheckStyle");
		PDFlibSetFormFieldChildTitle = (PDFlibFuncType65)AttachFunction("DLSetFormFieldChildTitle");
		PDFlibSetFormFieldColor = (PDFlibFuncType70)AttachFunction("DLSetFormFieldColor");
		PDFlibSetFormFieldColorCMYK = (PDFlibFuncType71)AttachFunction("DLSetFormFieldColorCMYK");
		PDFlibSetFormFieldColorSep = (PDFlibFuncType67)AttachFunction("DLSetFormFieldColorSep");
		PDFlibSetFormFieldComb = (PDFlibFuncType74)AttachFunction("DLSetFormFieldComb");
		PDFlibSetFormFieldDefaultValue = (PDFlibFuncType65)AttachFunction("DLSetFormFieldDefaultValue");
		PDFlibSetFormFieldDescription = (PDFlibFuncType65)AttachFunction("DLSetFormFieldDescription");
		PDFlibSetFormFieldFlags = (PDFlibFuncType74)AttachFunction("DLSetFormFieldFlags");
		PDFlibSetFormFieldFont = (PDFlibFuncType74)AttachFunction("DLSetFormFieldFont");
		PDFlibSetFormFieldHighlightMode = (PDFlibFuncType74)AttachFunction("DLSetFormFieldHighlightMode");
		PDFlibSetFormFieldIcon = (PDFlibFuncType81)AttachFunction("DLSetFormFieldIcon");
		PDFlibSetFormFieldIconStyle = (PDFlibFuncType92)AttachFunction("DLSetFormFieldIconStyle");
		PDFlibSetFormFieldMaxLen = (PDFlibFuncType74)AttachFunction("DLSetFormFieldMaxLen");
		PDFlibSetFormFieldOptional = (PDFlibFuncType74)AttachFunction("DLSetFormFieldOptional");
		PDFlibSetFormFieldPage = (PDFlibFuncType74)AttachFunction("DLSetFormFieldPage");
		PDFlibSetFormFieldPrintable = (PDFlibFuncType74)AttachFunction("DLSetFormFieldPrintable");
		PDFlibSetFormFieldReadOnly = (PDFlibFuncType74)AttachFunction("DLSetFormFieldReadOnly");
		PDFlibSetFormFieldRotation = (PDFlibFuncType74)AttachFunction("DLSetFormFieldRotation");
		PDFlibSetFormFieldStandardFont = (PDFlibFuncType74)AttachFunction("DLSetFormFieldStandardFont");
		PDFlibSetFormFieldTabOrder = (PDFlibFuncType74)AttachFunction("DLSetFormFieldTabOrder");
		PDFlibSetFormFieldTextFlags = (PDFlibFuncType92)AttachFunction("DLSetFormFieldTextFlags");
		PDFlibSetFormFieldTextSize = (PDFlibFuncType69)AttachFunction("DLSetFormFieldTextSize");
		PDFlibSetFormFieldValue = (PDFlibFuncType65)AttachFunction("DLSetFormFieldValue");
		PDFlibSetFormFieldValueByTitle = (PDFlibFuncType24)AttachFunction("DLSetFormFieldValueByTitle");
		PDFlibSetFormFieldVisible = (PDFlibFuncType74)AttachFunction("DLSetFormFieldVisible");
		PDFlibSetGDIPlusFileName = (PDFlibFuncType23)AttachFunction("DLSetGDIPlusFileName");
		PDFlibSetGDIPlusOptions = (PDFlibFuncType74)AttachFunction("DLSetGDIPlusOptions");
		PDFlibSetHTMLBoldFont = (PDFlibFuncType34)AttachFunction("DLSetHTMLBoldFont");
		PDFlibSetHTMLBoldItalicFont = (PDFlibFuncType34)AttachFunction("DLSetHTMLBoldItalicFont");
		PDFlibSetHTMLItalicFont = (PDFlibFuncType34)AttachFunction("DLSetHTMLItalicFont");
		PDFlibSetHTMLNormalFont = (PDFlibFuncType34)AttachFunction("DLSetHTMLNormalFont");
		PDFlibSetImageAsMask = (PDFlibFuncType64)AttachFunction("DLSetImageAsMask");
		PDFlibSetImageMask = (PDFlibFuncType52)AttachFunction("DLSetImageMask");
		PDFlibSetImageMaskCMYK = (PDFlibFuncType53)AttachFunction("DLSetImageMaskCMYK");
		PDFlibSetImageMaskFromImage = (PDFlibFuncType64)AttachFunction("DLSetImageMaskFromImage");
		PDFlibSetImageOptional = (PDFlibFuncType64)AttachFunction("DLSetImageOptional");
		PDFlibSetInformation = (PDFlibFuncType65)AttachFunction("DLSetInformation");
		PDFlibSetJPEGQuality = (PDFlibFuncType64)AttachFunction("DLSetJPEGQuality");
		PDFlibSetJavaScriptMode = (PDFlibFuncType64)AttachFunction("DLSetJavaScriptMode");
		PDFlibSetKerning = (PDFlibFuncType34)AttachFunction("DLSetKerning");
		PDFlibSetLayerOptional = (PDFlibFuncType64)AttachFunction("DLSetLayerOptional");
		PDFlibSetLineCap = (PDFlibFuncType64)AttachFunction("DLSetLineCap");
		PDFlibSetLineColor = (PDFlibFuncType43)AttachFunction("DLSetLineColor");
		PDFlibSetLineColorCMYK = (PDFlibFuncType46)AttachFunction("DLSetLineColorCMYK");
		PDFlibSetLineColorSep = (PDFlibFuncType30)AttachFunction("DLSetLineColorSep");
		PDFlibSetLineDash = (PDFlibFuncType40)AttachFunction("DLSetLineDash");
		PDFlibSetLineJoin = (PDFlibFuncType64)AttachFunction("DLSetLineJoin");
		PDFlibSetLineShader = (PDFlibFuncType23)AttachFunction("DLSetLineShader");
		PDFlibSetLineWidth = (PDFlibFuncType38)AttachFunction("DLSetLineWidth");
		PDFlibSetMeasurementUnits = (PDFlibFuncType64)AttachFunction("DLSetMeasurementUnits");
		PDFlibSetNeedAppearances = (PDFlibFuncType64)AttachFunction("DLSetNeedAppearances");
		PDFlibSetOpenActionDestination = (PDFlibFuncType74)AttachFunction("DLSetOpenActionDestination");
		PDFlibSetOpenActionDestinationFull = (PDFlibFuncType84)AttachFunction("DLSetOpenActionDestinationFull");
		PDFlibSetOpenActionJavaScript = (PDFlibFuncType23)AttachFunction("DLSetOpenActionJavaScript");
		PDFlibSetOpenActionMenu = (PDFlibFuncType23)AttachFunction("DLSetOpenActionMenu");
		PDFlibSetOptionalContentGroupPrintable = (PDFlibFuncType74)AttachFunction("DLSetOptionalContentGroupPrintable");
		PDFlibSetOptionalContentGroupVisible = (PDFlibFuncType74)AttachFunction("DLSetOptionalContentGroupVisible");
		PDFlibSetOrigin = (PDFlibFuncType64)AttachFunction("DLSetOrigin");
		PDFlibSetOutlineColor = (PDFlibFuncType70)AttachFunction("DLSetOutlineColor");
		PDFlibSetOutlineDestination = (PDFlibFuncType76)AttachFunction("DLSetOutlineDestination");
		PDFlibSetOutlineDestinationFull = (PDFlibFuncType87)AttachFunction("DLSetOutlineDestinationFull");
		PDFlibSetOutlineDestinationZoom = (PDFlibFuncType80)AttachFunction("DLSetOutlineDestinationZoom");
		PDFlibSetOutlineJavaScript = (PDFlibFuncType65)AttachFunction("DLSetOutlineJavaScript");
		PDFlibSetOutlineOpenFile = (PDFlibFuncType65)AttachFunction("DLSetOutlineOpenFile");
		PDFlibSetOutlineStyle = (PDFlibFuncType81)AttachFunction("DLSetOutlineStyle");
		PDFlibSetOutlineTitle = (PDFlibFuncType65)AttachFunction("DLSetOutlineTitle");
		PDFlibSetOutlineWebLink = (PDFlibFuncType65)AttachFunction("DLSetOutlineWebLink");
		PDFlibSetPNGTransparencyColor = (PDFlibFuncType81)AttachFunction("DLSetPNGTransparencyColor");
		PDFlibSetPageActionMenu = (PDFlibFuncType23)AttachFunction("DLSetPageActionMenu");
		PDFlibSetPageContent = (PDFlibFuncType23)AttachFunction("DLSetPageContent");
		PDFlibSetPageDimensions = (PDFlibFuncType40)AttachFunction("DLSetPageDimensions");
		PDFlibSetPageLayout = (PDFlibFuncType64)AttachFunction("DLSetPageLayout");
		PDFlibSetPageMode = (PDFlibFuncType64)AttachFunction("DLSetPageMode");
		PDFlibSetPageSize = (PDFlibFuncType23)AttachFunction("DLSetPageSize");
		PDFlibSetPageThumbnail = (PDFlibFuncType22)AttachFunction("DLSetPageThumbnail");
		PDFlibSetPageTransparencyGroup = (PDFlibFuncType81)AttachFunction("DLSetPageTransparencyGroup");
		PDFlibSetPassword = (PDFlibFuncType23)AttachFunction("DLSetPassword");
		PDFlibSetPrecision = (PDFlibFuncType64)AttachFunction("DLSetPrecision");
		PDFlibSetScale = (PDFlibFuncType38)AttachFunction("DLSetScale");
		PDFlibSetTableBorderColor = (PDFlibFuncType78)AttachFunction("DLSetTableBorderColor");
		PDFlibSetTableBorderColorCMYK = (PDFlibFuncType79)AttachFunction("DLSetTableBorderColorCMYK");
		PDFlibSetTableBorderWidth = (PDFlibFuncType76)AttachFunction("DLSetTableBorderWidth");
		PDFlibSetTableCellAlignment = (PDFlibFuncType92)AttachFunction("DLSetTableCellAlignment");
		PDFlibSetTableCellBackgroundColor = (PDFlibFuncType90)AttachFunction("DLSetTableCellBackgroundColor");
		PDFlibSetTableCellBackgroundColorCMYK = (PDFlibFuncType91)AttachFunction("DLSetTableCellBackgroundColorCMYK");
		PDFlibSetTableCellBorderColor = (PDFlibFuncType94)AttachFunction("DLSetTableCellBorderColor");
		PDFlibSetTableCellBorderColorCMYK = (PDFlibFuncType95)AttachFunction("DLSetTableCellBorderColorCMYK");
		PDFlibSetTableCellBorderWidth = (PDFlibFuncType93)AttachFunction("DLSetTableCellBorderWidth");
		PDFlibSetTableCellContent = (PDFlibFuncType82)AttachFunction("DLSetTableCellContent");
		PDFlibSetTableCellPadding = (PDFlibFuncType93)AttachFunction("DLSetTableCellPadding");
		PDFlibSetTableCellTextColor = (PDFlibFuncType90)AttachFunction("DLSetTableCellTextColor");
		PDFlibSetTableCellTextColorCMYK = (PDFlibFuncType91)AttachFunction("DLSetTableCellTextColorCMYK");
		PDFlibSetTableCellTextSize = (PDFlibFuncType89)AttachFunction("DLSetTableCellTextSize");
		PDFlibSetTableColumnWidth = (PDFlibFuncType83)AttachFunction("DLSetTableColumnWidth");
		PDFlibSetTableRowHeight = (PDFlibFuncType83)AttachFunction("DLSetTableRowHeight");
		PDFlibSetTempFile = (PDFlibFuncType23)AttachFunction("DLSetTempFile");
		PDFlibSetTempPath = (PDFlibFuncType23)AttachFunction("DLSetTempPath");
		PDFlibSetTextAlign = (PDFlibFuncType64)AttachFunction("DLSetTextAlign");
		PDFlibSetTextCharSpacing = (PDFlibFuncType38)AttachFunction("DLSetTextCharSpacing");
		PDFlibSetTextColor = (PDFlibFuncType43)AttachFunction("DLSetTextColor");
		PDFlibSetTextColorCMYK = (PDFlibFuncType46)AttachFunction("DLSetTextColorCMYK");
		PDFlibSetTextColorSep = (PDFlibFuncType30)AttachFunction("DLSetTextColorSep");
		PDFlibSetTextHighlight = (PDFlibFuncType64)AttachFunction("DLSetTextHighlight");
		PDFlibSetTextHighlightColor = (PDFlibFuncType43)AttachFunction("DLSetTextHighlightColor");
		PDFlibSetTextHighlightColorCMYK = (PDFlibFuncType46)AttachFunction("DLSetTextHighlightColorCMYK");
		PDFlibSetTextHighlightColorSep = (PDFlibFuncType30)AttachFunction("DLSetTextHighlightColorSep");
		PDFlibSetTextMode = (PDFlibFuncType64)AttachFunction("DLSetTextMode");
		PDFlibSetTextRise = (PDFlibFuncType38)AttachFunction("DLSetTextRise");
		PDFlibSetTextScaling = (PDFlibFuncType38)AttachFunction("DLSetTextScaling");
		PDFlibSetTextShader = (PDFlibFuncType23)AttachFunction("DLSetTextShader");
		PDFlibSetTextSize = (PDFlibFuncType38)AttachFunction("DLSetTextSize");
		PDFlibSetTextSpacing = (PDFlibFuncType38)AttachFunction("DLSetTextSpacing");
		PDFlibSetTextUnderline = (PDFlibFuncType64)AttachFunction("DLSetTextUnderline");
		PDFlibSetTextUnderlineColor = (PDFlibFuncType43)AttachFunction("DLSetTextUnderlineColor");
		PDFlibSetTextUnderlineColorCMYK = (PDFlibFuncType46)AttachFunction("DLSetTextUnderlineColorCMYK");
		PDFlibSetTextUnderlineColorSep = (PDFlibFuncType30)AttachFunction("DLSetTextUnderlineColorSep");
		PDFlibSetTextUnderlineDash = (PDFlibFuncType40)AttachFunction("DLSetTextUnderlineDash");
		PDFlibSetTextWordSpacing = (PDFlibFuncType38)AttachFunction("DLSetTextWordSpacing");
		PDFlibSetTransparency = (PDFlibFuncType64)AttachFunction("DLSetTransparency");
		PDFlibSetViewerPreferences = (PDFlibFuncType74)AttachFunction("DLSetViewerPreferences");
		PDFlibSetXFAFormFieldAccess = (PDFlibFuncType34)AttachFunction("DLSetXFAFormFieldAccess");
		PDFlibSetXFAFormFieldBorderColor = (PDFlibFuncType31)AttachFunction("DLSetXFAFormFieldBorderColor");
		PDFlibSetXFAFormFieldBorderPresence = (PDFlibFuncType34)AttachFunction("DLSetXFAFormFieldBorderPresence");
		PDFlibSetXFAFormFieldBorderWidth = (PDFlibFuncType30)AttachFunction("DLSetXFAFormFieldBorderWidth");
		PDFlibSetXFAFormFieldValue = (PDFlibFuncType24)AttachFunction("DLSetXFAFormFieldValue");
		PDFlibSetupPrinter = (PDFlibFuncType36)AttachFunction("DLSetupPrinter");
		PDFlibSignFile = (PDFlibFuncType26)AttachFunction("DLSignFile");
		PDFlibSplitPageText = (PDFlibFuncType64)AttachFunction("DLSplitPageText");
		PDFlibStartPath = (PDFlibFuncType40)AttachFunction("DLStartPath");
		PDFlibStoreCustomDataFromFile = (PDFlibFuncType29)AttachFunction("DLStoreCustomDataFromFile");
		PDFlibStoreCustomDataFromString = (PDFlibFuncType29)AttachFunction("DLStoreCustomDataFromString");
		PDFlibStringResultLength = (PDFlibFuncType22)AttachFunction("DLStringResultLength");
		PDFlibTestTempPath = (PDFlibFuncType22)AttachFunction("DLTestTempPath");
		PDFlibToPDFUnicode = (PDFlibFuncType2)AttachFunction("DLToPDFUnicode");
		PDFlibUpdateAppearanceStream = (PDFlibFuncType64)AttachFunction("DLUpdateAppearanceStream");
		PDFlibUseKerning = (PDFlibFuncType64)AttachFunction("DLUseKerning");
		PDFlibUseUnsafeLayers = (PDFlibFuncType64)AttachFunction("DLUseUnsafeLayers");
		instanceID = PDFlibCreateLibrary();
	}
	else
	{
		loadError = true;
	}
}

PDFlibDLL::~PDFlibDLL()
{
	if (instanceID > 0)
	{
		PDFlibReleaseLibrary(instanceID);
	}
	if (dllHandle > 0)
	{
		FreeLibrary(dllHandle);
		dllHandle = 0;
	}
}

char* PDFlibDLL::StringParm(const std::string& strParm, int& sb)
{
	char* sp;
	int pl;
	if (strParm.find("\0") == std::string::npos)
	{
		sp = (char*)strParm.c_str();
		sb = 0;
	} else
	{
		sb = 1;
		pl = (int)strParm.length();
		sp = PDFlibCreateBuffer(instanceID, pl);
		PDFlibAddToBuffer(instanceID, sp, (char*)strParm.c_str(), pl);
	}
	return sp;
}

int PDFlibDLL::AddArcToPath(double CenterX, double CenterY, double TotalAngle)
{
	return PDFlibAddArcToPath(instanceID, CenterX, CenterY, TotalAngle);
}

int PDFlibDLL::AddCJKFont(int CJKFontID)
{
	return PDFlibAddCJKFont(instanceID, CJKFontID);
}

int PDFlibDLL::AddCurveToPath(double CtAX, double CtAY, double CtBX, double CtBY, double EndX, double EndY)
{
	return PDFlibAddCurveToPath(instanceID, CtAX, CtAY, CtBX, CtBY, EndX, 
		EndY);
}

int PDFlibDLL::AddEmbeddedFile(const std::string& FileName, const std::string& MIMEType)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int sb2;
	char* sp2 = StringParm(MIMEType, sb2);
	int result;
	result = PDFlibAddEmbFile(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::AddFileAttachment(const std::string& Title, int EmbeddedFileID)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int result;
	result = PDFlibAddFileAttachment(instanceID, sp1, EmbeddedFileID);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddFormFieldSub(int Index, const std::string& SubName)
{
	int sb1;
	char* sp1 = StringParm(SubName, sb1);
	int result;
	result = PDFlibAddFormFieldSub(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddFormFont(int FontID)
{
	return PDFlibAddFormFont(instanceID, FontID);
}

int PDFlibDLL::AddGlobalJavaScript(const std::string& PackageName, const std::string& JavaScript)
{
	int sb1;
	char* sp1 = StringParm(PackageName, sb1);
	int sb2;
	char* sp2 = StringParm(JavaScript, sb2);
	int result;
	result = PDFlibAddGlobalJScript(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::AddImageFromFile(const std::string& FileName, int Options)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibAddImageFromFile(instanceID, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddImageFromFileOffset(const std::string& FileName, int Offset, int DataLength, int Options)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibAddImageFromFileOffset(instanceID, sp1, Offset, 
		DataLength, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddImageFromString(const std::string& Source, int Options)
{
	int sb1;
	char* sp1 = StringParm(Source, sb1);
	int result;
	result = PDFlibAddImageFromString(instanceID, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddLGIDictToPage(const std::string& DictContent)
{
	int sb1;
	char* sp1 = StringParm(DictContent, sb1);
	int result;
	result = PDFlibAddLGIDictToPage(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddLineToPath(double EndX, double EndY)
{
	return PDFlibAddLineToPath(instanceID, EndX, EndY);
}

int PDFlibDLL::AddLinkToEmbeddedFile(double Left, double Top, double Width, double Height, int EmbeddedFileID, const std::string& Title, int Options)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int result;
	result = PDFlibAddLinkToEmbFile(instanceID, Left, Top, Width, 
		Height, EmbeddedFileID, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddLinkToFile(double Left, double Top, double Width, double Height, const std::string& FileName, int Page, double Position, int NewWindow, int Options)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibAddLinkToFile(instanceID, Left, Top, Width, Height, sp1, 
		Page, Position, NewWindow, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddLinkToJavaScript(double Left, double Top, double Width, double Height, const std::string& JavaScript, int Options)
{
	int sb1;
	char* sp1 = StringParm(JavaScript, sb1);
	int result;
	result = PDFlibAddLinkToJScript(instanceID, Left, Top, Width, 
		Height, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddLinkToPage(double Left, double Top, double Width, double Height, int Page, double Position, int Options)
{
	return PDFlibAddLinkToPage(instanceID, Left, Top, Width, Height, Page, 
		Position, Options);
}

int PDFlibDLL::AddLinkToWeb(double Left, double Top, double Width, double Height, const std::string& Link, int Options)
{
	int sb1;
	char* sp1 = StringParm(Link, sb1);
	int result;
	result = PDFlibAddLinkToWeb(instanceID, Left, Top, Width, Height, sp1, 
		Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddNoteAnnotation(double Left, double Top, int AnnotType, double PopupLeft, double PopupTop, double PopupWidth, double PopupHeight, const std::string& Title, const std::string& Contents, double Red, double Green, double Blue, int Open)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int sb2;
	char* sp2 = StringParm(Contents, sb2);
	int result;
	result = PDFlibAddNoteAnnot(instanceID, Left, Top, AnnotType, 
		PopupLeft, PopupTop, PopupWidth, PopupHeight, sp1, sp2, Red, Green, 
		Blue, Open);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::AddPageLabels(int Start, int Style, int Offset, const std::string& Prefix)
{
	int sb1;
	char* sp1 = StringParm(Prefix, sb1);
	int result;
	result = PDFlibAddPageLabels(instanceID, Start, Style, Offset, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddSVGAnnotationFromFile(double Left, double Top, double Width, double Height, const std::string& FileName, int Options)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibAddSVGAnnotFromFile(instanceID, Left, Top, Width, 
		Height, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddSeparationColor(const std::string& ColorName, double C, double M, double Y, double K, int Options)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibAddSeparationColor(instanceID, sp1, C, M, Y, K, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddStandardFont(int StandardFontID)
{
	return PDFlibAddStandardFont(instanceID, StandardFontID);
}

int PDFlibDLL::AddSubsettedFont(const std::string& FontName, int CharSet, const std::string& SubsetChars)
{
	int sb1;
	char* sp1 = StringParm(FontName, sb1);
	int sb2;
	char* sp2 = StringParm(SubsetChars, sb2);
	int result;
	result = PDFlibAddSubsettedFont(instanceID, sp1, CharSet, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::AddToFileList(const std::string& ListName, const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(ListName, sb1);
	int sb2;
	char* sp2 = StringParm(FileName, sb2);
	int result;
	result = PDFlibAddToFileList(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::AddTrueTypeFont(const std::string& FontName, int Embed)
{
	int sb1;
	char* sp1 = StringParm(FontName, sb1);
	int result;
	result = PDFlibAddTTF(instanceID, sp1, Embed);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddTrueTypeFontFromFile(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibAddTTFFromFile(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddType1Font(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibAddT1Font(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AddU3DAnnotationFromFile(double Left, double Top, double Width, double Height, const std::string& FileName, int Options)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibAddU3DAnnotFromFile(instanceID, Left, Top, Width, 
		Height, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::AnalyseFile(const std::string& InputFileName, const std::string& Password)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(Password, sb2);
	int result;
	result = PDFlibAnalyseFile(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::AnnotationCount()
{
	return PDFlibAnnotCount(instanceID);
}

int PDFlibDLL::AppendSpace(double RelativeSpace)
{
	return PDFlibAppendSpace(instanceID, RelativeSpace);
}

int PDFlibDLL::AppendTableColumns(int TableID, int NewColumnCount)
{
	return PDFlibAppendTableCol(instanceID, TableID, NewColumnCount);
}

int PDFlibDLL::AppendTableRows(int TableID, int NewRowCount)
{
	return PDFlibAppendTableRow(instanceID, TableID, NewRowCount);
}

int PDFlibDLL::AppendText(const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibAppendText(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::ApplyStyle(const std::string& StyleName)
{
	int sb1;
	char* sp1 = StringParm(StyleName, sb1);
	int result;
	result = PDFlibApplyStyle(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::BeginPageUpdate()
{
	return PDFlibBeginPageUpdate(instanceID);
}

int PDFlibDLL::CapturePage(int Page)
{
	return PDFlibCapturePage(instanceID, Page);
}

int PDFlibDLL::CapturePageEx(int Page, int Options)
{
	return PDFlibCapturePageEx(instanceID, Page, Options);
}

int PDFlibDLL::CharWidth(int CharCode)
{
	return PDFlibCharWidth(instanceID, CharCode);
}

int PDFlibDLL::CheckObjects()
{
	return PDFlibCheckObject(instanceID);
}

int PDFlibDLL::CheckPageAnnots()
{
	return PDFlibCheckPageAnnot(instanceID);
}

int PDFlibDLL::ClearFileList(const std::string& ListName)
{
	int sb1;
	char* sp1 = StringParm(ListName, sb1);
	int result;
	result = PDFlibClearFileList(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::ClearPageLabels()
{
	return PDFlibClearPageLabel(instanceID);
}

int PDFlibDLL::ClearTextFormatting()
{
	return PDFlibClearTextFormat(instanceID);
}

int PDFlibDLL::CloneOutlineAction(int OutlineID)
{
	return PDFlibCloneOutlineAct(instanceID, OutlineID);
}

int PDFlibDLL::ClonePages(int StartPage, int EndPage, int RepeatCount)
{
	return PDFlibClonePages(instanceID, StartPage, EndPage, RepeatCount);
}

int PDFlibDLL::CloseOutline(int OutlineID)
{
	return PDFlibCloseOutline(instanceID, OutlineID);
}

int PDFlibDLL::ClosePath()
{
	return PDFlibClosePath(instanceID);
}

int PDFlibDLL::CombineLayers()
{
	return PDFlibCombineLayer(instanceID);
}

int PDFlibDLL::CompressContent()
{
	return PDFlibCompressContent(instanceID);
}

int PDFlibDLL::CompressFonts(int Compress)
{
	return PDFlibCompressFont(instanceID, Compress);
}

int PDFlibDLL::CompressImages(int Compress)
{
	return PDFlibCompressImage(instanceID, Compress);
}

int PDFlibDLL::CompressPage()
{
	return PDFlibCompressPage(instanceID);
}

int PDFlibDLL::CopyPageRanges(int DocumentID, const std::string& RangeList)
{
	int sb1;
	char* sp1 = StringParm(RangeList, sb1);
	int result;
	result = PDFlibCopyPageRange(instanceID, DocumentID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::CreateTable(int RowCount, int ColumnCount)
{
	return PDFlibCreateTable(instanceID, RowCount, ColumnCount);
}

int PDFlibDLL::DAAppendFile(int FileHandle)
{
	return PDFlibDAAppendFile(instanceID, FileHandle);
}

int PDFlibDLL::DACapturePage(int FileHandle, int PageRef)
{
	return PDFlibDACapturePage(instanceID, FileHandle, PageRef);
}

int PDFlibDLL::DACapturePageEx(int FileHandle, int PageRef, int Options)
{
	return PDFlibDACapturePageEx(instanceID, FileHandle, PageRef, Options);
}

int PDFlibDLL::DACloseFile(int FileHandle)
{
	return PDFlibDACloseFile(instanceID, FileHandle);
}

int PDFlibDLL::DADrawCapturedPage(int FileHandle, int DACaptureID, int DestPageRef, double PntLeft, double PntBottom, double PntWidth, double PntHeight)
{
	return PDFlibDADrawCapturedPage(instanceID, FileHandle, DACaptureID, 
		DestPageRef, PntLeft, PntBottom, PntWidth, PntHeight);
}

std::string PDFlibDLL::DAExtractPageText(int FileHandle, int PageRef, int Options)
{
	char* result;
	result = PDFlibDAExtractPageText(instanceID, FileHandle, PageRef, 
		Options);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::DAFindPage(int FileHandle, int Page)
{
	return PDFlibDAFindPage(instanceID, FileHandle, Page);
}

int PDFlibDLL::DAGetFormFieldCount(int FileHandle)
{
	return PDFlibDAGetFormFieldCount(instanceID, FileHandle);
}

std::string PDFlibDLL::DAGetFormFieldTitle(int FileHandle, int FieldIndex)
{
	char* result;
	result = PDFlibDAGetFormFieldTitle(instanceID, FileHandle, FieldIndex);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::DAGetFormFieldValue(int FileHandle, int FieldIndex)
{
	char* result;
	result = PDFlibDAGetFormFieldValue(instanceID, FileHandle, FieldIndex);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::DAGetImageDataToString(int FileHandle, int ImageListID, int ImageIndex)
{
	char* result;
	result = PDFlibDAGetImgToString(instanceID, FileHandle, 
		ImageListID, ImageIndex);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

double PDFlibDLL::DAGetImageDblProperty(int FileHandle, int ImageListID, int ImageIndex, int PropertyID)
{
	return PDFlibDAGetImgDblProp(instanceID, FileHandle, ImageListID, 
		ImageIndex, PropertyID);
}

int PDFlibDLL::DAGetImageIntProperty(int FileHandle, int ImageListID, int ImageIndex, int PropertyID)
{
	return PDFlibDAGetImgIntProp(instanceID, FileHandle, ImageListID, 
		ImageIndex, PropertyID);
}

int PDFlibDLL::DAGetImageListCount(int FileHandle, int ImageListID)
{
	return PDFlibDAGetImgListCount(instanceID, FileHandle, ImageListID);
}

std::string PDFlibDLL::DAGetInformation(int FileHandle, const std::string& Key)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	char* result;
	result = PDFlibDAGetInfo(instanceID, FileHandle, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::DAGetObjectCount(int FileHandle)
{
	return PDFlibDAGetObjCount(instanceID, FileHandle);
}

std::string PDFlibDLL::DAGetObjectSource(int FileHandle, int ObjectNumber)
{
	char* result;
	result = PDFlibDAGetObjSource(instanceID, FileHandle, ObjectNumber);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::DAGetPageContent(int FileHandle, int PageRef)
{
	char* result;
	result = PDFlibDAGetPageContent(instanceID, FileHandle, PageRef);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::DAGetPageCount(int FileHandle)
{
	return PDFlibDAGetPageCount(instanceID, FileHandle);
}

double PDFlibDLL::DAGetPageHeight(int FileHandle, int PageRef)
{
	return PDFlibDAGetPageHeight(instanceID, FileHandle, PageRef);
}

int PDFlibDLL::DAGetPageImageList(int FileHandle, int PageRef)
{
	return PDFlibDAGetPageImgList(instanceID, FileHandle, PageRef);
}

double PDFlibDLL::DAGetPageWidth(int FileHandle, int PageRef)
{
	return PDFlibDAGetPageWidth(instanceID, FileHandle, PageRef);
}

int PDFlibDLL::DAHidePage(int FileHandle, int PageRef)
{
	return PDFlibDAHidePage(instanceID, FileHandle, PageRef);
}

int PDFlibDLL::DAMovePage(int FileHandle, int PageRef, int TargetPageRef, int Options)
{
	return PDFlibDAMovePage(instanceID, FileHandle, PageRef, TargetPageRef, 
		Options);
}

int PDFlibDLL::DANewPage(int FileHandle)
{
	return PDFlibDANewPage(instanceID, FileHandle);
}

int PDFlibDLL::DANewPages(int FileHandle, int PageCount)
{
	return PDFlibDANewPages(instanceID, FileHandle, PageCount);
}

int PDFlibDLL::DAOpenFile(const std::string& InputFileName, const std::string& Password)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(Password, sb2);
	int result;
	result = PDFlibDAOpenFile(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::DAOpenFileReadOnly(const std::string& InputFileName, const std::string& Password)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(Password, sb2);
	int result;
	result = PDFlibDAOpenFileRO(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::DAPageRotation(int FileHandle, int PageRef)
{
	return PDFlibDAPageRot(instanceID, FileHandle, PageRef);
}

int PDFlibDLL::DARenderPageToDC(int FileHandle, int PageRef, int DPI, int DC)
{
	return PDFlibDARenderToDC(instanceID, FileHandle, PageRef, DPI, DC);
}

int PDFlibDLL::DARenderPageToFile(int FileHandle, int PageRef, int Options, int DPI, const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibDARenderToFile(instanceID, FileHandle, PageRef, 
		Options, DPI, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

std::string PDFlibDLL::DARenderPageToString(int FileHandle, int PageRef, int Options, int DPI)
{
	char* result;
	result = PDFlibDARenderToString(instanceID, FileHandle, PageRef, 
		Options, DPI);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::DARotatePage(int FileHandle, int PageRef, int Angle, int Options)
{
	return PDFlibDARotPage(instanceID, FileHandle, PageRef, Angle, 
		Options);
}

int PDFlibDLL::DASaveAsFile(int FileHandle, const std::string& OutputFileName)
{
	int sb1;
	char* sp1 = StringParm(OutputFileName, sb1);
	int result;
	result = PDFlibDASaveAsFile(instanceID, FileHandle, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DASaveImageDataToFile(int FileHandle, int ImageListID, int ImageIndex, const std::string& ImageFileName)
{
	int sb1;
	char* sp1 = StringParm(ImageFileName, sb1);
	int result;
	result = PDFlibDASaveImgToFile(instanceID, FileHandle, 
		ImageListID, ImageIndex, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DASetInformation(int FileHandle, const std::string& Key, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	int sb2;
	char* sp2 = StringParm(NewValue, sb2);
	int result;
	result = PDFlibDASetInfo(instanceID, FileHandle, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::DASetPageSize(int FileHandle, int PageRef, double PntWidth, double PntHeight)
{
	return PDFlibDASetPageSize(instanceID, FileHandle, PageRef, PntWidth, 
		PntHeight);
}

int PDFlibDLL::Decrypt()
{
	return PDFlibDecrypt(instanceID);
}

int PDFlibDLL::DecryptFile(const std::string& InputFileName, const std::string& OutputFileName, const std::string& Password)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(OutputFileName, sb2);
	int sb3;
	char* sp3 = StringParm(Password, sb3);
	int result;
	result = PDFlibDecryptFile(instanceID, sp1, sp2, sp3);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	if (sb3 == 1) PDFlibReleaseBuffer(instanceID, sp3);
	return result;
}

int PDFlibDLL::DeleteAnalysis(int AnalysisID)
{
	return PDFlibDeleteAnalysis(instanceID, AnalysisID);
}

int PDFlibDLL::DeleteAnnotation(int Index)
{
	return PDFlibDeleteAnnot(instanceID, Index);
}

int PDFlibDLL::DeleteFormField(int Index)
{
	return PDFlibDeleteFormField(instanceID, Index);
}

int PDFlibDLL::DeleteLayer()
{
	return PDFlibDeleteLayer(instanceID);
}

int PDFlibDLL::DeleteOptionalContentGroup(int OptionalContentGroupID)
{
	return PDFlibDeleteOptContGroup(instanceID, 
		OptionalContentGroupID);
}

int PDFlibDLL::DeletePageLGIDict(int DictIndex)
{
	return PDFlibDeletePageLGIDict(instanceID, DictIndex);
}

int PDFlibDLL::DeletePages(int StartPage, int PageCount)
{
	return PDFlibDeletePages(instanceID, StartPage, PageCount);
}

int PDFlibDLL::DocJavaScriptAction(const std::string& ActionType, const std::string& JavaScript)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	int sb2;
	char* sp2 = StringParm(JavaScript, sb2);
	int result;
	result = PDFlibDocJsAction(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::DocumentCount()
{
	return PDFlibDocCount(instanceID);
}

int PDFlibDLL::DrawArc(double XPos, double YPos, double Radius, double StartAngle, double EndAngle, int Pie, int DrawOptions)
{
	return PDFlibDrawArc(instanceID, XPos, YPos, Radius, StartAngle, 
		EndAngle, Pie, DrawOptions);
}

int PDFlibDLL::DrawBarcode(double Left, double Top, double Width, double Height, const std::string& Text, int Barcode, int Options)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawBarcode(instanceID, Left, Top, Width, Height, sp1, 
		Barcode, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DrawBox(double Left, double Top, double Width, double Height, int DrawOptions)
{
	return PDFlibDrawBox(instanceID, Left, Top, Width, Height, DrawOptions);
}

int PDFlibDLL::DrawCapturedPage(int CaptureID, double Left, double Top, double Width, double Height)
{
	return PDFlibDrawCaptPage(instanceID, CaptureID, Left, Top, Width, 
		Height);
}

int PDFlibDLL::DrawCircle(double XPos, double YPos, double Radius, int DrawOptions)
{
	return PDFlibDrawCircle(instanceID, XPos, YPos, Radius, DrawOptions);
}

int PDFlibDLL::DrawDataMatrixSymbol(double Left, double Top, double ModuleSize, const std::string& Text, int Encoding, int SymbolSize, int Options)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawDataMatrixSymbol(instanceID, Left, Top, ModuleSize, 
		sp1, Encoding, SymbolSize, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DrawEllipse(double XPos, double YPos, double Width, double Height, int DrawOptions)
{
	return PDFlibDrawEllipse(instanceID, XPos, YPos, Width, Height, 
		DrawOptions);
}

int PDFlibDLL::DrawEllipticArc(double XPos, double YPos, double Width, double Height, double StartAngle, double EndAngle, int Pie, int DrawOptions)
{
	return PDFlibDrawEllipticArc(instanceID, XPos, YPos, Width, Height, 
		StartAngle, EndAngle, Pie, DrawOptions);
}

int PDFlibDLL::DrawHTMLText(double Left, double Top, double Width, const std::string& HTMLText)
{
	int sb1;
	char* sp1 = StringParm(HTMLText, sb1);
	int result;
	result = PDFlibDrawHTMLText(instanceID, Left, Top, Width, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

std::string PDFlibDLL::DrawHTMLTextBox(double Left, double Top, double Width, double Height, const std::string& HTMLText)
{
	int sb1;
	char* sp1 = StringParm(HTMLText, sb1);
	char* result;
	result = PDFlibDrawHTMLTextBox(instanceID, Left, Top, Width, Height, 
		sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::DrawImage(double Left, double Top, double Width, double Height)
{
	return PDFlibDrawImg(instanceID, Left, Top, Width, Height);
}

int PDFlibDLL::DrawLine(double StartX, double StartY, double EndX, double EndY)
{
	return PDFlibDrawLine(instanceID, StartX, StartY, EndX, EndY);
}

int PDFlibDLL::DrawMultiLineText(double XPos, double YPos, const std::string& Delimiter, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Delimiter, sb1);
	int sb2;
	char* sp2 = StringParm(Text, sb2);
	int result;
	result = PDFlibDrawMultiLineText(instanceID, XPos, YPos, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::DrawPath(int PathOptions)
{
	return PDFlibDrawPath(instanceID, PathOptions);
}

int PDFlibDLL::DrawPathEvenOdd(int PathOptions)
{
	return PDFlibDrawPathEvenOdd(instanceID, PathOptions);
}

int PDFlibDLL::DrawPostScriptXObject(int PSRef)
{
	return PDFlibDrawPsXObject(instanceID, PSRef);
}

int PDFlibDLL::DrawRotatedCapturedPage(int CaptureID, double Left, double Bottom, double Width, double Height, double Angle)
{
	return PDFlibDrawRotCaptPage(instanceID, CaptureID, Left, 
		Bottom, Width, Height, Angle);
}

int PDFlibDLL::DrawRotatedImage(double Left, double Bottom, double Width, double Height, double Angle)
{
	return PDFlibDrawRotImg(instanceID, Left, Bottom, Width, Height, 
		Angle);
}

int PDFlibDLL::DrawRotatedText(double XPos, double YPos, double Angle, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawRotText(instanceID, XPos, YPos, Angle, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DrawRotatedTextBox(double Left, double Top, double Width, double Height, double Angle, const std::string& Text, int Options)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawRotTextBox(instanceID, Left, Top, Width, Height, 
		Angle, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DrawRoundedBox(double Left, double Top, double Width, double Height, double Radius, int DrawOptions)
{
	return PDFlibDrawRoundBox(instanceID, Left, Top, Width, Height, 
		Radius, DrawOptions);
}

int PDFlibDLL::DrawScaledImage(double Left, double Top, double Scale)
{
	return PDFlibDrawScaledImg(instanceID, Left, Top, Scale);
}

int PDFlibDLL::DrawSpacedText(double XPos, double YPos, double Spacing, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawSpacedText(instanceID, XPos, YPos, Spacing, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

double PDFlibDLL::DrawTableRows(int TableID, double Left, double Top, double Height, int FirstRow, int LastRow)
{
	return PDFlibDrawTableRow(instanceID, TableID, Left, Top, Height, 
		FirstRow, LastRow);
}

int PDFlibDLL::DrawText(double XPos, double YPos, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawText(instanceID, XPos, YPos, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DrawTextArc(double XPos, double YPos, double Radius, double Angle, const std::string& Text, int DrawOptions)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawTextArc(instanceID, XPos, YPos, Radius, Angle, sp1, 
		DrawOptions);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DrawTextBox(double Left, double Top, double Width, double Height, const std::string& Text, int Options)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawTextBox(instanceID, Left, Top, Width, Height, sp1, 
		Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::DrawWrappedText(double XPos, double YPos, double Width, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibDrawWrappedText(instanceID, XPos, YPos, Width, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::EditableLayer()
{
	return PDFlibEditableLayer(instanceID);
}

int PDFlibDLL::EmbedFile(const std::string& Title, const std::string& FileName, const std::string& MIMEType)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int sb2;
	char* sp2 = StringParm(FileName, sb2);
	int sb3;
	char* sp3 = StringParm(MIMEType, sb3);
	int result;
	result = PDFlibEmbFile(instanceID, sp1, sp2, sp3);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	if (sb3 == 1) PDFlibReleaseBuffer(instanceID, sp3);
	return result;
}

int PDFlibDLL::EmbeddedFileCount()
{
	return PDFlibEmbFileCount(instanceID);
}

int PDFlibDLL::EncapsulateLayer()
{
	return PDFlibEncapsulateLayer(instanceID);
}

int PDFlibDLL::EncodePermissions(int CanPrint, int CanCopy, int CanChange, int CanAddNotes, int CanFillFields, int CanCopyAccess, int CanAssemble, int CanPrintFull)
{
	return PDFlibEncodePermissions(instanceID, CanPrint, CanCopy, 
		CanChange, CanAddNotes, CanFillFields, CanCopyAccess, CanAssemble, 
		CanPrintFull);
}

int PDFlibDLL::Encrypt(const std::string& Owner, const std::string& User, int Strength, int Permissions)
{
	int sb1;
	char* sp1 = StringParm(Owner, sb1);
	int sb2;
	char* sp2 = StringParm(User, sb2);
	int result;
	result = PDFlibEncrypt(instanceID, sp1, sp2, Strength, Permissions);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::EncryptFile(const std::string& InputFileName, const std::string& OutputFileName, const std::string& Owner, const std::string& User, int Strength, int Permissions)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(OutputFileName, sb2);
	int sb3;
	char* sp3 = StringParm(Owner, sb3);
	int sb4;
	char* sp4 = StringParm(User, sb4);
	int result;
	result = PDFlibEncryptFile(instanceID, sp1, sp2, sp3, sp4, Strength, 
		Permissions);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	if (sb3 == 1) PDFlibReleaseBuffer(instanceID, sp3);
	if (sb4 == 1) PDFlibReleaseBuffer(instanceID, sp4);
	return result;
}

int PDFlibDLL::EncryptWithFingerprint(const std::string& Fingerprint)
{
	int sb1;
	char* sp1 = StringParm(Fingerprint, sb1);
	int result;
	result = PDFlibEncryptWithFingerprint(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::EncryptionAlgorithm()
{
	return PDFlibEncryptionAlgorithm(instanceID);
}

int PDFlibDLL::EncryptionStatus()
{
	return PDFlibEncryptionStatus(instanceID);
}

int PDFlibDLL::EncryptionStrength()
{
	return PDFlibEncryptionStrength(instanceID);
}

int PDFlibDLL::EndPageUpdate()
{
	return PDFlibEndPageUpdate(instanceID);
}

std::string PDFlibDLL::ExtractFilePageContent(const std::string& InputFileName, const std::string& Password, int Page)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(Password, sb2);
	char* result;
	result = PDFlibExtractFilePageContent(instanceID, sp1, sp2, Page);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::ExtractFilePageText(const std::string& InputFileName, const std::string& Password, int Page, int Options)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(Password, sb2);
	char* result;
	result = PDFlibExtractFilePageText(instanceID, sp1, sp2, Page, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::ExtractFilePages(const std::string& InputFileName, const std::string& OutputFileName, const std::string& RangeList)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(OutputFileName, sb2);
	int sb3;
	char* sp3 = StringParm(RangeList, sb3);
	int result;
	result = PDFlibExtractFilePages(instanceID, sp1, sp2, sp3);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	if (sb3 == 1) PDFlibReleaseBuffer(instanceID, sp3);
	return result;
}

int PDFlibDLL::ExtractPageRanges(const std::string& RangeList)
{
	int sb1;
	char* sp1 = StringParm(RangeList, sb1);
	int result;
	result = PDFlibExtractPageRanges(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::ExtractPages(int StartPage, int PageCount)
{
	return PDFlibExtractPages(instanceID, StartPage, PageCount);
}

int PDFlibDLL::FileListCount(const std::string& ListName)
{
	int sb1;
	char* sp1 = StringParm(ListName, sb1);
	int result;
	result = PDFlibFileListCount(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

std::string PDFlibDLL::FileListItem(const std::string& ListName, int Index)
{
	int sb1;
	char* sp1 = StringParm(ListName, sb1);
	char* result;
	result = PDFlibFileListItem(instanceID, sp1, Index);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::FindFonts()
{
	return PDFlibFindFonts(instanceID);
}

int PDFlibDLL::FindFormFieldByTitle(const std::string& Title)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int result;
	result = PDFlibFindFormFieldByTitle(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::FindImages()
{
	return PDFlibFindImages(instanceID);
}

int PDFlibDLL::FitImage(double Left, double Top, double Width, double Height, int HAlign, int VAlign, int Rotate)
{
	return PDFlibFitImage(instanceID, Left, Top, Width, Height, HAlign, 
		VAlign, Rotate);
}

int PDFlibDLL::FitRotatedTextBox(double Left, double Top, double Width, double Height, double Angle, const std::string& Text, int Options)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibFitRotatedTextBox(instanceID, Left, Top, Width, Height, 
		Angle, sp1, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::FitTextBox(double Left, double Top, double Width, double Height, const std::string& Text, int Options)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibFitTextBox(instanceID, Left, Top, Width, Height, sp1, 
		Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::FlattenFormField(int Index)
{
	return PDFlibFlattenFormField(instanceID, Index);
}

int PDFlibDLL::FontCount()
{
	return PDFlibFontCount(instanceID);
}

std::string PDFlibDLL::FontFamily()
{
	char* result;
	result = PDFlibFontFamily(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::FontHasKerning()
{
	return PDFlibFontHasKerning(instanceID);
}

std::string PDFlibDLL::FontName()
{
	char* result;
	result = PDFlibFontName(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::FontReference()
{
	char* result;
	result = PDFlibFontReference(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::FontSize()
{
	return PDFlibFontSize(instanceID);
}

int PDFlibDLL::FontType()
{
	return PDFlibFontType(instanceID);
}

int PDFlibDLL::FormFieldCount()
{
	return PDFlibFormFieldCount(instanceID);
}

int PDFlibDLL::FormFieldHasParent(int Index)
{
	return PDFlibFormFieldHasParent(instanceID, Index);
}

int PDFlibDLL::FormFieldJavaScriptAction(int Index, const std::string& ActionType, const std::string& JavaScript)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	int sb2;
	char* sp2 = StringParm(JavaScript, sb2);
	int result;
	result = PDFlibFormFieldJScriptAction(instanceID, Index, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::FormFieldWebLinkAction(int Index, const std::string& ActionType, const std::string& Link)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	int sb2;
	char* sp2 = StringParm(Link, sb2);
	int result;
	result = PDFlibFormFieldWebLinkAction(instanceID, Index, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

std::string PDFlibDLL::GetActionType(int ActionID)
{
	char* result;
	result = PDFlibGetActionType(instanceID, ActionID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetAnalysisInfo(int AnalysisID, int AnalysisItem)
{
	char* result;
	result = PDFlibGetAnalysisInfo(instanceID, AnalysisID, AnalysisItem);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetAnnotActionID(int Index)
{
	return PDFlibGetAnnotActionID(instanceID, Index);
}

double PDFlibDLL::GetAnnotDblProperty(int Index, int Tag)
{
	return PDFlibGetAnnotDblProperty(instanceID, Index, Tag);
}

int PDFlibDLL::GetAnnotIntProperty(int Index, int Tag)
{
	return PDFlibGetAnnotIntProperty(instanceID, Index, Tag);
}

std::string PDFlibDLL::GetAnnotStrProperty(int Index, int Tag)
{
	char* result;
	result = PDFlibGetAnnotStrProperty(instanceID, Index, Tag);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

double PDFlibDLL::GetBarcodeWidth(double NominalWidth, const std::string& Text, int Barcode)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	double result;
	result = PDFlibGetBarcodeWidth(instanceID, NominalWidth, sp1, Barcode);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetCanvasDC(int Width, int Height)
{
	return PDFlibGetCanvasDC(instanceID, Width, Height);
}

std::string PDFlibDLL::GetCatalogInformation(const std::string& Key)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	char* result;
	result = PDFlibGetCatalogInfo(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetCustomInformation(const std::string& Key)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	char* result;
	result = PDFlibGetCustomInfo(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetCustomKeys(int Location)
{
	char* result;
	result = PDFlibGetCustomKeys(instanceID, Location);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetDefaultPrinterName()
{
	char* result;
	result = PDFlibGetDefaultPrinter(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetDestPage(int DestID)
{
	return PDFlibGetDestPage(instanceID, DestID);
}

int PDFlibDLL::GetDestType(int DestID)
{
	return PDFlibGetDestType(instanceID, DestID);
}

double PDFlibDLL::GetDestValue(int DestID, int ValueKey)
{
	return PDFlibGetDestValue(instanceID, DestID, ValueKey);
}

std::string PDFlibDLL::GetDocJavaScript(const std::string& ActionType)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	char* result;
	result = PDFlibGetDocJavaScript(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetDocumentID(int Index)
{
	return PDFlibGetDocID(instanceID, Index);
}

std::string PDFlibDLL::GetDocumentIdentifier(int Part, int Options)
{
	char* result;
	result = PDFlibGetDocIdentifier(instanceID, Part, Options);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetDocumentMetadata()
{
	char* result;
	result = PDFlibGetDocMetadata(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetDocumentResourceList()
{
	char* result;
	result = PDFlibGetDocResourceList(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetEmbeddedFileContentToFile(int Index, const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibGetEmbFileContToFile(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

std::string PDFlibDLL::GetEmbeddedFileContentToString(int Index)
{
	char* result;
	result = PDFlibGetEmbFileContToString(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetEmbeddedFileIntProperty(int Index, int Tag)
{
	return PDFlibGetEmbFileIntProp(instanceID, Index, Tag);
}

std::string PDFlibDLL::GetEmbeddedFileStrProperty(int Index, int Tag)
{
	char* result;
	result = PDFlibGetEmbFileStrProp(instanceID, Index, Tag);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetEncryptionFingerprint()
{
	char* result;
	result = PDFlibGetEncFingerprint(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetFileMetadata(const std::string& InputFileName)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	char* result;
	result = PDFlibGetFileMetadata(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFirstChildOutline(int OutlineID)
{
	return PDFlibGetFirstChildOutline(instanceID, OutlineID);
}

int PDFlibDLL::GetFirstOutline()
{
	return PDFlibGetFirstOutline(instanceID);
}

int PDFlibDLL::GetFontID(int Index)
{
	return PDFlibGetFontID(instanceID, Index);
}

int PDFlibDLL::GetFontObjectNumber()
{
	return PDFlibGetFontObjectNumber(instanceID);
}

int PDFlibDLL::GetFormFieldAlignment(int Index)
{
	return PDFlibGetFormFieldAlignment(instanceID, Index);
}

int PDFlibDLL::GetFormFieldAnnotFlags(int Index)
{
	return PDFlibGetFormFieldAnnotFlags(instanceID, Index);
}

double PDFlibDLL::GetFormFieldBackgroundColor(int Index, int ColorComponent)
{
	return PDFlibGetFormFieldBackgroundColor(instanceID, Index, 
		ColorComponent);
}

double PDFlibDLL::GetFormFieldBorderColor(int Index, int ColorComponent)
{
	return PDFlibGetFormFieldBorderColor(instanceID, Index, ColorComponent);
}

double PDFlibDLL::GetFormFieldBorderProperty(int Index, int PropKey)
{
	return PDFlibGetFormFieldBorderProperty(instanceID, Index, PropKey);
}

int PDFlibDLL::GetFormFieldBorderStyle(int Index)
{
	return PDFlibGetFormFieldBorderStyle(instanceID, Index);
}

double PDFlibDLL::GetFormFieldBound(int Index, int Edge)
{
	return PDFlibGetFormFieldBound(instanceID, Index, Edge);
}

std::string PDFlibDLL::GetFormFieldCaption(int Index)
{
	char* result;
	result = PDFlibGetFormFieldCaption(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetFormFieldChildTitle(int Index)
{
	char* result;
	result = PDFlibGetFormFieldChildTitle(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFormFieldChoiceType(int Index)
{
	return PDFlibGetFormFieldChoiceType(instanceID, Index);
}

double PDFlibDLL::GetFormFieldColor(int Index, int ColorComponent)
{
	return PDFlibGetFormFieldColor(instanceID, Index, ColorComponent);
}

int PDFlibDLL::GetFormFieldComb(int Index)
{
	return PDFlibGetFormFieldComb(instanceID, Index);
}

std::string PDFlibDLL::GetFormFieldDefaultValue(int Index)
{
	char* result;
	result = PDFlibGetFormFieldDefaultValue(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetFormFieldDescription(int Index)
{
	char* result;
	result = PDFlibGetFormFieldDescription(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFormFieldFlags(int Index)
{
	return PDFlibGetFormFieldFlags(instanceID, Index);
}

std::string PDFlibDLL::GetFormFieldFontName(int Index)
{
	char* result;
	result = PDFlibGetFormFieldFontName(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetFormFieldJavaScript(int Index, const std::string& ActionType)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	char* result;
	result = PDFlibGetFormFieldJavaScript(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFormFieldKidCount(int Index)
{
	return PDFlibGetFormFieldKidCount(instanceID, Index);
}

int PDFlibDLL::GetFormFieldMaxLen(int Index)
{
	return PDFlibGetFormFieldMaxLen(instanceID, Index);
}

int PDFlibDLL::GetFormFieldPage(int Index)
{
	return PDFlibGetFormFieldPage(instanceID, Index);
}

int PDFlibDLL::GetFormFieldPrintable(int Index)
{
	return PDFlibGetFormFieldPrintable(instanceID, Index);
}

int PDFlibDLL::GetFormFieldReadOnly(int Index)
{
	return PDFlibGetFormFieldReadOnly(instanceID, Index);
}

int PDFlibDLL::GetFormFieldRotation(int Index)
{
	return PDFlibGetFormFieldRotation(instanceID, Index);
}

int PDFlibDLL::GetFormFieldSubCount(int Index)
{
	return PDFlibGetFormFieldSubCount(instanceID, Index);
}

std::string PDFlibDLL::GetFormFieldSubName(int Index, int SubIndex)
{
	char* result;
	result = PDFlibGetFormFieldSubName(instanceID, Index, SubIndex);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFormFieldSubTempIndex(int Index, int SubIndex)
{
	return PDFlibGetFormFieldSubTempIndex(instanceID, Index, SubIndex);
}

int PDFlibDLL::GetFormFieldTabOrder(int Index)
{
	return PDFlibGetFormFieldTabOrder(instanceID, Index);
}

int PDFlibDLL::GetFormFieldTextFlags(int Index, int ValueKey)
{
	return PDFlibGetFormFieldTextFlags(instanceID, Index, ValueKey);
}

double PDFlibDLL::GetFormFieldTextSize(int Index)
{
	return PDFlibGetFormFieldTextSize(instanceID, Index);
}

std::string PDFlibDLL::GetFormFieldTitle(int Index)
{
	char* result;
	result = PDFlibGetFormFieldTitle(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFormFieldType(int Index)
{
	return PDFlibGetFormFieldType(instanceID, Index);
}

std::string PDFlibDLL::GetFormFieldValue(int Index)
{
	char* result;
	result = PDFlibGetFormFieldValue(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetFormFieldValueByTitle(const std::string& Title)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	char* result;
	result = PDFlibGetFormFieldValueByTitle(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFormFieldVisible(int Index)
{
	return PDFlibGetFormFieldVisible(instanceID, Index);
}

std::string PDFlibDLL::GetFormFieldWebLink(int Index, const std::string& ActionType)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	char* result;
	result = PDFlibGetFormFieldWebLink(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetFormFontCount()
{
	return PDFlibGetFormFontCount(instanceID);
}

std::string PDFlibDLL::GetFormFontName(int FontIndex)
{
	char* result;
	result = PDFlibGetFormFontName(instanceID, FontIndex);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetGlobalJavaScript(const std::string& PackageName)
{
	int sb1;
	char* sp1 = StringParm(PackageName, sb1);
	char* result;
	result = PDFlibGetGlobalJavaScript(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

double PDFlibDLL::GetHTMLTextHeight(double Width, const std::string& HTMLText)
{
	int sb1;
	char* sp1 = StringParm(HTMLText, sb1);
	double result;
	result = PDFlibGetHTMLTextHeight(instanceID, Width, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetHTMLTextLineCount(double Width, const std::string& HTMLText)
{
	int sb1;
	char* sp1 = StringParm(HTMLText, sb1);
	int result;
	result = PDFlibGetHTMLTextLineCount(instanceID, Width, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

double PDFlibDLL::GetHTMLTextWidth(double MaxWidth, const std::string& HTMLText)
{
	int sb1;
	char* sp1 = StringParm(HTMLText, sb1);
	double result;
	result = PDFlibGetHTMLTextWidth(instanceID, MaxWidth, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetImageID(int Index)
{
	return PDFlibGetImageID(instanceID, Index);
}

int PDFlibDLL::GetImagePageCount(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibGetImagePageCount(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

std::string PDFlibDLL::GetInformation(int Key)
{
	char* result;
	result = PDFlibGetInformation(instanceID, Key);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetKerning(const std::string& CharPair)
{
	int sb1;
	char* sp1 = StringParm(CharPair, sb1);
	int result;
	result = PDFlibGetKerning(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetNamedDestination(const std::string& DestName)
{
	int sb1;
	char* sp1 = StringParm(DestName, sb1);
	int result;
	result = PDFlibGetNamedDestination(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetNextOutline(int OutlineID)
{
	return PDFlibGetNextOutline(instanceID, OutlineID);
}

int PDFlibDLL::GetObjectCount()
{
	return PDFlibGetObjectCount(instanceID);
}

std::string PDFlibDLL::GetObjectSource(int ObjectNumber)
{
	char* result;
	result = PDFlibGetObjectSource(instanceID, ObjectNumber);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetOpenActionDestination()
{
	return PDFlibGetOpenActionDestination(instanceID);
}

std::string PDFlibDLL::GetOpenActionJavaScript()
{
	char* result;
	result = PDFlibGetOpenActionJavaScript(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetOptionalContentGroupID(int Index)
{
	return PDFlibGetOptionalContentGroupID(instanceID, Index);
}

std::string PDFlibDLL::GetOptionalContentGroupName(int OptionalContentGroupID)
{
	char* result;
	result = PDFlibGetOptionalContentGroupName(instanceID, 
		OptionalContentGroupID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetOrigin()
{
	return PDFlibGetOrigin(instanceID);
}

int PDFlibDLL::GetOutlineActionID(int OutlineID)
{
	return PDFlibGetOutlineActionID(instanceID, OutlineID);
}

double PDFlibDLL::GetOutlineColor(int OutlineID, int ColorComponent)
{
	return PDFlibGetOutlineColor(instanceID, OutlineID, ColorComponent);
}

int PDFlibDLL::GetOutlineDest(int OutlineID)
{
	return PDFlibGetOutlineDest(instanceID, OutlineID);
}

int PDFlibDLL::GetOutlineID(int Index)
{
	return PDFlibGetOutlineID(instanceID, Index);
}

std::string PDFlibDLL::GetOutlineJavaScript(int OutlineID)
{
	char* result;
	result = PDFlibGetOutlineJavaScript(instanceID, OutlineID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetOutlineOpenFile(int OutlineID)
{
	char* result;
	result = PDFlibGetOutlineOpenFile(instanceID, OutlineID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetOutlinePage(int OutlineID)
{
	return PDFlibGetOutlinePage(instanceID, OutlineID);
}

int PDFlibDLL::GetOutlineStyle(int OutlineID)
{
	return PDFlibGetOutlineStyle(instanceID, OutlineID);
}

std::string PDFlibDLL::GetOutlineWebLink(int OutlineID)
{
	char* result;
	result = PDFlibGetOutlineWebLink(instanceID, OutlineID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

double PDFlibDLL::GetPageBox(int BoxType, int Dimension)
{
	return PDFlibGetPageBox(instanceID, BoxType, Dimension);
}

std::string PDFlibDLL::GetPageContent()
{
	char* result;
	result = PDFlibGetPageContent(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetPageJavaScript(const std::string& ActionType)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	char* result;
	result = PDFlibGetPageJavaScript(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetPageLGIDictContent(int DictIndex)
{
	char* result;
	result = PDFlibGetPageLGIDictContent(instanceID, DictIndex);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetPageLGIDictCount()
{
	return PDFlibGetPageLGIDictCount(instanceID);
}

std::string PDFlibDLL::GetPageLabel(int Page)
{
	char* result;
	result = PDFlibGetPageLabel(instanceID, Page);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetPageLayout()
{
	return PDFlibGetPageLayout(instanceID);
}

int PDFlibDLL::GetPageMode()
{
	return PDFlibGetPageMode(instanceID);
}

std::string PDFlibDLL::GetPageText(int ExtractOptions)
{
	char* result;
	result = PDFlibGetPageText(instanceID, ExtractOptions);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetParentOutline(int OutlineID)
{
	return PDFlibGetParentOutline(instanceID, OutlineID);
}

int PDFlibDLL::GetPrevOutline(int OutlineID)
{
	return PDFlibGetPrevOutline(instanceID, OutlineID);
}

std::string PDFlibDLL::GetPrinterBins(const std::string& PrinterName)
{
	int sb1;
	char* sp1 = StringParm(PrinterName, sb1);
	char* result;
	result = PDFlibGetPrinterBins(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetPrinterNames()
{
	char* result;
	result = PDFlibGetPrinterNames(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetSubsetString(const std::string& InputStr)
{
	int sb1;
	char* sp1 = StringParm(InputStr, sb1);
	char* result;
	result = PDFlibGetSubsetString(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

double PDFlibDLL::GetTableCellDblProperty(int TableID, int RowNumber, int ColumnNumber, int Tag)
{
	return PDFlibGetTableCellDblProperty(instanceID, TableID, RowNumber, 
		ColumnNumber, Tag);
}

int PDFlibDLL::GetTableCellIntProperty(int TableID, int RowNumber, int ColumnNumber, int Tag)
{
	return PDFlibGetTableCellIntProperty(instanceID, TableID, RowNumber, 
		ColumnNumber, Tag);
}

std::string PDFlibDLL::GetTableCellStrProperty(int TableID, int RowNumber, int ColumnNumber, int Tag)
{
	char* result;
	result = PDFlibGetTableCellStrProperty(instanceID, TableID, RowNumber, 
		ColumnNumber, Tag);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GetTableColumnCount(int TableID)
{
	return PDFlibGetTableColumnCount(instanceID, TableID);
}

int PDFlibDLL::GetTableLastDrawnRow(int TableID)
{
	return PDFlibGetTableLastDrawnRow(instanceID, TableID);
}

int PDFlibDLL::GetTableRowCount(int TableID)
{
	return PDFlibGetTableRowCount(instanceID, TableID);
}

std::string PDFlibDLL::GetTempPath()
{
	char* result;
	result = PDFlibGetTempPath(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

double PDFlibDLL::GetTextAscent()
{
	return PDFlibGetTextAscent(instanceID);
}

double PDFlibDLL::GetTextBound(int Edge)
{
	return PDFlibGetTextBound(instanceID, Edge);
}

double PDFlibDLL::GetTextDescent()
{
	return PDFlibGetTextDescent(instanceID);
}

double PDFlibDLL::GetTextHeight()
{
	return PDFlibGetTextHeight(instanceID);
}

double PDFlibDLL::GetTextSize()
{
	return PDFlibGetTextSize(instanceID);
}

double PDFlibDLL::GetTextWidth(const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	double result;
	result = PDFlibGetTextWidth(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetViewerPreferences(int Option)
{
	return PDFlibGetViewerPreferences(instanceID, Option);
}

std::string PDFlibDLL::GetWrappedText(double Width, const std::string& Delimiter, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Delimiter, sb1);
	int sb2;
	char* sp2 = StringParm(Text, sb2);
	char* result;
	result = PDFlibGetWrappedText(instanceID, Width, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetWrappedTextBreakString(double Width, const std::string& Delimiter, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Delimiter, sb1);
	int sb2;
	char* sp2 = StringParm(Text, sb2);
	char* result;
	result = PDFlibGetWrappedTextBreakString(instanceID, Width, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

double PDFlibDLL::GetWrappedTextHeight(double Width, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	double result;
	result = PDFlibGetWrappedTextHeight(instanceID, Width, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetWrappedTextLineCount(double Width, const std::string& Text)
{
	int sb1;
	char* sp1 = StringParm(Text, sb1);
	int result;
	result = PDFlibGetWrappedTextLineCount(instanceID, Width, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::GetXFAFormFieldCount()
{
	return PDFlibGetXFAFormFieldCount(instanceID);
}

std::string PDFlibDLL::GetXFAFormFieldName(int Index)
{
	char* result;
	result = PDFlibGetXFAFormFieldName(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetXFAFormFieldNames(const std::string& Delimiter)
{
	int sb1;
	char* sp1 = StringParm(Delimiter, sb1);
	char* result;
	result = PDFlibGetXFAFormFieldNames(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

std::string PDFlibDLL::GetXFAFormFieldValue(const std::string& XFAFieldName)
{
	int sb1;
	char* sp1 = StringParm(XFAFieldName, sb1);
	char* result;
	result = PDFlibGetXFAFormFieldValue(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::GlobalJavaScriptCount()
{
	return PDFlibGlobalJavaScriptCount(instanceID);
}

std::string PDFlibDLL::GlobalJavaScriptPackageName(int Index)
{
	char* result;
	result = PDFlibGlobalJavaScriptPackageName(instanceID, Index);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::HasFontResources()
{
	return PDFlibHasFontResources(instanceID);
}

int PDFlibDLL::HasPageBox(int BoxType)
{
	return PDFlibHasPageBox(instanceID, BoxType);
}

int PDFlibDLL::HidePage()
{
	return PDFlibHidePage(instanceID);
}

int PDFlibDLL::ImageCount()
{
	return PDFlibImageCount(instanceID);
}

int PDFlibDLL::ImageFillColor()
{
	return PDFlibImageFillColor(instanceID);
}

int PDFlibDLL::ImageHeight()
{
	return PDFlibImageHeight(instanceID);
}

int PDFlibDLL::ImageHorizontalResolution()
{
	return PDFlibImageHorizontalResolution(instanceID);
}

int PDFlibDLL::ImageResolutionUnits()
{
	return PDFlibImageResolutionUnits(instanceID);
}

int PDFlibDLL::ImageType()
{
	return PDFlibImageType(instanceID);
}

int PDFlibDLL::ImageVerticalResolution()
{
	return PDFlibImageVerticalResolution(instanceID);
}

int PDFlibDLL::ImageWidth()
{
	return PDFlibImageWidth(instanceID);
}

int PDFlibDLL::ImportEMFFromFile(const std::string& FileName, int FontOptions, int GeneralOptions)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibImportEMFFromFile(instanceID, sp1, FontOptions, 
		GeneralOptions);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::InsertPages(int StartPage, int PageCount)
{
	return PDFlibInsertPages(instanceID, StartPage, PageCount);
}

int PDFlibDLL::InsertTableColumns(int TableID, int Position, int NewColumnCount)
{
	return PDFlibInsertTableColumns(instanceID, TableID, Position, 
		NewColumnCount);
}

int PDFlibDLL::InsertTableRows(int TableID, int Position, int NewRowCount)
{
	return PDFlibInsertTableRows(instanceID, TableID, Position, 
		NewRowCount);
}

int PDFlibDLL::LastErrorCode()
{
	return PDFlibLastErrorCode(instanceID);
}

std::string PDFlibDLL::LastRenderError()
{
	char* result;
	result = PDFlibLastRenderError(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::LayerCount()
{
	return PDFlibLayerCount(instanceID);
}


std::string PDFlibDLL::LibraryVersion()
{
	char* result;
	result = PDFlibVersion(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::Linearized()
{
	return PDFlibLinearized(instanceID);
}

int PDFlibDLL::LoadFromCanvasDC(double DPI, int Options)
{
	return PDFlibLoadFromCanvasDC(instanceID, DPI, Options);
}

int PDFlibDLL::LoadFromFile(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibLoadFromFile(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::LoadFromString(const std::string& Source)
{
	int sb1;
	char* sp1 = StringParm(Source, sb1);
	int result;
	result = PDFlibLoadFromString(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::LoadState()
{
	return PDFlibLoadState(instanceID);
}

int PDFlibDLL::MergeDocument(int DocumentID)
{
	return PDFlibMergeDocument(instanceID, DocumentID);
}

int PDFlibDLL::MergeFileList(const std::string& ListName, const std::string& OutputFileName)
{
	int sb1;
	char* sp1 = StringParm(ListName, sb1);
	int sb2;
	char* sp2 = StringParm(OutputFileName, sb2);
	int result;
	result = PDFlibMergeFileList(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::MergeFileListFast(const std::string& ListName, const std::string& OutputFileName)
{
	int sb1;
	char* sp1 = StringParm(ListName, sb1);
	int sb2;
	char* sp2 = StringParm(OutputFileName, sb2);
	int result;
	result = PDFlibMergeFileListFast(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::MergeFiles(const std::string& FirstFileName, const std::string& SecondFileName, const std::string& OutputFileName)
{
	int sb1;
	char* sp1 = StringParm(FirstFileName, sb1);
	int sb2;
	char* sp2 = StringParm(SecondFileName, sb2);
	int sb3;
	char* sp3 = StringParm(OutputFileName, sb3);
	int result;
	result = PDFlibMergeFiles(instanceID, sp1, sp2, sp3);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	if (sb3 == 1) PDFlibReleaseBuffer(instanceID, sp3);
	return result;
}

int PDFlibDLL::MergeTableCells(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn)
{
	return PDFlibMergeTableCells(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn);
}

int PDFlibDLL::MoveLayer(int FromPosition, int ToPosition)
{
	return PDFlibMoveLayer(instanceID, FromPosition, ToPosition);
}

int PDFlibDLL::MoveOutlineAfter(int OutlineID, int SiblingID)
{
	return PDFlibMoveOutlineAfter(instanceID, OutlineID, SiblingID);
}

int PDFlibDLL::MoveOutlineBefore(int OutlineID, int SiblingID)
{
	return PDFlibMoveOutlineBefore(instanceID, OutlineID, SiblingID);
}

int PDFlibDLL::MovePage(int NewPosition)
{
	return PDFlibMovePage(instanceID, NewPosition);
}

int PDFlibDLL::MovePath(double NewX, double NewY)
{
	return PDFlibMovePath(instanceID, NewX, NewY);
}

int PDFlibDLL::MultiplyScale(double MultScaleBy)
{
	return PDFlibMultiplyScale(instanceID, MultScaleBy);
}

std::string PDFlibDLL::NewCustomPrinter(const std::string& OriginalPrinterName)
{
	int sb1;
	char* sp1 = StringParm(OriginalPrinterName, sb1);
	char* result;
	result = PDFlibNewCustomPrinter(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::NewDocument()
{
	return PDFlibNewDocument(instanceID);
}

int PDFlibDLL::NewFormField(const std::string& Title, int FieldType)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int result;
	result = PDFlibNewFormField(instanceID, sp1, FieldType);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::NewLayer()
{
	return PDFlibNewLayer(instanceID);
}

int PDFlibDLL::NewOptionalContentGroup(const std::string& GroupName)
{
	int sb1;
	char* sp1 = StringParm(GroupName, sb1);
	int result;
	result = PDFlibNewOptionalContentGroup(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::NewOutline(int Parent, const std::string& Title, int DestPage, double DestPosition)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int result;
	result = PDFlibNewOutline(instanceID, Parent, sp1, DestPage, 
		DestPosition);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::NewPage()
{
	return PDFlibNewPage(instanceID);
}

int PDFlibDLL::NewPages(int PageCount)
{
	return PDFlibNewPages(instanceID, PageCount);
}

int PDFlibDLL::NewPostScriptXObject(const std::string& PS)
{
	int sb1;
	char* sp1 = StringParm(PS, sb1);
	int result;
	result = PDFlibNewPostScriptXObject(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::NewRGBAxialShader(const std::string& ShaderName, double StartX, double StartY, double StartRed, double StartGreen, double StartBlue, double EndX, double EndY, double EndRed, double EndGreen, double EndBlue, int Extend)
{
	int sb1;
	char* sp1 = StringParm(ShaderName, sb1);
	int result;
	result = PDFlibNewRGBAxialShader(instanceID, sp1, StartX, StartY, 
		StartRed, StartGreen, StartBlue, EndX, EndY, EndRed, EndGreen, EndBlue, 
		Extend);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::NewStaticOutline(int Parent, const std::string& Title)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int result;
	result = PDFlibNewStaticOutline(instanceID, Parent, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::OpenOutline(int OutlineID)
{
	return PDFlibOpenOutline(instanceID, OutlineID);
}

int PDFlibDLL::OptionalContentGroupCount()
{
	return PDFlibOptionalContentGroupCount(instanceID);
}

int PDFlibDLL::OutlineCount()
{
	return PDFlibOutlineCount(instanceID);
}

std::string PDFlibDLL::OutlineTitle(int OutlineID)
{
	char* result;
	result = PDFlibOutlineTitle(instanceID, OutlineID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::PageCount()
{
	return PDFlibPageCount(instanceID);
}

double PDFlibDLL::PageHeight()
{
	return PDFlibPageHeight(instanceID);
}

int PDFlibDLL::PageJavaScriptAction(const std::string& ActionType, const std::string& JavaScript)
{
	int sb1;
	char* sp1 = StringParm(ActionType, sb1);
	int sb2;
	char* sp2 = StringParm(JavaScript, sb2);
	int result;
	result = PDFlibPageJavaScriptAction(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::PageRotation()
{
	return PDFlibPageRotation(instanceID);
}

double PDFlibDLL::PageWidth()
{
	return PDFlibPageWidth(instanceID);
}

int PDFlibDLL::PrintDocument(const std::string& PrinterName, int StartPage, int EndPage, int Options)
{
	int sb1;
	char* sp1 = StringParm(PrinterName, sb1);
	int result;
	result = PDFlibPrintDocument(instanceID, sp1, StartPage, EndPage, 
		Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::PrintOptions(int PageScaling, int AutoRotateCenter, const std::string& Title)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int result;
	result = PDFlibPrintOptions(instanceID, PageScaling, AutoRotateCenter, 
		sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::RemoveAppearanceStream(int Index)
{
	return PDFlibRemoveAppearanceStream(instanceID, Index);
}

int PDFlibDLL::RemoveDocument(int DocumentID)
{
	return PDFlibRemoveDocument(instanceID, DocumentID);
}

int PDFlibDLL::RemoveOutline(int OutlineID)
{
	return PDFlibRemoveOutline(instanceID, OutlineID);
}

int PDFlibDLL::RemoveSharedLayers()
{
	return PDFlibRemoveSharedLayers(instanceID);
}

int PDFlibDLL::RemoveStyle(const std::string& StyleName)
{
	int sb1;
	char* sp1 = StringParm(StyleName, sb1);
	int result;
	result = PDFlibRemoveStyle(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::RenderDocumentToFile(int DPI, int StartPage, int EndPage, int Options, const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibRenderDocumentToFile(instanceID, DPI, StartPage, 
		EndPage, Options, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::RenderPageToDC(int DPI, int Page, int DC)
{
	return PDFlibRenderPageToDC(instanceID, DPI, Page, DC);
}

int PDFlibDLL::RenderPageToFile(int DPI, int Page, int Options, const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibRenderPageToFile(instanceID, DPI, Page, Options, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

std::string PDFlibDLL::RenderPageToString(int DPI, int Page, int Options)
{
	char* result;
	result = PDFlibRenderPageToString(instanceID, DPI, Page, Options);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::ReplaceFonts()
{
	return PDFlibReplaceFonts(instanceID);
}

int PDFlibDLL::ReplaceImage(int OriginalImageID, int NewImageID)
{
	return PDFlibReplaceImage(instanceID, OriginalImageID, NewImageID);
}

int PDFlibDLL::ReplaceTag(const std::string& Tag, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(Tag, sb1);
	int sb2;
	char* sp2 = StringParm(NewValue, sb2);
	int result;
	result = PDFlibReplaceTag(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::RetrieveCustomDataToFile(const std::string& Key, const std::string& FileName, int Location)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	int sb2;
	char* sp2 = StringParm(FileName, sb2);
	int result;
	result = PDFlibRetrieveCustomDataToFile(instanceID, sp1, sp2, Location);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

std::string PDFlibDLL::RetrieveCustomDataToString(const std::string& Key, int Location)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	char* result;
	result = PDFlibRetrieveCustomDataToString(instanceID, sp1, Location);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::ReverseImage(int Reset)
{
	return PDFlibReverseImage(instanceID, Reset);
}

int PDFlibDLL::RotatePage(int PageRotation)
{
	return PDFlibRotatePage(instanceID, PageRotation);
}

int PDFlibDLL::SaveFontToFile(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibSaveFontToFile(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SaveImageToFile(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibSaveImageToFile(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SaveState()
{
	return PDFlibSaveState(instanceID);
}

int PDFlibDLL::SaveStyle(const std::string& StyleName)
{
	int sb1;
	char* sp1 = StringParm(StyleName, sb1);
	int result;
	result = PDFlibSaveStyle(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SaveToFile(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibSaveToFile(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

std::string PDFlibDLL::SaveToString()
{
	char* result;
	result = PDFlibSaveToString(instanceID);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::SecurityInfo(int SecurityItem)
{
	return PDFlibSecurityInfo(instanceID, SecurityItem);
}

int PDFlibDLL::SelectDocument(int DocumentID)
{
	return PDFlibSelectDocument(instanceID, DocumentID);
}

int PDFlibDLL::SelectFont(int FontID)
{
	return PDFlibSelectFont(instanceID, FontID);
}

int PDFlibDLL::SelectImage(int ImageID)
{
	return PDFlibSelectImage(instanceID, ImageID);
}

int PDFlibDLL::SelectLayer(int NewLayer)
{
	return PDFlibSelectLayer(instanceID, NewLayer);
}

int PDFlibDLL::SelectPage(int PageNumber)
{
	return PDFlibSelectPage(instanceID, PageNumber);
}

int PDFlibDLL::SelectedDocument()
{
	return PDFlibSelectedDocument(instanceID);
}

int PDFlibDLL::SelectedFont()
{
	return PDFlibSelectedFont(instanceID);
}

int PDFlibDLL::SelectedImage()
{
	return PDFlibSelectedImage(instanceID);
}

int PDFlibDLL::SelectedPage()
{
	return PDFlibSelectedPage(instanceID);
}

int PDFlibDLL::SetAdvancePassword(const std::string& Password)
{
	int sb1;
	char* sp1 = StringParm(Password, sb1);
	int result;
	result = PDFlibSetAdvancePassword(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetAnnotContents(int Index, const std::string& NewContents)
{
	int sb1;
	char* sp1 = StringParm(NewContents, sb1);
	int result;
	result = PDFlibSetAnnotContents(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetAnnotStrProperty(int Index, int Tag, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(NewValue, sb1);
	int result;
	result = PDFlibSetAnnotStrProperty(instanceID, Index, Tag, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetBaseURL(const std::string& NewBaseURL)
{
	int sb1;
	char* sp1 = StringParm(NewBaseURL, sb1);
	int result;
	result = PDFlibSetBaseURL(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetBlendMode(int BlendMode)
{
	return PDFlibSetBlendMode(instanceID, BlendMode);
}

int PDFlibDLL::SetBreakString(const std::string& NewBreakString)
{
	int sb1;
	char* sp1 = StringParm(NewBreakString, sb1);
	int result;
	result = PDFlibSetBreakString(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetCapturedPageOptional(int CaptureID, int OptionalContentGroupID)
{
	return PDFlibSetCapturedPageOptional(instanceID, CaptureID, 
		OptionalContentGroupID);
}

int PDFlibDLL::SetCatalogInformation(const std::string& Key, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	int sb2;
	char* sp2 = StringParm(NewValue, sb2);
	int result;
	result = PDFlibSetCatalogInformation(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::SetCharWidth(int CharCode, int NewWidth)
{
	return PDFlibSetCharWidth(instanceID, CharCode, NewWidth);
}

int PDFlibDLL::SetClippingPath()
{
	return PDFlibSetClippingPath(instanceID);
}

int PDFlibDLL::SetClippingPathEvenOdd()
{
	return PDFlibSetClippingPathEvenOdd(instanceID);
}

int PDFlibDLL::SetCropBox(double Left, double Top, double Width, double Height)
{
	return PDFlibSetCropBox(instanceID, Left, Top, Width, Height);
}

int PDFlibDLL::SetCustomInformation(const std::string& Key, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	int sb2;
	char* sp2 = StringParm(NewValue, sb2);
	int result;
	result = PDFlibSetCustomInformation(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::SetCustomLineDash(const std::string& DashPattern, double DashPhase)
{
	int sb1;
	char* sp1 = StringParm(DashPattern, sb1);
	int result;
	result = PDFlibSetCustomLineDash(instanceID, sp1, DashPhase);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetPDFiumFileName(const std::wstring& FileName)
{
	return PDFlibSetPDFiumFileName(instanceID, 
		WideStringParm(FileName));
}

int PDFlibDLL::SetDocumentMetadata(const std::string& XMP)
{
	int sb1;
	char* sp1 = StringParm(XMP, sb1);
	int result;
	result = PDFlibSetDocumentMetadata(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFillColor(double Red, double Green, double Blue)
{
	return PDFlibSetFillColor(instanceID, Red, Green, Blue);
}

int PDFlibDLL::SetFillColorCMYK(double C, double M, double Y, double K)
{
	return PDFlibSetFillColorCMYK(instanceID, C, M, Y, K);
}

int PDFlibDLL::SetFillColorSep(const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetFillColorSep(instanceID, sp1, Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFillShader(const std::string& ShaderName)
{
	int sb1;
	char* sp1 = StringParm(ShaderName, sb1);
	int result;
	result = PDFlibSetFillShader(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFontEncoding(int Encoding)
{
	return PDFlibSetFontEncoding(instanceID, Encoding);
}

int PDFlibDLL::SetFontFlags(int Fixed, int Serif, int Symbolic, int Script, int Italic, int AllCap, int SmallCap, int ForceBold)
{
	return PDFlibSetFontFlags(instanceID, Fixed, Serif, Symbolic, Script, 
		Italic, AllCap, SmallCap, ForceBold);
}

int PDFlibDLL::SetFormFieldAlignment(int Index, int Alignment)
{
	return PDFlibSetFormFieldAlignment(instanceID, Index, Alignment);
}

int PDFlibDLL::SetFormFieldAnnotFlags(int Index, int NewFlags)
{
	return PDFlibSetFormFieldAnnotFlags(instanceID, Index, NewFlags);
}

int PDFlibDLL::SetFormFieldBackgroundColor(int Index, double Red, double Green, double Blue)
{
	return PDFlibSetFormFieldBackgroundColor(instanceID, Index, Red, Green, 
		Blue);
}

int PDFlibDLL::SetFormFieldBackgroundColorCMYK(int Index, double C, double M, double Y, double K)
{
	return PDFlibSetFormFieldBackgroundColorCMYK(instanceID, Index, C, M, 
		Y, K);
}

int PDFlibDLL::SetFormFieldBackgroundColorSep(int Index, const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetFormFieldBackgroundColorSep(instanceID, Index, sp1, 
		Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldBorderColor(int Index, double Red, double Green, double Blue)
{
	return PDFlibSetFormFieldBorderColor(instanceID, Index, Red, Green, 
		Blue);
}

int PDFlibDLL::SetFormFieldBorderColorCMYK(int Index, double C, double M, double Y, double K)
{
	return PDFlibSetFormFieldBorderColorCMYK(instanceID, Index, C, M, Y, K);
}

int PDFlibDLL::SetFormFieldBorderColorSep(int Index, const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetFormFieldBorderColorSep(instanceID, Index, sp1, Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldBorderStyle(int Index, double Width, int Style, double DashOn, double DashOff)
{
	return PDFlibSetFormFieldBorderStyle(instanceID, Index, Width, Style, 
		DashOn, DashOff);
}

int PDFlibDLL::SetFormFieldBounds(int Index, double Left, double Top, double Width, double Height)
{
	return PDFlibSetFormFieldBounds(instanceID, Index, Left, Top, Width, 
		Height);
}

int PDFlibDLL::SetFormFieldCalcOrder(int Index, int Order)
{
	return PDFlibSetFormFieldCalcOrder(instanceID, Index, Order);
}

int PDFlibDLL::SetFormFieldCaption(int Index, const std::string& NewCaption)
{
	int sb1;
	char* sp1 = StringParm(NewCaption, sb1);
	int result;
	result = PDFlibSetFormFieldCaption(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldCheckStyle(int Index, int CheckStyle, int Position)
{
	return PDFlibSetFormFieldCheckStyle(instanceID, Index, CheckStyle, 
		Position);
}

int PDFlibDLL::SetFormFieldChildTitle(int Index, const std::string& NewTitle)
{
	int sb1;
	char* sp1 = StringParm(NewTitle, sb1);
	int result;
	result = PDFlibSetFormFieldChildTitle(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldColor(int Index, double Red, double Green, double Blue)
{
	return PDFlibSetFormFieldColor(instanceID, Index, Red, Green, Blue);
}

int PDFlibDLL::SetFormFieldColorCMYK(int Index, double C, double M, double Y, double K)
{
	return PDFlibSetFormFieldColorCMYK(instanceID, Index, C, M, Y, K);
}

int PDFlibDLL::SetFormFieldColorSep(int Index, const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetFormFieldColorSep(instanceID, Index, sp1, Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldComb(int Index, int Comb)
{
	return PDFlibSetFormFieldComb(instanceID, Index, Comb);
}

int PDFlibDLL::SetFormFieldDefaultValue(int Index, const std::string& NewDefaultValue)
{
	int sb1;
	char* sp1 = StringParm(NewDefaultValue, sb1);
	int result;
	result = PDFlibSetFormFieldDefaultValue(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldDescription(int Index, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(NewValue, sb1);
	int result;
	result = PDFlibSetFormFieldDescription(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldFlags(int Index, int NewFlags)
{
	return PDFlibSetFormFieldFlags(instanceID, Index, NewFlags);
}

int PDFlibDLL::SetFormFieldFont(int Index, int FontIndex)
{
	return PDFlibSetFormFieldFont(instanceID, Index, FontIndex);
}

int PDFlibDLL::SetFormFieldHighlightMode(int Index, int NewMode)
{
	return PDFlibSetFormFieldHighlightMode(instanceID, Index, NewMode);
}

int PDFlibDLL::SetFormFieldIcon(int Index, int IconType, int CaptureID)
{
	return PDFlibSetFormFieldIcon(instanceID, Index, IconType, CaptureID);
}

int PDFlibDLL::SetFormFieldIconStyle(int Index, int Placement, int Scale, int ScaleType, int HorizontalShift, int VerticalShift)
{
	return PDFlibSetFormFieldIconStyle(instanceID, Index, Placement, Scale, 
		ScaleType, HorizontalShift, VerticalShift);
}

int PDFlibDLL::SetFormFieldMaxLen(int Index, int NewMaxLen)
{
	return PDFlibSetFormFieldMaxLen(instanceID, Index, NewMaxLen);
}

int PDFlibDLL::SetFormFieldOptional(int Index, int OptionalContentGroupID)
{
	return PDFlibSetFormFieldOptional(instanceID, Index, 
		OptionalContentGroupID);
}

int PDFlibDLL::SetFormFieldPage(int Index, int NewPage)
{
	return PDFlibSetFormFieldPage(instanceID, Index, NewPage);
}

int PDFlibDLL::SetFormFieldPrintable(int Index, int Printable)
{
	return PDFlibSetFormFieldPrintable(instanceID, Index, Printable);
}

int PDFlibDLL::SetFormFieldReadOnly(int Index, int ReadOnly)
{
	return PDFlibSetFormFieldReadOnly(instanceID, Index, ReadOnly);
}

int PDFlibDLL::SetFormFieldRotation(int Index, int Angle)
{
	return PDFlibSetFormFieldRotation(instanceID, Index, Angle);
}

int PDFlibDLL::SetFormFieldStandardFont(int Index, int StandardFontID)
{
	return PDFlibSetFormFieldStandardFont(instanceID, Index, 
		StandardFontID);
}

int PDFlibDLL::SetFormFieldTabOrder(int Index, int Order)
{
	return PDFlibSetFormFieldTabOrder(instanceID, Index, Order);
}

int PDFlibDLL::SetFormFieldTextFlags(int Index, int Multiline, int Password, int FileSelect, int DoNotSpellCheck, int DoNotScroll)
{
	return PDFlibSetFormFieldTextFlags(instanceID, Index, Multiline, 
		Password, FileSelect, DoNotSpellCheck, DoNotScroll);
}

int PDFlibDLL::SetFormFieldTextSize(int Index, double NewTextSize)
{
	return PDFlibSetFormFieldTextSize(instanceID, Index, NewTextSize);
}

int PDFlibDLL::SetFormFieldValue(int Index, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(NewValue, sb1);
	int result;
	result = PDFlibSetFormFieldValue(instanceID, Index, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetFormFieldValueByTitle(const std::string& Title, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(Title, sb1);
	int sb2;
	char* sp2 = StringParm(NewValue, sb2);
	int result;
	result = PDFlibSetFormFieldValueByTitle(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::SetFormFieldVisible(int Index, int Visible)
{
	return PDFlibSetFormFieldVisible(instanceID, Index, Visible);
}

int PDFlibDLL::SetGDIPlusFileName(const std::string& DLLFileName)
{
	int sb1;
	char* sp1 = StringParm(DLLFileName, sb1);
	int result;
	result = PDFlibSetGDIPlusFileName(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetGDIPlusOptions(int OptionID, int NewValue)
{
	return PDFlibSetGDIPlusOptions(instanceID, OptionID, NewValue);
}

int PDFlibDLL::SetHTMLBoldFont(const std::string& FontSet, int FontID)
{
	int sb1;
	char* sp1 = StringParm(FontSet, sb1);
	int result;
	result = PDFlibSetHTMLBoldFont(instanceID, sp1, FontID);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetHTMLBoldItalicFont(const std::string& FontSet, int FontID)
{
	int sb1;
	char* sp1 = StringParm(FontSet, sb1);
	int result;
	result = PDFlibSetHTMLBoldItalicFont(instanceID, sp1, FontID);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetHTMLItalicFont(const std::string& FontSet, int FontID)
{
	int sb1;
	char* sp1 = StringParm(FontSet, sb1);
	int result;
	result = PDFlibSetHTMLItalicFont(instanceID, sp1, FontID);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetHTMLNormalFont(const std::string& FontSet, int FontID)
{
	int sb1;
	char* sp1 = StringParm(FontSet, sb1);
	int result;
	result = PDFlibSetHTMLNormalFont(instanceID, sp1, FontID);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetImageAsMask(int MaskType)
{
	return PDFlibSetImageAsMask(instanceID, MaskType);
}

int PDFlibDLL::SetImageMask(double FromRed, double FromGreen, double FromBlue, double ToRed, double ToGreen, double ToBlue)
{
	return PDFlibSetImageMask(instanceID, FromRed, FromGreen, FromBlue, 
		ToRed, ToGreen, ToBlue);
}

int PDFlibDLL::SetImageMaskCMYK(double FromC, double FromM, double FromY, double FromK, double ToC, double ToM, double ToY, double ToK)
{
	return PDFlibSetImageMaskCMYK(instanceID, FromC, FromM, FromY, FromK, 
		ToC, ToM, ToY, ToK);
}

int PDFlibDLL::SetImageMaskFromImage(int ImageID)
{
	return PDFlibSetImageMaskFromImage(instanceID, ImageID);
}

int PDFlibDLL::SetImageOptional(int OptionalContentGroupID)
{
	return PDFlibSetImageOptional(instanceID, OptionalContentGroupID);
}

int PDFlibDLL::SetInformation(int Key, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(NewValue, sb1);
	int result;
	result = PDFlibSetInformation(instanceID, Key, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetJPEGQuality(int Quality)
{
	return PDFlibSetJPEGQuality(instanceID, Quality);
}

int PDFlibDLL::SetJavaScriptMode(int JSMode)
{
	return PDFlibSetJavaScriptMode(instanceID, JSMode);
}

int PDFlibDLL::SetKerning(const std::string& CharPair, int Adjustment)
{
	int sb1;
	char* sp1 = StringParm(CharPair, sb1);
	int result;
	result = PDFlibSetKerning(instanceID, sp1, Adjustment);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetLayerOptional(int OptionalContentGroupID)
{
	return PDFlibSetLayerOptional(instanceID, OptionalContentGroupID);
}

int PDFlibDLL::SetLineCap(int LineCap)
{
	return PDFlibSetLineCap(instanceID, LineCap);
}

int PDFlibDLL::SetLineColor(double Red, double Green, double Blue)
{
	return PDFlibSetLineColor(instanceID, Red, Green, Blue);
}

int PDFlibDLL::SetLineColorCMYK(double C, double M, double Y, double K)
{
	return PDFlibSetLineColorCMYK(instanceID, C, M, Y, K);
}

int PDFlibDLL::SetLineColorSep(const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetLineColorSep(instanceID, sp1, Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetLineDash(double DashOn, double DashOff)
{
	return PDFlibSetLineDash(instanceID, DashOn, DashOff);
}

int PDFlibDLL::SetLineJoin(int LineJoin)
{
	return PDFlibSetLineJoin(instanceID, LineJoin);
}

int PDFlibDLL::SetLineShader(const std::string& ShaderName)
{
	int sb1;
	char* sp1 = StringParm(ShaderName, sb1);
	int result;
	result = PDFlibSetLineShader(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetLineWidth(double LineWidth)
{
	return PDFlibSetLineWidth(instanceID, LineWidth);
}

int PDFlibDLL::SetMeasurementUnits(int MeasurementUnits)
{
	return PDFlibSetMeasurementUnits(instanceID, MeasurementUnits);
}

int PDFlibDLL::SetNeedAppearances(int NewValue)
{
	return PDFlibSetNeedAppearances(instanceID, NewValue);
}

int PDFlibDLL::SetOpenActionDestination(int OpenPage, int Zoom)
{
	return PDFlibSetOpenActionDestination(instanceID, OpenPage, Zoom);
}

int PDFlibDLL::SetOpenActionDestinationFull(int OpenPage, int Zoom, int DestType, double Left, double Top, double Right, double Bottom)
{
	return PDFlibSetOpenActionDestinationFull(instanceID, OpenPage, Zoom, 
		DestType, Left, Top, Right, Bottom);
}

int PDFlibDLL::SetOpenActionJavaScript(const std::string& JavaScript)
{
	int sb1;
	char* sp1 = StringParm(JavaScript, sb1);
	int result;
	result = PDFlibSetOpenActionJavaScript(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetOpenActionMenu(const std::string& MenuItem)
{
	int sb1;
	char* sp1 = StringParm(MenuItem, sb1);
	int result;
	result = PDFlibSetOpenActionMenu(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetOptionalContentGroupPrintable(int OptionalContentGroupID, int Printable)
{
	return PDFlibSetOptionalContentGroupPrintable(instanceID, 
		OptionalContentGroupID, Printable);
}

int PDFlibDLL::SetOptionalContentGroupVisible(int OptionalContentGroupID, int Visible)
{
	return PDFlibSetOptionalContentGroupVisible(instanceID, 
		OptionalContentGroupID, Visible);
}

int PDFlibDLL::SetOrigin(int Origin)
{
	return PDFlibSetOrigin(instanceID, Origin);
}

int PDFlibDLL::SetOutlineColor(int OutlineID, double Red, double Green, double Blue)
{
	return PDFlibSetOutlineColor(instanceID, OutlineID, Red, Green, Blue);
}

int PDFlibDLL::SetOutlineDestination(int OutlineID, int DestPage, double DestPosition)
{
	return PDFlibSetOutlineDestination(instanceID, OutlineID, DestPage, 
		DestPosition);
}

int PDFlibDLL::SetOutlineDestinationFull(int OutlineID, int DestPage, int Zoom, int DestType, double Left, double Top, double Right, double Bottom)
{
	return PDFlibSetOutlineDestinationFull(instanceID, OutlineID, DestPage, 
		Zoom, DestType, Left, Top, Right, Bottom);
}

int PDFlibDLL::SetOutlineDestinationZoom(int OutlineID, int DestPage, double DestPosition, int Zoom)
{
	return PDFlibSetOutlineDestinationZoom(instanceID, OutlineID, DestPage, 
		DestPosition, Zoom);
}

int PDFlibDLL::SetOutlineJavaScript(int OutlineID, const std::string& JavaScript)
{
	int sb1;
	char* sp1 = StringParm(JavaScript, sb1);
	int result;
	result = PDFlibSetOutlineJavaScript(instanceID, OutlineID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetOutlineOpenFile(int OutlineID, const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibSetOutlineOpenFile(instanceID, OutlineID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetOutlineStyle(int OutlineID, int SetItalic, int SetBold)
{
	return PDFlibSetOutlineStyle(instanceID, OutlineID, SetItalic, SetBold);
}

int PDFlibDLL::SetOutlineTitle(int OutlineID, const std::string& NewTitle)
{
	int sb1;
	char* sp1 = StringParm(NewTitle, sb1);
	int result;
	result = PDFlibSetOutlineTitle(instanceID, OutlineID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetOutlineWebLink(int OutlineID, const std::string& Link)
{
	int sb1;
	char* sp1 = StringParm(Link, sb1);
	int result;
	result = PDFlibSetOutlineWebLink(instanceID, OutlineID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetPNGTransparencyColor(int RedByte, int GreenByte, int BlueByte)
{
	return PDFlibSetPNGTransparencyColor(instanceID, RedByte, GreenByte, 
		BlueByte);
}

int PDFlibDLL::SetPageActionMenu(const std::string& MenuItem)
{
	int sb1;
	char* sp1 = StringParm(MenuItem, sb1);
	int result;
	result = PDFlibSetPageActionMenu(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetPageContent(const std::string& NewContent)
{
	int sb1;
	char* sp1 = StringParm(NewContent, sb1);
	int result;
	result = PDFlibSetPageContent(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetPageDimensions(double NewPageWidth, double NewPageHeight)
{
	return PDFlibSetPageDimensions(instanceID, NewPageWidth, NewPageHeight);
}

int PDFlibDLL::SetPageLayout(int NewPageLayout)
{
	return PDFlibSetPageLayout(instanceID, NewPageLayout);
}

int PDFlibDLL::SetPageMode(int NewPageMode)
{
	return PDFlibSetPageMode(instanceID, NewPageMode);
}

int PDFlibDLL::SetPageSize(const std::string& PaperName)
{
	int sb1;
	char* sp1 = StringParm(PaperName, sb1);
	int result;
	result = PDFlibSetPageSize(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetPageThumbnail()
{
	return PDFlibSetPageThumbnail(instanceID);
}

int PDFlibDLL::SetPageTransparencyGroup(int CS, int Isolate, int Knockout)
{
	return PDFlibSetPageTransparencyGroup(instanceID, CS, Isolate, 
		Knockout);
}

int PDFlibDLL::SetPassword(const std::string& Password)
{
	int sb1;
	char* sp1 = StringParm(Password, sb1);
	int result;
	result = PDFlibSetPassword(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetPrecision(int NewPrecision)
{
	return PDFlibSetPrecision(instanceID, NewPrecision);
}

int PDFlibDLL::SetScale(double NewScale)
{
	return PDFlibSetScale(instanceID, NewScale);
}

int PDFlibDLL::SetTableBorderColor(int TableID, int BorderIndex, double Red, double Green, double Blue)
{
	return PDFlibSetTableBorderColor(instanceID, TableID, BorderIndex, Red, 
		Green, Blue);
}

int PDFlibDLL::SetTableBorderColorCMYK(int TableID, int BorderIndex, double C, double M, double Y, double K)
{
	return PDFlibSetTableBorderColorCMYK(instanceID, TableID, BorderIndex, 
		C, M, Y, K);
}

int PDFlibDLL::SetTableBorderWidth(int TableID, int BorderIndex, double NewWidth)
{
	return PDFlibSetTableBorderWidth(instanceID, TableID, BorderIndex, 
		NewWidth);
}

int PDFlibDLL::SetTableCellAlignment(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int NewCellAlignment)
{
	return PDFlibSetTableCellAlignment(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, NewCellAlignment);
}

int PDFlibDLL::SetTableCellBackgroundColor(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double Red, double Green, double Blue)
{
	return PDFlibSetTableCellBackgroundColor(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, Red, Green, Blue);
}

int PDFlibDLL::SetTableCellBackgroundColorCMYK(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double C, double M, double Y, double K)
{
	return PDFlibSetTableCellBackgroundColorCMYK(instanceID, TableID, 
		FirstRow, FirstColumn, LastRow, LastColumn, C, M, Y, K);
}

int PDFlibDLL::SetTableCellBorderColor(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double Red, double Green, double Blue)
{
	return PDFlibSetTableCellBorderColor(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, BorderIndex, Red, Green, Blue);
}

int PDFlibDLL::SetTableCellBorderColorCMYK(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double C, double M, double Y, double K)
{
	return PDFlibSetTableCellBorderColorCMYK(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, BorderIndex, C, M, Y, K);
}

int PDFlibDLL::SetTableCellBorderWidth(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double NewWidth)
{
	return PDFlibSetTableCellBorderWidth(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, BorderIndex, NewWidth);
}

int PDFlibDLL::SetTableCellContent(int TableID, int RowNumber, int ColumnNumber, const std::string& HTMLText)
{
	int sb1;
	char* sp1 = StringParm(HTMLText, sb1);
	int result;
	result = PDFlibSetTableCellContent(instanceID, TableID, RowNumber, 
		ColumnNumber, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetTableCellPadding(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double NewPadding)
{
	return PDFlibSetTableCellPadding(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, BorderIndex, NewPadding);
}

int PDFlibDLL::SetTableCellTextColor(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double Red, double Green, double Blue)
{
	return PDFlibSetTableCellTextColor(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, Red, Green, Blue);
}

int PDFlibDLL::SetTableCellTextColorCMYK(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double C, double M, double Y, double K)
{
	return PDFlibSetTableCellTextColorCMYK(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, C, M, Y, K);
}

int PDFlibDLL::SetTableCellTextSize(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double NewTextSize)
{
	return PDFlibSetTableCellTextSize(instanceID, TableID, FirstRow, 
		FirstColumn, LastRow, LastColumn, NewTextSize);
}

int PDFlibDLL::SetTableColumnWidth(int TableID, int FirstColumn, int LastColumn, double NewWidth)
{
	return PDFlibSetTableColumnWidth(instanceID, TableID, FirstColumn, 
		LastColumn, NewWidth);
}

int PDFlibDLL::SetTableRowHeight(int TableID, int FirstRow, int LastRow, double NewHeight)
{
	return PDFlibSetTableRowHeight(instanceID, TableID, FirstRow, LastRow, 
		NewHeight);
}

int PDFlibDLL::SetTempFile(const std::string& FileName)
{
	int sb1;
	char* sp1 = StringParm(FileName, sb1);
	int result;
	result = PDFlibSetTempFile(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetTempPath(const std::string& NewPath)
{
	int sb1;
	char* sp1 = StringParm(NewPath, sb1);
	int result;
	result = PDFlibSetTempPath(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetTextAlign(int TextAlign)
{
	return PDFlibSetTextAlign(instanceID, TextAlign);
}

int PDFlibDLL::SetTextCharSpacing(double CharSpacing)
{
	return PDFlibSetTextCharSpacing(instanceID, CharSpacing);
}

int PDFlibDLL::SetTextColor(double Red, double Green, double Blue)
{
	return PDFlibSetTextColor(instanceID, Red, Green, Blue);
}

int PDFlibDLL::SetTextColorCMYK(double C, double M, double Y, double K)
{
	return PDFlibSetTextColorCMYK(instanceID, C, M, Y, K);
}

int PDFlibDLL::SetTextColorSep(const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetTextColorSep(instanceID, sp1, Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetTextHighlight(int Highlight)
{
	return PDFlibSetTextHighlight(instanceID, Highlight);
}

int PDFlibDLL::SetTextHighlightColor(double Red, double Green, double Blue)
{
	return PDFlibSetTextHighlightColor(instanceID, Red, Green, Blue);
}

int PDFlibDLL::SetTextHighlightColorCMYK(double C, double M, double Y, double K)
{
	return PDFlibSetTextHighlightColorCMYK(instanceID, C, M, Y, K);
}

int PDFlibDLL::SetTextHighlightColorSep(const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetTextHighlightColorSep(instanceID, sp1, Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetTextMode(int TextMode)
{
	return PDFlibSetTextMode(instanceID, TextMode);
}

int PDFlibDLL::SetTextRise(double Rise)
{
	return PDFlibSetTextRise(instanceID, Rise);
}

int PDFlibDLL::SetTextScaling(double ScalePercentage)
{
	return PDFlibSetTextScaling(instanceID, ScalePercentage);
}

int PDFlibDLL::SetTextShader(const std::string& ShaderName)
{
	int sb1;
	char* sp1 = StringParm(ShaderName, sb1);
	int result;
	result = PDFlibSetTextShader(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetTextSize(double TextSize)
{
	return PDFlibSetTextSize(instanceID, TextSize);
}

int PDFlibDLL::SetTextSpacing(double Spacing)
{
	return PDFlibSetTextSpacing(instanceID, Spacing);
}

int PDFlibDLL::SetTextUnderline(int Underline)
{
	return PDFlibSetTextUnderline(instanceID, Underline);
}

int PDFlibDLL::SetTextUnderlineColor(double Red, double Green, double Blue)
{
	return PDFlibSetTextUnderlineColor(instanceID, Red, Green, Blue);
}

int PDFlibDLL::SetTextUnderlineColorCMYK(double C, double M, double Y, double K)
{
	return PDFlibSetTextUnderlineColorCMYK(instanceID, C, M, Y, K);
}

int PDFlibDLL::SetTextUnderlineColorSep(const std::string& ColorName, double Tint)
{
	int sb1;
	char* sp1 = StringParm(ColorName, sb1);
	int result;
	result = PDFlibSetTextUnderlineColorSep(instanceID, sp1, Tint);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetTextUnderlineDash(double DashOn, double DashOff)
{
	return PDFlibSetTextUnderlineDash(instanceID, DashOn, DashOff);
}

int PDFlibDLL::SetTextWordSpacing(double WordSpacing)
{
	return PDFlibSetTextWordSpacing(instanceID, WordSpacing);
}

int PDFlibDLL::SetTransparency(int Transparency)
{
	return PDFlibSetTransparency(instanceID, Transparency);
}

int PDFlibDLL::SetViewerPreferences(int Option, int NewValue)
{
	return PDFlibSetViewerPreferences(instanceID, Option, NewValue);
}

int PDFlibDLL::SetXFAFormFieldAccess(const std::string& XFAFieldName, int NewAccess)
{
	int sb1;
	char* sp1 = StringParm(XFAFieldName, sb1);
	int result;
	result = PDFlibSetXFAFormFieldAccess(instanceID, sp1, NewAccess);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetXFAFormFieldBorderColor(const std::string& XFAFieldName, double Red, double Green, double Blue)
{
	int sb1;
	char* sp1 = StringParm(XFAFieldName, sb1);
	int result;
	result = PDFlibSetXFAFormFieldBorderColor(instanceID, sp1, Red, Green, 
		Blue);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetXFAFormFieldBorderPresence(const std::string& XFAFieldName, int NewPresence)
{
	int sb1;
	char* sp1 = StringParm(XFAFieldName, sb1);
	int result;
	result = PDFlibSetXFAFormFieldBorderPresence(instanceID, sp1, 
		NewPresence);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetXFAFormFieldBorderWidth(const std::string& XFAFieldName, double BorderWidth)
{
	int sb1;
	char* sp1 = StringParm(XFAFieldName, sb1);
	int result;
	result = PDFlibSetXFAFormFieldBorderWidth(instanceID, sp1, BorderWidth);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SetXFAFormFieldValue(const std::string& XFAFieldName, const std::string& NewValue)
{
	int sb1;
	char* sp1 = StringParm(XFAFieldName, sb1);
	int sb2;
	char* sp2 = StringParm(NewValue, sb2);
	int result;
	result = PDFlibSetXFAFormFieldValue(instanceID, sp1, sp2);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::SetupPrinter(const std::string& CustomPrinterName, int Setting, int NewValue)
{
	int sb1;
	char* sp1 = StringParm(CustomPrinterName, sb1);
	int result;
	result = PDFlibSetupPrinter(instanceID, sp1, Setting, NewValue);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	return result;
}

int PDFlibDLL::SignFile(const std::string& InputFileName, const std::string& OpenPassword, const std::string& SignatureFieldName, const std::string& OutputFileName, const std::string& PFXFileName, const std::string& PFXPassword, const std::string& Reason, const std::string& Location, const std::string& ContactInfo)
{
	int sb1;
	char* sp1 = StringParm(InputFileName, sb1);
	int sb2;
	char* sp2 = StringParm(OpenPassword, sb2);
	int sb3;
	char* sp3 = StringParm(SignatureFieldName, sb3);
	int sb4;
	char* sp4 = StringParm(OutputFileName, sb4);
	int sb5;
	char* sp5 = StringParm(PFXFileName, sb5);
	int sb6;
	char* sp6 = StringParm(PFXPassword, sb6);
	int sb7;
	char* sp7 = StringParm(Reason, sb7);
	int sb8;
	char* sp8 = StringParm(Location, sb8);
	int sb9;
	char* sp9 = StringParm(ContactInfo, sb9);
	int result;
	result = PDFlibSignFile(instanceID, sp1, sp2, sp3, sp4, sp5, sp6, sp7, 
		sp8, sp9);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	if (sb3 == 1) PDFlibReleaseBuffer(instanceID, sp3);
	if (sb4 == 1) PDFlibReleaseBuffer(instanceID, sp4);
	if (sb5 == 1) PDFlibReleaseBuffer(instanceID, sp5);
	if (sb6 == 1) PDFlibReleaseBuffer(instanceID, sp6);
	if (sb7 == 1) PDFlibReleaseBuffer(instanceID, sp7);
	if (sb8 == 1) PDFlibReleaseBuffer(instanceID, sp8);
	if (sb9 == 1) PDFlibReleaseBuffer(instanceID, sp9);
	return result;
}

int PDFlibDLL::SplitPageText(int Options)
{
	return PDFlibSplitPageText(instanceID, Options);
}

int PDFlibDLL::StartPath(double StartX, double StartY)
{
	return PDFlibStartPath(instanceID, StartX, StartY);
}

int PDFlibDLL::StoreCustomDataFromFile(const std::string& Key, const std::string& FileName, int Location, int Options)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	int sb2;
	char* sp2 = StringParm(FileName, sb2);
	int result;
	result = PDFlibStoreCustomDataFromFile(instanceID, sp1, sp2, Location, 
		Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::StoreCustomDataFromString(const std::string& Key, const std::string& NewValue, int Location, int Options)
{
	int sb1;
	char* sp1 = StringParm(Key, sb1);
	int sb2;
	char* sp2 = StringParm(NewValue, sb2);
	int result;
	result = PDFlibStoreCustomDataFromString(instanceID, sp1, sp2, 
		Location, Options);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	if (sb2 == 1) PDFlibReleaseBuffer(instanceID, sp2);
	return result;
}

int PDFlibDLL::TestTempPath()
{
	return PDFlibTestTempPath(instanceID);
}

std::string PDFlibDLL::ToPDFUnicode(const std::string& Input)
{
	int sb1;
	char* sp1 = StringParm(Input, sb1);
	char* result;
	result = PDFlibToPDFUnicode(instanceID, sp1);
	if (sb1 == 1) PDFlibReleaseBuffer(instanceID, sp1);
	std::string resultStr(result, PDFlibStringResultLength(instanceID));
	return resultStr;
}

int PDFlibDLL::UpdateAppearanceStream(int Index)
{
	return PDFlibUpdateAppearanceStream(instanceID, Index);
}

int PDFlibDLL::UseKerning(int Kern)
{
	return PDFlibUseKerning(instanceID, Kern);
}

int PDFlibDLL::UseUnsafeLayers(int SafetyLevel)
{
	return PDFlibUseUnsafeLayers(instanceID, SafetyLevel);
}

