Skip to content

Instantly share code, notes, and snippets.

@esmeromichael
Created March 13, 2017 04:51
Show Gist options
  • Save esmeromichael/709684760114e84b4202c46f8baf6f34 to your computer and use it in GitHub Desktop.
Save esmeromichael/709684760114e84b4202c46f8baf6f34 to your computer and use it in GitHub Desktop.
else if(Input::get('emp_print')){
PDF::SetTitle('Employee ID');
PDF::SetFont('dejavusans', '', 10);
PDF::SetMargins(15, 15, 0, true);
//PDF::AddPage('L');
//TCPDF::setEqualColumns(3,0,'');
PDF::AddPage();
$id = Input::get('Emp_id');
$info = PatientInfo::where('id',$id)->first();
PDF::writeHTML(view('webpage.printEmp',compact('info'))->render());
ob_end_clean();
PDF::Output('Employee_ID.pdf','I');
}
else if(Input::get('printMultipleEmp')){
PDF::SetTitle('Employee ID');
PDF::SetFont('dejavusans', '', 10);
PDF::SetMargins(5, 10, 5, true);
PDF::setEqualColumns(1,0,'');
PDF::AddPage();
$row = count(Input::get('info_Empid'));
$infos = [];
for($i=0;$i<$row;$i++){
$infos[] = PatientInfo::where('id',Input::get('info_Empid')[$i])->first();
}
PDF::writeHTML(view('webpage.printMulEmp',compact('p_exam_student','info','row','infos'))->render());
ob_end_clean();
PDF::Output('Employee_ID.pdf','I');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment