Пример #1
0
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3]);
        $pdf->Cell($w1[4], $ln, $arrAksi_1[$i], 'LR', 0, 'L');
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4]);
        $pdf->Cell($w1[5], $ln, $arrCapaian_2[$i], 'LR', 0, 'C');
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5]);
        $pdf->Cell($w1[6], $ln, $arrAksi_2[$i], 'LR', 0, 'L');
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5] + $w1[6]);
        $pdf->Cell($w1[7], $ln, $arrCapaian_3[$i], 'LR', 0, 'C');
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5] + $w1[6] + $w1[7]);
        $pdf->Cell($w1[8], $ln, $arrAksi_3[$i], 'LR', 0, 'L');
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5] + $w1[6] + $w1[7] + $w1[8]);
        $pdf->Cell($w1[9], $ln, $arrCapaian_4[$i], 'LR', 0, 'C');
        $pdf->SetX($margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5] + $w1[6] + $w1[7] + $w1[8] + $w1[9]);
        $pdf->Cell($w1[10], $ln, $arrAksi_4[$i], 'LR', 1, 'L');
    }
}
$pdf->Line($margin, $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2] + $w1[3] + $w1[4] + $w1[5] + $w1[6] + $w1[7] + $w1[8] + $w1[9] + $w1[10], $pdf->GetY());
$pdf->SetFont($font, 'B', $size);
$pdf->SetX($margin);
$pdf->Cell($w1[0], $ln * 2, '', '', 1, 'L');
$pdf->SetX($margin);
if ($kdunit == '820000') {
    $anggaran = pagudipa_lapan($th, '820000');
} elseif (substr($kdunit, 3, 3) == '000' and $kdunit != '820000') {
    $anggaran = pagudipa_deputi($th, $kdunit);
} else {
    $anggaran = pagudipa_unit($th, $kdunit);
}
$pdf->Cell($w1[0], $ln, 'Jumlah Pagu Anggaran ' . $th . ' : Rp. ' . number_format($anggaran, "0", ",", ".") . ',-', '', 1, 'L');
$pdf->SetDisplayMode('real');
$pdf->Output('doc.pdf', 'I');
    $arrTarget = $pdf->SplitToArray($w1[2], $ln, trim($row['target']));
    if ($max < count($arrSasaran)) {
        $max = count($arrSasaran);
    }
    if ($max < count($arrIndikator)) {
        $max = count($arrIndikator);
    }
    if ($kdsasaran != $row['no_sasaran']) {
        $pdf->Line($margin, $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2], $pdf->GetY());
    }
    if ($kdsasaran == $row['no_sasaran']) {
        $pdf->Line($margin + $w1[0], $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2], $pdf->GetY());
    }
    $kdsasaran = $row['no_sasaran'];
    for ($i = 0; $i < $max; $i++) {
        $pdf->SetX($margin);
        $pdf->Cell($w1[0], $ln, $arrSasaran[$i], 'LR', 0, 'L');
        $pdf->SetX($margin + $w1[0]);
        $pdf->Cell($w1[1], $ln, $arrIndikator[$i], 'LR', 0, 'L');
        $pdf->SetX($margin + $w1[0] + $w1[1]);
        $pdf->Cell($w1[2], $ln, $arrTarget[$i], 'LR', 1, 'C');
    }
}
$pdf->Line($margin, $pdf->GetY(), $margin + $w1[0] + $w1[1] + $w1[2], $pdf->GetY());
$pdf->SetFont($font, 'B', $size);
$pdf->SetX($margin);
$pdf->Cell($w1[0], $ln * 2, '', '', 1, 'L');
$pdf->SetX($margin);
$pdf->Cell($w1[0], $ln, 'Jumlah Pagu Anggaran ' . $th . ' :  Rp. ' . number_format(pagudipa_lapan($th, '820000'), "0", ",", ".") . ',-', '', 1, 'L');
$pdf->SetDisplayMode('real');
$pdf->Output('doc.pdf', 'I');