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

使用 C++ 合并 POTX 文件

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

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

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

Aspose.Slides for C++

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

NuGet

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

命令


PM> Install-Package Aspose.Slides.Cpp

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

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

  1. 加载两个 POTX 文件。

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

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

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

系统要求

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

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

合并 POTX 文件 - C++

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

// 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::Potx);  
 
  • 在线合并 PDF 文件

    如何在 Python 中合并 PDF

    关于 Aspose.Slides for C++ API

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

    Online POTX Merger Live Demos

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

    POTX 什么是POTX文件格式

    Files with .POTX extension represent Microsoft PowerPoint template presentations that are created with Microsoft PowerPoint 2007 and above. This format was created to replace the POT file format that is based on the binary file format and is supported with PowerPoint 97-2003. The files generated can be used to create presentations that have same layout and other settings required to be applied to new files. These settings can include styles, backgrounds, colour palette, fonts and defaults. Such files are generated in order to create ready-to-use template files for official use.

    阅读更多

    其他支持的合并格式

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

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