翻譯|使用教程|編輯:李顯亮|2021-06-16 10:37:05.657|閱讀 364 次
概述:本文向您展示如何使用 Spire.Presentation for Java 將 PowerPoint 文檔轉換為 HTML 格式文件。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Spire.Presentation for Java 專業的 PowerPoint API,它允許開發人員在 Java 應用程序中創建、讀取、寫入、轉換和保存 PowerPoint 文檔,而無需安裝 Microsoft PowerPoint。
本文向您展示如何使用 Spire.Presentation for Java 將 PowerPoint 文檔轉換為 HTML 格式文件。可點擊此處下載最新版測試。
下面是示例PowerPoint文檔的屏幕截圖。
import com.spire.presentation.FileFormat; import com.spire.presentation.Presentation; public class ToHtml { public static void main(String[] args) throws Exception { //Create a Presentation object Presentation presentation = new Presentation(); //Load the sample document presentation.loadFromFile("C:\\Users\\Administrator\\Desktop\\sample.pptx"); //Save the document to HTML format presentation.saveToFile("C:\\Users\\Administrator\\Desktop\\ToHtml.html", FileFormat.HTML); } }
輸出文件
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn