Removing PDF Security, not passwords

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Removing PDF Security, not passwords Tue Jun 25, 2013 11:15 am • by Tetsugaku
Hi all - my bank (Barclays, UK) let's mew download PDF statements - great, and using the content filter and the account numbers I can filter the statements into the right folder.

However - the PDFs have (in finder) Security: Password Encrypted. There is no password actually set, so the PDFs can be easily opened - but I can't use the annotate function in Preview without saving the file as a different file and then opening that one.

Infuriating and just the sort of thing I'd like to automate!

Any ideas or pointers gratefully received.
Tetsugaku
 
Posts: 9
Joined: Thu Nov 08, 2012 9:16 am

Re: Removing PDF Security, not passwords Tue Jun 25, 2013 12:55 pm • by Mr_Noodle
I'd look into Automator or AppleScript to do that as Hazel doesn't have anything built-in to deal with that. Try searching the forums to see if someone else has run into this.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Removing PDF Security, not passwords Fri Jun 28, 2013 11:05 am • by Tetsugaku
Thanks for that - my problem has been in searching for it without finding people who just want to remove passwords from PDFs!
Tetsugaku
 
Posts: 9
Joined: Thu Nov 08, 2012 9:16 am

Re: Removing PDF Security, not passwords Sat Jun 29, 2013 1:53 am • by JBB
Look at PDFKey Pro (pdfkey.com). You can open the file you're working with in Hazel with that application to remove the security (uncheck append unlocked/locked in the options, and destination should be the same as the original file). You can delete the file with the "_original" suffix as part of your rule with a shell script (rm -rf "`echo $1 | sed 's/\.pdf//'`_original.pdf").
JBB
 
Posts: 22
Joined: Mon Sep 12, 2011 6:09 pm

Re: Removing PDF Security, not passwords Tue Jul 02, 2013 8:01 am • by Tetsugaku
thanks JBB - that's really helpful and I've managed to get everything going :)

Only one small snag - I can't get the script you kindly gave me to remove the original file, am I doing things in the right order?

https://www.evernote.com/shard/s205/sh/eb6ccd60-ad8b-4b9c-8d3c-23a004bd0f62/d787a5f5dcd2c4127dba3d906dc6bb6e/deep/0/Screenshot%2002/07/2013%2013:01.png


Thanks again all!
Tetsugaku
 
Posts: 9
Joined: Thu Nov 08, 2012 9:16 am

Re: Removing PDF Security, not passwords Thu Mar 03, 2016 7:12 am • by MacOCD
Waking up an old thread as my needs are almost the same.

I want to rename & file a randomly named, password protected PDF based on document contents that Hazel doesn't recognise.

The password protection prevents me from using PDFpen or FineReader to OCR the original document, but if I manually open and "print" it using "Print to PDF" I create a version that can be OCR'd via applescript which then has content Hazel can recognise and use to rename/move the file.

I'd like to automate that "Print to PDF" step via applescript if that's possible for a PDF?

Thanks,
Mark.
MacOCD
 
Posts: 44
Joined: Fri Sep 26, 2014 11:02 am

Re: Removing PDF Security, not passwords Thu Mar 03, 2016 11:57 am • by Mr_Noodle
Search the net. It seems there are scripts out there to do it, though it does so by driving the user interface which may or may not be ok with you.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support