- В window.print
- При создании PDF-файла с использованием dompdf


Вот мой HTML-код
Patient History
td, th {
text-align: left;
padding-left: 5px;
}
Phone No.(s) :+91
Email ID. :
OPD No.
Date
Doctor
Amount
Bill No.
Date
Particular
Amount
IPD No.
Date
Doctor
Amount
А вот мой PHP-код
$users_data = $this->session->userdata('auth_users');
$this->load->model('opd_billing/opd_billing_model','opd_billing');
$data['branch_detail']=$users_data;
$data['company_data']=$this->session->userdata('company_data');
if($type == 'all'){
$data['self_opd_collection_list'] = $this->patient->get_patient_history_datatables($id,'11',$branch_id);
$data['self_billing_collection_list'] = $this->patient->get_patient_history_datatables($id,'2',$branch_id);
foreach($data['self_billing_collection_list'] as $value) {
$get_particulars= $this->opd_billing->get_billed_particular_list($value->id);
$paticulars_new=array();
foreach($get_particulars as $particulars){
$paticulars_new[]=$particulars['particulars'];
}
$value->particulars = implode(',', $paticulars_new);
}
$data['self_ipd_collection_list'] = $this->patient->get_patient_history_datatables($id,'4',$branch_id);
}else{
$data['patient_list'] = $this->patient->get_patient_history_datatables($id,$type,$branch_id);
}
// echo"";print_r($data);die;
$this->load->view('patient/print_patient_history',$data);
$html = $this->output->get_output();
$this->load->library('pdf');
$this->pdf->load_html($html);
$this->pdf->render();
$this->pdf->stream("patient_history_".time().".pdf");
Подробнее здесь: https://stackoverflow.com/questions/782 ... i-3-dompdf