elapouya / python-docx-template

Use a docx as a jinja2 template
GNU Lesser General Public License v2.1
1.91k stars 378 forks source link

Unable to render variables in document property fields #464

Closed Slarag closed 1 year ago

Slarag commented 1 year ago

I'm having a document where the document title is shown multiple times across the document using a document info field (like this). Basically, e.g. the content of the Title field is "{{ test }}" which I would expect to be replaced by the according context value, but the value will remain unchanged in the resulting document. Is there a workaround for this issue? Example files (Renamed test.py to test.py.csv for uploading):

test.docx test.py.csv