JavaでPowerPointプレゼンテーションをSWF Flashに変換

PPT(X) を SWF に変換

Save メソッドは、Presentation クラスで公開されており、プレゼンテーション全体を SWF ドキュメントに変換するために使用できます。以下の例は、SWFOptions クラスが提供するオプションを使用して、プレゼンテーションを SWF ドキュメントに変換する方法を示しています。生成された SWF にコメントを含めるには、ISWFOptions クラスとINotesCommentsLayoutingOptions インターフェイスを使用することもできます。

Presentation pres = new Presentation("Sample.pptx");
try {
    SwfOptions swfOptions = new SwfOptions();
    swfOptions.setViewerIncluded(false);
    swfOptions.getNotesCommentsLayouting().setNotesPosition(NotesPositions.BottomFull);
    
    // プレゼンテーションを保存
    pres.save("Sample.swf", SaveFormat.Swf, swfOptions);
} finally {
    if (pres != null) pres.dispose();
}