PDFiumVCL Docs

LinkAnnotationAtPos method

Denna API-post behåller identifierare, signaturer, kodblock och PDF-termer i ursprunglig form.
Component: TPdfView  ·  Unit: PDFium
Returns the link-annotation index at the screen pixel (X, Y), or -1.

Syntax

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

Description

Returns the link-annotation index at the screen pixel (X, Y), or -1.

Use to implement a "click-to-follow" UI without enabling LinkOptions auto-handling.

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.LinkAnnotationAtPos(X, Y, PageX, PageY) then
    Caption := Format('pt = (%.2f, %.2f)', [PageX, PageY]);
end;

See Also

DeviceToPage, LinkAnnotation, OnAnnotationLinkClick