I am using html-pdf in electron to generate pdf from a html.
It is worked when I tested by "npm run start". I can get pdf.
But when I package electron app to .dmg file by electron-builder,
I got "spawn ENOTDIR" error when call pdf.create()
var pdf = require('html-pdf');
var options = { format: 'Letter' };
//resultFilePath = /Users/myname/Documents/result.pdf
pdf.create(htmlContent, options).toFile(resultFilePath, function(err, res)
{
}
I have no idea now. Does anyone have the same problem?
Any help would be greatly appreciated.