op.document.OCRPages

From PDF XChange PDF SDK
Jump to: navigation, search
(Created page with "Category:Editor {{#customTitle:op.document.OCRPages}} {{#parentPage:PXV:Operations|op.document.OCRPages|operation}} {{ToWrite}} {{ToReview}} == Overview == The operation...")
 
Line 26: Line 26:
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
 +
 +
== Sample ==
 +
<pre class="brush:c#">//C#
 +
private void OCRPages(PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXV_Document Doc)
 +
{
 +
int nID = Inst.Str2ID("op.document.OCRPages", false);
 +
PDFXEdit.IOperation pOp = Inst.CreateOp(nID);
 +
PDFXEdit.ICabNode input = pOp.Params.Root["Input"];
 +
input.v = Doc;
 +
PDFXEdit.ICabNode options = pOp.Params.Root["Options"];
 +
options["PagesRange.Type"].v = "All"; //OCR all pages
 +
options["OutputType"].v = 0;
 +
options["OutputDPI"].v = 300;
 +
Inst.AsyncDoAndWaitForFinish(pOp);
 +
}
 +
</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 pOp = Inst.CreateOp(nID);
	PDFXEdit.ICabNode input = pOp.Params.Root["Input"];
	input.v = Doc;
	PDFXEdit.ICabNode options = pOp.Params.Root["Options"];
	options["PagesRange.Type"].v = "All"; //OCR all pages
	options["OutputType"].v = 0;
	options["OutputDPI"].v = 300;
	Inst.AsyncDoAndWaitForFinish(pOp);
}