This is a fork of PDF.js with inline link previews for quickly exploring references and section/equation links. The preview feature is based on PDFRefPreview.
- Install Node.js 15.14.0 (v88, newest version that is supported by certain dependencies)
- Install nvm, then run
nvm install 15.14.0
- Install nvm, then run
- Clone repository:
git clone --recursive https://github.com/harskish/pdf.js.git
- Install glup:
npm install -g gulp-cli
- Install dependencies:
npm install --legacy-peer-deps
For more complete instructions, please refer to the upstream documentation.
gulp chromium
: places extension inbuild/chromium
- Open Chrome -> More Tools -> Extensions -> Developer Mode -> Load unpacked -> load folder
build/chromium
- TODO
gulp server
- Navigate to http:https://localhost:8888/web/viewer.html
- Specify file with: http:https://localhost:8888/web/viewer.html?file=../rebasin.pdf (relative to ./web)
It is also possible to view all test PDF files on the right side by opening: http:https://localhost:8888/test/pdfs/?frame
- Open PDF in viewer. Only PDFs with embedded liks will work.
- Press q to activate link preview functionality
- Hover over a link (to section, equation, reference etc.), a pop-up preview will show up.
- Align popup with bottom of link element to prevent flickering on downward mouse movement
- Slight ~500ms delay to popup
- Separately formatted previews for articles
- Showing journal/conference name, authors, year etc.
- Also add tests for parsing using real pdfs (or just strings)
- ML-based detection of links in PDF that are missing them?