I want to generate Word document from HTML field( a field that you can write into a text and set it Bold, Italic, Font color size,..). i used for this Python-docx to generate the WOrd document .Everythink is Ok (Adding picture, Text,..)the only problem is the style. The problem is i have the content in the word document but without style.
i tried to save the content like a HTML file and after that to create a python-docx file like the following:
html_f=open('f_html.html','w')
html_f.write(u''+contenu)
html_f.close()
doc2=docx.Document('f_html.docx')
But i dont't have a result and Document() haven't find the file. Any help please