Hi
For demo purposes I have defined a paragraph style 'Example' with 3x line spacing and a large 50pt spacing before and after. If a text with this style is added to the main document everything works as expected. If it is added into a table cell the resulting docx works as expected in MS Office but in Libreoffice only the top spacing is applied, the bottom spacing and line spacing is ignored.
Strangely I can see in the styles panel that the 'Example' style is properly applied and if I re-apply the same style it gets fixed in libreoffice too. As we only need libreoffice for PDF output that doesn't help though.
Is there any way to fix this so libreoffice applies the full style definition of a paragraph in a cell right away?
Regards
Code
$docx = new CreateDocx(); $docx->importStyles(resource_path('word/example.docx')); $docx->addText(str_repeat('Lorem Ipsum ', 20), ['pStyle' => 'Example']); $p1 = new WordFragment($docx); $p1->addText(str_repeat('Lorem Ipsum ', 20), ['pStyle' => 'Example']); $docx->addTable([[['value' => $p1]]]); $docx->createDocx('Output');
Sample output of the same document:
https://ibb.co/Y8kDpmr