mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.18k stars 9.95k forks source link

Mimic "Google Scholar PDF Reader" features #17921

Open 7vq opened 5 months ago

7vq commented 5 months ago

Chrome has a new "Google Scholar PDF Reader" extension for academic articles. The extension allows clicking in-text citations to show, in a popup: the cited article's title, full author list, and article summary. That avoids losing your reading place every time you want to see what paper a citation corresponds to. It also avoids having to manually copy, paste, search, and find each citation online to read the abstract. The extension also automatically adds a linked table of contents for the current PDF, even for PDFs without a built-in linked table of contents.

To convey how much people like these features: the extension was only released a few months ago and already has 100k users.

Could these features be added to pdf.js? (It sounds to me like Firefox wouldn't allow these features to be implemented as a Firefox extension?)

sylvestre commented 5 months ago

FYI, this Google extension is based on pdf.js

JasonSome commented 4 months ago

Any update/news on this pending feature?

marco-c commented 4 months ago

No news, and we have other things with higher priorities in our roadmap at the moment.

7vq commented 3 months ago

@JasonSome This bookmarklet gives a popup preview for internal links like figures and citations. The only issue is I haven't found a way to automate manually clicking/calling the bookmarklet on every PDF load.


Maybe that repository's code could be integrated into pdf.js?

Snuffleupagus commented 3 months ago

This bookmarklet gives a popup preview for internal links like figures and citations. The only issue is I haven't found a way to automate manually clicking/calling the bookmarklet on every PDF load.

Maybe that repository's code could be integrated into pdf.js?

I don't think so, since that code can end up trigger rendering a lot when just moving the mouse around which may hurt overall performance in many cases. This is made worse by the fact that there's no attempt, as far as I can tell, to actually cancel (and clean-up) properly once the preview is no longer needed.

7vq commented 3 months ago

I don't think so, since that code can end up trigger rendering a lot when just moving the mouse around which may hurt overall performance in many cases. This is made worse by the fact that there's no attempt, as far as I can tell, to actually cancel (and clean-up) properly once the preview is no longer needed.

Ah, fair enough. (For what it's worth, I haven't noticed any issues myself in years of usage. But obviously other people will have different usages, plus I might just be overlooking issues.)

salomepoulain commented 2 months ago

Any updates?