$pdf->MultiCell(100, 0, ': '.$info, 0, 'L', 0, 0, '', '', true); $pdf->Ln(); } function cetak_infohalaman2($label,$info){ global $pdf,$dcPageW; $pdf->MultiCell(30, 0, $label, 0, 'L', 0, 0, $dcPageW-50, '', true); $pdf->MultiCell(100, 0, ': '.$info, 0, 'L', 0, 0, '', '', true); $pdf->Ln(); } // 4. Cetak info halaman: Sesuaikan Page Selection Bar >> Edit $ty=$pdf->GetY(); cetak_infohalaman('Nama stock opname',$data_so['nama']); cetak_infohalaman('Tanggal mulai',fftgl($data_so['tanggal1'])); cetak_infohalaman('Tanggal selesai',fftgl($data_so['tanggal2'])); if($lap_sum==1){ $pdf->SetY($ty); cetak_infohalaman2('Total item',$data_so['nitem'].' item'); cetak_infohalaman2('Item dicek',$data_so['nceky'].' item'); cetak_infohalaman2('Item hilang',($data_so['nitem']-$data_so['nceky']).' item'); } dc_YDown(2); // 5. Header tabel: samakan di $xtable->head() >> Edit $phead=array( array('No.','C',11), array('Barkode','L',32), array('Judul','L',60), array('Callnumber','L',25),
// 3. Judul Halaman: Contoh format "DATA <nama halaman>" >> Edit $JUDUL_HALAMAN = 'Data Periode Penerimaan Siswa Baru'; $pdf->SetFont(mydeffont, '', 12, '', true); $pdf->MultiCell($dcPageW, 0, strtoupper($JUDUL_HALAMAN), 0, 'C', 0, 1, '', '', true); dc_YDown(3); if (mysql_num_rows($t) > 0) { $pdf->SetFont(mydeffont, '', 8, '', true); function cetak_infohalaman($label, $info) { global $pdf; $pdf->MultiCell(30, 0, $label, 0, 'L', 0, 0, '', '', true); $pdf->MultiCell(100, 0, ': ' . $info, 0, 'L', 0, 0, '', '', true); $pdf->Ln(); } // 4. Cetak info halaman: Sesuaikan Page Selection Bar >> Edit cetak_infohalaman('Departemen', departemen_name($dept)); dc_YDown(2); // 5. Header tabel: samakan di $xtable->head() >> Edit // $xtable->head('Periode penerimaan','Kode Awalan','Kapasitas~C','Calon Siswa~C','Siswa Diterima~C','status~C','keterangan'); $thx = array('No.', 'Periode penerimaan', 'Kode Awalan', 'Kapasitas', 'Calon Siswa', 'Siswa Diterima', 'Status', 'Keterangan'); // 7. Alignment kolom: >> Edit $tax = array('C', 'L', 'L', 'C', 'C', 'C', 'C', 'L'); // 8. Lebar kolom: sesuaikan dg $xtable->td(..., lebar), rumus: lebar*$kc >> Edit $kc = 0.3; $twx = array(11, 200 * $kc, 120 * $kc, 100 * $kc, 100 * $kc, 100 * $kc, 80 * $kc, 0); $idx_o = 7; // 9. Index kolom yang lebar 0 (Lebar menyesuaikan) >> Edit $tx = 0; for ($i = 0; $i < count($twx); $i++) { $tx += $twx[$i]; }