title: How to use with Base64string PDF data
body: <p>I have base64 string of the pdf file(<strong>Gmail PDF attachments</strong>), i am getting the base64 encoded from the server directly,now i need to convert this base64 to image to display the pdf in next tab of the browser. </p>
  
  <p>I'm using the below code,
    var pdfAsDataUri = "data:image/png;base64,"+file;
  window.open(pdfAsDataUri);
  * the new tab is open and is not displaying the pdf</p>
  
  <ol>
  <li>Can you sugest me, how to convert pdf base64 encoded string to image[i'm getting base64 encoded string directly from server]</li>
  </ol>
  
  <p><strong>Note:</strong> Please find the below image, if i click on that green marked icon, the pdf should open in new tab.<a href="https://i.stack.imgur.com/yFqvS.png" rel="nofollow noreferrer">enter image description here</a></p>