C++ で PowerPoint プレゼンテーションを SWF Flash に変換
プレゼンテーションをFlashに変換
The Save method exposed by Presentation class can be used to convert the whole presentation into SWF document. You can also include comments in generated SWF by using SWFOptions class and INotesCommentsLayoutingOptions interface. The following example shows how to convert a presentation into SWF document by using options provided by SWFOptions class.
// ドキュメントディレクトリへのパスです。
System::String dataDir = GetDataPath();
// プレゼンテーション ファイルを表す Presentation オブジェクトを作成します
auto presentation = System::MakeObject<Presentation>(dataDir + u"HelloWorld.pptx");
auto swfOptions = System::MakeObject<SwfOptions>();
swfOptions->set_ViewerIncluded(false);
auto notesOptions = swfOptions->get_NotesCommentsLayouting();
notesOptions->set_NotesPosition(NotesPositions::BottomFull);
// プレゼンテーションとノート ページを保存します
presentation->Save(dataDir + u"SaveAsSwf_out.swf", SaveFormat::Swf, swfOptions);
swfOptions->set_ViewerIncluded(true);
presentation->Save(dataDir + u"SaveNotes_out.swf", SaveFormat::Swf, swfOptions);
よくある質問
SWFに非表示スライドを含めることはできますか?
はい。 Use the set_ShowHiddenSlides method in SwfOptions. By default, hidden slides are not exported.
圧縮や最終的なSWFサイズをどのように制御できますか?
Use the set_Compressed method and adjust JPEG quality to balance file size and image fidelity.
‘set_ViewerIncluded’ は何のためのもので、いつ使用すべきですか?
set_ViewerIncluded adds an embedded player UI (navigation controls, panels, search). Disable it if you plan to use your own player or need a bare SWF frame without UI.
エクスポート先のマシンに元フォントが存在しない場合はどうなりますか?
Aspose.Slides will substitute the font you specify via set_DefaultRegularFont in SwfOptions to avoid an unintended fallback.