PDFExport pageTemplate

2 Answers 172 Views
PDF Processing
n/a
Top achievements
Rank 1
Iron
n/a asked on 20 May 2021, 01:46 PM

Hello!

PDFExport, pageTemplate has 2 props, pageNum & totalPages.

Is it possible to send some custom values over props to "pageTemplate"?

 

Thank you, Matjaz Reberc

2 Answers, 1 is accepted

Sort by
0
Krissy
Telerik team
answered on 21 May 2021, 11:36 AM

Hi Matjaz, 

Currently, the properties available to pass to pageTemplate are only pageNum and totalPages.
You can take a look at all of the PDFExportProps to see if you can find the needed prop there: 
https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/PDFExportProps/ 

If this does not help, could you please provide more details on what is the desired case?

Regards,
Krissy
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

n/a
Top achievements
Rank 1
Iron
commented on 25 May 2021, 06:42 AM

Hi,

I would like to add "Creator" of the PDF to pageTemplate. I have added static text to header & footer with page template, but creator is dynamical value.

Thank you, Matjaz Reberc
0
Krissy
Telerik team
answered on 25 May 2021, 08:06 AM

Hi Matjaz,

It is possible to achieve this using a custom pageTemplate and rendering the creator value there. However, that would require returning an element that has an absolute position. I've made an example that showcases how to achieve this:
https://stackblitz.com/edit/react-bff8bd-rjgoah?file=app/main.js 

Hope that this is what you are looking for.

Regards,
Krissy
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

n/a
Top achievements
Rank 1
Iron
commented on 25 May 2021, 09:52 AM

It works.

Thank you, Matjaz Reberc
Tags
PDF Processing
Asked by
n/a
Top achievements
Rank 1
Iron
Answers by
Krissy
Telerik team
Share this question
or