Forum


Replies: 2   Views: 1253
Exception on importstyles() with version 10.0, works in 9.5
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 dan_brokerbusiness  · 10-09-2020 - 01:01

Hi

we are getting the exception "DOMDocument::loadXML(): Empty string supplied as input" (see https://ibb.co/2tySFhG) when using importStyles with 'replace' as second parameter and even the most simple word document (newly created MS Word with only 1 Word and a style applied). 

It works when the 'merge' param is used instead of 'replace'.
It works when using phpdocx version 9.5, but fails in 10.0.

$docx = new CreateDocx();
$docx->importStyles(resource_path('word/simple.docx'), 'replace');
$docx->createDocx('Output');

Seems to be a bug?

Regards