L_DocGetPageInfo
#include "ltdoc.h"
L_LTDOC_API L_INT L_DocGetPageInfo(hDoc, nPageIndex, pPageInfo, uStructSize)
L_HDOC hDoc; |
/* handle to the OCR document */ |
L_INT nPageIndex; |
/* page index */ |
pPAGEINFO pPageInfo; |
/* pointer to PAGEINFO structure */ |
L_UINT uStructSize; |
/* size of the structure */ |
Gets the information about the specified page in 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 PAGEINFO structure to be updated with the page information. |
uStructSize |
Specifies the size of the structure pointed to by pPageInfo, use sizeof(PAGEINFO) 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 L_DocGetPageCount.
To recognize a page, call L_DocRecognize.
Required DLLs and Libraries
LTDOC 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_DocAddPage, L_DocGetPageCount, L_DocUpdatePage, L_DocRemovePage, L_DocExportPage, L_DocCleanupPages |
Topics: |
|
|
Working with Pages |
Example
L_INT DocGetPageInfoExample(L_HDOC hDoc,L_INT nPageIndex) { L_INT nRet; PAGEINFO PageInfo; L_TCHAR szBuffer[100]; ZeroMemory(szBuffer, sizeof(szBuffer)); ZeroMemory(&PageInfo, sizeof(PAGEINFO)); nRet = L_DocGetPageInfo(hDoc, nPageIndex, &PageInfo, sizeof(PAGEINFO)); if (nRet != SUCCESS) MessageBox(NULL, TEXT("An error occurred during L_DocGetPageInfo."), 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; }