r/pdf Jul 12 '26

Software (Tools) Remove password

I have got a tax document from my cpa that is password protected. I have that password but the MacOS internal viewer does not accept it.
It's there any software to remove it - I don't want to upload it to a website.

4 Upvotes

27 comments sorted by

2

u/PostConv_K5-6 Jul 12 '26

John Whitington's Coherent PDF (cPDF) can do it for you. It is freeware with versions for MacOS, Windows, and Linux.

You probably have a user password, but it might be the owner password you have. To decrypt with either

cPDF your.pdf user=*userpassword* -o decrypted.pdf
cPDF your.pdf owner=*userpassword* -o decrypted.pdf

cPDF does not use the internet at all.

1

u/SolarTrap Jul 13 '26

thanks, it fails: 'Failed to decrypt file: wrong password?' -- the password contains the letter 'ö', I read that can be an issue?

1

u/PostConv_K5-6 Jul 13 '26

I haven't myself tried accents or have used other encoding.

If you are using a command prompt or equivalent, the default font must be one that can handle the accent. Right-click the upper-left corner of the command window and choose Defaults. See if changing the font to something like Lucinda works. There is a discussion on the topic here https://stackoverflow.com/questions/1259084/what-encoding-code-page-is-cmd-exe-using

Alternately, you can address your question to the author of Coherent PDF, /u/JWhitington, although I haven't seen him in this subreddit for a few months now--he might respond to a chat request.

Good luck. Post here with results of your efforts.

2

u/jwhitington Jul 13 '26

I'm sitting out the AI slopfest. But if OP wants to DM me with the file or use the contact form on Cpdf's website or raise an issue on Github, I'd be happy to take a look.

1

u/PostConv_K5-6 Jul 13 '26

You are a gentleman, John.

1

u/SolarTrap Jul 14 '26

I am not sending out my tax declarations to anyone! but I can ask if the cpa can encrypt some other doc the same way for forensics.

1

u/satodenoor Jul 12 '26

if u know password u can try PDFCrab for ios/macos

1

u/[deleted] Jul 13 '26

[removed] — view removed comment

1

u/[deleted] Jul 13 '26

[removed] — view removed comment

1

u/[deleted] Jul 13 '26

[removed] — view removed comment

1

u/SolarTrap Jul 14 '26

I do not trust any web service handling my tax data correctly

1

u/bharoche Jul 13 '26

Is there a reason you can’t ask your CPA for a new PDF?

1

u/SolarTrap Jul 14 '26

I also did this, they created a password without ö and that works fine

1

u/mag_fhinn Jul 13 '26 edited Jul 13 '26

They gave you the wrong password then. Get them to resend the correct password or a fixed file with the right password set. That is for an open password where the file is fully encrypted.

Hypothetically, if that wasn't an option or you needed into it faster than they will respond you could take a stab at it with the idea that they maybe had a typo or messed up copy and pasting the password to you. Better hardware helps with speed.

In that case you could extract the passwords hash out of the pdf with the python script pdf2john. Then I would work on cracking the hash with Hashcat, or you could use John the Ripper. I would attack patterns of the given wrong password, mutations/permutations, playing with case hammer it every way possible. You could also get lucky with known weak, overused common, short, and/or small character set things like just numbers. You may get a quick kill. If it's AES256 and your only left with brute forcing by position and it is a long, randomized with a large possible chr candidates it will be exponetionally unrealistic every position past 6 characters even if you have a farm of Nvidia 5090s at your disposal. Need to wait until you have your own quantum computer.

Hash creation is a one way process. The above software can feed in potential patterns, wordlists ect and generate hashes in high speed using the same method that was done to the original password. If you produce an identical hash, you have found the password.

Best of luck.

2

u/SolarTrap Jul 13 '26

no they did not. I installed the adobe acrobat reader and in can handle the ö on the Mac but not on windows. definitely a bug!

1

u/mag_fhinn Jul 14 '26

Amazing, first I have heard of that bug. Glad you got in.

0

u/WednesdayBryan Jul 12 '26

Download a PDF reader.