I am looking for a solution where i can use java-script to rotate an existing PDF. I tried many things but could not find anything. i am not sure if PDF.JS or jsPDF.js can help me, i tried to figure out but was not very successful. But doing the same thing with Java was quick. But this will not work for me because then i cannot call .class file or .Bat file with parameter using java-script. Can anyone suggest some solution?
var execFile = require('child_process').execFile,
child;
child = execFile('C:\\WorkLog\\Software\\run.bat',
//child = execFile('C:\\PDFRotation\\Run.bat',
function(error, stdout, stderr) {
if (error) {
console.log(error.stack);
console.log('Error code: ' + error.code);
console.log('Signal received: ' + error.signal);
}
console.log('Child Process stdout: ' + stdout);
console.log('Child Process stderr: ' + stderr);
});
child.on('exit', function(code) {
console.log('Child process exited ' + 'with exit code ' + code);
});