L_DocCleanUpPages

#include "ltdoc.h"

L_INT EXT_FUNCTION L_DocCleanupPages(hDoc, bAutoCleanup)

L_HDOC hDoc;

/* handle to the OCR document */

L_BOOL bAutoCleanup;

/* flag to control the cleaning-up behavior */

Enables or disables the automatic cleaning-up temporary files.

Parameter

Description

hDoc

Handle to the OCR document.

bAutoCleanup

Flag that indicates whether to enable or disable the automatic cleaning-up temporary files.  Possible values are:

 

Value

Meaning

 

TRUE

Enables the automatic cleaning-up temporary files, when a page is removed from the OCR document by calling the L_DocRemovePage function.It will also check for any left files from previously removed pages and will delete them. This happens when the function was previously called with the bAutoCleanup parameter set to FALSE before calling L_DocRemovePage function.

 

FALSE

Disables the automatic cleaning-up temporary files.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

When this function is called with passing TRUE to bAutoCleanup parameter, calling the L_DocRemovePage function will delete the specified page from the OCR document in the engine and delete its corresponding temporary file.

When this function is called with passing FALSE to the bAutoCleanup parameter, calling the L_DocRemovePage function will delete the specified page from the OCR document in the engine and will not delete its corresponding temporary file. In this case, the corresponding temporary file will be deleted either when re-calling this function with passing TRUE to the bAutoCleanup parameter; or shutting down the OCR engine by calling L_DocShutDown function.

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_DocRemovePage, L_DocShutDown

Topics:

OCR Functions: Pages

 

Working with Pages

Example

For an example, refer to L_DocRemovePage.