PDF Export - Issue with Column-Count css

1 Answer 62 Views
PDF Processing Styling / Themes
Stephen
Top achievements
Rank 1
Stephen asked on 30 Mar 2022, 04:19 AM

I'm having a strange formatting issue when exporting to PDF. I'm using column-count to divide text in a div into 2 columns. When I export to PDF, some of the text is pushed to the next page. There is plenty of space on the first page for all the text to fit.

I have put a sample of the issue out in StackBlitz that reproduces the formatting issue. I'm probably just overlooking something, but a little help would be much appreciated.

Thanks!

Edit on StackBlitz 

  

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 30 Mar 2022, 11:45 AM

Hi, Stephen,

Upon further investigation, it seems that the encountered behavior is expected as mentioned in the documentation:

https://www.telerik.com/kendo-react-ui-develop/components/drawing/limitations-browser-support/#toc-general-behavior

The PDF export of vertically aligned elements is not fully compatible with automatic page-breaking and might lead to undesired side effects.

Regards, FilipProgress 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/.

Stephen
Top achievements
Rank 1
commented on 30 Mar 2022, 01:49 PM

Is it possible to use the keepTogether Prop for vertically aligned elements?

Is there any good documentation on how to use the keppTogether prop?

Stephen
Top achievements
Rank 1
commented on 30 Mar 2022, 07:40 PM | edited

I was able to reduce the scale to fix part of the issue, but there seems to be a large gap at the end of each page that is very strange. Is this another limitation?

 

Here are the changes I made to StackBlitz.

https://stackblitz.com/edit/react-ts-bxqk4q

Filip
Telerik team
commented on 31 Mar 2022, 12:47 PM

Hi, Stephen,

The keepTogether prop can be used for vertical alignment only. We have an available demo that showcases how to use it here:

https://www.telerik.com/kendo-react-ui/components/drawing/dom-elements/multi-page-content/#toc-preventing-page-breaking-in-elements

In regard to your second question about the gap,  the component has inbuild logic that calculates when to move the components.

Because the scale is set to 0.9 the logic interprets that there is not enough space, even though it seems there is. A possible solution would be to tweak the scale value until satisfactory results are reached.

Regards,
Filip
Tags
PDF Processing Styling / Themes
Asked by
Stephen
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or