Nicomsoft OCR: Developer's Guide


Img_SetPage


Syntax

C++:int Img_SetPage(HIMG ImgObj, int PageIndex)
C#:int Img_SetPage(int ImgObj, int PageIndex)
Visual Basic:Function Img_SetPage(ByVal ImgObj As Integer, ByVal PageIndex As Integer) As Integer
Java:int Img_SetPage(HIMG ImgObj, int PageIndex)
Delphi:function Img_SetPage(ImgObj:HIMG; PageIndex:integer):integer


Description

Selects a new current page in the multi-page image. All resources allocated for the old page are deleted: defined blocks, OCR results, etc. The OCRSTEP_FIRST step will be set as the current OCR step for the new selected page.


Parameters

ImgObj [IN] – the Image object.
PageIndex [IN] – the page index. The index of the first page is 0.


Return value

Zero if success, otherwise an error code.


Remarks

Use the Img_GetPageCount function to get the number of pages in the image.
Img_LoadFile and other image-loading functions always select the first page.


Example

See the sample code for the Svr_Create function.