Top
Home

NEEDED FILES. Must be in directory with the rest of the files created from below

###################################
###################################
Begin Page that Creates the PDF
###################################
###################################

<?php
require('fpdf.php');

$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
//$pdf->Image('form.jpg',0,0,210);
//$pdf->SetTextColor('250','20','105');
//$pdf->MultiCell(95,5,"$Field01",0);
//$pdf->Cell(95,10,"$Field01",0);










$pdf->Output();
?>

###################################
###################################
A Row
###################################
###################################

$pdf->Cell(190,1,'',0);
$pdf->ln();
$pdf->Cell(60,10,'',1);
$pdf->Cell(40,10,'Hello World!',1);
$pdf->ln();


###################################
###################################
Email with Attachment
###################################
###################################

<?php
$to = "OOOOOOOOOOOOO";
$from = "OOOOOOOOOOOOO";
$subject = "OOOOOOOOOOOOO";
$message = "<p>Please see the attachment.</p>";

// a random hash will be necessary to send mixed content
$separator = md5(time());

// carriage return type (we use a PHP end of line constant)
$eol = PHP_EOL;

// attachment name
$todae=date ("Y_M_d_G_i_s");
$filename = $moose01 . "_Inter_" . $todae . ".pdf";

// encode data (puts attachment in proper format)
$pdfdoc = $pdf->Output("", "S");
$attachment = chunk_split(base64_encode($pdfdoc));

// main header
$headers  = "From: ".$from.$eol;
$headers .= "MIME-Version: 1.0".$eol;
$headers .= "Content-Type: multipart/mixed; boundary=\"".$separator."\"";

// no more headers after this, we start the body! //

$body = "--".$separator.$eol;
$body .= "Content-Transfer-Encoding: 7bit".$eol.$eol;
$body .= "OOOOOOOOOOOOO.".$eol;

// message
$body .= "--".$separator.$eol;
$body .= "Content-Type: text/html; charset=\"iso-8859-1\"".$eol;
$body .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
$body .= $message.$eol;

// attachment
$body .= "--".$separator.$eol;
$body .= "Content-Type: application/octet-stream; name=\"".$filename."\"".$eol;
$body .= "Content-Transfer-Encoding: base64".$eol;
$body .= "Content-Disposition: attachment".$eol.$eol;
$body .= $attachment.$eol;
$body .= "--".$separator."--";

// send message
mail($to, $subject, $body, $headers);

?>

#######################################################################

1 Col = 190
2 Col = 95
3 Col = 63
4 Co = 47
5 Col = 38
6 Col = 32
7 Col = 27
8 Col = 24
9 Col = 21
10 Col = 19