Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS OCR C DLL Help

L_DocRemovePage

Show in webframe

#include "ltdoc.h"

L_LTDOC_API L_INT L_DocRemovePage(hDoc, nPageIndex)

L_HDOC 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 L_DocGetPageCount.

To add one or more new pages, call L_DocAddPage.

To enable the automatic cleaning-up temporary files, call the L_DocCleanupPages function with passing TRUE to bAutoCleanup parameter before calling this function. In this case, when calling this function, the specified page will be deleted from the OCR document and the corresponded temporary file of this page.

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_DocExportPage, L_DocGetPageInfo, L_DocCleanupPages

Topics:

OCR Functions: Pages

 

Working with Pages

Example

 L_INT DocRemovePageExample(L_HDOC hDoc, L_INT nPageIndex)
{
   L_INT nRet;
   L_DocCleanupPages(hDoc, TRUE);
   nRet = L_DocRemovePage(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;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.