Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

download-pdf

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

download-pdf

Download PDF files

  • 0.1.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 12 Nov 2014

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