LoginSignup
0
0

More than 1 year has passed since last update.

Java PowerPointをHTML形式に変換

Posted at

Spire.Presentation for Javaが、強いライブラリだって皆さんもうご存知でしょう?Spire.Presentation for Javaは、いろいろな機能を搭載しています。とりわけ、その変換機能は素晴らしいし、PowerPointを様々なファイル形式に変換できますので、とても便利なライブラリですね。だから今日PowerPointをHTML形式に変換する方法を紹介させていただきます。

1.E-iceblueの公式サイトからSpire. Presentation for Javaをダウンロードしてください。

f:id:lendoris:20210923151648p:plain

2. IDEを起動して新規プロジェクトを作成してから、インストールされたファイルにあった相応しいSpire. Presentation.jarを参照に追加してください。

f:id:lendoris:20210923151757p:plain

f:id:lendoris:20210923151845p:plain

import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;

public class ToHtml {
    public static void main(String[] args) throws Exception {

        // Presentation オブジェクトを作成します。
        Presentation presentation = new Presentation();

        //サンプルファイルをロードします。
        presentation.loadFromFile("C:\\Users\\Administrator\\Desktop\\sample.pptx");

        //HTMLで保存します。
        presentation.saveToFile("C:\\Users\\Administrator\\Desktop\\ToHtml.html", FileFormat.HTML);
    }
}

実行結果

f:id:lendoris:20210923152051p:plain

 

 

 

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0