Closed BahaaEldeenOsama closed 8 months ago
I don't think the template processor was designed to work with anything other than Word2007 format. However, since you've saved the output file, you should be able to read it back in:
// Convert Word document to HTML
$reader = new \PhpOffice\PhpWord\Reader\Word2007();
$phpWord = $reader->load($filename);
$htmlWriter = new \PhpOffice\PhpWord\Writer\HTML($phpWord)
$htmlContent = $htmlWriter->saveToString();
Describe the Bug
TemplateProcessor not working with IOFactory::createWriter().
PhpOffice\PhpWord\IOFactory::createWriter(): Argument 1 ($phpWord) must be of type PhpOffice\PhpWord\PhpWord, PhpOffice\PhpWord\TemplateProcessor
Steps to Reproduce
Please provide a code sample that reproduces the issue.
Context
Please fill in your environment information: