function PageToDevice(PageX, PageY: Double; out X, Y: Integer): Boolean; overload;
function PageToDevice(Rectangle: TPdfRectangle): TRect; overload;
DeviceToPage 的逆运算:将 PDF 用户空间点转换为视图内的屏幕像素
用于在特定 PDF 坐标上定位 VCL TLabel 或 TShape
TPdfView 根据 Zoom、Rotation、页面内边距和滚动偏移在内部维护设备到页面的变换;这些帮助程序是该变换的安全公共接口
PageNumber := 赋值会使缓存的坐标失效Rotation,因此旋转 90° 的页面仍能映射到正确的 PDF 矩形
procedure TForm1.PdfView1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
PageX, PageY: Double;
begin
if PdfView1.PageToDevice(X, Y, PageX, PageY) then
Caption := Format('pt = (%.2f, %.2f)', [PageX, PageY]);
end;