title: ps2pdf - Unable to open initial device
body: <p>I built a quite large PDF using LaTeX with the <code>lualatex</code> compiler (I need that one because of specific fonts) and now want to shrink the PDF with <code>ps2pdf</code>, following <a href="https://stackoverflow.com/questions/10450120/optimize-pdf-files-with-ghostscript-or-other/10453202#10453202">this</a> instruction (the answer with the second-most votes, since <code>gs</code> is not recognized as a command line tool on my computer). My command looks like this:</p>
  
  <pre><code>ps2pdf -dPDFSETTINGS=/ebook -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -q -sOutputFile=output.pdf input.pdf
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>MiKTeX GPL Ghostscript 9.25: Device 'pdfwrite' requires an output file but no file was specified.
  **** Unable to open the initial device, quitting.
  </code></pre>
  
  <p>I definitely made sure that the file exists, I tried it using as <code>*.ps</code> file as input, gave the full path, once with and without double-quotes (Windows system), yet nothing worked. Strangely enough, just running <code>ps2pdf ouput.pdf input.ps</code> works, but produces an even larger PDF. What am I missing?</p>