ImageGear for C and C++ on Windows v19.10 - Updated
LPFNIG_TWAIN_BEFORE_PAGE
API Reference Guide > TWAIN Component API Reference > TWAIN Component Callback Functions Reference > LPFNIG_TWAIN_BEFORE_PAGE

This callback, if registered, will be called by ImageGear just before a new page is acquired using the IG_TWAIN_acquire(), IG_TWAIN_scan_pages(), IG_TWAIN_scan_pages_to_file() and IG_TWAIN_preview() functions.

Declaration:

 
Copy Code
typedef LONG (LPACCUAPI LPFNIG_TWAIN_BEFORE_PAGE)(
        LONG nPageNum,
        DOUBLE dblLeft,
        DOUBLE dblTop,
        DOUBLE dblRight,
        DOUBLE dblBottom,
        LPVOID lpData
);

Arguments:

Name Type Description
nPageNum LONG Returns the number of the page that is about to be scanned. The page numbering begins with 1.
dblLeft DOUBLE Returns the left coordinate of the selected layout rectangle that will be scanned for the current page.
dblTop DOUBLE Returns the top coordinate of the selected layout rectangle that will be scanned for the current page.
dblRight DOUBLE Returns the right coordinate of the selected layout rectangle that will be scanned for the current page.
dblBottom DOUBLE Returns the bottom coordinate of the selected layout rectangle that will be scanned for the current page.
lpData LPVOID A far pointer to private data, as specified in your call to IG_TWAIN_CB_register() function.

Return Value:

Return 1 if you want to continue scanning; return 0 to cancel the scanning process after saving the page just scanned.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

This function returns the page number and the bounding image rectangle (image rectangle) within which the scanning will take place, for the page that is about to be scanned.