title: Ghostscript (PDF to JPG convert) set only height
body: <p>I tried today convert pdf to jpg with ghostscript. I want as result jpg image with 500 pixels height. So width depends on orginal pdf page width. I call script from terminal with:</p>
  
  <pre><code>gs -dNOPAUSE -dBATCH -sDEVICE=jpeg -dDEVICEHEIGHT=500 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=/home/user/output/%d.jpg /home/user/input.pdf -c quit
  </code></pre>
  
  <p>but, i get jpg image with height of 842 pixels. Size of input pdf page: 6.73 × 9.49 inch</p>
  
  <p>How can I set only height for image? Thanks</p>