New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pdftoimage

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdftoimage

Convert pdf to an image (pdftocairo)

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

pdftoimage

npm module for converting a pdf file to an image (png, jpeg, tiff, svg) using pdftocairo from Poppler.

Installation

npm install pdftoimage

Usage

var pdftoimage = require('pdftoimage');
var file = 'sample.pdf';

// Returns a Promise
pdftoimage(file, {
  format: 'png',  // png, jpeg, tiff or svg, defaults to png
  prefix: 'img',  // prefix for each image except svg, defaults to input filename
  outdir: 'out'   // path to output directory, defaults to current directory
})
.then(function(){
  console.log('Conversion done');
})
.catch(function(err){
  console.log(err);
});

Test

Make sure mocha is installed, then run

npm test

License

MIT

Keywords

pdf

FAQs

Package last updated on 23 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts