while ($result = $stmt->fetch()) {
    $data[] = array($result['ComponentSpecs'], $result['Used_LineQuantity'], $result['Used_LineCost'], $result['Used_LineStatus'], $result['Used_LineDate'], $result['Used_LineSubTotal']);
}
date_default_timezone_set('America/Los_Angeles');
$pdf = new myPDF('L', 'mm', 'Letter');
$date = date("m/d/Y h:i A");
$pdf->date = $date;
$header1 = array('Usage Order #', 'Used By', 'For Tool', 'Date', 'Notes', 'Status');
$header = array('Component Used', 'Quantity Used', 'Cost', 'Status', 'Date Used', 'Subtotal');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetY(35);
$pdf->BuildTable1($header1, $data1);
$pdf->SetY(55);
$pdf->BuildTable($header, $data);
$pdf->Ln(6);
$substring = " Total Subtotal: \$" . $subtotal . " ";
$substrwidth = $pdf->GetStringWidth($substring);
$substrX = 260 - $substrwidth;
$pdf->SetX($substrX);
$pdf->Cell($substrwidth, 6, $substring, 1, 1, 'C');
$tax = $subtotal * 0.075;
$tax = round($tax, 2);
$tax = number_format((double) $tax, 2, '.', '');
$taxstring = " Tax (7.5%): \$" . $tax . " ";
$taxstrwidth = $pdf->GetStringWidth($taxstring);
$taxstrX = 260 - $taxstrwidth;
$pdf->SetX($taxstrX);
$pdf->Cell($taxstrwidth, 6, $taxstring, 1, 1, 'C');
$pdf->SetFont('', 'B', 12);
$grandtotal = $tax + $subtotal;
예제 #2
0
    case 'ITA':
        $created = 'Creato il ';
        $sender = 'Mittente:								';
        $recipient = 'Destinatario:	';
        $date = 'Data:														';
        $title = 'Titolo:												';
        $page = 'Pagina';
        break;
    default:
        $created = 'Created on ';
        $sender = 'Sender:							';
        $recipient = 'Recipient:			';
        $date = 'Date:											';
        $title = 'Title:												';
        $page = 'Page';
        break;
}
$pdf = new myPDF();
$pdf->SetFooterData($config['site_url'], $page);
$pdf->Open();
$pdf->SetAuthor($game->player['user_name']);
$pdf->SetTitle($config['site_url']);
$pdf->SetAutoPageBreak(true, 15.0);
$pdf->AddPage();
$pdf->SetFont('Arial', 'I', 8);
$pdf->MultiCell(0, 7, $created . date('d.m.y H:i', time()) . '', 0, 'R');
$pdf->SetFont('Arial', 'B', 16);
$pdf->MultiCell(0, 7, '' . $pdf->MultiCell(0, 7, $sender . $sendername['user_name']), $pdf->MultiCell(0, 7, $recipient . $game->player['user_name']), $pdf->MultiCell(0, 7, $date . $time), $pdf->MultiCell(0, 7, $title . $subject));
$pdf->Ln();
$pdf->MultiCell(0, 7, $text, 1);
$pdf->Output();
 $pdf->SetY(110);
 $pdf->SetX(130);
 $pdf->Write(5, T_("Emergency contact"));
 $pdf->ln();
 $pdf->ln();
 $pdf->SetX(130);
 $pdf->Write(5, utf8_decode($data["emergency_firstname"]) . " " . utf8_decode($data["emergency_lastname"]));
 $pdf->ln();
 $pdf->SetX(130);
 $pdf->Write(5, utf8_decode($data["emergency_phone"]));
 //################ADDRESS END#####
 //################REGISTRATION############
 $pdf->SetY(110);
 $pdf->SetX(20);
 $pdf->Write(5, T_("Hereby I register for Mission-Net 2009:"));
 $pdf->Ln();
 $pdf->Ln();
 //Prename, Familyname- Unterlined
 $pdf->SetFont('Arial', 'B', 14);
 $pdf->Write(5, utf8_decode($var_prename));
 $pdf->Write(5, " ");
 $pdf->Write(5, utf8_decode($var_familyname));
 //Address
 $pdf->Ln();
 $pdf->Write(5, utf8_decode($var_street) . "\n");
 $pdf->Write(5, $var_plz);
 $pdf->Write(5, " ");
 $pdf->Write(5, utf8_decode($var_city));
 $pdf->Ln();
 $pdf->Write(5, utf8_decode($land));
 $pdf->Ln();