PHPOffice / PHPWord

A pure PHP library for reading and writing word processing documents
https://phpoffice.github.io/PHPWord/
Other
7.22k stars 2.69k forks source link

Different results ODT vs. DOCX #1492

Open 1manfactory opened 5 years ago

1manfactory commented 5 years ago

I tried the following file

https://github.com/PHPOffice/PHPWord/blob/develop/samples/Sample_08_ParagraphPagination.php

The results of ODT and DOCX look totally different, especially if you take into account that he purpose of this sample was to show pagination effects.

I add the screenshots.

odt docx

satheeshck17 commented 5 years ago

Hi, Did you got any solution for this? I'm also struggling to add indent for entire paragraph and justification for .odt. I think these features are not implemented for ODText. Any clue to implement this?

Thank you

1manfactory commented 5 years ago

No. Still waiting.

satheeshck17 commented 5 years ago

I've temporarily fixed it by adding justification and indent tags in paragraph properties. $xmlWriter->writeAttribute('fo:text-align',"justify"); $xmlWriter->writeAttribute('fo:margin-left', '1.249cm');