title: How to convert PDF to Image in ReactJS
body: <p>I am developing a course platform using ReactJS. When the user finishes a course he can download the PDF file.</p>
  
  <p>I need a version of the same file as an image (png or jpg), but I haven't found any way to do that. Can someone help me?</p>
  
  <p>To generate the PDF certificate I'm using the lib: <a href="https://react-pdf.org/" rel="noreferrer">React-PDF</a>.</p>
  
  <p>This is my code to generate pdf file: </p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;PDFDownloadLink
    document={
      &lt;Certificate course={course} name={name} date={today()} /&gt;
    }
    fileName="somename.pdf"
    &gt;
      {({ blob, url, loading, error }) =&gt; {
        return loading ? 'Loading document...' : 'Download now!';
      }}
  &lt;/PDFDownloadLink&gt;
  </code></pre>