Addition of new pdf-security-info Endpoint
· One min read
The DynamicPDF API has an important new endpoint, the pdf-security-info
endpoint, that returns a PDF's security and encryption information as a JSON document.
The pdf-security-info
endpoint takes a PDF as a POST and returns a JSON document containing security and encryption information. For example, the following cURL command uploads a PDF with AES-128 security.
curl -X POST "https://api.dpdf.io/v1.0/pdf-security-info"
-H "accept:application/json"
-H "Authorization: DP.xxx-your-api-key-xxx"
-H "Content-Type: application/pdf"
--data-binary "@C:/temp/security/aes128-sig-out.pdf"
And returns the following JSON.
{
"encryptionType": "aes-128-cbc",
"hasUserPassword": true,
"hasOwnerPassword": true,
"allowPrint": true,
"allowEdit": true,
"allowCopy": true,
"allowUpdateAnnotsAndFields": true,
"allowFormFilling": false,
"allowAccessibility": true,
"allowDocumentAssembly": false,
"allowHighResolutionPrinting": true,
"encryptAllExceptMetadata": false,
"encryptOnlyFileAttachments": false
}
When opened in Adobe Acrobat you can view the security information and see that it matches what was returned by the endpoint.
More Information
For more information, refer to the pdf-security-info
endpoint's documentation.