1.0.1 ⢠Published 2 years ago
@lmtri/react-pdf-viewer v1.0.1
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
 - 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.