L_DocExportPage

#include "ltdoc.h"

L_INT EXT_FUNCTION L_DocExportPage(hDoc, pBitmap, uStructSize, nPageIndex)

L_HDOC hDoc;

/* handle to the OCR document */

pBITMAPHANDLE pBitmap;

/* pointer to the bitmap handle */

L_UINT uStructSize;

/* size of the structure */

L_INT nPageIndex;

/* page index */

Exports the specified page into the specified bitmap handle.

Parameter

Description

hDoc

Handle to the OCR document.

pBitmap

Pointer to the bitmap handle that references the bitmap to be updated with an image of the exported OCR page.

uStructSize

Specifies the size of the structure pointed to by pBitmap. Use sizeof(BITMAPHANDLE) to calculate this value.

nPageIndex

Index of the page to be exported. This is a zero-based indexing.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Use L_FreeBitmap to free pBitmap when it is no longer needed.

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_DocRemovePage, L_DocGetPageInfo, L_DocCleanUpPages

Topics:

OCR Functions: Pages

 

Working with Pages

Example

void TestExportPage(L_HDOC hDoc, L_INT nPageIndex, pBITMAPHANDLE pBitmap)
{
   L_INT nRet = L_DocExportPage(hDoc, pBitmap, sizeof(BITMAPHANDLE), nPageIndex);
   if (nRet != SUCCESS)
      MessageBox(NULL, TEXT("An error occurred in L_DocExportPage."), TEXT("Error!"), MB_OK);
   else
      MessageBox(NULL, TEXT("The specified page is exported."), TEXT("Notice!"), MB_OK);
}