Starting to use the library PptxGenJs. Wanted to create a masterslide with a image/logo inserted into a slide. However when I open up the powerpoint I get a big red X instead of the graphic that I want. Currently using Powerpoint 2013 to open up my powerpoint
I've tried as well to add an image with the function
slide.addImage({OPTIONS});
and it still appears red. I've tried different types of images (jpeg and png) and still getting the same error.
window.doDemo = function demo() {
var pptx = new PptxGenJS();
pptx.setLayout('LAYOUT_4x3')
pptx.defineSlideMaster({
title: 'MASTER_SLIDE',
bkgd: 'FFFFFF',
objects: [
{ 'line': { x: 3.5, y:1.00, w:6.00, line:'0088CC', lineSize:5 } },
{ 'rect': { x: 0.0, y:5.30, w:'100%', h:0.75, fill:'F1F1F1' } },
{ 'text': { text:'Status Report', options:{ x:3.0, y:5.30, w:5.5, h:0.75 } } },
],
slideNumber: { x:0.3, y:'90%' }
});
var slide = pptx.addNewSlide('MASTER_SLIDE');
slide.addImage({ path:'hey.png', x:1, y:1, w:8.0, h:4.0 });
slide.addText('How To Create PowerPoint Presentations with JavaScript', { x:0.5, y:0.7, fontSize:18 });
pptx.save();
}