L_DocUpdatePage
#include "ltdoc.h"
L_LTDOC_API L_INT L_DocUpdatePage(hDoc, pBitmap, nPageIndex)
|
L_HDOC hDoc; |
/* handle to the OCR document */ |
|
pBITMAPHANDLE pBitmap; |
/* pointer to the bitmap handle*/ |
|
L_INT nPageIndex; |
/* page position */ |
Updates the current page with a new bitmap.
|
Parameter |
Description |
|
hDoc |
Handle to the OCR document. |
|
pBitmap |
Pointer to the bitmap handle that references the new page to be updated into the internal OCR list of pages. |
|
nPageIndex |
Index of the page to be updated. This is a zero-based index. |
Returns
|
SUCCESS |
The function was successful. |
|
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Use this function to update a pages content after applying any image processing function(s).
For Example, if you flip your page using L_FlipBitmap, then you should update the OCR page by calling this function.
You must lock the page to be updated by calling L_DocLockPage before calling this function, and should unlock the page by calling L_DocUnlockPage after the update is complete.
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_DocRemovePage, L_DocExportPage, L_DocGetPageInfo, L_DocLockPage, L_DocUnlockPage, L_DocCleanupPages |
|
Topics: |
|
|
|
Working with Pages |
Example
L_INT DocUpdatePageExample(L_HDOC hDoc, L_INT nPageIndex, pBITMAPHANDLE pBitmap)
{
L_INT nRet;
nRet = L_DocLockPage (hDoc, nPageIndex);
if(nRet != SUCCESS)
return nRet;
nRet = L_DocUpdatePage(hDoc, pBitmap, nPageIndex);
if (nRet != SUCCESS)
{
MessageBox(NULL, TEXT("An error occurred during L_DocUpdatePage."), TEXT("Error!"), MB_OK);
return nRet;
}
else
MessageBox(NULL, TEXT("The specified page is updated."), TEXT("Notice!"), MB_OK);
nRet = L_DocUnlockPage (hDoc, nPageIndex);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}