Copy link to clipboard
Copied
Hello!
I have a file(s) with some permissions (like in the picture).
How I can read these permission(s) for prepending users to upload this file to the server?
I used pdfservices-sdk-2.1.0 library for Java.
PS: The file with the properties above is already signed, but anyway how I can do it?
Copy link to clipboard
Copied
If the document is encrypted with a permissions password, you'll see a "permissions" property in the returned JSON. The permissions.permissions properties will tell you what the users can do. Signing and form filling use the same permission bit.
"permissions": {
"encryption": {
"encrypt_attachments_only": false,
"has_owner_password": true,
"encrypt_metadata": true,
"has_user_password": false,
"bit_length": 256,
"algorithm": "AES"
},
"permissions": {
"assistive_technology": true,
"form_filling": true,
"copying": false,
"page_extraction": true,
"document_assembly": false,
"commenting": true,
"printing": "low_quality",
"editing": false
}
},
Copy link to clipboard
Copied
Thanks, for the answer. The document is not encrypted and I got the JSON without the "permissions" property. As I understand it, if we want to get/set any permissions to a file, we have to use an encrypted version of that file?
Copy link to clipboard
Copied
I'm curious how the permissions are being set without security being applied. Can you share the file?
Copy link to clipboard
Copied
Unfortunately, I can't (it's an internal document). From this file, I was only able to provide a screenshot of the security properties above. After uploading this file internal service for signing documents shows the error like "Field name 'Signature_#####' cannot be created as the document permissions do not allow any modifications."
Copy link to clipboard
Copied
Additional information: file is locked after it was signed. Maybe you know, how Adobe Reader generates information from the not encrypted file to display this information on the security tab (Document Restrictions Summary part)?
Copy link to clipboard
Copied