How can I get selected text in pdf in Javascript?

后端 未结 2 461
甜味超标
甜味超标 2020-12-12 00:32

I\'m writing a Chrome Extention to manipulate pdf file so I want to get selected text in the pdf. How can I do that.

Some thing like that:

2条回答
  •  星月不相逢
    2020-12-12 00:46

    There is no one generic solution for all pdf extensions. Every extention has is own API. If you work with google-chrome extension i belive it's impossible.

    How to get the selected text from an embedded pdf in a web page?

    https://html.developreference.com/article/23259983/How+extension+get+the+text+selected+in+chrome+pdf+viewer%EF%BC%9F

提交回复
热议问题