THPDFPage.AddGoToLink Method
Adds go to link data to the annotation and action workflow. The call creates or attaches the PDF-side object needed by later output, validation, signing, or page rendering steps
Declaration
procedure AddGoToLink(Rectangle: TRect; TargetPageIndex: Integer; YPos: Single= - 1; const Description: AnsiString= '');
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Rectangle | Clickable area on the current page |
TargetPageIndex | Zero-based index of the target page. In a new document it may name a page that is added later |
YPos | Vertical position to scroll to, measured from the top of the page in the same units as Rectangle; -1 keeps the current position |
Description | Alternate description stored in /Contents; required under PDF/UA |
Return value
This member does not return a value
Usage notes
- Adds a link annotation to the current page whose GoTo action opens the target page
- A link may point at a page that has not been added yet, such as a table of contents on the first page linking forward; EndDoc fills in the page reference. If no page with that index exists when the document is written, the link keeps its area but has no action
- In a loaded document the target page must exist; otherwise nothing is added