This article explains how to create PDF from HTML using JSPDF.
Frontend Developer Interview Questions and Answers