THotPDF.ActivateLoadedLinks Method
Detects bare addresses in loaded-page text and overlays borderless Link annotations with URI actions
Declaration
function ActivateLoadedLinks(const PageRange: string= ''; IncludeEmail: boolean= True; SkipExisting: boolean= True): Integer;Usage notes
SkipExistingis enabledIncludeEmailenables bothmailto:text and bare addresses such as[email protected]SkipExistingprevents a new annotation when the page already has the same URI at the same rectangle
Detected forms
http://,https://, andftp://addresses retain their schemewww.addresses receive anhttp://action URI- Bare email addresses receive a
mailto:action URI - Surrounding brackets, quotes, and common sentence-ending punctuation are excluded from the action and hit rectangle
Usage notes
- The return value is the number of Link annotations created
- Detection is deliberately limited to printable ASCII address text and does not join candidates across lines
- Existing links are indexed once per page and each modified page invalidates its render cache once
- The page and annotation array are marked dirty for
SaveIncrementalUpdate
Example
PDF.BeginIncrementalUpdate('input.pdf');
CreatedCount:= PDF.ActivateLoadedLinks('1-10', True, True);
PDF.SaveIncrementalUpdate('linked.pdf');
Related APIs
AddLoadedLinkAnnotation · GetLoadedLinkInfo · Loaded document toolkit