title: Splitting a PDF with Ghostscript
body: <p>I try to split a multipage PDF with Ghostscript, and I found the same solution on more sites and even on <a href="http://ghostscript.com/doc/7.07/Use.htm#One_page_per_file">ghostscript.com</a>, namely:</p>
  
  <pre><code>gs -sDEVICE=pdfwrite -dSAFER -o outname.%d.pdf input.pdf
  </code></pre>
  
  <p>But it seems not working for me, because it produces one file, with
  all pages, and with the name <em>outname.1.pdf</em>.</p>
  
  <p>When I add the start and end pages, then it is working fine, but I
  want it to work without knowing those parameters.</p>
  
  <p>In the gs-devel archive, I found a solution for this:
  <a href="http://ghostscript.com/pipermail/gs-devel/2009-April/008310.html">http://ghostscript.com/pipermail/gs-devel/2009-April/008310.html</a> --
  but I feel like doing it without <code>pdf_info</code>.</p>
  
  <p>When I use a different device, for example <code>pswrite</code>, but same
  parameters, it works correctly, producing as many ps files, as my
  <em>input.pdf</em> contains.</p>
  
  <p>Is this normal when using <code>pdfwrite</code>? Am I doing something wrong?</p>