0.1.6 • Published 11 years ago

download-pdf v0.1.6

Weekly downloads
198
License
ISC
Repository
-
Last release
11 years ago

download-pdf

Install

npm install download-pdf --save

Usage

var download = require('download-pdf')

var pdf = "http://apps.who.int/iris/bitstream/10665/137592/1/roadmapsitrep_7Nov2014_eng.pdf"

var options = {
	directory: "./pdfs/ebola/",
	filename: "2014-11-7.pdf"
}

download(pdf, options, function(err){
	if (err) throw err
	console.log("meow")
}) 

API

download(url, options, callback(err))

  • url string of the file URL to download

  • options object with options

    • directory string with path to directory where to save files (default: current working directory)
    • filename string for the name of the file to be saved as (default: filename in the url)
    • timeout integer of how long in ms to wait while downloading (default: 20000)
  • callback function to run after

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago