HowTo: Remove a password from a PDF
Everyone knows how annoying it is to have PDF-Files with restrictions or encrypted with a password. At my university some professors think that it’s a good idea to distribute PDFs with a password. Recently a friend of mine asked me how he could circumvent the annoying PDF “Please enter the password” notification. So I decided to make a little howto, as others might also profit from my cognitions. First lets start off with Linux.
Linux
You have quite a few options to get rid of a password in Linux. To install these Linux applications just google for them or search in your package manager (e.g. Synaptic). My favourite three command line apps are (there’s really no need for a GUI for such a basic task):
pdftops & ps2pdf
If you know the user password and want to create a password-free version of you PDF that are the two tools you need. The syntax of pdftops is as follows:
pdftops -upw <password> <PDF-file>
<password> is the PDF’s password (without quotation marks) and <PDF-file> is the file.
After that your PDF has been converted into a PostScript file without password. Now you just have to convert it back to a PDF by typing the following in your terminal:
ps2pdf <PostScript-file>
After that you are done and can enjoy your password free PDF.
pdftk
If you know the owner password and you want to remove the password there’s no easier way to do it than with pdftk. And here is how it needs to be done:
pdftk <input-file> input_pw <password> output <output-file>
<input-file> is the password protected PDF, <password> is the PDF’s owner password and <output-file> specifies the name of the unprotected PDF.
pdftk (PDF toolkit) can do so much more amazing things with your PDFs. Just google it or RTFM
.
pdfcrack
If you don’t know the password at all of a protected PDF there’s one last chance you got. You could use pdfcrack which tries to crack the password with brute force. If you know the user password you can even speed up the process of finding the owner password. There is also support for dictionaries (very handy as many passwords are really weak) and saving your state and continuing somewhen later. If the password is alphanumeric and has few characters (up to 6 i would guess) there’s a real chance of cracking it really quick.
Windows

PDF Unlocker Icon
Let’s not forget about the many Windows users which also need their PDFs cracked.
Freeware PDF Unlocker
The best (and also the first one) freeware tool you will find is PDF Unlocker. It is a simple script which unlocks your PDFs. First dowload PDF Unlocker, install it and you will find a nice new icon on your desktop. If you want to remove restrictions such as no printing or no copying you just have to drag your PDF onto the icon and drop them. A cmd-window will open and hopefully close and you are set. If you want to remove the user-password you need to right-click the desktop icon and the Edit. Directly after
-sPDFPassword=
you need to write the user-password without quotes. If you now drag and drop files over the icon it will remove the password. If you want to remove restrictions from a PDF again, simply undo these changes.
Mac
I’ver never personally used a Mac so I don’t know any program. I guess you will find something if you look good enough.
Online
There’s also an online service which promises to remove a PDF password but I was never successful in doing so. Try the Free PDF Unlock Online Utility for yourself if you want and tell me if it worked for you.













