title: Ghostscript not creating output PDF file
body: <p>I'm having trouble writing an output PDF file with Ghostscript. It is run in a batch script. When not running in batch mode (without <code>-o</code> or <code>-dBATCH</code>), the result pages are shown in the output window.</p>
  
  <p>However, there is no way I can get Ghostscript to write the result to a PDF output file.</p>
  
  <p>Here's the line calling gs:</p>
  
  <pre><code>gs -o out.pdf 
     -sDevice=pdfwrite
     -dColorImageResolution=30 
     -dGrayImageResolution=30
     -dMonoImageResolution=30
     -dCompressFonts=true
     test.pdf
  </code></pre>
  
  <p>The file is there:</p>
  
  <pre><code>user:~/test&gt; ll
  -rw-r--r-- 1 user users 212033 22. Jan 15:27 test.pdf
  </code></pre>
  
  <p>In GhostView's output, there is nothing helpful:</p>
  
  <pre><code>Processing pages 1 through 577.
  Page 1
  Loading ... font from ... done.
  Page 2
  Page 3
  Page ...
  </code></pre>
  
  <p>If anyone could point me to what I forget in order for Ghostscript to actually write the result to the specified file, that would very helpful.</p>