// PDF Library
// ActiveX Edition
// Copyright(c)2007-2017 losLab.com

// PDFlibAX.h
// C++ import header
// http://www.loslab.com/

#include <string>
#include <vector>
#include "Windows.h"
#include "objbase.h"
#include "comdef.h"

class PDFlibAX
{
	IDispatch* pDisp;
	VARIANT result;
	bool loaded;
	std::vector<BYTE> GetByteArray();
	std::wstring GetString();
	VARIANT MakeByteArray(std::vector<BYTE> &vector);
	void RunFunction(WCHAR * functionName,
		_variant_t p1 = vtMissing,
		_variant_t p2 = vtMissing,
		_variant_t p3 = vtMissing,
		_variant_t p4 = vtMissing,
		_variant_t p5 = vtMissing,
		_variant_t p6 = vtMissing,
		_variant_t p7 = vtMissing,
		_variant_t p8 = vtMissing,
		_variant_t p9 = vtMissing,
		_variant_t p10 = vtMissing,
		_variant_t p11 = vtMissing,
		_variant_t p12 = vtMissing,
		_variant_t p13 = vtMissing);
public:
	PDFlibAX();
	~PDFlibAX();
	bool LibraryLoaded();
	int AddArcToPath(double CenterX, double CenterY, double TotalAngle);
	int AddCJKFont(int CJKFontID);
	int AddCurveToPath(double CtAX, double CtAY, double CtBX, double CtBY, double EndX, double EndY);
	int AddEmbeddedFile(const std::wstring& FileName, const std::wstring& MIMEType);
	int AddFileAttachment(const std::wstring& Title, int EmbeddedFileID);
	int AddFormFieldSub(int Index, const std::wstring& SubName);
	int AddFormFont(int FontID);
	int AddGlobalJavaScript(const std::wstring& PackageName, const std::wstring& JavaScript);
	int AddImageFromFile(const std::wstring& FileName, int Options);
	int AddImageFromFileOffset(const std::wstring& FileName, int Offset, int DataLength, int Options);
	int AddImageFromVariant(std::vector<BYTE>& SourceData, int Options);
	int AddLGIDictToPage(const std::wstring& DictContent);
	int AddLineToPath(double EndX, double EndY);
	int AddLinkToEmbeddedFile(double Left, double Top, double Width, double Height, int EmbeddedFileID, const std::wstring& Title, int Options);
	int AddLinkToFile(double Left, double Top, double Width, double Height, const std::wstring& FileName, int Page, double Position, int NewWindow, int Options);
	int AddLinkToJavaScript(double Left, double Top, double Width, double Height, const std::wstring& JavaScript, int Options);
	int AddLinkToPage(double Left, double Top, double Width, double Height, int Page, double Position, int Options);
	int AddLinkToWeb(double Left, double Top, double Width, double Height, const std::wstring& Link, int Options);
	int AddNoteAnnotation(double Left, double Top, int AnnotType, double PopupLeft, double PopupTop, double PopupWidth, double PopupHeight, const std::wstring& Title, const std::wstring& Contents, double Red, double Green, double Blue, int Open);
	int AddPageLabels(int Start, int Style, int Offset, const std::wstring& Prefix);
	int AddSVGAnnotationFromFile(double Left, double Top, double Width, double Height, const std::wstring& FileName, int Options);
	int AddSeparationColor(const std::wstring& ColorName, double C, double M, double Y, double K, int Options);
	int AddStandardFont(int StandardFontID);
	int AddSubsettedFont(const std::wstring& FontName, int CharSet, const std::wstring& SubsetChars);
	int AddToFileList(const std::wstring& ListName, const std::wstring& FileName);
	int AddTrueTypeFont(const std::wstring& FontName, int Embed);
	int AddTrueTypeFontFromFile(const std::wstring& FileName);
	int AddType1Font(const std::wstring& FileName);
	int AddU3DAnnotationFromFile(double Left, double Top, double Width, double Height, const std::wstring& FileName, int Options);
	int AnalyseFile(const std::wstring& InputFileName, const std::wstring& Password);
	int AnnotationCount();
	int AppendSpace(double RelativeSpace);
	int AppendTableColumns(int TableID, int NewColumnCount);
	int AppendTableRows(int TableID, int NewRowCount);
	int AppendText(const std::wstring& Text);
	int ApplyStyle(const std::wstring& StyleName);
	int BeginPageUpdate();
	int CapturePage(int Page);
	int CapturePageEx(int Page, int Options);
	int CharWidth(int CharCode);
	int CheckObjects();
	int CheckPageAnnots();
	int ClearFileList(const std::wstring& ListName);
	int ClearPageLabels();
	int ClearTextFormatting();
	int CloneOutlineAction(int OutlineID);
	int ClonePages(int StartPage, int EndPage, int RepeatCount);
	int CloseOutline(int OutlineID);
	int ClosePath();
	int CombineLayers();
	int CompressContent();
	int CompressFonts(int Compress);
	int CompressImages(int Compress);
	int CompressPage();
	int CopyPageRanges(int DocumentID, const std::wstring& RangeList);
	int CreateTable(int RowCount, int ColumnCount);
	int DAAppendFile(int FileHandle);
	int DACapturePage(int FileHandle, int PageRef);
	int DACapturePageEx(int FileHandle, int PageRef, int Options);
	int DACloseFile(int FileHandle);
	int DADrawCapturedPage(int FileHandle, int DACaptureID, int DestPageRef, double PntLeft, double PntBottom, double PntWidth, double PntHeight);
	std::wstring DAExtractPageText(int FileHandle, int PageRef, int Options);
	int DAFindPage(int FileHandle, int Page);
	int DAGetFormFieldCount(int FileHandle);
	std::wstring DAGetFormFieldTitle(int FileHandle, int FieldIndex);
	std::wstring DAGetFormFieldValue(int FileHandle, int FieldIndex);
	std::vector<BYTE> DAGetImageDataToVariant(int FileHandle, int ImageListID, int ImageIndex);
	double DAGetImageDblProperty(int FileHandle, int ImageListID, int ImageIndex, int PropertyID);
	int DAGetImageIntProperty(int FileHandle, int ImageListID, int ImageIndex, int PropertyID);
	int DAGetImageListCount(int FileHandle, int ImageListID);
	std::wstring DAGetInformation(int FileHandle, const std::wstring& Key);
	int DAGetObjectCount(int FileHandle);
	std::wstring DAGetObjectSource(int FileHandle, int ObjectNumber);
	std::wstring DAGetPageContent(int FileHandle, int PageRef);
	int DAGetPageCount(int FileHandle);
	double DAGetPageHeight(int FileHandle, int PageRef);
	int DAGetPageImageList(int FileHandle, int PageRef);
	double DAGetPageWidth(int FileHandle, int PageRef);
	int DAHidePage(int FileHandle, int PageRef);
	int DAMovePage(int FileHandle, int PageRef, int TargetPageRef, int Options);
	int DANewPage(int FileHandle);
	int DANewPages(int FileHandle, int PageCount);
	int DAOpenFile(const std::wstring& InputFileName, const std::wstring& Password);
	int DAOpenFileReadOnly(const std::wstring& InputFileName, const std::wstring& Password);
	int DAPageRotation(int FileHandle, int PageRef);
	int DARenderPageToDC(int FileHandle, int PageRef, int DPI, int DC);
	int DARenderPageToFile(int FileHandle, int PageRef, int Options, int DPI, const std::wstring& FileName);
	std::vector<BYTE> DARenderPageToVariant(int FileHandle, int PageRef, int Options, int DPI);
	int DARotatePage(int FileHandle, int PageRef, int Angle, int Options);
	int DASaveAsFile(int FileHandle, const std::wstring& OutputFileName);
	int DASaveImageDataToFile(int FileHandle, int ImageListID, int ImageIndex, const std::wstring& ImageFileName);
	int DASetInformation(int FileHandle, const std::wstring& Key, const std::wstring& NewValue);
	int DASetPageSize(int FileHandle, int PageRef, double PntWidth, double PntHeight);
	int Decrypt();
	int DecryptFile(const std::wstring& InputFileName, const std::wstring& OutputFileName, const std::wstring& Password);
	int DeleteAnalysis(int AnalysisID);
	int DeleteAnnotation(int Index);
	int DeleteFormField(int Index);
	int DeleteLayer();
	int DeleteOptionalContentGroup(int OptionalContentGroupID);
	int DeletePageLGIDict(int DictIndex);
	int DeletePages(int StartPage, int PageCount);
	int DocJavaScriptAction(const std::wstring& ActionType, const std::wstring& JavaScript);
	int DocumentCount();
	int DrawArc(double XPos, double YPos, double Radius, double StartAngle, double EndAngle, int Pie, int DrawOptions);
	int DrawBarcode(double Left, double Top, double Width, double Height, const std::wstring& Text, int Barcode, int Options);
	int DrawBox(double Left, double Top, double Width, double Height, int DrawOptions);
	int DrawCapturedPage(int CaptureID, double Left, double Top, double Width, double Height);
	int DrawCircle(double XPos, double YPos, double Radius, int DrawOptions);
	int DrawDataMatrixSymbol(double Left, double Top, double ModuleSize, const std::wstring& Text, int Encoding, int SymbolSize, int Options);
	int DrawEllipse(double XPos, double YPos, double Width, double Height, int DrawOptions);
	int DrawEllipticArc(double XPos, double YPos, double Width, double Height, double StartAngle, double EndAngle, int Pie, int DrawOptions);
	int DrawHTMLText(double Left, double Top, double Width, const std::wstring& HTMLText);
	std::wstring DrawHTMLTextBox(double Left, double Top, double Width, double Height, const std::wstring& HTMLText);
	int DrawImage(double Left, double Top, double Width, double Height);
	int DrawLine(double StartX, double StartY, double EndX, double EndY);
	int DrawMultiLineText(double XPos, double YPos, const std::wstring& Delimiter, const std::wstring& Text);
	int DrawPath(int PathOptions);
	int DrawPathEvenOdd(int PathOptions);
	int DrawPostScriptXObject(int PSRef);
	int DrawRotatedCapturedPage(int CaptureID, double Left, double Bottom, double Width, double Height, double Angle);
	int DrawRotatedImage(double Left, double Bottom, double Width, double Height, double Angle);
	int DrawRotatedText(double XPos, double YPos, double Angle, const std::wstring& Text);
	int DrawRotatedTextBox(double Left, double Top, double Width, double Height, double Angle, const std::wstring& Text, int Options);
	int DrawRoundedBox(double Left, double Top, double Width, double Height, double Radius, int DrawOptions);
	int DrawScaledImage(double Left, double Top, double Scale);
	int DrawSpacedText(double XPos, double YPos, double Spacing, const std::wstring& Text);
	double DrawTableRows(int TableID, double Left, double Top, double Height, int FirstRow, int LastRow);
	int DrawText(double XPos, double YPos, const std::wstring& Text);
	int DrawTextArc(double XPos, double YPos, double Radius, double Angle, const std::wstring& Text, int DrawOptions);
	int DrawTextBox(double Left, double Top, double Width, double Height, const std::wstring& Text, int Options);
	int DrawWrappedText(double XPos, double YPos, double Width, const std::wstring& Text);
	int EditableLayer();
	int EmbedFile(const std::wstring& Title, const std::wstring& FileName, const std::wstring& MIMEType);
	int EmbeddedFileCount();
	int EncapsulateLayer();
	int EncodePermissions(int CanPrint, int CanCopy, int CanChange, int CanAddNotes, int CanFillFields, int CanCopyAccess, int CanAssemble, int CanPrintFull);
	int Encrypt(const std::wstring& Owner, const std::wstring& User, int Strength, int Permissions);
	int EncryptFile(const std::wstring& InputFileName, const std::wstring& OutputFileName, const std::wstring& Owner, const std::wstring& User, int Strength, int Permissions);
	int EncryptWithFingerprint(const std::wstring& Fingerprint);
	int EncryptionAlgorithm();
	int EncryptionStatus();
	int EncryptionStrength();
	int EndPageUpdate();
	std::wstring ExtractFilePageContent(const std::wstring& InputFileName, const std::wstring& Password, int Page);
	std::wstring ExtractFilePageText(const std::wstring& InputFileName, const std::wstring& Password, int Page, int Options);
	int ExtractFilePages(const std::wstring& InputFileName, const std::wstring& OutputFileName, const std::wstring& RangeList);
	int ExtractPageRanges(const std::wstring& RangeList);
	int ExtractPages(int StartPage, int PageCount);
	int FileListCount(const std::wstring& ListName);
	std::wstring FileListItem(const std::wstring& ListName, int Index);
	int FindFonts();
	int FindFormFieldByTitle(const std::wstring& Title);
	int FindImages();
	int FitImage(double Left, double Top, double Width, double Height, int HAlign, int VAlign, int Rotate);
	int FitRotatedTextBox(double Left, double Top, double Width, double Height, double Angle, const std::wstring& Text, int Options);
	int FitTextBox(double Left, double Top, double Width, double Height, const std::wstring& Text, int Options);
	int FlattenFormField(int Index);
	int FontCount();
	std::wstring FontFamily();
	int FontHasKerning();
	std::wstring FontName();
	std::wstring FontReference();
	int FontSize();
	int FontType();
	int FormFieldCount();
	int FormFieldHasParent(int Index);
	int FormFieldJavaScriptAction(int Index, const std::wstring& ActionType, const std::wstring& JavaScript);
	int FormFieldWebLinkAction(int Index, const std::wstring& ActionType, const std::wstring& Link);
	std::wstring GetActionType(int ActionID);
	std::wstring GetAnalysisInfo(int AnalysisID, int AnalysisItem);
	int GetAnnotActionID(int Index);
	double GetAnnotDblProperty(int Index, int Tag);
	int GetAnnotIntProperty(int Index, int Tag);
	std::wstring GetAnnotStrProperty(int Index, int Tag);
	double GetBarcodeWidth(double NominalWidth, const std::wstring& Text, int Barcode);
	int GetCanvasDC(int Width, int Height);
	std::wstring GetCatalogInformation(const std::wstring& Key);
	std::wstring GetCustomInformation(const std::wstring& Key);
	std::wstring GetCustomKeys(int Location);
	std::wstring GetDefaultPrinterName();
	int GetDestPage(int DestID);
	int GetDestType(int DestID);
	double GetDestValue(int DestID, int ValueKey);
	std::wstring GetDocJavaScript(const std::wstring& ActionType);
	int GetDocumentID(int Index);
	std::wstring GetDocumentIdentifier(int Part, int Options);
	std::wstring GetDocumentMetadata();
	std::wstring GetDocumentResourceList();
	int GetEmbeddedFileContentToFile(int Index, const std::wstring& FileName);
	std::vector<BYTE> GetEmbeddedFileContentToVariant(int Index);
	int GetEmbeddedFileIntProperty(int Index, int Tag);
	std::wstring GetEmbeddedFileStrProperty(int Index, int Tag);
	std::wstring GetEncryptionFingerprint();
	std::wstring GetFileMetadata(const std::wstring& InputFileName);
	int GetFirstChildOutline(int OutlineID);
	int GetFirstOutline();
	int GetFontID(int Index);
	int GetFontObjectNumber();
	int GetFormFieldAlignment(int Index);
	int GetFormFieldAnnotFlags(int Index);
	double GetFormFieldBackgroundColor(int Index, int ColorComponent);
	double GetFormFieldBorderColor(int Index, int ColorComponent);
	double GetFormFieldBorderProperty(int Index, int PropKey);
	int GetFormFieldBorderStyle(int Index);
	double GetFormFieldBound(int Index, int Edge);
	std::wstring GetFormFieldCaption(int Index);
	std::wstring GetFormFieldChildTitle(int Index);
	int GetFormFieldChoiceType(int Index);
	double GetFormFieldColor(int Index, int ColorComponent);
	int GetFormFieldComb(int Index);
	std::wstring GetFormFieldDefaultValue(int Index);
	std::wstring GetFormFieldDescription(int Index);
	int GetFormFieldFlags(int Index);
	std::wstring GetFormFieldFontName(int Index);
	std::wstring GetFormFieldJavaScript(int Index, const std::wstring& ActionType);
	int GetFormFieldKidCount(int Index);
	int GetFormFieldMaxLen(int Index);
	int GetFormFieldPage(int Index);
	int GetFormFieldPrintable(int Index);
	int GetFormFieldReadOnly(int Index);
	int GetFormFieldRotation(int Index);
	int GetFormFieldSubCount(int Index);
	std::wstring GetFormFieldSubName(int Index, int SubIndex);
	int GetFormFieldSubTempIndex(int Index, int SubIndex);
	int GetFormFieldTabOrder(int Index);
	int GetFormFieldTextFlags(int Index, int ValueKey);
	double GetFormFieldTextSize(int Index);
	std::wstring GetFormFieldTitle(int Index);
	int GetFormFieldType(int Index);
	std::wstring GetFormFieldValue(int Index);
	std::wstring GetFormFieldValueByTitle(const std::wstring& Title);
	int GetFormFieldVisible(int Index);
	std::wstring GetFormFieldWebLink(int Index, const std::wstring& ActionType);
	int GetFormFontCount();
	std::wstring GetFormFontName(int FontIndex);
	std::wstring GetGlobalJavaScript(const std::wstring& PackageName);
	double GetHTMLTextHeight(double Width, const std::wstring& HTMLText);
	int GetHTMLTextLineCount(double Width, const std::wstring& HTMLText);
	double GetHTMLTextWidth(double MaxWidth, const std::wstring& HTMLText);
	int GetImageID(int Index);
	int GetImagePageCount(const std::wstring& FileName);
	std::wstring GetInformation(int Key);
	int GetKerning(const std::wstring& CharPair);
	int GetNamedDestination(const std::wstring& DestName);
	int GetNextOutline(int OutlineID);
	int GetObjectCount();
	std::wstring GetObjectSource(int ObjectNumber);
	int GetOpenActionDestination();
	std::wstring GetOpenActionJavaScript();
	int GetOptionalContentGroupID(int Index);
	std::wstring GetOptionalContentGroupName(int OptionalContentGroupID);
	int GetOrigin();
	int GetOutlineActionID(int OutlineID);
	double GetOutlineColor(int OutlineID, int ColorComponent);
	int GetOutlineDest(int OutlineID);
	int GetOutlineID(int Index);
	std::wstring GetOutlineJavaScript(int OutlineID);
	std::wstring GetOutlineOpenFile(int OutlineID);
	int GetOutlinePage(int OutlineID);
	int GetOutlineStyle(int OutlineID);
	std::wstring GetOutlineWebLink(int OutlineID);
	double GetPageBox(int BoxType, int Dimension);
	std::wstring GetPageContent();
	std::wstring GetPageJavaScript(const std::wstring& ActionType);
	std::wstring GetPageLGIDictContent(int DictIndex);
	int GetPageLGIDictCount();
	std::wstring GetPageLabel(int Page);
	int GetPageLayout();
	int GetPageMode();
	std::wstring GetPageText(int ExtractOptions);
	int GetParentOutline(int OutlineID);
	int GetPrevOutline(int OutlineID);
	std::wstring GetPrinterBins(const std::wstring& PrinterName);
	std::wstring GetPrinterNames();
	std::wstring GetSubsetString(const std::wstring& InputStr);
	double GetTableCellDblProperty(int TableID, int RowNumber, int ColumnNumber, int Tag);
	int GetTableCellIntProperty(int TableID, int RowNumber, int ColumnNumber, int Tag);
	std::wstring GetTableCellStrProperty(int TableID, int RowNumber, int ColumnNumber, int Tag);
	int GetTableColumnCount(int TableID);
	int GetTableLastDrawnRow(int TableID);
	int GetTableRowCount(int TableID);
	std::wstring GetTempPath();
	double GetTextAscent();
	double GetTextBound(int Edge);
	double GetTextDescent();
	double GetTextHeight();
	double GetTextSize();
	double GetTextWidth(const std::wstring& Text);
	int GetViewerPreferences(int Option);
	std::wstring GetWrappedText(double Width, const std::wstring& Delimiter, const std::wstring& Text);
	std::wstring GetWrappedTextBreakString(double Width, const std::wstring& Delimiter, const std::wstring& Text);
	double GetWrappedTextHeight(double Width, const std::wstring& Text);
	int GetWrappedTextLineCount(double Width, const std::wstring& Text);
	int GetXFAFormFieldCount();
	std::wstring GetXFAFormFieldName(int Index);
	std::wstring GetXFAFormFieldNames(const std::wstring& Delimiter);
	std::wstring GetXFAFormFieldValue(const std::wstring& XFAFieldName);
	int GlobalJavaScriptCount();
	std::wstring GlobalJavaScriptPackageName(int Index);
	int HasFontResources();
	int HasPageBox(int BoxType);
	int HidePage();
	int ImageCount();
	int ImageFillColor();
	int ImageHeight();
	int ImageHorizontalResolution();
	int ImageResolutionUnits();
	int ImageType();
	int ImageVerticalResolution();
	int ImageWidth();
	int ImportEMFFromFile(const std::wstring& FileName, int FontOptions, int GeneralOptions);
	int InsertPages(int StartPage, int PageCount);
	int InsertTableColumns(int TableID, int Position, int NewColumnCount);
	int InsertTableRows(int TableID, int Position, int NewRowCount);
	int LastErrorCode();
	std::wstring LastRenderError();
	int LayerCount();

	std::wstring LibraryVersion();

	int Linearized();
	int LoadFromCanvasDC(double DPI, int Options);
	int LoadFromFile(const std::wstring& FileName);
	int LoadFromVariant(std::vector<BYTE>& Source);
	int LoadState();
	int MergeDocument(int DocumentID);
	int MergeFileList(const std::wstring& ListName, const std::wstring& OutputFileName);
	int MergeFileListFast(const std::wstring& ListName, const std::wstring& OutputFileName);
	int MergeFiles(const std::wstring& FirstFileName, const std::wstring& SecondFileName, const std::wstring& OutputFileName);
	int MergeTableCells(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn);
	int MoveLayer(int FromPosition, int ToPosition);
	int MoveOutlineAfter(int OutlineID, int SiblingID);
	int MoveOutlineBefore(int OutlineID, int SiblingID);
	int MovePage(int NewPosition);
	int MovePath(double NewX, double NewY);
	int MultiplyScale(double MultScaleBy);
	std::wstring NewCustomPrinter(const std::wstring& OriginalPrinterName);
	int NewDocument();
	int NewFormField(const std::wstring& Title, int FieldType);
	int NewLayer();
	int NewOptionalContentGroup(const std::wstring& GroupName);
	int NewOutline(int Parent, const std::wstring& Title, int DestPage, double DestPosition);
	int NewPage();
	int NewPages(int PageCount);
	int NewPostScriptXObject(const std::wstring& PS);
	int NewRGBAxialShader(const std::wstring& ShaderName, double StartX, double StartY, double StartRed, double StartGreen, double StartBlue, double EndX, double EndY, double EndRed, double EndGreen, double EndBlue, int Extend);
	int NewStaticOutline(int Parent, const std::wstring& Title);
	int OpenOutline(int OutlineID);
	int OptionalContentGroupCount();
	int OutlineCount();
	std::wstring OutlineTitle(int OutlineID);
	int PageCount();
	double PageHeight();
	int PageJavaScriptAction(const std::wstring& ActionType, const std::wstring& JavaScript);
	int PageRotation();
	double PageWidth();
	int PrintDocument(const std::wstring& PrinterName, int StartPage, int EndPage, int Options);
	int PrintOptions(int PageScaling, int AutoRotateCenter, const std::wstring& Title);
	int RemoveAppearanceStream(int Index);
	int RemoveDocument(int DocumentID);
	int RemoveOutline(int OutlineID);
	int RemoveSharedLayers();
	int RemoveStyle(const std::wstring& StyleName);
	int RenderDocumentToFile(int DPI, int StartPage, int EndPage, int Options, const std::wstring& FileName);
	int RenderPageToDC(int DPI, int Page, int DC);
	int RenderPageToFile(int DPI, int Page, int Options, const std::wstring& FileName);
	std::vector<BYTE> RenderPageToVariant(int DPI, int Page, int Options);
	int ReplaceFonts();
	int ReplaceImage(int OriginalImageID, int NewImageID);
	int ReplaceTag(const std::wstring& Tag, const std::wstring& NewValue);
	int RetrieveCustomDataToFile(const std::wstring& Key, const std::wstring& FileName, int Location);
	std::wstring RetrieveCustomDataToString(const std::wstring& Key, int Location);
	std::vector<BYTE> RetrieveCustomDataToVariant(const std::wstring& Key, int Location);
	int ReverseImage(int Reset);
	int RotatePage(int PageRotation);
	int SaveFontToFile(const std::wstring& FileName);
	int SaveImageToFile(const std::wstring& FileName);
	int SaveState();
	int SaveStyle(const std::wstring& StyleName);
	int SaveToFile(const std::wstring& FileName);
	std::vector<BYTE> SaveToVariant();
	int SecurityInfo(int SecurityItem);
	int SelectDocument(int DocumentID);
	int SelectFont(int FontID);
	int SelectImage(int ImageID);
	int SelectLayer(int NewLayer);
	int SelectPage(int PageNumber);
	int SelectedDocument();
	int SelectedFont();
	int SelectedImage();
	int SelectedPage();
	int SetAdvancePassword(const std::wstring& Password);
	int SetAnnotContents(int Index, const std::wstring& NewContents);
	int SetAnnotStrProperty(int Index, int Tag, const std::wstring& NewValue);
	int SetBaseURL(const std::wstring& NewBaseURL);
	int SetBlendMode(int BlendMode);
	int SetBreakString(const std::wstring& NewBreakString);
	int SetCapturedPageOptional(int CaptureID, int OptionalContentGroupID);
	int SetCatalogInformation(const std::wstring& Key, const std::wstring& NewValue);
	int SetCharWidth(int CharCode, int NewWidth);
	int SetClippingPath();
	int SetClippingPathEvenOdd();
	int SetCropBox(double Left, double Top, double Width, double Height);
	int SetCustomInformation(const std::wstring& Key, const std::wstring& NewValue);
	int SetCustomLineDash(const std::wstring& DashPattern, double DashPhase);
	int SetPDFiumFileName(const std::wstring& FileName);	
	int SetDocumentMetadata(const std::wstring& XMP);
	int SetFillColor(double Red, double Green, double Blue);
	int SetFillColorCMYK(double C, double M, double Y, double K);
	int SetFillColorSep(const std::wstring& ColorName, double Tint);
	int SetFillShader(const std::wstring& ShaderName);
	int SetFontEncoding(int Encoding);
	int SetFontFlags(int Fixed, int Serif, int Symbolic, int Script, int Italic, int AllCap, int SmallCap, int ForceBold);
	int SetFormFieldAlignment(int Index, int Alignment);
	int SetFormFieldAnnotFlags(int Index, int NewFlags);
	int SetFormFieldBackgroundColor(int Index, double Red, double Green, double Blue);
	int SetFormFieldBackgroundColorCMYK(int Index, double C, double M, double Y, double K);
	int SetFormFieldBackgroundColorSep(int Index, const std::wstring& ColorName, double Tint);
	int SetFormFieldBorderColor(int Index, double Red, double Green, double Blue);
	int SetFormFieldBorderColorCMYK(int Index, double C, double M, double Y, double K);
	int SetFormFieldBorderColorSep(int Index, const std::wstring& ColorName, double Tint);
	int SetFormFieldBorderStyle(int Index, double Width, int Style, double DashOn, double DashOff);
	int SetFormFieldBounds(int Index, double Left, double Top, double Width, double Height);
	int SetFormFieldCalcOrder(int Index, int Order);
	int SetFormFieldCaption(int Index, const std::wstring& NewCaption);
	int SetFormFieldCheckStyle(int Index, int CheckStyle, int Position);
	int SetFormFieldChildTitle(int Index, const std::wstring& NewTitle);
	int SetFormFieldColor(int Index, double Red, double Green, double Blue);
	int SetFormFieldColorCMYK(int Index, double C, double M, double Y, double K);
	int SetFormFieldColorSep(int Index, const std::wstring& ColorName, double Tint);
	int SetFormFieldComb(int Index, int Comb);
	int SetFormFieldDefaultValue(int Index, const std::wstring& NewDefaultValue);
	int SetFormFieldDescription(int Index, const std::wstring& NewValue);
	int SetFormFieldFlags(int Index, int NewFlags);
	int SetFormFieldFont(int Index, int FontIndex);
	int SetFormFieldHighlightMode(int Index, int NewMode);
	int SetFormFieldIcon(int Index, int IconType, int CaptureID);
	int SetFormFieldIconStyle(int Index, int Placement, int Scale, int ScaleType, int HorizontalShift, int VerticalShift);
	int SetFormFieldMaxLen(int Index, int NewMaxLen);
	int SetFormFieldOptional(int Index, int OptionalContentGroupID);
	int SetFormFieldPage(int Index, int NewPage);
	int SetFormFieldPrintable(int Index, int Printable);
	int SetFormFieldReadOnly(int Index, int ReadOnly);
	int SetFormFieldRotation(int Index, int Angle);
	int SetFormFieldStandardFont(int Index, int StandardFontID);
	int SetFormFieldTabOrder(int Index, int Order);
	int SetFormFieldTextFlags(int Index, int Multiline, int Password, int FileSelect, int DoNotSpellCheck, int DoNotScroll);
	int SetFormFieldTextSize(int Index, double NewTextSize);
	int SetFormFieldValue(int Index, const std::wstring& NewValue);
	int SetFormFieldValueByTitle(const std::wstring& Title, const std::wstring& NewValue);
	int SetFormFieldVisible(int Index, int Visible);
	int SetGDIPlusFileName(const std::wstring& DLLFileName);
	int SetGDIPlusOptions(int OptionID, int NewValue);
	int SetHTMLBoldFont(const std::wstring& FontSet, int FontID);
	int SetHTMLBoldItalicFont(const std::wstring& FontSet, int FontID);
	int SetHTMLItalicFont(const std::wstring& FontSet, int FontID);
	int SetHTMLNormalFont(const std::wstring& FontSet, int FontID);
	int SetImageAsMask(int MaskType);
	int SetImageMask(double FromRed, double FromGreen, double FromBlue, double ToRed, double ToGreen, double ToBlue);
	int SetImageMaskCMYK(double FromC, double FromM, double FromY, double FromK, double ToC, double ToM, double ToY, double ToK);
	int SetImageMaskFromImage(int ImageID);
	int SetImageOptional(int OptionalContentGroupID);
	int SetInformation(int Key, const std::wstring& NewValue);
	int SetJPEGQuality(int Quality);
	int SetJavaScriptMode(int JSMode);
	int SetKerning(const std::wstring& CharPair, int Adjustment);
	int SetLayerOptional(int OptionalContentGroupID);
	int SetLineCap(int LineCap);
	int SetLineColor(double Red, double Green, double Blue);
	int SetLineColorCMYK(double C, double M, double Y, double K);
	int SetLineColorSep(const std::wstring& ColorName, double Tint);
	int SetLineDash(double DashOn, double DashOff);
	int SetLineJoin(int LineJoin);
	int SetLineShader(const std::wstring& ShaderName);
	int SetLineWidth(double LineWidth);
	int SetMeasurementUnits(int MeasurementUnits);
	int SetNeedAppearances(int NewValue);
	int SetOpenActionDestination(int OpenPage, int Zoom);
	int SetOpenActionDestinationFull(int OpenPage, int Zoom, int DestType, double Left, double Top, double Right, double Bottom);
	int SetOpenActionJavaScript(const std::wstring& JavaScript);
	int SetOpenActionMenu(const std::wstring& MenuItem);
	int SetOptionalContentGroupPrintable(int OptionalContentGroupID, int Printable);
	int SetOptionalContentGroupVisible(int OptionalContentGroupID, int Visible);
	int SetOrigin(int Origin);
	int SetOutlineColor(int OutlineID, double Red, double Green, double Blue);
	int SetOutlineDestination(int OutlineID, int DestPage, double DestPosition);
	int SetOutlineDestinationFull(int OutlineID, int DestPage, int Zoom, int DestType, double Left, double Top, double Right, double Bottom);
	int SetOutlineDestinationZoom(int OutlineID, int DestPage, double DestPosition, int Zoom);
	int SetOutlineJavaScript(int OutlineID, const std::wstring& JavaScript);
	int SetOutlineOpenFile(int OutlineID, const std::wstring& FileName);
	int SetOutlineStyle(int OutlineID, int SetItalic, int SetBold);
	int SetOutlineTitle(int OutlineID, const std::wstring& NewTitle);
	int SetOutlineWebLink(int OutlineID, const std::wstring& Link);
	int SetPNGTransparencyColor(int RedByte, int GreenByte, int BlueByte);
	int SetPageActionMenu(const std::wstring& MenuItem);
	int SetPageContent(const std::wstring& NewContent);
	int SetPageDimensions(double NewPageWidth, double NewPageHeight);
	int SetPageLayout(int NewPageLayout);
	int SetPageMode(int NewPageMode);
	int SetPageSize(const std::wstring& PaperName);
	int SetPageThumbnail();
	int SetPageTransparencyGroup(int CS, int Isolate, int Knockout);
	int SetPassword(const std::wstring& Password);
	int SetPrecision(int NewPrecision);
	int SetScale(double NewScale);
	int SetTableBorderColor(int TableID, int BorderIndex, double Red, double Green, double Blue);
	int SetTableBorderColorCMYK(int TableID, int BorderIndex, double C, double M, double Y, double K);
	int SetTableBorderWidth(int TableID, int BorderIndex, double NewWidth);
	int SetTableCellAlignment(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int NewCellAlignment);
	int SetTableCellBackgroundColor(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double Red, double Green, double Blue);
	int SetTableCellBackgroundColorCMYK(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double C, double M, double Y, double K);
	int SetTableCellBorderColor(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double Red, double Green, double Blue);
	int SetTableCellBorderColorCMYK(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double C, double M, double Y, double K);
	int SetTableCellBorderWidth(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double NewWidth);
	int SetTableCellContent(int TableID, int RowNumber, int ColumnNumber, const std::wstring& HTMLText);
	int SetTableCellPadding(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, int BorderIndex, double NewPadding);
	int SetTableCellTextColor(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double Red, double Green, double Blue);
	int SetTableCellTextColorCMYK(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double C, double M, double Y, double K);
	int SetTableCellTextSize(int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double NewTextSize);
	int SetTableColumnWidth(int TableID, int FirstColumn, int LastColumn, double NewWidth);
	int SetTableRowHeight(int TableID, int FirstRow, int LastRow, double NewHeight);
	int SetTempFile(const std::wstring& FileName);
	int SetTempPath(const std::wstring& NewPath);
	int SetTextAlign(int TextAlign);
	int SetTextCharSpacing(double CharSpacing);
	int SetTextColor(double Red, double Green, double Blue);
	int SetTextColorCMYK(double C, double M, double Y, double K);
	int SetTextColorSep(const std::wstring& ColorName, double Tint);
	int SetTextHighlight(int Highlight);
	int SetTextHighlightColor(double Red, double Green, double Blue);
	int SetTextHighlightColorCMYK(double C, double M, double Y, double K);
	int SetTextHighlightColorSep(const std::wstring& ColorName, double Tint);
	int SetTextMode(int TextMode);
	int SetTextRise(double Rise);
	int SetTextScaling(double ScalePercentage);
	int SetTextShader(const std::wstring& ShaderName);
	int SetTextSize(double TextSize);
	int SetTextSpacing(double Spacing);
	int SetTextUnderline(int Underline);
	int SetTextUnderlineColor(double Red, double Green, double Blue);
	int SetTextUnderlineColorCMYK(double C, double M, double Y, double K);
	int SetTextUnderlineColorSep(const std::wstring& ColorName, double Tint);
	int SetTextUnderlineDash(double DashOn, double DashOff);
	int SetTextWordSpacing(double WordSpacing);
	int SetTransparency(int Transparency);
	int SetViewerPreferences(int Option, int NewValue);
	int SetXFAFormFieldAccess(const std::wstring& XFAFieldName, int NewAccess);
	int SetXFAFormFieldBorderColor(const std::wstring& XFAFieldName, double Red, double Green, double Blue);
	int SetXFAFormFieldBorderPresence(const std::wstring& XFAFieldName, int NewPresence);
	int SetXFAFormFieldBorderWidth(const std::wstring& XFAFieldName, double BorderWidth);
	int SetXFAFormFieldValue(const std::wstring& XFAFieldName, const std::wstring& NewValue);
	int SetupPrinter(const std::wstring& CustomPrinterName, int Setting, int NewValue);
	int SignFile(const std::wstring& InputFileName, const std::wstring& OpenPassword, const std::wstring& SignatureFieldName, const std::wstring& OutputFileName, const std::wstring& PFXFileName, const std::wstring& PFXPassword, const std::wstring& Reason, const std::wstring& Location, const std::wstring& ContactInfo);
	int SplitPageText(int Options);
	int StartPath(double StartX, double StartY);
	int StoreCustomDataFromFile(const std::wstring& Key, const std::wstring& FileName, int Location, int Options);
	int StoreCustomDataFromString(const std::wstring& Key, const std::wstring& NewValue, int Location, int Options);
	int StoreCustomDataFromVariant(const std::wstring& Key, std::vector<BYTE>& NewValue, int Location, int Options);
	int TestTempPath();
	std::wstring ToPDFUnicode(const std::wstring& Input);
	int UpdateAppearanceStream(int Index);
	int UseKerning(int Kern);
	int UseUnsafeLayers(int SafetyLevel);
};
