SetMargins(10, 0, 0); $pdf->AddPage(); $pdf->SetFont('Helvetica','B',11); $header='./mapimages/' . 'header.png'; $pig='./images/' . 'pig.jpg'; $pdf->SetFontSize(11); // Select our font family $pdf->SetFont('Helvetica', 'B'); // Now we use the Cell function $pdf->Image($header, 10, 10, 190, 30); $pdf->Image($path, 10, 40, 190, 66); $pdf->Cell(60, 240, 'Proposed Installation Address:', 0, 0, 'L', FALSE); //height is 56 $pdf->SetFont('Helvetica', ''); $pdf->Cell(100, 240, $address, 0, 1, 'L', FALSE); $pdf->Cell(60, -229, 'Typical monthly electricity cost:', 0, 0, 'L', FALSE); //height is 56 $pdf->Cell(50, -229, $cost, 0, 1, 'L', FALSE); $pdf->SetFont('Helvetica', 'B'); $pdf->Cell(60, 255, 'Roof Size:', 0, 0, 'L', FALSE); //height is 56 $pdf->Cell(50, 255, "Name:", 0, 0, 'L', FALSE); $pdf->Cell(30, 255, $cname, 0, 1, 'L', FALSE); $pdf->SetFont('Helvetica', ''); $pdf->Cell(60, -244, $roofarea, 0, 0, 'L', FALSE); //height is 56 $pdf->SetFont('Helvetica', 'B'); $pdf->Cell(50, -244, "Address:", 0, 0, 'L', FALSE); $pdf->Cell(30, -244, $address, 0, 1, 'L', FALSE); $pdf->SetFont('Helvetica', ''); $pdf->Cell(60, 254, $fits, 0, 0, 'L', FALSE); //height is 56 $pdf->SetFont('Helvetica', 'B'); $pdf->Cell(50, 254, "Email:", 0, 0, 'L', FALSE); $pdf->Cell(30, 254, $email, 0, 1, 'L', FALSE); $pdf->Cell(60, -244, '', 0, 0, 'L', FALSE); $pdf->Cell(50, -244, "Telephone:", 0, 0, 'L', FALSE); $pdf->Cell(30, -244, $telephone, 0, 1, 'L', FALSE); $pdf->Image($pig, 120, 170, 90, 90); $pdf->SetY(-25); $pdf->SetFont('Helvetica','',8); // Page number $pdf->Cell(0,0,'Home Energy & Lifestyle Management Ltd is authorised and regulated by the Financial Conduct Authority',0,0,'L'); $pdf->Output($pdfpath, 'F'); mail_file( 'shanepillay011@gmail.com', 'Please see attached', 'Please see attached', 'noreply@bluenetdesigns.com', $pdfpath, 'noreply@noreply.com'); mail_file( $email, 'Please see attached', 'Please see attached', 'noreply@bluenetdesigns.com', $pdfpath, 'noreply@noreply.com'); $exeQuery = mysqli_query($mysqli,"UPDATE details SET Name='{$_POST["energy"]}', Email='{$_POST["width"]}', Address='{$_POST["height"]}', Telephone='{$_POST["yearly"]}', fit='{$_POST["fit"]}', grid='{$_POST["grid"]}' WHERE id=1"); echo "Your customised report has been mailed to you"; } ?>