property OnDblClick: TNotifyEvent; // published, inherited from TControl
OnDblClick fires after the second OnClick in a double-click sequence, using the system double-click time and pixel slop window. The Sender parameter is the TPdfView itself; the screen location can be retrieved from Mouse.CursorPos and converted to client coordinates with ScreenToClient.
A natural use for this event in a PDF reader is the "zoom-to-point" gesture: the user double-clicks the document to toggle between fit-to-width and the previous zoom level, optionally centring the view on the click position. Another common pattern is to use double-click to select the word under the cursor by calling CharacterIndexAtPos and then expanding CurrentCharIndex / selection length around the hit character.
The viewer's annotation/link handler runs first — if the user double-clicks a link, the first click already followed the link. Double-click is therefore best reserved for behaviour that does not conflict with normal navigation gestures.
Enabled = False.PdfView1.CharacterIndexAtPos(Point(X, Y), PageNo) from a paired OnMouseDown handler that records the position, then act in OnDblClick.
// Toggle between fit-to-width and 100% zoom on double-click
procedure TForm1.PdfView1DblClick(Sender: TObject);
begin
if PdfView1.FitMode = pfmFitToWidth then
begin
PdfView1.FitMode := pfmNone;
PdfView1.Zoom := 1.0;
end
else
PdfView1.FitMode := pfmFitToWidth;
end;