Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 524 Bytes

File metadata and controls

31 lines (20 loc) · 524 Bytes

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);
});