PDFium Delphi Component Docs

PageMetrics property

Component: TPdf  ·  Unit: PDFium
Read stable native page facts by one-based page number without changing the active page

Syntax

property PageMetrics[PageNumber: Integer]: TPdfPageMetrics; // read only

PageNumberInteger between 1 and PageCount
ResultTPdfPageMetrics snapshot for the requested page with presence flags HasMediaBox, HasCropBox, HasBleedBox, HasTrimBox, and HasArtBox

Description

The snapshot includes Width, Height, Rotation, LabelText, HasTransparency, and all five standard page boxes

Each box has a matching presence flag so callers can distinguish an absent optional box from a zero-valued rectangle

The first request reads all facts through one native page handle and later requests reuse the cached snapshot until the document or page is edited

Reading another page does not change PageNumber or fire OnPageChange

The returned record is caller-owned and changing it does not modify the PDF

See Also

PageBox, PageLabel, PageRotation