OCRSettings Class
A class containing the settings of the OCR process.
Inheritance
Inherited Members
Namespace: Syncfusion.OCRProcessor
Assembly: Syncfusion.OCRProcessor.Base.dll
Syntax
public class OCRSettings
Constructors
OCRSettings()
Declaration
public OCRSettings()
Properties
AutoDetectRotation
Declaration
public bool AutoDetectRotation { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
BlackList
Gets or sets BlackList values
Declaration
public string BlackList { get; set; }
Property Value
| Type |
|---|
| System.String |
Conformance
Gets or sets the PDF conformance level
Declaration
public PdfConformanceLevel Conformance { get; set; }
Property Value
| Type | Description |
|---|---|
| PdfConformanceLevel | The PdfConformanceLevel ENUM. |
EnableNativeCall
Enabling this property will process OCR with native calls (PInvoke) instead of surrogate process.
Declaration
public bool EnableNativeCall { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ImageEnhancementOptions
Gets or sets the options used for image enhancement during OCR processing.
Declaration
public OcrImageEnhancementOptions ImageEnhancementOptions { get; set; }
Property Value
| Type |
|---|
| OcrImageEnhancementOptions |
IsCompressionEnabled
gets or sets the compression of tiff image
Declaration
public bool IsCompressionEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsImageStraighteningEnabled
Gets or sets the StraightenImage
Declaration
public bool IsImageStraighteningEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsRegionMarked
Gets or sets the Region marked
Declaration
public bool IsRegionMarked { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Language
Gets or sets OCR language
Declaration
public string Language { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The language to be OCRed |
OCREngineMode
Gets or sets OCREngineMode
Declaration
public OCREngineMode OCREngineMode { get; set; }
Property Value
| Type |
|---|
| OCREngineMode |
Remarks
OCREngineMode only supported in Tesseract version 4.0
PageSegment
Gets or sets the Page Segment Mode.
Declaration
public PageSegmentMode PageSegment { get; set; }
Property Value
| Type |
|---|
| PageSegmentMode |
Remarks
PageSegmentMode only supported in Tesseract version 4.0
Paginate
Gets or sets the pagination of the images
Declaration
public bool Paginate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Performance
Gets or sets the Perfomance of the OCR
Declaration
public Performance Performance { get; set; }
Property Value
| Type | Description |
|---|---|
| Performance | Performance of the OCR process |
Regions
Gets or sets the regions to process OCR
Declaration
public List<PageRegion> Regions { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<PageRegion> | Collection of page regions to apply OCR |
TempFolder
Declaration
public string TempFolder { set; }
Property Value
| Type |
|---|
| System.String |
TesseractVersion
To set or get the custom Tesseract version for OCR Processor.
using (OCRProcessor processor = new OCRProcessor(@"TesseractBinaries\"))
{
//Load a PDF document
PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
//Set OCR language to process
processor.Settings.Language = Languages.English;
//set the OCR Processing engine version.
processor.Settings.TesseractVersion = TesseractVersion.Default;
//Process OCR by providing the PDF document and Tesseract data
processor.PerformOCR(lDoc, @"TessData\");
//Save the OCR processed PDF document in the disk
lDoc.Save("Sample.pdf");
lDoc.Close(true);
}
Declaration
public TesseractVersion TesseractVersion { get; set; }
Property Value
| Type |
|---|
| TesseractVersion |
WhiteList
Gets or sets WhiteList values
Declaration
public string WhiteList { get; set; }
Property Value
| Type |
|---|
| System.String |