Merge PPS Files and Export to BMP in Python

Combine PowerPoint Slide Show files and render the merged slides as BMP images with a cross-platform Python API

Merge PPS to BMP 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, render each slide with Slide.get_image and save the resulting IImage object in BMP format.

Merge PPS Files to BMP Using Python

Open the destination and source PPS files, append a clone of each source slide, and render every slide in the merged presentation as a separate BMP image.

Python code for merging PPS files and exporting the slides as BMP images

image_scale = 2

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)

    for merged_slide in destination_presentation.slides:
        file_path = f"merged_slide_{merged_slide.slide_number}.bmp"
        with merged_slide.get_image(image_scale, image_scale) as slide_image:
            slide_image.save(file_path, slides.ImageFormat.BMP)

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

Follow these steps to merge two PPS files and export the merged slides as BMP images.

  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. Render each merged slide with Slide.get_image, then call IImage.save with ImageFormat.BMP to create a separate BMP file for that slide.