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
纯jis下载ppt,svg文件可以正常显示 通过node下载svg文件显示异常, 附件是demo可以复现 demo.zip
The text was updated successfully, but these errors were encountered:
import pptxgen from 'pptxgenjs'; const pptx = new pptxgen(); pptx.layout = 'LAYOUT_16x9'; const pptxSlide = pptx.addSlide(); pptxSlide.addImage({ path: 'xxx.svg', x: 1, y: 1, w: 4, h: 3, }); pptxSlide.addImage({ data: 'data:image/svg+xml;base64,xxxx', x: 1, y: 1, w: 4, h: 3, }); pptxSlide.addImage({ path: 'xxx.jpg', x: 1, y: 1, w: 4, h: 3, }); pptxSlide.addImage({ data: 'data:image/png;base64,xxxx', x: 1, y: 1, w: 4, h: 3, }); pptxSlide.addText('TEST', { x: 2, y: 3, w: 5, h: 3, color: 'DDDD00', fontSize: 90 }); pptx.writeFile({ fileName: `test.pptx` });
你可以简单写一个这样的node脚本测试一下,结论就是pptxgenjs不支持在node.js环境下添加svg图片(不论是文件还是base64)。不一定100%准确,你可以继续验证下。如果是这样,你只能在pptxgenjs仓库下寻求解决。或者调整实现方法,例如:前端导出、node先转格式再导出、尝试在node中调用puppeteer来导出等
Sorry, something went wrong.
No branches or pull requests
纯jis下载ppt,svg文件可以正常显示
通过node下载svg文件显示异常,
附件是demo可以复现
demo.zip
The text was updated successfully, but these errors were encountered: