mpdf not working in Google Chrome but working fine in firefox

前端 未结 2 1725
难免孤独
难免孤独 2021-01-06 05:02

Again am stuck into a situation while creating PDF document usong mPDF. I have done the following code which works fine in Firefox and Safari but not working in Google Chrom

2条回答
  •  囚心锁ツ
    2021-01-06 05:31

    I had the same problem, i just added the extension with filename inside output function

    $mpdf->Output('myfile.pdf', "D");

    Now it is working in both firefox and chrome.

    This is my code:-

    $html = "

    Isac Yara

    "; $mpdf = new \Mpdf\Mpdf(); $mpdf->WriteHTML($html, 2); $mpdf->Output("myfile.pdf", 'D');

提交回复
热议问题