/simple-pdf-viewer

Preview PDFs in the browser with eight different variations of color vision deficiency simulators.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Simple PDF Viewer

Preview PDFs in the browser with eight different variations of color vision deficiency.

Screenshot of app.

See it live at mariechatfield.com/simple-pdf-viewer.

Uses the PDF.js platform, created by Mozilla, to render the PDFs.

Uses the color blind SVG filters found in the colourblind bookmarklet created by Alastair Douglas.

Recommended Resources:

Contributing

This website consists of a single HTML page, and JavaScript and CSS files. It's hosted by the GitHub Pages built-in server.

If you want to run it locally, you'll need to host the index.html file with a local server in order to load the JavaScript. (For security, most browsers do not load JavaScript for a local file.)

My favorite way:

Assuming that you have node installed on your computer, with the npx command to run scripts, you don't need to install anything else. Use the http-server library to run a tiny Node.js server that automatically hosts the index.html file for you.

cd simple-pdf-viewer
npx http-server -o

This will open http://localhost:8080 or http://127.0.0.1:8080 for you, and return the main HTML page for this website with ability to load JavaScript and CSS.