react-native-pdf-thumbnail
A react native module for generating thumbnail for PDF files.
A wrapper for:
- PDFKit on iOS (requires iOS 11+)
- PdfRenderer on Android (requires API level 21 - LOLLIPOP)
No other JavaScript or native dependencies needed.
Installation
npm install react-native-pdf-thumbnail
Usage
import PdfThumbnail from "react-native-pdf-thumbnail";
const { uri, width, height } = await PdfThumbnail.generate(fileUri, 0);
The example app contains a document picker, it generates thumbnail for the selected PDF file.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT