Working with Pages

After starting the OCR document engine, you can begin working with the document page(s). An OCR document contains one or more pages.

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

image\sqrblit.gif Getting information about one ore more pages

image\sqrblit.gif Adding or removing pages,

image\sqrblit.gif Exporting pages.

image\sqrblit.gif Updating pages.

It may be necessary to alter the orientation of a page to make it more readable. To determine the angle necessary to orient the page, call L_DocDetectOrientationDegree. Please note that this function does not perform the orientation, it just obtains the degree of orientation necessary. Call L_DocAutoOrientPage to orient the page automatically. This function corrects the rotation of the page and automatically updates the image data.

Two functions may be used to obtain information about one or more pages in the OCR document. To determine the total number of pages in the OCR document, call L_DocGetPageCount. To get general information about a specific page, call L_DocGetPageInfo.

To add a page from an image file into the OCR document page list, call L_DocAddPage. To remove a page from the OCR document page list, call L_DocRemovePage. To enable or disable the automatic cleaning-up temporary files, call the L_DocCleanUpPages

 function.

L_DocExportPage exports a page from the OCR document to a file.

If the bitmap of a page changes, for example following the application of an image processing function, the page should by updated by calling L_DocUpdatePage. Before updating the page however, you must lock the page by calling L_DocLockPage. After updating the bitmap, unlock the page by calling L_DocUnlockPage.

To get the general fill method for the engine, call L_DocGetFillMethod. L_DocSetFillMethod updates the general fill method for the engine.

To get the default fill method for a specific page, call L_DocFindDefaultFillMethod.