I've developed a new MIT-licensed Node/JavaScript integration API for PrinceXML:
https://github.com/rse/node-prince
This is a Node API for executing the PrinceXML CLI prince(1) from within JavaScript. The essential point of this Node extension is not primarily to just abstract away the asynchronous CLI execution. Instead there are two other major points: First, this Node extension provides a fixed dependency, as other Node extensions which require PrinceXML can just depend (via their NPM package.json file) onto this extension. Second, as this Node extension can — across platforms — automatically download, locally unpack and use a PrinceXML distribution, there is no need for any previously available global PrinceXML installation. Just depend on this Node extension and PrinceXML is available!
Just run "npm install prince" and you can immediately use PrinceXML form within JavaScript:
I hope this Node extension will be found useful and makes the awesome PrinceXML available to another large community...
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
https://github.com/rse/node-prince
This is a Node API for executing the PrinceXML CLI prince(1) from within JavaScript. The essential point of this Node extension is not primarily to just abstract away the asynchronous CLI execution. Instead there are two other major points: First, this Node extension provides a fixed dependency, as other Node extensions which require PrinceXML can just depend (via their NPM package.json file) onto this extension. Second, as this Node extension can — across platforms — automatically download, locally unpack and use a PrinceXML distribution, there is no need for any previously available global PrinceXML installation. Just depend on this Node extension and PrinceXML is available!
Just run "npm install prince" and you can immediately use PrinceXML form within JavaScript:
var Prince = require("prince");
Prince()
.inputs("test.html")
.output("test.pdf")
.execute()
.then(function () {
console.log("OK: done");
}, function (error) {
console.log("ERROR: ", error);
})
I hope this Node extension will be found useful and makes the awesome PrinceXML available to another large community...
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Edited by rse