2

我正在寻找一种解决方案,我可以使用 java-script 来旋转现有的 PDF。我尝试了很多东西,但找不到任何东西。我不确定 PDF.JS 或 jsPDF.js 是否可以帮助我,我试图弄清楚但不是很成功。但是用 Java 做同样的事情很快。但这对我不起作用,因为那时我无法使用 java 脚本调用带有参数的 .class 文件或 .Bat 文件。任何人都可以提出一些解决方案吗?

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);
});
4

0 回答 0