Skip to content

Down and dirty PDF rendering in Node.js with PhantomJS

Notifications You must be signed in to change notification settings

smithatlanta/NodePDF

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodePDF

Down and dirty PDF rendering in Node.js

Installation

npm install nodepdf

Dependencies

  1. PhantomJS

API

var NodePDF = require('nodepdf');

// last argument is optional, sets the width and height for the viewport to render the pdf from.
var pdf = new NodePDF('http://www.google.com', 'google.pdf', {width:1440, height:900, args:'--debug=true'});

pdf.on('error', function(msg){
	console.log(msg);
});

pdf.on('done', function(pathToFile){
	console.log(pathToFile);
});

About

Down and dirty PDF rendering in Node.js with PhantomJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%