当前位置: 首页>>代码示例>>PHP>>正文


PHP TCPDF::LastPage方法代码示例

本文整理汇总了PHP中TCPDF::LastPage方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDF::LastPage方法的具体用法?PHP TCPDF::LastPage怎么用?PHP TCPDF::LastPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TCPDF的用法示例。


在下文中一共展示了TCPDF::LastPage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionGeneratePdf

        public function actionGeneratePdf() 
	{
           $session=new CHttpSession;
           $session->open();
		Yii::import('application.extensions.tcpdf.*');
		require_once('tcpdf/tcpdf.php');
		require_once('tcpdf/config/lang/eng.php');	
             if(isset($session['ParentLogin_records']))
               {
                $d=$_SESSION['ParentLogin_records'];
		 $model = array();

		if($d->data)
			$model[]=array_keys($d->data[0]->attributes);//headers: cols name
			else
			{
				$this->render('no_data_found',array('last_page'=>$_SERVER['HTTP_REFERER'],));
				exit;			
			}

		foreach ($d->data as $item) {
		    $model[] = $item->attributes;
		}
		//print_r($model);exit;
               }
              


		$html = $this->renderPartial('exportGridtoReport', array(
			'model'=>$model
		), true);
		
		//die($html);
		ob_clean();
		$pdf = new TCPDF();
		$pdf->SetCreator(PDF_CREATOR);
		$pdf->SetAuthor(Yii::app()->name);
		$pdf->SetTitle('ParentLogin Report');
		$pdf->SetSubject('ParentLogin Report');
		//$pdf->SetKeywords('example, text, report');
		$pdf->SetHeaderData('', 0, "Report", '');
		$pdf->setHeaderFont(Array('helvetica', '', 8));
		$pdf->setFooterFont(Array('helvetica', '', 6));
		$pdf->SetMargins(15, 18, 15);
		$pdf->SetHeaderMargin(5);
		$pdf->SetFooterMargin(10);
		$pdf->SetAutoPageBreak(TRUE, 0);
		$pdf->SetFont('dejavusans', '', 7);
		$pdf->AddPage();
		$pdf->writeHTML($html, true, false, true, false, '');
		$pdf->LastPage();
		$pdf->Output("ParentLogin.pdf", "I");
	}
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:53,代码来源:ParentLoginController.php

示例2: actionGeneratePdf

        public function actionGeneratePdf() 
	{
           $session=new CHttpSession;
           $session->open();
		Yii::import('application.extensions.bootstrap.gii.*');
		require_once('bootstrap/tcpdf/tcpdf.php');
		require_once('bootstrap/tcpdf/config/lang/eng.php');

             if(isset($session['Reportepedidosxpdvdetalle_records']))
               {
                $model=$session['Reportepedidosxpdvdetalle_records'];
               }
               else
                 $model = Reportepedidosxpdvdetalle::model()->findAll();



		$html = $this->renderPartial('expenseGridtoReport', array(
			'model'=>$model
		), true);
		
		//die($html);
		
		$pdf = new TCPDF();
		$pdf->SetCreator(PDF_CREATOR);
		$pdf->SetAuthor(Yii::app()->name);
		$pdf->SetTitle('Reportepedidosxpdvdetalle Report');
		$pdf->SetSubject('Reportepedidosxpdvdetalle Report');
		//$pdf->SetKeywords('example, text, report');
		$pdf->SetHeaderData('', 0, "Report", '');
		$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Example Report by ".Yii::app()->name, "");
		$pdf->setHeaderFont(Array('helvetica', '', 8));
		$pdf->setFooterFont(Array('helvetica', '', 6));
		$pdf->SetMargins(15, 18, 15);
		$pdf->SetHeaderMargin(5);
		$pdf->SetFooterMargin(10);
		$pdf->SetAutoPageBreak(TRUE, 0);
		$pdf->SetFont('dejavusans', '', 7);
		$pdf->AddPage();
		$pdf->writeHTML($html, true, false, true, false, '');
		$pdf->LastPage();
		$pdf->Output("Reportepedidosxpdvdetalle_002.pdf", "I");
	}
开发者ID:AlvaroCardonaH,项目名称:Siicop,代码行数:43,代码来源:ReportePedidosxPdvDetalleController.php

示例3: actionStudentwisereportpdf

 public function actionStudentwisereportpdf()
 {
     if (!empty($_REQUEST['student_enroll_no']) && !empty($_REQUEST['start']) && !empty($_REQUEST['end'])) {
         //$start=null;
         //$end=null;
         $en = trim($_REQUEST['student_enroll_no']);
         $student_data = StudentInfo::model()->findByAttributes(array('student_enroll_no' => $en));
         $stud_trans = StudentTransaction::model()->findByAttributes(array('student_transaction_student_id' => $student_data['student_id']));
         $new_start = $_REQUEST['start'];
         $new_end = $_REQUEST['end'];
         $start = date("Y-m-d", strtotime($new_start));
         $end = date("Y-m-d", strtotime($new_end));
         $att_info = Attendence::model()->findAll(array('select' => 'sem_name_id', 'distinct' => true, 'condition' => 'attendence_date >=:date_start and attendence_date <= :date_end and st_id = :stu_id', 'params' => array(':date_start' => $start, ':date_end' => $end, 'stu_id' => $stud_trans['student_transaction_id'])));
         $sem_data = array();
         //print_r($att_info['sem_name_id']); exit;
         foreach ($att_info as $list) {
             $sem_data[] = $list['sem_name_id'];
         }
         $sem_array = implode(',', $sem_data);
         $subject_data = Yii::app()->db->createCommand()->select('*')->from('subject_master')->where('subject_master_id in (select sub_id from attendence where branch_id=' . $stud_trans['student_transaction_branch_id'] . ' and sem_id=' . $stud_trans['student_academic_term_period_tran_id'] . ') and subject_master_academic_terms_name_id IN(' . $sem_array . ')  AND subject_master_organization_id=' . Yii::app()->user->getState('org_id'))->queryAll();
         //$subject_data = SubjectMaster::model()->findAll(array('condition'=>'subject_master_academic_terms_period_id='.$stud_trans['student_academic_term_period_tran_id'].' AND subject_master_academic_terms_name_id IN('.$sem_array.') AND subject_master_branch_id ='.$stud_trans['student_transaction_branch_id'].' AND subject_master_organization_id='.Yii::app()->user->getState('org_id')));
         /*$new_start=$_REQUEST['start'];
         		$new_end=$_REQUEST['end'];
         			
         		$start = date("Y-m-d", strtotime($new_start));
         		$end = date("Y-m-d", strtotime($new_end));*/
         if (isset($_REQUEST['studenewisereportpdf'])) {
             Yii::import('application.extensions.tcpdf.*');
             require_once 'tcpdf/tcpdf.php';
             require_once 'tcpdf/config/lang/eng.php';
             //$this->actiondate_report();
             $html = $this->renderPartial('student_report_view_pdf', array('subject_data' => $subject_data, 'student_data' => $student_data, 'start' => $_REQUEST['start'], 'end' => $_REQUEST['end']), true);
             //print_r($html);exit;
             ob_clean();
             $pdf = new TCPDF();
             $pdf->SetCreator(PDF_CREATOR);
             $pdf->SetAuthor(Yii::app()->name);
             $pdf->SetTitle('StudentWise Report');
             $pdf->SetSubject('StudentWise Report');
             $pdf->SetKeywords('example, text, report');
             $pdf->SetHeaderData('', 0, "Report", '');
             //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Example Report by ".Yii::app()->name, "");
             $pdf->setHeaderFont(array('helvetica', '', 8));
             $pdf->setFooterFont(array('helvetica', '', 6));
             $pdf->SetMargins(15, 18, 15);
             $pdf->SetHeaderMargin(5);
             $pdf->SetFooterMargin(10);
             $pdf->SetAutoPageBreak(TRUE, 15);
             $pdf->SetFont('dejavusans', '', 7);
             $resolution = array(150, 150);
             $pdf->AddPage('P', $resolution);
             $pdf->writeHTML($html, true, false, true, false, '');
             $pdf->LastPage();
             $pdf->Output("StudentWise.pdf", "I");
         }
         if (isset($_REQUEST['studenewisereportexcel'])) {
             Yii::app()->request->sendFile(date('YmdHis') . '.xls', $this->renderPartial('student_report_view_pdf', array('subject_data' => $subject_data, 'student_data' => $student_data, 'start' => $_REQUEST['start'], 'end' => $_REQUEST['end']), true));
         }
     }
 }
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:60,代码来源:AttendenceController.php

示例4: actionAcademicTermPeriodGeneratePdf

 public function actionAcademicTermPeriodGeneratePdf()
 {
     $session = new CHttpSession();
     $session->open();
     Yii::import('application.extensions.tcpdf.*');
     require_once 'tcpdf/tcpdf.php';
     require_once 'tcpdf/config/lang/eng.php';
     if (isset($session['academic_term_period_records'])) {
         //$model=$session['City_records'];
         $d = $_SESSION['academic_term_period_records'];
         $model = array();
         $model[] = array_keys($d->data[0]->attributes);
         //headers: cols name
         foreach ($d->data as $item) {
             $model[] = $item->attributes;
         }
     }
     $html = $this->renderPartial('/academicTermPeriod/academicTermPeriodGeneratePdf', array('model' => $model), true);
     //$session->close();
     //die($html);
     ob_clean();
     $pdf = new TCPDF();
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor(Yii::app()->name);
     $pdf->SetTitle('Report');
     $pdf->SetSubject('Report');
     $pdf->SetKeywords('example, text, report');
     $pdf->SetHeaderData('', 0, "Report", '');
     //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Example Report by ".Yii::app()->name, "");
     $pdf->setHeaderFont(array('helvetica', '', 8));
     $pdf->setFooterFont(array('helvetica', '', 6));
     $pdf->SetMargins(15, 18, 15);
     $pdf->SetHeaderMargin(5);
     $pdf->SetFooterMargin(10);
     $pdf->SetAutoPageBreak(TRUE, 0);
     $pdf->SetFont('dejavusans', '', 7);
     $pdf->AddPage();
     $pdf->writeHTML($html, true, false, true, false, '');
     $pdf->LastPage();
     $pdf->Output("AcademicPeriod.pdf", "I");
 }
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:41,代码来源:AcademicTermPeriodController.php

示例5: actionMis_report

    public function actionMis_report()
    {
        $model = new FeesPaymentTransaction();
        $current_aca_term = AcademicTerm::model()->findAll(array('condition' => 'current_sem=1'));
        if ($current_aca_term) {
            $aca_data = array();
            foreach ($current_aca_term as $aca) {
                $aca_data[] = $aca['academic_term_id'];
                $current_aca_term = $aca->academic_term_period_id;
            }
            $acam_data = implode(",", $aca_data);
            //$current_aca_term = $current_aca_term->academic_term_period_id;
            $fees_data = Yii::app()->db->createCommand()->selectDistinct('fees_master_id, fees_branch_id, fees_academic_term_id,fees_quota_id, fees_academic_term_name_id')->from('fees_master')->where('fees_academic_term_name_id in(' . $acam_data . ') order by fees_branch_id,fees_academic_term_name_id')->queryAll();
            //print count($fees_data); exit;
            if (!empty($fees_data)) {
                foreach ($fees_data as $list) {
                    $ravi_paid = 0;
                    $ravi_total = 0;
                    $my_total = 0;
                    $receive_amount = 0;
                    if (!empty($list)) {
                        $sql = "SELECT COUNT(*) FROM student_transaction where student_transaction_quota_id=" . $list['fees_quota_id'] . " and student_transaction_branch_id = " . $list['fees_branch_id'] . " AND student_academic_term_period_tran_id = " . $list['fees_academic_term_id'] . " AND student_academic_term_name_id = " . $list['fees_academic_term_name_id'];
                        $numStud[] = Yii::app()->db->createCommand($sql)->queryScalar();
                        $ravi_total = Yii::app()->db->createCommand($sql)->queryScalar();
                        $paid_stud = Yii::app()->db->createCommand()->selectDistinct('fees.fees_student_id, stud.student_transaction_id,stud.student_transaction_student_id,stud.student_transaction_quota_id')->from('fees_payment_transaction fees')->join('student_transaction stud', 'fees.fees_student_id = stud.student_transaction_id')->where('stud.student_transaction_branch_id = :branch_id AND stud.student_transaction_quota_id=:quota AND stud.student_academic_term_period_tran_id = :acm_id AND fees.fees_academic_term_id = :acm_name_id', array(':branch_id' => $list['fees_branch_id'], ':acm_id' => $list['fees_academic_term_id'], ':acm_name_id' => $list['fees_academic_term_name_id'], ':quota' => $list['fees_quota_id']))->queryAll();
                        $paid_stud_count[] = count($paid_stud);
                        $ravi_paid = count($paid_stud);
                        $cash_amount = 0;
                        $cheque_amount = 0;
                        foreach ($paid_stud as $stud_id) {
                            $amount_data = FeesPaymentTransaction::model()->findAll('fees_student_id=' . $stud_id['student_transaction_id'] . ' and fees_academic_term_id=' . $list['fees_academic_term_name_id']);
                            foreach ($amount_data as $cash_cheque_list) {
                                if ($cash_cheque_list['fees_payment_method_id'] == 1) {
                                    $cash_amount += FeesPaymentCash::model()->findByPk($cash_cheque_list['fees_payment_cash_cheque_id'])->fees_payment_cash_amount;
                                } else {
                                    $amount = FeesPaymentCheque::model()->findByAttributes(array('fees_payment_cheque_status' => 0, 'fees_payment_cheque_id' => $cash_cheque_list->fees_payment_cash_cheque_id));
                                    $cheque_amount = $cheque_amount + $amount['fees_payment_cheque_amount'];
                                }
                            }
                        }
                        $total_receive_amount[] = $cash_amount + $cheque_amount;
                        $unpaid_stud = Yii::app()->db->createCommand()->selectDistinct('stud.student_transaction_id,stud.student_transaction_student_id,stud.student_transaction_quota_id')->from('student_transaction stud')->where('stud.student_transaction_id NOT IN (SELECT fees_student_id FROM fees_payment_transaction)
				AND stud.student_transaction_branch_id = :branch_id AND stud.student_academic_term_period_tran_id = :acm_id AND stud.student_academic_term_name_id = :acm_name_id', array(':branch_id' => $list['fees_branch_id'], ':acm_id' => $list['fees_academic_term_id'], ':acm_name_id' => $list['fees_academic_term_name_id']))->queryAll();
                        $unpaid_stud_count[] = $ravi_total - $ravi_paid;
                        //$unpaid_stud_count[] = count($unpaid_stud);
                        $total_amount_data = FeesMaster::model()->findAll('fees_branch_id =' . $list['fees_branch_id'] . ' AND
					  fees_academic_term_id =' . $list['fees_academic_term_id'] . ' AND
					  fees_academic_term_name_id =' . $list['fees_academic_term_name_id']);
                        $fees_stru = Yii::app()->db->createCommand()->select('fees.fees_master_id ,  stud.student_transaction_student_id, stud.student_academic_term_period_tran_id, stud.student_academic_term_name_id')->from('student_transaction stud')->join('fees_master fees', 'stud.student_transaction_branch_id = fees.fees_branch_id
		AND stud.student_academic_term_period_tran_id = fees.fees_academic_term_id
		AND stud.student_academic_term_name_id = fees.fees_academic_term_name_id 	

		AND stud.student_transaction_quota_id = fees.fees_quota_id')->where('stud.student_academic_term_period_tran_id = :term_p_id AND stud.student_academic_term_name_id = :term_name_id AND fees.fees_master_id = :fees_id', array(':fees_id' => $list['fees_master_id'], ':term_p_id' => $list['fees_academic_term_id'], ':term_name_id' => $list['fees_academic_term_name_id']))->queryAll();
                        //print_r($fees_stru); exit;
                        $total = 0;
                        foreach ($fees_stru as $fees_data1) {
                            $student_fees = StudentFeesMaster::model()->findAll('fees_master_table_id = :fees_master_id AND student_fees_master_student_transaction_id = :student_id', array(':fees_master_id' => $fees_data1['fees_master_id'], ':student_id' => $fees_data1['student_transaction_student_id']));
                            foreach ($student_fees as $fees_data1) {
                                $total += $fees_data1->fees_details_amount;
                            }
                        }
                        //print $total; exit;
                        $total_amount[] = $total;
                    }
                }
                if (isset($_REQUEST['MISexport'])) {
                    Yii::import('application.extensions.tcpdf.*');
                    require_once 'tcpdf/tcpdf.php';
                    require_once 'tcpdf/config/lang/eng.php';
                    $html = $this->renderPartial('report_view_pdf', array('numStud' => $numStud, 'fees_data' => $fees_data, 'paid_stud_count' => $paid_stud_count, 'unpaid_stud_count' => $unpaid_stud_count, 'total_amount' => $total_amount, 'total_receive_amount' => $total_receive_amount), true);
                    ob_clean();
                    $pdf = new TCPDF();
                    $pdf->SetCreator(PDF_CREATOR);
                    $pdf->SetAuthor(Yii::app()->name);
                    $pdf->SetTitle('MIS Report');
                    $pdf->SetSubject('MIS Report');
                    $pdf->SetKeywords('example, text, report');
                    $pdf->SetHeaderData('', 0, "Fees Summary", '');
                    //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Example Report by ".Yii::app()->name, "");
                    $pdf->setHeaderFont(array('helvetica', '', 8));
                    $pdf->setFooterFont(array('helvetica', '', 6));
                    $pdf->SetMargins(15, 18, 15);
                    $pdf->SetHeaderMargin(5);
                    $pdf->SetFooterMargin(10);
                    $pdf->SetAutoPageBreak(TRUE, 15);
                    $pdf->SetFont('dejavusans', '', 7);
                    $resolution = array(150, 150);
                    $pdf->AddPage('P', $resolution);
                    $pdf->writeHTML($html, true, false, true, false, '');
                    $pdf->LastPage();
                    $pdf->Output("MIS.pdf", "I");
                }
                if (isset($_REQUEST['MISexportexcel'])) {
                    Yii::app()->request->sendFile(date('YmdHis') . '.xlsx', $this->renderPartial('report_view_pdf', array('numStud' => $numStud, 'fees_data' => $fees_data, 'paid_stud_count' => $paid_stud_count, 'unpaid_stud_count' => $unpaid_stud_count, 'total_amount' => $total_amount, 'total_receive_amount' => $total_receive_amount), true));
                }
                $this->render('create_report', array('numStud' => $numStud, 'fees_data' => $fees_data, 'paid_stud_count' => $paid_stud_count, 'unpaid_stud_count' => $unpaid_stud_count, 'total_amount' => $total_amount, 'total_receive_amount' => $total_receive_amount));
            } else {
                $this->render('error_msg', array());
            }
        } else {
//.........这里部分代码省略.........
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:101,代码来源:FeesPaymentTransactionController.php

示例6: actionGeneratePdf

 public function actionGeneratePdf()
 {
     $session = new CHttpSession();
     $session->open();
     Yii::import('application.extensions.ajaxgii.bootstrap.*');
     require_once 'tcpdf/tcpdf.php';
     require_once 'tcpdf/config/lang/eng.php';
     $Criteria = new CDbCriteria();
     $Criteria->condition = "id != -1";
     $model = Materia::model()->findAll($Criteria);
     $html = $this->renderPartial('expenseGridtoReport', array('model' => $model), true);
     $pdf = new TCPDF();
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor(Yii::app()->name);
     $pdf->SetTitle('Materia Report');
     $pdf->SetSubject('Materia Report');
     $pdf->SetHeaderData('', 0, "Report", '');
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Reporte generado por " . Yii::app()->name, "");
     $pdf->setHeaderFont(array('helvetica', '', 8));
     $pdf->setFooterFont(array('helvetica', '', 6));
     $pdf->SetMargins(15, 18, 15);
     $pdf->SetHeaderMargin(5);
     $pdf->SetFooterMargin(10);
     $pdf->SetAutoPageBreak(TRUE, 0);
     $pdf->SetFont('dejavusans', '', 7);
     $pdf->AddPage();
     $pdf->writeHTML($html, true, false, true, false, '');
     $pdf->LastPage();
     $pdf->Output("Materia_002.pdf", "I");
 }
开发者ID:AndressJose,项目名称:sistema-examenes,代码行数:30,代码来源:MateriaController.php

示例7: actionSelectedEmployeeList

 public function actionSelectedEmployeeList()
 {
     if (!empty($_REQUEST['employeelistexport'])) {
         $query = $_SESSION['query'];
         $selected_list = $_SESSION['selected_list'];
         $employee_data = Yii::app()->db->createCommand()->select('*')->from('employee_transaction emp')->join('employee_info emp_info', 'emp_info.employee_id = emp.employee_transaction_employee_id')->leftJoin('employee_address add', 'add.employee_address_id = emp.employee_transaction_emp_address_id')->where($query . ' emp.employee_transaction_organization_id=' . Yii::app()->user->getState('org_id'))->queryAll();
         Yii::import('application.extensions.tcpdf.*');
         require_once 'tcpdf/tcpdf.php';
         require_once 'tcpdf/config/lang/eng.php';
         $html = $this->renderPartial('emp_report_view_pdf', array('emp_data' => $employee_data, 'selected_emp_list' => $selected_list), true);
         ob_clean();
         $pdf = new TCPDF();
         $pdf->SetCreator(PDF_CREATOR);
         $pdf->SetAuthor(Yii::app()->name);
         $pdf->SetTitle('EmployeeList Report');
         $pdf->SetSubject('EmployeeList Report');
         $pdf->SetKeywords('example, text, report');
         $pdf->SetHeaderData('', 0, "Employee Info Report", '');
         //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Example Report by ".Yii::app()->name, "");
         $pdf->setHeaderFont(array('helvetica', '', 8));
         $pdf->setFooterFont(array('helvetica', '', 6));
         $pdf->SetMargins(15, 18, 15);
         $pdf->SetHeaderMargin(5);
         $pdf->SetFooterMargin(10);
         $pdf->SetAutoPageBreak(TRUE, 15);
         $pdf->SetFont('dejavusans', '', 7);
         $resolution = array(150, 150);
         $pdf->AddPage('P', $resolution);
         $pdf->writeHTML($html, true, false, true, false, '');
         $pdf->LastPage();
         $pdf->Output("EmployeeInfoReport.pdf", "I");
     } else {
         if (!empty($_REQUEST['employeelistexcelexport'])) {
             $query = $_SESSION['query'];
             $selected_list = $_SESSION['selected_list'];
             $employee_data = Yii::app()->db->createCommand()->select('*')->from('employee_transaction emp')->join('employee_info emp_info', 'emp_info.employee_id = emp.employee_transaction_employee_id')->leftJoin('employee_address add', 'add.employee_address_id = emp.employee_transaction_emp_address_id')->where($query . ' emp.employee_transaction_organization_id=' . Yii::app()->user->getState('org_id'))->queryAll();
             Yii::app()->request->sendFile(date('YmdHis') . '.xlsx', $this->renderPartial('emp_report_view_excel', array('emp_data' => $employee_data, 'selected_emp_list' => $selected_list), true));
         } else {
             $query = $_POST['query'];
             $selected_list = null;
         }
     }
     $baseUrl = Yii::app()->baseUrl;
     $cs = Yii::app()->getClientScript();
     $cs->registerCssFile($baseUrl . '/css/report.css');
 }
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:46,代码来源:ReportController.php

示例8: actionGeneratePdf

 public function actionGeneratePdf()
 {
     $session = new CHttpSession();
     $session->open();
     Yii::import('application.extensions.ajaxgii.bootstrap.*');
     require_once 'tcpdf/tcpdf.php';
     require_once 'tcpdf/config/lang/eng.php';
     if (isset($session['Plan_records'])) {
         $model = $session['Plan_records'];
     } else {
         $model = Plan::model()->findAll();
     }
     $criteria = new CDbCriteria();
     $criteria->order = 'anioPlan';
     $model = Plan::model()->findAll($criteria);
     $html = $this->renderPartial('expenseGridtoReport', array('model' => $model), true);
     //die($html);
     $pdf = new TCPDF();
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor(Yii::app()->name);
     $pdf->SetTitle('Plan Report');
     $pdf->SetSubject('Plan Report');
     //$pdf->SetKeywords('example, text, report');
     $pdf->SetHeaderData('', 0, "Report", '');
     $pdf->SetHeaderData(PDF_HEADER_LOGO, 10, "Reporte generado por " . Yii::app()->name, "");
     $pdf->setHeaderFont(array('helvetica', '', 8));
     $pdf->setFooterFont(array('helvetica', '', 6));
     $pdf->SetMargins(15, 18, 15);
     $pdf->SetHeaderMargin(5);
     $pdf->SetFooterMargin(10);
     $pdf->SetAutoPageBreak(TRUE, 0);
     $pdf->SetFont('dejavusans', '', 7);
     $pdf->AddPage();
     $pdf->writeHTML($html, true, false, true, false, '');
     $pdf->LastPage();
     $pdf->Output("Plan_002.pdf", "I");
 }
开发者ID:AndressJose,项目名称:sistema-examenes,代码行数:37,代码来源:PlanController.php

示例9: exporttopdf

 public function exporttopdf($title, $filename, $html)
 {
     Yii::import('application.extensions.tcpdf.*');
     require_once 'tcpdf/tcpdf.php';
     require_once 'tcpdf/config/lang/eng.php';
     ob_clean();
     $pdf = new TCPDF();
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor(Yii::app()->name);
     $pdf->SetTitle($title);
     $pdf->SetSubject($title);
     $pdf->SetKeywords('example, text, report');
     $pdf->SetHeaderData('', 0, "Student Report", '');
     //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Example Report by ".Yii::app()->name, "");
     $pdf->setHeaderFont(array('helvetica', '', 8));
     $pdf->setFooterFont(array('helvetica', '', 6));
     $pdf->SetMargins(15, 18, 15);
     $pdf->SetHeaderMargin(5);
     $pdf->SetFooterMargin(10);
     $pdf->SetAutoPageBreak(TRUE, 15);
     $pdf->SetFont('dejavusans', '', 7);
     $resolution = array(150, 150);
     $pdf->AddPage('P', $resolution);
     $pdf->writeHTML($html, true, false, true, false, '');
     $pdf->LastPage();
     $pdf->Output($filename, "I");
 }
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:27,代码来源:ExportToPdf.php


注:本文中的TCPDF::LastPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。