Generating PDF files with JavaScript

Generating PDF files with JavaScript

Generate PDF with JavaScript

// Default export is a5 paper, portrait, using milimeters for units
var doc = new jsPDF()

doc.text(‘Hello world!’, 10, 10)
doc.save(‘a5.pdf’)

<script src=”https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.debug.js”></script>

Source:
https://stackoverflow.com/questions/742271/generating-pdf-files-with-javascript

Al Mahbub Khan
Written by Al Mahbub Khan Full-Stack Developer & Adobe Certified Magento Developer

Full-stack developer at Scylla Technologies (USA), working remotely from Bangladesh. Adobe Certified Magento Developer.