References
Fileforge’s PDF generation API supports rich cross-referencing capabilities. This allows you to create links between different parts of your document, such as linking to a specific section or page.
Cross-linking
Similarly to HTML, Fileforge automatically parses local links in your document.
This also works in elements contained in the page shell, such as headers and footers.
react-print
Pointers
Counters
When adding cross-references to PDFs, you may want to consider their printed page number. Fileforge provides a page
counter that you can use to reference the page number.
You can also reference custom counters, such as a section number.
Names
You can also use the contents of a target element to reference it. For example, you may want to display (see "Cover page")
instead of (see page 1)
.
Target Content
Since the target content will be inlined, we recommend adding the ID to headers rather than sections or divs.
Example: Table of Contents
You can combine the above functionality to build a table of contents that automatically updates with the page numbers.
This will yeld the following table of contents: