Open zer09 opened 6 years ago
I suspect the space in your path (gust_7) might be causing a problem, as this is a common problem for files not being "found" when trying to open them. Perhaps you could try wrapping your path string (C:\Users\gust 7\AppData\Local\Programs\ex\resources\app.asar\node_modules\html-pdf\lib\scripts\pdf_a4_portrait.js) in double quotes, or remove the space?
I tried to create new user without spaces on the name, but I still got the same error.
I am having the same Issue.
Trying to integrate it with pkg. Any news?
Error: html-pdf: Received the exit code '4294967295'
Can't open 'C:\snapshot\user_log\node_modules\html-pdf\lib\scripts\pdf_a4_portrait.js'
at ChildProcess.respond (C:\snapshot\user_log\node_modules\html-pdf\lib\pdf.js:121:31)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
I have the exact same problem as you, @Jucesr using pkg. Did you find a way to solve this?
Hey @Karzeus
I was able to fix it by including the complete path to the file in the option object.
const pdf_options = {
format: 'Letter',
header: {
height: "20mm"
},
footer: {
height: "15mm"
},
script: path.join(pathToFile, 'pdf_a4_portrait.js')
}
Hi First try to unpack the html-pdf module like "electron-packager . test--overwrite --asar.unpackDir=node_modules/html-pdf " and use the method provided by @Karzeus but change the script path to "path.join(__dirname,'node_modules/html-pdf/lib/scripts/pdf_a4_portrait.js').replace('app.asar\src', 'app.asar.unpacked');",that should work goodluck.
Hello good day,
I am unable to create pdf files if I will enable the asar on the electron-builder.
When tried to execute it I am getting this error.
I will greatly appreciate, any advice will come.
thanks.