THPDFPage.AddGoToLink Method
Method summary: THPDFPage.AddGoToLink Method
Declaration
procedure AddGoToLink(Rectangle : TRect; TargetPageIndex : Integer; YPos : Single = - 1; const Description : AnsiString = '');
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Rectangle | The area on the current page that responds to clicks |
TargetPageIndex | Zero-based number of the target page; in a new document it may refer to a page that is only added later on |
YPos | How far down to scroll, measured from the top of the page in the same units as Rectangle; -1 leaves the position as it is |
Description | Alternative text kept in /Contents; PDF/UA requires it |
Return value
Returns no value
Usage notes
- Puts a link annotation on the current page whose GoTo action opens the target page
- A link may aim at a page not yet added — a first-page table of contents linking forwards, say; EndDoc fills the page reference in. Should no page with that index exist when the document is written, the link keeps its area but carries no action
- Within a loaded document the target page has to exist; failing that, nothing is added