Repository navigation
Replies: 1 comment
|
The clickable-link part is supported: give the destination a For example, a two-page React document: import { Document, Page, Text } from '@formepdf/react';
const doc = (
<Document>
<Page>
<Text>Contents</Text>
<Text href="#Introduction">Introduction ........ 2</Text>
</Page>
<Page>
<Text bookmark="Introduction">Introduction</Text>
<Text>Your chapter content...</Text>
</Page>
</Document>
);That The distinction is clickable navigation versus automatic TOC generation: the example supplies the page number because the chapter starts on the explicitly declared second page. For flowing/automatically paginated chapters, derive the destination pages from a first Use unique bookmark names and match them exactly: the current writer chooses the first matching title and silently skips an internal link if no matching bookmark exists. See the internal-link implementation and layout/render API. This is the supported building block for a custom TOC, rather than a claim that a ready-made auto-TOC component exists. |
Uh oh!
There was an error while loading. Please reload this page.
Does this library have a way of generating a table of contents with clickable page numbers?
All reactions