This repository is an example of how to build a JavaScript PDF viewer with PDF.js. Check out the related blog post.
- Navigate to the directory you want to display the examples in.
cd pdfjs-display-example
# or
cd pdfjs-viewer-example
- Install the
serve
package:
npm install --global serve
- Serve the contents of the current directory:
serve -l 8080 .
- Navigate to http://localhost:8080 to view the website.
While running the Viewer example, navigate to http://localhost:8080/web/viewer?file=document.pdf to view the PDF.
Please ensure you have signed our CLA so that we can accept your contributions.