# Python を使用して PPTX プレゼンテーション ファイルを保護する

> PPTX プレゼンテーションを保護するための Python ソース コード。

Source: https://products.aspose.com/slides/ja/python-net/protect/pptx/
Updated: 2023-04-26



## Python による PPTX プレゼンテーションの保護

Aspose.Slides for Python via .NET を使用すると、パスワードを設定して PPTX プレゼンテーションを開いたり変更したりできないように保護できます。次に、ロックされたプレゼンテーションを開くか変更するには、ユーザーはパスワードを入力する必要があります。

### Python を使用して PPTX プレゼンテーションを暗号化する

```py

import aspose.slides as slides

with slides.Presentation("pres.pptx") as pres:
    pres.protection_manager.encrypt("123123")
    pres.save("encrypted-pres.pptx", slides.export.SaveFormat.PPTX)
```

### Python を使用して PPTX プレゼンテーションに書き込み保護を設定する

```py

import aspose.slides as slides

with slides.Presentation("pres.pptx") as pres:
    pres.protection_manager.set_write_protection("123123")
    pres.save("write-protected-pres.pptx", slides.export.SaveFormat.PPTX)
```

## Python 経由で PPTX をパスワード保護する方法

これらは、PPTX ファイルを保護するための手順です。

プレゼンテーションのインスタンスで PPTX を読み込みます

ProtectionManager クラスを使用してプレゼンテーションを保護する

結果を PPTX 形式で保存

## サポートされているその他のプロテクト形式
