Skip to main content
Participating Frequently
September 14, 2021
Question

Protect PDF using ProtectPDF API

  • September 14, 2021
  • 2 replies
  • 1945 views

Hi Team, 

I am getting the below exception when trying to use ProtectPDF API.

com.adobe.pdfservices.operation.exception.ServiceApiException: description ='Source file is protected and cannot be processed.; transactionId=JdVKSQv70gO5uhbG6uzMPQyWTAzFpRRp';

 

Kindly let me know in case any suggestions 

    This topic has been closed for replies.

    2 replies

    Joel Geraci
    Community Expert
    Community Expert
    September 14, 2021

    Security can't be applied to files that are already secured. If you are trying to change the password and know it, then you can use the Remove Protection service to remove the existing security and then apply a new password.

    Participating Frequently
    September 14, 2021

    Thanks Joel a lot. I have tried to open the file (Acrobat/Reader, File > Properties; Security tab) and there i could able to see the Security Method:Password Security. When i was trying to open that pdf file its not promting to give any password. So how to convert thses kind of files using Adobe Protect API.As suggested by you i have tried to use the Remove Protection as i dont know the password its throwing the same exception.(The password is not autorized to remove the security) 

    Joel Geraci
    Community Expert
    Community Expert
    September 14, 2021

    There are two kinds of password security for PDF. An owner password which you would need to know in order to open the file, and a permissions password, which limits what you can do with the file once opend. If only a permissions password is set, you will not be prompted to enter a password when the document is opened but "Password Security" is still shown as the security method because you'd need to know the permissions password to override the restrictions.

    Unless you know the password and remove the encryption, you will not be able to use the Protect API on that file.

    Legend
    September 14, 2021

    Is the message true? Is the file encrypted and what security options are set? (Not sure? Use Acrobat/Reader, File > Properties; Security tab).

    Participating Frequently
    September 14, 2021

    Yes the message is true as i am receiveing in the response.I have tried to open the file (Acrobat/Reader, File > Properties; Security tab) and there i could able to see the Security Method:Password Security. When i was trying to open that pdf file its not promting to give any password. So how to convert these kind of files using Adobe Protect API any suggestions please.