NodeJS wrapper for gs
var gs = require('gs');
gs(inputFile)
.batch()
.nopause()
.output(outputFile)
.exec(function(err, data) {
console.log(data.toString());
});include- set path togs_init.psfile (portable Ghostscript)batchnopausedevice- device - defaults totxtwriteoutput- file - defaults to-which represents stdoutinput- fileexec- callback
data (text)page (currentPage)pages (firstPage, lastPage)
gs(inputFile)
.output(outputFile)
.on('page', function(page) { console.debug('processing page:', page); })
.exec(function(err, data) {
console.log(data.toString());
});