OCR_GetPageByIndex

<< Click to Display Table of Contents >>

Navigation:  OCR Module > Input List Handling >

OCR_GetPageByIndex


 

PRO SDK Icon OCR_GetPageByIndex

 


 

OCR_GetPageByIndex returns the specified input document page number from the PXO_Pagelist structure. Please note that all elements are case-sensitive:

 

HRESULT OCR_GetPagesByIndex(

PXO_Pagelist PageList,

DWORD nIndex,

DWORD *nPage

);

 

Parameters

 

PageList

The PXO_Pagelist variable that OCR_NewPagelist created.

 

nIndex

The zero-indexed position (similar to an array index) of the input document page number to return from PXO_Pagelist. It must not exceed the value that OCR_NumPages returns.

 

nPage

This parameter is a pointer to a DWORD and receives the specified page number stored in PXO_Pagelist.

 

Return Values

 

If the function succeeds then the return value is OCR_OK

 

If the function fails then the return value is an error code.

 

Example (C++)

 

PXO_Pagelist inPages;

HRESULT hr;

DWORD nPages;

DWORD nPage;

 

hr = OCR_NewPagelist(&inPages);

 

OCR_AddPage(inPages1);

OCR_AddPage(inPages12);

OCR_AddPage(inPages17);

 

OCR_NumPages(inPages, &nPages);

  

for (DWORD i=0i < nPagesi++)

{

  OCR_GetPageByIndex(PageListi, &nPage);

    std::cout << "Index: " << i << ", Page number: " << nPage << std::endl

}

// OUTPUT:

// Index: 0, Page number: 1

// Index: 1, Page number: 12

// Index: 2, Page number: 17

 

OCR_ReleasePagelist(&inPages);