Skip to content
A responsive implmentation of the pdf.js library
Java JavaScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
http-server
pdfpages
src
styles
.gitignore
README.md
Stopwatch.js
app.js
index.html
modernizr.custom.39418.js
package.json
pdf-server.js
style.css
test.html
test.pdf
test2.html
webpack.config.js

README.md

responsive-pdf-js

A responsive implementation of the pdf.js library

This is an example of how to implement a responsive version of the pdf.js framework into your own page.

This example uses the arrow keys to navigate the pdf. If you are on a touch device modernizr is used to check for available touch events and if present hooks them up as navigation.

I use debounce from lodash to make the resizing more friendly on the CPU.

The yellow box in the up right corner shows the interactions that is happening: right-, left-navigation and resizing.

The pdf used as an example is a printed PDF from this page: Eloquent JavaScript

You can’t perform that action at this time.