Miramac / node-office-script

Scripting MS Office application with node.js
ISC License
49 stars 5 forks source link

saving all slides as images #23

Open hoodji opened 4 years ago

hoodji commented 4 years ago

This is a request similar to the one about PDFs, I need to be able to save the slides as a pac using saveas, but with a target of PNG, or SVGA

Miramac commented 4 years ago

I have added the option to save a presentation as png files in office-script@1.5.0

const path = require('path')
const Presentation = require('office-script').Presentation
const presentation = new Presentation(path.join(__dirname, '/MyPresentation.pptx'))
presentation.saveAs({ name: path.join(__dirname, 'MyPresentation-Slides'), type: 'png' })
presentation.quit()