Support table of contents (TOCs)
Closed this issue · 1 comments
Is your feature request related to a problem? Please describe.
When creating long documents its difficult for the reader to find specific content. One of the solutions would be TOCs.
Describe the solution you'd like
Just like header and footer, it would be great to have a property tableOfContents
where we can pass the template of the page of content and the service would generate the table of contents based on the structure of the document, taking all heading tags with id's (h1
, h2
, h3
...) and spiting out a context with a well organized toc's.
{
"toc": [
{
"id": "some_id",
"title": "Some tile",
"level": 1,
"pageNumber": 1
},
// ....
]
}
Describe alternatives you've considered
N/A
Additional context
Reference on the idea of how to achieve this goal https://medium.com/@pofider/generate-pdf-with-toc-using-chrome-c3b44f924ff9
https://playground.jsreport.net/w/admin/akYBA4rS