Grid to PDF Export - wrong page breaks after resizing columns

1 Answer 106 Views
Grid
Alex
Top achievements
Rank 1
Iron
Alex asked on 31 Jul 2023, 01:36 PM

Hi

I export various grids to pdf using some page templates for headers and footers.

This works basically fine but if I fiddle around resizing the columns manually, the pdf starts to break the grid content at the wrong place and it seems to ignore the margins set as options.
Attached you find three examples, one with columns in original width, another one with resized columns, the pdf still applying bottom-margin, the third one with resized columns, the pdf now ignoring the bottom-margin.

Is this a know problem or do I miss an important setting?

Georgi Denchev
Telerik team
commented on 03 Aug 2023, 07:38 AM

Hi, Alex,

Thank you for the provided samples.

I am not quite sure what's causing the problem with the margins as I was not able to replicate it on my end.

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

If it is possible for you, could you share a small Dojo sample with similar sample data and page templates to yours?

Best Regards,

Georgi

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex
Top achievements
Rank 1
Iron
answered on 04 Aug 2023, 10:55 AM | edited on 04 Aug 2023, 11:09 AM

Hi

Thank you for your example.

I additionally had a style like


.k-pdf-export td{
   height:25px;
}

As soon as I remove that style, it works as expected.
Problem not really understood - but solved!

Kind regards

Alex

Georgi Denchev
Telerik team
commented on 09 Aug 2023, 07:01 AM

Hi, Alex,

I am glad you managed to resolve the problem and thank you for sharing what the cause was with the rest of the community!

The custom style would have increased the height of the cells in the exported PDF only. This probably lead to miscalculations in the margin offset and caused the overlap.

Best Regards,

Georgi

Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Iron
Answers by
Alex
Top achievements
Rank 1
Iron
Share this question
or