• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to get permissions of the file?

New Here ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

Hello!

I have a file(s) with some permissions (like in the picture).

pic.png

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?

TOPICS
How to , PDF Services API

Views

327

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2021 Oct 26, 2021

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
        }
    },

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2021 Oct 26, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

I'm curious how the permissions are being set without security being applied. Can you share the file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2021 Oct 26, 2021

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."

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 27, 2021 Oct 27, 2021

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)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

LATEST

This is an example of the file with the same properties as above.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources