1.0.1 ā€¢ Published 2 months ago

@lmtri/react-pdf-viewer v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

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

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

Customization

  • 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.