title: How to convert pptx files to jpg or png (for each slide) on linux?
body: <p>I want to convert a powerpoint presentation to multiple images. I already installed LibreOffice on my server and converting docx to pdf is no problem. pptx to pdf conversion does not work. I used following command line:</p>
  
  <pre><code>libreoffice --headless --convert-to pdf filename.pptx
  </code></pre>
  
  <p>Is there es way to convert pptx to pngs immediately or do I have to convert it to pdf first and then use ghostscript or something?</p>
  
  <p>And what about the quality settings? Is there a way to choose the resolution of the resulting images?</p>
  
  <p>Thanks in advance! </p>
  
  <p><strong>EDIT:</strong>
  According to <a href="https://superuser.com/questions/388350/convert-ppt-to-jpg">this link</a> I was able to convert a pdf to images with the simple command line: </p>
  
  <pre><code>convert &lt;filename&gt;.pdf &lt;filename&gt;.jpg 
  </code></pre>
  
  <p>(I guess you need LibreOffice and ImageMagick for it but not sure about it - worked on my server)</p>
  
  <p>But there are still the problems with the pptx-to-pdf convert. </p>
  
  <p>Thanks to googling and Sebastian Heyn's help I was able to create some high quality images with this line:</p>
  
  <pre><code>convert -density 400 my_filename.pdf -resize 2000x1500 my_filename%d.jpg
  </code></pre>
  
  <p>Please be patient after using it - you still can type soemthing into the unix console but it's processing. Just wait a few minutes and the jpg files will be created.</p>
  
  <p>For further information about the options check out this <a href="http://www.imagemagick.org/script/convert.php" rel="noreferrer">link</a></p>
  
  <p>P.S.: The aspect ratio of a pptx file doesn't seem to be exactly 4:3 because the resulting image size is 1950x1500</p>