ImageGear for C and C++ on Windows v19.10 - Updated
IG_REC_document_pagecount_get
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Formatted Output Functions > IG_REC_document_pagecount_get

Gets the page count in the document.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_document_pagecount_get(
   HIG_REC_DOCUMENT hDocument,
   LPAT_INT lpPageCount
);

Arguments:

Name Type Description
hDocument HIG_REC_DOCUMENT Document handle.
lpPageCount LPAT_INT Pointer to the variable to retrieve the page count.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

See IG_REC_image_import.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;
HIG_REC_DOCUMENT hRecDocument = 0;
AT_INT iPageCount = 0;

ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_recognize(higRecImage);
ErrCount += IG_REC_document_open("recognition_data.bin", &hRecDocument);
ErrCount += IG_REC_document_pagecount_get(hRecDocument, &iPageCount);

//...

ErrCount += IG_REC_document_close(hRecDocument);
ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

See Also

HIG_REC_DOCUMENT