This project is an Instant PDF Reader ππ€ web app using HTML, CSS, and JavaScript. It enables users to upload PDFs and view them instantly in the browser, featuring dynamic rendering and responsive scaling for a seamless reading experience.
For live demo πClick to visit website β‘οΈ
https://akshayadeveloper.github.io/Instant-PDF-Reader/index.html
For video
Mobile π± Version Demo
Desktop π₯οΈ Version Demo
This is an Instant PDF Reader web application built using HTML, CSS, and JavaScript. It allows users to upload PDF files and view them instantly within the browser.
- Viewing PDF files instantly within the browser without the need for additional software.
- Providing a user-friendly interface for reading PDF documents.
- Upload PDF files using a file input element.
- Dynamically render PDF pages onto the canvas element.
- Adjust the scale of the PDF pages based on the viewport size.
- Support for handling window resize events to update the scale accordingly.
- pdf.js: Used to render PDF documents in the browser.
- HTML, CSS: For the structure and styling of the web application.
- JavaScript: For handling user interactions and dynamically rendering PDF pages.
renderPDF(data)
: Renders the PDF document onto the canvas element.calculateScale(page)
: Calculates the appropriate scale for rendering based on the viewport size.- Event listeners to handle file upload and window resize events.
- Dynamically adjusts the scale of PDF pages to fit the viewport size, providing a responsive viewing experience.
- Utilizes canvas element for rendering PDF pages, enabling smooth and efficient viewing directly within the browser.
- Users: Individuals who need to quickly view PDF documents without installing additional software.
- Developers: Developers can customize and extend the functionality of this PDF reader for specific use cases or integrate it into larger applications.
- Provides convenience by eliminating the need for external PDF viewers.
- Offers a lightweight and efficient solution for viewing PDF documents online.
- Enhances accessibility by allowing users to view PDFs on various devices without compatibility issues.