i am using prince for some time.
i use nodejs
prince stopped working ad i didnt made any changes.
this is my code:
const Prince = require("prince")
const util = require("util")
const timeStamp = +new Date();
Prince()
.inputs("1679928942030.html")
.output(`${timeStamp}.pdf`)
.execute()
.then(function () {
console.log("OK: done")
}, function (error) {
console.log("ERROR: ", util.inspect(error))
})
this is the error:
{
error: Error: Command failed: C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine\bin\prince.exe --prefix C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine 679928942030.html --output 1679932182683.pdf
prince: 679928942030.html: error: can't open input file: No such file or directory
prince: 679928942030.html: error: could not load input file
prince: error: failed to load all input documents
at ChildProcess.exithandler (child_process.js:390:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
killed: false,
signal: null,
cmd: 'C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine\\bin\\prince.exe --prefix C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine 679928942030.html --output 1679932182683.pdf'
},
stdout: <Buffer >,
stderr: <Buffer 70 72 69 6e 63 65 3a 20 36 37 39 39 32 38 39 34 32 30 33 30 2e 68 74 6d 6c 3a 20 65 72 72 6f 72 3a 20 63 61
6e 27 74 20 6f 70 65 6e 20 69 6e 70 75 74 ... 146 more bytes>
}
PS C:\Projects\pbd\html2pdf31.11.22> node server-new.js
ERROR: {
error: Error: Command failed: C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine\bin\prince.exe --prefix C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine 1679928942030.html --output 1679932201481.pdf
at ChildProcess.exithandler (child_process.js:390:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
killed: true,
code: null,
signal: 'SIGTERM',
cmd: 'C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine\\bin\\prince.exe --prefix C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine 1679928942030.html --output 1679932201481.pdf'
},
stdout: <Buffer >,
stderr: <Buffer >
}
i use nodejs
prince stopped working ad i didnt made any changes.
this is my code:
const Prince = require("prince")
const util = require("util")
const timeStamp = +new Date();
Prince()
.inputs("1679928942030.html")
.output(`${timeStamp}.pdf`)
.execute()
.then(function () {
console.log("OK: done")
}, function (error) {
console.log("ERROR: ", util.inspect(error))
})
this is the error:
{
error: Error: Command failed: C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine\bin\prince.exe --prefix C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine 679928942030.html --output 1679932182683.pdf
prince: 679928942030.html: error: can't open input file: No such file or directory
prince: 679928942030.html: error: could not load input file
prince: error: failed to load all input documents
at ChildProcess.exithandler (child_process.js:390:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
killed: false,
signal: null,
cmd: 'C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine\\bin\\prince.exe --prefix C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine 679928942030.html --output 1679932182683.pdf'
},
stdout: <Buffer >,
stderr: <Buffer 70 72 69 6e 63 65 3a 20 36 37 39 39 32 38 39 34 32 30 33 30 2e 68 74 6d 6c 3a 20 65 72 72 6f 72 3a 20 63 61
6e 27 74 20 6f 70 65 6e 20 69 6e 70 75 74 ... 146 more bytes>
}
PS C:\Projects\pbd\html2pdf31.11.22> node server-new.js
ERROR: {
error: Error: Command failed: C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine\bin\prince.exe --prefix C:\Projects\pbd\html2pdf31.11.22\node_modules\prince\prince\program files\Prince\Engine 1679928942030.html --output 1679932201481.pdf
at ChildProcess.exithandler (child_process.js:390:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
killed: true,
code: null,
signal: 'SIGTERM',
cmd: 'C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine\\bin\\prince.exe --prefix C:\\Projects\\pbd\\html2pdf31.11.22\\node_modules\\prince\\prince\\program files\\Prince\\Engine 1679928942030.html --output 1679932201481.pdf'
},
stdout: <Buffer >,
stderr: <Buffer >
}