Package Exports
- react-perfect-pdf-viewer
Readme
📄 React Perfect PDF Viewer
A lightweight and customizable React component for viewing PDFs with smooth zoom and navigation controls.
🚀 Installation
npm install react-perfect-pdf-viewer
📦 Usage
import React from "react"; import PdfViewer from "react-perfect-pdf-viewer";
function App() {
return (
<div style={{ width: "100%", height: "100vh" }}>
export default App;
Prop | Type | Default | Description |
---|---|---|---|
file |
string |
null |
Path or URL of the PDF file. |
scale |
number |
1.0 |
Initial zoom level. |
onLoad |
func |
null |
Callback when the PDF loads. |
onError |
func |
null |
Callback if PDF fails to load. |
✨ Features
✅ Smooth zoom in/out
✅ Page navigation (Next/Previous)
✅ Lightweight & fast
✅ Works with local and remote PDFs
📜 License
MIT © 2025 Muhammed Fazil P M