pqzx / html2docx

Convert html to docx
MIT License
69 stars 49 forks source link

Add support for DocxTemplate fom docxtpl package #36

Open Zedstron opened 2 years ago

Zedstron commented 2 years ago

Feature Request

So far now the package is excellent and doing great, i would like to request support for the document package called "docxtpl" a MS Word templating package which supports JINJA2 as in Django, but it only accepts plain Document class for conversion.

from docx import Document
from htmldocx import HtmlToDocx
from docxtpl import DocxTemplate

new_parser = HtmlToDocx()
doc = Document # this works
doc = DocxTemplate() #this did not worked, but it is supposed to
new_parser.add_html_to_document(html, doc)

This is the package link