PDFium Delphi Component Docs

PageBounds property

Component: TPdf  ·  Unit: PDFium
Page-level property — returns the bounding rectangle of the current page in PDF user-space points

Syntax

property PageBounds: TPdfRectangle; // read only

Description

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

Remarks

Example

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;

See Also

PageBox, GetPageBox, SetPageBox