guigrpa / docx-templates

Template-based docx report creation
MIT License
882 stars 145 forks source link

Generated Documents with a ToC can not exported by Word #376

Open gmamekudz opened 1 month ago

gmamekudz commented 1 month ago

First, this module is very cool! Thanks!

But I have a big problem after generate my documents. All documents which contains a ToC can not exported to PDF by Word, Acrobat or LibreOffice can do it, not Word. I think that there ia any silly problem by the node structure.

To reproduce the bug you have simple create a document in Word an add a paragraph with header and insert a table of content. Then use the docx-templates module to generate a new document. If you open the generated document and start the build-in PDF export, the result will be an errror without any successfull PDF.