This is a migrated thread and some comments may be shown as answers.

Table of Contents/page detection on Kendo React PDF Export

3 Answers 506 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
crimsondeal
Top achievements
Rank 1
crimsondeal asked on 25 Nov 2019, 07:22 PM

I know there has been some talk about generating a table of contents in PDF exports-- has anybody figured out a way where each section can figure out what page it is on and generate a TOC from there? Using with drawDOM.

 

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Nov 2019, 01:32 PM

Hello,

Currently, this is not supported by the PDF export as it is only exporting what is rendered in the DOM.

Our reporting product support table of content to the export documents. Please take a look at it, and if it is some you are interested in, please post a question in the report forum or a ticket, where the team can share more details on it, to see if it will be a fit for the real use case:

https://docs.telerik.com/reporting/table-of-contents

Regards,


Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
crimsondeal
Top achievements
Rank 1
answered on 10 Dec 2019, 09:35 PM

Hi Stefan,

Thank you! I don't have access to the Reporting support forums as I do not have a license to the product. Essentially I have a React app (via create-react-app) where users enter information and a PDF is created with their dynamic info. As such, page numbers may vary across the PDFs. Using Firebase Functions as the backend. Would this be possible to implement on this? I'm not even sure where I would begin...

Thanks,

Alexa

0
Stefan
Telerik team
answered on 12 Dec 2019, 09:05 AM

Hello, Alexa,

The reporting tool as a free trial which will give you access to the support system and the forums as well.

As with the KendoReact PDF export and idea that comes to mind is the following:

1) Build the Table of content dynamically based on what the user has typed. For example, in the information entered by the user, but all heading in h tags, and then loop over all h tags in the document to create the content in HTML element.

2) When the export button is clicked, render that table of content(a DOM element) before the elements that will be exported.

3) After the export remove the element so it does not stay on the page.

This is not a straight forward task and it will require modifications based on the real application logic, but it is possible to achieve.

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
crimsondeal
Top achievements
Rank 1
Answers by
Stefan
Telerik team
crimsondeal
Top achievements
Rank 1
Share this question
or