Hello,
That line (877), includes the following lines:
$documentCoreContent = $this->docxStructure->getContent('docProps/core.xml');
$tags = '';
$xmlCoreContent = new \DOMDocument();
$xmlCoreContent->loadXML($documentCoreContent);
It gets the docProps/core.xml file, that is a required file for a DOCX document. Maybe your DOCX doesn't include that file?
What program did you use to generate the DOCX you are trying to transform?
Please also try to run the included samples in the examples folder.
If your DOCX doesn't include that file (although it should), please edit the TransformDocAdvHTML.php to check if the content exists:
protected function getMetaValues()
{
$documentCoreContent = $this->docxStructure->getContent('docProps/core.xml');
$tags = '';
if ($documentCoreContent) {
$xmlCoreContent = new \DOMDocument();
$xmlCoreContent->loadXML($documentCoreContent);
foreach ($xmlCoreContent->childNodes->item(0)->childNodes as $prop) {
switch ($prop->tagName) {
case 'dc:title':
$tags .= '<title>' . $prop->nodeValue . '</title>';
break;
case 'dc:creator':
$tags .= '<meta name="author" content="' . $prop->nodeValue . '">';
break;
case 'cp:keywords':
$tags .= '<meta name="keywords" content="' . $prop->nodeValue . '">';
break;
case 'dc:description':
$tags .= '<meta name="description" content="' . $prop->nodeValue . '">';
break;
default:
break;
}
}
}
return $tags;
}
We move your issue to the dev team to test if this check need to be added to the stable package.
Regards.