<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script>
  </head>

  <body>
    <h1>Hello Plunker!</h1>
    <div id="printDiv">
      <div style="color:red; font-size: 25px; font-weight:bold;float:left;">test 123</div>
       <div style="color:red; font-size: 25px; font-weight:bold">test 123</div> 
    </div>
    <button onclick="printPdf()" style="clear:both">
      Export to Pdf
    </button>
  </body>

</html>
// Code goes here
function printPdf(){
  
  var doc = new jsPDF();
  
  doc.fromHTML(document.getElementById('printDiv'), 20, 20, {
    'width': 1000
  });
  
  doc.save('Test.pdf');
}
/* Styles go here */