Kieth Posted February 9, 2009 Report Share Posted February 9, 2009 (edited) I received a .pdf file that I need to open with a password. How can I save it w/o a password? I've looked and looked, tried and tried, but . . . I've tried xpdf, Okular and Adobe Acrobat. I just can't find the command or option to do it. Thanks, Kieth Edited February 9, 2009 by Kieth Quote Link to comment Share on other sites More sharing options...
neddie Posted February 9, 2009 Report Share Posted February 9, 2009 Do you know what the password is? If you do, it's easy using pdftk from the command line: pdftk protected.pdf input_pw sekritPassword cat output unprotected.pdf See pdftk --help for more examples. If you haven't got pdftk then just "urpmi pdftk". If you don't know what the password is, then I don't know the answer :P Quote Link to comment Share on other sites More sharing options...
Kieth Posted February 9, 2009 Author Report Share Posted February 9, 2009 :blink: :wacko: OK, I keep trying, but I keep getting different errors. The password I know :) , but I don't understand where to put the passwords (I looked at pdftk --help, too!). Let's say that my file name is FRUSTRATED, and the password is STUPID, how would I use the command pdftk protected.pdf input_pw sekritPassword cat output unprotected.pdf I presume the file name would be put here: pdftk FRUSTRATED.pdf input_pw sekritPassword cat output FRUSTRATED.pdf but the password? I tried it in several positions. Quote Link to comment Share on other sites More sharing options...
Greg2 Posted February 9, 2009 Report Share Posted February 9, 2009 I've never used pdftk for this, but try: pdftk FRUSTRATED.pdf input_pw STUPID cat output FRUSTRATED.pdf Actually, I don't think you need 'cat'. pdftk FRUSTRATED.pdf input_pw STUPID output FRUSTRATED.pdf Quote Link to comment Share on other sites More sharing options...
neddie Posted February 9, 2009 Report Share Posted February 9, 2009 (edited) True, you don't need the cat in this case. Realised too late, but I grabbed it from my bash history where I was concatenating several password-protected pdfs into one big one, and I forgot to delete the cat. Nice demoggification, Greg2 ! By the way, I think I'd use output FRUSTRATED2.pdf just so it doesn't overwrite the input file - check the output and if it's ok THEN delete the protected one. Not sure whether the tool is able to write out to the same file it's still reading from. Edited February 9, 2009 by neddie Quote Link to comment Share on other sites More sharing options...
Kieth Posted February 9, 2009 Author Report Share Posted February 9, 2009 :woot_jump: Thank you, thank you. I did it. I did it w/o the cat command. I had to change the output file name, too. I don't know if it would have worked with the cat command, as I didn't even try it. Thank you! Kieth Quote Link to comment Share on other sites More sharing options...
neddie Posted February 9, 2009 Report Share Posted February 9, 2009 Quote Link to comment Share on other sites More sharing options...
Greg2 Posted February 9, 2009 Report Share Posted February 9, 2009 I've tried xpdf, Okular and Adobe Acrobat. I thought that since I've learned to decrypt with pdftk, I'd try to encrypt with it. So I encrypted some pdf files. Then while playing with them I found out that Adobe Reader 8.1.2 asked me to enter the password, then it opens them without any problems. What version did you use? Quote Link to comment Share on other sites More sharing options...
Kieth Posted February 10, 2009 Author Report Share Posted February 10, 2009 Adobe 8.1.3. I could open my .pdf file without any problems, as I knew the password. I just wanted to save it w/o a password. I couldn't find the option anywhere with the pdf programs to do it. Every time I saved it, it automatically saved it with the password. Quote Link to comment Share on other sites More sharing options...
Greg2 Posted February 10, 2009 Report Share Posted February 10, 2009 Now I understand... maybe I should change my password to stupid. :) Quote Link to comment Share on other sites More sharing options...
Kieth Posted February 10, 2009 Author Report Share Posted February 10, 2009 Now I understand... maybe I should change my password to stupid. smile.gif Mmm, I don't think that's a good idea. That's my password! Quote Link to comment Share on other sites More sharing options...
neddie Posted February 24, 2009 Report Share Posted February 24, 2009 An update, in case people are interested - I was given some other pdfs recently and this pdftk trick didn't work. It turns out these pdfs were encrypted using AES, which pdftk doesn't understand. The solution I found was to open the files in kpdf, and then print them to a new pdf file. Then the new pdf doesn't have any password protection so you can use pdftk for editing / merging / whatever to the pdfs as you wish. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted February 24, 2009 Report Share Posted February 24, 2009 I unfortunately have a pdf which requires a username and password to gain access, but possibly even checks this across the internet (have to test trying to open it without connection to internet), so unfortunately, I cannot print or do anything else with mine:( I want to, but I cannot it seems. Quote Link to comment Share on other sites More sharing options...
David Batson Posted February 24, 2009 Report Share Posted February 24, 2009 I unfortunately have a pdf which requires a username and password to gain access, but possibly even checks this across the internet (have to test trying to open it without connection to internet), so unfortunately, I cannot print or do anything else with mine:( I want to, but I cannot it seems. I know what you mean. My wife has access to textbook chapters in pdf form from her online university. She can download them, but to open them she has to have an internet connection to verify her user name and password. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.