title: Display PDF Content in an Aurelia View
body: <p>I have some PDF files that I need to display in an Aurelia View.
  The files are not available by direct link
  I have an API function that returns a byte array.</p>
  
  <p>In ASP.Net, I have some control over the response object's headers and content type, and can BinaryWrite the contents into the response.</p>
  
  <p>I can't figure out how to do this in Aurelia.
  Any suggestions?</p>
  
  <p>Edit: 
  I'm attempting to use pdf.js as suggested. Injection in Aurelia fails.</p>
  
  <pre><code>import {inject} from "aurelia-framework";
  import {HttpClient} from "aurelia-fetch-client";
  import {PDF} from "pdfjs-dist"
  
  @inject(Router, HttpClient, PDF)
  export class PDFView {
  
      constructor(router, http, pdf) {
  
          this.router = router;
          this.http = http;
          this.pdf = pdf;
  
      }
  </code></pre>
  
  <p>The console displays this error:</p>
  
  <pre><code>Inner Error:
  Message: key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?
  Inner Error Stack:
  Error: key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?
      at Container.get (http://localhost:65397/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.2.3/aurelia-dependency-injection.js:480:15)
      at Object.invoke (http://localhost:65397/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.2.3/aurelia-dependency-injection.js:341:81)
      at InvocationHandler.invoke (http://localhost:65397/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.2.3/aurelia-dependency-injection.js:300:168)
      at Container.invoke (http://localhost:65397/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.2.3/aurelia-dependency-injection.js:564:25)
      at StrategyResolver.get (http://localhost:65397/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.2.3/aurelia-dependency-injection.js:127:37)
      at Container.get (http://localhost:65397/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.2.3/aurelia-dependency-injection.js:501:23)
      at eval (http://localhost:65397/jspm_packages/npm/aurelia-templating@1.0.0-beta.1.2.7/aurelia-templating.js:3925:73)
  End Inner Error Stack
  ------------------------------------------------
  </code></pre>
  
  <p>The import statement must be failing, yet pdfjs appears to load successfully as I receive status 200 for both pdfjs-dist@1.5.294.js and pdfjs when the page loads.</p>
  
  <p>I can find no samples of Aurelia / pdfjs apps. 
  Repeating: I need to embed the stream as the PDF is not available via HTTP.</p>
  
  <p>I'm not sure where to go from here</p>