What it does
This node adds internal link annotations to selected items in your document, turning them into clickable links that point to a defined target within the same document. These links improve both usability and accessibility by enabling intuitive navigation within the PDF.
Use it for
- Creating interactive tables of contents, cross-references, footnotes, endnotes, and other internal links.
- Building interactive and accessible links within your document.
- Dynamically defining the target, content and zoom level of internal links based on document data.
How to use it
- Drag and drop the node from the Node Library into your template:
Node Library > Folder Tagging - Connect the node with other nodes in the Data Flow of your template. Connect the items where you want to insert internal links to the Items input port and the target items that the links should point to to the Targets input port.
- Specify the settings in the Node Properties task pane.
Tip
To ensure proper tagging and accessibility, the internal link annotation and its linked content should be nested within a Link structure element. Use the Attach Structure Element Node to add a Link tag around the annotated content.
Node Input
- Items: Connect a node containing the items (shape trees) where you want to insert internal links to the Items input port.
- Targets: Connect a node containing the target items that the internal links should point to to the Targets input port.
Node Output
Outputs the original items with attached internal link annotations in the Items output port.
Note
These annotations do not appear in the Node Result task pane. To verify the result, preview the PDF in a PDF Viewer.
Node Properties
Node Name
You can assign a custom name to the node to help identify its purpose within your template.
Weight Expression
Defines the priority of a match between an item and a target. Used to resolve ambiguities when multiple matches are possible.
The expression must evaluate to a double value. Higher values indicate higher priority, and the match with the highest value is selected. If the expression is empty, items are matched to targets by their index in the input lists.
Available variables:
item: the current shape tree item being processed from the Item input list.itemhas the same properties as a shape tree object.target: the target item from the Target input list.targethas the same properties as a shape tree object.-
index: the zero-based index of the item in the input list -
targetIndex: the zero-based index of the target in the input list -
first: the first item in the input list -
last: the last item in the input list -
prev: the previous item in the input list.prevhas the same properties as a shape tree object. -
next: the next item in the input list.nexthas the same properties as a shape tree object. -
count: the total number of items in the input list
Expected return type: double
Example 1: Match by index
Use this when the target items are equal in number and in the same order as the items you want to link.
// leave expression empty
If the expression is empty, items are matched to targets by their index in the input lists. For example, the first item matches the first target, the second matches the second, and so on.
Example 2: Match by text
Use this when the text of the link matches the text of the target, such as footnote numbers and their references in the text, or headings and their entries in the table of contents.
item.text = target.text ? 1.0 : 0.0
If the text of the item matches the text of the target, the expression evaluates to 1.0; otherwise, it evaluates to 0.0. As a result, the target item with matching text is preferred over non-matching targets.
Zoom Expression
Defines the zoom level applied when an internal link is activated, expressed as a percentage. For example, 0.1 corresponds to 10%, and 2.0 corresponds to 200%.
To inherit the current zoom level, the value must be set to 0.0. This is the recommended setting for internal links in accessible PDF documents.
Available variables:
item: the current shape tree item being processed from the Item input list.itemhas the same properties as a shape tree object.target: the target item from the Target input list.targethas the same properties as a shape tree object.-
index: the zero-based index of the item in the input list -
targetIndex: the zero-based index of the target in the input list -
first: the first item in the input list -
last: the last item in the input list -
prev: the previous item in the input list.prevhas the same properties as a shape tree object. -
next: the next item in the input list.nexthas the same properties as a shape tree object. -
count: the total number of items in the input list
Expected return type: double
Example 1: Inherit zoom
0.0
Ensures that the current zoom level is preserved when navigating to the target. This is the recommended setting for accessible PDF documents.
Example 2: Set zoom to 200 %
2.0
Sets the zoom level to 200% when navigating to the target.
Line Selector
Use Path Language to specify the exact line(s) of the link within the selected node of the shape tree where the internal link annotation should be applied. Use the names assigned to shapes and shape trees (not the tags in brackets).
The purpose of a internal link annotation is to define the location and shape of the clickable area on a PDF page, as well as the action triggered when a user clicks within this area.
Since links can span multiple text lines, the annotation must cover each individual line of the link. With this expression, you select the containers in the shape trees that each contain an individual line of the link. This directly influences the shape and coverage of the clickable area.
axesFlip uses QuadPoints to generate a rectangle for each line of the link within a single internal link annotation.
Contents Expression
Define the content of the internal link. You can enter a static string or use an expression to generate it dynamically.
Available variables:
item: the current shape tree item being processed from the Item input list.itemhas the same properties as a shape tree object.target: the target item from the Target input list.targethas the same properties as a shape tree object.-
index: the zero-based index of the item in the input list targetIndex: the zero-based index of the target in the input list-
first: the first item in the input list -
last: the last item in the input list -
prev: the previous item in the input list.prevhas the same properties as a shape tree object. -
next: the next item in the input list.nexthas the same properties as a shape tree object. -
count: the total number of items in the input list
Expected return type: string
Example 1:
item.text
Uses the text of the input item as content.
Example 2:
index = count -2 ? "Glossary" : last ? "Bibliography": item.text
If the current item is the second-to-last in the sequence, use the string "Glossary".
If the current item is the last in the sequence, use the string "Bibliography".
Otherwise, use the item’s text as content.