index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@3.10.0/dist/pptxgen.bundle.js"></script> <div> <h1>PptxGenJS Demo</h1> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script> let pptx = new PptxGenJS(); let slide1 = pptx.addSlide(); let opts1 = { x: 0.0, y: 0.25, w: '100%', h: 1.5, align: 'center', fontSize: 24, color: '0088CC', fill: 'F1F1F1' }; slide1.addText( 'This is the First Slide of the PPTX Presentation', opts1 ); let slide2 = pptx.addSlide() let opts2 = { x: 2.0, y: 0.75, w: '100%', h: 1.5, align: 'center', fontSize: 24, color: 'fff', fill: '000' } slide2.addText("JOHN WILLIAMSON LATHAM IS THE CAPTAIN OF NEW ZEALAND",opts1) let slide3 = pptx.addSlide(); // Image from remote URL slide3.addImage({ path:"https://cdn.pixabay.com/photo/2014/05/26/13/32/butterfly-354528__340.jpg", x: "15%", y: "1%", h: "75%", w: "75%" }); pptx.writeFile(); </script> |