title: Create PDF file through the batch file called by Web Application
body: <p>I have a web system using jboss seam. There is an functionality that invokes a batch file. The batch file creates a pdf file using org.w3c.tidy.Tidy.</p>
  
  <p>When I run the batch file by hand, it works very well, but, unfortunately, when I run it by the web application, the process does not work. It gets stuck at the moment to create the Document object (org.w3c.dom.Document doc = tidy.parseDOM(input, null);).</p>
  
  <p>I have tried out some ways to create this object, but nothing worked. </p>
  
  <p>Below the complete code to create the PDF:</p>
  
  <pre><code>Tidy tidy = new Tidy();
  tidy.setWraplen(Integer.MAX_VALUE);
  tidy.setXmlOut(true);
  tidy.setSmartIndent(true);
  
  //the process stops here
  org.w3c.dom.Document doc = tidy.parseDOM(input, null);
  
  ITextRenderer renderer = new ITextRenderer();
  renderer.setDocument(doc, null);
  renderer.layout();
  renderer.createPDF(out);
  renderer.finishPDF();
  </code></pre>
  
  <p>Below the code that invokes the batch by the web application.</p>
  
  <pre><code>Process p = Runtime.getRuntime().exec( C:\JOBS\MY_BATCH.BAT 26/10/2015 1 );
  </code></pre>
  
  <p>I'm using JBoss 5.1.</p>
  
  <p>Any idea? Did somebody go through this problem? Thanks in advance.</p>