PDFium Delphi Component Docs

PageCount property

Component: TPdf  ·  Unit: PDFium
Total number of pages in the open document, including the active dynamic XFA layout

Syntax

property PageCount: Integer;

Description

This read-only property returns the native document page count for ordinary PDFs and the current layout count for active dynamic XFA forms

In v3.126.1, added and removed XFA page events query the completed layout's total count before notifying OnXfaPageCountChanged; earlier versions could confuse the native event's delta with the total

Remarks

Example

if Pdf1.Active then
  Memo1.Lines.Add('PageCount = ' + IntToStr(Pdf1.PageCount));

See Also

Page, PageNumber, PageLabel