Roshan
Roshan

Reputation: 915

Convert HTML to WordML with CSS styling

I have DOCX templates with placeholders enclosed in curly brackets (e.g., {goals}, {objective}, {summary} and etc ). Using LLM API, I generate text to replace these placeholders, with the output in HTML format. I'm utilizing Nokogiri for the replacement and the Wordinserter Python library to convert the HTML to WordML. While the plain text conversion works as expected, I'm having trouble preserving formatting elements such as bullet points, tables, fonts, colors, and other styling details.

Since LLM generates plain HTML without any DOCX-specific styling, I was wondering how best to address this issue to ensure proper formatting in the final DOCX output.

Upvotes: 0

Views: 39

Answers (0)

Related Questions