Adobe Reader: remember password for a PDF file

Adobe Reader: remember password for a PDF file

I’ve bought some ebooks – password protected PDF files. Since the passwords are very long, I wish Adobe Reader could save them for future usage.

Does anybody know a solution or workaround for this problem?

1 Answer

If you lose the passwords, Elcomsoft sells a PDF Password Recovery program. I used it on a PDF-centric job to see if it could crack our security and (unfortunately for us at the time) it did so easily.

I had some password protected PDFs that were not required to be of limited use by me in any way. It would not matter if they were opened by anyone who managed to get into my machine (it would be too late by then to try protecting the PDFs).

I got tired of locating the text file and keeping it together with the PDF copy.
Finally, I ended up renaming the PDF file with the password attached at the end.
Now, whenever I had the PDF handy, so was the password.
End of unwanted-password-recollection story.

Of course, this may not work for you.
Its like keeping your car keys hanging by the garage door.
But, in this case, my ‘garage door’ is within the secured premises 🙂

Two workarounds:

  1. put the passwords into a text file, displayed out of the way on the screen and cut and paste as required. As well as a simple text tool, any software that can provide this functionality could be used, e.g. a clipboard manager (like Glipper under Gnome) or a keyboard macro. Alternatively use a keyboard shortcut to deliver the password when required.

  2. where possible, get PDFs from sources that do not require a password to open them for reading. Lobby other suppliers to change their policy. For example, just two from the many suppliers that do not password protect PDFs for reading:

    a. Safari Books Online provide PDFs that have every page marked with the Safari username but not password locked for reading;

    b. Packt Publishing changed their policy and now provide PDFs that do not need a password to read. Indeed, if you bought password protected PDFs from them in the past you can download a copy of the unlocked version for free. Again, the files have pages marked with customer details.

Commercial providers can support business cases that do not require a password for reading files. PDFs that do not require a password to open for reading simplify access, allow file contents to be searched and allow file browsers to display the front-cover icon.

I found a solution (at least for my Mac). I’ve dropped the Adobe Reader and switched to Skim, a very good free, open source PDF reader, which allows saving passwords.

Skim Screenshot

For an alternative solution, see this answer here on Superuser: Removing the password from a PDF file.

I developed the following AutoHotkey script to automate the entry of passwords into a variety of PDF readers. You pass it the full path to the PDF and the password, and it opens the PDF with your default reader and attempts to enter the password for you.

I compile this script and set up shortcuts to it and the document / password. For example, if I have a PDF called C:blehmy.pdf with a password of abcd, I create the shortcut “C:someappspdf_passwd.exe” “C:blehmy.pdf” abcd.

It has undergone many incarnations over the years for Sumatra PDF and Adobe Reader 9/10 on Windows XP and 7. Sumatra PDF now has a built-in “remember password” option, but when I initially developed this it did not. If you are not tied to Adobe Reader, I would highly recommend Sumatra PDF over Adobe Reader for basic PDFs.

This latest version has only been tested with SumatraPDF 2.1.1 and Adobe Reader 10.1.4 on Windows 7 Enterprise:

if ( %0% < 2 ) { MsgBox Usage: pdf_passwd.exe document password ExitApp} else { ; Find default PDF handler ; First check User Choice (Windows 7) RegRead, DefaultMessage, HKCU, SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdfUserChoice, Progid if ( ErrorLevel ) { ; No User Choice, try default open command RegRead, DefaultMessage, HKCR, .pdf, } ; Look up the open command for the app RegRead, OpenCommand, HKCR, %DefaultMessage%shellopencommand, ; Reduce to executable only StringGetPos, SpacePos, OpenCommand, ” “, R StringLeft, Command, OpenCommand, % SpacePos + 1 Run %Command% “%1%”, , , CmdPID SetTitleMatchMode RegEx ; This method is more reliable, but doesn’t work in Adobe 10. ; It seems to fork prior to the password dialog: ; WinWait i)password ahk_pid %CmdPID% ; WinActivate i)password ahk_pid %CmdPID% ; Tested with SumatraPDF 2.1.1 and Adobe Reader 10.1.4. ; Tweaking / additional logic may be necessary to accommodate differences ; in password dialogs. WinWaitActive, i)password ; Send password with capslock off, restore caps_lock_on := GetKeyState( “Capslock”, “T” ) if ( caps_lock_on ) { SetCapsLockState Off } SendInput %2%{Enter} if ( caps_lock_on ) { SetCapsLockState On }}

not a solution to store passwords in Adobe Reader, but a work around to remove the restrictions altogether:

PDF Unlocker is a simple and useful application that can remove all kinds of restrictions on PDF files. It works by removing passwords that restrict access in two areas. One is for passwords that restrict some functions such as printing copying and pasting. The second is any password that might prevent you from accessing or opening a PDF file.

PDF Unlocker is freeware (Windows).

Leave a Reply

Your email address will not be published. Required fields are marked *