Image('images/logo-agreement.gif', 130, 5, 80); // Print the header $this->SetFillColor(hexdec("dd"),hexdec("dd"),hexdec("dd")); $this->SetFont($document_font,"B",$document_font_size + 1); $this->SetXY($left_col,$start_row); $this->Cell($title_width,$incr + 1," $report_title",'0',1,'L',true); if (isset($report_subtitle) && strlen($report_subtitle) > 0) { $this->SetXY($left_col,$start_row + $incr + 2); $this->Cell($title_width,$incr + 1,$report_subtitle,'0',1,'L',true); } } function Footer() { global $incr, $left_col, $title_width, $max_rows, $document_font, $document_font_size, $document_name, $logo_image, $logo_url, $logo_row, $school_name; // Print the date $this->SetFont($document_font,"",$document_font_size - 1); $this->SetXY($left_col,$logo_row); $date = dateString('datetime'); $this->Cell($title_width,$incr - 1,"$document_name: $date",'0',1,'R'); $this->SetXY($left_col,$logo_row + $incr); $this->Cell($title_width,$incr - 1,"$school_name",'0',1,'R','',1); $this->Image($logo_image, 10, $logo_row, 50); $this->SetXY(10,$logo_row + 6); $this->SetFont($document_font,"B",$document_font_size); $this->Cell($title_width,$incr,$logo_url,'0',1,'L'); } } $pdf= new PDF('P', 'mm', 'Letter', true, 'UTF-8', false); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); //set auto page breaks $pdf->SetAutoPageBreak(TRUE, 40); //set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); $font_red = hexdec("00"); $font_green = hexdec("00"); $font_blue = hexdec("00"); $pdf->SetTextColor($font_red,$font_green,$font_blue); $pdf->SetFont($document_font,"",$document_font_size); $pdf->addPage(); include "agreement.php"; $pdf->SetTopMargin($start_row + 10); $pdf->MultiCell(0,5,$agreement,0,'L',false); // Print signature lines $pdf->addPage(); $pdf->SetFont($document_font,'B',10); $col1 = 20; $col2 = 90; $current_row = 35; $day = date("jS",time()); $month = date("F",time()); $year = date("Y",time()); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"Signed and agreed to on this $day day of $month $year",'0','0','L',false); $current_row += 10; $pdf->SetFont($document_font,'B',12); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"HotLunches.net",'0','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(110,5,$pac_name,'0','0','C',false); $col2 = 120; $current_row += 20; $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5," ",'B','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5," ",'B','0','L',false); $current_row += 5; $pdf->SetFont($document_font,'',10); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"Signature",'0','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5,"Signature",'0','0','L',false); $current_row += 20; $pdf->SetFont($document_font,'B',12); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"Mark Fester",'B','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5," ",'B','0','L',false); $current_row += 5; $pdf->SetFont($document_font,'',10); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"Print Name",'0','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5,"Print Name",'0','0','L',false); $current_row += 20; $pdf->SetFont($document_font,'B',12); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"President",'B','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5," ",'B','0','L',false); $current_row += 5; $pdf->SetFont($document_font,'',10); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"Title",'0','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5,"Title",'0','0','L',false); $current_row += 20; $pdf->SetFont($document_font,'B',12); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"$month $day, $year",'B','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5," ",'B','0','L',false); $current_row += 5; $pdf->SetFont($document_font,'',10); $pdf->SetXY($col1,$current_row); $pdf->Cell(60,5,"Date",'0','0','L',false); $pdf->SetXY($col2,$current_row); $pdf->Cell(60,5,"Date",'0','0','L',false); // Output the completed PDF $file_name = str_replace(" ","_","Agreement-" . date("Y",time()) . "-$school_name.pdf"); header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-type: application/pdf'); header("Content-Disposition: attachment; filename=$file_name"); header('Content-Transfer-Encoding: binary'); $pdf->Output("$file_name","D"); return; ?>