예제 #1
0
 $pdf->Cell($length[3] / 100 * $width, $height, '', 'TLR', 0, 'R', 1);
 $pdf->Cell($length[4] / 100 * $width, $height, $saldoAwal, 'TLR', 0, 'R', 1);
 $pdf->Cell($length[5] / 100 * $width, $height, '', 'TLR', 0, 'R', 1);
 $pdf->Cell($length[6] / 100 * $width, $height, '', 'TLR', 0, 'R', 1);
 $pdf->Ln();
 # Content
 $pdf->SetFont('Arial', '', 9);
 // foreach($dataShow as $key=>$row) {
 // $i=0;
 foreach ($dataShow as $head => $cont) {
     $nourut += 1;
     $height = 12;
     $awalY = $pdf->GetY();
     $pdf->SetY($awalY);
     $pdf->SetX(1000);
     $pdf->MultiCell($length[2] / 100 * $width, $height, $cont['keterangan'], 0, 'L');
     $akhirYKeterangan = $pdf->GetY();
     $pdf->SetY($awalY);
     $pdf->SetX(1000);
     $pdf->MultiCell($length[3] / 100 * $width, $height, $cont['km'], 0, 'C');
     $akhirYKm = $pdf->GetY();
     $pdf->SetY($awalY);
     $pdf->SetX(1000);
     $pdf->MultiCell($length[5] / 100 * $width, $height, $cont['kk'], 0, 'C');
     $akhirYKk = $pdf->GetY();
     $akhirY = max($akhirYKeterangan, $akhirYKm, $akhirYKk);
     $height2 = $akhirY - $awalY;
     $pdf->SetY($awalY);
     // echo $akhirYKeterangan."__".$akhirYKm."__".$akhirYKk."__".$akhirY."__".$awalY."__".$height2."<br>";
     $currentX = $pdf->GetX();
     $pdf->Cell($length[0] / 100 * $width, $height2, "", 'LR', 0, 'R');
예제 #2
0
 $length = explode(",", "7,25,38,8,8,13");
 $pdf = new zPdfMaster('L', 'pt', 'A4');
 $pdf->SetFont('Arial', '', 8);
 $pdf->setAttr1($title, $align, $length, $colPdf);
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $height = 12;
 $pdf->AddPage();
 $pdf->SetFillColor(255, 255, 255);
 foreach ($data as $row) {
     $i = 0;
     $awalY = $pdf->GetY();
     $awalX = $pdf->GetX();
     $currentX = $pdf->GetX();
     $pdf->SetY($awalY);
     $pdf->SetX($currentX);
     $pdf->MultiCell($length[0] / 100 * $width, $height, $row['noakun'], '0', $align[0]);
     $pdf->SetY($awalY);
     $pdf->SetX($currentX + $length[0] / 100 * $width);
     $currentX = $pdf->GetX();
     $pdf->MultiCell($length[1] / 100 * $width, $height, $kamusakun[$row['noakun']], '0', $align[1]);
     $akhirYNoAkun = $pdf->GetY();
     $pdf->SetY($awalY);
     $pdf->SetX($currentX + $length[1] / 100 * $width);
     $currentX = $pdf->GetX();
     $pdf->MultiCell($length[2] / 100 * $width, $height, $row['keterangan'], '0', $align[2]);
     $akhirYKeterangan = $pdf->GetY();
     $pdf->SetY($awalY);
     $pdf->SetX($currentX + $length[2] / 100 * $width);
     $currentX = $pdf->GetX();
     if ($row['jumlah'] < 0) {
         $pdf->MultiCell($length[3] / 100 * $width, $height, 0, '0', $align[3]);
 }
 $pdf->Ln();
 // Header
 $startY = $pdf->GetY();
 $pdf->Cell(85, $height, $_SESSION['lang']['noinvoice'], 0, 0, 'L');
 $pdf->Cell(10, $height, ':', 0, 0, 'L');
 $pdf->Cell(25, $height, $dataH['noinvoice'], 0, 1, 'L');
 $pdf->Cell(85, $height, $_SESSION['lang']['pt'], 0, 0, 'L');
 $pdf->Cell(10, $height, ':', 0, 0, 'L');
 $pdf->Cell(25, $height, $optPt[$dataH['kodeorg']], 0, 1, 'L');
 $pdf->Cell(85, $height, $_SESSION['lang']['tanggal'], 0, 0, 'L');
 $pdf->Cell(10, $height, ':', 0, 0, 'L');
 $pdf->Cell(25, $height, tanggalnormal($dataH['tanggal']), 0, 1, 'L');
 $pdf->Cell(85, $height, $_SESSION['lang']['keterangan'], 0, 0, 'L');
 $pdf->Cell(10, $height, ':', 0, 0, 'L');
 $pdf->MultiCell(170, $height, $dataH['keterangan'], 0, 'L');
 $pdf->Cell(85, $height, $_SESSION['lang']['jatuhtempo'], 0, 0, 'L');
 $pdf->Cell(10, $height, ':', 0, 0, 'L');
 $pdf->Cell(25, $height, tanggalnormal($dataH['jatuhtempo']), 0, 1, 'L');
 $pdf->Cell(85, $height, $_SESSION['lang']['nofp'], 0, 0, 'L');
 $pdf->Cell(10, $height, ':', 0, 0, 'L');
 $pdf->Cell(25, $height, $dataH['nofp'], 0, 1, 'L');
 $pdf->Cell(85, $height, $_SESSION['lang']['nilaiinvoice'], 0, 0, 'L');
 $pdf->Cell(10, $height, ':', 0, 0, 'L');
 $pdf->Cell(25, $height, number_format($dataH['nilaiinvoice'], 2), 0, 1, 'L');
 //sisi kanan
 $pdf->SetXY(290, $startY);
 $awalx = $pdf->GetX();
 $setpanjang = 275;
 $pdf->Cell($setpanjang, $height, $_SESSION['lang']['po'], 1, 1, 'L');
 $pdf->SetX(290);