I am currently using mPDF to create a pdf file from HTML (which was generated by PHP).
Everything works as expected, but I would like to be able to change the default file name. I currently have:
$payStub=new mPDF(); $payStub->SetTitle('My title'); $payStub->WriteHTML($pcTableRows); $payStub->Output();
When I save the pdf file that opens in my browser, it defaults to mpdf.pdf .
Can I change mpdf.pdf my choice?
I tried
$payStub->Output('myFileName.pdf');
and
$payStub->Output('myFileName.pdf', 'F');
but those who want to save it to the server, I try to use it when the user saves it locally.
html php mpdf
Jason
source share