Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 PptxGenJS 库用 javascript 创建一个 pptx 文件。我想在保存之前预览 pptx。我该如何处理?
恐怕这是不可能的。您需要以某种方式将创建的幻灯片放入 PowerPoint 中才能查看它,这需要保存和加载。
要真正为幻灯片创建预览功能,您必须用 JavaScript 编写一个完整的幻灯片渲染引擎,这显然是一项巨大的工作。
也许您的脚本可以将文件保存在临时位置的某个地方,并在 PowerPoint 中创建简单的宏以启用某种预览,之后可以使用最终名称和文件路径保存文件?