Skip to content

jethomps0n/PDF-Viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF-Viewer

Here is my implementation of a custom PDF viewer using the PDF.js library. I created this for my website (of which the files can be found here) to better seamlessly integrate this pdf viewer with the style of the rest of my site. I've linked two demo pages below to experience it in action.

PDF Viewer w/page styling
PDF Viewer ONLY

It's pretty simple, only containing the necessary elements of a PDF viewer:

  • A sidebar view with page thumbnails
  • Page forward/backward buttons
  • Page number input field
  • Zoom in/Zoom out buttons
  • Zoom seletion menu
  • Download PDF button
  • Print PDF button
  • An expand button (which opens a modal view with the same features)

Images

Default View

Default View

Default View: Sidebar open, 200% Zoom

Default View: Sidebar open, 200% Zoom

Modal View: Sidebar open, Page Width

Modal View: Sidebar open, Page Width


The Future

Below is a list of things I want to or plan to add at some point in the future:

  • Touch gestures (i.e. pinch to zoom, drag with two fingers, etc.)
  • Increase resolution of pdf pages on smaller screens
  • Selectable and searchable text

More

If you happen to find any redundant/unused code (which there very may well be) or feel there are ways to improve this, please, consider creating an Issue, or fork this project and create a Pull Request.

About

A web based PDF viewer built using the PDF.js library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published