You are currently offline, serving cached version

ODT Module

With the ODT module, you can template ODT files (generated by libreoffice) using docxtemplater.

The module currently supports following features :

  • simple tag replacement : {name} => John
  • loops : {#users}{name}{/}
  • paragraphLoop option
  • parser option to be able to use angular parser

Usage (nodejs)

Your odt should contain the text: {name}

const OdtModule = require("docxtemplater-odt-module");
const fs = require("fs");

const doc = new Docxtemplater(zip, {
    modules: [new OdtModule({})],
});
doc.render({ name: "John" });

const buffer = doc.toBuffer();
fs.writeFile("output.odt", buffer);

After installing the module, you can use a working demo by running node sample.js.

CHANGELOG

3.0.0

Initial release.

Talk with sales Contact us