Forum


Replies: 2   Views: 1459
Having issue to convert html to docx using createdocx class
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 turnercmt  · 21-11-2020 - 04:39

We are using PHPDOCX library to convert html to docx file.
To convert html to docx have used 'CreateDocx' class of PHPDOCX library.
And creating docx and downloading it using 'createDocxAndDownload' method of class.

Currently facing the issue is,

1. if html in <div>,<p>,<span> structure then while conversion into docx width of div not getting consider. So all the content showing one by one.
It's not look good specially in header and footer.

2. If we use <table> structure then while conversion into docx alignment shows proper on office 07, 13. But it's look messy on office 365. Also in Onlyoffice shows table border.

Please suggest the which method we have to call to convert the HTML to DOCX which will open in all client and keep same structure.