# OTP-bestanden samenvoegen via C++

> C++ voorbeeldcode om OTP-documenten te combineren op C++ Runtime Environment voor Windows 32 bit, Windows 64 bit en Linux 64 bit.

Source: https://products.aspose.com/slides/nl/cpp/merger/otp/
Updated: 2026-08-11



## Hoe een OTP-bestand samen te voegen met C++

 Om het OTP-bestand samen te voegen, gebruiken we
 [Aspose.Slides voor C++](https://products.aspose.com/slides/nl/cpp/)
 API, een veelzijdige, krachtige en gebruiksvriendelijke API voor het samenvoegen van documenten voor het C++-platform. Je kunt de nieuwste versie direct downloaden, open gewoon
 [NuGet](https://www.nuget.org/packages/aspose.slides)
 pakketbeheerder, zoek naar
 **Aspose.Slides.Cpp**
 en installeren. U kunt ook de volgende opdracht gebruiken vanuit de Package Manager Console.

### Opdracht

```cs

PM> Install-Package Aspose.Slides.Cpp

```

## Stappen voor het samenvoegen van OTP-bestanden in C++

Een basisdocument dat kan worden samengevoegd en samengevoegd met [Aspose.Slides for C++](https://products.aspose.com/slides/nl/cpp/) API's kan worden gedaan met slechts enkele regels code.

Laad beide OTP-bestanden.

Gebruik de methode get\_Slides() om elke dia te doorlopen.

Gebruik de AddClone-functie om samen te voegen met het gewenste bestand.

Gebruik de methode Save() om op het opgegeven pad op te slaan

## systeem vereisten

 Aspose.Slides voor C++ ondersteunt alle belangrijke platforms en besturingssystemen. Zorg ervoor dat u aan de volgende vereisten voldoet.

- Microsoft Windows of een compatibel besturingssysteem met C++ Runtime Environment voor Windows 32 bit, Windows 64 bit en Linux 64 bit.
- Aspose.Slides voor C++ DLL waarnaar in uw project wordt verwezen.

### OTP-bestanden samenvoegen - C++

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

// 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::Otp);

```

## Over Aspose.Slides voor C++ API

 Aspose.Slides API kan worden gebruikt om Microsoft PowerPoint-documenten te lezen, schrijven, manipuleren en converteren naar PDF, XPS, HTML, TIFF, ODP en verschillende andere formaten. Men kan vanaf het begin nieuwe bestanden maken en deze opslaan in de relevante ondersteunde formaten. Aspose.Slides is een zelfstandige API voor het maken, parseren of manipuleren van presentaties, dia's en elementen en is niet afhankelijk van software zoals Microsoft of OpenOffice.

Files with .OTP extension represent presentation template files created by applications in OASIS OpenDocument standard format. The contents of such a file include presentation information in the form of slides with text, images, shapes, multimedia content, transition effects and other slide elements. These template files are used for creating new presentations quickly based on the styling information stored in the template itself. OTP files can be created and saved with several different applications such as Impress that comes with OpenOffice suite and Microsoft PowerPoint. The OTP file format is similar to Microsoft PowerPoint template files .POT and .POTX.

## Andere ondersteunde samenvoegindelingen

- [ODP](https://products.aspose.com/slides/nl/cpp/merger/odp/) — OpenDocument-presentatie-indeling
- [POT](https://products.aspose.com/slides/nl/cpp/merger/pot/) — Microsoft PowerPoint-sjabloonbestanden
- [POTM](https://products.aspose.com/slides/nl/cpp/merger/potm/) — Microsoft PowerPoint-sjabloonbestand
- [POTX](https://products.aspose.com/slides/nl/cpp/merger/potx/) — Microsoft PowerPoint-sjabloonpresentatie
- [PPS](https://products.aspose.com/slides/nl/cpp/merger/pps/) — PowerPoint-diavoorstelling
- [PPSM](https://products.aspose.com/slides/nl/cpp/merger/ppsm/) — Diavoorstelling met macro's
- [PPSX](https://products.aspose.com/slides/nl/cpp/merger/ppsx/) — PowerPoint-diavoorstelling
- [PPT](https://products.aspose.com/slides/nl/cpp/merger/ppt/) — Microsoft PowerPoint 97-2003
- [PPTM](https://products.aspose.com/slides/nl/cpp/merger/pptm/) — Presentatiebestand met macro's
- [PPTX](https://products.aspose.com/slides/nl/cpp/merger/pptx/) — Open XML-presentatie-indeling
