title: html2canvas to render document PDF with css styling using angular2/typescript
body: <p>How to generate an output file PDF using html2canvas with angular2</p>
  
  <p>I tried to import the file html2canvas typescript and made a declaration like this to use it</p>
  
  <pre><code>declare let html2canvas: Html2CanvasStatic;
  </code></pre>
  
  <p>but I get html2canvas is not defined </p>
  
  <pre><code>html2canvas(document.body, {
    onrendered: function(canvas) {
      document.body.appendChild(canvas);
    }
  });
  </code></pre>
  
  <p>I found this file typescript on github <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/html2canvas/html2canvas.d.ts" rel="noreferrer">html2canvas typescript</a></p>
  
  <p>how can use this for my application angular2</p>