Export PDF in different layout

1 Answer 81 Views
Grid
Ken
Top achievements
Rank 1
Ken asked on 14 Jun 2022, 09:52 PM

Hi,

Is it possible to reformat the data being exported from the Grid?

Basically, I need to change the page layout from being a screen capture, as the PDF export does by default, to a different layout.

Think of a list of names, address, phones that is portrayed in a column layout instead of the row layout with columns that is the Grid default.

Column 1 would have, for example

Name1
Address1
City, state zip1
phone1

Name2
Address2
City, state zip2
phone2

Name3
Address3
City, State, Zip3
Phone3

 

Then, column 2 would have

Name4
Address4
City, State, Zip4
Phone4

And then continuing to the bottom of column2, then starting at the top of Column 3.

Is this possible with the Kendo UI PDF Export? Or maybe another function in the Kendo UI?

Thank you!

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 17 Jun 2022, 03:21 PM

Hello, Ken,

You can create a custom DOM structure using the grid's data. Then you can draw it using the drawing api and save it as a pdf with the kendo.saveAs method.

I've created a Dojo and left a couple of comments describing the logic:

https://dojo.telerik.com/@gdenchev/akajemED 

Please note that the above is a very basic example, you can style/change the structure and pdf options to suit your expectations.

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ken
Top achievements
Rank 1
commented on 17 Jun 2022, 05:05 PM

Hello Georgi,

Thank you for the explanation and Dojo. I think this would be the start of what I need. I'll try it out.

Thank you,

Ken

Tags
Grid
Asked by
Ken
Top achievements
Rank 1
Answers by
Georgi Denchev
Telerik team
Share this question
or