title: How can jsPDF be used to create pdf of output, 'exactly' as window.print() command gives out?
body: <p>How can jsPDF be used to create pdf of output, 'exactly' as window.print() command gives out?</p>
  
  <p>I have to create a pdf of 'div' element which I tried using jsPDF. But the output I get has lot of extra bullets and messed up numbering. But what I see on screen is well formatted 'div' which I am able to print exactly as it is by usng window.print().</p>
  
  <p>My only complain is that I want another option of saving this output in pdf for users who will not be able to change the option in print to 'save to pdf'.</p>
  
  <pre><code>    var pdf = new jsPDF('p', 'pt', 'letter');
      var source = $('#content')[0]; //content has the survey with lot of linked list elements and various formatted text
      //I tried all kind of formatting on 'source' to make it right... but its not possible to keep the form as it is what it looks on screen
      margins = {
          top: 80,
          bottom: 60,
          left: 40,
          width: 522
      };
      pdf.fromHTML(
              source, // HTML string or DOM elem ref.
              margins.left, // x coord
              margins.top, {// y coord
                  'width': margins.width, // max width of content on PDF
                  //'elementHandlers': specialElementHandlers
              },
      function (dispose) {
          // dispose: object with X, Y of the last line add to the PDF 
          //          this allow the insertion of new lines after html
          pdf.save('Disclosure' + '@DateTime.Now' + '.pdf');
      }
      , margins);
  </code></pre>
  
  <p>So, is there a way to save the output in PDF as it looks after window.print()?</p>