L_Doc2RemovePage
#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2RemovePage(hDoc, nPageIndex)
L_HDOC2 hDoc; |
/* handle to the OCR document */ |
L_INT nPageIndex; |
/* index of the page to be deleted */ |
Removes the specified page from the OCR document.
Parameter |
Description |
hDoc |
Handle to the OCR document. |
nPageIndex |
Index of the page to be deleted. This is a zero-based index. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
To get the number of pages in the OCR document, call the L_Doc2GetPageCount function.
To add one or more new pages, call the L_Doc2AddPage function.
To enable the automatic cleanup of temporary files, call the L_Doc2CleanupPages function, passing TRUE to the bAutoCleanup parameter before calling this function. In this case, when calling this function, the specified page will be deleted from both the OCR document and its corresponding temporary file.
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_Doc2ExportPage, L_Doc2GetPageInfo, L_Doc2CleanupPages |
Topics: |
|
|
Working with Pages |
Example
L_LTDOC2TEX_API L_INT Doc2RemovePageExample(L_HDOC2 hDoc, L_INT nPageIndex) { L_INT nRet; L_Doc2CleanupPages(hDoc, TRUE); nRet = L_Doc2RemovePage(hDoc, nPageIndex); if (nRet == SUCCESS) MessageBox(NULL, TEXT("The specified page is deleted from the OCR document."), TEXT("Notice!"), MB_OK); else { MessageBox(NULL, TEXT("The engine couldn't delete the specified page from the OCR document."), TEXT("Error!"), MB_OK); return nRet; } return SUCCESS; }