PDF.js Angular Viewer: A Complete Guide
This project demonstrates how to integrate PDF.js into an Angular application for rendering, navigating, and zooming PDF files. The setup includes creating an Angular component to load and display PDFs, along with features like page navigation and zoom functionality.
- Render PDF documents using PDF.js.
- Navigate between pages (previous/next).
- Zoom in and out on the PDF content.
- Configurable worker file for improved performance.
You can read about the example project in our blog post.
npm install # install dependencies
ng serve # start dev server
Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Please ensure you have signed our CLA so that we can accept your contributions.