IRONSOFTWAREHOME
パスワード、セキュリティ、およびメタデータ
from ironpdf import *

# Open an Encrypted File, alternatively create a new PDF from Html
pdf = PdfDocument.FromFile("encrypted.pdf", "password")

# Edit file metadata
pdf.MetaData.Author = "Satoshi Nakamoto"
pdf.MetaData.Keywords = "SEO, Friendly"
pdf.MetaData.ModifiedDate = Now()

# The following code makes a PDF read only and will disallow copy & paste and printing
pdf.SecuritySettings.RemovePasswordsAndEncryption()
pdf.SecuritySettings.MakePdfDocumentReadOnly("secret-key")
pdf.SecuritySettings.AllowUserAnnotations = False
pdf.SecuritySettings.AllowUserCopyPasteContent = False
pdf.SecuritySettings.AllowUserFormData = False
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights

# Change or set the document encryption password
pdf.SecuritySettings.OwnerPassword = "top-secret"  # password to edit the pdf
pdf.SecuritySettings.UserPassword = "sharable"  # password to open the pdf
pdf.SaveAs("secured.pdf")
pip install ironpdf
パスワード、セキュリティ、およびメタデータ

パスワード、セキュリティ、およびメタデータ

IronPDF for Pythonは、著者情報、キーワード、パスワード、ユーザー権限の制限を含むPDFドキュメントのセキュリティとメタデータに対する包括的な制御を提供します。

開始方法

MetaData および SecuritySettings オブジェクトのプロパティを編集し、保存します。 メタデータとセキュリティ設定は、一度の保存操作で一緒に適用されます。

メタデータプロパティ

  • MetaData.Author: PDFプロパティで表示されるドキュメントの作成者名を設定します。
  • MetaData.Keywords: ドキュメントに関連付けられたSEOに優しいキーワードを設定します。
  • MetaData.ModifiedDate: ドキュメントが最後に変更されたときの記録を行います。 Now() は現在のタイムスタンプを挿入します。

セキュリティ設定

  • SecuritySettings.RemovePasswordsAndEncryption(): 既存のパスワードや暗号化をクリアしてから新しい設定を適用します。
  • SecuritySettings.MakePdfDocumentReadOnly(key): ドキュメントの編集を制限します。 key は内部署名キーであり、ユーザーが使用するパスワードではありません。
  • SecuritySettings.AllowUserAnnotations: False の時、ユーザーはPDFビューワーでアノテーションを追加できません。
  • SecuritySettings.AllowUserCopyPasteContent: False の時、PDFからテキストのコピーができません。
  • SecuritySettings.AllowUserFormData: False の時、ユーザーがフォームフィールドを入力することができません。
  • SecuritySettings.AllowUserPrinting: 印刷権限を制御します。 PdfPrintSecurity.FullPrintRights は印刷を許可します; その他の値を使用して制限します。
  • SecuritySettings.OwnerPassword: PDFビューワーでの編集やセキュリティ設定の変更にパスワードが必要です。
  • SecuritySettings.UserPassword: PDFを開いて読むためにパスワードが必要です。
IronPDF for PythonでPDF文書のセキュリティを学びましょう!

準備はできましたか?

バージョン:2026.9リリースされたばかり

Key in blue circle

無料の30日間トライアルキーをすぐに入手してください。

Your trial license will be sent to your email address

制限なし。100% ロック解除済み。クレジットカード不要。

OR
bullet_checkedクレジットカードやアカウントの作成は不要です。制限なし。100% ロック解除済み。クレジットカード不要。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
無料のライブデモを予約する
Booking Badge

世界中の数百万人のエンジニアから信頼されています。

ライセンスはより安く
義務のない相談を受ける
下記のフォームを記入するか、sales@ironsoftware.comにメールしてください。
あなたの詳細は常に守秘されます。
世界中の数百万人のエンジニアから信頼されています。
ライセンスはより安く
あなたの無料30日間の試用キーをすぐに入手。
クレジットカードやアカウントの作成は不要です。
PDF用Pythonモジュールダウンロード
pipでインストール

バージョン: 2026.9

  1. ダウンロードしてPython 3.7+をインストールしてください。
  2. pipをインストールするにはpypi.orgからダウンロードしてください。
  3. 上記のコマンドをターミナルで実行します。
Python PDFモジュール
モジュールをダウンロード

バージョン: 2026.9

Manually install into your project

  1. パッケージをダウンロード
  2. ターミナルからこのコマンドを実行してください
    pip install ironpdf-2026.9-py37-none-win_amd64.whl

ライセンスは$999から