PDFium Delphi Component Docs

PageWidth 属性

组件: TPdf  ·  单元: PDFium
页面级属性——当前页的宽度,单位为点(1 点 = 1/72 英寸)

语法

property PageWidth: Double;

说明

返回当前页的宽度,单位为点(1 pt = 1/72 英寸)。该值源自 PDF 中的页面字典,在解析了从父节点继承的任何 /MediaBox / /CropBox / /Rotate 之后

该属性只读;结合 PageHeight 与 PageBounds 可以查看当前页面的完整几何信息

坐标和尺寸以 PDF 用户空间点报告。要转换为目标 DPI 的像素,使用 PointsToPixels(Value, DPI) 或等效辅助函数

备注

示例

if Pdf1.Active then
  Memo1.Lines.Add('PageWidth = ' + FloatToStr(Pdf1.PageWidth));

参见

PageHeight, PageBounds, PageRotation