Giter Club home page Giter Club logo

pdf.js-hypothes.is's Introduction

PDF.js + Hypothes.is on your site

Thanks to the kind folks in the Mozilla PDF.js project we've put together a simple PDF viewing (via PDF.js) and annotating (via Hypothes.is) web app.

Try it out!

Clone this repo, then...

cd pdf.js+hypothes.is
python -m SimpleHTTPServer
# if you're on a Mac, do...
open http://localhost:8000/web/viewer.html
# if you're not, open your browser to that URL

The sample PDF should render and Hypothes.is comment bubble icon should be visible in the top right corner.

Viewing Your Own PDF's

The viewer.html file supports a file query parameter, so requesting a different PDF hosted under this same domain, looks like this:

http://localhost:8000/web/viewer.html?file=%2Fyourpdf.pdf

%2F is the URL escaped form of /--so this assumes you have a yourpdf.pdf file hosted at http://localhost:8000/

Loading PDF's from other URL's will require the use of a CORS Proxy ...sadly.

Annotating

  1. Click the comment bubble icon in the top right.
  2. Click the "Sign in" link.
  3. Sign in or click the "Create an account" tab.
  4. Annotate!

License

PDF.js and the viewer bits (in build and web) are licensed under the Apache License 2.0.

Hypothes.is embed.js is currently loaded from the live web service, so there's no additional licensing needed (checkout the hypothesis/h project if you'd like to host your own (h is BSD licensed).

pdf.js-hypothes.is's People

Contributors

bigbluehat avatar

Stargazers

 avatar

Watchers

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