Documentation and demo for module qrcode

Summary (version 3.0.0) Demo Readme Changelog

This module makes it possible to replace an image by an other image

This module is available as part of the docxtemplater pro plan.


Input Output
Data Code
    "image": "examples/firefox.png"
const fs = require("fs");
const doc = new Docxtemplater();
const inputZip = new JSZip(docX);
const qrCodeModule = new QrCodeModule({
	loader: function(tag) {
		return fs.readFileSync(path.resolve(__dirname, "..", "images", tag));
qrCodeModule.decodeImages(inputZip, () => {
	const output = doc.render().getZip();


QrCode Module

This module exposes a tag to include qrCode. The qrcode of the pages are parsed, then they are replaced with with the loader function.

Docxtemplater will keep all the styling that you put on your qrcode (shades, effects, size, ...).


You will need docxtemplater v3: npm install docxtemplater

Install this module with npm install --save "$url"


Your docx should contain an image that contains a qrcode text. You can use a in Text mode to generate your qrcodes.


You can build the es6 into js by running npm run compile


npm test



Initial release

Have any questions ? Contact us at

Subscribe to our newsletter and keep up to date on the changes done in docxtemplater.

Edgar Hipp

I'm the creator of docxtemplater. I work on making docxtemplater great since 2013.