THPDFPage.AddStructureDestinationLink Method
Adds a link annotation whose GoTo action carries the required page-coordinate /D fallback destination and the PDF 2.0 /SD array naming the target StructElem by indirect reference, so PDF 2.0 viewers jump to structure content while legacy viewers fall back to the named page
Declaration
procedure AddStructureDestinationLink(Rectangle: TRect; StructElem: THPDFDictionaryObject;
FallbackPageIndex: Integer; YPos: Single= - 1; const Description: AnsiString= '');
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Rectangle | Hot-spot rectangle in page units where the link is active |
StructElem | Non-nil indirect StructElem dictionary to target, typically from AddStructureElement or FindStructureElementForMCID |
FallbackPageIndex | Required page index used by the /D explicit destination for non-PDF-2.0 viewers |
YPos | Optional vertical position for the /XYZ fit; pass a negative value to leave it null |
Description | Alternate description stored in the annotation /Contents; required under PDFUACompliance |
Return value
This member does not return a value
Behavior
- Requires PDF 2.0 (ISO 32000-2) and follows
StrictVersionLockbehavior, since/SDis a PDF 2.0 action entry - Emits a GoTo action with
/Din the same[page /XYZ null y null]shape asAddGoToLinkplus a single-element/SDarray holding the indirect StructElem reference - A
nilStructElem or an out-of-rangeFallbackPageIndexraises before any annotation or version bump is emitted - Under
PDFUACompliancean emptyDescriptionraises per PDF/UA-1 ยง7.18.5