Anyone know of any good libs for NodeJS or even an API to create images out of PDF pages?
I think the solution should use external program like ghostscript to build your jpg from.
var exec = require('child_process').exec;
exec('gs -dNOPAUSE -sDEVICE=jpeg -r144 -sOutputFile=p%03d.jpg file.pdf' , function(err) {
if (err) {
// something went wrong
} else {
// everything went good do something after the process is completed
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With