THotPDF.AddLoadedLinkAnnotation Method
Appends a URI hyperlink annotation to the specified page of the loaded PDF document, which jumps to the given URL when the specified rectangular area is clicked
Declaration
procedure AddLoadedLinkAnnotation(PageIndex: Integer; ARect: THPDFRect; const AURI: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
ARect | The PDF user space rectangle coordinates of the link hotspot, with the origin at the bottom-left corner |
AURI | 点击链接时触发的 URI 字符串,如 https://example.com 或 mailto:info@example.com |
Usage notes
- 热区矩形坐标须位于页面 MediaBox 范围内,超出范围的部分将被裁剪
- Newly added link annotations have no appearance stream and are typically displayed in the reader as a transparent clickable area
- Changes must be saved before they can become persistent