We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node -v: v16.15.1
node -v
npm -v: 8.11.0
npm -v
npm ls officegen: [email protected]
npm ls officegen
Operating system: MacOS Catalina
Microsoft Office version: 16.65 (Powerpoint for Mac)
Problem with Powerpoint, Excel or Word document: Powerpoint
Execute this
const officegen = require('officegen') const fs = require('fs') const { compose } = require('async') const { sep } = require('path') const os = require('os'); const tempDir = fs.mkdtempSync(`${os.tmpdir()}${sep}`); const pptx = officegen({ type: 'pptx', tempDir: `a${tempDir}${sep}`}); slide = pptx.makeNewSlide() slide.name = 'Pie Chart slide' slide.back = 'ffff00' // e.g. From https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg slide.addImage("tiger.svg"); return new Promise((resolve, reject) => { let out = fs.createWriteStream('example.pptx') pptx.on('error', function(err) { reject(err) }) out.on('error', function(err) { reject(err) }) out.on('close', function() { resolve() }) pptx.generate(out) }).then( r => console.log("done")).catch(e => console.error("Failed:" + JSON.stringify(e)));
First question I guess...is using addImage to add an svg to a pptx file supported? If so, what is going wrong with the little test?
Tx!
Peter
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
node -v
: v16.15.1npm -v
: 8.11.0npm ls officegen
: [email protected]Operating system: MacOS Catalina
Microsoft Office version: 16.65 (Powerpoint for Mac)
Problem with Powerpoint, Excel or Word document: Powerpoint
Steps to Reproduce
Execute this
Behavior: slide gives "The picture can't be displayed"
Expected: svg is in slide (as would be the case when using insert picture)
First question I guess...is using addImage to add an svg to a pptx file supported? If so, what is going wrong with the little test?
Tx!
Peter
The text was updated successfully, but these errors were encountered: