@lmtri/react-pdf-viewer
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

React PDF by lmtri

A React component to view a PDF document, very easy to use. It's written in TypeScript, and powered by React hooks completely.

// Import
import PdfViewer from "@lmtri/react-pdf-viewer"

import 'react-pdf/dist/Page/AnnotationLayer.css';
import 'react-pdf/dist/Page/TextLayer.css';

// Usage
<PdfViewer
    // src: string | Blob
    src={"https://pdfobject.com/pdf/sample.pdf"}
    fileName='sample.pdf'
/>

Features

Basic features

  • [x] Zooming: Support custom levels such as actual size, page fit, and page width
  • [x] Navigation between pages
  • [x] Can go to the first and last pages quickly
  • [x] View and navigate the table of contents
  • [x] Text selection
  • [x] Different scrolling modes
  • [x] Fullscreen supported
  • [x] Download file
  • [x] Support SSR
  • [x] Print
  • [x] Accessibility

Customization

  • [x] The toolbar can be customized easily

License

The MIT License.

☕︎ You can give me a cup of coffee here🤗.

About

This project is developed by Lieu Minh Tri.

Package Sidebar

Install

npm i @lmtri/react-pdf-viewer

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

165 kB

Total Files

45

Last publish

Collaborators

  • lmtri