title: How to get the 1st page of doc (ms word) file as jpg image using imagemagick?
body: <p>I'm using imagemagick for getting the 1st page of pdf files as jpg image:</p>
  
  <p><code>exec("convert pdffile.pdf[0] output.jpg");</code> </p>
  
  <p>Is it possible to get the 1st page of doc/docx file in the same way? When i tried to convert it I got the following error message:</p>
  
  <p><em>"no decode delegate for this image format"</em></p>
  
  <p>On research I found that imagemagick cannot read doc/docx files.</p>
  
  <p>So what's the best method for extracting the first page of doc/docx files as jpg images in <strong>php</strong> ? 
  If possible, I'd like to convert different file formats using the same code.</p>