#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetPageInfo(hDoc, nPageIndex, pPageInfo, uStructSize)

Gets the information about the specified page of the OCR document.


L_HDOC2 hDoc

Handle to the OCR document.

L_INT nPageIndex

Specifies index of the page for which information will be retrieved.

pPAGEINFO2 pPageInfo

Pointer to a PAGEINFO2 structure to be updated with the page information.

L_UINT uStructSize

Size in bytes, of the structure pointed to by pPageInfo, use sizeof(PAGEINFO2) to calculate this value.


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.


To get the number of pages of the OCR document, call the L_Doc2GetPageCount / L_Doc2GetPageCountExt function.

To recognize a page, call the L_Doc2Recognize / L_Doc2RecognizeExt function.

Required DLLs and Libraries

See Also




L_INT Doc2GetPageInfoExample(L_HDOC2 hDoc,L_INT nPageIndex) 
   L_INT nRet; 
   PAGEINFO2 PageInfo; 
   L_TCHAR szBuffer[100]; 
   ZeroMemory(szBuffer, sizeof(szBuffer)); 
   ZeroMemory(&PageInfo, sizeof(PAGEINFO2)); 
   nRet = L_Doc2GetPageInfo(hDoc, nPageIndex, &PageInfo, sizeof(PAGEINFO2)); 
   if (nRet != SUCCESS) 
      MessageBox(NULL, TEXT("An error occurred during L_Doc2GetPageInfo."), TEXT("Error!"), MB_OK); 
      wsprintf(szBuffer, TEXT("Page Width = %d\nPage Height = %d\nPage Bits Per Pixel = %d\n"), PageInfo.nWidth, PageInfo.nHeight, PageInfo.nBitsPerPixel); 
      MessageBox(NULL, szBuffer, TEXT("Page Info!"), MB_OK); 
      return nRet; 
   return SUCCESS; 
Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help