Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function laporan_harian_pdf(){
- $this->load->library('dompdf_gen');
- $tanggal = $this->input->get('tanggal');
- $data['result'] = $this->db->query("select * from data where nomor and keterangan and jumlah and jenis and date(tanggal) >= '$tanggal'")->result();
- $this->load->view('laporan_harian_pdf', $data);
- $paper_size = 'A4'; // ukuran kertas
- $orientation = 'landscape'; //tipe format kertas potrait atau landscape
- $html = $this->output->get_output();
- $this->dompdf->set_paper($paper_size, $orientation);
- //Convert to PDF
- $this->dompdf->load_html($html);
- $this->dompdf->render();
- $this->dompdf->stream("laporan.pdf", array('Attachment'=>0)); // nama file pdf yang di hasilkan
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement