Skip to main content

Adding security to a PDF

Adding security to a PDF will allow you to set a user and/or an owner password. You can also set other options that allow/disable editing, copying, and printing.

You can view the full Swagger documentation here.

Request

curl --location 'https://pdf-api.doclabs.cloud/api/v1/MyDocument.pdf/security/protect?storageName=MyBucketName' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ••••••' \
--data '{
"ownerPassword": "MyStrongPassword"
}'

Response

{
"bucketName": "MyBucketName",
"contentPathName": "CopyOfTheOriginal.pdf"
}