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

PDF Export - long texts cutoff

1 Answer 1088 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 21 Oct 2020, 03:27 PM

Hi,

I have an issue when exporting the grid's content into PDF as rows which contain long texts appear cut off within the same page in the generated PDF. 

This is my current pdf grid configuration:

       pdf: {
            fileName: "myfile.pdf",
            allPages: true,
            paperSize: "A3",
            margin: { top: "2cm", right: "0.5cm", bottom: "1cm", left: "0.5cm" },
            landscape: true,
            scale: 0.8
        }

 

 

 

Is there any way to configure the kendo grid in order to export the full content of a row in many pages to avoid cutoffs?

 

Thanks.

Carlos

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 23 Oct 2020, 01:06 PM

Hello Carlos,

By default, the content of the Grid cells will not have any rule set for their word-wrap CSS property. That would result in longer words being truncated when there is not enough space in the cell. In order to export the full content of each cell, you could set the word-wrap to break-word. To do that on the exported PDF only, you could apply the following CSS rule:

.k-pdf-export .k-grid-content td[role="gridcell"] {
  word-wrap: break-word;
}

Here is a small sample, which implements the above suggestion, as well as the PDF configuration, sent along with your initial post:

https://dojo.telerik.com/UTeVuVUL/3

I hope that the above helps. If you have any other questions, please do not hesitate to contact us.

Regards,
Veselin Tsvetanov
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
Asked by
Carlos
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or