Wrapper for ghostscript in node.js.
npm install https://github.com/musubu/node-ghostscript/tarball/master
var gs = require('ghostscript');
gs()
.batch()
.quiet()
.nopause()
.device('jpeg')
.input('./test.pdf')
.output('./test-%d.jpg')
.r(144)
.jpegq(90)
.exec(function(err, stdout, stderr) {
if (!err) {
console.log(stdout);
} else {
console.log(err);
}
});
batch
device
exec
input
jpegq
nopause
output
r
quiet
To run test, do:
make test