Pdf.js: Highlight Selected Text using PDFjs

Created on 16 Nov 2016  路  5Comments  路  Source: mozilla/pdf.js

I want to Highlight Selected text which is selected by mouse using PDFjs. please help me in solving this

Most helpful comment

Considering most PDF readers provide this feature, it would be quite a deal-breaker feature (for me) as a user. Is it impossible to implement within PDF.js?

All 5 comments

The text layer consists of div elements, each containing a word, sentence or character. Getting the selected text is not a trivial task because of this. If you know which div is selected, you can probably do something like http://stackoverflow.com/a/5379408 to get the selected text content. Closing as this is out of scope for the PDF.js project itself.

Considering most PDF readers provide this feature, it would be quite a deal-breaker feature (for me) as a user. Is it impossible to implement within PDF.js?

Who determined that it's out of scope. Seems entirely arbitrary.

@ParthBDesai Can you reopen this issue?

pdf-tools in emacs can deal with this https://github.com/politza/pdf-tools/issues/399. I would think pdf.js could also do this too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

azetutu picture azetutu  路  4Comments

patelsumit5192 picture patelsumit5192  路  3Comments

AlexP3 picture AlexP3  路  3Comments

anggikolo11 picture anggikolo11  路  3Comments

smit-modi picture smit-modi  路  3Comments