jsPDF Tutorial to Add Current Date & Time TimeStamp to PDF Document in Browser Using Javascript Full Project For Beginners

 

 

index.html

 

 

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.4.1/jspdf.debug.js"></script>
<script>
	var doc = new jsPDF()

	var date = new Date()

	doc.text("Today Date is " + date,24,24)



	doc.save("output.pdf")
</script>
</html>

Leave a Reply