free exe to add password to pdf from command line

Associate
Joined
25 Feb 2016
Posts
226
Does anyone know of a free standalone executable, that can be run from command line, to add a password to a pdf file?

I have found a few a few options but they are either paid or require installation.
 

Thanks for looking. I tried that one and when you run it it says trial version. It doesn't add a password and you get a popup when you open the document asking you to purchase the full version.

If it at least added the password I would know it worked and may be willing to purchase if it's not too much.
 
Can you not directly access the adobe exe or any additional adobe exe like you can with say winrar?

Currently I run a script that put files into a pass worded zip file, emails them and then sends a password via sms. If the document is a pdf I would just like to add a password instead of zipping it so it can the be opened on a mobile. This is all vba code in access. I can save files as pdf from word/publisher form access using vba but cannot set a password attribute. Once the file is saved I was simply going run a shell command to password it but it's proving more difficult than I thought.
 
Looks like you can't do it via command line. Either you need a plugin or use a hacky method using sendkeys etc. Look at the last post on this thread. This will generally work however you definitely could get errors as your estimating how long it takes to open the PDF. Change the value in wait 100 sleep 1000 accordingly.

https://forums.adobe.com/thread/1118296
 
Looks like you can't do it via command line. Either you need a plugin or use a hacky method using sendkeys etc. Look at the last post on this thread. This will generally work however you definitely could get errors as your estimating how long it takes to open the PDF. Change the value in wait 100 sleep 1000 accordingly.

https://forums.adobe.com/thread/1118296

Thanks that looks very useful. I already use some vbs/sendkeys for scanning where an unavoidable dialog box pops up. I'm not against doing it this way as it's a function that will only be used occasionally, hence why I don't want to fork out much to do it.

In that case does anyone know of a standalone free product with a simple GUI hence minimum sendkeys that could do this?
 
Back
Top Bottom