diff --git a/application/controllers/MRIRcontroller.php b/application/controllers/MRIRcontroller.php index f13386b9..64030f87 100644 --- a/application/controllers/MRIRcontroller.php +++ b/application/controllers/MRIRcontroller.php @@ -1,6 +1,7 @@ global['pageTitle'] = 'Resico : MRIR Pdf '; $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - //print_r($data['CompanyDetails']); $data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo); - - //$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo); - //print_r($data['MRIRDetails']); $this->load->View("Mrirprintpdf",$data, NULL); - + + + + //*********************MPDF*********** - // Get output html - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("MrirDetails.pdf",$data,$php); + + $mpdf=new mPDF('utf-8','A4-P',8, 10,10, 10, 82, 38, 4, 6); + $mpdf->SetDisplayMode('fullpage'); + $mpdf->SetHTMLHeader($HtmlHeading); + $html = $this->load->view('Mrirprintpdf',$data,true); + $mpdf->SetDisplayMode('fullpage'); + $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); + $mpdf->list_indent_first_level = 1; + $mpdf->setAutoTopMargin = 'stretch'; + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->WriteHTML($html); + $mpdf->Output("MrirDetails".$data.'.pdf','I',$php); + } diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php index 179d63e5..a0315640 100644 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -1,6 +1,8 @@ input->post('excel'); + $excel = $this->input->post('excel'); + $HTML=""; //echo $excel; // if(empty($excel)) // { @@ -95,7 +98,7 @@ function phpAlert($msg) { $data['Totalamtwords']=$totamtwords; $data['PayMonth']=$month; $filename = 'Bank Report for'.$payon.'pdf' ; - $this->load->View("bankreportprint",$data); + $HTML = $this->load->View("bankreportprint",$data,true); } if($this->input->post('PF_Report')) { @@ -123,7 +126,7 @@ function phpAlert($msg) { $data['Totalamtwords']=$totamtwords; if(empty($excel)){ $filename = 'PF Report for'.$payon.'pdf' ; - $this->load->View("pfreportprint",$data); + $HTML = $this->load->View("pfreportprint",$data,true); // echo "PDF PART 1"; } else{ @@ -257,7 +260,7 @@ function phpAlert($msg) { if(empty($excel)){ $filename = 'ESI Report for'.$payon.'pdf'; - $this->load->View("esireportprint",$data); + $HTML = $this->load->View("esireportprint",$data,true); // echo "PDF PART 1"; } else{ @@ -352,28 +355,41 @@ function phpAlert($msg) { if(empty($excel)){ - $php = $this->output->get_output(); + // $php = $this->output->get_output(); - // Load library - $this->load->library('dompdf_gen'); + // // Load library + // $this->load->library('dompdf_gen'); - require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php'); - $dompdf = new DOMPDF(); - $dompdf->set_paper('A4', 'portrait'); - $dompdf->load_html($php); + // require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php'); + // $dompdf = new DOMPDF(); + // $dompdf->set_paper('A4', 'portrait'); + // $dompdf->load_html($php); - $dompdf->render(); + // $dompdf->render(); - // add the header - $canvas = $dompdf->get_canvas(); - $font = Font_Metrics::get_font("helvetica", "bold"); + // // add the header + // $canvas = $dompdf->get_canvas(); + // $font = Font_Metrics::get_font("helvetica", "bold"); - // the same call as in my previous example - $canvas->page_text(72, 18,"", - $font, 6, array(0,0,0)); + // // the same call as in my previous example + // $canvas->page_text(72, 18,"", + // $font, 6, array(0,0,0)); - $dompdf->stream($filename); - //echo "PDF PART 2"; + // $dompdf->stream($filename); + // //echo "PDF PART 2"; + $mpdf=new mPDF('utf-8','A4-P',9, 12,12, 10, 82, 38, 4, 6); + $mpdf->SetDisplayMode('fullpage'); + $mpdf->SetHTMLHeader($HtmlHeading); + //$html = $this->load->view("bankreportprint",$data,true); + $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); + $mpdf->setFooter("Page {PAGENO} of {nb}"); + $mpdf->list_indent_first_level = 1; + $mpdf->setAutoTopMargin = 'stretch'; + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->WriteHTML($HTML); + $mpdf->Output("".$filename.'.pdf','I',$php); + + } } @@ -797,7 +813,7 @@ function getEmployee() $Data['amtinwords']=$totalsalaryinwords; //$Data['Count'] = $i; - $this->load->View("payslipgenerateprint", $Data ); + $html.= $this->load->View("payslipgenerateprint", $Data ,true); } @@ -813,41 +829,52 @@ function getEmployee() $totalsalaryinwords = $this->convertNumber(round($totalsalary)); $Data['amtinwords']=$totalsalaryinwords; - $this->load->View("payslipgenerateprint", $Data ); + $html = $this->load->View("payslipgenerateprint", $Data,true ); } - $php = $this->output->get_output(); + // $php = $this->output->get_output(); - // Load library - $this->load->library('dompdf_gen'); + // // Load library + // $this->load->library('dompdf_gen'); - if($All != '') - { - $filename = 'Payslip-'.$Payon.'.pdf' ; - } - else - { - $filename = 'Payslip-'.$EmpID . '-' .$Payon.'.pdf' ; - } + // if($All != '') + // { + // $filename = 'Payslip-'.$Payon.'.pdf' ; + // } + // else + // { + // $filename = 'Payslip-'.$EmpID . '-' .$Payon.'.pdf' ; + // } - require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php'); - $dompdf = new DOMPDF(); - $dompdf->set_paper('A4', 'portrait'); - $dompdf->load_html($php); + // require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php'); + // $dompdf = new DOMPDF(); + // $dompdf->set_paper('A4', 'portrait'); + // $dompdf->load_html($php); - $dompdf->render(); + // $dompdf->render(); - // add the header - $canvas = $dompdf->get_canvas(); - $font = Font_Metrics::get_font("helvetica", "bold"); + // // add the header + // $canvas = $dompdf->get_canvas(); + // $font = Font_Metrics::get_font("helvetica", "bold"); - // the same call as in my previous example - $canvas->page_text(72, 18, "Page: {PAGE_NUM} of {PAGE_COUNT}", - $font, 6, array(0,0,0)); + // // the same call as in my previous example + // $canvas->page_text(72, 18, "Page: {PAGE_NUM} of {PAGE_COUNT}", + // $font, 6, array(0,0,0)); - $dompdf->stream($filename); + // $dompdf->stream($filename); + // } + $mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 24, 4, 6); + $mpdf->SetDisplayMode('fullpage'); + $mpdf->SetHTMLHeader($HtmlHeading); + $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); + $mpdf->setFooter("Page {PAGENO} of {nb}"); + $mpdf->list_indent_first_level = 1; + $mpdf->setAutoTopMargin = 'stretch'; + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->WriteHTML($html); + $mpdf->Output("".$filename.'.pdf','I',$php); } } diff --git a/application/views/Mrirprintpdf.php b/application/views/Mrirprintpdf.php index 9801628d..4d832786 100644 --- a/application/views/Mrirprintpdf.php +++ b/application/views/Mrirprintpdf.php @@ -86,7 +86,7 @@ Material Receipt And Inspection Report - - + diff --git a/application/views/bankreportprint.php b/application/views/bankreportprint.php index de8788a1..2e05d83d 100644 --- a/application/views/bankreportprint.php +++ b/application/views/bankreportprint.php @@ -23,8 +23,7 @@ RESICO INDUSTRIES
- + 168/1C3, Pennalur Pet Road, Goonipalayam Village Post, Uthukottai Taluk, Thiruvallur Dist-602026
Mobile: +91 99410 14891 / 9941014890 | E-mail: accounts@sidharthindustries.com diff --git a/application/views/esireportprint.php b/application/views/esireportprint.php index e70e9c5a..fc298093 100644 --- a/application/views/esireportprint.php +++ b/application/views/esireportprint.php @@ -29,8 +29,7 @@ if(!empty($companyinfo))
- +
diff --git a/application/views/payslipgenerateprint.php b/application/views/payslipgenerateprint.php index c2235c74..750d4258 100644 --- a/application/views/payslipgenerateprint.php +++ b/application/views/payslipgenerateprint.php @@ -184,10 +184,10 @@ if($RecCount > 0) - +
- + @@ -256,7 +256,7 @@ if($RecCount > 0)
-
+
RESICO INDUSTRIES
Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village,
Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026.
PaySlip for the Month of
- +
@@ -309,7 +309,7 @@ if($RecCount > 0) - +
EarningsAmount DeductionsAmount
 Basic Plus DA
Total Amount In Words  
This is a computer generated document. This document does not require signature.
This is a computer generated document. This document does not require signature.
diff --git a/application/views/pfreportprint.php b/application/views/pfreportprint.php index 767a18d8..ca9d3e88 100644 --- a/application/views/pfreportprint.php +++ b/application/views/pfreportprint.php @@ -44,13 +44,13 @@ if(!empty($companyinfo))
-
-

Employeer ESIC account No: TNAMB1556420000

+
+

Employee EPFO account No: TNAMB1556420000

- + @@ -67,7 +67,7 @@ if(!empty($companyinfo)) foreach($PFESI as $data) { $index++; - ?> +?> @@ -77,7 +77,7 @@ if(!empty($companyinfo)) - +
SnoESI Account NoEPO Account No Employee Contribution Employeer Contribution No of days Present
PFNO;?>OTperHours;?> PF + $data->CompanyPF),2,'.','');?>
Total