Forum


Replies: 1   Views: 1116
Merged docx cannot be transformed to html
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 syncflipper  · 20-07-2021 - 16:12

Hello!
 

After merging some docx files, I am trying to transform the document to HTML format, but I am getting this error: 

Call to undefined method DOMText::getElementsByTagNameNS()

file: phpdocx/Classes/Phpdocx/Transform/TransformDocAdvHTML.php:2529

The merge function is as follows: 

$docxMerger = new Phpdocx\Utilities\MultiMerge();

$result = $docxMerger->mergeDocx($firstDocument, $docArray, $destination, ['mergeType'=> 1,'preserveStyleDefaults' => true, 'enforceSectionPageBreak' => true, 'numbering' => 'continue']);

 

The transform function is the same as your example.

The issue dissapears if I open the file with MSWord and save it again.
 

Thank you