0

Hello i just get a blank page. Please help me i googled about 2 hours but found nothing that worked for me....I am trying to display the generated PDF in the browser but it doesn't works. I get just blank page.

<?phprequire("fpdf/fpdf.php");
$pdf = new FPDF();
$pdf->AddPage();

$pdf->SetFont("Helvetica", "B", 26);
$pdf->SetLineWidth(0.4);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0, 0, 0);              // Header
$pdf->SetY(+10);

$pdf->Cell(0, 10,$_POST["input"],"", 0, "C", 36);
$pdf->Ln();

$pdf->SetFont("Helvetica", "", 11);
$pdf->SetLineWidth(0.4);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor(255, 255, 255);                      // Adresse
$pdf->SetTextColor(0, 0, 0);
$pdf->SetY(+20);

$pdf->Cell(0, 10,$_POST["input2"],"", 0, "C", 11);
$pdf->Ln();

$pdf->SetFont("Helvetica","", 11);
$pdf->SetLineWidth(0.4);
$pdf->SetDrawColor(0, 0, 0);                                // E-Mail
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetY(+30);

$pdf->Cell(0, 10,$_POST["input7"],"B", 0, "C", 11);

/* Einstellung für Überschrift */
$pdf->SetFont("Helvetica", "B", 11);
$pdf->SetLineWidth(0.4);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor(192, 192, 192);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetY(+120);

/* Überschrift */

$pdf->Cell(30, 10, "Menge", "LTRB", 0, "C", 1);
$pdf->Cell(130, 10, $_POST["date"], "LTRB", 0, "C", 1);
$pdf->Cell(30, 10, "Kosten", "LTRB", 0, "C", 1);
$pdf->Ln();

$pdf->SetFillColor(255,255,255);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont("Helvetica", "B", 11);
$pdf->SetLineWidth(0.4);
$pdf->Cell(30, 10, $_POST["input4"], "LTRB", 0, "C", 1);
$pdf->Cell(130, 10, $_POST["input5"], "LTRB", 0, "C", 1);
$pdf->Cell(30, 10, chr(128)." ".$_POST["input6"], "LTRB", 0, "C", 1);

$pdf->Ln();
$pdf->Ln();
$pdf->SetFont("Helvetica", "", 11);
$pdf->SetLineWidth(0.4);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor(255, 255, 255);                      // Adresse
$pdf->SetTextColor(0, 0, 0);
$pdf->SetY(+190);

$pdf->Cell(0, 10, "Preise inkl. 20% MWSt","", 0, "C", 11);

$pdf->Ln();
$pdf->SetFont("Helvetica", "", 11);
$pdf->SetLineWidth(0.4);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor(255, 255, 255);                      // Adresse
$pdf->SetTextColor(0, 0, 0);
$pdf->SetY(+200);

$pdf->Cell(0, 10, "Das Lieferdatum entspricht dem Rechnungsdatum","", 0, "C", 11);

$pdf->Ln();
$pdf->SetFont("Helvetica", "", 11);
$pdf->SetLineWidth(0.4);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor(255, 255, 255);                      // Adresse
$pdf->SetTextColor(0, 0, 0);
$pdf->SetY(+250);

$pdf->Cell(0, 10, "www.hakki-uzel.at","", 0, "C", 11);

$pdf->Output();
?>
alexander.polomodov
  • 4,849
  • 14
  • 35
  • 42
Hakki Uzel
  • 1
  • 1
  • 2

1 Answers1

0

make sure your output follow the rules/format

$pdf->Output('your file name', 'I');

please read the the manual of Output function form http://www.fpdf.org/en/doc/output.htm

Hilarius L. Doren
  • 707
  • 1
  • 12
  • 29