PXV_Inst CoClass

From PDF XChange PDF SDK
Jump to: navigation, search
(Created page with "__NOTOC__ Category:Editor {{#customTitle:PXV_Inst CoClass}} {{#parentPage:PXV:PXV_CoClasses|PXV_Inst}} {{ToReview}}")
 
Line 4: Line 4:
 
{{#parentPage:PXV:PXV_CoClasses|PXV_Inst}}
 
{{#parentPage:PXV:PXV_CoClasses|PXV_Inst}}
 
{{ToReview}}
 
{{ToReview}}
 +
 +
== 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:
 +
 +
::<tt>{973BF60B-4CC6-4be0-B408-3D80E07FC2E6}</tt>
 +
 +
The '''interface''' of control is:
 +
 +
::[[PXV:IPXV_Inst|IPXV_Inst]]
 +
 +
== 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#:
 +
 +
<pre class="brush:cpp;gutter:false">
 +
AxPDFXEdit.AxPXV_Inst pdfInst = new AxPDFXEdit.AxPXV_Inst();
 +
</pre>
 +
 +
In VB6:
 +
<pre class="brush:cpp;gutter:false">
 +
Dim pdfInst As PDFXEdit.PXV_Inst
 +
...   
 +
Set pdfInst = New PDFXEdit.PXV_Inst
 +
</pre>
 +
 +
In C++:
 +
<pre class="brush:cpp;gutter:false">
 +
CComPtr<IPXV_Inst> spPDFInst;
 +
HRESULT hr = CoCreateInstance(__uuidof(PXV_Inst), nullptr, CLSCTX_INPROC_SERVER, __uuidof(IPXV_Inst), (void**)&spPDFInst);
 +
</pre>
 +
 +
Also, exists other special way to get pointer to [[PXV:IPXV_Inst|IPXV_Inst]] interface. In C++:
 +
 +
<pre class="brush:cpp;gutter:false">
 +
#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_DLL_NAME);
 +
fnPXV_GetInstance pfn = (fnPXV_GetInstance)GetProcAddress(hSDKLib, "PXV_GetInstance");
 +
HRESULT hr = pfn(&spPDFInst);
 +
</pre>
 +
 +
== How to Use ==
 +
 +
There is required to first call of [[PXV:IPXV_Inst_Init|IPXV_Inst::Init]] before any using of SDK
 +
 +
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 [[PXV:IPXV_Control_SetLicKey|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:
 +
 +
* [[PXV:IPXV_Control_OpenDocFromPath|IPXV_Control::OpenDocFromPath]]/[[PXV:IPXV_Control_Src|IPXV_Control::Src]] to open document from specified source file name.
 +
 +
* [[PXV:IPXV_Control_PrintPages|IPXV_Control::PrintPages]] to print document pages.
 +
 +
* [[PXV:IPXV_Control_EnableEventListening|IPXV_Control::EnableEventListening]] - to enable listening of necessary Editor's events.
 +
 +
* [[PXV:IPXV_Control_CurrentPage|IPXV_Control::CurrentPage]]/[[PXV:IPXV_Control_GoToNextPage|IPXV_Control::GoToNextPage]]/[[PXV:IPXV_Control_GoToDestination|IPXV_Control::GoToDestination]] - to navigate on pages.
 +
 +
* [[PXV:IPXV_Control_Inst|IPXV_Control::Inst]] - to get access to the main object of SDK to get whole functionality.

Revision as of 18:00, 29 May 2015


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:

IPXV_Inst

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. In C++:

#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_DLL_NAME);
fnPXV_GetInstance pfn = (fnPXV_GetInstance)GetProcAddress(hSDKLib, "PXV_GetInstance");
HRESULT hr = pfn(&spPDFInst);

How to Use

There is required to first call of IPXV_Inst::Init before any using of SDK

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: