1

I'm attempting to convert a DOCX document to HTML using the PHPWord library. However, during the conversion process, it doesn't include images, backgrounds, headers, or footers. It only retains tables and plain text without any styling. Below my code:

use PhpOffice\PhpWord\IOFactory;
$phpWord = IOFactory::load('test1.docx', 'Word2007');
$htmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$htmlWriter->save('test.html');

please, any idea on how to fix this?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.