Forum


Replies: 1   Views: 3011
Text align to table within table or how to keep a table from dropping individual rows onto next page
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  · 19-01-2018 - 08:02

Hello,

UPDATE:

Prevent break tables using addTable

Prevent break tables using HTML

 

MS Word doesn't include an option to keep tables on single pages (https://word.tips.net/T000865_Keeping_Table_Rows_Together.html). You can get a similar behavior using keep lines (page-break-after: avoid;) and keep next (page-break-inline: avoid;) styles, but they are only available for paragraphs. So you should add paragraphs for each cell and then apply these keep styles.

DOCXPath and DOCXCustomizer can be helpful in modifying tables an applying that kind of styles after the HTML to DOCX conversion has been completed, but they are only available in Advanced (DOCXPath) and Premium (DOCPath and DOCXCustomizer) licenses.

About your question, sorry but there's no way to force a text-align to cells within table inside another table.

Regards.