---
title: "PDF security API"
canonical_url: "https://www.nutrient.io/guides/dws-processor/tools-and-api/pdf-security-api/"
md_url: "https://www.nutrient.io/guides/dws-processor/tools-and-api/pdf-security-api.md"
last_updated: "2026-05-27T15:15:53.462Z"
description: "Control access to PDF documents with the PDF security API. Add or remove PDF passwords and disable download, print, or copy permissions."
---

# PDF security API

This guide explains how to secure PDF documents with password protection and control user permissions for viewing, printing, copying, and editing. For an overview of the PDF security API with signup, pricing, and enterprise evaluation context, see the [PDF security API task page](https://www.nutrient.io/api/pdf-security-api/).

## PDF passwords

PDF files can be protected with passwords to control who can access, modify, and print the contents of a document.

PDFs are protected with two types of passwords: the owner password and the user password.

- **Owner password** — This password enables the owner of a PDF file to modify the file and change its permissions. The owner can change the user password, as well as set or modify the user permissions that control what users can do with the file.

- **User password** — This password enables a user to open a PDF file with a set of permissions defined by the owner of the file. These permissions control what the user can do with the file, such as view, print, copy, or modify the contents. The user password can be used to protect the PDF file from unauthorized access by preventing users from viewing or modifying the file without the password.

## PDF permissions

Specify what users can do to a password-protected document with the `user_permissions` parameter. The value of this parameter is an array, where each element is one of the following:

- `annotations_and_forms` enables users to add or modify text annotations and fill in interactive form fields.

- `assemble` enables users to insert, rotate, or delete pages and create document outline items or thumbnail images.

- `extract` enables users to copy or otherwise extract text and graphics from the document.

- `extract_accessibility` enables users to copy or otherwise extract text and graphics from the document using accessibility options.

- `fill_forms` enables users to fill in existing interactive form fields (including signature fields).

- `modification` enables users to modify the document in any way not covered by the other permissions settings.

- `print_high_quality` enables users to print the document in high quality.

- `printing` enables users to print the document.

Disable document printing:

### Shell

### Shell (Windows)

### Java

### C#

### JavaScript

### Python

### PHP

### HTTP
---

## Related pages

- [Tools and APIs](/guides/dws-processor/tools-and-api.md)
- [Document-to-image API](/guides/dws-processor/tools-and-api/document-to-image-api.md)
- [DOCX templating API](/guides/dws-processor/tools-and-api/docx-templating-api.md)
- [Image-to-PDF API](/guides/dws-processor/tools-and-api/image-to-pdf-api.md)
- [Markdown-to-PDF API](/guides/dws-processor/tools-and-api/markdown-to-pdf-api.md)
- [Office-to-PDF API](/guides/dws-processor/tools-and-api/office-to-pdf-api.md)
- [PDF-to-PDF/A API](/guides/dws-processor/tools-and-api/pdf-to-pdfa-api.md)
- [PDF generator API](/guides/dws-processor/tools-and-api/pdf-generator-api.md)
- [PDF watermark API](/guides/dws-processor/tools-and-api/pdf-watermark-api.md)
- [PDF OCR API](/guides/dws-processor/tools-and-api/pdf-ocr-api.md)
- [PDF-to-image API](/guides/dws-processor/tools-and-api/pdf-to-image-api.md)
- [PDF/UA auto-tagging API](/guides/dws-processor/tools-and-api/pdfua-api.md)
- [Redaction API](/guides/dws-processor/tools-and-api/redaction-api.md)

