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

Export Grid to PDF with custom template

4 Answers 849 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yan
Top achievements
Rank 1
Yan asked on 04 Dec 2017, 10:14 PM

Hello guys.

Basically I'm trying to export my grid to PDF and this works just fine simply reading kendo documentation. But when I open this generated PDF, it looks just like a printscreen to me. What I wanna do is change it, use some kind of custom template (e.g html) or something and beautify this.

I'm only using this lines of code for properly working:

var grid = $("#grid").data("kendoGrid");

kendo.drawing.drawDOM($("#grid")).then(function (group) {
    kendo.drawing.pdf.saveAs(group, "test.pdf");
});

 

Is there some way of doing this? (Changing this generated PDF layout)

4 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 06 Dec 2017, 01:49 PM
Hello, Yan,

The Grid offers a built-in PDF export which allows certain modifications to be made to the exported document, like a template, a watermark etc:

http://demos.telerik.com/kendo-ui/grid/pdf-export

https://docs.telerik.com/kendo-ui/controls/data-management/grid/pdf-export

Please check all of the built-in options:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-pdf

Let me know if additional assistance is needed on this matter.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Yan
Top achievements
Rank 1
answered on 06 Dec 2017, 02:53 PM
Thank you so much!
0
Lee
Top achievements
Rank 1
Iron
Iron
Iron
answered on 03 Dec 2019, 06:40 PM
[quote]Stefan said:Hello, Yan,

The Grid offers a built-in PDF export which allows certain modifications to be made to the exported document, like a template, a watermark etc:

http://demos.telerik.com/kendo-ui/grid/pdf-export

https://docs.telerik.com/kendo-ui/controls/data-management/grid/pdf-export

Please check all of the built-in options:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-pdf

Let me know if additional assistance is needed on this matter.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.

[/quote]

 

These links all go to 404 pages.

0
Alex Hajigeorgieva
Telerik team
answered on 05 Dec 2019, 08:25 AM

Hello, Lee,

When I tested the links, the first one redirected me to the demo with HTTPS:

https://demos.telerik.com/kendo-ui/grid/pdf-export

The last one, redirected me to the pdf configuration that is currently at this address:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/pdf

However, the second one indeed resulted in a 404. Thank you for reporting it. I have updated your Telerik points accordingly and fixed the previous URL.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Yan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Yan
Top achievements
Rank 1
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Alex Hajigeorgieva
Telerik team
Share this question
or