Merge OTP Files in Python
Combine OpenDocument Presentation Template files and save the merged slides as a single OTP template with a cross-platform Python API
Merge OTP in Python
Aspose.Slides for Python via .NET
lets you merge OpenDocument Presentation Template (OTP) files by cloning slides from one template into another. After combining the slides with SlideCollection.add_clone, call Presentation.save with SaveFormat.OTP to save the merged slides as a single OTP template.
Merge OTP Files Using Python
Open the destination and source OTP templates, append a clone of each source slide, and save the merged content as a single OTP file.
Python code for merging OTP files into a single template
with slides.Presentation("destination.otp") as destination_presentation:
with slides.Presentation("source.otp") as source_presentation:
for slide in source_presentation.slides:
destination_presentation.slides.add_clone(slide)
destination_presentation.save("merged-template.otp", slides.export.SaveFormat.OTP)
How to Merge OTP Files with Aspose.Slides for Python
Follow these steps to merge two OTP files and save the result as a single OTP template.
Install Aspose.Slides for Python via .NET by following the installation guide .
pip install aspose-slidesMake the
aspose.slidesnamespace available in your Python project.Open the destination and source OTP files as
Presentationinstances.Iterate through the source slides and call
SlideCollection.add_clonefor each slide.Call
Presentation.savewithSaveFormat.OTPto save the merged content as a single OTP template.
Export OTP to Other Supported Formats
You can also combine OTP templates and save them in other supported formats.