diff --git a/node/utils/Abiword.js b/node/utils/Abiword.js index ff70eb4fc..344c23f27 100644 --- a/node/utils/Abiword.js +++ b/node/utils/Abiword.js @@ -89,8 +89,6 @@ else throw "Abiword died with exit code " + code; }); - //delegate the processing of stdout to a other function - abiword.stdout.on('data',onAbiwordStdout); var stdoutCallback = null; var stdoutBuffer = ""; @@ -122,6 +120,9 @@ else } }; + //delegate the processing of stdout to a other function + abiword.stdout.on('data',onAbiwordStdout); + doConvertTask = function(task, callback) { abiword.stdin.write("convert " + task.srcFile + " " + task.destFile + " " + task.type + "\n");