I expect many of you already were aware of this, but I can imagine at least some of you aren’t yet, so here goes: apparently you can lift the usage restrictions from Adobe PDF files by simply forwarding them as attachments to your Gmail account and opening them in HTML mode right from your inbox. That way, you can copy whatever the ’secured’ PDF contains to a text editing program and do whatever you want with it.
For your reference: PDFs (Portable Document Format) can be encrypted so that a password is needed to view or edit its content, and they can also contain embedded DRM restrictions that provide further controls that limit copying, editing or printing.
Turns out the “View in HTML” feature in Gmail can display an HTML version of the encrypted file, stripping out the restrictions. Part of the layout might be lost in the process, but the text can easily be extracted with a simple copy/paste command. In case the original PDF file had printing restrictions, those are stripped as well.
I searched a bit for similar reports and found this article, dated April 2006, which was one of the first to discover the trick. The same blog later updated readers on the situation, stating Google crippled the security circumvention so that DRMed PDF files could no longer be opened in HTML mode, but a quick test with a secured file just worked fine right here and now. (Update: apparently, it doesn’t always work)
I don’t know about you, but this’ll save me some trouble next time someone sends me an encrypted Adobe PDF file that I’d like to copy or edit. Unless it’s illegal, in which case this post doesn’t exist.
(Via @Toon)









i have tried opening attachments with restrictions and it didn’t work. there are some files where it does, though
That’s it, I’m quitting Google because they restrict and control the usage of their tools!
it does not work always.. there are few pdfs with simple encryptions which can be opened by this method.. but the ones sent by the banks dont work
Just so you know, for PDF with printing restrictions, you can use Coolpdfreader (bad reader) but allow you to print any document with printing restrictions (no reading protections). Visit my website if you have time
If it’s copy protection (i.e. not printing protection) that you need to work around, you can accomplish the same thing under OS X by opening a protected PDF in Preview, and then printing it to PDF. Open the resulting PDF and restrictions are gone.
If you want to extract text from a protected pdf, you can also take a print screen, photograph it or simply write it down, huh, using umm.., a pen and a paper. Unless it’s illegal, in which case this comment doesn’t exist.
Depends on how the file was protected, but yeah, you might be about the last to know . . .
Except most of the “Real World”, of course.
JY
http://answerguy.com
Come on Robin – everyone knows that if you want to truly protect sensitive data in a PDF you just have to black out the text:
http://www.tech...best-hack-ever/
Haha, right!
I had a company send me thier price sheet for me… in Excel, it had 1 workbook tab for our company… in Gmail, I had access to hidden tabs for other customers.
I second bsmith’s comment, you can usually print to PDF to ditch the DRM
There are plenty of online tools, which transform PDFs into HTML, not even looking at the text copy protection.
The trick with GMail is known since people used to need special invites to get a GMail account.
Here an older article (December 2005): http://labnol.b...df-to-html.html
How long before Google changes this?
Isn’t it great though!!?
in HTML view images and graphs don’t show. you basically get poorly formatted text.
Never knew that could be done!
And for quite a few years, there has been “PDF unlocker” – http://freeware...n.softonic.com/
I’ve used it often for files that I’d created and locked myself, and then forgotten the password.
Just Google “how to unlock PDF” and you’ll find a decent number of places to take off the restrictions on the file.
One example being: http://www.enso...t/pdf-crack.jsf
Just use any commandline Unix/Linux tool to transform the PDF to text/html/doc/whatever you like without restrictions.
Interesting!
This is not exactly related but did you also know that if you have a .zip file WITH an executable inside the zip, Gmail does not permit you to send the file over mail, but if you simply change the extension to something else, say .pdf, then you can easily send it across!
Thanks for ruining a good feature, now they’re going to have to remove it because if you.
I imagine that after this article, GMail will institute a quick fix.
thanks!
It just depends on the type of password / encryption. Google View in HTML doesn’t not decrypt encrypted PDFs. It can just allow you to view some which have a password, but are not encrypted.
What is that beta label on the gmail image doing there?
Nice observation. TC need to update its collection of Gmail logo!!
I fend opening pdfs in Apple’s Preview program tends to remove passwords automatically
This will not work for properly Rights Managed PDF documents.
So, I’m a PDF geek (it’s my job), and PDFs have a pretty confusing set of security restrictions placed on them.
When you copy-protect a PDF’s text through encryption, but leave off a password, all of the PDF’s content is extractable using the default encryption key (since no password was attached). That means that any non-conforming viewer can extract the text.
However, you can also mark the copy-protected text as extractable “for accessibility purposes”, which the HTML viewer might fall under. Many authors of copy-protected PDF leave this option enabled, and I suspect these are the files GMail is rendering for you.
Doesn’t always work with pdf files (though it used to work sometime back). Came across a problem when i needed to extract text out of copy protected (must have been a tough encryption) PDF files and i had to find a workaround (but it worked for me). Here are the steps -> http://bit.ly/sJTeV
http://www.pdfunlock.com – simplest possible?
Yea Ive also noticed it doesnt work for all docs. Interesting to see if it lasts. Thanks YoAdobe for the link
I use ghostview for purposes like this; it will also print PDF’s that usually won’t allow printing