FPDF error: Some data has already been output, can’t send PDF
For fpdf to work properly, there cannot be any output at all beside what fpdf generates. For example, this will work: <?php $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont(‘Arial’,’B’,16); $pdf->Cell(40,10,’Hello World!’); $pdf->Output(); ?> While this will not (note the leading space before the opening <? tag) <?php $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont(‘Arial’,’B’,16); $pdf->Cell(40,10,’Hello World!’); $pdf->Output(); … Read more