PNG JPG BMP TIFF POTM
Aspose.Slides  for Java

在 Java 中合併 POTM 格式

使用服務器端 Java API 的本機 POTM 文檔合併。

如何使用 Java 合併 POTM 文件

為了合併 POTM 文件,我們將使用

Aspose.Slides for Java

API是一個功能豐富、功能強大且易於使用的Java平台合併API。您可以直接從

Maven

並通過將以下配置添加到 pom.xml 將其安裝在基於 Maven 的項目中。

存儲庫


<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://releases.aspose.com/java/repo/</url>
</repository>

依賴


<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>version of aspose-slides API</version>
    <classifier>jdk17</classifier>
</dependency>

在 Java 中合併 POTM 文件的步驟

只需幾行代碼即可完成與 Aspose.Slides for Java API 合併和連接的基本文檔。

  1. 使用 Presentation 類的實例加載第一個 POTM 文件。

  2. 使用 Presentation 類的實例加載第二個 POTM 文檔。

  3. 循環瀏覽第二個 POTM 文件的每張幻燈片。

  4. 在每次迭代中,使用 addClone() 添加帶有第一個文件的幻燈片。

  5. 使用 save() 方法保存到指定路徑

系統要求

Aspose.Slides for Java 支持所有主要平台和操作系統。請確保您具有以下先決條件。

  • Microsoft Windows 或與 JSP/JSF 應用程序和桌面應用程序的 Java 運行時環境兼容的操作系統。
  • 直接從 Java 獲取最新版本的 Aspose.Slides Maven
 

合併 POTM 文件 - Java

// Load first POTM File
Presentation prest1 = new Presentation("prest1.potm");

// Load second POTM File
Presentation prest2 = new Presentation("prest2.potm");

// Merge
for (ISlide slide : prest2.getSlides()) {
	// Merge from source to target
	prest1.getSlides().addClone(slide);
}

// Save the File
prest1.save("merged-presentation.potm", SaveFormat.Potm);  
 
  • 在線合併 PDF 文件

    如何在 Python 中合併 PDF

    關於 Aspose.Slides for Java API

    Aspose.Slides API 可用於讀取、寫入、操作 Microsoft PowerPoint 文檔並將其轉換為 PDF、XPS、HTML、TIFF、ODP 和各種其他格式。可以從頭開始創建新文件並將其保存為相關支持的格式。 Aspose.Slides 是一個獨立的 API,用於創建、解析或操作演示文稿、幻燈片和元素,它不依賴於 Microsoft 或 OpenOffice 等任何軟件。

    Online POTM Merger Live Demos

    Merge POTM documents right now by visiting our Live Demos website . The live demo has the following benefits

      No need to download Aspose API.
      No need to write any code.
      Just upload your POTM files.
      It will be merged and concatenated instantly.

    POTM 什麼是 POTM 文件格式

    Files with POTM extension are Microsoft PowerPoint template files with support for Macros. POTM files are created with PowerPoint 2007 or above and contains default settings that can be used to create further presentation files. These settings can include styles, backgrounds, colour palette, fonts and defaults along with macros that consist of custom functions for doing particular task. They may also be opened by a previous version of PowerPoint with Open XML document support installed. POTM files can be opened in Microsoft PowerPoint for editing like any other PowerPoint file.

    閱讀更多

    其他支持的合併格式

    使用 Java,One 還可以合併許多其他文件格式,包括..

    ODP (OpenDocument 演示格式)
    OTP (OpenDocument 標準格式)
    POT (Microsoft PowerPoint 模板文件)
    POTX (Microsoft PowerPoint 模板演示文稿)
    PPS (幻燈片放映)
    PPSM (啟用宏的幻燈片放映)
    PPSX (幻燈片放映)
    PPT (微軟PowerPoint 97-2003)
    PPTM (啟用宏的演示文件)
    PPTX (打開 XML 表示格式)