title: Generate PDF from HTML using pdfMake in Angularjs
body: <p>I am trying to create a <code>PDF</code> from my HTML using <code>pdfMake</code> and <code>Angular</code> (I've also tried <code>jsPDF</code> and couldn't get it to work either).  I tried using the following code in my Angular controller:</p>
  
  <pre><code>var blob = new Blob([document.getElementById('exportable').innerHTML])
  var docDefinition = {
      content: [blob]
  }
  pdfMake.createPdf(docDefinition).open();
  </code></pre>
  
  <p>but I receive the following error: </p>
  
  <blockquote>
    <p>Unrecognized document structure: {"_margin":null}".</p>
  </blockquote>
  
  <p>My HTML consists of two simple tables in a div <code>exportable</code>.</p>
  
  <p>If anyone knows a solution to this issue, or another way to get the HTML into a PDF from Angular, PLEASE help.</p>
  
  <p>Any assistance is GREATLY appreciated!</p>