PDFium Component Docs

PageNumber property

Component: TPdf  ·  Unit: PDFium
Read/write 1-based page index of the current page, with 0 reserved for the inactive state

Syntax

property PageNumber: Integer;

Description

Returns or selects the 1-based current page index; assigning 0 unloads the current native page while keeping the document active

Assignments outside 0..PageCount raise EPdfError without changing the current page

Page replacement is transactional: if PDFium cannot load the requested page, the previous native page and its cached page data remain active

Remarks

Example

if Pdf1.Active then
  Memo1.Lines.Add('PageNumber = ' + VarToStr(Pdf1.PageNumber));

See Also

Page, PageCount, PageLabel