#include "ltdoc2.h"

L_LTDOC2_API L_INT L_Doc2RemovePageExt(hDoc, nDocId, nPageIndex)

Removes the specified page from the OCR document.


L_HDOC2 hDoc

Handle to the OCR document.

L_INT nDocId

Document ID created by calling L_Doc2CreateDocument.

L_INT nPageIndex

Zero-based index of the page to be deleted.


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.


To get the number of pages in the OCR document, call the L_Doc2GetPageCount / L_Doc2GetPageCountExt function.

To add one or more new pages, call the L_Doc2AddPage / L_Doc2AddPageExt function.

To enable the automatic cleanup of temporary files, call the L_Doc2CleanupPages / L_Doc2CleanupPages function, passing TRUE to the bAutoCleanup parameter before calling L_Doc2RemovePageExt. 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

See Also




L_INT Doc2RemovePageExampleExt(L_HDOC2 hDoc, L_INT nDocId, L_INT nPageIndex) 
   L_INT nRet; 
   nRet = L_Doc2RemovePageExt(hDoc, nDocId, nPageIndex); 
   if (nRet == SUCCESS) 
      MessageBox(NULL, TEXT("The specified page is deleted from the OCR document."), TEXT("Notice!"), MB_OK); 
      MessageBox(NULL, TEXT("The engine couldn't delete the specified page from the OCR document."), TEXT("Error!"), MB_OK); 
      return nRet; 
   return SUCCESS; 
Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help