New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pdf2images-multiple

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf2images-multiple

Simple pdf to images converter in node way.

  • 1.0.16
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

#pdf2images-multiple

##Usage

var PDF2Images = require('pdf2images-multiple')

var convert_options = {
	'-trim': '',
	'-density' : 150,
	'-quality' : 100,
	'-sharpen' : '0x1.0'
}

var pdf2images = PDF2Images('./foodir/foo.pdf', {
	convert_options: convert_options, //optional
	output_dir: './media/', //optional
	ext: 'jpg', //optional, png is the default value
	gm: true //Use GraphicksMagic //optional, false is the default value
})

pdf2images.pdf.convert((err, image_path) => {
	//Do something when convert every single page.
}, (err, images_paths) => {
	//Do something when convert full pdf file.
})

//You can do it by chunks
var chunks = 4

//Converting 4 pages at the same time until do it with all pages.
pdf2images.pdf.convert_chunks((err, image_path) => {
	//Do something when convert every single page.
}, (err, images_paths) => {
	//Do something when convert full pdf file.
}, chunks)	

//Optionaly you can choose the pages to convert by page number
pdf2images.pdf.convert_pages([0,4,6,7], (err, image_path) => {
	//Do something when convert every single page.
}, (err, images_paths) => {
	//Do something when convert the pages from array.
})	

//You can convert a single page
pdf2images.pdf.convert_page(0, (err, image_path) => {
	//Do something when convert the page.
})	

##Warning

###This module require to install these packages: ######imagemagick, ghostscript, poppler-utils and GraphicsMagick ###On ubuntu or debian exec:

apt-get install -y imagemagick ghostscript poppler-utils GraphicsMagick

Keywords

FAQs

Package last updated on 14 Aug 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc