PDFPY
sudo npm i pdfpy
var pdfpy = require ('pdfpy');
File
var pdfpy = require('pdfpy'); var data = { //the key as to be same as below input: "./test.html", output: "./output.pdf" } pdfpy.file(data, function(err, res) { if(err) throw err if(res) console.log("success") });
URL
var pdfpy = require('pdfpy'); var data = { //the key as to be same as below input: "http://google.com", output: "./output.pdf" } pdfpy.url(data, function(err, res) { if(err) throw err if(res) console.log("success") });
Keerthi niranjan
source share