0

I have a PDF file opened in a web page using PDFJS. now, I want to add JS event handlers,e.g. click, mouse hover etc, to all the text elements in the PDF. Since PDFJS open pdf using html5, is it possible to identify all text elements and add events to them?

1
  • not 100%, but pretty sure that's impossible Commented Sep 24, 2014 at 14:55

1 Answer 1

1

Built-in PDF.js viewer uses TextLayerBuilder for text search. That class adds to html page transparent layer with text elements. You can use it, for adding events for text. This page describes how to use TextLayerBuilder class.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.