docxtemplater
TypeScript icon, indicating that this package has built-in type declarations

3.54.0 • Public • Published

docxtemplater

Download count Current tag CDNJS version size gzip size

docxtemplater is a library to generate docx/pptx documents from a docx/pptx template. It can replace {placeholders} with data and also supports loops and conditions. The templates can be edited by non-programmers, for example your clients.

docxtemplater is very robust because of the many fixed issues over the years, and the high quality of tests and code.

Features

Demo Site

Quickstart

Documentation

The full documentation of the latest version can be found here.

See CHANGELOG.md for information about how to migrate from older versions.

Modules

Functionality can be added with the following paid modules :

  • Image module to add a given image with the syntax: {%image};
  • Html Module to insert formatted text in a docx document with the syntax {~html};
  • XLSX Module to be able to do templating on Excel files (xlsx extension), also with loops and conditions;
  • Chart Module to replace a chart by using data from the JSON object that you give with the syntax {$chart};
  • Html-Pptx Module to insert formatted text in a pptx document with the syntax {~html};
  • Error Location Module to show the errors in the template using Word comments
  • Slides Module to create multiple slides dynamically with the syntax {:users};
  • Subtemplate Module to include an external docx file inside a given docx file with the syntax {:include doc};
  • Subsection Module to include subsections (headers/footers) from an other document with the syntax {:subsection doc};
  • Subtemplate-pptx Module to include an external pptx file inside a given pptx file with the syntax {:include doc};
  • Word-Run Module to include raw runs (<w:r>) inside the document with the syntax {r@wrun}. This makes it possible to include styled text without having to remove the enclosing paragraph like in the {@rawXml} tag;
  • QrCode Module to replace an image, keeping any existing properties;
  • Table Module to create tables from two dimensional data using the syntax {:table data};
  • Meta Module to make a document readonly, add a text watermark or update the margins;
  • Styling Module restyle a paragraph, a cell or a table depending on some data using the syntax {:stylepar style};
  • Footnotes Module to be able to add footnotes to a document using the syntax {:footnotes foot}
  • Paragraph Placeholder Module to simplify conditions that should show or hide a given paragraph using the syntax {?tag}

About docxtemplater

Docxtemplater is my main job, and has been maintained for over 8 years. Expect to get great support if you buy any modules, and also good support on the open-source version.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.54.014,509latest
1.0.0-beta.21beta

Version History

VersionDownloads (Last 7 Days)Published
3.54.014,509
3.53.05,731
3.52.02,235
3.51.25,091
3.51.11,512
3.51.01,949
3.50.010,659
3.49.21,850
3.49.13,438
3.49.065
3.48.04,634
3.47.45,063
3.47.3170
3.47.21,614
3.47.14,831
3.47.03,315
3.46.22,759
3.46.13,146
3.46.01,567
3.45.1330
3.45.01,377
3.44.01,837
3.43.1471
3.43.0293
3.42.7333
3.42.6669
3.42.50
3.42.4262
3.42.314
3.42.21,219
3.42.1410
3.42.060
3.41.01,110
3.40.372
3.40.2885
3.40.1487
3.40.02
3.39.231
3.39.1634
3.39.0168
3.38.01,742
3.37.14132
3.37.13188
3.37.121,890
3.37.111,143
3.37.102
3.37.9775
3.37.830
3.37.78
3.37.6101
3.37.528
3.37.47
3.37.31
3.37.23,045
3.37.1174
3.37.053
3.36.1287
3.36.059
3.35.11
3.35.00
3.34.3212
3.34.27,077
3.34.1100
3.34.0434
3.33.0618
3.32.6202
3.32.5290
3.32.42,461
3.32.3475
3.32.21
3.32.10
3.32.00
3.31.62,575
3.31.5255
3.31.415
3.31.3217
3.31.21,361
3.31.18
3.31.030
3.30.348
3.30.231
3.30.110
3.30.065
3.29.512
3.29.4466
3.29.30
3.29.24
3.29.148
3.29.0686
3.28.6206
3.28.51
3.28.41
3.28.30
3.28.294
3.28.167
3.28.094
3.27.233
3.27.10
3.27.01
3.26.417
3.26.30
3.26.21
3.26.14
3.26.038
3.25.516
3.25.4131
3.25.33
3.25.21
3.25.11
3.25.010
3.24.04
3.23.29
3.23.12
3.23.018
3.22.8261
3.22.791
3.22.614
3.22.513
3.22.42
3.22.370
3.22.25
3.22.19
3.22.01
3.21.2152
3.21.1248
3.21.06
3.20.140
3.20.01
3.19.1013
3.19.97
3.19.7431
3.19.678
3.19.53
3.19.40
3.19.32
3.19.24
3.19.10
3.19.04
3.18.0163
3.17.9123
3.17.853
3.17.70
3.17.6146
3.17.5114
3.17.40
3.17.34
3.17.22
3.17.14
3.17.026
3.16.116
3.16.101
3.16.91
3.16.80
3.16.72
3.16.60
3.16.51
3.16.40
3.16.30
3.16.20
3.16.10
3.16.01
3.15.5105
3.15.43
3.15.30
3.15.24
3.15.10
3.15.05
3.14.10528
3.14.90
3.14.81
3.14.70
3.14.60
3.14.59
3.14.44
3.14.38
3.14.21
3.14.16
3.14.00
3.13.60
3.13.50
3.13.40
3.13.31
3.13.22
3.13.10
3.13.00
3.12.08
3.11.414
3.11.31
3.11.20
3.11.112
3.11.00
3.10.154
3.9.919
3.9.80
3.9.75
3.9.65
3.9.538
3.9.46
3.9.32
3.9.23
3.9.10
3.9.033
3.8.418
3.8.318
3.8.21
3.8.10
3.8.00
3.7.10
3.7.00
3.6.81
3.6.70
3.6.62
3.6.50
3.6.40
3.6.323
3.6.22
3.6.159
3.6.01
3.5.220
3.5.10
3.5.013
3.4.30
3.4.22
3.4.10
3.4.043
3.3.10
3.3.01
3.2.50
3.2.40
3.2.30
3.2.20
3.2.10
3.2.00
3.1.1233
3.1.110
3.1.101
3.1.90
3.1.81
3.1.7137
3.1.60
3.1.50
3.1.40
3.1.32
3.1.20
3.1.10
3.1.012
3.0.122
3.0.1127
3.0.100
3.0.95
3.0.88
3.0.70
3.0.61
3.0.543
3.0.40
3.0.35
3.0.20
3.0.05
2.1.592
2.1.40
2.1.330
2.1.20
2.1.13
2.1.03
2.0.03
1.2.137
1.2.01
1.1.612
1.1.50
1.1.40
1.1.30
1.1.21
1.1.10
1.1.00
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.21
1.0.10
1.0.01
1.0.0-beta.21
1.0.0-beta1
0.7.70
0.7.61
0.7.50
0.7.41
0.7.30
0.7.20
0.7.11
0.7.00
0.6.31
0.6.20
0.6.11
0.6.00
0.5.91
0.5.80
0.5.71
0.5.61
0.5.50
0.5.41
0.5.32
0.5.20
0.5.11
0.5.01
0.4.81
0.4.70
0.4.61
0.4.50
0.4.40
0.4.31
0.4.20
0.4.11
0.4.00
0.3.30
0.3.20
0.3.10
0.3.00

Package Sidebar

Install

npm i docxtemplater

Weekly Downloads

116,589

Version

3.54.0

License

MIT

Unpacked Size

1.14 MB

Total Files

104

Last publish

Collaborators

  • edi9999