L_Doc2GetPageInfoExt

#include "ltdoc2.h"

L_LTDOC2_API L_INT L_Doc2GetPageInfoExt(hDoc, nDocId, nPageIndex, pPageInfo, uStructSize)

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

Parameters

L_HDOC2 hDoc

Handle to the OCR document.

L_INT nDocId

Document ID created by calling L_Doc2CreateDocument.

L_INT nPageIndex

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.

Returns

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

Comments

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

Functions

Topics

Example

L_INT Doc2GetPageInfoExampleExt(L_HDOC2 hDoc, L_INT nDocId, L_INT nPageIndex) 
{ 
   L_INT nRet; 
   PAGEINFO2 PageInfo; 
   L_TCHAR szBuffer[100]; 
 
   ZeroMemory(szBuffer, sizeof(szBuffer)); 
   ZeroMemory(&PageInfo, sizeof(PAGEINFO2)); 
 
   nRet = L_Doc2GetPageInfoExt(hDoc, nDocId, nPageIndex, &PageInfo, sizeof(PAGEINFO2)); 
   if (nRet != SUCCESS) 
      MessageBox(NULL, TEXT("An error occurred during L_Doc2GetPageInfoExt."), TEXT("Error!"), MB_OK); 
   else 
   { 
      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.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.