#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2ExportPage(hDoc, pBitmap, uStructSize, nPageIndex)
Exports the specified page into the specified bitmap handle.
Handle to the OCR document.
Pointer to the bitmap handle that references the bitmap to be updated with an image of the exported OCR page.
Size in bytes, of the structure pointed to by pBitmap. Use sizeof(BITMAPHANDLE) to calculate this value.
Index of the page to be exported. This is a zero-based index.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Use the L_FreeBitmap function to free pBitmap when it is no longer needed.
Required DLLs and Libraries
L_INT Doc2ExportPageExample(L_HDOC2 hDoc,
L_INT nPageIndex,
pBITMAPHANDLE pBitmap)
{
L_INT nRet;
nRet = L_Doc2ExportPage(hDoc, pBitmap, sizeof(BITMAPHANDLE), nPageIndex);
if (nRet != SUCCESS)
{
MessageBox(NULL, TEXT("An error occurred in L_Doc2ExportPage."), TEXT("Error!"), MB_OK);
return nRet;
}
MessageBox(NULL, TEXT("The specified page is exported."), TEXT("Notice!"), MB_OK);
return SUCCESS;
}