Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remove PDF passwords using a virtual PDF printer System
My bank sends password-protected PDF statements to me via email. This is a good thing. In the past, I've converted them to an unprotected PDF for easier local storage and usage by selecting Print in Preview, and saving the resulting image again as a new PDF. Under OS X 10.4.3 (and possibly earlier), this has stopped working. Preview (and Adobe Reader 7.0 as well) recognize that the PDF is protected, and won't save the print job as a PDF.

I thought I could work around this by using a virtual PDF printer, so I followed this hint to create one. The virtual PDF printer works in general, but apparently the detection of PDF protection was added in the pstopdf command line utility, which is utilized (I'm guessing) by all the methods I tried. So this method also failed, as evidenced by a note in the pdf.log file that's created.

I also have a Canon inkjet printer (a non-Postscript printer). I found that if I stopped the queue on the Canon and printed to it, then dragged the print job from the Canon's queue to the virtual PDF printer queue, the PDF would finally be produced as expected -- and without the Untitled.pdf filename to boot. I'm not sure what other types of printers this would work with; it may or may not have to be a non-Postscript printer.

[robg adds: I haven't tested this one, but I will soon, as I receive similarly password-protected PDFs from time to time, and it's a pain having to add each password to my Keychain. But I have to, as there's just no way I'll remember them, given that I open such PDFs only very occasionally. And for those who may complain that we've just posted a method of getting around PDF password protection, we really haven't -- you need to have the password in the first place to open and print the file.]
    •    
  • Currently 3.00 / 5
  You rated: 4 / 5 (8 votes cast)
 
[70,305 views]  

Remove PDF passwords using a virtual PDF printer | 21 comments | Create New Account
Click here to return to the 'Remove PDF passwords using a virtual PDF printer' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remove PDF passwords using a virtual PDF printer
Authored by: b00le on Nov 15, '05 07:15:16AM
you need to have the password in the first place to open and print the file.
Not necessarily - we produce protected pdf files with permission set so that anyone can open or print them, but not alter or copy the contents - some settings let you open a file but not print it, so if this works (I haven't tried it yet), you will definitely have annoyed someone.

[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: ccase on Nov 15, '05 09:47:13AM
you will definitely have annoyed someone

I hope so. These documents have annoyed me enough times.

I'd love to hear a defense of using password protection to produce read-only documents that made any sense at all.

The password protection serves no legitimate purpose. If I wanted to produce a PDF that included your corporate pledge of fealty to Osama bin Laden, or noted your founder's enthusiasm for kinky sex, I could do it easily enough, as could anyone else. The password protection only serves to stiffle the flow of information for legitimate purposes.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: hamarkus on Nov 15, '05 04:38:55PM

As much as I hate password protected pdf files (and will do everything to remove this protection), password protection is there to prevent people from forging documents.

But in the end, anything that can be displayed on screen or printed can be copied at the maximum print or display resolution.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: rameeti on Nov 25, '05 07:15:14AM

As you are looking for a reason for passwording the changing of a document, how about this:

My company takes a somewhat generic form that our industry uses and spends a good deal of time turning that 'print it out, fill it in form' into a real form with calculations that allow the user to fill it out and submit the info online to us. We then put our header on the top. We've done this to hundreds of our industry standard forms. We'd like to have that business advantage of our consumers being able to use our forms for submission to us. Should it fair that our competitors could just wipe our logo and name off of the form and then post the fillable form to their website for their customers?



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: goodguy on Jan 02, '06 08:12:33AM

i'm sorry for your company if it tries to protect something using pdf-passwords. darwin's theory tells us that you deserve to have your work stolen.

what about creating a web-page for these forms and then doing the calculations or whatever on the server? that would hardly be more work for you, but add a *much* higher layer of protection.

pdf-passwords are just a pain in the ass that annoy but do not protect at all. supporting or using them should be a legal offence ;-)



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: benfsmith on Nov 15, '05 07:45:14AM

I have been using this effective workaround for about ten years. I remember being at a trade show about 6 years ago where the Acrobat team was presenting on the security of their app. I asked them about this, figuring that they would have a good explanation, or a plan to fix it. Although not my intention, it resulted in an embarrassing situation for them.

Pre-OS X, the process was to print to a postscript desktop printer and then use Distiller to generate the PDF.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: hbrendel on Nov 15, '05 08:53:49AM

And then... there is PDFkey Pro

---
Henk Brendel



[ Reply to This | # ]
ghostscript
Authored by: mzs on Nov 15, '05 09:03:12AM
I believe that once long ago ghostscript came to my rescue, I found this in my notes:
gs -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pdfwrite -sOutPutFile=foo1.pdf foo.pdf
I also have a perl script pdfdecrypt.pl that I got somewhere that I may or may not have used, but I think that ghostscript is what worked for me.

Okay googling for pdfdecrypt.pl led me to the page that I used:

Gallery of Adobe Remedies

Something there did the trick.

[ Reply to This | # ]

Remove PDF passwords using a virtual PDF printer
Authored by: mncladdict on Nov 15, '05 10:00:42AM

If you have an old Mac OS X installer CD laying around, you can pull Preview v.1 off of it which completely ignores PDF password protection. Thanks Steve!



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: stevec on Nov 15, '05 02:57:14PM

If you have the MOSX 10.1 install CD look in /system/installation/packages/ESSENTIALS.PKG. Pacifist is great for this. Open the file in Preview 1.1 and select print. Select Print PDF as Postscript from the PDF menu (that's how it works in 10.4.3) and save the .PS file. Now if you open the .PS file in Preview 3.0 it has been unprotected



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: aleene on Dec 04, '05 09:04:17AM

No luck with this one, I just get white pages. The idea was neat though.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: AndiSkater on Nov 16, '05 02:33:43AM

There is a very easy way to get rid of the PDF protection:

Use the Quartz-Filters Action in Automator to create a »Generic PDFX-3 document« from the protected pdf.

PDFX-3 documents can't have a copy protection, so when you create one the protection is automatically removed.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: xianman on Nov 17, '05 02:56:36PM

That is one of the finest hints I have read here in a long time. It works flawlessly, thanks you!



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: aleene on Dec 04, '05 09:06:36AM

Produces just a bunch of white pages. Wonder whether the latest security update disabled this.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: Spaztik on Nov 16, '05 06:28:49AM

I also made a simple Automator Action. Here's what I did:

1. Ask for Finder Items
2. Extract odd and even pages: Separate files
3. Open images in Preview.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: después on Nov 24, '05 10:51:43AM

Hmm, but this way you'll have two files, don't you, one with the odd and one with the even pages...
My Workflow was this and worked OK:
1) Get Selected Finder Items
2) Filter Finder Items (Name Extension Is equal to pdf)
3) Extract Odd & Even Pages (All pages in separate files)
--> we'll get two files, the action passes to the next action first the file with the odd (1, 3, 5...), and second the one with the even (2, 4, 6...) pages
4) Combine PDF Pages - Shuffling Pages (the description told me it will combine the above two files just correctly)
5) open or move the resulting pdf

I tried the PDFX-3 method before but I got garbled letters... Maybe Automator was in bad mood... :)



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: chabig on Nov 29, '05 06:36:26AM

Where do I find the resulting PDF? I make a workflow and it runs but nothing comes out.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: vocaro on Nov 20, '05 11:30:02AM

I was able to remove password restrictions on a PDF by running it through the pdfcrop utility, which is available (among other places) from the tetex-base package in Fink.



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: bugmenot on Jul 24, '07 07:31:19AM
Use PDFLab add the file you want and it gives you a PDF without protection.

[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: 44sunsets on Sep 24, '07 07:39:25AM

Great tip bugmenot, I can confirm that this does the trick indeed!



[ Reply to This | # ]
Remove PDF passwords using a virtual PDF printer
Authored by: luomat on May 02, '08 10:22:12PM
What happens if you can't print the file? Install GhostScript (see MacPorts)

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=OUTPUT.pdf -c .setpdfwrite -f INPUT.pdf

You may or may not need to replace the 'pdf_sec.ps' file on your machine with

http://web.archive.org/web/20010428180359/http://web.archive.org/web/20010428180359/http://members.ozemail.com.au/%7Egeoffk/pdfencrypt/pdf_sec.ps




[ Reply to This | # ]