Giter VIP home page Giter VIP logo

pdf.js's Introduction

PDF.js for Science Papers

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.

Getting the Code and Dependencies

  • Install Node.js 15.14.0 (v88, newest version that is supported by certain dependencies)
    • Install nvm, then run nvm install 15.14.0
  • 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.

Building the Browser Extensions

Chrome

  • gulp chromium: places extension in build/chromium
  • Open Chrome -> More Tools -> Extensions -> Developer Mode -> Load unpacked -> load folder build/chromium

Firefox

  • TODO

Running server for local development

It is also possible to view all test PDF files on the right side by opening: http://localhost:8888/test/pdfs/?frame

Usage

  • 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.

TODO

  • Align popup with bottom of link element to prevent flickering on downward mouse movement
  • Slight ~500ms delay to popup

Potential future features

  • 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?

pdf.js's People

Contributors

snuffleupagus avatar timvandermeij avatar yurydelendik avatar brendandahl avatar calixteman avatar notmasteryet avatar vingtetun avatar andreasgal avatar arturadib avatar joneschrisg avatar jviereck avatar rob--w avatar kkujala avatar sayrer avatar saebekassebil avatar xavier114fch avatar nnethercote avatar fkaelberer avatar mduan avatar gigaherz avatar vyv03354 avatar justindarc avatar janpe2 avatar codingfabian avatar wojtekmaj avatar jbuck avatar dependabot[bot] avatar haebaru avatar mukulmishra18 avatar pramodhkp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.