Forum


Replies: 4   Views: 1460
Docx supported formats?
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  · 27-01-2021 - 08:06

Hello,

phpdocx doesn't throw an Exception in this particular case; a fatal error appears from PHP. All DOCX must contain at least one section (sectPr tag).

An Exception could be added in the class if the following sectPr variable is null:

$sectPr = $sectPrNodes->item(0);

or handle the error in a generic way if you are using PHP 7: https://www.php.net/manual/en/language.errors.php7.php

Using not valid DOCX documents as this case may return unexpected results/errors.

Regards.