Jump to content

saving pdf file without password [solved]


Kieth
 Share

Recommended Posts

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 by Kieth
Link to comment
Share on other sites

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

Link to comment
Share on other sites

: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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by neddie
Link to comment
Share on other sites

:woot_jump: :thanks: 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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

:thumbs:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...