#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetPageInfo(hDoc, nPageIndex, pPageInfo, uStructSize)
L_HDOC2 hDoc; |
/* handle to the OCR document */ |
L_INT nPageIndex; |
/* page index */ |
pPAGEINFO2 pPageInfo; |
/* pointer to PAGEINFO2 structure */ |
L_UINT uStructSize; |
/* size of the structure */ |
Gets the information about the specified page of the OCR document.
Parameter |
Description |
hDoc |
Handle to the OCR document. |
nPageIndex |
Specifies index of the page for which information will be retrieved. |
pPageInfo |
Pointer to a PAGEINFO2 structure to be updated with the page information. |
uStructSize |
Size in bytes, of the structure pointed to by pPageInfo, use sizeof(PAGEINFO2) to calculate this value. |
Returns
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 function.
To recognize a page, call the L_Doc2Recognize function.
Required DLLs and Libraries
LTDOC2 For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
L_Doc2AddPage, L_Doc2GetPageCount, L_Doc2UpdatePage, L_Doc2RemovePage, L_Doc2ExportPage, L_Doc2CleanupPages |
Topics: |
|
|
Working with Pages |
Example
L_LTDOC2TEX_API 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); 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; }