Working with Pages

After starting the OCR document engine, the user must populate the internal OCR document with one or more pages. To add one or more pages to the OCR document, call the AddPage method. To remove a page from the OCR document, call RemovePage. To enable or disable the automatic cleaning-up temporary files, call the CleanupPages method.

It may be necessary to alter the orientation of a page to make it more readable. This is done by rotating the page until the top of the page is located properly. This can be done automatically by calling the AutoOrientPage method. This method corrects the rotation of the page and automatically updates the image data. The angle by which the page needs to be rotated can be obtained for a specific page by reading the DetectOrientationDegree property.

Several properties are maintained internally and updated with information about one or more pages in the OCR document. When either the AddPage method or the RemovePage method returns, the PageCount property is updated with the total number of pages in the OCR document. In addition, the height, width and bits per pixel are maintained internally for each page of the OCR document. This information can be obtained for each page through the PageHeight, PageWidth and PageBitsPerPixel properties.

If the bitmap of a page changes, for example following the application of an image processing method, the page should be updated by calling the UpdatePage method.

The ExportPage method exports a page from the OCR document to a raster object.

The pages of the OCR document can be recognized with or without zones on the pages. For more information on zones, refer to Working with Zones.