Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@lmtri/react-pdf-viewer

lmtri303MIT1.0.1TypeScript support: included

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

react pdf, reactjs, nextjs, ssr, react-pdf, pdf viewer, react pdf viewer, render pdf, lmtri

readme

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

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

Customization

  • <input checked="" disabled="" type="checkbox"> 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.