$this->SetFont('Times', '', 12); $w = $this->GetStringWidth($title) + 150; $this->SetDrawColor(0, 0, 180); $this->SetFillColor(230, 0, 230); $this->SetTextColor(0, 0, 255); $this->SetLineWidth(1); $this->Cell($w, 9, $title, 1, 1, 'C', 1); $this->Ln(10); } //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); $this->SetFont('Arial', 'I', 8); $this->Cell(0, 10, 'This is the page footer -> Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } } $title = "FPDF Library Page Header"; $pdf = new myPDF('P', 'mm', 'Letter'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times', '', 24); $pdf->Cell(0, 0, 'some text at the top of the page', 0, 0, 'L'); $pdf->ln(225); $pdf->Cell(0, 0, 'More text toward the bottom', 0, 0, 'C'); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 15); // Cell(W, H, 'text', Border, Return, 'Allign') - basic syntax $pdf->Cell(0, 0, 'Top of page 2 after header', 0, 1, 'C'); $pdf->Output();
$pdf->SetX(135); $pdf->Image("images/MN_Logo_kleiner.png", $pdf->GetX(), $pdf->GetY(), 60, 20, 'png', 'http://www.mission-net.org'); //Linie $pdf->setLineWidth(1); $pdf->Line(20, 45, 195, 45); //Cell, Anmeldung gueltig $pdf->SetY(50); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(0, 1, T_("Please print this page, sign it and send it to us, if you are under 18 years."), 0, 0, 'R'); //#################HEADER END############ //#################Mission-Net ADDRESS####### $pdf->SetX(20); $pdf->SetY(55); $pdf->SetFont('Arial', 'B', 12); $pdf->Write(5, "Mission-Net", 0, 'L'); $pdf->ln(); $pdf->Write(5, "Registration", 0, 'L'); $pdf->ln(); $pdf->Write(5, "Alte Neckarelzerstr. 2", 0, 'L'); $pdf->ln(); $pdf->Write(5, "D-74821 Mosbach", 0, 'L'); $pdf->ln(); $pdf->Write(5, "Germany", 0, 'L'); $pdf->SetY(60); $pdf->SetFont('Arial', '', 12); $pdf->SetX(110); $pdf->Write(5, T_("by fax: +49 6261 947 147")); $pdf->ln(); $pdf->SetX(110); $pdf->Write(5, T_("by email: registration@mission-net.org")); $pdf->SetX(20);