UNPKG

er-nodejs-pptx

Version:

Generate PPTX files on the server-side with JavaScript.

31 lines (23 loc) 679 B
let { Presentation } = require('./presentation'); class Composer { constructor() { this.presentation = new Presentation(); } getSlide(slideNameOrNumber) { return this.presentation.getSlide(slideNameOrNumber); } async load(filePath) { this.presentation.templateFilePath = filePath; await this.presentation.loadExistingPPTX(); return this; } async compose(func) { await func(this.presentation); return this; } async save(destination) { await this.presentation.save(destination); return this; } } module.exports.Composer = Composer;