We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e8c02a commit 67e5021Copy full SHA for 67e5021
lib/pdf.js
@@ -45,6 +45,7 @@ function PDF (html, options) {
45
PDF.prototype.toBuffer = function PdfToBuffer (callback) {
46
this.exec(function execPdfToBuffer (err, res) {
47
if (err) return callback(err)
48
+ if (!res) return callback(new Error('html-pdf: PDF generation failed due to an unknown reason'))
49
fs.readFile(res.filename, function readCallback (err, buffer) {
50
51
fs.unlink(res.filename, function unlinkPdfFile (err) {
0 commit comments