| Features | - Jinja2 tags, filters and variables inside a Word document
- {%p %}, {%tr %}, {%tc %} and {%r %} tags for paragraphs, table rows, table columns and runs
- RichText and RichTextParagraph for styled text and hyperlinks
- InlineImage (JPEG, PNG) with sizes in mm, inches or points
- subdocuments, including merging existing .docx files
- replace pictures, media and embedded objects, including in headers and footers
- table helpers: colspan, horizontal and vertical merge, cell background
- get_undeclared_template_variables()
- All 10 features
| - MailMerge-field templates (
«=field») made in Word - method calls and nested hash lookups (
«=buyer.address.street») - conditionals with predicates, elsif and else
- loops that repeat table rows or list items, with nesting
- insert raw WordprocessingML, inline or as paragraphs
- HTML insertion converted to Word paragraphs, tables and lists, with configurable tag and CSS conversion
- images from files, URLs or IO objects, sized by the placeholder or explicitly (beta)
- template comments that don't appear in the output
- All 9 features
| - {tag} replacement in DOCX and PPTX (free core)
- Loops and conditions (free core)
- Custom delimiters (free core)
- Paid modules: Image, HTML, Table, Chart, Styling
- Paid modules: XLSX templating, Slides, Pptx-sub, Html-pptx, Html-xlsx
- Paid modules: Subtemplate, Subsection, Footnotes, Paragraph-placeholder, Word-run, Meta
- Paid modules: Error-location (errors as Word comments), QR code, ODT
| - INS, EXEC, IMAGE, LINK, HTML, FOR/END-FOR, IF/END-IF, ALIAS and QUERY commands
- JavaScript expressions in templates, run in a Node vm sandbox or one you provide
- loops over table rows, nested loops and filter/sort in JavaScript
- dynamic images, hyperlinks and HTML insertion
- literal XML insertion
- custom command delimiters
- error collection (failFast: false) and template inspection
- .docx and .docm templates; Node, Deno, browser and Web Workers
- All 9 features
|
| Limitations | - Doesn't let a Jinja2 tag span several paragraphs, table rows or runs: loops and conditions over them use the {%p %}, {%tr %}, {%tc %} and {%r %} forms
| - Doesn't convert every CSS style when inserting HTML: only a small subset of inline styles has a Word equivalent
| | - Isn't safe for running templates that users upload: templates run JavaScript, and the default Node vm sandbox isn't a security boundary
|