function PageToDevice(PageX, PageY: Double; out X, Y: Integer): Boolean; overload;
function PageToDevice(Rectangle: TPdfRectangle): TRect; overload;
Inverse de DeviceToPage : convertit un point d’espace utilisateur PDF en pixel d’écran dans la vue
Use to position a VCL TLabel or TShape over a specific PDF coordinate.
TPdfView maintient en interne la transformation device-to-page à partir de Zoom, Rotation, de la marge de page et du défilement; ces assistants constituent l’interface publique sûre vers cette transformation
PageNumber := assignments invalidate cached coordinates.Rotation, so a page rotated 90° still maps to the correct PDF rectangle.
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;