op.document.OCRPages

From PDF XChange PDF SDK
Revision as of 01:22, 19 April 2016 by Palamar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Overview

The operation allows to apply the Optical Character Recognition to the selected pages with given parameters.

Parameters

Name Type Description
Input IUnknown IUnknown-based object containing the IPXC_Document which the Optical Character Recognition will be applied to.
Output Array IUnknown-based object containing the IPXC_Document processed with the Optical Character Recognition.
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);
}