Secured PDFs


Hi readers,

You’re probably all pretty annoyed by the lack of technical content on this blog. I’m sorry. All my moral speculation is probably not endearing in the slightest. When I decided to get back to blogging, I really did intend for this blog to continue where I left off with my previous blog. It’s just that I have an academically demanding term, and at the end of the day I have no energy left for anything technical. As a matter of fact, I have four chemistry courses, one physics course, a computer science research course, and a part-time sysadmin/developer job (with classic ASP on Windows Server, mind you, which makes it rather painful).

One of my chemistry courses is a physical chemistry lab course. The last five weeks of the course are reserved for independent research projects. I was actually pretty excited about my proposal to study the rates of SN1 reactions in ionic liquids (thanks to Richard Liu for providing most of the details), and I was hoping it would give me something to write about here. But that was a no-go, because ionic liquids are too expensive. Instead we ended up with a much lamer project, which I won’t get into here.

But I do have a nerd tip to share today! Today I was trying to edit some PDFs before sending them to my mom. I have Adobe Acrobat Pro, so that was the natural choice for editing. Unfortunately, the PDFs were secured, and Acrobat wouldn’t let me edit them. So what to do?

One thing I tried before was printing the PDF as a PDF. This would cause only the information necessary for rendering the document’s contents to be sent to the virtual printer, thereby removing all DRM. But it seems like Adobe is a bit too smart for that, and Acrobat can detect when you’re trying to, as they say, “redistill” a secured PDF using Adobe’s own PDF printer.

As a programmer, this makes me cringe, because it’s not properly abstracted. In theory, an application should have no right to know the identity of the printer it’s sending a document to, because the operating system is supposed to take care of those details. It also reminds me just how silly DRM is. All I want to do is edit the form before my mom prints it. I could print it out, write on it, and scan it first before emailing it, or I could print it out, write on it, and mail it, but those options are inconvenient to me, and digital editing ought to be convenient, if only Adobe and the people who made this document weren’t trying to make it so inconvenient.

I went around looking for a third-party PDF printer for Windows, but I couldn’t find anything free that worked properly on my document. Maybe I was just bad at searching. I missed the cups-pdf printer I used to use, back before I decided to leave Linux. (These days I often contemplate going back.)

I found a different solution, though. I have some third-party PDF viewers on my computer because I was troubleshooting an issue earlier with some PDFs that made Acrobat lock up. I opened up the secured PDF using Evince (which is also the standard PDF viewer in Ubuntu, by the way) and printed it to the Adobe PDF printer. Apparently, the printer isn’t smart enough to figure out when it’s being sent a PDF. This gave me an unsecured version of the original document!

This approach is basically guaranteed to work as long as you can open the PDF. There are plenty of third-party viewers that don’t respect DRM settings and will probably allow you to print the file even if it’s explicitly disallowed by the security settings. It’s like the analog hole, except that it’s never actually analog.

(By the way, the actual editing I wanted to do was completely innocent. I think it’s absolutely silly these days to distribute forms in PDF format that can’t be filled electronically before being printed, and whenever I find myself wanting to fill out one of these forms, I use Acrobat to create the form fields. (Even MIT’s transfer admissions department seems to be guilty of distributing non-fillable PDFs.) Afterward, I usually re-print the file as PDF to destroy the form metadata, and send it off.)

Advertisements

About Brian

Hi! I'm Brian Bi. As of November 2014 I live in Sunnyvale, California, USA and I'm a software engineer at Google. Besides code, I also like math, physics, chemistry, and some other miscellaneous things.
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Secured PDFs

  1. synagogue visitor says:

    you should write most posts like this one

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s