ImageEn, unit iexBitmaps

IEPDFPageCount

IEPDFPageCount

Declaration

function IEPDFPageCount(const FileName: WideString; const Password: string = ''): Integer; overload;
function IEPDFPageCount(Stream: TStream; const Password: string = ''): Integer; overload;

Description

Returns the number of pages in a PDF document.

Note:
Uses a plug-in such as PDFium DLL when available
If a plug-in is not available, this method only supports uncompressed and unencoded files (i.e. Password cannot be specified).

Example

// Get PDF page count
cnt := IEPDFPageCount( 'C:\Document.pdf' );
ShowMessage( Format( 'PDF has %d pages', [ cnt ]));

See Also

ImportPagesIntoPDF
DeletePagesFromPDF