Grouping by column does not work correctly when exporting to pdf

1 Answer 227 Views
Grid PDFViewer
Régis
Top achievements
Rank 1
Régis asked on 24 Jun 2021, 01:17 PM

When I export the grouped grid to by columns in pdf, in pdf the groupings that have a lot of data split and generate several equal smaller groupings, when the right thing would be that the groupings remain independent of the amount of data.

 

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 29 Jun 2021, 07:30 AM

Hi Regis,

Thank you for sharing the two screenshots along with the information on the PDF export.

Indeed, it is rather expected as when the grid is configured to export all pages, some groups are split across 2 or more pages. Therefore, when a group continues on the next page, its group header is repeated at the top. Since the grid exports what it "sees", the same group header is exported multiple times as well.

The only alternative that you could undertake is to handle the PDF export on your own. You should request all of the data of the grid and load it in a single page - this ensures that there will be not group split across multiple pages. After that, export the content to PDF, apply custom page breaks and after the export, return the old page size of the grid so that it becomes pageable once again. 

You could make use of our Drawing API for the PDF export, you could find more information and examples here:

https://docs.telerik.com/kendo-ui/framework/drawing/pdf-output/overview

I hope you find this helpful.

 

Kind regards,
Tsvetomir
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/.

Tags
Grid PDFViewer
Asked by
Régis
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or