File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- import Automizer , {
2- CmToDxa ,
3- ISlide ,
4- ModifyColorHelper ,
5- ModifyShapeHelper ,
6- ModifyTextHelper ,
7- } from './index' ;
8- import { vd } from './helper/general-helper' ;
1+ import Automizer from './index' ;
92import pptxgen from 'pptxgenjs' ;
103
114const run = async ( ) => {
@@ -23,6 +16,12 @@ const run = async () => {
2316 objectName : 'Text 1' ,
2417 } ;
2518 slide . addText ( textboxText , textboxOpts ) ;
19+ slide . addImage ( {
20+ path : 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg' ,
21+ objectName : 'Image 1' ,
22+ x : 1 ,
23+ y : 2 ,
24+ } ) ;
2625
2726 await presPptxGen . writeFile ( {
2827 fileName : templateDir + '/presPptxGenTmp.pptx' ,
@@ -41,6 +40,7 @@ const run = async () => {
4140
4241 pres . addSlide ( 'shapes' , 1 , ( slide ) => {
4342 slide . addElement ( 'presPptxGenTmp' , 1 , 'Text 1' ) ;
43+ slide . addElement ( 'presPptxGenTmp' , 1 , 'Image 1' ) ;
4444 } ) ;
4545
4646 pres . write ( `myOutputPresentation.pptx` ) . then ( ( summary ) => {
You can’t perform that action at this time.
0 commit comments