PXV_Inst CoClass
Overview
The main ActiveX-object of PDF-XChange Editor SDK that provides part of general functionality and gives access to additional extensions of SDK.
The GUID of object is:
- {973BF60B-4CC6-4be0-B408-3D80E07FC2E6}
The interface of control is:
How to Instantiate
You may instantiate the object in standard way by using the CoCreateInstance function or by any other method that is appropriate for instantiating of ActiveX-objects in your programming language.
For example, in C#:
AxPDFXEdit.AxPXV_Inst pdfInst = new AxPDFXEdit.AxPXV_Inst();
In VB6:
Dim pdfInst As PDFXEdit.PXV_Inst ... Set pdfInst = New PDFXEdit.PXV_Inst
In C++:
CComPtr<IPXV_Inst> spPDFInst; HRESULT hr = CoCreateInstance(__uuidof(PXV_Inst), nullptr, CLSCTX_INPROC_SERVER, __uuidof(IPXV_Inst), (void**)&spPDFInst);
Also, exists other special way to get pointer to IPXV_Inst interface. For example, in C++:
typedef HRESULT (__cdecl *t_pPXV_GetInstance)(IPXV_Inst** ppInst); #if defined _M_IX86 #define SDK_LIB_NAME L"PDFXEditCore.x86.DLL" #else #define SDK_LIB_NAME L"PDFXEditCore.x64.DLL" #endif CComPtr<IPXV_Inst> spPDFInst; HMODULE hSDKLib = LoadLibrary(SDK_LIB_NAME); t_pPXV_GetInstance pfn = (t_pPXV_GetInstance)GetProcAddress(hSDKLib, "PXV_GetInstance"); HRESULT hr = pfn(&spPDFInst);
- with this special method you will be able to use SDK without regular installation of ActiveX objects from SDK on the client machines. In other words - without standard registering of all ActiveX-objects from the SDK. And it will work for you, excepting one moment - in this case you will be unable to instantiate the simple ActiveX Control (PXV_Control).
How to Use
There is required to call firstly the IPXV_Inst::Init function before any using of SDK. But, if you have firstly created the PXV_Control object then you may do not call this function because it is already done by creating of the PXV_Control-object. Other important moment: when you finishing work with SDK then you should call the IPXV_Inst::Shutdown method to release all used resources, to stop correctly all working threads, etc. But, if you didn't called the IPXV_Inst::Init directly and used only simple PXV_Control object then you may do not call it.
Firstly is recommended to specify your developer's license key for PDF-XChange Editor SDK to prevent the showing the DEMO labels across the pages. For it you should use the IPXV_Control:SetLicKey method. After that you will be able to use whole API without any showing and placing of DEMO-labels. The most popular features you may use on beginning:
- IPXV_Control::OpenDocFromPath/IPXV_Control::Src to open document from specified source file name.
- IPXV_Control::PrintPages to print document pages.
- IPXV_Control::EnableEventListening - to enable listening of necessary Editor's events.
- IPXV_Control::CurrentPage/IPXV_Control::GoToNextPage/IPXV_Control::GoToDestination - to navigate on pages.
- IPXV_Control::Inst - to get access to the main object of SDK to get whole functionality.