PptxGenJS-Demo
Home: https://github.com/gitbrent/PptxGenJS/
by Brent Ely
HTML
<script src="https://rawgit.com/gitbrent/PptxGenJS/master/dist/pptxgen.bundle.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.1.3/yeti/bootstrap.min.css">
<h1><a href="https://github.com/gitbrent/PptxGenJS/">PptxGenJS</a> - Demo</h1>
<h3>Generate PowerPoint from JavaScript</h3>
<div class="container my-4 bg-light">
<div class="row">
<div class="col p-3">
<h5>PptxGenJS version</h5>
</div>
<div id="ver" class="col p-3">
<h5>?</h5>
</div>
</div>
</div>
<button type="button" class="btn btn-success my-4 w-50" onclick="doDemo()">Generate Demo PowerPoint</button>
CSS
body { margin:20px; }
JavaScript
// Lets make sure were setup correctly
var pptx = new PptxGenJS();
$('#ver').html('<h5>'+pptx.version+'</h5>');
// Simple Slide
window.doDemo = function do7cells() {
var pptx = new PptxGenJS();
var slide = pptx.addNewSlide();
var opts = { x:1.0, y:1.0, fontSize:42, color:'00FF00' };
slide.addText('Hello World!', opts);
pptx.save();
}