[FPDF] ouvrir plusieurs documents en même temps
Bonjour,
J'utilise FPDF et j'aimerais ouvrir plusieurs fichiers en même temps mais au moment où j'ouvre le premier je perds la main et ne sait pas appeler pour ouvrir le second.
exemple ici où dans un premier temps j'ouvre un excel et ensuite après j'aimerais ouvrir le pdf.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="'.$_SESSION['name'].'"');
header('Cache-Control: max-age=0');
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
$chemin = explode("/",$path);
$pdf = new FPDI();
// import the template PFD
$pdf->setSourceFile($path);
// select the first page
$tplIdx = $pdf->importPage(1);
$pdf->AddPage();
// use the page we imported
$pdf->useTemplate($tplIdx);
$ind = count($chemin) -1;
$pdf->Output($chemin[$ind],'D'); |
Voilà si quelqu'un pouvait m'aider.
Merci d'avance