IPXC_Inst::CreateGetPageTextOptions Method
From PDF XChange PDF SDK
(→Sample) |
|||
(One intermediate revision by the same user not shown) | |||
Line 23: | Line 23: | ||
== Return Value == | == Return Value == | ||
Returns S_OK if operation was successful or error code in other cases. | Returns S_OK if operation was successful or error code in other cases. | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//C# | ||
+ | private PDFXEdit.IPXC_PageText GetTextFromPage(PDFXEdit.IPXC_Page pPage, PDFXEdit.PXV_Inst pInst) | ||
+ | { | ||
+ | //Getting PXC Instance | ||
+ | PDFXEdit.IPXC_Inst pCInst = (PDFXEdit.IPXC_Inst)pInst.GetExtension("PXC"); | ||
+ | //2 - line merge, only with neighbors (pdf or reversed pdf order) | ||
+ | PDFXEdit.IPXC_GetPageTextOptions pOpts = pCInst.CreateGetPageTextOptions(2); | ||
+ | //Getting page text | ||
+ | return pPage.GetText(pOpts); | ||
+ | } | ||
+ | </pre> | ||
== See Also == | == See Also == | ||
[[PXV:IPXC_Inst|IPXC_Inst]] | [[PXV:IPXC_Inst|IPXC_Inst]] |
Latest revision as of 07:02, 9 December 2015
The method of interface of PDF-XChange Editor SDK.
Syntax
HRESULT CreateGetPageTextOptions([in] ULONG nVersion, [out, retval] IPXC_GetPageTextOptions** pGetTextOptions);
Parameters
- nVersion
- [in] Version of the Page Text Options creation can be 1 or 2.
- 1 - partial line merge (only in pdf order)
- 2 - line merge, only with neighbors (pdf or reversed pdf order)
- pGetTextOptions
- [out, retval] Pointer to IPXC_GetPageTextOptions.
Return Value
Returns S_OK if operation was successful or error code in other cases.
Sample
//C# private PDFXEdit.IPXC_PageText GetTextFromPage(PDFXEdit.IPXC_Page pPage, PDFXEdit.PXV_Inst pInst) { //Getting PXC Instance PDFXEdit.IPXC_Inst pCInst = (PDFXEdit.IPXC_Inst)pInst.GetExtension("PXC"); //2 - line merge, only with neighbors (pdf or reversed pdf order) PDFXEdit.IPXC_GetPageTextOptions pOpts = pCInst.CreateGetPageTextOptions(2); //Getting page text return pPage.GetText(pOpts); }