Skip to content

Manou-coder/pdf-to-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@m-coder/pdftoimage

Convert PDF files πŸ“„ to images πŸ“· without requiring any software like ImageMagick πŸ”„.

Install

npm install @m-coder/pdftoimage

Example

const { convertPDFtoIMG } = require('@m-coder/pdftoimage')

const convert = async () => {
  try {
    await convertPDFtoIMG({
      pdfPath: 'my-pdf.pdf',
      imagePath: 'my-image', // or 'my-image.png'
      // scale: 2, optional - default value 1.5 (the larger the scale, the better the rendering quality.)
      // png: true, optional - default value true (if false will convert to Jpeg)
    })
    console.log('Conversion successful!')
  } catch (error) {
    console.error('Error during conversion:', error)
  }
}

convert()

About

Convert PDF files πŸ“„ to images πŸ“· without requiring any software like ImageMagick πŸ”„.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published