title: Display first page of PDF as Image
body: <p>I am creating web application where I am displaying images/ pdf in thumbnail format. Onclicking respective image/ pdf it get open in new window.</p>
  
  <p>For PDF, I have (this is code of the new window)</p>
  
  <pre><code>&lt;iframe src="images/testes.pdf" width="800" height="200" /&gt;
  </code></pre>
  
  <p>Using this I can see all PDF in web browser. However for thumbnail purpose, I want to display only first page of PDF as an Image.</p>
  
  <p>I tried </p>
  
  <pre><code> &lt;h:graphicImage value="images/testes.pdf" width="800" height="200" /&gt;
  </code></pre>
  
  <p>however it is not working. Any idea how to get this done?</p>
  
  <h2>Update 1</h2>
  
  <p>I am providing path of pdf file for example purpose. However I have images in Database. In actual I have code as below.</p>
  
  <pre><code>&lt;iframe src="#{PersonalInformationDataBean.myAttachmentString}" width="800" height="200" /&gt;
  </code></pre>
  
  <h2>Update 2</h2>
  
  <p>For sake of thumbnail, what I am using is </p>
  
  <pre><code> &lt;h:graphicImage height=200 width=200 value="...."&gt; 
  </code></pre>
  
  <p>however I need to achieve same for PDF also.</p>
  
  <p>Hope I am clear what I am expecting...</p>