PDFiumVCL Docs

WebLinkAtPos method

Component: TPdfView  ·  Unit: PDFium
Returns the web-link index at the screen pixel (X, Y).

Syntax

function WebLinkAtPos...; (X, Y: Integer): Integer

Description

Returns the web-link index at the screen pixel (X, Y).

Use to show a custom tooltip or to override the auto-launch behavior.

TPdfView maintains the device-to-page transform internally based on Zoom, Rotation, page padding, and scroll offset; these helpers are the safe public interface to that transform.

Remarks

Example

procedure TForm1.PdfView1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  PageX, PageY: Double;
begin
  if PdfView1.WebLinkAtPos(X, Y, PageX, PageY) then
    Caption := Format('pt = (%.2f, %.2f)', [PageX, PageY]);
end;

See Also

WebLink, OnWebLinkClick