Example #1
0
 $pdf->Cell(50, 0, 'Nama', 0, 0, 'L');
 $pdf->Cell(0, 0, ': ' . $nama, 0, 0, 'L');
 $pdf->Ln(0);
 $pdf->Cell(30);
 $pdf->Cell(5, 10, '2.', 0, 0, 'L');
 $pdf->Cell(50, 10, 'NIP', 0, 0, 'L');
 $pdf->Cell(0, 10, ': ' . $nip, 0, 0, 'L');
 $pdf->Ln(0);
 $pdf->Cell(30);
 $pdf->Cell(5, 20, '3.', 0, 0, 'L');
 $pdf->Cell(50, 20, 'Pangkat / golongan / jabatan', 0, 0, 'L');
 $pdf->Cell(2, 20, ': ', 0, 0, 'L');
 $current_y = $pdf->GetY();
 $current_x = $pdf->GetX();
 $pdf->SetXY($current_x, $current_y + 8);
 $pdf->MultiCell(90, 5, convert_pangkat($golru_lama) . ', ' . convert_golongan($golru_lama) . ($jabatan_baru != '' ? ', ' . ucwords_strtolower($jabatan_baru) : ''), 0, 'L');
 $pdf->Ln(0);
 $pdf->Cell(30);
 $pdf->Cell(5, 5, '4.', 0, 0, 'L');
 $pdf->Cell(50, 5, 'Unit kerja', 0, 0, 'L');
 $pdf->Cell(0, 5, ': ' . $unit_kerja, 0, 0, 'L');
 $pdf->Ln(0);
 $pdf->Cell(30);
 $pdf->Cell(5, 15, '5.', 0, 0, 'L');
 $pdf->Cell(50, 15, 'Gaji pokok lama', 0, 0, 'L');
 $pdf->Cell(0, 15, ': ' . angka_rupiah($gapok_lama), 0, 0, 'L');
 $pdf->Ln(10);
 $pdf->Cell(87);
 $pdf->SetFont('ArialNarrow', 'I', 10);
 $pdf->MultiCell(90, 5, '(' . terbilang_rupiah($gapok_lama) . ')');
 $pdf->SetFont('ArialNarrow', '', 10);
Example #2
0
$pdf->Cell(0, 20, 'BADAN KEPEGAWAIAN NEGARA', 0, 0, 'C');
$pdf->Line(15, 25, 210 - 15, 25);
// 50mm from each edge
$pdf->Line(15, 24, 210 - 15, 24);
// 50mm from each edge
$pdf->Image('downloads/foto/' . ($is_file_exist ? $file : 'nofoto.jpg'), 165, 27, 30);
$data = $data_pegawai;
$pdf->SetFont('Times', '', 10);
$pdf->Ln(10);
$pdf->Cell(5);
$pdf->Cell(30, 20, 'Nama', 0, 0, 'L');
$pdf->Cell(1, 20, ': ' . $data->nama, 0, 0, 'L');
$pdf->Ln(0);
$pdf->Cell(5);
$pdf->Cell(30, 30, 'NIP', 0, 0, 'L');
$pdf->Cell(1, 30, ': ' . $data->nip, 0, 0, 'L');
$pdf->Ln(0);
$pdf->Cell(5);
$pdf->Cell(30, 40, 'Pangkat/Golongan', 0, 0, 'L');
$pdf->Cell(1, 40, ': ' . convert_pangkat($data->gol_akhir) . ', ' . convert_golongan($data->gol_akhir), 0, 0, 'L');
$pdf->Ln(0);
$pdf->Cell(5);
$pdf->Cell(30, 50, 'Jabatan', 0, 0, 'L');
$pdf->Cell(1, 50, ': ' . ucwords_strtolower($data->nama_jab), 0, 0, 'L');
$pdf->Ln(0);
$pdf->Cell(5);
$pdf->Cell(30, 60, 'Unit Kerja', 0, 0, 'L');
$pdf->Cell(1, 60, ': ' . $data->nama_bag, 0, 0, 'L');
$pdf->Ln(0);
$nama_file = $data->nip . '_' . $data->nama . '.pdf';
$pdf->Output($nama_file, 'I');