PHPOffice / PHPWord

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

bug: if Word have Justify Format when i used $phpWord = \PhpOffice\PhpWord\IOFactory::load('test.docx'); #529

Open xjdata opened 9 years ago

xjdata commented 9 years ago

Thank you that we can provide such a good open source project, I encountered a little problem in the use of the process, please help. THX

bug: if Word have Justify Format when i used
$phpWord = \PhpOffice\PhpWord\IOFactory::load('test.docx');

( ! ) Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid style value: distribute Options:left,right,center,both,justify' in D:\xampp\web\phpword\src\PhpWord\Style\AbstractStyle.php on line 287
( ! ) InvalidArgumentException: Invalid style value: distribute Options:left,right,center,both,justify in D:\xampp\web\phpword\src\PhpWord\Style\AbstractStyle.php on line 287

qq 20150503033841

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/12856942-bug-if-word-have-justify-format-when-i-used-phpword-phpoffice-phpword-iofactory-load-test-docx?utm_campaign=plugin&utm_content=tracker%2F323108&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F323108&utm_medium=issues&utm_source=github).
AntonioMalatestaISA commented 9 years ago

Same problem +1

AntonioMalatestaISA commented 9 years ago

The problem is in class PhpOffice\PhpWord\Style\Alignment. In this class is not present align_start. This value is present in my xml style

christopher-francisco commented 7 years ago

@AntonioMalatesta by any chance when you load it and save, does the format get destroyed?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue for you, please try to help by debugging it further and sharing your results. Thank you for your contributions.