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.