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

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

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...