chosaq

Circumvent PDF DRM… with Gmail!

Apparently, Gmail’s built-in “View as HTML” functionality, which allows you to view the content of PDF files (and other types of documents) as if they were classic webpages, works regardless of the files’ usage restrictions (= DRM). I don’t think this is a bad thing ;-) but just wonder how Google can back up this design decision — or is it a mistake?

Gmail screenshot

You can try this out yourself:

  1. Create or download a DRMed PDF file. I used this file from the Adobe site.
  2. Open the file with Adobe Reader and click on the “Lock” icon in the down-left corner to see which restrictions apply. Our example file can be printed, but editing or text extraction is not allowed.
  3. Send the file as an attachment to your Gmail account.
  4. Open the mail you’ve sent yourself and choose the “View as HTML” option below the (empty) mail body.
  5. An HTML version of the encrypted file is displayed — part of the layout might be gone, but the text can be extracted with a simple copy/paste command. In case the original PDF file had printing restrictions, those are stripped as well.

Note 1: a quick test with a PDF file with print restrictions yielded similar results — Gmail converted the file in question without any problem.

Note 2: Google Search on the other hand does comply with the copy restrictions inside PDF files — this search query for instance gives only non-encrypted PDF files a “View as HTML” option.

Update: Google has tweaked its PDF viewing functionality, so the trick described above doesn’t work anymore.

Update 2: There’s a similar loophole in Scribd (for now).

Update 3: Scribd was updated and now rejects DRMed PDF uploads.

Comments on “Circumvent PDF DRM… with Gmail!” (feed)

Comments and pings are closed.

  1. I tried this on an archival .pdf from the Eisenhower library and got this message: “If there are images in this attachment, they will not be displayed.”

    » Lothar on April 18th, 2006 at 22:44

  2. [...] boing boing上刚刚出现了一个帖子,是关于Gmail的一个小“bug”的。按照下面的方法,你也可以尝试一下: 1,首先下载一个带有使用限制(usage restrictions)的pdf文件,如果没有,可以下载这个Adobe站点提供的文件。 [...]

    » 单行线 | blog » Blog Archive » 用Gmail解除PDF的防拷贝限制 on April 18th, 2006 at 22:53

  3. tried this on some encrypted PDFs from the google-sponsored US Puzzle Championship from two years ago. both failed exactly as described in comment #1, which is to say, it shows the number of the first and last page, but no content whatsover (no pictures, no text).

    » Anonymous on April 18th, 2006 at 23:01

  4. Doesn’t work, some egghead @ Google must have stopped playing w/ himself and changed it.

    Same results as Lothar….

    » Clarence on April 18th, 2006 at 23:04

  5. Lothar, Anonymous and Clarence: the trick does NOT work with password protected PDFs (= PDF files that prompt for a password when you try to open them), such as the ones on the US Puzzle Championship site. Gmail still allows you to convert copy- or print-controlled PDFs to HTML though.

    » Andreas on April 18th, 2006 at 23:39

  6. That sucks… does anyone know any ways to get around the password protected crapola?

    » Ron on April 19th, 2006 at 00:45

  7. Andreas — thanks, that explains it. The 2 PDFs I wanted to “liberate” are technically not password protected, but they are shackled with something from FileOpen WebPublisher which:

    – only let me print the document once (printout quality wasn’t the best, partially my fault for not checking toner)

    – only lets me open the doc on my 5 year old laptop (again, partially my fault, that was the computer I first opened them on)

    – only lets me open with Adobe Acrobat, since FileOpen is an Acrobat plugin. I usually use FoxIt Reader for PDFs, but not for these docs…

    At least I scanned all the pages after printing, when they were still “virgin”, so I still have clean material, but I sure would like to un-tether these docs from my laptop.

    Oh well, I guess I’ll have to wait for some egghead to write something (probably on Linux I’d guess) which just opens the PDFs regardless of the access controls.

    Anyway Andreas thanks for the input.

    » Clarence on April 19th, 2006 at 02:39

  8. Clarence, those first two things are hardly your fault. Don’t make yourself a victim just because DRM is a very sucky thing, however it’s implemented.

    » NelC on April 19th, 2006 at 02:58

  9. On Linux (Ubuntu here):
    pdf2ps pdfWithFuckingDRMRestrictions.pdf
    pstopdf pdfWithFuckingDRMRestrictions.ps

    of course, you can read/print the ps version (without reconvert it to pdf) :D

    :D

    » Bruno on April 19th, 2006 at 04:50

  10. Or, get a Mac, select the text, go to the Services menu and select Texteditor.

    » Dude on April 19th, 2006 at 07:17

  11. or just print it out, scan it in on a flatbed scanner, use OCR

    » sxk on April 19th, 2006 at 08:12

  12. Great! Now I just need a way to send myself a gmail with an attachment that is 25MB!

    » ChazB on April 19th, 2006 at 08:19

  13. This works because the restricted PDFs have Accesibility Permissions for the hearing/vision impaired; thus, they allow content extraction for that purpose.

    You can create PDFs that don’t allow any content extraction if you disable Accesibility, and will fail this test.

    » Razor Dog on April 19th, 2006 at 08:57

  14. [...] chosaq » Circumvent PDF DRM… with Gmail! Open up and print copywright restricted PDF’s! (tags: hack hacks pdf drm gmail howto) [...]

    » Kashyyyk » links for 2006-04-19 on April 19th, 2006 at 09:25

  15. Why do all that work when you can use PDF Password Remover v2.5?

    » Cheeky on April 19th, 2006 at 10:13

  16. [...] How Gmail can screw up PDF protection [...]

    » Kishor Krishnamoorthi’s Website » First rain, now fog! on April 19th, 2006 at 10:26

  17. just use ghostscript

    » Anonymous on April 19th, 2006 at 11:01

  18. [...] How to get around DRM’d PDFs using Gmail [...]

    » ThePodcastNetwork :: G’day World » Blog Archive » GDAY WORLD #110 on April 19th, 2006 at 12:14

  19. Print it out and use PDFcreator as your selected printer.

    » Blah on April 19th, 2006 at 12:44

  20. [...] Boing Boing上的一个帖子,介绍了如何用Gmail破解受到保护的PDF文件,有兴趣就去看看吧,我觉得这应该是Gmail的一个Bug。 将本文保存到:These icons link to social bookmarking sites where readers can share and discover new web pages. [...]

    » TechPush on April 19th, 2006 at 14:05

  21. Try to print to PDF Creator: (open source freeware).

    » tzadik19-mapson@gmail.com on April 19th, 2006 at 17:10

  22. [...] Alternatively, you can try this suggestion on here that uses Gmail as a workaround. It doesn’t work as well as all methods above, but it’s definitely cross-platform. [...]

    » kelvin quee » Breaking a Protected PDF on April 19th, 2006 at 18:18

  23. I’ve a better suggestion to workaround this that uses the Microsoft Document Image Writer. See:
    http://www.kquee.com/blog/2006/04/19/breaking-a-protected-pdf/

    » kelvin quee on April 19th, 2006 at 18:27

  24. to get text:
    1) Install a dummy text only printer
    2) print file to that printer and say “print to file”
    3) edit such file as pleases

    to get around fileopen:
    http://archive.devx.com/sourcebank/details.asp?resourceNum=1023243

    » davide on April 19th, 2006 at 22:35

  25. [...] Andreas在blog里写了一篇名为“circumvent PDF DRM with Gmail”的文章,提出如果将PDF文件以附件形式发送至gmail邮箱,然后利用gmail提供的“view as HTML”功能将PDF转变为HTML格式,就可以轻松进行粘贴复制了,用相同的方法也可以解除PDF文件的打印权限。不过google搜索结果中的“view as HTML”功能似乎并没有解除这些限制。 [...]

    » freo » Blog Archive » break PDF DRM with gmail - 用gmail解除PDF文件的复制权限 on April 19th, 2006 at 23:56

  26. [...] Circumvent PDF DRM… with Gmail![1] 利用 gmail 破解 pdf 文件的 DRM 數位版權管理限制[2] 這實在太銷魂了啊… Ref from digg, posted by Andreas ↩Posted by MLChen ↩ &  [...]

    » 喵爸爸的窩 » Circumvent PDF DRM… with Gmail! on April 20th, 2006 at 17:55

  27. [...] Aunque parece que la forma más cachonda de cargarse la protección de un PDF es la de usar la opción del Gmail “View as HTML”. Glorioso. ¿Algún altercado conocido entre los de Google y los de Adobe? ¿Tendrá algo que ver con el tema de la biblioteca virtual que prepara Google, y que tantos pleitos le está costando? Guardado en: Noticias por — jordisoler @ 14:28 [...]

    » jordisoler.com » Cuidado con los PDFs on April 20th, 2006 at 21:28

  28. Using the test file mentioned above worked fine, I was able to copy the text fine. I did see those display issues, but they weren’t too bad.

    » [TKO]WinterMute on April 21st, 2006 at 00:41

  29. [...] (via) gmail, pdf [...]

    » dancemoon.net » Blog Archive » 利用 Gmail 解除 PDF 文件的使用限制 on April 21st, 2006 at 03:33

  30. Dude, Linux users have been circumventing it for years, even password protected ones. Try Kpdf which is probably the best on linux.

    John.

    » John on April 21st, 2006 at 12:30

  31. [...] See here for info on circumventing PDF DRM with Gmail. [...]

    » Pandaura » Blog Archive » Circumventing PDF DRM on April 23rd, 2006 at 05:35

  32. [...] Some observations regarding my previous entry, which received WAY much more attention than I had expected :-) [...]

    » chosaq » A follow-up on April 23rd, 2006 at 12:06

  33. [...] (1) send the pdf file as an attachment to one’s Gmail account – Gmail provides an option to view the file as HTML and text can be extracted from there (I learn this trick from here); [...]

    » 來燕居札記 » Copy-protected PDF File on April 23rd, 2006 at 17:15

  34. [...] After a frustrating battle with the Adobe DRM for the e-book i . . .gasp! . . . Bought, Cryptonomicon, I decided to search for cryptonomicon.txt on MSN and . . . behold! there it was at #1. (Yes – I tried the Gmail trick. No – it doesn’t work anymore.) [...]

    » Spammers Paradise SEO Black Hat: Black Hat SEO Blog on April 24th, 2006 at 00:19

  35. [...] Vía: Chosaq, Circumvent PDF DRM… with Gmail!. [...]

    » Gonzalo López » Quitando el DRM de archivos PDF con Gmail on April 24th, 2006 at 11:27

  36. Just wanted to set a few facts straight…
    http://technoracle.blogspot.com/2006/04/circumventing-pdf-with-gmail-not.html

    » Duane Nickull on April 29th, 2006 at 01:17

  37. [...] More… [...]

    » Brain Food Blog » Blog Archive » Use Gmail to break PDF copy-restrictions on May 5th, 2006 at 07:07

  38. [...] More… [...]

    » The Virtual Handshake Blog | » Use Gmail to break PDF copy-restrictions on May 5th, 2006 at 07:08

  39. [...] Learn more [...]

    » Biana’s Internet Marketing for Solopreneurs » Blog Archive » Disturbing News For Ebooks Authors on May 6th, 2006 at 01:40

  40. [...] From a a recent PDFzone article linking to my “Circumvent PDF DRM with Gmail” entry of a couple of weeks ago: [...]

    » chosaq » Gmail to fix PDF usage restrictions loophole? on May 10th, 2006 at 17:43

  41. If I wanted to copy information from a PDF file there’s no security that can stop you. If you can display it on your screen, you can copy it. I know, I can do it.

    » VM on May 12th, 2006 at 08:01

  42. [...] Google has rolled out a couple of new Gmail features this week. And guess what: one of them is not mentioned on the “What’s new on Gmail?” page. Readers of this blog probably know what I’m talking [...]

    » chosaq » Gmail cripples DRMed PDF files’ “View as HTML” functionality on May 15th, 2006 at 03:17

  43. Who cares what people think, they have now removed a good feature from GMail simply because some people want to use DRM?! Thats just sad.

    » RyanJ on May 16th, 2006 at 20:37

  44. I opened a ebook with DRM protection on my desktop. No problem. When I wanted to open the same file on my desktop at work. I wasn’t allowed to.
    That ticked me off since I’d bought the ebook online and thought I could at least print it on my colorlaser at work.

    Solution:

    1) Use SnagIt to grab the ebook at home and save it as a new PDF. I opened the PDF at home, used Snagit to grab the ebook when opened in Acrobat. Then save it as PDF under a new name.

    2) Or just use Macromedia (now Adobe) Flash Paper. Open the PDF i Acrobat and the print it to Flash Paper. Then save it as a PDF in Flash Paper under a new name.

    Now you can view and print the file anywhare.
    Thats it.

    » Garry on July 22nd, 2006 at 23:00

  45. [...] 刚刚看了这样一篇文章,说可以用gmail破解PDF的DRM保护,不知是真是假,如果是真的这也未免太。。。了吧。先记下来再说,回头有空验证下。Circumvent PDF DRM… with Gmail! [...]

    » 石头记 » Circumvent PDF DRM… with Gmail! on August 17th, 2006 at 05:07

  46. Gary Said: “I opened a ebook with DRM protection on my desktop. No problem. When I wanted to open the same file on my desktop at work. I wasn’t allowed to.
    That ticked me off since I’d bought the ebook online and thought I could at least print it on my colorlaser at work.

    Solution:

    1) Use SnagIt to grab the ebook at home and save it as a new PDF. I opened the PDF at home, used Snagit to grab the ebook when opened in Acrobat. Then save it as PDF under a new name.”

    Hi Gary and everyone else, I have Adobe Acrobat Professional, I also have SnagIt. I am not a computer genius or anything which is why I need a lil help. Basically, I bought a number of financial ebook’s called “Rich Dad, Poor Dad” series. Unfortunately they are all DRMed, and there are no options to print , copy, or anything, I have tried a number of different PDF password ‘cracking’ programs but none have worked.

    I tried to use SnagIt to copy the ebook using the auto scrolling feature but it stopped on the 7th page! I am not sure what’s going on. The point is that I and many other people are extremely frustrated as we have legally paid for these books but they are so restricted that they are simply not worth having. I had never bought an ebook before and I could not cancel my orders with the company or even exchange them for ‘real’ books, the ones made of paper!

    Basically if this doesn’t get resolved I will simply never buy an ebook ever again! This is one of the worst experiences I have ever had, I have been to a number of forums and thousands of people are pretty p:ssed with this DRM thing! Sorry for going on and on but we’re just so fed up with this thing, spending days and days trying to look for an answer! I hope you and others can help, thanks for your time…

    Best regards,

    Ryan ( wiseguy_ny_007@yahoo.com )

    » Ryan on August 21st, 2006 at 20:45

  47. Try Ghostscripy + Ghostview.
    No need even to convert to .ps then convert back. Just convert and save as .pdf to a new file — DONE!
    DOH!

    » naughtyboy on October 4th, 2006 at 16:18

  48. Who cares what people think, they have now removed a good feature from GMail simply because some people want to use DRM?! Thats just sad.

    » dadia vasia on October 7th, 2006 at 21:42

  49. Use this to remove DRM, it’s free and easy, select decrypt from the menu, select a source file a destination file and click execute —&> done

    » Itext on November 25th, 2006 at 00:06

  50. on Linux, ps2ascii works for simple text extraction

    » Jon on January 2nd, 2007 at 22:23

  51. just pass the PDF threw PDFBlender [uses Ghostscript]… then all the protection will be removed…

    » Anonymous on February 11th, 2007 at 23:40

  52. I just tried it with gmail, and it seems to be working there again.

    » Anonymous on February 14th, 2007 at 08:52

  53. PDF Password Remover kicks ass! No need for the G-Mail trick.

    » j-dawg on March 4th, 2007 at 13:20

  54. I downloaded a book from ebookmall.com and couldn’t get any of the mentioned programs to remove the DRM restrictions. But, I did manage to find a way. I used the method from this site: http://www.cs.cmu.edu/~dst/Adobe/Gallery/amazon-remedy.txt

    The only thing I had to make sure of was that before I opened the modified file, I already had the original file loaded in Acrobat. Otherwise it would give me a security error.

    » Lane on March 25th, 2007 at 17:18

  55. I use a large LCD screen, do a screen capture, batch process the captured images with a photoshop script to decrease the canvas size and then churn all of the images through OCR. Any 19″ LCD with pivot can do one page with 100% 1:1 size. All you need is patience and about an hour to convert a large book into images for OCR.

    Even better, you can import raw images into PDF format with Acrobat Professional and use the Adobe OCR package.

    As I once made pocket money doingscanned conversions of printed material to PDF / Word I know this method will work.

    » Nerdy dude on April 22nd, 2007 at 14:14

  56. [...] a year ago, I wrote about how Gmail’s “View as HTML” functionality allowed you to get around secure [...]

    » chosaq » Circumvent PDF DRM… with Scribd! on April 24th, 2007 at 01:52

  57. I downloaded a file protected with DRM, none of the solutions explained work. Do you have other ideas ?
    (I guess not, but maybe in this wonderful world one would come up with something wonderful)

    » drm hater on July 25th, 2007 at 02:17

  58. Someone attached a PDF to a note he sent my Gmail account. I wish to attach that PDF to a note I’ll send from my Gmail account. Is there an easy way to do this? (Easier, that is, than downloading the PDF to my office PC, composing a note in Word, attaching the PDF, then emailing the Word file through Gmail?

    » feld on August 13th, 2007 at 10:52

  59. There are many ways to crack Adobe DRM – print to a file driver and then straight back into PDF.

    If printing is not allowed use a screengrabber.

    And lastly since you can share your Adobe login credentials with anyone what actually is it protecting?

    So apart from converting back to PDF, screen grabbing and sharing content, what does it prevent?

    » Graham on April 12th, 2008 at 01:25

  60. Easy. Download pdffactory. Print to pdffactory. When the print preview comes up, save as pdf. Done.

    Blow me, Adobe.

    » PO'd Former Adobe Customer on May 21st, 2008 at 11:26

  61. Wow, #60 commenter’s tip worked! You just have to write pdffactory crack on Google, to find one. Download, install, follow what s/he said, and that’s it.

    Worked like a charm. THANK YOU!!

    » Fem on May 27th, 2008 at 08:18

  62. You can try this simple online decoder to unlock excel and pdf files ONLINE:

    Visit : http://www.megaleecher.net/Unlock_PDF

    » Techie on June 20th, 2008 at 18:18

  63. none of them working…..

    » Anonymous on August 5th, 2008 at 16:02

  64. Files that are locked for printing and copying of text are a problem. You can’t even do a screen print. None of the PDF unprotect programs that I checked can handle DRM.

    » Hippo on October 23rd, 2008 at 05:59

  65. There is an Adobe ADEPT-DRM removal method – you must be the licensee for the document – works for EPUB and PDF currently – you must install Python 2.6.1 and a couple of Python extensions then run the Pythons programs to download the key then another Python program to remove DRM for your appropriate document.
    See the discussion thread here :
    http://mybebook.com/forum/viewtopic.php?f=4&t=657&p=3553#p3549

    » Anonymous on March 16th, 2009 at 00:08