PNG JPG BMP TIFF PPTM
Aspose.Slides  for C++

使用 C++ 合并 PPTM 文件

使用服务器端 C++ API 的 PPTM 文档合并。

如何使用 C++ 合并 PPTM 文件

为了合并 PPTM 文件,我们将使用

Aspose.Slides for C++

API 是一个功能丰富、功能强大且易于使用的 C++ 平台文档合并 API。可以直接下载最新版本,直接打开

NuGet

包管理器,搜索 Aspose.Slides.Cpp 并安装。您也可以从包管理器控制台使用以下命令。

命令


PM> Install-Package Aspose.Slides.Cpp

在 C++ 中合并 PPTM 文件的步骤

只需几行代码即可完成与 Aspose.Slides for C++ API 合并和连接的基本文档。

  1. 加载两个 PPTM 文件。

  2. 使用 get_Slides() 方法遍历每张幻灯片。

  3. 使用 AddClone 功能与所需文件合并。

  4. 使用 Save() 方法保存在指定路径

系统要求

Aspose.Slides for C++ 支持所有主要平台和操作系统。请确保您具有以下先决条件。

  • Microsoft Windows 或具有适用于 Windows 32 位、Windows 64 位和 Linux 64 位的 C++ 运行时环境的兼容操作系统。
  • 项目中引用的 C++ DLL 的 Aspose.Slides。
 

合并 PPTM 文件 - C++

// The path to the documents directory.
const String sourceFilePath1 = u"SourceFile2.pptm";
const String sourceFilePath2 = u"SourceFile3.pptm";
const String outputFilePath = u"mergedOutput.pptm";

// Instantiate Presentation class
SharedPtr<Presentation> presentation1 = MakeObject<Presentation>(sourceFilePath1);
SharedPtr<Presentation> presentation2 = MakeObject<Presentation>(sourceFilePath2);

for (SharedPtr<ISlide> slide : presentation2->get_Slides()){
	// Merge from source to destination 
	presentation1->get_Slides()->AddClone(slide);
}

// Save the presentation
presentation1->Save(outputFilePath, SaveFormat::Pptm);  
 
  • 在线合并 PDF 文件

    如何在 Python 中合并 PDF

    关于 Aspose.Slides for C++ API

    Aspose.Slides API 可用于读取、编写、操作 Microsoft PowerPoint 文档并将其转换为 PDF、XPS、HTML、TIFF、ODP 和各种其他格式。可以从头开始创建新文件并将其保存为相关支持的格式。 Aspose.Slides 是一个独立的 API,用于创建、解析或操作演示文稿、幻灯片和元素,它不依赖于 Microsoft 或 OpenOffice 等任何软件。

    Online PPTM Merger Live Demos

    Merge PPTM 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 PPTM files.
      It will be merged and concatenated instantly.

    PPTM 什么是PPTM文件格式

    Files with PPTM extension are Macro-enabled Presentation files that are created with Microsoft PowerPoint 2007 or higher versions. They are similar to PPTX files with the difference that the lateral can't execute macros though they can contain macros. PPTM files can be edited by opening them in Microsoft PowerPoint and updating the contents. Another similar format is PPSM but it is read-only by default and starts the slideshow when opened. PPTM, like PPTX, contains slides for different presentation elements like text, images, videos, graphs and other related material.

    阅读更多

    其他支持的合并格式

    使用 C++,One 还可以合并许多其他文件格式,包括..

    ODP (OpenDocument 演示格式)
    OTP (OpenDocument 标准格式)
    POT (Microsoft PowerPoint 模板文件)
    POTM (微软 PowerPoint 模板文件)
    POTX (Microsoft PowerPoint 模板演示文稿)
    PPS (幻灯片放映)
    PPSM (启用宏的幻灯片放映)
    PPSX (幻灯片放映)
    PPT (微软PowerPoint 97-2003)
    PPTX (打开 XML 表示格式)