The OCRResult class represents an object that contains the result of an OCR. This class has the following methods

OCRResult Class:
String Get Returns the OCR result in a base64 encoded string. If EnumDWT_OCROutputFormat is set to either of the PDF options, the resulting string contains the binary data for the resulting PDF using Base64 encoding. This data can be decoded and saved to a file to get a normal PDF.
int GetErrorCode Returns the OCR error code.
String GetErrorString Returns the OCR error string.
ErrorInfoArray GetErrorDetailList Returns an array which contains detailed error information for each file OCR'd. Please check out ErrorInfo
ArrayList GetInput Returns the input information of the OCR. For the methods Recognize, RecognizeRect & RecognizeSelectedImages, this returns an index or an array of the indices. For the method RecognizeFile, this returns the path of the file or an array of all the paths of the OCR'd files.
void Save(string strOutputFile) Saves the OCR result as a .txt file or a .pdf file,etc. on the local disk.
int GetOCRTotalCount Returns how many pages are allowed to be OCR'd by the current license. E.g. 300000.
int GetAlreadyOCRCount Returns how many pages have been OCR'd.
int GetPageCount Returns how many pages there are in the OCR result.
PageResult GetPageContent(int PageIndex) Returns the content for a page in the OCR result. The page is specified by PageIndex.

The PageResult class represents an object that holds information for a specified page. The PageResult class has the following methods

PageResult Class:
int GetLetterCount Returns how many letters are recognized on the specified page.
LetterResult GetLetterContent(int LetterIndex) Returns an object which holds information for the letter specified by LetterIndex.

The LetterResult class represents an object that holds information for a specified letter. The LetterResult class has the following methods

LetterResult Class:
string GetLetterRect Returns the coordinates for the rectangle that contains a specified letter in a specified page. The coordinates string is in the format of "left,top,right,bottom". For example: "12,25,200,50".
string GetText Returns the text of the specified letter in the OCR result.
ErrorInfo Class:
string GetInput This returns the file path or the index of the Input.
string GetMessage Returns the error message.
string GetPage Returns the number of the page on which the error was thrown. If GetInput returns a file path, then this returns the index of the page in that file. If GetInput returns an index, then GetPage is always "0".
Is this page helpful?

Leave a Reply