Working with OCR Pages

After starting the OCR engine, you can begin working with the document page(s). Pages can work with or without an OCR document.

The LEADTOOLS OCR methods provide support for the following tasks when working with OCR pages:

As described in Programming with LEADTOOLS OCR Advantage, an L_OcrPage handle can be created directly using the L_OcrPage_FromBitmap method without using an L_OcrDocument handle. These pages can be zoned and recognized and the OCR results can be obtained directly using L_OcrPage_GetText or L_OcrPage_GetRecognizedCharacters.

If the pages are to be saved to a final document such as PDF or DOCX, then an L_OcrDocument handle is required.

An instance of L_OcrDocument handle contains the pages of a document. You can create a new OCR document by calling the L_OcrDocumentManager_CreateDocument method. This method allows creation of memory-based or file-based documents.

Each OCR document can have one or more pages (L_OcrPage handles). L_OcrDocumentManager provides some functionality that you can use to access OCR document pages.

L_OcrDocument holds a list of L_OcrPage handles. Each of these L_OcrPage handles contains the bitmap handle used to create it (the bitmap used when the page is loaded or added) and a group of OCR zones for the page (either added manually or through auto-zoning).

L_OcrDocument provides some functionality to add, remove, get, set and iterate through the different pages of the document if the document is memory-based.

Adding a page to file-based document involves taking a snap shot of the current recognition data and storing it internally. The page itself is not added to the internal pages list and is not required to stay in memory. The user can only add new pages and not remove or iterate through them.

The following list contains the major functionality of L_OcrDocument:

<tr class="header"> 
<td><a href="">L_OcrDocument_AddPage</a></td> 
<td>Adds the recognition data of an <a href="">L_OcrPage</a> to a document. Works for both file-based and memory-based documents.</td> 
<td><a href="">L_OcrDocument_InsertPage</a></td> 
<td>Inserts the recognition data of an <a href="">L_OcrPage</a> into a specific location on a single page ofa document. Works only on memory-based documents.</td> 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.