Replies: 3   Views: 2826
Unable to convert doc to html, docx to html works
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 razasayed  · 18-10-2018 - 15:10


Im using the corporate premium version of phpdocx v8.2  which has the conversion capabilities. Im able to convert a docx file to html . However converting doc to html is not working. My code to convert docx to html is like whats given in the sample at .

$transformHTMLPlugin = new TransformDocAdvHTMLDefaultPlugin();
$transform = new TransformDocAdvHTML('document.docx');
$html = $transform->transform($transformHTMLPlugin);

If i pass a doc file to TransformDocAdvHTML for example "$transform = new TransformDocAdvHTML('test.doc')", then calling '$transform->transform($transformHTMLPlugin)' gives the following error:

"Exception with message 'Error while trying to open the (base) template as a zip file'"

Can existing doc files be converted to html using phpdocx ?. If yes,i would appreciate some example code to do that.

Thank You

Posted by razasayed  · 19-10-2018 - 09:18

I did the following to convert a doc to docx first

$docx = new CreateDocx();

$docx->transformDocument('test.doc', 'test.docx')

I get the error "PHP Error: Class 'Phpdocx/Logger/Exception not found..."

Posted by admin  · 19-10-2018 - 10:06


We recommend you to read the documentation available on to understand how to install and use the conversion plugin available in Advacend and Premium licenses. On these documentation pages you can also find the steps to debug and test the conversion plugin.

For further support about this question, please send to contact[at] the username or e-mail of the user that purchased the license.