![downloading multiple pdf with one link downloading multiple pdf with one link](https://i2.wp.com/filecr.com/wp-content/uploads/2018/12/Scr4_SumatraPDF_free-download.jpg?fit=1280%2C720&ssl=1)
Download Multiple PDF’s download at a single button click
Thanks for your reply…
But each row contains some information as below..
ID Name Type
1 x admin
2 y visitor
What i did is when i click a submit button these values will be stored in DB as well as got back using a HTML page called report4.html….
So this page should be converted into a PDF file using HTML2PDF class as given below….
ob_start();
include(dirname(__FILE__).’/report4.php’);
$content = ob_get_clean();
// conversion HTML => PDF
require_once(dirname(__FILE__).’/html2pdf.class.php’);
try
{
$html2pdf = new HTML2PDF(‘P’,’A4′, ‘fr’, false, ‘ISO-8859-15’, 3);
$html2pdf->pdf->SetDisplayMode(‘fullpage’);
$html2pdf->writeHTML($content, isset($_GET[‘vuehtml’]));
ob_Start();
$html2pdf->Output(‘AxetureF.pdf’);
$output = ob_get_clean();
header(‘Content-type: application/pdf’);
header(‘Content-Disposition: attachment; filename=”report1.pdf”‘);
echo $output;
}
catch(HTML2PDF_exception $e) { echo $e; }
So the headers are sent to the browser at once.. The above 2 rows will be given as output in only one PDF file..
But now the issue has been changed as at a single button click instant i want to get 2 PDF’s with the rows given in my table..
the problem i got here is for one submit button i can download only one PDF…
How come 2 PDF’s (headers will not support for outputting the data for 2 times….It accepts oouputting the data once)
-