I am generating multiple PDFs in a loop using mPDF
. Following are the lines of my code:
for($i=0;$i<=3;$i++)
{
$mpdf = new mPDF();
$stylesheet = file_get_contents('style.css');
$mpdf->WriteHTML($stylesheet,1);
$mpdf->WriteHTML('My html');
$mpdf->SetDisplayMode('fullpage');
$pdfname="Invoice_No.$i".".pdf";
$mpdf->Output($pdfname, "I");
}
When the change the parameter I
to F
multiple PDFs are generated on the server. However when using I
as the parameter only first PDF is generated. Is there any way that I can generate multiple PDFs in such a way that I do not have to save them in the server?
Note: Even using parameter D
does not help either