PDF for image on Node JS

Does anyone know any good libraries for NodeJS or even an API for creating images from PDF pages?

+5
source share
1 answer

I think the solution should use an external program like ghostscript to create your jpg.

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
    }
});
+2
source

All Articles