This project is read-only.

Generating html and Docx at the same time

Jul 25, 2014 at 10:56 AM
Hello there.

I want to be able to generate a docx document and an html preview of the document at the same time, with the same code for sustainability purpose.

The generated docx document works well. However, when I generate html from it doesn't put any class inside the html lines, just the css.

$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$objWriter->save('CRR.html');

Do I have to add the classes manually inside my text or can I do it by using the addText() argument?