$_BORDER = 0;
$_FONT = 'Times';
$_FONTSIZE = 10;
$pdf = new PDF_MC_Table();
$size = $pdf->_getpagesize('Legal');
$size[1] = 6;
$pdf->DefPageSize = $size;
$pdf->CurPageSize = $size;
$pdf->AddPage('L', array(200, 150));
//$pdf->AddPage('P',array(210,296));
$pdf->SetFont('helvetica', '', $_FONTSIZE);
$pdf->SetRightMargin($_HEIGHT);
$pdf->SetLeftMargin($_HEIGHT);
$pdf->SetAutoPageBreak(false, 0);
$pdf->Ln(0);
$pdf->Image('../images/Logo.png', 7, 10, 15, 15);
$pdf->SetFont('Arial', 'B', 6);
$pdf->Cell(10, 5, "", "TL", 0, 'L');
$pdf->Cell(80, 5, "PEMERINTAH KOTA BANDUNG", "TR", 0, 'C');
$pdf->Cell(10, 5, "", "", 0, 'L');
$pdf->Cell(90, 5, "", "TLR", 0, 'L');
$pdf->Ln();
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(10, 5, "", "L", 0, 'L');
$pdf->Cell(80, 5, "DINAS PELAYANAN PAJAK", "R", 0, 'C');
$pdf->Cell(10, 5, "", "", 0, 'L');
$pdf->Cell(90, 5, "PERHATIAN", "LR", 0, 'C');
$pdf->Ln();
$pdf->SetFont('Arial', '', 6);
$pdf->Cell(10, 5, "", "L", 0, 'L');
$pdf->Cell(80, 5, "Jalan Wastukencana No. 2 Telp/Fax (022) 4235052", "R", 0, 'C');
Example #2
0
require 'mc_table.php';
// Load data
function LoadData($file)
{
    // Read file lines
    $datas = explode('end', trim($file));
    foreach ($datas as $line) {
        $line = substr($line, 0, -3);
        $line_br = str_replace("<br>", "\r\n", explode('$@$', trim($line)));
        $data[] = str_replace("&nbsp;", " ", $line_br);
    }
    return $data;
}
$hed = explode('end', $heds);
$line = substr($hed[0], 0, -3);
$header = explode('$@$', $line);
$data = LoadData($bdy);
//$header = array('Bill-To','Ship-To/Ship-To Location','PO #','Order/Quote/Plant','Planned/Est. Arr Shipping','Status');
$pdf = new PDF_MC_Table();
$pdf->SetWidths(array(40, 70, 40, 50, 55, 25));
$pdf->AddPage('L');
$pdf->SetFont('Arial', '', '');
$pdf->Image('../../images/madix-logo300.png', 10, 12, 50, 0, '', '');
$pdf->SetTopMargin(35);
$pdf->Row($header);
foreach ($data as $row) {
    $pdf->Rows($row);
}
$pdf->Output();
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="Order_list.pdf"');
Example #3
0
}
$items = $data;
$_BORDER = 0;
$_FONT = 'Times';
$_FONTSIZE = 10;
$pdf = new PDF_MC_Table();
$size = $pdf->_getpagesize('Legal');
$pdf->DefPageSize = $size;
$pdf->CurPageSize = $size;
$pdf->AddPage('Landscape', array(160, 210));
$pdf->SetFont('helvetica', '', $_FONTSIZE);
$pdf->SetRightMargin(5);
$pdf->SetLeftMargin(5);
$pdf->SetTopMargin(-20);
$pdf->SetAutoPageBreak(false, 0);
$pdf->Image('../images/logo_pemda_warna.png', 12, 15, 20, 20);
$pdf->SetFont('helvetica', 'B', 14);
$pdf->SetWidths(array(10, 165));
$pdf->SetAligns(array("C", "C"));
$pdf->RowMultiBorderWithHeight(array("", "PEMERINTAH KOTA BANDUNG\nDINAS PELAYANAN PAJAK"), array('', ''), 6);
$pdf->SetFont('helvetica', '', 12);
$pdf->SetWidths(array(15, 165));
$pdf->SetAligns(array("C", "C"));
$pdf->RowMultiBorderWithHeight(array("", "Jalan Wastukancana No.2\nTelp. 022-4235052 - Bandung"), array('', ''), 6);
$pdf->SetWidths(array(15, 165, 20));
$pdf->RowMultiBorderWithHeight(array("", "", ""), array('B', 'B', 'B'), 6);
$pdf->ln(2);
$pdf->SetFont('helvetica', '', 12);
$pdf->SetAligns(array("L", "L", "L"));
$pdf->SetWidths(array(40, 4, 80));
$pdf->ln(2);
Example #4
0
 $i = 1;
 $x_texto1 = 29.5;
 $y_texto1 = 56;
 $x_image = 20;
 $y_image = 21;
 while ($alumno = mysqli_fetch_object($result)) {
     if ($i % 5 == 0) {
         $ln = 1;
     } else {
         $ln = 0;
     }
     $pdf->Cell(37, 43, '', 1, $ln, 'C');
     // Dibuja una cuadrícula
     $foto = "../../xml/fotos/{$alumno->claveal}.jpg";
     if (file_exists($foto)) {
         $pdf->Image($foto, $x_image, $y_image, 23, 30, 'JPG');
     }
     $pdf->SetFont('NewsGotT', 'B', 9);
     $pdf->Text($x_texto1 - strlen($alumno->apellidos) / 2, $y_texto1, $alumno->apellidos);
     $pdf->SetFont('NewsGotT', '', 9);
     $pdf->Text($x_texto1 - strlen($alumno->nombre) / 2, $y_texto1 + 4, $alumno->nombre);
     // Texto
     $x_texto1 += 37;
     if ($ln) {
         $x_texto1 = 29.5;
         $y_texto1 += 43;
     }
     // Imagen
     $x_image += 37;
     if ($ln) {
         $x_image = 20;
$reco = pg_query($query);
$row = pg_fetch_array($reco);
*/
//QUERY PARA EL PERIDO ACTIVO
$queryPer = "SELECT tipo, anio FROM periodo WHERE activo = TRUE";
$recoPer = pg_query($queryPer);
$rowPer = pg_fetch_array($recoPer);
$pdf->SetFont('Arial', 'B', 12);
$pdf->MultiCell(0, 5, utf8_decode("\nRepública Bolivariana de Venezuela\nUniversidad del Zulia\nFacultad Experimental de Ciencias\nDivisión de Programas Especiales\nSistema de Pasantías\n"), 0, "C", 0);
$pdf->MultiCell(165, 5, utf8_decode("\n\nReporte General"), 0, "C", 0);
$pdf->MultiCell(165, 5, utf8_decode("\n{$rowPer['tipo']} - {$rowPer['anio']}"), 0, "C", 0);
$pdf->Ln();
$inscritos = contar("SELECT COUNT(*) FROM pasantia INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE WHERE pasantia.m01_registrada IS NOT NULL");
$aprobados = contar("SELECT COUNT(*) FROM pasantia INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE WHERE pasantia.aprobada = TRUE");
$reprobados = contar("SELECT COUNT(*) FROM pasantia INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE WHERE pasantia.aprobada = FALSE");
$pdf->Image("logotipo.jpg", 20, 12, -280);
//GENERAR LA TABLA
$pdf->SetXY(57, 70);
$pdf->SetFont('Arial', 'B', 12);
$pdf->SetWidths(array(30, 30, 30));
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->Row(array("Inscritos", "Aprobados", "Reprobados"));
$pdf->SetX(57);
$pdf->SetFont('Arial', '', 12);
$pdf->SetWidths(array(30, 30, 30));
$pdf->SetAligns(array('C', 'C', 'C'));
$pdf->Row(array("{$inscritos}", "{$aprobados}", "{$reprobados}"));
//GENERAR LA GRAFICA
$graph = new PieGraph(640, 480);
$graph->SetShadow();
$graph->title->Set("APROBADOS / REPROBADOS");
Example #6
0
 function afficherPDF($vpdf)
 {
     require 'fpdf/mc_table.php';
     $pdf = ob_get_clean();
     $pdf = new PDF_MC_Table();
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 12);
     $pdf->Image("images/logo.png", 7, 5, 50.9);
     $pdf->SetXY(9, 15);
     $pdf->RoundedRect(95, 54, 110, 35, 2, 'D');
     $pdf->SetXY(9, 40);
     $pdf->MultiCell(80, 5, utf8_decode("Siège social : GSB\nPhiladelphie, \nPennsylvanie, Etats-Unis\ngsb_galaxybourdin@gmail.com "), 0, "L", 0);
     $pdf->SetXY(100, 57);
     $pdf->MultiCell(100, 7, utf8_decode("Client :  " . $vpdf['nom'] . " " . $vpdf['prenom'] . "\nAdresse : " . $vpdf['adresse'] . "\nCode postal : " . $vpdf['cp'] . "\nVille : " . $vpdf['ville']), 0, "L", 0);
     $pdf->SetXY(9, 100);
     $pdf->MultiCell(80, 5, utf8_decode("Remboursement du :  " . $vpdf['numMois'] . " / " . $vpdf['numAnnee']), 0, "L", 0);
     $pdf->SetWidths(array(47.5, 47.5, 47.5, 47.5));
     srand(microtime() * 1000000);
     $pdf->SetXY(10, 110);
     $pdf->MultiCell(190, 7, utf8_decode('Eléments forfaitisés'), 1, "L", 0);
     $pdf->Row2(array('Frais forfaitaires', utf8_decode('Quantité'), 'Montant unitaire', 'Montant total'));
     $pdf->Row2(array($vpdf['libelle'][0], utf8_decode($vpdf['quantite'][0]), $vpdf['montant'][0], $vpdf['montantT'][0] . " " . html_entity_decode($vpdf['euros'])));
     $pdf->Row2(array(utf8_decode($vpdf['libelle'][1]), utf8_decode($vpdf['quantite'][1]), $vpdf['montant'][1], $vpdf['montantT'][1] . " " . html_entity_decode($vpdf['euros'])));
     $pdf->Row2(array(utf8_decode($vpdf['libelle'][2]), utf8_decode($vpdf['quantite'][2]), $vpdf['montant'][2], $vpdf['montantT'][2] . " " . html_entity_decode($vpdf['euros'])));
     $pdf->Row2(array(utf8_decode($vpdf['libelle'][3]), utf8_decode($vpdf['quantite'][3]), $vpdf['montant'][3], $vpdf['montantT'][3] . " " . html_entity_decode($vpdf['euros'])));
     $pdf->SetXY(10, 157);
     mysql_connect('localhost', 'root', '');
     mysql_select_db('gsbv2');
     //First table: put all columns automatically
     $pdf->MultiCell(190, 7, utf8_decode('Eléments hors forfait'), 1, "L", 0);
     $prop = array('HeaderColor' => array(205, 216, 211), 'color1' => array(255, 255, 255), 'color2' => array(255, 255, 250), 'padding' => 2);
     $pdf->AddCol('date', 35, '', 'Date');
     $pdf->AddCol('libelle', 105, 'Libelle');
     $pdf->AddCol('montant', 50, 'Montant', 'R');
     $pdf->Table("select date,libelle,montant  from lignefraishorsforfait lf where lf.mois='" . $vpdf['mois'] . "' and lf.idVisiteur='" . $vpdf['id'] . "' " . "UNION ALL (select date,libelle,montant as idlfr from lignefraishorsforfaitrefuse lfr where lfr.mois='" . $vpdf['mois'] . "' and lfr.idVisiteur='" . $vpdf['id'] . "')", $prop);
     $pdf->SetXY(10, 200);
     $pdf->SetXY(130, 230);
     $pdf->MultiCell(70, 7, "Total du " . $vpdf['numMois'] . " / " . $vpdf['numAnnee'] . " : " . $vpdf['montVal'] . " " . html_entity_decode($vpdf['euros']) . "\nNombre de justificatifs : " . $vpdf['nbJust'] . " fiche(s)" . utf8_decode("\nMontant refusé : ") . $vpdf['montRefuse'] . " " . html_entity_decode($vpdf['euros']) . "\nFait le : " . $vpdf['dateNow'] . "", 1, "R", 0);
     $pdf->Output();
 }
$pdf->SetFont('Arial', 'B', 18);
$pdf->Cell(180, $high, "Netherhall House", 0, 0, 'C', true);
$pdf->Ln();
$pdf->SetFont('Arial', '', 10);
//$pdf->SetWidths(array(40,100,40));
//$pdf->SetAligns(array('','C',''));
//$pdf->SetBorders(array(0,0,0));
$pdf->SetX = 70;
$pdf->SetY = 15;
$cabecera = "Nutley Terrace, London NW3 5SA\nTel: 020 7435 8888 (Director); 020 7472 5720 (Residents)\nFax: 020 7472 5721\nE-Mail: director@nh.netherhall.org.uk\nWeb: www.nh.netherhall.org.uk";
$pdf->MultiCell(180, 4, $cabecera, 0, 'C');
//$pdf->Row(array("",$cabecera,""));
$pdf->Ln();
$pdf->SetAligns(array('', '', ''));
$pdf->SetBorders(array(1, 1, 1));
$pdf->Image("imgs/shield.gif", 18, 7, 26);
if ($arrResident[picture] != "" && file_exists("residentsnh/" . $arrResident[picture])) {
    $pdf->Image("residentsnh/" . $arrResident[picture], 180, 10, 20);
} else {
    $pdf->Image("imgs/no_picture.png", 180, 10, 20);
}
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(180, $high, "APPLICATION FOR ADMISSION", 0, 0, 'C', true);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 18);
$pdf->Cell(180, $high, $arrResident[name] . " " . $arrResident[surname], 0, 0, '', true);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial', '', 11);
}
$_BORDER = 0;
$_FONT = 'Times';
$_FONTSIZE = 10;
$pdf = new PDF_MC_Table();
$size = $pdf->_getpagesize('Legal');
$size[1] = 6;
$pdf->DefPageSize = $size;
$pdf->CurPageSize = $size;
$pdf->AddPage('landscape', array(160, 160));
$pdf->SetFont('helvetica', '', $_FONTSIZE);
$pdf->SetRightMargin(5);
$pdf->SetLeftMargin(5);
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetFont('Courier', 'B', 8);
$pdf->Image('../images/logo_pemda.png', 10, 5, 15, 15);
$pdf->ln(10);
$pdf->SetWidths(array(5, 95, 45));
$pdf->SetAligns(array("L", "L", "L"));
$pdf->RowMultiBorderWithHeight(array("", "USER ID : " . $data["p_cg_terminal_id"], "TGL CETAK : " . date('d/m/Y')), array("", "", ""), 5);
$pdf->SetWidths(array(5, 95, 45));
$pdf->SetAligns(array("L", "L", "L"));
$pdf->RowMultiBorderWithHeight(array("", "DISYANJAK", "JAM CETAK : " . date('H:i:s')), array("", "", ""), 5);
$pdf->ln();
$pdf->SetWidths(array(5, 90, 50));
$pdf->SetAligns(array("L", "L", "L"));
$pdf->RowMultiBorderWithHeight(array("", "BUKTI PEMBAYARAN / SETORAN " . $data['jenis_pajak'], " "), array("", "", ""), 3);
$pdf->SetWidths(array(5, 90, 50));
$pdf->SetAligns(array("L", "L", "L"));
$pdf->RowMultiBorderWithHeight(array("", "PEMERINTAH KOTA BANDUNG", " "), array("", "", ""), 3);
$pdf->SetWidths(array(5, 140));
 public function printNoBayar()
 {
     include "lib/fpdf17/mc_table.php";
     include "lib/qrcode/generate-qr-file.php";
     $_GET['payment_key'] = $_GET['no_bayar'];
     $items = self::read();
     $no_bayar = wbRequest::getVarClean('no_bayar', 'str', '');
     $data = array('items' => array(), 'total' => 0, 'success' => false, 'message' => '');
     try {
         $ws_client = self::getNusoap();
         $params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 't_vat_settlement', 'method' => 'getPaymentInfo', 'type' => 'json')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
         $ws_data = self::getResultData($ws_client, $params);
         //throw new Exception ($ws_data['da']);
         $data['items'] = $ws_data['data'];
         $data['total'] = $ws_data['total'];
         $data['message'] = $ws_data['message'];
         $data['success'] = $ws_data['success'];
         $data['msg'] = $data['message'];
     } catch (Exception $e) {
         $data['message'] = $e->getMessage();
     }
     $items = $data['items'];
     $_BORDER = 0;
     $_FONT = 'Times';
     $_FONTSIZE = 10;
     $pdf = new PDF_MC_Table();
     $size = $pdf->_getpagesize('Legal');
     $pdf->DefPageSize = $size;
     $pdf->CurPageSize = $size;
     $pdf->AddPage('Landscape', array(160, 210));
     $pdf->SetFont('helvetica', '', $_FONTSIZE);
     $pdf->SetRightMargin(5);
     $pdf->SetLeftMargin(5);
     $pdf->SetTopMargin(-20);
     $pdf->SetAutoPageBreak(false, 0);
     $pdf->Image('images/logo_pemda_warna.png', 12, 15, 20, 20);
     $pdf->SetFont('helvetica', 'B', 14);
     $pdf->SetWidths(array(10, 165));
     $pdf->SetAligns(array("C", "C"));
     $pdf->RowMultiBorderWithHeight(array("", "PEMERINTAH KOTA BANDUNG\nDINAS PELAYANAN PAJAK"), array('', ''), 6);
     $pdf->SetFont('helvetica', '', 12);
     $pdf->SetWidths(array(15, 165));
     $pdf->SetAligns(array("C", "C"));
     $pdf->RowMultiBorderWithHeight(array("", "Jalan Wastukancana No.2\nTelp. 022-4235052 - Bandung"), array('', ''), 6);
     $pdf->SetWidths(array(15, 165, 20));
     $pdf->RowMultiBorderWithHeight(array("", "", ""), array('B', 'B', 'B'), 6);
     $pdf->ln(2);
     $pdf->SetFont('helvetica', '', 12);
     $pdf->SetAligns(array("L", "L", "L"));
     $pdf->SetWidths(array(40, 4, 80));
     $pdf->ln(2);
     $pdf->RowMultiBorderWithHeight(array("MERK DAGANG", ":", $items['company_brand']), array('', '', ''), 6);
     $pdf->RowMultiBorderWithHeight(array("ALAMAT", ":", $items['brand_address_name'] . " " . $items['brand_address_no']), array('', '', ''), 6);
     $pdf->SetAligns(array("L", "L", "L", "C"));
     $pdf->SetWidths(array(40, 4, 80, 70));
     $pdf->RowMultiBorderWithHeight(array("NPWPD", ":", $items['npwd'], "NOMOR PEMBAYARAN"), array('', '', '', 'BLTR'), 6);
     $pdf->SetAligns(array("L", "L", "L"));
     $pdf->SetWidths(array(40, 4, 80));
     //$pdf->RowMultiBorderWithHeight(array("JENIS PAJAK",":",$items['items'][0]['vat_code']),array('','',''),6);
     $pdf->Cell(40, 6, 'JENIS PAJAK', "", 0, 'l');
     $pdf->Cell(4, 6, ':', "", 0, 'L');
     $pdf->Cell(80, 6, $items['vat_code'], "", 0, 'L');
     $pdf->SetFont('helvetica', 'B', 26);
     $pdf->SetTextColor(255, 0, 0);
     $pdf->Cell(70, 15, $no_bayar, "BLTR", 0, 'C');
     $pdf->SetFont('helvetica', '', 12);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->ln(6);
     $pdf->RowMultiBorderWithHeight(array("MASA PAJAK", ":", $items['code']), array('', '', ''), 6);
     $pdf->SetAligns(array("L", "L", "R"));
     $pdf->SetWidths(array(40, 4, 40));
     $pdf->RowMultiBorderWithHeight(array("JUMLAH (Rp)", ":", number_format($items['total_vat_amount'], 2, ",", ".")), array('', '', ''), 6);
     $pdf->RowMultiBorderWithHeight(array("DENDA (Rp)", ":", number_format($items['total_penalty_amount'], 2, ",", ".")), array('', '', ''), 6);
     $pdf->RowMultiBorderWithHeight(array("TOTAL (Rp)", ":", number_format($items['total_bayar'], 2, ",", ".")), array('', '', ''), 6);
     $pdf->SetAligns(array("L", "L", "L"));
     $pdf->SetWidths(array(40, 4, 80));
     $pdf->RowMultiBorderWithHeight(array("TERBILANG", ":", ucwords($items['dengan_huruf'] . ' rupiah')), array('', '', ''), 6);
     //$pdf->RowMultiBorderWithHeight(array("BATAS WAKTU PEMBAYARAN",":",$items['items'][0]['pay_due_date']),array('','',''),6);
     $pdf->SetWidths(array(200));
     $pdf->SetAligns(array("L"));
     $pdf->SetFont('helvetica', '', 10);
     $pdf->ln(6);
     $pdf->RowMultiBorderWithHeight(array("*Nomor pembayaran dan denda pajak yang tertera pada slip ini hanya berlaku pada hari ini, tanggal " . $items['settlement_date'] . " sampai dengan pukul 23:59 WIB"), array(''), 6);
     //$pdf->RowMultiBorderWithHeight(array("**Keterlambatan pembayaran melewati tanggal jatuh tempo akan dikenakan denda sesuai administrasi berupa bunga sebesar 2% (dua persen) setiap bulannya."),
     //array(''),6);
     $pdf->ln(8);
     $pdf->SetFont('helvetica', '', 12);
     $pdf->SetAligns(array("C"));
     $pdf->RowMultiBorderWithHeight(array("Bandung, " . $items['settlement_date'] . " Pukul " . $items['pukul']), array(''), 6);
     $pdf->SetFont('helvetica', '', 12);
     $pdf->RowMultiBorderWithHeight(array("BAYAR PAJAK MUDAH BANDUNG JUARA"), array(''), 6);
     $pdf->Image('http://' . $_SERVER['HTTP_HOST'] . '/mpd-wp/client/lib/qrcode/generate-qr.php?param=' . $no_bayar . '', 175, 13, 25, 25, 'PNG');
     $pdf->Output(time() . "_kwitansi_" . $no_bayar, "I");
     exit;
 }
$_HEIGHT = 3;
$_BORDER = 0;
$_FONT = 'Times';
$_FONTSIZE = 8;
$pdf = new PDF_MC_Table();
$size = $pdf->_getpagesize('Legal');
$size[1] = 6;
$pdf->DefPageSize = $size;
$pdf->CurPageSize = $size;
$pdf->AddPage('P', array(80, 80));
//$pdf->AddPage('P',array(210,296));
$pdf->SetRightMargin($_HEIGHT);
$pdf->SetLeftMargin($_HEIGHT);
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetFont('Arial', '', 9);
$pdf->Image('../images/logo_pemda.png', 5.5, 8, 10, 10);
$pdf->ln();
$pdf->SetWidths(array(15, 60));
$pdf->SetAligns(array("L", "C"));
$pdf->RowMultiBorderWithHeight(array("", "PEMERINTAH KOTA BANDUNG\n" . "DINAS PELAYANAN PAJAK"), array("", ""), $_HEIGHT + 1);
$pdf->ln(1);
$pdf->SetWidths(array(15, 50, 10));
$pdf->SetAligns(array("L", "L", "L"));
$pdf->RowMultiBorderWithHeight(array("", "", ""), array("T", "T", "T"), 1);
$pdf->ln();
$pdf->SetFont('Arial', '', 11);
$pdf->SetWidths(array(5, 65, 5));
$pdf->SetAligns(array("L", "C", "L"));
$pdf->RowMultiBorderWithHeight(array("", "No. Bayar :", ""), array("", "", ""), $_HEIGHT + 2);
$pdf->SetFont('Arial', 'B', 18);
$pdf->SetWidths(array(5, 65, 5));
}
$pdf = new PDF_MC_Table('L', 'mm', 'Letter');
$pdf->AddPage();
$pdf->SetMargins(10, 10);
$db = new PgDB();
//QUERY PARA LOS ESTUDIANTES DEL PERIODO ACTIVO
$query = "SELECT periodo.tipo, periodo.anio, nombre, apellido, cedula, aprobada, m01_registrada ::timestamp::date, m02_aceptada ::timestamp::date, m03_numero_asignado ::timestamp::date,\nm04_sellada::timestamp::date, m05_entrego_copia ::timestamp::date, m06_entrego_borrador ::timestamp::date, m07_retiro_borrador ::timestamp::date,\nm08_entrega_final ::timestamp::date, m09_carga_nota ::timestamp::date, aprobada\nFROM usuario INNER JOIN pasantia ON usuario.id = pasantia.usuario_id AND usuario.tipo = 'estudiante' INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE ORDER BY cedula ";
//QUERY PARA EL PERIDO ACTIVO
$queryPer = "SELECT tipo, anio FROM periodo WHERE activo = TRUE";
$recoPer = pg_query($queryPer);
$rowPer = pg_fetch_array($recoPer);
$pdf->SetFont('Arial', 'B', 12);
$pdf->MultiCell(0, 5, utf8_decode("\nRepública Bolivariana de Venezuela\nUniversidad del Zulia\nFacultad Experimental de Ciencias\nDivisión de Programas Especiales\nSistema de Pasantías\n"), 0, "C", 0);
$pdf->MultiCell(258, 5, utf8_decode("\nReporte de Pasantes Registrados"), 0, "C", 0);
$pdf->MultiCell(258, 5, utf8_decode("\n{$rowPer['tipo']} - {$rowPer['anio']}"), 0, "C", 0);
$pdf->Ln();
$pdf->Image("logotipo.jpg", 20, 12, -280);
$pdf->SetFont('Arial', 'B', '10');
$pdf->SetWidths(array(25, 20, 22, 22, 25, 25, 25, 25, 25, 25, 25));
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->Row(array("\nNombre", "\nC.I", "\nRegistrada", "\nAceptada", "Fecha Numero asignado", "\nSellada", "\nEntrega de copia", "\nEntrega de borrador", "\nRetiro borrador", "\nEntrega Final", "\nCarga de Nota"));
$reco = pg_query($query);
while ($row = pg_fetch_array($reco)) {
    $pdf->SetFont('Arial', '', 10);
    $pdf->SetWidths(array(25, 20, 22, 22, 25, 25, 25, 25, 25, 25, 25));
    $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
    $row = transform($row);
    //var_dump($row);die();
    $pdf->Row(array("{$row['nombre']}\n{$row['apellido']}", "\n{$row['cedula']}", "\n{$row['m01_registrada']}", "\n{$row['m02_aceptada']}", "\n{$row['m03_numero_asignado']}", "\n{$row['m04_sellada']}", "\n{$row['m05_entrego_copia']}", "\n{$row['m06_entrego_borrador']}", "\n{$row['m07_retiro_borrador']}", "\n{$row['m08_entrega_final']}", "\n{$row['m09_carga_nota']}"));
}
$pdf->Output("reporte_pasantes.pdf", "D");