Library to generate thumbnails from given pdf
npm install pdf-thumbnails-generator- es6 module
- generates individual page thumbnails for provided pdf file
- base64 image
- returns a promise based function
`` text`
npm install pdf-thumbnails-generator
| Option | Type | Description |
|:-------------------------:|:-------:|:--------------------------------------------------------------------------:|
| pdf_source | String | PDF file source |thumbnail_size
| | Integer | Desired width of pdf thumbnail eg:- 150 |
` text
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);
}
}
``