Open SquakR opened 2 years ago
Also, instead of our own solution, we should consider the python-docx-template library. If we use this library, we only need to implement the conversion from docx to pdf because there is no ready solution for Linux.
word_to_pdf(input_path='~/documents/document.docx', output_path='~/documents/document.pdf')
The only problem is that the library uses Jinja2 instead of Django templates.
The current implementation of the document generator which generates a Word or Pdf document depending on the template requires manual unzipping a Word file and extracting a xml document. Generating a Word or Pdf file from a template is a common task that can be useful to many users. Therefore, this feature can be extracted in another independent library with the following API.