I am developing a web application using JavaScript. in a certain case i want to extract the contents inside a div element and paste it to the pdf file when i click the link "download to pdf".
I received some answers regarding this by using jsPDF lib, but is there any other way without using jsPDF? jsPDF is not supporting such things
    <div id="panel">
      //some codes 
      <a href=javascript:downloadPDF();>Download to PDF</a>
    </div>
    <script>
     function downloadPDF()
     {
      what to write here to convert to PDF
     }
    </script>
 
     
     
    