JSPM

react-perfect-pdf-viewer

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q27195F
  • License MIT

A lightweight React component for viewing PDFs with smooth zoom in/out and navigation.

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