Documentation and demo for module slides

Summary

This module makes it possible to create multiple slides with a loop in a pptx. For example, you could clone slides for each of your products. The whole order of the slides can be declared from the data.

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

Demo

Input Output
Data Code
{
    "slides": [
        {"$slide": 1, "title": "hi", "date": "ho"},
        {"$slide": 2, "subtitle": "hello"},
        {"$slide": 3, "image": "1"},
        {"$slide": 3, "image": "2"}
    ]
}
const doc = new Docxtemplater();
const inputZip = new JSZip(docX);
const slidesModule = new SlidesModule({});
doc.setOptions({fileType: "pptx"})
	.loadZip(inputZip)
	.setData(data)
	.attachModule(slidesModule);
const output = doc.render().getZip();

Have any questions ? Contact us at contact@javascript-ninja.fr


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.