ImageGear Professional v18.2 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_pagecount_file_format_W |
This function obtains the number of pages in a multi-page file.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_fltr_pagecount_file_format_W(
AT_MODE nFormat,
const LPAT_WCHAR lpwszFileName,
LPUINT lpPageCount
);
|
Name | Type | Description |
nFormat | AT_MODE | A constant indicating the file format of the input file. See enumIGFormats for possible values. Set to IG_FORMAT_UNKNOWN to let ImageGear detect the file format. |
lpwszFileName | const LPAT_WCHAR | Path and name of the file for which to get the page count, specified as a wide string (UTF-16). The path can be absolute or relative. |
lpPageCount | LPUINT | Number of pages returned by this function. |
All pixel formats supported by ImageGear Professional.
GUI Windows
Copy Code
|
|
---|---|
UINT nPageCount;
AT_ERRCOUNT nErrCount = IG_fltr_pagecount_file_format_W(IG_FORMAT_TIF, L"picture.tif", &nPageCount);
|
If nFormat = IG_FORMAT_UNKNOWN then ImageGear attempts to detect the file format automatically, and then detects the page count. Otherwise, ImageGear skips the file format detection and counts image page using the specified format filter.
This function may work slower on PDF and PostScript images, compared to its ANSI analog IG_fltr_pagecount_file_format. |