foreach($this->input->post('properties') as $propertyID){
$data['property'] = $this->Property->get_property_by_id($propertyID,$this->user_id);
$html = $this->load->view('backend/mail_template/send_bulk_property',$data,true);
$html = $this->output->get_output();
$this->load->library('pdf');
$this->dompdf->loadHtml($html);
$this->dompdf->setPaper('A4', 'portrait');
$this->dompdf->render();
ob_start();
$output = $this->dompdf->output();
file_put_contents('./uploads/'.$data['property']['slug'].'.pdf', $output);
ob_end_clean();
}