docx-templates: HTML (altchunk) not supported/displayed when opening in LibreOffice

Wanted to use docx templates in our process to generate a pdf report. Just spotted that LibreOffice isn’t displaying that HTML rendered with docx-templates altchunk at all.

Is it only me who is experiencing such problems? Is there any other option to render HTML that’s gonna be opened by LibreOffice?

About this issue

Most upvoted comments

Instead of relying on altchunks it could be done similar to what https://www.npmjs.com/package/html-to-docx does.

So apparently this is due to lack of support for altchunk as it seems to be non-standard. Even MS Word re-formats/re-parses the files with altchunk if you “save as” the docx.

Please note that until a document that contains altChunk elements is opened and saved in Office, it still contains the altChunk parts, and not normal WordprocessingML markup of paragraphs, runs, and text elements. The solution with SharePoint 2010 is that you can use Word Automation Services to update the documents that contain altChunk elements. After Word Automation Services processes it, the document will contain paragraphs, runs, and text elements.

https://ankushbhatia.wordpress.com/2010/10/22/altchunk-an-interesting-scenario/?unapproved=4594&moderation-hash=4178e78d24528e1c1c061e585d38bdc8#comment-4594

what is the relationship between docxtemplater (which is commercial product) and this lib?

There is none. Just a slightly inconvenient naming similarity 😉