Skip to content

karpad2/pdf-thumbnails-generator

 
 

Repository files navigation

  • es6 module
  • generates individual page thumbnails for provided pdf file
  • base64 image
  • returns a promise based function

📦 Getting Started

npm install pdf-thumbnails-generator

🚦 Arguments

Option Type Description
pdf_source String PDF file source
thumbnail_size Integer Desired width of pdf thumbnail eg:- 150

📦 Usage

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);
    }
}

🚀 Example

Click Here

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 56.2%
  • CSS 26.4%
  • HTML 17.4%