Current Path :
/
home
/
zrcdevco
/
www
/
zrc-email-program
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/zrcdevco/www/zrc-email-program/fpdf-with-letter.php
<?php // Extend the FPDF class to include a header and letter with replacement for key fields. class PDF extends FPDF { //Page header function Header() { //Logo $this->Image('zrc_logo.jpg',67,8,80); //Arial bold 15 $this->SetFont('Arial','B',15); //Move to the right $this->Cell(80); //Line break $this->Ln(50); } function LetterBody($file,$replace_array) { //Read text file $f=fopen($file,'r'); $txt=fread($f,filesize($file)); fclose($f); foreach ($replace_array as $key => $value) $txt = str_replace($key,$value,$txt); //Times 10 $this->SetFont('Times','',10); //Output justified text $this->MultiCell(0,5,$txt); //Line break $this->Ln(); } //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',8); //Page Footer Image $this->Image('zrc_footer.jpg',33,264); } } ?>