title: How to convert specific no. of pages from a .pdf file to .png image using imagemagick
body: <p>i am using Imagemagick for converting my .pdf file to .png images </p>
  
  <p>but when i issue the command </p>
  
  <p>$convert sample.pdf image.png</p>
  
  <p>then it will convert all the pages of sample.pdf file to .png images but exactly i want to </p>
  
  <p>convert a specific no. of pages(e.g. first 10 pages or page no.22 or 12 etc.)</p>
  
  <p>then pleases suggest me a way to solve this issue.</p>
  
  <p><strong>and one more question is that:</strong></p>
  
  <p>when we view our .pdf files in google docs .pdf viewer then they are also in image format </p>
  
  <p>but we can select and copy the text written on pages to the clipboard(simply select the text and press </p>
  
  <p>Ctrl+c)</p>
  
  <p>so  how can i implement this so the users of my website can select the text form my images.</p>
  
  <p>(there are already some discussion about it on <a href="https://stackoverflow.com/questions/297743/any-way-to-build-google-docs-like-viewer-for-pdf-files">stackoverflow</a> but they are not very clear)</p>