If you have a set of raster picture files (for example, after converting PDF to JPG's) and you want to nicely wrap them into PowerPoint presentation–images-pptx is everything that you need.
Use it with pure Node.js or TypeScript: library is written on TS and has all typings.
npm install --save images-pptx
Add it to your project:
After that, you can use it like this:
|pictures||Array of full paths to images (array of string) or single string to the directory where image files are placed|
|saveTo||Path to the directory (string) where .pptx file will be created|
|pptxFileName||Name of .pptx file (string) (default is "presentation.pptx"|
|extension||Extension of pictures (string, default: "jpg") which will be used in pptx (f.e. "jpg")|
|native||Boolean (default is
|meta||Meta fields for presentation (see below)|
This will generate file
/Users/username/Presentation/Our great party.pptx with all the .png files from
For every key in
meta objects there are default values:
- Output from
You can use
images-pptx as command-line app. Install it globally or call it from node_modules folder.
npm install -g images-pptx# after installingimages-pptx --help# ...all usage options printed next
How fast is it?
All test were made on MacOS, using
|3 pictures, ~8.5mb total; native: false; directory with extension as a path||453.053ms|
|3 pictures, ~8.5mb total; native: true; directory with extension as a path||335.393ms|
|27 pictures, ~49mb total; native: false; directory with extension as a path||2518.479ms|
|27 pictures, ~49mb total; native: true; directory with extension as a path||1893.986ms|
|3 pictures, ~8.5mb total; native: false; array of direct paths||323.845ms|
- Browser version of
- Proportional resizing of pictures
Found a bug?
Feel free to contribute, create an issue or contact me directly. All my contacts are availabe on my website