Forum


Replies: 1   Views: 2584
How does the cantsplit property of table rows work?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 18-12-2018 - 16:12

UPDATE:

Prevent break tables using addTable

Prevent break tables using HTML

 

Hello,

The cantSplit option set 'Allow row to break across pages' as false, so if the row content doesn't fit in a page, the whole row moves to the next page.
If you need to keep rows on the same page, then you need to use keepNext and keepLines options available in paragraph contents and paragraph styles.

You can read more about this MS Word behavior on the following pages:

https://word.tips.net/T000865_Keeping_Table_Rows_Together.html

https://answers.microsoft.com/en-us/msoffice/forum/all/how-do-i-keep-table-rows-together/4d9b5f24-933f-49e1-825e-eabacd2b86b1

https://word.tips.net/T000864_Keeping_Tables_on_One_Page.html

These samples illustrate how to do it using MS Word, but can set the same options using phpdocx.

Regards.