title: Pdf.js: rendering a pdf file using a base64 file source instead of url
body: <p>I'm trying to render a page from a pdf with pdf.js</p>
  
  <p>Normally, using a url, I can do this:</p>
  
  <pre><code>PDFJS.getDocument("http://www.server.com/file.pdf").then(function getPdfHelloWorld(pdf) {
    //
    // Fetch the first page
    //
    pdf.getPage(1).then(function getPageHelloWorld(page) {
      var scale = 1.5;
      var viewport = page.getViewport(scale);
  
      //
      // Prepare canvas using PDF page dimensions
      //
      var canvas = document.getElementById('the-canvas');
      var context = canvas.getContext('2d');
      canvas.height = viewport.height;
      canvas.width = viewport.width;
  
      //
      // Render PDF page into canvas context
      //
      page.render({canvasContext: context, viewport: viewport});
    });
  });
  </code></pre>
  
  <p>But in this case, I have the file in base64 rather than an url:</p>
  
  <pre><code>data:application/pdf;base64,JVBERi0xLjUKJdDUxdgKNSAwIG9iaiA8PAovTGVuZ3RoIDE2NjUgICAgICAKL0ZpbHRlciAvRmxhdGVEZWNvZGUKPj4Kc3RyZWFtCnjarVhLc9s2...
  </code></pre>
  
  <p>How this can be done?</p>