# PDF に制限を追加する
Power Automate のフローで、PDF のコピー、印刷、編集を制御する権限フラグを設定します。
このアクションを使用すると、PDF ドキュメントのコピー、印刷、変更を防ぐ制限を追加できます。
<PowerAutomateAction
title="Add restrictions to a PDF" caption="Add restrictions to a PDF." connection="PDF Blocks Next" fields={[ { label: "File Content", kind: "token", value: "File Content", required: true }, { label: "Owner Password", placeholder: "The password required to open and change permissions", required: true }, { label: "User Password", placeholder: "The password required to open the PDF document" }, { label: "Allow Copy Content", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Allow Change Content", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Allow Print", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Allow Print High Resolution", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Allow Comment And Fill Form", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Allow Fill Form", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Allow Assemble Document", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Allow Accessibility", kind: "select", value: "Yes", options: ["Yes", "No"] }, { label: "Encryption Algorithm", kind: "select", value: "AES-128", options: ["AES-128", "AES-256"], advanced: true }, ]} />
<ConnectorNotice kind="parameter" />
PDF 仕様では、コピー、印刷、フォームへの入力など、一部の用途に制限を設定できます。この制限を実際に適用するかどうかは各 PDF ソフトウェア次第であり、[簡単に解除できてしまいます](https://www.google.com/search?q=remove+PDF+permissions+online)。これについては、[PDF 仕様書](https://wwwimages2.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf)の122ページに次のように記載されています。
> Once the document has been opened and decrypted successfully, a conforming reader technically has access to the entire contents of the document. There is nothing inherent in PDF encryption that enforces the document permissions specified in the encryption dictionary.
## パラメーター
<ParamField name="File Content" type="File" required>
入力 PDF ドキュメントの内容です。
</ParamField>
<ParamField name="Owner Password" type="String" required>
PDF ドキュメントを開いたり権限を変更したりするために必要なパスワードです。長さは4〜32文字です。パスワードに使用できる文字は、印字可能な ASCII 文字の範囲(位置32〜126)に含まれている必要があります。この範囲には、英字の大文字・小文字、数字、スペース、および . , : ; # $ % & ( ) * + = ? ! などのよく使われる記号が含まれます。
</ParamField>
<ParamField name="User Password" type="String">
PDF ドキュメントを開くために必要なパスワードです。省略可能です。要件は Owner Password と同じです。
</ParamField>
<ParamField name="Allow Copy Content" type="Boolean" default="Yes">
Yes に設定すると、ユーザーはテキスト、画像、その他のコンテンツをクリップボードにコピーできます。省略可能です。
</ParamField>
<ParamField name="Allow Change Content" type="Boolean" default="Yes">
Yes に設定すると、ユーザーはドキュメントの内容を変更できます。省略可能です。
</ParamField>
<ParamField name="Allow Print" type="Boolean" default="Yes">
Yes に設定すると、ユーザーはドキュメントを印刷できます。省略可能です。
</ParamField>
<ParamField name="Allow Print High Resolution" type="Boolean" default="Yes">
Yes に設定すると、ユーザーはドキュメントを高解像度で印刷できます。省略可能です。
</ParamField>
<ParamField name="Allow Comment And Fill Form" type="Boolean" default="Yes">
Yes に設定すると、ユーザーは注釈の追加や編集、フォームフィールドへの入力ができます。省略可能です。
</ParamField>
<ParamField name="Allow Fill Form" type="Boolean" default="Yes">
Yes に設定すると、ユーザーはフォームフィールドに入力できます。省略可能です。
</ParamField>
<ParamField name="Allow Assemble Document" type="Boolean" default="Yes">
Yes に設定すると、ユーザーはドキュメントの組み立てや操作(ページの追加・削除、結合など)ができます。省略可能です。
</ParamField>
<ParamField name="Allow Accessibility" type="Boolean" default="Yes">
Yes に設定すると、アクセシビリティプログラムがドキュメントのテキストと画像を読み取れるようになります。省略可能です。
</ParamField>
<ParamField name="Encryption Algorithm" type="String" default="AES-128">
PDF ドキュメントの暗号化に使用するアルゴリズムです。省略可能です。有効な値は AES-128 と AES-256 です。
</ParamField>
## レスポンス
<ParamField name="Locked PDF File Content" type="File">
ロックされた PDF ドキュメントの内容です。フロー内の他のアクションへの入力として使用できます。
</ParamField>
## 関連アクション
<CardGroup cols={2}>
<Card title="制限を削除" href="/docs/power-automate/remove-restrictions-from-pdf">
ドキュメントのすべての制限をリセットします。
</Card>
<Card title="パスワードを追加" href="/docs/power-automate/add-password-to-pdf">
ドキュメントを開くためにパスワードを要求します。
</Card>
<Card title="パスワードを削除" href="/docs/power-automate/remove-password-from-pdf">
暗号化されたドキュメントからパスワードを削除します。
</Card>
<Card title="署名を削除" href="/docs/power-automate/remove-signatures-from-pdf">
ドキュメントから暗号署名を削除します。
</Card>
</CardGroup>