コード例 #1
0
 /** @Functions que permiten generar PDF's con reportes
     /**************************************************************************/
 public function reporte_medicamentos()
 {
     // Carga de datos
     $data_meds = $this->gestion->get_medicamentos();
     $tmp_meds = $this->templates->tmp_reporte_medicamentos($data_meds);
     // Generacion de PDF
     $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('Sysmedcloud');
     $pdf->SetTitle('Reporte de Medicamentos');
     $pdf->SetSubject('');
     $pdf->SetKeywords('');
     $pdf->SetHeaderData('logo.png', PDF_HEADER_LOGO_WIDTH + 20, 'Reporte', 'Medicamentos', array(0, 64, 255), array(0, 64, 128));
     $pdf->setFooterData($tc = array(0, 64, 0), $lc = array(0, 64, 128));
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
     $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     $pdf->setFontSubsetting(true);
     $pdf->SetFont('Helvetica', '', 8, '', true);
     $pdf->AddPage();
     $pdf->writeHTML($tmp_meds, true, 0, true, 0);
     $nombre_archivo = utf8_decode("reporte-medicamentos-" . date("d") . "_" . date("m") . "_" . date("Y") . ".pdf");
     $pdf->Output($nombre_archivo, 'I');
 }
コード例 #2
0
 public function GeneraPdf($html, $nombre)
 {
     $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('');
     $pdf->SetTitle('');
     $pdf->SetSubject('');
     $pdf->SetKeywords('');
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . '', PDF_HEADER_STRING, array(255, 255, 255), array(255, 255, 255));
     $pdf->SetFooterData($tc = array(0, 64, 0), $lc = array(255, 255, 255));
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
     $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     $pdf->setFontSubsetting(true);
     $pdf->SetFont('helvetica', '', 10, '', true);
     $pdf->AddPage();
     $pdf->writeHTML($html, true, false, true, false, '');
     $nombre_archivo = utf8_decode($nombre . date('Y-m-d-His') . ".pdf");
     $pdf->Output($nombre_archivo, 'I');
 }
コード例 #3
0
ファイル: receipt.php プロジェクト: FaithMaina/Rentit
    function index()
    {
        $this->load->library('Pdf');
        $userdata = $this->session->all_userdata();
        $data['email'] = $userdata['email'];
        $this->load->model('tenants_model');
        $data['tenant_detail'] = $this->tenants_model->get_unit($data['email']);
        $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
        $pdf->SetTitle('Rent Receipt');
        $pdf->SetHeaderMargin(30);
        $pdf->SetTopMargin(20);
        $pdf->setFooterMargin(20);
        $pdf->SetAutoPageBreak(true);
        $pdf->SetAuthor('Rentit Agency');
        $pdf->SetDisplayMode('real', 'default');
        $pdf->AddPage();
        $html = <<<EOD
<table cellspacing="3" cellpadding="6" border="">

 

\t\t  
\t\t  
EOD;
        $pdf->Ln();
        $html .= "<tr><td>";
        $html .= "<b>RENTIT AGENCY<br />RENT RECEIPT</b>";
        $html .= "</td><td>";
        $this->load->helper('date');
        $datestring = "%Y-%m-%d ";
        $date = mdate($datestring);
        $html .= "<b>Date Received: </b> {$date} <br />";
        $html .= "<br /><b>Received From: </b> ";
        $html .= $userdata['email'];
        '<br />';
        $html .= "<br /><br/><b>The sum of: </b> KeS ";
        $html .= $userdata['amount'];
        '<br />';
        $html .= "</td></tr>";
        $html .= "<tr><td colspan=2>";
        $html .= "<b>For Rent at:</b> ";
        $html .= $data['tenant_detail'][0]['block_name'];
        $html .= " house, ";
        $html .= $data['tenant_detail'][0]['unitname'];
        ',';
        $html .= "<br /><br /><b>Rent Period Starting</b>: ";
        $html .= $data['tenant_detail'][0]['occupation_date'];
        ',<br />';
        $html .= "<br /><br /><b>Received by: </b> Rentit Agency";
        $html .= "</td></tr>";
        $html .= "</table>";
        $pdf->writeHTML($html, true, false, false, false, '');
        ob_clean();
        $pdf->Output('Receipt.pdf', 'I');
    }
コード例 #4
0
ファイル: productprint.php プロジェクト: krisldz/Gekosale2
 public function index()
 {
     if (strlen($this->getParam()) == 0) {
         App::redirectUrl($this->registry->router->generate('frontend.home', true));
     }
     $product = App::getModel('product/product')->getProductAndAttributesById((int) $this->registry->core->getParam());
     $range = App::getModel('product/product')->getRangeType((int) $this->registry->core->getParam());
     App::getModel('product/product')->getPhotos($product);
     if (empty($product)) {
         App::redirectUrl($this->registry->router->generate('frontend.home', true));
     }
     $product['photo']['normal'][0] = 'design/' . str_replace(DESIGNPATH, '', $product['photo']['normal'][0]);
     $selectAttributes = App::getModel('product/product')->getProductAttributeGroups($product);
     $attset = App::getModel('product/product')->getProductVariant($product);
     $this->registry->template->assign('product', $product);
     $this->registry->template->assign('attributes', $selectAttributes);
     $this->registry->template->assign('attset', $attset);
     $this->registry->template->assign('ROOTPATH', ROOTPATH);
     $htmlcontent = $this->registry->template->fetch($this->loadTemplate('index.tpl'));
     $pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('Gekosale');
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
     $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     $pdf->setLanguageArray(1);
     $pdf->SetFont('dejavusans', '', 10);
     $pdf->AddPage();
     $pdf->writeHTML($htmlcontent, true, 0, true, 0);
     @ob_clean();
     $pdf->Output($product['seo'], 'D');
 }
コード例 #5
0
ファイル: RollNoSlip_.php プロジェクト: shahid1376/adminbise
 public function MatricRollNoGroupwise()
 {
     // DebugBreak()  ;
     $this->load->helper('url');
     //Load the library
     $this->load->library('html2pdf');
     $grp_cd = $this->uri->segment(3);
     $sess = 1;
     $class = 10;
     $year = 2016;
     $this->load->library('session');
     $Logged_In_Array = $this->session->all_userdata();
     $user = $Logged_In_Array['logged_in'];
     //DebugBreak();
     $this->load->library('Pdf');
     $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
     $pdf->setHeaderData('', 0, '', '', array(0, 0, 0), array(255, 255, 255));
     $pdf->SetPrintHeader(false);
     $pdf->SetPrintFooter(false);
     $pdf->SetTitle('Matric Roll Number Slip');
     $pdf->SetHeaderMargin(1);
     $pdf->SetTopMargin(1);
     $pdf->setFooterMargin(1);
     $pdf->SetFont('helvetica', '', 8);
     $pdf->SetAutoPageBreak(TRUE, 0);
     $pdf->SetAuthor('BiseGrw');
     $pdf->SetMargins(4, 1, 4, true);
     $Inst_Id = $user['Inst_Id'];
     $this->load->model('RollNoSlip_model');
     // DebugBreak();
     $studeninfo = array('data' => $this->RollNoSlip_model->get10thrslipWith_Grp_CD($class, $year, $sess, $grp_cd, $Inst_Id));
     $template_pdf = '';
     $totalslips = count($studeninfo['data']['slip']);
     $studentslip = array();
     //DebugBreak();
     for ($i = 0; $i < count($studeninfo['data']['info']); $i++) {
         $pdf->AddPage();
         $rno = $studeninfo['data']['info'][$i]['Rno'];
         $temp = "{$rno}@{$class}@{$sess}@{$year}@{$Inst_Id}";
         $image = $this->set_barcode($temp);
         $studeninfo['data']['info'][$i]['barcode'] = $image;
         for ($j = 0; $j < $totalslips; $j++) {
             if ($rno == $studeninfo['data']['slip'][$j]['rno']) {
                 $studeninfo['data']['info'][$i]['slips'][] = $studeninfo['data']['slip'][$j];
             }
         }
         // DebugBreak();
         $html = $this->load->view('RollNoSlip/MatricRollNoCombine', $studeninfo['data']['info'][$i], true);
         $pdf->writeHTML($html, true, false, true, false, '');
         if ($i == 0) {
             break;
         }
     }
     $pdf->Output('pdfexample.pdf', 'I');
     //$this->html2pdf->html($this->load->view('RollNoSlip/MatricRollNoCombine', $studeninfo['data'], true));
     //  $this->html2pdf->html($template_pdf);
     /* if($this->html2pdf->create('downlaod')) {
        if($class == 10)
        redirect('RollNoSlip/TenthStd');
        else if($class == 9)
        redirect('RollNoSlip/NinthStd');
        }      */
 }
コード例 #6
0
 public function printAbstract($title = "", $vendorName, $total, $startDate, $endDate)
 {
     set_time_limit(0);
     $pdf = new Pdf("P", PDF_UNIT, "A4", true, 'UTF-8', false);
     $date = date('d-m-Y');
     $filename = $vendorName . "_" . $startDate . "_" . $endDate . "_" . $date;
     // set header and footer fonts
     // set margins
     $pdf->setTitle('');
     $pdf->Header();
     $pdf->Footer();
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT, true);
     $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
     //$pdf->SetMargins (15, 27, 15, true);
     $pdf->SetFont('times', '', 14);
     $pdf->SetAutoPageBreak(TRUE, 50);
     $pdf->AddPage();
     $pdf->Cell(0, 0, 'ENGINEERING COLLEGE HOSTELS', 0, 0, 'C');
     $pdf->Ln();
     $pdf->SetFont('times', '', 12);
     $pdf->Cell(0, 0, 'COLLEGE OF ENGINEERING, GUINDY', 0, 0, 'C');
     $pdf->Ln();
     $pdf->Cell(0, 0, 'ANNA UNIVERSITY, CHENNAI-25', 0, 0, 'C');
     $pdf->Ln();
     $pdf->SetFont('times', '', 14);
     $pdf->Cell(0, 0, 'ABSTRACT OF SUPPLIER\'S BILL', 0, 0, 'C');
     $pdf->Ln();
     $pdf->Ln();
     $pdf->SetFont('times', '', 14);
     $text = "BILL RECEIVED FROM " . $vendorName . " FOR THE SUPPLIES MADE";
     $pdf->Cell(0, 0, $text, 0, 0, 'L');
     if ($startDate == $endDate) {
         $text = "ON " . $startDate;
     } else {
         $text = "BETWEEN " . $startDate . " AND " . $endDate;
     }
     $pdf->Ln();
     $pdf->Cell(0, 0, $text, 0, 0, 'L');
     $pdf->SetFont('times', '', 12);
     $html = "";
     //create html
     $html .= '<html><head><title>Report</title>';
     $html .= '</head><body >';
     $base_path = base_url();
     $html .= '<style>tr,th{border: 1px solid black;}</style>';
     $html .= $_POST['toSend'];
     $html .= '</body></html>';
     $pdf->writeHTML($html, false, false, false, false, '');
     $inWords = $this->convert_number($total);
     $text = "BILL PASSED FOR RUPEES " . $inWords;
     $pdf->SetFont('times', '', 14);
     $pdf->Ln();
     $pdf->Cell(0, 0, $text, 0, 0, 'L');
     $pdf->Ln();
     $pdf->Ln();
     $pdf->Ln();
     $pdf->Ln();
     $pdf->Ln();
     $html = '<table><tr><th>Store Manager</th><th>Deputy Warden</th><th>Hostel Warden</th></tr></table>';
     $pdf->writeHTML($html, false, false, false, false, '');
     //	$pdf->Output('C:\xampp\htdocs\cegMessStore\reports\report.pdf', 'FD');  //save pdf
     if (strpos($title, "Vegetable") !== false) {
         $dir = "Vegetable Abstract/" . $filename . ".pdf";
     } else {
         $dir = "Items Abstract/" . $filename . ".pdf";
     }
     $pdf->Output("/var/www/cegMessStore/reports/" . $dir, 'FD');
     //save pdf
     //		$pdf->Output('file.pdf', 'I'); // show pdf
     return true;
 }
コード例 #7
0
ファイル: invoice.php プロジェクト: krisldz/Gekosale2
    public function exportInvoice($ids)
    {
        $pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8');
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetAuthor('Gekosale');
        $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
        $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
        $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $pdf->setLanguageArray(1);
        $pdf->SetFont('dejavusans', '', 10);
        $sql = 'SELECT 
					*
				FROM invoice
				WHERE 
					idinvoice IN (' . implode(',', $ids) . ')';
        $stmt = Db::getInstance()->prepare($sql);
        $stmt->execute();
        $Data = array();
        while ($rs = $stmt->fetch()) {
            switch ($rs['contenttype']) {
                case 'html':
                    $data = $rs['contentcopy'];
                    $pdf->AddPage();
                    $pdf->writeHTML($data, true, 0, true, 0);
                    break;
            }
        }
        @ob_clean();
        $pdf->Output('Faktury z ' . date('Y-m-d'), 'D');
    }
コード例 #8
0
    function export_pdf39()
    {
        $this->load->library('pdf');
        ob_clean();
        $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
        $tbl = '';
        $tbl .= '
				<h3><u>MASTER DIAGNOSA</u></h3>
				<table border="0"  cellpadding="0" cellspacing="0" >
				 <tr >';
        $tbl .= '<th  align="center" bgcolor="#359AFF" width="30" >NO</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >DIAG_KODE</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="230" >DIAG_NAMA</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="80" >ST_DIAG</th>';
        $tbl .= '</tr>';
        $sql = "select diag_kode, diag_nama, diag_level,case when diag_aktif=1 then 'aktif' else 'tidak aktif' end \nas st_diag,  diag_aktif,diag_id from billing.b_ms_diagnosa";
        $data = $this->m_global->grid_view($sql)->result_array();
        $no = 1;
        foreach ($data as $row) {
            $bg = $no % 2;
            if ($bg == 0) {
                $bg = ' bgcolor="#E1F0FF" ';
            } else {
                $bg = ' bgcolor="#FFFFFF" ';
            }
            $tbl .= '
					<tr>
					<td ' . $bg . '  align="center" width="30">' . $no . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['diag_kode'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="230" >' . $row['diag_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="80" >' . $row['st_diag'] . '</td>';
            $tbl .= '</tr>';
            $no++;
        }
        $tbl .= '</table>';
        $pdf->AddPage();
        $pdf->SetFont('helvetica', '', 8);
        $pdf->writeHTML($tbl, true, false, false, false, '');
        $pdf->Output('example_048.pdf', 'I');
    }
コード例 #9
0
ファイル: voter_model.php プロジェクト: pjsangat/lgu
 public function generate_letter_support_pdf($arrData, $pData)
 {
     $this->load->model('setup_model');
     $letter = $this->setup_model->get_by(array('name' => 'Letter'));
     $ward_letter = $this->setup_model->get_by(array('name' => 'Ward Leader Letter'));
     $support_letter = $this->setup_model->get_by(array('name' => 'Letter of Support'));
     $this->load->library('pdf');
     $pdf = new Pdf('L', 'mm', 'LETTER', true, 'ISO-8859-1', false);
     $pdf->SetTitle($pData['brgy'] . '-LETTER-' . date("YmdHis"));
     $pdf->SetHeaderMargin(0);
     $pdf->SetTopMargin(10);
     $pdf->SetLeftMargin(20);
     $pdf->SetRightMargin(20);
     $pdf->setFooterMargin(10);
     $pdf->SetAutoPageBreak(true, 10);
     $pdf->SetFontSize(10);
     $pdf->SetAuthor('Author');
     // set font
     $pdf->SetFont('freeserif', '', 10);
     $ctr = 0;
     foreach ($arrData as $result) {
         if ($ctr % 2 == 0) {
             $pdf->AddPage('P', 'LEGAL');
             $pdf->setY(15);
         } else {
             $pdf->setY(190);
         }
         $result = (object) $result;
         $voter_name = explode(",", htmlentities($result->full_name));
         $html = "";
         $html .= "<br/>";
         $html .= '<b>' . trim(htmlentities($result->full_name)) . '</b>';
         $html .= "<br/>";
         $html .= '<b>' . trim($result->brgy) . '</b>';
         $html .= "<br/>";
         $html .= '<b>' . trim($result->precinct) . '</b>';
         $html .= "<br/>";
         $html .= "<br/>";
         $html .= 'Minamahal na <b>' . (trim($result->gender) == 'M' ? 'G.' : 'Bb/Gng.') . " " . ucfirst(trim(strtolower(htmlentities($voter_name[0])))) . ":</b>";
         $html .= "<br/>";
         //            $html .= $is_ward ? $ward_letter['content'] : $letter['content'];
         $html .= $support_letter['content'];
         $html .= "<br/>";
         $html .= '<table>' . '<tr>' . '<td width="60%"></td>' . '<td>Gumagalang, </td>' . '</tr>' . '<tr>' . '<td width="60%"></td>' . '</tr>' . '<tr>' . '<td width="50%" align="center"><b> <img src="' . base_url('assets/images/alexander_pajarillo_sign.jpg') . '" height="55" width="150"/></b></td>' . '<td width="50%" align="center"><b> <img src="' . base_url('assets/images/edgardo_tallado_sign.jpg') . '" height="55" width="150"/></b></td>' . '</tr>' . '<tr>' . '<td width="50%" align="center"><i>Mayor</i></td>' . '<td width="50%" align="center"><i>Governor</i></td>' . '</tr>' . '<tr>' . '<td width="60%"></td>' . '</tr>' . '<tr>' . '<td width="100%" align="center"><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>' . trim(htmlentities($result->full_name)) . '</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></td>' . '</tr>' . '<tr>' . '<td width="100%" align="center">Lagda</td>' . '</tr>' . '</table>';
         $pdf->writeHTML($html, true, false, false, false, '');
         $ctr++;
         //            if($ctr == 1){
         //                $pdf->setY(100);
         //                $ctr = 0;
         //            }
     }
     $pdf->Output('letter.pdf', 'I');
     exit;
     pe($letter);
 }
コード例 #10
0
ファイル: barangay_model.php プロジェクト: pjsangat/lgu
 public function print_brgy_leaders($voter_data = array(), $data = array())
 {
     $this->load->library('pdf');
     $pdf = new Pdf('L', 'mm', 'LETTER', true, 'UTF-8', false);
     $pdf->SetTitle('My Title');
     $pdf->SetHeaderMargin(30);
     $pdf->SetTopMargin(20);
     $pdf->setFooterMargin(10);
     $pdf->SetAutoPageBreak(true, 15);
     $pdf->SetAuthor('Author');
     $pdf->AddPage('L', 'LEGAL');
     $pdf->setY(30);
     $html = '';
     $html .= '<div style="text-align: center;"><b>Brgy Leaders</b> for<br/><b>' . $data['brgy'] . '</b></div>';
     $html .= '<br/>';
     $html .= '<br/>';
     $html .= '<table style="border: 1px solid #000;border-collapse: collapse;" border="1" cellspacing="0" cellpadding="1">';
     $html .= '<thead>';
     $html .= '<tr style="background-color: #a8a8a8;">';
     $html .= '<th align="center" width="5%"></th>';
     $html .= '<th align="center" width="45%"><b>Voter\'s Name</b></th>';
     $html .= '<th align="center" width="30%"><b>Precinct No</b></th>';
     $html .= '<th align="center" width="20%"><b>Type</b></th>';
     $html .= '</tr>';
     $html .= '</thead>';
     if (count($voter_data) > 0) {
         $x = 1;
         foreach ($voter_data as $type => $val) {
             for ($ctr = 0; $ctr < count($val); $ctr++) {
                 $html .= '<tr nobr="true">';
                 $html .= '<td align="center" width="5%">' . $x . '.</td>';
                 $html .= '<td width="45%"> &nbsp;&nbsp;&nbsp;' . $val[$ctr]['full_name'] . '</td>';
                 $html .= '<td width="30%"> &nbsp;&nbsp;&nbsp;' . $val[$ctr]['precinct_no'] . '</td>';
                 $html .= '<td width="20%"> &nbsp;&nbsp;&nbsp;' . $val[$ctr]['type'] . '</td>';
                 $html .= '</tr>';
                 $x++;
             }
         }
     } else {
         $html .= '<tr>';
         $html .= '<td align="center" width="100%">No record found..</td>';
         $html .= '</tr>';
     }
     $html .= '</table>';
     $pdf->writeHTML($html, true, false, false, false, '');
     $pdf->Output('brgy_leaders_report.pdf', 'I');
 }
コード例 #11
0
    function pdf()
    {
        $data['matricula'] = $this->input->post('matricula');
        $data['nombre'] = $this->input->post('nombre');
        $data['paterno'] = $this->input->post('paterno');
        $data['materno'] = $this->input->post('materno');
        $data['fecha_carga'] = $this->input->post('fecha_carga');
        $data['id_archivo'] = $this->input->post('id_archivo');
        $data['curp'] = $this->input->post('curp');
        $data['correo'] = $this->input->post('correo');
        $data['tel'] = $this->input->post('tel');
        $data['institucion'] = $this->input->post('institucion');
        $data['plantel'] = $this->input->post('plantel');
        $data['grado'] = $this->input->post('grado');
        $data['turno'] = $this->input->post('turno');
        $data['promedio'] = $this->input->post('promedio');
        $data['modalidad'] = $this->input->post('sistema');
        $data['padre'] = $this->input->post('padre');
        $data['madre'] = $this->input->post('madre');
        $data['ecivil'] = $this->input->post('e_civil');
        $data['sexo'] = $this->input->post('sexo');
        $data['fecha_nac'] = $this->input->post('fecha_nac');
        //$data['']= $this->input->post('');
        $data['cel'] = $this->input->post('cel');
        if ($data['cel'] == '') {
            $data['cel'] = '----';
        }
        $data['calle'] = $this->input->post('calle');
        if ($data['calle'] == '') {
            $data['calle'] = '----';
        }
        $data['noext'] = $this->input->post('noext');
        if ($data['noext'] == '') {
            $data['noext'] = '----';
        }
        $data['noint'] = $this->input->post('noint');
        if ($data['noint'] == '') {
            $data['noint'] = '----';
        }
        $data['manzana'] = $this->input->post('manzana');
        if ($data['manzana'] == '') {
            $data['manzana'] = '----';
        }
        $data['lote'] = $this->input->post('lote');
        if ($data['lote'] == '') {
            $data['lote'] = '----';
        }
        $data['noedif'] = $this->input->post('noedif');
        if ($data['noedif'] == '') {
            $data['noedif'] = '----';
        }
        $data['nodpto'] = $this->input->post('nodpto');
        if ($data['nodpto'] == '') {
            $data['nodpto'] = '----';
        }
        $data['andador'] = $this->input->post('andador');
        if ($data['andador'] == '') {
            $data['andador'] = '----';
        }
        $data['rampa'] = $this->input->post('rampa');
        if ($data['rampa'] == '') {
            $data['rampa'] = '----';
        }
        $data['pasillo'] = $this->input->post('pasillo');
        if ($data['pasillo'] == '') {
            $data['pasillo'] = '----';
        }
        $data['villa'] = $this->input->post('villa');
        if ($data['villa'] == '') {
            $data['villa'] = '----';
        }
        $data['entrada'] = $this->input->post('entrada');
        if ($data['entrada'] == '') {
            $data['entrada'] = '----';
        }
        $data['colonia'] = $this->input->post('colonia');
        if ($data['colonia'] == '') {
            $data['colonia'] = '----';
        }
        $data['delegacion'] = $this->input->post('delegacion');
        if ($data['delegacion'] == '') {
            $data['delegacion'] = '----';
        }
        $data['cp'] = $this->input->post('cp');
        if ($data['cp'] == '') {
            $data['cp'] = '----';
        }
        $this->load->library('Pdf');
        $pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetAuthor('Cony Jaramillo');
        $pdf->SetTitle('Documentos Prepa Si');
        $pdf->SetSubject('Reimpresión de Documentos');
        $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
        ob_start();
        //remove default header/footer
        $pdf->setPrintHeader(false);
        $pdf->setPrintFooter(false);
        // set default header data
        // set margins
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        //$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
        // set image scale factor
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        // set some language-dependent strings (optional)
        if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
            require_once dirname(__FILE__) . '/lang/eng.php';
            $pdf->setLanguageArray($l);
        }
        ///////////////////////////////////////////////////---------------///////////////////////////////////////////////////
        ///////////////////////////////////////////////////FORMATO ENTREGA///////////////////////////////////////////////////
        ///////////////////////////////////////////////////---------------///////////////////////////////////////////////////
        // establecer el modo de fuente por defecto
        $pdf->setFontSubsetting(true);
        // Establecer el tipo de letra
        $pdf->SetFont('helvetica', '', 10);
        //Normal
        $arriba = 6;
        $izq = 10;
        $der = 10;
        $pdf->AddPage('L', 'LETTER');
        $pdf->SetFont('pdfahelvetica', '', 10);
        //Normal
        //$pdf->SetFont('pdfahelveticai', '', 10); // S
        $pdf->SetTextColor(0, 0, 0);
        $style = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,20,5,10', 'phase' => 10, 'color' => array(255, 0, 0));
        $style2 = array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));
        $style3 = array('width' => 0.2, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(0, 0, 0));
        $style4 = array('L' => 0, 'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)), 'R' => array('width' => 0.5, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)), 'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10'));
        $style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128));
        $style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0));
        $style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0));
        # Marco
        //$pdf->RoundedRect(5, 15-$arriba, 268, 200, 0, '1010', 'NULL');
        $pdf->RoundedRect(12, 15 - $arriba, 120, 200, 0, '1000', 'NULL');
        $pdf->RoundedRect(23 + 125, 15 - $arriba, 120, 200, 0, '1000', 'NULL');
        # Linea encabezado
        //$pdf->Line(15, 44, 264.4, 44, $style2);
        # Linea media punteada
        $pdf->Line(140, 5 - $arriba, 140, 210 + $arriba, $style3);
        # Logos de Encabezado
        $pdf->Image('resources/img/cdmx.png', 85 - $izq, 20 - $arriba, 50, 13, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);
        # Textos
        $pdf->Text(60 - $izq, 10 - $arriba, 'Formato para Prepa Sí');
        $pdf->SetFont('pdfahelveticab', '', 9);
        // Negrita
        $pdf->Text(35 - $izq, 40 - $arriba, 'Entrega – Recepción Documentos PREPA SÍ 2015-2016');
        $pdf->SetFont('pdfahelvetica', '', 9);
        // Normal
        $pdf->SetLineStyle(array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
        $pdf->RoundedRect(34 - $izq, 39 - $arriba, 87, 6, 3, '0000', 'NULL');
        $pdf->Text(44 - $izq, 51 - $arriba, 'Fecha de registro electrónico: ___________________');
        $pdf->Text(27 - $izq, 62 - $arriba, 'Nombre: ____________________________________________________');
        $pdf->Text(27 - $izq, 72 - $arriba, '1.- Solicitud de');
        $pdf->RoundedRect(126 - $izq, 72 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(27 - $izq, 80 - $arriba, '2.- Comprobante de domicilio, expedido dentro de los 3 meses');
        $pdf->Text(33 - $izq, 84 - $arriba, 'anteriores al mes en el que se realice la entrega de los');
        $pdf->Text(33 - $izq, 88 - $arriba, 'documentos (copia y original para cotejo):.....................................');
        $pdf->RoundedRect(126 - $izq, 88 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(27 - $izq, 96 - $arriba, '3.- Comprobante de Inscripcion (vigente), sellado por tu');
        $pdf->Text(32 - $izq, 100 - $arriba, ' institución educativa (copia y original para cotejo):........................');
        $pdf->RoundedRect(126 - $izq, 100 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(27 - $izq, 108 - $arriba, '4.- Comprobante de calificaciones vigente y sellado');
        $pdf->Text(32 - $izq, 112 - $arriba, '(copia y original para cotejo):...........................................................');
        $pdf->RoundedRect(126 - $izq, 112 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(27 - $izq, 120 - $arriba, '5.- Identificación con fotografia (copia y original para cotejo):..............');
        $pdf->RoundedRect(126 - $izq, 121 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(48 - $izq, 167 - $arriba, 'Fecha de recepción de expediente: ___________________');
        $pdf->Text(115 - $izq, 171 - $arriba, 'día/mes/año');
        $pdf->SetFont('pdfahelveticab', '', 8);
        //Negrita
        $pdf->Rect(25 - $izq, 161 + 15 - $arriba, 115, 16, 'DF', null, array(192, 192, 192));
        $pdf->Text(25 - $izq, 161 + 15 - $arriba, 'Tus documentos y datos, seran revisados en oficinas centrales. Si se detecta alguna');
        $pdf->Text(25 - $izq, 165 + 15 - $arriba, 'inconsistencia no procederá tu tramite en tanto no regularices la situación. Te lo');
        $pdf->Text(25 - $izq, 169 + 15 - $arriba, 'notificaremos vía correo electrónico, por lo que consúltalo regularmente, ya que de');
        $pdf->Text(25 - $izq, 173 + 15 - $arriba, 'no regularizarlo no podremos incorporarte al programa.');
        $pdf->SetFont('pdfahelvetica', '', 9);
        // Normal
        $pdf->endLayer();
        //***********************************************************hoja 2**********************************************************//////////
        # Logos de Encabezado
        $pdf->Image('resources/img/cdmx.png', 117 + 85 + $der, 20 - $arriba, 50, 13, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);
        # Textos
        $pdf->Text(127 + 55 + $der, 10 - $arriba, 'Formato para el Beneficiario');
        $pdf->SetFont('pdfahelveticab', '', 9);
        // Negrita
        $pdf->Text(114 + 45 + $der, 40 - $arriba, 'Entrega – Recepción Documentos PREPA SÍ 2015-2016');
        $pdf->SetFont('pdfahelvetica', '', 9);
        // Normal
        $pdf->SetLineStyle(array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
        $pdf->RoundedRect(158 + $der, 39 - $arriba, 87, 6, 3, '0000', 'NULL');
        $pdf->Text(115 + 50 + $der, 51 - $arriba, 'Fecha de registro electrónico: ___________________');
        $pdf->Text(115 + 27 + $der, 62 - $arriba, 'Nombre: ____________________________________________________');
        $pdf->Text(115 + 27 + $der, 72 - $arriba, '1.- Solicitud de');
        $pdf->RoundedRect(105 + 136 + $der, 72 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(115 + 27 + $der, 80 - $arriba, '2.- Comprobante de domicilio, expedido dentro de los 3 meses');
        $pdf->Text(115 + 33 + $der, 84 - $arriba, 'anteriores al mes en el que se realice la entrega de los');
        $pdf->Text(115 + 33 + $der, 88 - $arriba, 'documentos (copia y original para cotejo):.....................................');
        $pdf->RoundedRect(105 + 136 + $der, 88 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(115 + 27 + $der, 96 - $arriba, '3.- Comprobante de Inscripcion (vigente), sellado por tu');
        $pdf->Text(115 + 32 + $der, 100 - $arriba, 'institución educativa (copia y original para cotejo):.........................');
        $pdf->RoundedRect(105 + 136 + $der, 100 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(115 + 27 + $der, 108 - $arriba, '4.- Comprobante de calificaciones vigente y sellado');
        $pdf->Text(115 + 32 + $der, 112 - $arriba, '(copia y original para cotejo):...........................................................');
        $pdf->RoundedRect(105 + 136 + $der, 112 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(115 + 27 + $der, 120 - $arriba, '5.- Identificación con fotografia (copia y original para cotejo):..............');
        $pdf->RoundedRect(105 + 136 + $der, 121 - $arriba, 8, 5, 3, '0000', 'NULL');
        $pdf->Text(110 + 55 + $der, 167 - $arriba, 'Fecha de recepción de expediente: ___________________');
        $pdf->Text(110 + 122 + $der, 171 - $arriba, 'día/mes/año');
        if ($data['id_archivo'] == 1) {
            $pdf->SetFont('pdfahelvetica', '', 9);
            //$pdf->Text(17, 148+16, 'Entregó expediente _____________________________      ____________');
            $pdf->Text(27 - $izq, 128 + 17 - $arriba, 'Entregó expediente _____________________________     ____________');
            $pdf->SetFont('pdfahelvetica', '', 8);
            $pdf->Text(78 - $izq, 132 + 17 - $arriba, 'Nombre');
            $pdf->Text(118 - $izq, 132 + 17 - $arriba, 'Firma');
            $pdf->SetFont('pdfahelvetica', '', 9);
            //$pdf->Text(17, 136+16, 'Recibió / Cotejó: _______________________________      ____________');
            $pdf->Text(27 - $izq, 140 + 16 - $arriba, 'Recibió / Cotejó: _______________________________     ____________');
            $pdf->SetFont('pdfahelvetica', '', 8);
            $pdf->Text(78 - $izq, 146 + 14 - $arriba, 'Nombre');
            $pdf->Text(118 - $izq, 146 + 14 - $arriba, 'Firma');
            $pdf->SetFont('pdfahelvetica', '', 9);
            //$pdf->Text(124+17, 148+16, 'Entregó expediente _____________________________      ____________');
            $pdf->Text(27 + 115 + $der, 128 + 17 - $arriba, 'Entregó expediente _____________________________     ____________');
            $pdf->SetFont('pdfahelvetica', '', 8);
            $pdf->Text(78 + 115 + $der, 132 + 17 - $arriba, 'Nombre');
            $pdf->Text(118 + 115 + $der, 132 + 17 - $arriba, 'Firma');
            $pdf->SetFont('pdfahelvetica', '', 9);
            //$pdf->Text(124+17, 136+16, 'Recibió / Cotejó: _______________________________      ____________');
            $pdf->Text(27 + 115 + $der, 140 + 16 - $arriba, 'Recibió / Cotejó: _______________________________     ____________');
            $pdf->SetFont('pdfahelvetica', '', 8);
            $pdf->Text(78 + 115 + $der, 144 + 16 - $arriba, 'Nombre');
            $pdf->Text(118 + 115 + $der, 144 + 16 - $arriba, 'Firma');
        } else {
            $pdf->Text(27 - $izq, 136 - $arriba, 'Entregó expediente _____________________________     ____________');
            $pdf->Text(78 - $izq, 140 - $arriba, 'Nombre');
            $pdf->Text(118 - $izq, 140 - $arriba, 'Firma');
            $pdf->Text(27 - $izq, 149 + 3 - $arriba, 'Recibió / Cotejó: _______________________________     ____________');
            $pdf->Text(78 - $izq, 154 + 3 - $arriba, 'Nombre');
            $pdf->Text(118 - $izq, 154 + 3 - $arriba, 'Firma');
            $pdf->Text(27 + 115 + $der, 136 - $arriba, 'Entregó expediente _____________________________     ____________');
            $pdf->Text(78 + 115 + $der, 140 - $arriba, 'Nombre');
            $pdf->Text(118 + 115 + $der, 140 - $arriba, 'Firma');
            $pdf->Text(27 + 115 + $der, 149 + 3 - $arriba, 'Recibió / Cotejó: _______________________________     ____________');
            $pdf->Text(78 + 115 + $der, 154 + 3 - $arriba, 'Nombre');
            $pdf->Text(118 + 115 + $der, 154 + 3 - $arriba, 'Firma');
        }
        $pdf->SetFont('pdfahelveticab', '', 8);
        //Negrita
        $pdf->Rect(125 + 16 + $der, 161 + 15 - $arriba, 115, 16, 'DF', null, array(192, 192, 192));
        //$pdf->Rect(25-$izq, 163+15-$arriba, 115, 16, 'DF', null, array(192,192,192));
        $pdf->Text(125 + 16 + $der, 161 + 15 - $arriba, 'Tus documentos y datos, seran revisados en oficinas centrales. Si se detecta alguna');
        $pdf->Text(125 + 16 + $der, 165 + 15 - $arriba, 'inconsistencia no procederá tu tramite en tanto no regularices la situación. Te lo');
        $pdf->Text(125 + 16 + $der, 169 + 15 - $arriba, 'notificaremos vía correo electrónico, por lo que consúltalo regularmente, ya que de');
        $pdf->Text(125 + 16 + $der, 173 + 15 - $arriba, 'no regularizarlo no podremos incorporarte al programa.');
        $pdf->Text(125 - $izq, 189, 'F-1516-01');
        $pdf->Text(125 + 116 + $der, 189, 'F-1516-01');
        $pdf->SetFont('pdfahelvetica', '', 9);
        // Normal
        ///////////////////////////////////////////////////////
        //	Datos de ENTREGA RECEPCION DE DOCUMENTOS
        ///////////////////////////////////////////////////////
        $pdf->SetFont('pdfahelvetica', '', 9);
        // Normal
        if ($data['id_archivo'] == 1) {
            $tramite = "Inscripción";
            $puntos = "................................................";
            $pdf->Text(27 - $izq, 128 - $arriba, '6.- Número de Monedero Electrónico (Tarjeta Prepa Sí):');
            $pdf->Text(118 + 24 + $der, 128 - $arriba, '6.- Número de Monedero Electrónico (Tarjeta Prepa Sí):');
            $pdf->Line(27 - $izq, 140 - $arriba, 126, 140 - $arriba, $style2);
            $pdf->Line(120 + 24 + $der, 140 - $arriba, 145 + 116, 140 - $arriba, $style2);
            //	$pdf->RoundedRect(20, 128, 60, 5, 3, '0000', 'NULL');
            $pdf->SetFont('pdfahelvetica', '', 9);
            $pdf->Text(27 - $izq, 140 + 9 - $arriba, 'y Recibió Tarjeta');
            $pdf->Text(124 + 18 + $der, 140 + 9 - $arriba, 'y Recibió Tarjeta');
        }
        if ($data['id_archivo'] == 2) {
            $tramite = "Reinscripción";
            $puntos = "............................................";
        }
        if ($data['id_archivo'] == 3) {
            $tramite = "Universitario";
            $puntos = "..............................................";
        }
        $estilo = array('padding' => 'auto');
        //Negrita
        $pdf->SetFont('pdfahelveticab', '', 8);
        $pdf->Text(87 - $izq, 51 - $arriba, fecha_con_letra($data['fecha_carga']));
        $pdf->SetFont('pdfahelveticab', '', 9);
        $pdf->Text(42 - $izq, 62 - $arriba, $data['paterno'] . ' ' . $data['materno'] . ' ' . $data['nombre']);
        $pdf->SetFont('pdfahelvetica', '', 9);
        $pdf->Text(49 - $izq, 72 - $arriba, $tramite . ' (impresión):' . $puntos);
        $pdf->SetFont('pdfahelveticab', '', 8);
        $pdf->Text(65, 192, $data['matricula']);
        $pdf->endLayer();
        $pdf->Text(124 + 84 + $der, 45, fecha_con_letra($data['fecha_carga']));
        $pdf->Text(124 + 32 + $der, 62 - $arriba, $data['paterno'] . ' ' . $data['materno'] . ' ' . $data['nombre']);
        $pdf->SetFont('pdfahelvetica', '', 9);
        $pdf->Text(164 + $der, 72 - $arriba, $tramite . ' (impresión):' . $puntos);
        $pdf->SetFont('pdfahelveticab', '', 8);
        $pdf->Text(124 + 70 + $der, 192, $data['matricula']);
        $pdf->endLayer();
        $pdf->write1DBarcode($data['matricula'], 'C128', 65 - $izq, 184, 50, 10, 0.4, $estilo, 'N');
        $pdf->Image('resources/img/logo_fide_ps.jpg', 26 - $izq, 187, 21, 8, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        $pdf->write1DBarcode($data['matricula'], 'C128', 112 + 70 + $der, 184, 50, 10, 0.4, $estilo, 'N');
        $pdf->Image('resources/img/logo_fide_ps.jpg', 125 + 18 + $der, 187, 21, 8, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        ///////////////////////////////////////////////////---------------///////////////////////////////////////////////////
        ///////////////////////////////////////////////////DATOS PERSONALES//////////////////////////////////////////////////
        ///////////////////////////////////////////////////---------------///////////////////////////////////////////////////
        $bajar = 3;
        $pdf->AddPage('P', 'LETTER');
        //$fontname = $pdf->addTTFfont('./font/DejaVuSans.ttf', 'TrueTypeUnicode', '', 32);
        //$pdf->SetFont('dejavusans', '', 10);
        //$pdf->SetFont('pdfahelveticab', '', 10); //Negrita
        $pdf->SetFont('pdfahelvetica', '', 9);
        //Normal
        //$pdf->SetFont('pdfahelveticai', '', 10); // S
        $pdf->SetTextColor(0, 0, 0);
        $style = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,20,5,10', 'phase' => 10, 'color' => array(255, 0, 0));
        $style2 = array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));
        $style3 = array('width' => 0.5, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(0, 0, 0));
        $style4 = array('L' => 0, 'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)), 'R' => array('width' => 0.5, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)), 'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10'));
        $style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128));
        $style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0));
        $style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0));
        # Imagenes del Encabezado
        //-$pdf->Image('../images/angel2.jpg', 15, 6, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        //-$pdf->Image('../images/fideicomiso.jpg', 38, 6, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        //-$pdf->Image('../images/prepasi.png', 180, 6, 21, 23, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);
        $pdf->Image('resources/img/cdmx.png', 153, 8, 50, 13, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);
        //$pdf->SetFontSize(7);
        $pdf->SetFont('pdfahelvetica', '', 7);
        //Normal
        // create some HTML content
        $html = '
		
<div align="justify"><br /><br /><br /><br /><br /><br />
  <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><div align="justify">Yo ' . $data['nombre'] . " " . $data['paterno'] . " " . $data['materno'] . ' declaro bajo protesta o exhorto de decir verdad que <b>NO CUENTO CON OTRA BECA </b>y/o ayuda igual o similar a la que por este   medio pido me otorgue <b>Prepa Sí</b> (FIDEGAR). <br />
        <br />
        <br />
        <br />
      Así mismo, manifiesto mi voluntad de contribuir con el programa Prepa Sí, para lo cual estoy dispuesto y <b>ME COMPROMETO A PARTICIPAR EN ACTIVIDADES EN COMUNIDAD </b>durante el periodo en el que el estímulo me sea otorgado. </div></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <br />
  </table>
  <p><br />
    <br /><br /><br /><br />
    Los datos personales recabados serán protegidos, incorporados y tratados en el sistema denominado Sistema de Datos Personales del Programa <b>Prepa Sí</b> del Fideicomiso Educación Garantizada del Distrito Federal (FIDEGAR), lo cual se funda en los artículos 6, 7 y demás relativos de la Ley de Protección de Datos Personales para el D. F, con el  fin de verificar que se cumplan las Reglas de Operación del Programa e integrar la base de datos de los beneficiarios de éste.
    <br /><br />
    Los datos marcados con asterisco (*) son obligatorios. Sin ellos no podrás acceder al Programa. Tus datos no podrán ser difundidos sin tu conocimiento expreso, salvo la excepciones previstas en la Ley.  La responsable del Sistema de Datos Personales es Mónica Pérez Egüis, Subdirectora de Control de Entregas e Incidencias. El lugar  donde podrás ejercer los derechos de acceso, rectificación, cancelación y oposición, así como la renovación del consentimiento es la Oficina de Información Pública del FIDEGAR, ubicada en Ejército Nacional N° 359, Col. Granada, Delegación Miguel Hidalgo, D.F. C.P.11520. <b>Tel. 11021730 ext.4079. Pág. web: www.fideicomisoed.df.gob.mx y e-mail oip@fideicomisoed.df.gob.mx. </b>El interesado podrá dirigirse al Instituto de Acceso a la Información Pública del D. F., donde recibirá asesoría sobre los derechos que tutela la Ley de Protección de Datos Personales, al tel.56534636; correo  datos.personales@infodf.org.mx o www.infodf.org.mx. En tal virtud, con base en el art. 16 de la Ley de Protección de Datos Personales para el D. F. <b>otorgo mi consentimiento para que mis datos personales tengan un tratamiento sólo para los fines del Programa Prepa Sí </b>durante el tiempo en cual me encuentre inscrito(a).<br>
    <br>
    <br>
  <em>
  <br>
  </em></p>
</div>
<div align="center"><em><br>Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y  sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está  prohibido el uso de este programa con fines políticos, electorales, de lucro y  otros distintos a los establecidos. Quien haga uso indebido de los recursos de  este programa en el Distrito Federa, será sancionado de acuerdo con la ley  aplicable y ante la autoridad competente</em></div>
		
		
';
        // output the HTML content
        $pdf->writeHTML($html, true, 0, true, 0);
        ##############################################################################
        # SOLICITUD DE INSCRIPCIÓN
        ##############################################################################
        $pdf->SetFont('pdfahelveticab', '', 9);
        //Negrita
        $pdf->Text(15, 8, 'GOBIERNO DEL DISTRITO FEDERAL');
        $pdf->Text(15, 12, 'FIDEICOMISO EDUCACIÓN GARANTIZADA');
        $pdf->Text(15, 16, 'PROGRAMA DE ESTÍMULOS PARA EL BACHILLERATO UNIVERSAL');
        if ($data['id_archivo'] == 1) {
            $tipo = "INSCRIPCION";
        }
        if ($data['id_archivo'] == 2) {
            $tipo = "REINSCRIPCION";
        }
        if ($data['id_archivo'] == 3) {
            $tipo = "UNIVERSITARIO";
        }
        $pdf->Text(88, 20, 'SOLICITUD DE ' . $tipo . '');
        $pdf->SetFont('pdfahelvetica', '', 10);
        //Normal
        $pdf->SetFontSize(10);
        $pdf->Text(15, 25, 'FECHA DE TRAMITE:');
        $pdf->RoundedRect(55, 25, 50, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(150, 25, 51, 5, 3, '0000', 'NULL');
        $pdf->SetFontSize(7);
        $pdf->Text(170, 30, '*CURP');
        $pdf->SetFontSize(10);
        $pdf->SetTextColor(0, 100, 50, 0);
        $pdf->Text(15, 31, '1.- IDENTIFICACIÓN:');
        $pdf->SetTextColor(0, 0, 0, 100);
        $pdf->RoundedRect(15, 36, 60, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(78, 36, 60, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(141, 36, 60, 5, 3, '0000', 'NULL');
        $pdf->SetFontSize(7);
        $pdf->Text(34, 41, '*Apellido Paterno');
        $pdf->Text(95, 41, '*Apellido Materno');
        $pdf->Text(165, 41, '*Nombre(s)');
        $pdf->RoundedRect(15, 45, 60, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(78, 45, 60, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(141, 45, 60, 5, 3, '0000', 'NULL');
        $pdf->SetFontSize(7);
        $pdf->Text(34, 50, '*Correo electrónico');
        $pdf->Text(96, 50, '*Teléfono particular');
        $pdf->Text(163, 50, '*Teléfono celular');
        $pdf->RoundedRect(15, 54, 90, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(110, 54, 90, 5, 3, '0000', 'NULL');
        $pdf->SetFontSize(7);
        $pdf->Text(38, 59, 'Nombre del padre');
        $pdf->Text(114, 59, 'Nombre de la madre');
        $pdf->SetFontSize(10);
        $pdf->SetTextColor(0, 100, 50, 0);
        $pdf->Text(15, 57 + $bajar + 2, '2.- DOMICILIO:');
        $pdf->SetTextColor(0, 0, 0, 100);
        $pdf->RoundedRect(15, 62 + $bajar + 2, 96, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(112, 62 + $bajar + 2, 17, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(130, 62 + $bajar + 2, 17, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(148, 62 + $bajar + 2, 17, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(166, 62 + $bajar + 2, 17, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(184, 62 + $bajar + 2, 17, 5, 3, '0000', 'NULL');
        $pdf->SetFontSize(7);
        $pdf->Text(60, 67 + $bajar + 2, '*Calle');
        $pdf->Text(111, 67 + $bajar + 2, '*No Exterior');
        $pdf->Text(131, 67 + $bajar + 2, 'No Interior');
        $pdf->Text(150, 67 + $bajar + 2, 'Manzana');
        $pdf->Text(171, 67 + $bajar + 2, 'Lote');
        $pdf->Text(185, 67 + $bajar + 2, 'No Edificio');
        $pdf->RoundedRect(15, 72 + $bajar + 2, 16, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(32, 72 + $bajar + 2, 16, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(49, 72 + $bajar + 2, 16, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(66, 72 + $bajar + 2, 16, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(83, 72 + $bajar + 2, 16, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(100, 72 + $bajar + 2, 16, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(117, 72 + $bajar + 2, 84, 5, 3, '0000', 'NULL');
        $pdf->Text(16, 77 + $bajar + 2, 'No Depto');
        $pdf->Text(33, 77 + $bajar + 2, 'Andador');
        $pdf->Text(51, 77 + $bajar + 2, 'Rampa');
        $pdf->Text(69, 77 + $bajar + 2, 'Pasillo');
        $pdf->Text(87, 77 + $bajar + 2, 'Villa');
        $pdf->Text(102, 77 + $bajar + 2, 'Entrada');
        $pdf->Text(152, 77 + $bajar + 2, '*Colonia');
        $pdf->RoundedRect(15, 82 + $bajar + 2, 86, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(102, 82 + $bajar + 2, 25, 5, 3, '0000', 'NULL');
        $pdf->Text(51, 87 + $bajar + 2, '*Delegacion');
        $pdf->Text(104, 87 + $bajar + 2, '*Código Postal');
        //$pdf->RoundedRect(15, 69, 95, 4, 3, '0000', 'NULL');
        $pdf->SetFontSize(10);
        $pdf->SetTextColor(0, 100, 50, 0);
        $pdf->Text(15, 92 + $bajar + 2, '3.- DATOS ESCOLARES:');
        $pdf->SetTextColor(0, 0, 0, 100);
        $pdf->RoundedRect(15, 97 + $bajar + 2, 95, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(111, 97 + $bajar + 2, 90, 5, 3, '0000', 'NULL');
        $pdf->SetFontSize(7);
        $pdf->Text(51, 102 + $bajar + 2, '*Institución');
        $pdf->Text(155, 102 + $bajar + 2, '*Plantel');
        $pdf->RoundedRect(15, 107 + $bajar + 2, 67, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(83, 107 + $bajar + 2, 40, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(124, 107 + $bajar + 2, 46, 5, 3, '0000', 'NULL');
        $pdf->RoundedRect(171, 107 + $bajar + 2, 30, 5, 3, '0000', 'NULL');
        $pdf->Text(47, 112 + $bajar + 2, 'Grado');
        $pdf->Text(98, 112 + $bajar + 2, 'Turno');
        $pdf->Text(139, 112 + $bajar + 2, 'Modalidad');
        $pdf->Text(179, 112 + $bajar + 2, 'Promedio');
        $pdf->SetFont('pdfahelveticab', '', 9);
        //Negrita
        $pdf->Text(35, 117 + $bajar, 'La inscripción al Programa de Estímulos para el Bachillerato Universal (en lo sucesivo Prepa Sí)');
        $pdf->Text(39, 121 + $bajar, 'queda sujeta al cumplimiento de los requisitos de la Convocatoria y la verificación de datos.');
        $pdf->Text(15, 127 + $bajar, 'Tu trámite quedará invalidado:');
        $pdf->SetFont('pdfahelvetica', '', 9);
        //Normal
        $pdf->Text(15, 132 + $bajar, '• Si la institución educativa en la que te inscribiste no coincide con la que indicaste en tu hoja de registro.');
        $pdf->Text(15, 136 + $bajar, '• Si el promedio que señalaste no corresponde con tu comprobante de calificaciones.');
        $pdf->Text(15, 140 + $bajar, '• Si eres ');
        $pdf->SetFont('pdfahelveticab', '', 9);
        //Negrita
        $pdf->Text(28, 140 + $bajar, 'Prepa Sí ');
        $pdf->SetFont('pdfahelvetica', '', 9);
        //Normal
        $pdf->Text(42, 140 + $bajar, 'y te registraste como Universitario');
        $pdf->SetFont('pdfahelveticab', '', 9);
        //Negrita
        $pdf->Text(91, 140 + $bajar, 'Prepa Sí');
        $pdf->SetFont('pdfahelvetica', '', 9);
        //Normal
        $pdf->Text(105, 140 + $bajar, 'o viceversa.');
        //$pdf->RoundedRect(15, 104+15+2, 45, 5, 3, '0000', 'NULL');
        //$pdf->SetFont('pdfahelveticai', '', 6); // S
        $pdf->SetFont('pdfahelveticabi', '', 6);
        // S N
        $pdf->Text(140, 157 + $bajar + 2, 'Firma del alumno o alumna');
        $pdf->Text(140, 173 + $bajar + 2, 'Firma del alumno o alumna');
        # Linea para firma
        $pdf->Line(120, 157 + $bajar + 2, 190, 157 + $bajar + 2, $style2);
        $pdf->Line(120, 173 + $bajar + 2, 190, 173 + $bajar + 2, $style2);
        $pdf->SetFont('pdfahelveticab', '', 9);
        //Negrita
        $pdf->Text(27, 220 + $bajar, 'He leído, comprendo y acepto los términos y condiciones generales establecidas en este documento:');
        $pdf->SetFont('pdfahelvetica', '', 9);
        //Normal
        $pdf->SetFont('pdfahelveticabi', '', 6);
        // S N
        $pdf->Text(32, 232 + $bajar, 'Firma del padre/madre o tutor');
        $pdf->Text(24, 234 + $bajar, '(En caso que el alumno(a) sea menor de edad)');
        $pdf->Text(140, 232 + $bajar, 'Firma del alumno o alumna');
        $pdf->SetFont('pdfahelveticab', '', 8);
        //Negrita
        //$pdf->Text(79, 229, 'Firma del padre/madre o tutor');
        $pdf->Line(23, 232 + $bajar, 75, 232 + $bajar, $style2);
        $pdf->Line(120, 232 + $bajar, 190, 232 + $bajar, $style2);
        $pdf->SetFont('pdfahelvetica', '', 9);
        //Normal
        ///////////////////////////////////////////////////////
        //	Datos de DATOS PERSONALES
        ///////////////////////////////////////////////////////
        $pdf->SetFont('pdfahelveticab', '', 10);
        //Negrita
        //$pdf->SetFont('pdfahelvetica',	'', 10);	// Normal
        $pdf->Text(55, 25, $data['fecha_carga']);
        $pdf->Text(150, 25, $data['curp']);
        //$pdf->Text(34, 49, '*Apellido Paterno');
        $pdf->Text(16, 36, $data['paterno']);
        $pdf->Text(79, 36, $data['materno']);
        $pdf->Text(142, 36, $data['nombre']);
        $pdf->SetFont('pdfahelveticab', '', 8);
        $pdf->Text(16, 45, $data['correo']);
        $pdf->SetFont('pdfahelveticab', '', 10);
        $pdf->Text(79, 45, $data['tel']);
        $pdf->Text(142, 45, $data['cel']);
        $pdf->Text(16, 54, $data['padre']);
        $pdf->Text(110, 54, $data['madre']);
        $pdf->Text(16, 63 + $bajar + 2, $data['calle']);
        $pdf->Text(112, 63 + $bajar + 2, $data['noext']);
        $pdf->Text(130, 63 + $bajar + 2, $data['noint']);
        $pdf->Text(148, 63 + $bajar + 2, $data['manzana']);
        $pdf->Text(166, 63 + $bajar + 2, $data['lote']);
        $pdf->Text(184, 63 + $bajar + 2, $data['noedif']);
        $pdf->Text(15, 73 + $bajar + 2, $data['nodpto']);
        $pdf->Text(32, 73 + $bajar + 2, $data['andador']);
        $pdf->Text(49, 73 + $bajar + 2, $data['rampa']);
        $pdf->Text(66, 73 + $bajar + 2, $data['rampa']);
        $pdf->Text(83, 73 + $bajar + 2, $data['villa']);
        $pdf->Text(100, 73 + $bajar + 2, $data['entrada']);
        $pdf->Text(117, 73 + $bajar + 2, $data['colonia']);
        $pdf->Text(16, 83 + $bajar + 2, $data['delegacion']);
        $pdf->Text(108, 83 + $bajar + 2, $data['cp']);
        $pdf->SetFont('pdfahelveticab', '', 7);
        //Negrita
        $pdf->Text(16, 98 + $bajar + 2, $data['institucion']);
        $pdf->Text(112, 98 + $bajar + 2, $data['plantel']);
        $pdf->SetFont('pdfahelveticab', '', 10);
        //Negrita
        $pdf->Text(16, 108 + $bajar + 2, $data['grado']);
        $pdf->Text(84, 108 + $bajar + 2, $data['turno']);
        $pdf->Text(123.5, 108 + $bajar + 2, $data['modalidad']);
        $pdf->Text(176, 108 + $bajar + 2, $data['promedio']);
        $pdf->endLayer();
        //cambio de 6 a 14 el sexto parametro
        $estilo = array('padding' => 'auto');
        $pdf->write1DBarcode($data['matricula'], 'C128', 142, 251, 40, 7, 0.4, $estilo, 'N');
        $pdf->SetFont('pdfahelveticab', '', 7);
        $pdf->Text(147, 255, $data['matricula']);
        $pdf->SetFont('pdfahelveticab', '', 8);
        $pdf->Text(185, 255, 'F-1516-02');
        //$pdf->write1DBarcode('F-1314-02', 'C128', 160, 250, 40, 14, 0.4, $stylecb, 'N');
        ///////////////////////////////////////////////////---------------///////////////////////////////////////////////////
        ///////////////////////////////////////////////////POLIZA DE SEGURO///////////////////////////////////////////////////
        ///////////////////////////////////////////////////---------------///////////////////////////////////////////////////
        $pdf->AddPage('P', 'LETTER');
        //$pdf->SetFont('pdfahelveticab',	'', 10);	// Negrita
        //$pdf->SetFont('pdfahelveticabi',	'', 6);		// S N
        //$pdf->SetFont('pdfahelvetica',	'', 10);	// Normal
        //$pdf->SetFont('pdfahelveticai',	'', 10);	// S
        $pdf->SetTextColor(0, 0, 0);
        $style = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,20,5,10', 'phase' => 10, 'color' => array(255, 0, 0));
        $style2 = array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));
        $style3 = array('width' => 0.5, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(0, 0, 0));
        $style4 = array('L' => 0, 'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)), 'R' => array('width' => 0.5, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)), 'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10'));
        $style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128));
        $style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0));
        $style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0));
        $style8 = array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));
        # Imagenes del Encabezado
        $pdf->Image('resources/img/banorte.jpg', 15, 10, 75, 15, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        $pdf->SetFontSize(9);
        // create some HTML content
        $html = '<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		
<div align="justify">
Advertencia: Si designas a menores de edad como beneficiarios, no es necesario señalar a un mayor de edad como representante para cobrar el seguro, ya que si lo haces, el representante tiene derecho a disponer de la suma asegurada, pues no queda obligado jurídicamente a entregársela a el o los beneficiarios del seguro.
</div>
		
<div align="justify">En el caso de que el beneficiario sea menor de edad, el padre o tutor deberá firmar de manera obligatoria este documento para su validez.</div>';
        // output the HTML content
        $pdf->writeHTML($html, true, 0, true, 0);
        //$pdf->SetFontSize(6);
        $pdf->SetFont('pdfahelvetica', '', 6);
        //Normal
        $html1 = '
<br />
<div align="justify">Los datos personales recabados serán protegidos, incorporados y tratados en el sistema denominado Sistema de Datos Personales del Programa Prepa Sí del Fideicomiso Educación Garantizada del Distrito Federal, el cual tiene su fundamento jurídico conforme a lo dispuesto en los artículos 6, 7 y demás relativos de la Ley de Protección de Datos Personales para el Distrito Federal, así como en el Contrato 21562 y sus convenios modificatorios, cuya finalidad es la integración de las bases de datos de los beneficiarios del Programa de Estímulos para el Bachillerato Universal para proporcionar los apoyos y estímulos correspondientes a los beneficiarios del Programa Educación Garantizada, Programa de Estímulos para el Bachillerato Universal, Programa de Niñ@s y Jóvenes Talento y del Programa de Seguro Contra Accidentes Personales de Escolares, así como aquellos programas que en su caso instruya el C. Jefe de Gobierno y el Comité Técnico de este Fideicomiso apruebe de conformidad con los lineamientos, reglas y/o mecanismos de operación correspondientes y podrán ser transmitidos únicamente al titular de los mismos datos o a su representante legal, además de otras transmisiones previstas en la Ley de Protección de Datos Personales para el Distrito Federal.
<br>
<br>
Los datos marcados con asterisco (*) son obligatorios y sin ellos no podrá acceder al servicio hasta completar el trámite Solicitud de ingreso o reingreso al Programa de Estímulos para el Bachillerato Universal, PREBU, Prepa Sí”. Asimismo, se le informa, que sus datos no podrán ser difundidos sin su conocimiento expreso, salvo las excepciones previstas en la Ley.
<br />
El responsable del Sistema de Datos Personales es la Lic. Mónica Pérez Egüis, Subdirectora de Control de Entregas e Incidencias y el domicilio en donde podrá ejercer los derechos de acceso, rectificación, cancelación y oposición, así como la renovación del consentimiento es la Oficina de Información Pública de este Fideicomiso Educación Garantizada, ubicada en Ejército Nacional No. 359, Col. Granada, Delegación Miguel Hidalgo, C.P. 11520, México, Distrito Federal, Número de Teléfono: 11021730 ext. 4079, Página de Internet: www.fideicomisoed.df.gob.mx y correo electrónico: oip@fideicomisoed.df.gob.mx.
<br />
El interesado podrá dirigirse al Instituto de Acceso a la Información Pública del Distrito Federal, donde recibirá asesoría sobre los derechos que tutela la Ley de Protección de Datos Personales para el Distrito Federal al teléfono 56364636; correo electrónico: datos.personales@infodf.org.mx o www.infodf.org.mx.
<br />
<br />
Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está prohibido el uso de este programa con fines políticos, electorales, de lucro y otros distintos a los establecidos. Quien haga uso indebido de los recursos de este programa en el Distrito Federal, será sancionado de acuerdo con la ley aplicable y ante la autoridad competente.
<br />
<br />
Con fundamento en el artículo 16 de la Ley de Protección de Datos Personales para el Distrito Federal y el Numeral 23 de los Lineamientos para la Protección de Datos Personales en el Distrito Federal, <b>' . $data['paterno'] . ' ' . $data['materno'] . ' ' . $data['nombre'] . '</b> otorgo mi consentimiento expreso para que mis datos personales tengan un tratamiento específicamente para la operación que desarrolla el Programa de Estímulos para el Bachillerato Universal durante el tiempo en el cual me encuentre inscrito.</div>
<br />
';
        $pdf->writeHTML($html1, true, 0, true, 0);
        //$pdf->SetFontSize(6);
        $pdf->SetFont('pdfahelvetica', '', 9);
        //Normal
        $html2 = '
<br />
<div align="justify"><strong>IMPORTANTE<br/>
Si eres menor de edad, debe firmar el padre, la madre o el tutor.
</strong></div>';
        $pdf->writeHTML($html2, true, 0, true, 0);
        $pdf->SetFont('pdfahelveticab', '', 9);
        //Negrita
        $pdf->Text(92, 18, 'Consentimiento de seguro: ACCIDENTES PERSONALES COLECTIVO');
        # Linea 1
        $pdf->Line(15, 28, 200, 28, $style2);
        $pdf->SetFontSize(10);
        $pdf->Text(15, 30, 'Nombre del contratante BANCO MERCANTIL DEL NORTE, S.A.                                      1274/01');
        # Linea 2
        $pdf->Line(15, 35, 130, 35, $style2);
        # Linea 2 continuacion
        $pdf->Line(155, 35, 175, 35, $style2);
        $pdf->SetFont('pdfahelvetica', '', 10);
        // Normal
        $pdf->Text(56, 35, 'No Certificado');
        # Linea 3
        $pdf->Line(15, 41, 200, 41, $style2);
        $pdf->Text(15, 41, 'Nombre del Asegurado');
        $pdf->Text(120, 41, 'Sexo');
        $pdf->Text(170, 41, 'Estado Civil');
        # Linea 4
        $pdf->Line(15, 52, 200, 52, $style2);
        $pdf->Text(20, 52, '         Fecha de                    Fecha de Ingreso al                                                             Vigencia del Seguro ');
        $pdf->Text(20, 56, '        Nacimiento             Servicio del Contratante         Puesto u ocupación              Desde                   Hasta ');
        $pdf->Text(20, 60, '      Dia   Mes   Año              Dia   Mes   Año                                                         Dia  Mes  Año      Dia  Mes  Año');
        $pdf->Text(64, 65, '01     09    2015');
        # Linea 5
        $pdf->Line(15, 71, 200, 71, $style2);
        //Datos de (de los) asegurado(s)
        $pdf->Text(15, 72, 'Datos de (de los) asegurado (s)');
        $pdf->SetLineStyle(array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
        # Rectangulo de contenido
        $pdf->RoundedRect(15, 77, 185, 15, 3, '0000', 'NULL');
        # Lineas del Rectangulo
        $pdf->Line(75, 77, 75, 92, $style2);
        $pdf->Line(112, 77, 112, 92, $style2);
        $pdf->Line(132, 77, 132, 92, $style2);
        $pdf->Line(167, 77, 167, 92, $style2);
        $pdf->Text(18, 81, 'Nombre y Apellidos Completos');
        $pdf->Text(75, 77, 'Fecha de Nacimiento');
        $pdf->Text(136, 77, 'Fecha de Alta');
        $pdf->Text(78, 81, 'Dia     Mes     Año');
        $pdf->Text(116, 81, 'Sexo');
        $pdf->Text(134, 81, 'Dia     Mes     Año');
        $pdf->Text(173, 81, 'Parentesco');
        # Linea 6
        $pdf->Line(15, 94, 200, 94, $style2);
        $pdf->Text(15, 94.5, 'Regla para determinar la suma asegurada: Suma Asegurada fija igual a $10,000.00');
        # Linea 7
        $pdf->Line(15, 100, 200, 100, $style2);
        $pdf->SetFontSize(9);
        $pdf->Text(15, 100, 'Beneficios:');
        $pdf->SetFontSize(10);
        $pdf->Text(15, 105, 'MUERTE ACCIDENTAL');
        # Linea 8
        $pdf->Line(15, 110, 200, 110, $style2);
        $pdf->SetFont('pdfahelveticab', '', 9);
        //Negrita
        $pdf->Text(15, 111, 'Nombre completo de los Beneficiarios (para efectos de identificación) y porcentaje de participación');
        # Linea 9
        $pdf->Line(15, 121.5, 200, 121.5, $style2);
        $pdf->SetFont('pdfahelvetica', '', 7);
        // Normal
        $pdf->Text(16, 243, 'FIRMA DEL REPRESENTANTE DEL');
        $pdf->Text(87, 243, 'FIRMA DEL PADRE O TUTOR');
        $pdf->Text(148, 243, 'FIRMA DEL BENEFICIARIO/ALUMNO');
        $pdf->Text(15, 246, 'CONTRATANTE (BANCO MERCANTIL');
        $pdf->Text(163, 246, 'ASEGURADO');
        $pdf->Text(28, 249, 'DEL NORTE, S.A.)');
        $pdf->Line(15, 243, 67, 243, $style2);
        $pdf->Line(81, 243, 133, 243, $style2);
        $pdf->Line(147, 243, 199, 243, $style2);
        //$pdf->Line(15, 262, 200, 262, $style8);
        //$pdf->Line(15, 94, 255, 94, $style2);
        //$pdf->Text(185, 255, 'F-1415-02');
        ///////////////////////////////////////////////////////
        //	Datos de DATOS PERSONALES
        ///////////////////////////////////////////////////////
        $pdf->SetFont('pdfahelveticab', '', 10);
        //Negrita
        //$pdf->SetFont('pdfahelvetica',	'', 10);	// Normal
        $pdf->Text(15, 48, $data['paterno'] . ' ' . $data['materno'] . ' ' . $data['nombre']);
        $pdf->Text(118, 48, $data['sexo']);
        $pdf->Text(165, 48, $data['ecivil']);
        $pdf->Text(26, 65, substr($data['fecha_nac'], 8, 2));
        $pdf->Text(35, 65, substr($data['fecha_nac'], 5, 2));
        $pdf->Text(43, 65, substr($data['fecha_nac'], 0, 4));
        $pdf->Text(152, 254, $data['matricula']);
        $pdf->endLayer();
        $estilo = array('padding' => 'auto');
        $pdf->write1DBarcode($data['matricula'], 'C128', 150, 247.5, 40, 9, 0.4, $estilo, 'N');
        /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
        ///////////////////////////////////////////////////---------------///////////////////////////////////////////////////
        ///////////////////////////////////////////////////FORMATO TARJETAS//////////////////////////////////////////////////
        ///////////////////////////////////////////////////---------------//////////////////////////////////////////////////
        $pdf->AddPage('P', 'LETTER');
        //$pdf->SetXY(110, 200);
        $pdf->SetFontSize(13);
        $pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
        # Primer Credencial
        $pdf->RoundedRect(8, 33, 95, 63, 3, '1111', 'NULL');
        //-$pdf->Image('../images/angel2.jpg', 10, 35, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        //-$pdf->Image('../images/fideicomiso.jpg', 40, 35, 20, 20, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        //-$pdf->Image('../images/prepasi.png', 80, 35, 20, 20, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);
        $pdf->Image('resources/img/tarjeta_cdmx.jpg', 11, 37, 87, 14, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        $codarr = '';
        # Primer Codigo de Barras
        $params = $pdf->serializeTCPDFtagParameters(array($data['matricula'], 'C128', '25', '68', 60, 20, 0.4, array('position' => 'S', 'border' => false, 'padding' => 4, 'fgcolor' => array(0, 0, 0), 'bgcolor' => array(255, 255, 255), 'text' => true, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4), 'N'));
        $codarr .= '<tcpdf method="write1DBarcode" params="' . $params . '" />';
        $pdf->Text(30, 61, '' . $data['nombre'] . '');
        $pdf->Text(135, 61, '' . $data['nombre'] . '');
        $pdf->Text(10, 56, 'Nombre: ' . $data['paterno'] . ' ' . $data['materno'] . '');
        $pdf->Text(115, 56, 'Nombre: ' . $data['paterno'] . ' ' . $data['materno'] . '');
        $pdf->writeHTML($codarr, '', '', '', 0);
        # Segunda Credencial
        $pdf->RoundedRect(112, 33, 95, 63, 3, '1111', 'NULL');
        //-$pdf->Image('../images/angel2.jpg', 114, 35, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        //-$pdf->Image('../images/fideicomiso.jpg', 144, 35, 20, 20, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        //-$pdf->Image('../images/prepasi.png', 184, 35, 20, 20, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);
        $pdf->Image('resources/img/tarjeta_cdmx.jpg', 115, 37, 87, 14, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        # Segundo Codigo de Barras
        $params = $pdf->serializeTCPDFtagParameters(array($data['matricula'], 'C128', '130', '68', 60, 20, 0.4, array('position' => 'S', 'border' => false, 'padding' => 4, 'fgcolor' => array(0, 0, 0), 'bgcolor' => array(255, 255, 250), 'text' => true, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4), 'N'));
        $codarr .= '<tcpdf method="write1DBarcode" params="' . $params . '" />';
        $pdf->writeHTML($codarr, '', '', '', 0);
        # Tercer Credencial
        $pdf->RoundedRect(8, 105, 95, 63, 3, '1111', 'NULL');
        /*$pdf->Image('../images/angel2.jpg', 10, 107, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		 $pdf->Image('../images/fideicomiso.jpg', 40, 107, 20, 20, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		$pdf->Image('../images/prepasi.png', 80, 107, 20, 20, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);*/
        $pdf->Image('resources/img/tarjeta_cdmx.jpg', 11, 109, 87, 14, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        # Tercer Codigo de Barras 140+72
        $params = $pdf->serializeTCPDFtagParameters(array($data['matricula'], 'C128', '25', '140', 60, 20, 0.4, array('position' => 'S', 'border' => false, 'padding' => 4, 'fgcolor' => array(0, 0, 0), 'bgcolor' => array(255, 255, 255), 'text' => true, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4), 'N'));
        $codarr .= '<tcpdf method="write1DBarcode" params="' . $params . '" />';
        $pdf->writeHTML($codarr, '', '', '', 0);
        # Cuarta Credencial
        $pdf->RoundedRect(112, 105, 95, 63, 3, '1111', 'NULL');
        /*$pdf->Image('../images/angel2.jpg', 114, 107, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		 $pdf->Image('../images/fideicomiso.jpg', 144, 107, 20, 20, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		$pdf->Image('../images/prepasi.png', 184, 107, 20, 20, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);*/
        $pdf->Image('resources/img/tarjeta_cdmx.jpg', 115, 109, 87, 14, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        # Cuarto Codigo de Barras 140+72
        $params = $pdf->serializeTCPDFtagParameters(array($data['matricula'], 'C128', '130', '140', 60, 20, 0.4, array('position' => 'S', 'border' => false, 'padding' => 4, 'fgcolor' => array(0, 0, 0), 'bgcolor' => array(255, 255, 250), 'text' => true, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4), 'N'));
        $codarr .= '<tcpdf method="write1DBarcode" params="' . $params . '" />';
        $pdf->writeHTML($codarr, '', '', '', 0);
        # Quinta Credencial
        $pdf->RoundedRect(8, 177, 95, 63, 3, '1111', 'NULL');
        /*$pdf->Image('../images/angel2.jpg', 10, 179, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		 $pdf->Image('../images/fideicomiso.jpg', 40, 179, 20, 20, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		$pdf->Image('../images/prepasi.png', 80, 179, 20, 20, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);*/
        $pdf->Image('resources/img/tarjeta_cdmx.jpg', 11, 181, 87, 14, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        # Quinto Codigo de Barras 140+72
        $params = $pdf->serializeTCPDFtagParameters(array('' . $data['matricula'] . '', 'C128', '25', '212', 60, 20, 0.4, array('position' => 'S', 'border' => false, 'padding' => 4, 'fgcolor' => array(0, 0, 0), 'bgcolor' => array(255, 255, 255), 'text' => true, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4), 'N'));
        $codarr .= '<tcpdf method="write1DBarcode" params="' . $params . '" />';
        $pdf->writeHTML($codarr, '', '', '', 0);
        # Sexta Credencial
        $pdf->RoundedRect(112, 177, 95, 63, 3, '1111', 'NULL');
        /*$pdf->Image('../images/angel2.jpg', 114, 179, 23, 23, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		 $pdf->Image('../images/fideicomiso.jpg', 144, 179, 20, 20, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        		$pdf->Image('../images/prepasi.png', 184, 179, 20, 20, 'PNG', '', '', true, 100, '', false, false, 0, false, false, false);*/
        $pdf->Image('resources/img/tarjeta_cdmx.jpg', 115, 181, 87, 14, 'JPG', '', '', true, 100, '', false, false, 0, false, false, false);
        # Sexto Codigo de Barras 140+72
        $params = $pdf->serializeTCPDFtagParameters(array('' . $data['matricula'] . '', 'C128', '130', '212', 60, 20, 0.4, array('position' => 'S', 'border' => false, 'padding' => 4, 'fgcolor' => array(0, 0, 0), 'bgcolor' => array(255, 255, 250), 'text' => true, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4), 'N'));
        $codarr .= '<tcpdf method="write1DBarcode" params="' . $params . '" />';
        $pdf->writeHTML($codarr, '', '', '', 0);
        $pdf->Text(30, 133, '' . $data['nombre'] . '');
        $pdf->Text(135, 133, '' . $data['nombre'] . '');
        $pdf->Text(30, 205, '' . $data['nombre'] . '');
        $pdf->Text(135, 205, '' . $data['nombre'] . '');
        $pdf->Text(10, 128, 'Nombre: ' . $data['paterno'] . ' ' . $data['materno'] . '');
        $pdf->Text(115, 128, 'Nombre: ' . $data['paterno'] . ' ' . $data['materno'] . '');
        $pdf->Text(10, 200, 'Nombre: ' . $data['paterno'] . ' ' . $data['materno'] . '');
        $pdf->Text(115, 200, 'Nombre: ' . $data['paterno'] . ' ' . $data['materno'] . '');
        $pdf->setCellPaddings(1, 1, 1, 1);
        // set cell margins
        $pdf->setCellMargins(1, 1, 1, 1);
        // ---------------------------------------------------------
        //$pdf->writeHTML($html, '', '', '', 0);
        $pdf->SetFont('helvetica', '', 5);
        // print a message
        $txt = '“Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está prohibido el uso de este programa con fines políticos, electorales, de lucro y otros distintos a los establecidos. Quien haga uso indebido de los recursos de este programa en el Distrito Federal, será sancionado de acuerdo con la ley aplicable y ante la autoridad competente.”';
        $pdf->MultiCell(90, 0, $txt, 0, 'C', false, 1, 10, 82, true, 0, false, true, 0, 'T', false);
        $pdf->Ln(2);
        $txt = '“Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está prohibido el uso de este programa con fines políticos, electorales, de lucro y otros distintos a los establecidos. Quien haga uso indebido de los recursos de este programa en el Distrito Federal, será sancionado de acuerdo con la ley aplicable y ante la autoridad competente.”';
        $pdf->MultiCell(90, 0, $txt, 0, 'C', false, 1, 115, 82, true, 0, false, true, 0, 'T', false);
        $pdf->Ln(2);
        $txt = '“Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está prohibido el uso de este programa con fines políticos, electorales, de lucro y otros distintos a los establecidos. Quien haga uso indebido de los recursos de este programa en el Distrito Federal, será sancionado de acuerdo con la ley aplicable y ante la autoridad competente.”';
        $pdf->MultiCell(90, 0, $txt, 0, 'C', false, 1, 10, 154, true, 0, false, true, 0, 'T', false);
        $pdf->Ln(2);
        $txt = '“Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está prohibido el uso de este programa con fines políticos, electorales, de lucro y otros distintos a los establecidos. Quien haga uso indebido de los recursos de este programa en el Distrito Federal, será sancionado de acuerdo con la ley aplicable y ante la autoridad competente.”';
        $pdf->MultiCell(90, 0, $txt, 0, 'C', false, 1, 115, 154, true, 0, false, true, 0, 'T', false);
        $pdf->Ln(2);
        $txt = '“Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está prohibido el uso de este programa con fines políticos, electorales, de lucro y otros distintos a los establecidos. Quien haga uso indebido de los recursos de este programa en el Distrito Federal, será sancionado de acuerdo con la ley aplicable y ante la autoridad competente.”';
        $pdf->MultiCell(90, 0, $txt, 0, 'C', false, 1, 10, 226, true, 0, false, true, 0, 'T', false);
        $pdf->Ln(2);
        $txt = '“Este programa es de carácter público, no es patrocinado ni promovido por partido político alguno y sus recursos provienen de los impuestos que pagan todos los contribuyentes. Está prohibido el uso de este programa con fines políticos, electorales, de lucro y otros distintos a los establecidos. Quien haga uso indebido de los recursos de este programa en el Distrito Federal, será sancionado de acuerdo con la ley aplicable y ante la autoridad competente.”';
        $pdf->MultiCell(90, 0, $txt, 0, 'C', false, 1, 115, 226, true, 0, false, true, 0, 'T', false);
        $pdf->Ln(2);
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        // reset pointer to the last page
        //$pdf->lastPage();
        $nombre_archivo = utf8_decode("Registro_" . $data['matricula'] . ".pdf");
        $pdf->Output($nombre_archivo, 'I');
        ob_end_flush();
    }
コード例 #12
0
    function export_pdf17()
    {
        $this->load->library('pdf');
        ob_clean();
        $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
        $tbl = '';
        $tbl .= '
				<h3><u>REGISTRASI PASIEN</u></h3>
				<table border="0"  cellpadding="0" cellspacing="0" >
				 <tr >';
        $tbl .= '<th  align="center" bgcolor="#359AFF" width="30" >NO</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >NO INDUK</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="150" >NAMA</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >TGL LAHIR</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="50" >UMUR</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="50" >L/P</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="200" >ALAMAT</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="120" >TUJUAN</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="120" >UNIT</th>';
        $tbl .= '</tr>';
        $sql = "select  pas_no, pas_kode_kk, concat(pas_no,'-',pas_kode_kk) noinduk,\npas_nama, pas_iskk, pas_kk, pas_sex,pas_noktp,pas_pekerjaan_id,pas_tgl_lahir, kun_th, kun_bln, kun_hr,kun_ku_id,\npas_asal, pas_kec_id, pas_desa_id, pas_alamat, pas_rt, pas_rw, \nkun_tujuan_id, kun_kp_id, kun_no_penjamin, kun_karcis,kun_no_seri,kun_unit_id, kun_pustu_id,kun_id, kun_tgl, kun_pas_id, tujuan_nama,\nkec_nama,desa_nama,unit_nama from v_kunjungan";
        $data = $this->m_global->grid_view($sql)->result_array();
        $no = 1;
        foreach ($data as $row) {
            $bg = $no % 2;
            if ($bg == 0) {
                $bg = ' bgcolor="#E1F0FF" ';
            } else {
                $bg = ' bgcolor="#FFFFFF" ';
            }
            $tbl .= '
					<tr>
					<td ' . $bg . '  align="center" width="30">' . $no . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['noinduk'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="150" >' . $row['pas_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['pas_tgl_lahir'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="50" >' . $row['kun_th'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="50" >' . $row['pas_sex'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="200" >' . $row['pas_alamat'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="120" >' . $row['tujuan_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="120" >' . $row['unit_nama'] . '</td>';
            $tbl .= '</tr>';
            $no++;
        }
        $tbl .= '</table>';
        $pdf->AddPage();
        $pdf->SetFont('helvetica', '', 8);
        $pdf->writeHTML($tbl, true, false, false, false, '');
        $pdf->Output('example_048.pdf', 'I');
    }
コード例 #13
0
ファイル: votes.php プロジェクト: pjsangat/lgu
 public function index()
 {
     $this->load->model('candidate_model');
     $this->load->model('votes_model');
     $this->load->model('voter_model');
     //        $brgy = $this->voter_model
     //                ->group_by('brgy')
     //                ->select('brgy')
     //                ->get_all();
     $brgy = $this->voter_model->group_by('brgy, precinct')->select('brgy, precinct')->get_all();
     $candidates = $this->candidate_model->get_all();
     if ($this->input->post()) {
         $pData = $this->input->post();
         $brgy_arr = explode("-", $pData['brgy']);
         $brgy = $brgy_arr[0];
         $precinct = $brgy_arr[1];
         //            $this->votes_model->order_by('voted_when', 'ASC');
         //            $votes = $this->votes_model->get_many_by(array('candidate_id' => $pData['candidate']));
         $sql = "SELECT b.id_no, b.full_name, b.address, b.precinct, b.brgy, b.gender FROM votes a INNER JOIN list b on b.id = a.voter_id WHERE a.candidate_id = ?" . (isset($pData['brgy']) && !empty($pData['brgy']) ? " AND brgy = ? AND precinct = ?" : "");
         $query = $this->db->query($sql, array($pData['candidate'], $brgy, $precinct));
         $voters = $query->result_array();
         $candidate = $this->candidate_model->get_by(array('id' => $pData['candidate']));
         $a = 0;
         $this->load->library('pdf');
         $pdf = new Pdf('L', 'mm', 'LETTER', true, 'UTF-8', false);
         $pdf->SetTitle('My Title');
         $pdf->SetHeaderMargin(30);
         $pdf->SetTopMargin(20);
         $pdf->setFooterMargin(10);
         $pdf->SetAutoPageBreak(true, 15);
         $pdf->SetAuthor('Author');
         $pdf->AddPage('L', 'LEGAL');
         $pdf->setY(30);
         $html = '';
         $html .= '<div style="text-align: center;"><b>Voters List</b> for<br/><b>' . $candidate['position'] . ' ' . $candidate['name'] . '</b></div>';
         $html .= '<div style="text-align: center;"><b>Brgy : </b>' . $brgy . ' <b>Precinct : </b> ' . $precinct . '</div>';
         $html .= '<br/>';
         if (count($voters) > 0) {
             $html .= '<div style="text-align: right;"><b>Total # of voters : ' . count($voters) . '</b></div>';
         }
         $html .= '<br/>';
         $html .= '<table style="border: 1px solid #000;border-collapse: collapse;" border="1" cellspacing="0" cellpadding="1">';
         $html .= '<thead>';
         $html .= '<tr style="background-color: #a8a8a8;">';
         $html .= '<th align="center" width="4%"><b>Id No</b></th>';
         $html .= '<th align="center" width="41%"><b>Voter\'s Name</b></th>';
         $html .= '<th align="center" width="25%"><b>Address</b></th>';
         $html .= '<th align="center" width="10%"><b>Precinct</b></th>';
         $html .= '<th align="center" width="15%"><b>Brgy</b></th>';
         $html .= '<th align="center" width="5%"><b>Gender</b></th>';
         $html .= '</tr>';
         $html .= '</thead>';
         if (count($voters) > 0) {
             for ($ctr = 0; $ctr < count($voters); $ctr++) {
                 $a++;
                 $html .= '<tr nobr="true">';
                 $html .= '<td align="center" width="4%"><b>' . $voters[$ctr]['id_no'] . '</b></td>';
                 $html .= '<td align="center" width="41%">' . $voters[$ctr]['full_name'] . '</td>';
                 $html .= '<td align="center" width="25%">' . $voters[$ctr]['address'] . '</td>';
                 $html .= '<td align="center" width="10%">' . $voters[$ctr]['precinct'] . '</td>';
                 $html .= '<td align="center" width="15%">' . $voters[$ctr]['brgy'] . '</td>';
                 $html .= '<td align="center" width="5%">' . $voters[$ctr]['gender'] . '</td>';
                 $html .= '</tr>';
             }
         } else {
             $html .= '<tr>';
             $html .= '<td align="center" width="100%">No record found..</td>';
             $html .= '</tr>';
         }
         $html .= '</table>';
         $pdf->writeHTML($html, true, false, false, false, '');
         $pdf->Output('votes_report.pdf', 'I');
     }
     $this->mTitle = "";
     $this->mViewData['candidates'] = $candidates;
     $this->mViewData['brgys'] = $brgy;
     $this->mViewFile = "votes/index";
 }
コード例 #14
0
    function make_pdf($PDF_html, $PDF_name='Ads2Trade_Document', $PDF_Title='Ads2Trade Dcoument', $PDF_Orientation="L")
    {
        $CI =& get_instance();
        $CI->load->library('pdf'); // load library (if not already loaded - CI will handle this check for us though)

        // create new PDF document
        //$pdf = new TCPDF($PDF_Orientation, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        $pdf = new Pdf($PDF_Orientation, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

        $html = $PDF_html;

        //Make sure orientation is valid i.e. either P or L
        if($PDF_Orientation != 'P' && $PDF_Orientation != 'L'){
            $PDF_Orientation = 'L'; //default to landscape if invalid value supplied
        }

        $pdf->setPageOrientation($PDF_Orientation); //custom class seemed to not be picking up orientation in constructor

        if($PDF_name == '' or  is_null($PDF_name)){
            $PDF_name = 'Ads2Trade_Document'; //default to landscape if invalid value supplied
        }

        // set document information
        //$pdf->SetCreator(PDF_CREATOR);
        $pdf->SetCreator("Ads2Trade");
        $pdf->SetAuthor('Ads2Trade');
        $pdf->SetTitle('Ads2Trade Document Title Goes Here');
        $pdf->SetSubject('Ads2Trade');
        $pdf->SetKeywords('Ads2Trade, PDF, asset, auction, advertising');

        // set default header data
        $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, $PDF_Title, PDF_HEADER_STRING);

        // set header and footer fonts
        $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));

        // set default monospaced font
        $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);

        // set margins
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);

        // set auto page breaks
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);

        // set image scale factor
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);

        // set some language-dependent strings (optional)
        if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
            require_once(dirname(__FILE__).'/lang/eng.php');
            $pdf->setLanguageArray($l);
        }


        // ---------------------------------------------------------

        // set font
        $pdf->SetFont('dejavusans', '', 10);

        // add a page
        $pdf->AddPage();

        // create some HTML content
        if (is_null($html) or ($html == '')) {
                $html = '<!DOCTYPE html>
                <html>
                  <head>
                  <title></title>
                          <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
                  </head>
                 <body>
                     <p>ERROR: No Document Data Supplied</p>
                 </body>
                 </html>';

        }

        // output the HTML content
        $pdf->writeHTML($html, true, false, true, false, '');


        // reset pointer to the last page
        $pdf->lastPage();

        // ---------------------------------------------------------

        //Close and output PDF document
        $pdf->Output($PDF_name.'.pdf', 'I');

    }
コード例 #15
0
    function index()
    {
        date_default_timezone_set('Australia/NSW');
        $ImageW = 105;
        //WaterMark Size
        $ImageH = 30;
        $id_user = $this->uri->segment(2);
        $created_at = urldecode($this->uri->segment(3));
        $display_name = $this->session->userdata('display_name');
        $getOrganization = $this->survey_model->get_organization($id_user);
        $getsurveydetails = $this->survey_model->getsurveydetails($id_user, $created_at);
        $getsurveydetail = unserialize($getsurveydetails);
        $this->load->library('Pdf');
        $pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        // set document information
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetAuthor('AMIT');
        $pdf->SetTitle('SMG Health Survey Report');
        $pdf->SetSubject('Survey Report');
        $pdf->SetKeywords('SMG Health Survey Report ');
        // set header and footer fonts
        $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        // set default monospaced font
        $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
        // set margins
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP - 15, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
        // set auto page breaks
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
        // set image scale factor
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        // set some language-dependent strings (optional)
        if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
            require_once dirname(__FILE__) . '/lang/eng.php';
            $pdf->setLanguageArray($l);
        }
        $pdf->SetFont('freeserif', '', 48);
        // remove default header
        $pdf->setPrintHeader(false);
        // add a page
        $pdf->AddPage();
        // get the current page break margin
        $bMargin = $pdf->getBreakMargin();
        // get current auto-page-break mode
        $auto_page_break = $pdf->getAutoPageBreak();
        // disable auto-page-break
        $pdf->SetAutoPageBreak(false, 0);
        // set bacground image
        $img_file = Base_url() . 'assets/site/images/coverImage.jpg';
        $pdf->Image($img_file, 0, 0, 210, 297, '', '', '', false, 400, '', false, false, 0);
        // restore auto-page-break status
        $pdf->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content
        $pdf->setPageMark();
        // Print a text
        $html = '<div style="position: relative; right:0; left:0; text-align:center; padding: 50px 15px;">
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">SMG Health Bounce Back Survey</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                    <h1 style="margin: 100px 0 0px; color: #000; font-weight: 500;font-size: 24px; text-transform: capitalize;">' . $getOrganization . '</h1>
                                    <h1 style="margin: 0 0 20px; color: #000; font-weight: 500;font-size: 18px;">' . $created_at . '</h1>
                                </div>';
        $pdf->writeHTML($html, true, false, true, false, '');
        // ---------------------------------------------------------
        $img_file = Base_url() . 'assets/site/images/innerbanner.jpg';
        $pdf->AddPage();
        $myPageWidth = $pdf->getPageWidth();
        $myPageHeight = $pdf->getPageHeight();
        $myX = $myPageWidth / 2 - 50;
        $myY = $myPageHeight / 2 - 40;
        $pdf->SetAlpha(0.09);
        $pdf->Image(Base_url() . 'assets/site/images/dase_logo.png', $myX, $myY, $ImageW, $ImageH, '', '', '', true, 150);
        $pdf->SetAlpha(1);
        $pdf->Image($img_file, 0, 0, 210, 47, '', '', '', false, 300, '', false, false, 0);
        $pdf->SetDrawColor(255, 0, 0);
        $content = '<table cellspacing="0" cellpadding="0">
            <tr><td><img title="" alt="" src="' . Base_url() . 'assets/site/images/dase_logo.png"></td></tr>
            <tr><td>' . $display_name . '</td></tr>
            <tr><td>' . $created_at . '</td></tr>
            <tr><td>&nbsp;</td></tr>
            <tr><td>&nbsp;</td></tr>
        </table>';
        $content .= '<div style="padding: 30px;">
                                <p style="margin: 0 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Introduction</p>
                                <p>Thank you for completing your Bounce Back Survey. This report provides you with a summary of your results, makes some personalised recommendations and provides you with the tools to create an action plan.</p>
                                <p>Each dimension is presented individually with a description of your results and strategies for strengthening.</p>
                                <p style="margin: 5px 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Understanding Your Report</p>
                                <p>Your report contains a description of the 10 dimensions of resilience for which you were assessed.  Your individual assessment results for each dimension is presented as a flag.  Refer to the table below when reading your report.</p>
                                <p>Red flag: <img src="' . Base_url() . 'assets/site/images/close_icon.jpg" height="25" alt="">
                                &nbsp;&nbsp;&nbsp;Green Flag:<img src="' . Base_url() . 'assets/site/images/tick_icon.jpg" height="25" alt=""></p>
                                <p style="margin: 5px 0 10px; color: #424242; font-weight: 500; font-size: 20px;">Summary of Results</p>
                                <table style="text-align: left;">
                                    <thead>
                                        <tr>
                                            <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:200px">Name</th>
                                            <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 1</th>
                                            <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 2</th>
                                            <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 3</th>
                                            <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 4</th>
                                            <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Total</th>
                                        </tr>
                                    </thead>
                                    <tbody>';
        $grandtotal = 0;
        //$content.='<table cellspacing="0" cellpadding="5" border="1">';
        // $content.='<tr><td width="25%"><strong>Dimension</strong></td><td width="10%"><strong>Score</strong></td><td width="65%"><strong>Comment</strong></td></tr>';
        foreach ($getsurveydetail as $key => $value) {
            $getcategory = $this->survey_model->getcategory($key);
            $getvalue1 = $this->survey_model->getvalue($value[0]);
            $getvalue2 = $this->survey_model->getvalue($value[1]);
            $getvalue3 = $this->survey_model->getvalue($value[2]);
            $getvalue4 = $this->survey_model->getvalue($value[3]);
            $getQuestion = $this->survey_model->getQuestion($value[3]);
            $total = $getvalue1 + $getvalue2 + $getvalue3 + $getvalue4;
            $grandtotal = $grandtotal + $total;
            $content .= '
                                        <tr>
                                            <td style="padding:3px; border: solid 1px #e0e0e0; background-color:#f5f5f5; width:200px">' . $getQuestion . '</td>
                                            <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue1 . '</td>
                                            <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue2 . '</td>
                                            <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue3 . '</td>
                                            <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue4 . '</td>
                                            <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $total . '</td>
                                        </tr>';
        }
        $content .= '               </tbody>
                                    <tfoot>
                                        <tr>
                                            <td style="padding:3px; border: solid 1px #e0e0e0;" colspan="5"></td>
                                            <td style="padding:3px; border: solid 1px #e0e0e0;background-color:#B72529; color:#fff;">' . $grandtotal . '</td>
                                        </tr>
                                    </tfoot>
                                </table>
                            </div>';
        // $content.='<p style="padding: 75px 15px 0;text-align:center; border-top: solid 1px #E0E0E0; font-size: 10px;">&nbsp;<br>© 2016. SMG Health. All rights reserved.</p>';
        $pdf->SetFont('freeserif', '', 12);
        $pdf->setTextRenderingMode($stroke = 0, $fill = true, $clip = false);
        //$pdf->writeHTMLCell(0, 10, '© 2016. SMG Health. All rights reserved.', 0, false, 'C', 0, '', 0, false, 'T', 'M');
        $pdf->writeHTML($content, true, false, false, false, '');
        foreach ($getsurveydetail as $key => $value) {
            $getcategory = $this->survey_model->getcategory($key);
            $getvalue1 = $this->survey_model->getvalue($value[0]);
            $getvalue2 = $this->survey_model->getvalue($value[1]);
            $getvalue3 = $this->survey_model->getvalue($value[2]);
            $getvalue4 = $this->survey_model->getvalue($value[3]);
            $getQuestion = $this->survey_model->getQuestion($value[3]);
            $total = $getvalue1 + $getvalue2 + $getvalue3 + $getvalue4;
            $getFeedback = $this->survey_model->getFeedback($getQuestion, $total);
            $pdf->AddPage();
            $myPageWidth = $pdf->getPageWidth();
            $myPageHeight = $pdf->getPageHeight();
            $myX = $myPageWidth / 2 - 50;
            $myY = $myPageHeight / 2 - 40;
            $pdf->SetAlpha(0.09);
            $pdf->Image(Base_url() . 'assets/site/images/dase_logo.png', $myX, $myY, $ImageW, $ImageH, '', '', '', true, 150);
            $pdf->SetAlpha(1);
            // set the starting point for the page content
            $pdf->setPageMark();
            $pdf->Image($img_file, 0, 0, 210, 47, '', '', '', false, 300, '', false, false, 0);
            // set color for text stroke
            $pdf->SetDrawColor(255, 0, 0);
            $content = '<table cellspacing="0" cellpadding="0">
                <tr><td><img title="" alt="" src="' . Base_url() . 'assets/site/images/dase_logo.png"></td></tr>
                <tr><td>' . $display_name . '</td></tr>
                <tr><td>' . $created_at . '</td></tr>
                <tr><td>&nbsp;</td></tr>
                <tr><td>&nbsp;</td></tr>
            </table>';
            if ($total > 13) {
                $icon = "tick_icon.jpg";
            } else {
                $icon = "close_icon.jpg";
            }
            $content .= '<div style="padding: 30px;">
                        <p style="margin: 0 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Interpretation of scores</p>';
            $content .= '<div style="padding:0 0 30px;">
                                    <h3 style="margin: 0 0 5px;color: #18A7A5;font-weight: 700;font-size: 24px;"><span style="display:inline-block; width:200px; color: #ADADAD; font-weight:500;">Dimension :</span>' . $getQuestion . '</h3>
                                    <h3 style="margin: 0 0 5px;color: #18A7A5;font-weight: 700;font-size: 24px;"><span style="display:inline-block; width:200px; color: #ADADAD; font-weight:500;">Score :</span>' . $total . '</h3>
                                    <h3 style="margin: 0 0 5px;color: #18A7A5;font-weight: 700;font-size: 24px;"><span style="display:inline-block; width:200px; color: #ADADAD; font-weight:500;">Comment :</span><img src="' . Base_url() . 'assets/site/images/' . $icon . '" alt=""></h3>
                                    <div style="margin-left:200px;">
                                        ' . $getFeedback . '
                                    </div>
                                </div>
';
            $pdf->SetFont('freeserif', '', 12);
            $pdf->setTextRenderingMode($stroke = 0, $fill = true, $clip = false);
            //$pdf->writeHTMLCell(0, 10, '© 2016. SMG Health. All rights reserved.', 0, false, 'C', 0, '', 0, false, 'T', 'M');
            $pdf->writeHTML($content, true, false, false, false, '');
        }
        $pdf->Output('example.pdf', 'I');
    }
コード例 #16
0
ファイル: Survey.php プロジェクト: subhadip-sahoo/codeigniter
 public function index()
 {
     if ($this->input->post('action') != NULL && $this->input->post('action') == 'user_survey') {
         if ($cats = $this->questionnaire_model->get_question_cats()) {
             foreach ($cats as $cat) {
                 $data[$cat->id_questionnaire] = array();
                 if ($questions = $this->questionnaire_model->get_questionnaire($cat->id_questionnaire)) {
                     foreach ($questions as $q) {
                         $data[$cat->id_questionnaire][] = $this->input->post('answer_' . $q->question_no);
                     }
                 }
             }
         }
         $survey_data = serialize($data);
         $created_at = date(DATETIME_DATABASE_FORMAT);
         $table_data = array('id_user' => $this->session->userdata('id_user'), 'survey_data' => $survey_data, 'created_at' => $created_at);
         if ($this->site_model->insert('smg_survey', $table_data)) {
             date_default_timezone_set('Australia/NSW');
             $ImageW = 105;
             //WaterMark Size
             $ImageH = 30;
             $id_user = $this->session->userdata('id_user');
             $display_name = $this->session->userdata('display_name');
             $getOrganization = $this->survey_model->get_organization($id_user);
             $getsurveydetails = $this->survey_model->getsurveydetails($id_user, $created_at);
             $getsurveydetail = unserialize($getsurveydetails);
             $this->load->library('Pdf');
             $pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
             // set document information
             $pdf->SetCreator(PDF_CREATOR);
             $pdf->SetAuthor('AMIT');
             $pdf->SetTitle('SMG Health Survey Report');
             $pdf->SetSubject('Survey Report');
             $pdf->SetKeywords('SMG Health Survey Report ');
             // set header and footer fonts
             $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
             // set default monospaced font
             $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
             // set margins
             $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP - 15, PDF_MARGIN_RIGHT);
             $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
             $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
             // set auto page breaks
             $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
             // set image scale factor
             $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
             // set some language-dependent strings (optional)
             if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
                 require_once dirname(__FILE__) . '/lang/eng.php';
                 $pdf->setLanguageArray($l);
             }
             $pdf->SetFont('freeserif', '', 48);
             // remove default header
             $pdf->setPrintHeader(false);
             // add a page
             $pdf->AddPage();
             // get the current page break margin
             $bMargin = $pdf->getBreakMargin();
             // get current auto-page-break mode
             $auto_page_break = $pdf->getAutoPageBreak();
             // disable auto-page-break
             $pdf->SetAutoPageBreak(false, 0);
             // set bacground image
             $img_file = Base_url() . 'assets/site/images/coverImage.jpg';
             $pdf->Image($img_file, 0, 0, 210, 297, '', '', '', false, 400, '', false, false, 0);
             // restore auto-page-break status
             $pdf->SetAutoPageBreak($auto_page_break, $bMargin);
             // set the starting point for the page content
             $pdf->setPageMark();
             // Print a text
             $html = '<div style="position: relative; right:0; left:0; text-align:center; padding: 50px 15px;">
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">SMG Health Bounce Back Survey</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 0 0 20px; color: #333; font-weight: 500;font-size: 40px;">&nbsp;</h1>
                                         <h1 style="margin: 100px 0 0px; color: #000; font-weight: 500;font-size: 24px; text-transform: capitalize;">' . $getOrganization . '</h1>
                                         <h1 style="margin: 0 0 20px; color: #000; font-weight: 500;font-size: 18px;">' . $created_at . '</h1>
                                     </div>';
             $pdf->writeHTML($html, true, false, true, false, '');
             // ---------------------------------------------------------
             $img_file = Base_url() . 'assets/site/images/innerbanner.jpg';
             $pdf->AddPage();
             $myPageWidth = $pdf->getPageWidth();
             $myPageHeight = $pdf->getPageHeight();
             $myX = $myPageWidth / 2 - 50;
             $myY = $myPageHeight / 2 - 40;
             $pdf->SetAlpha(0.09);
             $pdf->Image(Base_url() . 'assets/site/images/dase_logo.png', $myX, $myY, $ImageW, $ImageH, '', '', '', true, 150);
             $pdf->SetAlpha(1);
             $pdf->Image($img_file, 0, 0, 210, 47, '', '', '', false, 300, '', false, false, 0);
             $pdf->SetDrawColor(255, 0, 0);
             $content = '<table cellspacing="0" cellpadding="0">
                 <tr><td><img title="" alt="" src="' . Base_url() . 'assets/site/images/dase_logo.png"></td></tr>
                 <tr><td>' . $display_name . '</td></tr>
                 <tr><td>' . $created_at . '</td></tr>
                 <tr><td>&nbsp;</td></tr>
                 <tr><td>&nbsp;</td></tr>
             </table>';
             $content .= '<div style="padding: 30px;">
                                     <p style="margin: 0 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Introduction</p>
                                     <p>Thank you for completing your Bounce Back Survey. This report provides you with a summary of your results, makes some personalised recommendations and provides you with the tools to create an action plan.</p>
                                     <p>Each dimension is presented individually with a description of your results and strategies for strengthening.</p>
                                     <p style="margin: 5px 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Understanding Your Report</p>
                                     <p>Your report contains a description of the 10 dimensions of resilience for which you were assessed.  Your individual assessment results for each dimension is presented as a flag.  Refer to the table below when reading your report.</p>
                                     <p>Red flag: <img src="' . Base_url() . 'assets/site/images/close_icon.jpg" height="25" alt="">
                                     &nbsp;&nbsp;&nbsp;Green Flag:<img src="' . Base_url() . 'assets/site/images/tick_icon.jpg" height="25" alt=""></p>
                                     <p style="margin: 5px 0 10px; color: #424242; font-weight: 500; font-size: 20px;">Summary of Results</p>
                                     <table style="text-align: left;">
                                         <thead>
                                             <tr>
                                                 <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:200px">Name</th>
                                                 <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 1</th>
                                                 <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 2</th>
                                                 <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 3</th>
                                                 <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Question 4</th>
                                                 <th style="padding:3px; border: solid 1px #e0e0e0; background-color:#18A7A5;color:#fff; width:90px">Total</th>
                                             </tr>
                                         </thead>
                                         <tbody>';
             $grandtotal = 0;
             //$content.='<table cellspacing="0" cellpadding="5" border="1">';
             // $content.='<tr><td width="25%"><strong>Dimension</strong></td><td width="10%"><strong>Score</strong></td><td width="65%"><strong>Comment</strong></td></tr>';
             foreach ($getsurveydetail as $key => $value) {
                 $getcategory = $this->survey_model->getcategory($key);
                 $getvalue1 = $this->survey_model->getvalue($value[0]);
                 $getvalue2 = $this->survey_model->getvalue($value[1]);
                 $getvalue3 = $this->survey_model->getvalue($value[2]);
                 $getvalue4 = $this->survey_model->getvalue($value[3]);
                 $getQuestion = $this->survey_model->getQuestion($value[3]);
                 $total = $getvalue1 + $getvalue2 + $getvalue3 + $getvalue4;
                 $grandtotal = $grandtotal + $total;
                 $content .= '
                                             <tr>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0; background-color:#f5f5f5; width:200px">' . $getQuestion . '</td>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue1 . '</td>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue2 . '</td>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue3 . '</td>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $getvalue4 . '</td>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0; width:90px">' . $total . '</td>
                                             </tr>';
             }
             $content .= '               </tbody>
                                         <tfoot>
                                             <tr>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0;" colspan="5"></td>
                                                 <td style="padding:3px; border: solid 1px #e0e0e0;background-color:#B72529; color:#fff;">' . $grandtotal . '</td>
                                             </tr>
                                         </tfoot>
                                     </table>
                                 </div>';
             // $content.='<p style="padding: 75px 15px 0;text-align:center; border-top: solid 1px #E0E0E0; font-size: 10px;">&nbsp;<br>© 2016. SMG Health. All rights reserved.</p>';
             $pdf->SetFont('freeserif', '', 12);
             $pdf->setTextRenderingMode($stroke = 0, $fill = true, $clip = false);
             //$pdf->writeHTMLCell(0, 10, '© 2016. SMG Health. All rights reserved.', 0, false, 'C', 0, '', 0, false, 'T', 'M');
             $pdf->writeHTML($content, true, false, false, false, '');
             foreach ($getsurveydetail as $key => $value) {
                 $getcategory = $this->survey_model->getcategory($key);
                 $getvalue1 = $this->survey_model->getvalue($value[0]);
                 $getvalue2 = $this->survey_model->getvalue($value[1]);
                 $getvalue3 = $this->survey_model->getvalue($value[2]);
                 $getvalue4 = $this->survey_model->getvalue($value[3]);
                 $getQuestion = $this->survey_model->getQuestion($value[3]);
                 $total = $getvalue1 + $getvalue2 + $getvalue3 + $getvalue4;
                 $getFeedback = $this->survey_model->getFeedback($getQuestion, $total);
                 $pdf->AddPage();
                 $myPageWidth = $pdf->getPageWidth();
                 $myPageHeight = $pdf->getPageHeight();
                 $myX = $myPageWidth / 2 - 50;
                 $myY = $myPageHeight / 2 - 40;
                 $pdf->SetAlpha(0.09);
                 $pdf->Image(Base_url() . 'assets/site/images/dase_logo.png', $myX, $myY, $ImageW, $ImageH, '', '', '', true, 150);
                 $pdf->SetAlpha(1);
                 // set the starting point for the page content
                 $pdf->setPageMark();
                 $pdf->Image($img_file, 0, 0, 210, 47, '', '', '', false, 300, '', false, false, 0);
                 // set color for text stroke
                 $pdf->SetDrawColor(255, 0, 0);
                 $content = '<table cellspacing="0" cellpadding="0">
                     <tr><td><img title="" alt="" src="' . Base_url() . 'assets/site/images/dase_logo.png"></td></tr>
                     <tr><td>' . $display_name . '</td></tr>
                     <tr><td>' . $created_at . '</td></tr>
                     <tr><td>&nbsp;</td></tr>
                     <tr><td>&nbsp;</td></tr>
                 </table>';
                 if ($total > 13) {
                     $icon = "tick_icon.jpg";
                 } else {
                     $icon = "close_icon.jpg";
                 }
                 $content .= '<div style="padding: 30px;">
                             <p style="margin: 0 0 10px;color: #424242;font-weight: 500;font-size: 20px;">Interpretation of scores</p>';
                 $content .= '<div style="padding:0 0 30px;">
                                         <h3 style="margin: 0 0 5px;color: #18A7A5;font-weight: 700;font-size: 24px;"><span style="display:inline-block; width:200px; color: #ADADAD; font-weight:500;">Dimension :</span>' . $getQuestion . '</h3>
                                         <h3 style="margin: 0 0 5px;color: #18A7A5;font-weight: 700;font-size: 24px;"><span style="display:inline-block; width:200px; color: #ADADAD; font-weight:500;">Score :</span>' . $total . '</h3>
                                         <h3 style="margin: 0 0 5px;color: #18A7A5;font-weight: 700;font-size: 24px;"><span style="display:inline-block; width:200px; color: #ADADAD; font-weight:500;">Comment :</span><img src="' . Base_url() . 'assets/site/images/' . $icon . '" alt=""></h3>
                                         <div style="margin-left:200px;">
                                             ' . $getFeedback . '
                                         </div>
                                     </div>
                 ';
                 $pdf->SetFont('freeserif', '', 12);
                 $pdf->setTextRenderingMode($stroke = 0, $fill = true, $clip = false);
                 //$pdf->writeHTMLCell(0, 10, '© 2016. SMG Health. All rights reserved.', 0, false, 'C', 0, '', 0, false, 'T', 'M');
                 $pdf->writeHTML($content, true, false, false, false, '');
             }
             /* Create ditectory to save PDF report */
             $fillpath = realpath("assets/site/reports");
             if (!is_dir($fillpath . "/{$id_user}")) {
                 mkdir($fillpath . "/{$id_user}");
             }
             $filename = $fillpath . "/{$id_user}/" . 'survey-report-' . strtotime('now') . '.pdf';
             $pdf->Output($filename, 'F');
             /* Mail to user */
             $username = $this->session->userdata('display_name');
             $user = $this->site_model->get_row('smg_users', array('id_user' => $this->session->userdata('id_user')));
             $user_email = $user->user_email;
             $this->load->library('email');
             $config['mailtype'] = 'html';
             $this->email->initialize($config);
             $this->email->from('*****@*****.**', 'Subhadip Sahoo');
             $this->email->to($user_email);
             $this->email->subject("Thanks for giving bounce back survey");
             $msg['username'] = $username;
             $bodyMsg = $this->load->view('site/email-templates/tmpl_survey_report', $msg, TRUE);
             $this->email->message($bodyMsg);
             $this->email->attach($filename);
             $this->email->send();
             $this->session->set_userdata('suc_msg', 'You have successfully submitted the survey.');
             redirect('thank-you');
             //                redirect('https://www.smghealth.com.au');
             exit;
         }
     } else {
         $data['sidebar'] = get_employee_sidebar();
         $header['title'] = 'Survey Panel';
         $header['display_name'] = $this->session->userdata('display_name');
         $data['header'] = $header;
         if ($ques = $this->survey_model->survey_questions()) {
             $data['questions'] = $ques;
         }
         $data['template'] = 'site/screens/survey_panel';
         $this->load->view('site/master_layout', $data);
     }
 }
コード例 #17
0
    function export_pdf33()
    {
        $this->load->library('pdf');
        ob_clean();
        $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
        $tbl = '';
        $tbl .= '
				<h3><u>MASTER KECAMATAN</u></h3>
				<table border="0"  cellpadding="0" cellspacing="0" >
				 <tr >';
        $tbl .= '<th  align="center" bgcolor="#359AFF" width="30" >NO</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >KODE</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="200" >NAMA KEC</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="80" >STATUS</th>';
        $tbl .= '</tr>';
        $sql = "select  kec_id, kec_kode,kec_nama,if(kec_aktif=1,'aktif','tidak aktif') st,kec_aktif from sps_ms_kecamatan \n";
        $data = $this->m_global->grid_view($sql)->result_array();
        $no = 1;
        foreach ($data as $row) {
            $bg = $no % 2;
            if ($bg == 0) {
                $bg = ' bgcolor="#E1F0FF" ';
            } else {
                $bg = ' bgcolor="#FFFFFF" ';
            }
            $tbl .= '
					<tr>
					<td ' . $bg . '  align="center" width="30">' . $no . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['kec_kode'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="200" >' . $row['kec_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="80" >' . $row['st'] . '</td>';
            $tbl .= '</tr>';
            $no++;
        }
        $tbl .= '</table>';
        $pdf->AddPage();
        $pdf->SetFont('helvetica', '', 8);
        $pdf->writeHTML($tbl, true, false, false, false, '');
        $pdf->Output('example_048.pdf', 'I');
    }
コード例 #18
0
ファイル: invoice.php プロジェクト: krisldz/Gekosale2
    public function getInvoiceById($id)
    {
        $pdf = new Pdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8');
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetAuthor('Gekosale');
        $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
        $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
        $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $pdf->setLanguageArray(1);
        $pdf->SetFont('dejavusans', '', 10);
        $sql = 'SELECT 
					*
				FROM invoice I
				LEFT JOIN `order` O ON O.idorder = I.orderid
				WHERE 
					I.idinvoice = :id AND IF(O.clientid IS NOT NULL, O.clientid = :clientid, 1)';
        $stmt = Db::getInstance()->prepare($sql);
        $stmt->bindValue('id', $id);
        $stmt->bindValue('clientid', Session::getActiveClientid());
        $stmt->execute();
        $rs = $stmt->fetch();
        $Data = array();
        if ($rs) {
            switch ($rs['contenttype']) {
                case 'html':
                    $htmlcontent = $rs['contentoriginal'];
                    $pdf->AddPage();
                    $pdf->writeHTML($htmlcontent, true, 0, true, 0);
                    @ob_clean();
                    $pdf->Output($rs['symbol'], 'D');
                    break;
                case 'pdf':
                    $data = base64_decode($rs['contentoriginal']);
                    header('Content-Type: application/pdf');
                    header('Content-Description: File Transfer');
                    header('Content-Transfer-Encoding: binary');
                    header('Content-Disposition: attachment; filename="' . $rs['symbol'] . '.pdf"');
                    header('Content-Length: ' . strlen($data));
                    header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0');
                    header('Expires: 0');
                    echo $data;
                    exit;
                    break;
            }
        }
    }
コード例 #19
0
    function export_pdf07()
    {
        $this->load->library('pdf');
        ob_clean();
        $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
        $tbl = '';
        $tbl .= '
				<h3><u>MASTER USER</u></h3>
				<table border="0"  cellpadding="0" cellspacing="0" >
				 <tr >';
        $tbl .= '<th  align="center" bgcolor="#359AFF" width="30" >NO</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="200" >USER NAME</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="250" >NAMA PEGAWAI</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="180" >NAMA GROUP</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >AKTIF</th>';
        $tbl .= '</tr>';
        $sql = "select user_id,user_name,user_pwd,user_group_id, user_pegawai,if(user_aktif=1,'aktif','tidak aktif') st_user,user_aktif,group_id, group_nama from v_user where group_aktif=1";
        $data = $this->m_global->grid_view($sql)->result_array();
        $no = 1;
        foreach ($data as $row) {
            $bg = $no % 2;
            if ($bg == 0) {
                $bg = ' bgcolor="#E1F0FF" ';
            } else {
                $bg = ' bgcolor="#FFFFFF" ';
            }
            $tbl .= '
					<tr>
					<td ' . $bg . '  align="center" width="30">' . $no . '</td>';
            $tbl .= '<td ' . $bg . '  width="200" >' . $row['user_name'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="250" >' . $row['user_pegawai'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="180" >' . $row['group_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['st_user'] . '</td>';
            $tbl .= '</tr>';
            $no++;
        }
        $tbl .= '</table>';
        $pdf->AddPage();
        $pdf->SetFont('helvetica', '', 8);
        $pdf->writeHTML($tbl, true, false, false, false, '');
        $pdf->Output('example_048.pdf', 'I');
    }
コード例 #20
0
    function export_pdf42()
    {
        $this->load->library('pdf');
        ob_clean();
        $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
        $tbl = '';
        $tbl .= '
				<h3><u>LIST PERUSAHAAN</u></h3>
				<table border="0"  cellpadding="0" cellspacing="0" >
				 <tr >';
        $tbl .= '<th  align="center" bgcolor="#359AFF" width="30" >NO</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="170" >NAMA PERUSAHAAN</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="150" >NAMA KOTA</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="210" >ALAMAT</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >NOTLP</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >NO FAX</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="150" >NAMA DIR</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="150" >KATEGORI_NAMA</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="150" >SEKSI_NAMA</th>';
        $tbl .= '<th   valign="middle" bgcolor="#359AFF" width="100" >PARENT_UTAMA</th>';
        $tbl .= '</tr>';
        $sql = "select perusahaan.per_nama, m_kota.kota_nama, perusahaan.per_alamat, perusahaan.per_notlp, perusahaan.per_fax, perusahaan.per_dir, perusahaan.per_kp, perusahaan.per_jkp, perusahaan.per_notlp_kp, m_kategori.kategori_nama, m_seksi.seksi_nama, m_struktur.parent_utama , perusahaan.per_id,,per_kota_id,per_seksi_id,per_kategori_id\nfrom perusahaan left join m_kota on (perusahaan.per_kota_id = m_kota.kota_id) left join m_kategori on (perusahaan.per_kategori_id = m_kategori.kategori_id) left join m_seksi on (perusahaan.per_seksi_id = m_seksi.seksi_id) left join m_struktur on (perusahaan.per_kode = m_struktur.struktur_id)\n";
        $data = $this->m_global->grid_view($sql)->result_array();
        $no = 1;
        foreach ($data as $row) {
            $bg = $no % 2;
            if ($bg == 0) {
                $bg = ' bgcolor="#E1F0FF" ';
            } else {
                $bg = ' bgcolor="#FFFFFF" ';
            }
            $tbl .= '
					<tr>
					<td ' . $bg . '  align="center" width="30">' . $no . '</td>';
            $tbl .= '<td ' . $bg . '  width="170" >' . $row['per_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="150" >' . $row['kota_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="210" >' . $row['per_alamat'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['per_notlp'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['per_fax'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="150" >' . $row['per_dir'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="150" >' . $row['kategori_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="150" >' . $row['seksi_nama'] . '</td>';
            $tbl .= '<td ' . $bg . '  width="100" >' . $row['parent_utama'] . '</td>';
            $tbl .= '</tr>';
            $no++;
        }
        $tbl .= '</table>';
        $pdf->AddPage();
        $pdf->SetFont('helvetica', '', 8);
        $pdf->writeHTML($tbl, true, false, false, false, '');
        $pdf->Output('example_048.pdf', 'I');
    }