@lmtri/react-pdf-viewer
v1.0.1
Published
A React component to view a PDF document, very easy to use. It's written in TypeScript, and powered by React hooks completely.
Downloads
619
Maintainers
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
- [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.