将 PowerPoint 转换为 SWF Flash
Contents
[
Hide
]
将 PPT(X) 转换为 SWF
The save method exposed by Presentation class can be used to convert the whole presentation into SWF document. The following example shows how to convert a presentation into SWF document by using options provided by SWFOptions class. You can also include comments in generated SWF using SWFOptions class and NotesCommentsLayoutingOptions class.
var pres = new aspose.slides.Presentation("Sample.pptx");
try {
var swfOptions = new aspose.slides.SwfOptions();
swfOptions.setViewerIncluded(false);
swfOptions.getNotesCommentsLayouting().setNotesPosition(aspose.slides.NotesPositions.BottomFull);
// 保存演示文稿
pres.save("Sample.swf", aspose.slides.SaveFormat.Swf, swfOptions);
} finally {
if (pres != null) {
pres.dispose();
}
}
常见问题
我可以在 SWF 中包含隐藏的幻灯片吗?
是的。使用 setShowHiddenSlides 方法在 SwfOptions 中。默认情况下,隐藏的幻灯片不会被导出。
我如何控制压缩以及最终的 SWF 大小?
使用 setCompressed 方法和 setJpegQuality 来平衡文件大小和图像保真度。
“setViewerIncluded”的作用是什么,何时应使用它?
setViewerIncluded 添加嵌入式播放器 UI(导航控件、面板、搜索)。如果您计划使用自己的播放器或需要没有 UI 的裸 SWF 框架,请使用它。
如果导出机器缺少源字体会怎样?
Aspose.Slides 将使用您通过 setDefaultRegularFont 在 SwfOptions 中指定的字体进行替换,以避免意外的回退。