JSP uses many JS libraries to convert HTML code into PDF files. It is basically used to generate report from the JSP page to HTML View. How to use it? 1) import JS Script <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.debug.js" ></script> 2) Write the JS Script of PDF under the head section <script> function generatePDF() { var doc = new jsPDF(); //create jsPDF object doc.fromHTML(document.getElementById("test"), // page element which you want to print as PDF 15, 15, { 'width': 170 //set width }, function(a) { doc.save("HTML2PDF.pdf"); // save file name as HTML2PDF.pdf }); } </script> 3) Write code under page element <div id="test"> <p><font size="3" color="red">About Me</font></p> <p...
Hi, I'm Shiva Gautam. With over 15 years of diverse experience in various IT domains, I am now an entrepreneur focusing on both training and software development. My expertise spans across multiple technologies, and I've authored numerous articles on subjects including Java, Python, REACT, NODE, ANGULAR, Cloud, software testing, Django framework, C#, Flutter, Salesforce, Ruby on Rails, .NET, and more. For additional information, please visit shivaconceptsolution.com and kangaroosoftware.net.