PDFium Delphi Component Docs

OnWebLinkClick event

Component: TPdfView  ·  Unit: PDFium
Fired when the user clicks a text-detected web URL before LinkOptions auto-handling runs

Syntax

property OnWebLinkClick: TPdfViewWebLinkClickEvent;

Description

Fired when the user clicks a text-detected web URL before LinkOptions automatic handling runs. Set Handled to True to suppress the built-in default behaviour

While Handled stays False and loAutoOpenURI is enabled in LinkOptions, the view opens the URL automatically once the event handler returns

Handlers run on the VCL main thread; navigation can therefore call modal dialogues or update form controls inline

Remarks

Example

procedure TForm1.PdfView1OnWebLinkClick(Sender: TObject; const Url: WString; var Handled: Boolean);
begin
  // inspect Link and decide whether to navigate
  Handled := True;
end;

See Also

LinkOptions, OnAnnotationLinkClick, LinkAnnotation