Merge PPS Files and Export to XPS in Python

Combine PowerPoint Slide Show files and export the merged presentation as XPS with a cross-platform Python API

Merge PPS to XPS in Python

Aspose.Slides for Python via .NET lets you merge PowerPoint Slide Show (PPS) files by cloning slides from one Presentation into another. After combining the slides with SlideCollection.add_clone, call Presentation.save with SaveFormat.XPS to export the merged presentation as an XML Paper Specification (XPS) document.

Merge PPS Files to XPS Using Python

Open the destination and source PPS files, append a clone of each source slide, and export the merged presentation as an XPS document.

Python code for merging PPS files and exporting the result to XPS

with slides.Presentation("destination.pps") as destination_presentation:
    with slides.Presentation("source.pps") as source_presentation:
        for source_slide in source_presentation.slides:
            destination_presentation.slides.add_clone(source_slide)

    destination_presentation.save("merged_presentation.xps", slides.export.SaveFormat.XPS)

How to Merge PPS Files and Export to XPS with Aspose.Slides for Python

Follow these steps to merge two PPS files and export the combined presentation as a single XPS document.

  1. Install Aspose.Slides for Python via .NET by following the installation guide .

    pip install aspose-slides
    

  2. Make the aspose.slides namespace available in your Python project.

  3. Open the destination and source PPS files as Presentation instances.

  4. Iterate through the source slides and call SlideCollection.add_clone for each slide.

  5. Call Presentation.save with SaveFormat.XPS to export the merged presentation as a single XPS document.