How to get selected text from PDF opened in Chrome Browser from an extension [closed] How to get selected text from PDF opened in Chrome Browser from an extension [closed] google-chrome google-chrome

How to get selected text from PDF opened in Chrome Browser from an extension [closed]


I just ran into this, but it wasn't an issue with Chrome. PDF files allow you to implement some password protected features, such as limiting the ability to copy and paste the content. You can see what these permissions are by opening the file in Adobe Acrobat Reader, and selecting file -> properties -> Security. (Chrome's PDF viewer is pretty bare-bones, so I don't know any way to view the permissions with Chrome). But Chrome does enforce the security placed on PDF files.

Fortunately, it is pretty easy to remove password protection from a PDF file. Googling it will provide some online resources that will do it. If you want to do it yourself, here is one option (probably only for advanced users): https://github.com/hhrutter/pdfcpu


  1. In Chrome, type chrome://plugins/ into the address bar.

  2. Look for the Adobe Reader entry in the plug-ins list.

  3. Tick the "Always Allowed" box for Adobe Reader.

  4. Possibly optional step: Click "Disable" for "Chrome PDF Viewer"

Using all four steps, You can now highlight and copy text from a PDF opened in Chrome, and paste it into another file or document. (I haven't tried copying images.)