How to keep together a table

1 Answer 641 Views
PdfProcessing
Ziraat Teknoloji A.S.
Top achievements
Rank 1
Ziraat Teknoloji A.S. asked on 06 Jan 2022, 08:31 AM | edited on 06 Jan 2022, 11:00 AM

In a huge pdf, some part of table is placed previous page and the rest is placed next page. I need to keep a table together in one page. 

I only find a way might work (but didn't work) TableRow CanSplit property. To achieve this, I created wrapper table 1 row, 1 cell and set row CanSplit property to false. Then, added actual table to wrapper table cell. But this doesn't work.

Is there any way to keep them together?

Edit 1 : Using RadFlowDocument to create document and PdfFormatProvider to export.

1 Answer, 1 is accepted

Sort by
-1
Tanya
Telerik team
answered on 06 Jan 2022, 02:12 PM

Hello,

We have a request for this functionality on our public portal: WordsProcessing: Respect TableRow.CanSplit property when exporting to PDF. You can use the related item to vote for the implementation of the task as well as subscribe to track status changes on it.

If you need to create PDF documents only, you can use the PdfProcessing library to generate them. With this library, you can measure the elements inside the remaining space on the page and transfer them to a new page if needed. We have a good knowledge base article showing how you can create a table with a repeating header row: https://docs.telerik.com/devtools/document-processing/knowledge-base/pdfprocessing-create-repeat-header-row. Although it is not the same as keeping the row on a single page, it demonstrates how you can measure a table row to check whether it fits inside the available space.

Hope this is helpful.

Regards,
Tanya
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
PdfProcessing
Asked by
Ziraat Teknoloji A.S.
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or