# Python を使用して PPS ファイルをマージする

> Python で複数の PPS ファイルをマージします。

Source: https://products.aspose.com/slides/ja/python-net/merge/pps/
Updated: 2023-04-07



## Python で PPS をマージする

[**Aspose.Slides for Python via .NET**](https://products.aspose.com/slides/ja/python-net/) は、プレゼンテーション ファイルを作成および操作するための強力な Python ライブラリです。さらに、複数の PPS プレゼンテーションを柔軟に組み合わせることができます。あるプレゼンテーションを別のプレゼンテーションにマージすると、それらのスライドを効果的に 1 つのプレゼンテーションに結合して 1 つのファイルを取得します。 Aspose.Slides では、2 つのプレゼンテーションを異なる方法でマージできます。品質やデータの損失を心配することなく、プレゼンテーションをすべての形状、スタイル、テキスト、書式、コメント、アニメーションなどと結合できます。

## Python を使用して PPS ファイルをマージする

PowerPoint プレゼンテーションを結合するには、あるプレゼンテーションから別のプレゼンテーションにスライドを複製する必要があります。

### 複数の PPS を 1 つのファイルにマージするための Python コード

```python

import aspose.slides as slides

with slides.Presentation("presentation1.pps") as pres1:
    with slides.Presentation("presentation2.pps") as pres2:
        for slide in pres2.slides:
            pres1.slides.add_clone(slide)
    pres1.save("presentation.pps", slides.export.SaveFormat.PPS)
```

## Aspose.Slides for Python API を使用して PPS をマージする方法

これらは、Python で 2 つの PPS ファイルをマージし、結果を PPS として保存する手順です。

[**Aspose.Slides for Python via .NET**](https://products.aspose.com/slides/ja/python-net/) をインストールします。
```
pip install aspose.slides
```

Python プロジェクトにライブラリ参照を追加 (ライブラリをインポート) します。
```
import aspose.slides as slides
```

Python でソース PPS ファイルを開きます。
```
pres1 = slides.Presentation('pres1.pps')
pres2 = slides.Presentation('pres2.pps')
```

[**add_clone**](https://reference.aspose.com/slides/python-net/aspose.slides/islidecollection/#methods) メソッドを使用して PPS ファイルを結合します。
```
for slide in pres2.slides:
    pres1.slides.add_clone(slide)
```

プレゼンテーションを保存し、結果を単一の PPS ファイルとして取得します。
```
pres1.save("result.pps", slides.export.SaveFormat.PPS)
```

## PPS を他のサポートされている形式にエクスポート
