All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::OCROptions Class Reference

#include <OCROptions.h>

Public Member Functions

 OCROptions ()
 
 ~OCROptions ()
 
OCROptionsAddIgnoreZonesForPage (const RectCollection &regions, int page_num)
 
OCROptionsAddLang (const UString &lang)
 
OCROptionsAddTextZonesForPage (const RectCollection &regions, int page_num)
 
OCROptionsAddDPI (int dpi)
 

Detailed Description

Definition at line 10 of file OCROptions.h.

Constructor & Destructor Documentation

pdftron::PDF::OCROptions::OCROptions ( )
pdftron::PDF::OCROptions::~OCROptions ( )

Member Function Documentation

OCROptions& pdftron::PDF::OCROptions::AddDPI ( int  dpi)

Knowing proper image resolution is important, as it enables the OCR engine to translate pixel heights of characters to their respective font sizes. We do our best to retrieve resolution information from the input's metadata, however it occasionally can be corrupt or missing. Hence we allow manual override of source's resolution, which supersedes any metadata found (both explicit as in image metadata and implicit as in PDF).

Parameters
dpiimage resolution
Returns
this object, for call chaining
OCROptions& pdftron::PDF::OCROptions::AddIgnoreZonesForPage ( const RectCollection regions,
int  page_num 
)

Adds a collection of ignorable regions for the given page, an optional list of page areas not to be included in analysis

Parameters
regionsthe zones to be added to the ignore list
page_numthe page number the added regions belong to
Returns
this object, for call chaining
OCROptions& pdftron::PDF::OCROptions::AddLang ( const UString lang)

Adds a language to the list of to be considered when processing this document

Parameters
langthe new language to be added to the language list
Returns
this object, for call chaining
OCROptions& pdftron::PDF::OCROptions::AddTextZonesForPage ( const RectCollection regions,
int  page_num 
)

Adds a collection of text regions of interest for the given page, an optional list of known text zones that will be used to improve OCR quality

Parameters
regionsthe zones to be added to the text region list
page_numthe page number the added regions belong to
Returns
this object, for call chaining

The documentation for this class was generated from the following file: