title: jsPDF - Exactly capture a html page to PDF
body: <p>I need a table to be printed as a pdf and not to dismiss the css tied to the table.  I am also using angularjs.  I am looking at different ways and I am experimenting with jsPDF.  </p>
  
  <p>On the main page (rollup.html), I have the link that should export the table as a pdf.</p>
  
  <pre><code>&lt;a style="float: right;"  href="genPDF()"&gt;PDF TEST&lt;/a&gt;  
  </code></pre>
  
  <p>In the js (rollup.js) within the controller, I have the genPDF function that should display whatever is included within the id #testDiv.</p>
  
  <pre><code>app.controller('Rollup', function($scope, $rootScope, $http, $uibModal, headersvc, locFiltersvc) {
  ....
  function genPDF(){
      html2canvas(document.getElementById("testDiv"), {
          onrendered: function (canvas) {
              var img = canvas.toDataURL("image/png");
              var doc = new jsPDF();
              doc.addImage(img, 'JPEG',20,20);
              doc.save('test.pdf');
          }
      });
  }
  });
  </code></pre>
  
  <p>Of course I assigned the testDiv to the div containing the table i want printed (which is located in route.html)</p>
  
  <pre><code>&lt;div class="content-div" style="overflow: visible;" id="testDiv"&gt;
  ....
  &lt;/div&gt;
  </code></pre>
  
  <p>I have another button that works for the remaining tabs using a ng-click and broadcasts data from other tables that were simplier with no css.  Not sure if I should try to print the table using a ng-click and broadcasting the table data but with all the css as well.  </p>
  
  <pre><code>        &lt;li style="float: right;"&gt;      
              &lt;button ng-click="printDiv('rollup-tab')"&gt;Printer Friendly&lt;/button&gt;
          &lt;/li&gt;
  </code></pre>
  
  <p>No errors were shown in the console for the jsPDF method, so not sure what the issue is. Any help is appreciated.  Thanks</p>