0

I generated pdf file by using html code in server side and passing that html response to client side. Then by using below code it print the file and then ask for save option but I dont want to show print window option, looking for solution which provide directly save pdf option.My html response contain some hindi text also so it is difficult to convert html to pdf for that I tried so many solutions.

        var printWindow = window.open('height=400,width=800');
        var doc = printWindow.document;
        doc.write(response.print);
        doc.close();                   
        printWindow.document.close();
        printWindow.focus();
        printWindow.print();
        printWindow.close();
georgeawg
  • 48,608
  • 13
  • 72
  • 95
Taher Mahodia
  • 194
  • 2
  • 13
  • You should look into `FPDF`. It's the easiest way of setting up a pdf file with little code and effort. – Marty Apr 11 '19 at 10:22
  • 4
    Possible duplicate of [Is it possible to save HTML page as PDF using JavaScript or jquery?](https://stackoverflow.com/questions/6896592/is-it-possible-to-save-html-page-as-pdf-using-javascript-or-jquery) – Weihui Guo May 11 '19 at 03:08
  • Duplication of this question : [Is it possible to save HTML page as PDF using JavaScript or jquery?](https://stackoverflow.com/questions/6896592/is-it-possible-to-save-html-page-as-pdf-using-javascript-or-jquery) (Try to use [JSpdf library](https://github.com/MrRio/jsPDF)) – Val Apr 11 '19 at 10:11

0 Answers0