- es6 module
- generates individual page thumbnails for provided pdf file
- base64 image
- returns a promise based function
npm install pdf-thumbnails-generator
Option | Type | Description |
---|---|---|
pdf_source |
String | PDF file source |
thumbnail_size |
Integer | Desired width of pdf thumbnail eg:- 150 |
import generatePdfThumbnails from 'pdf-thumbnails-generator';
async function generateThumbnails() {
try {
const thumbnails = await generatePdfThumbnails(pdf_source, thumbnail_size);
console.log(thumbnails);
} catch (err) {
console.error(err);
}
}