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.
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.
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.
- Click the comment bubble icon in the top right.
- Click the "Sign in" link.
- Sign in or click the "Create an account" tab.
- Annotate!
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).