These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Removing PDF security using command line

pratik.kantharia
Registered: Aug 25 2010
Posts: 6

Hi,

I am a newbie in Acrobat.

I went through the threads for removing PDF security and I found that we can do that using Acrobat Pro GUI application. But I didn't find a solution to do it through command line.

I asked Adobe Customer support team regarding that and they told me that it is possible to do that through command line.

Is there anyone here, who can help me out of this? Please tell me how we can remove PDF security through command line using Acrobat Pro.

Thanks in advance.

My Product Information:
Acrobat Standard 9.3.1, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can not.

George Kaiser

pratik.kantharia
Registered: Aug 25 2010
Posts: 6
I asked Customer Support and they told me that it is possible.

But the problem is I am not able to find any help on that.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Well then they know something that the developers of Acrobat do not.

[url=http://www.adobe.com/devnet/acrobat/pdfs/Acrobat_SDK_developer_faq.pdf#page=24]How do I use the Windows command line with Acrobat and Adobe Reader?[/url]

George Kaiser

pratik.kantharia
Registered: Aug 25 2010
Posts: 6
Hey,

I tried that thing using ASP.NET and I got succeeded in calling print command through command line.

And it opens the PDF file in Acrobat Reader and ask to Save it. But as per my requirement I don't want to open PDF file in Acrobat Reader and I want to save that file at some other location.

Is that possible?

Could you please help me out with that?

Thanks for your quick replies..
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You are creating a new file, and that file has been "refried" and like a refried steak, it losses a lot. But you still have not removed the password from the original file.

How do you process a file without having the computer open the file and process the code within the file?

Just because you do not see the program in an open window does not mean that the program has not been opened.

And why just not use the password to take the password protection off of the PDF?

George Kaiser

pratik.kantharia
Registered: Aug 25 2010
Posts: 6
gkaiseril wrote:
Just because you do not see the program in an open window does not mean that the program has not been opened.And why just not use the password to take the password protection off of the PDF?
I know that program might be running behind the scene. I do not have problem with Program running or not. My problem is it is showing "Save" dialog box and asking to save a file. I do not want dialog box to be appeared. I want to save it through coding at some different location.

Also, password is not the only concern. Let's say if I remove security using some third party tool, it is okay. But still I need to remove PDF Restrictions from PDF files. They are creating troubles for me.

We used a tool for removing PDF Restriction, but it's not completely reliable. So we started investigating Print driver option. When you use "Adobe PDF" print driver, it removes all the restrictions from PDF files.

I guess now you are getting the exact idea about my problem.

Thank you.
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
If you know the password of the secured file, you can remove it within Acrobat - but that process is not accessible through command line switches. You could access Acrobat via the API, but that's about it.

If you don't know the password, then this discussion is straying into legally-questionable areas and we're not able to help you.
pratik.kantharia
Registered: Aug 25 2010
Posts: 6
I guess there is a misunderstanding.. That might be because of the title of the post.

Quote:
Removing PDF security using command line
I apologize for the mistake. I should keep the title as follows.

Quote:
Removing PDF Restrictions using command line
Even I know the password, there is no way to remove restrictions from command line. So I thought that if we can remove security through command line (which might be possible), it will also remove PDF restrictions..

Our big headache is PDF restrictions like content copying, editing, commenting etc. Due to those restrictions, those pdfs are not passing through our content building system and it is resulting in build failure.

So we tried http://www.a-pdf.com/security/restrictions_remover_cmd.htm tool to remove restrictions, but it is not reliable as it works for some files and doesn't work for some..

And that is why we need concrete solution, and found that "Adobe PDF" print driver might be an option, but it is opening "Save dialog box", which is annoying..

I searched on several forums to suppress that "Save dialog box" but couldn't find any help, so thought to try here.

If it's not possible at all, we will have to search for another alternative.

Thanks for all your help.
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
The same applies, unfortunately.

There are two reasons that a PDF may have some or all features restricted even though it can be opened:

1) The author has applied a permissions security profile, using a password or certificate - this can be removed in Acrobat using the menu, but not via the command line.

2) The PDF has been saved from Acrobat with "Extend features in Adobe Reader" enabled, which allows Reader users to fill in forms, add comments, etc. - this restriction can be removed by saving a copy of the file.

Acrobat's command line switches are intentionally restrictive, as the application is not designed to be used in a console environment. The basic switches to open files are provided to help users implement shortcuts, but that is all.

It's possible for external applications to control Acrobat through the C++ API, and via that route you could remove permissions security (assuming you know the password) - however no Adobe product will allow you to remove security from a PDF unless you have the password or certificate in question.

There is of course third-party software that can do it in some cases, but not all.