op.document.OCRPages
From PDF XChange PDF SDK
(→Sample) |
|||
Line 32: | Line 32: | ||
{ | { | ||
int nID = Inst.Str2ID("op.document.OCRPages", false); | int nID = Inst.Str2ID("op.document.OCRPages", false); | ||
− | PDFXEdit.IOperation | + | PDFXEdit.IOperation Op = Inst.CreateOp(nID); |
− | PDFXEdit.ICabNode input = | + | PDFXEdit.ICabNode input = Op.Params.Root["Input"]; |
input.v = Doc; | input.v = Doc; | ||
− | PDFXEdit.ICabNode options = | + | PDFXEdit.ICabNode options = Op.Params.Root["Options"]; |
options["PagesRange.Type"].v = "All"; //OCR all pages | options["PagesRange.Type"].v = "All"; //OCR all pages | ||
options["OutputType"].v = 0; | options["OutputType"].v = 0; | ||
options["OutputDPI"].v = 300; | options["OutputDPI"].v = 300; | ||
− | Inst.AsyncDoAndWaitForFinish( | + | Inst.AsyncDoAndWaitForFinish(Op); |
} | } | ||
</pre> | </pre> |
Revision as of 01:18, 19 April 2016
Overview
The operation overview...
Parameters
Name | Type | Description |
---|---|---|
Input | Array | Array of IUnknown -based objects.
|
Output | Array | Array of IUnknown -based objects.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void OCRPages(PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXV_Document Doc) { int nID = Inst.Str2ID("op.document.OCRPages", false); PDFXEdit.IOperation Op = Inst.CreateOp(nID); PDFXEdit.ICabNode input = Op.Params.Root["Input"]; input.v = Doc; PDFXEdit.ICabNode options = Op.Params.Root["Options"]; options["PagesRange.Type"].v = "All"; //OCR all pages options["OutputType"].v = 0; options["OutputDPI"].v = 300; Inst.AsyncDoAndWaitForFinish(Op); }