property PageBounds: TPdfRectangle; // read only
Returns the bounding rectangle of the current page in PDF user-space points. To query a specific box (MediaBox, CropBox, BleedBox, TrimBox, or ArtBox), call GetPageBox
This property is read-only; to modify a specific page box on the current page, assign to PageBox[Box] or call SetPageBox
Coordinates and dimensions are reported in PDF user-space points. To convert to pixels for a target DPI, use PointsToPixels(Value, DPI) or the equivalent helpers
Pdf1.Page; switching the current page transparently updates the values returned hereActive is False the property returns 0, an empty rectangle, or the default enum element
var
R: TPdfRectangle;
begin
if Pdf1.Active then
begin
R := Pdf1.PageBounds;
Memo1.Lines.Add(Format('%.2f x %.2f pt', [R.Right - R.Left, R.Top - R.Bottom]));
end;
end;