Exemplo n.º 1
0
        $this->Line(20, 277, 190, 277);
        $this->SetY(-20);
        $vFecha = date("d-m-Y H:i:s");
        $this->Cell(120, 4, "Fecha: " . $vFecha, 0, 0, 'L');
        $this->Cell(50, 4, 'WebApp', 0, 0, 'R');
    }
    function Body($usuarios)
    {
        //global $sEstupdf;
        $this->SetFont('arial', '', 8);
        $vCont = 1;
        foreach ($usuarios as $clave => $usuario) {
            $this->Cell(7, 5, $vCont, 'B', 0, 'C');
            $this->Cell(13, 5, $usuario['codProyecto'], 'B', 0, 'C');
            $this->Cell(60, 5, ucwords(strtolower($usuario['notario'])), 'B', 0, 'L');
            //$this->Cell(60,5, ucwords(strtolower($usuario['paterno'].' '.$usuario['materno'].' '.$usuario['nombres'])), 'B', 0, 'L');
            $this->Cell(60, 5, ucwords(strtolower($usuario['fechaInicio'])), 'B', 0, 'L');
            //$this->Cell(30,5,$usuario['clave'], 'B', 0, 'C');
            $this->Ln();
            $vCont++;
        }
    }
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->SetMargins(20, 20);
$pdf->AliasNbPages();
$pdf->AddFont('arialn', '', 'arialn.php');
$pdf->AddFont('arialn', 'B', 'arialnb.php');
$pdf->AddPage();
$pdf->Body($_SESSION['oPDF']);
$pdf->Output();
require_once 'FlowingBlockFPDF.php';
$nombreTemporal = "KEVIN ALEXANDER VALLADARES ARGUELLO";
$numCuentaTemporal = "20070000804";
$numIdentidadTemporal = "1701-1989-00998";
$calificacion = "100 POR CIENTO(%)";
$nombreSecretario = "JORGE ALBERTO MATUTE OCHOA";
$fechaPalabras = "veintidós días del mes de julio de dos mil quince.";
if (isset($_POST["arregloHimno"]) && isset($_POST["cadena"]) && isset($_POST["arregloCodsHimno"]) && isset($_POST["fechaExp"])) {
    $listaDNI = $_POST["arregloHimno"];
    $listaCodsHimno = $_POST["arregloCodsHimno"];
    $fechaExp = $_POST["fechaExp"];
    $codsHimno = explode(',', $listaCodsHimno);
    $tok = explode(',', $listaDNI);
    $tam = count($tok);
    $pdf = new PDF('P', 'cm', array(21.59, 33.02));
    $pdf->AddFont('Calibri', 'B', 'calibrib.php');
    $pdf->AddFont('Cambria', 'BI', 'cambriaz.php');
    $pdf->AddFont('Cambria', 'I', 'cambriai.php');
    for ($i = 0; $i < $tam; $i++) {
        $statement = $db->prepare('CALL SP_OBTENER_ESTUDIANTE_CONDUCTA(?, @pcMensajeError)');
        $statement->bindValue(1, $tok[$i]);
        $statement->execute();
        $contadorFilas = $statement->rowCount();
        if ($contadorFilas >= 1) {
            $tabla = $statement->fetchALL(PDO::FETCH_ASSOC);
        }
        foreach ($tabla as $fila) {
            $nombreTemporal = mb_strtoupper($fila['NOMBRE'], 'utf-8');
            $numCuentaTemporal = $fila['CUENTA'];
            $numIdentidadTemporal = $fila['DNI'];
        }
 $nombrecompleto = str_replace(" ", "_", strtolower($nombrecompleto));
 if (pg_result($curso, 0, 'tipo_matricula') == 'CDA') {
     $year = date('y', strtotime(pg_result($curso, 0, 'fecha_inicio')));
 } else {
     $year = date('y');
 }
 $codigo = $year . '-' . str_pad($curso_id, 4, "0", STR_PAD_LEFT) . '-' . str_pad($id, 4, "0", STR_PAD_LEFT);
 //IDIOMA DEL CURSO
 $idioma = pg_result($curso, 0, 'idioma');
 //echo $idioma;
 include 'includes/internacionalizacion.php';
 if ($edicion == 'OFF' && $est == 'APR' && $est_admin == 'ON') {
     $pdf = new PDF("P", "cm", "A4");
     $pdf->AddPage();
     //define("FPDF_FONTPATH", "/usr/share/fonts/truetype/ttf-dejavu");
     $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
     if ($curso_id == 36) {
         //Imagen de Coopeciagro Gustavo Aguero
         $pdf->Image('img/certificados/certificado-firmado-sellado-training_coopeciagro.jpg', 0, 0, 21, 29.7);
     } elseif ($curso_id == 214) {
         //Curso Presencial en Nicaragua dictado por Jose Campos de Gustavo Aguero
         $pdf->Image('img/certificados/certificado-firmado-sellado-training_gustavo3.jpg', 0, 0, 21, 29.7);
     } elseif ($curso_id == 258 || $curso_id == 290) {
         //Curso GISMAP WEBMINAR
         $pdf->Image('img/certificados/certificado-GISMAP-WEBMINAR.jpg', 0, 0, 21, 29.7);
     } elseif ($curso_id == 243) {
         //Segundo Curso en Nicaragua Nivel Intermedio dictado por Gustavo Aguero
         $pdf->Image('img/certificados/certificado-firmado-sellado-training_gustavo4.jpg', 0, 0, 21, 29.7);
     } elseif ($curso_id == 241) {
         //Fundacion Tripartita
         $pdf->Image('img/certificados/certificado_tripartita.jpg', 0, 0, 21, 29.7);
Exemplo n.º 4
0
        //Color and font restoration
        $this->SetFillColor(224, 235, 255);
        $this->SetTextColor(0);
        $this->SetFont('');
        //Data
        $fill = false;
        foreach ($data as $row) {
            $this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
            $this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
            $this->Cell($w[2], 6, number_format($row[2]), 'LR', 0, 'R', $fill);
            $this->Cell($w[3], 6, number_format($row[3]), 'LR', 0, 'R', $fill);
            $this->Ln();
            $fill = !$fill;
        }
        $this->Cell(array_sum($w), 0, '', 'T');
    }
}
$pdf = new PDF();
//Column titles
$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)');
//Data loading
$data = $pdf->LoadData('table_data_demo.txt');
$pdf->AddFont('arialunicid0', '', 'arialunicid0.php');
$pdf->SetFont('arialunicid0', '', 14);
$pdf->AddPage();
$pdf->BasicTable($header, $data);
$pdf->AddPage();
$pdf->ImprovedTable($header, $data);
$pdf->AddPage();
$pdf->FancyTable($header, $data);
$pdf->Output();
        $this->Cell(40, 5, utf8_decode($_GET['fin']), 0, 1, 'C', 0);
        $this->SetFont('Amble-Regular', '', 10);
        $this->Ln(5);
    }
    function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('Arial', 'I', 8);
        $this->Cell(0, 10, 'Pag. ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
$pdf = new PDF('P', 'mm', 'a4');
$pdf->AddPage();
$pdf->SetMargins(0, 0, 0, 0);
$pdf->AliasNbPages();
$pdf->AddFont('Amble-Regular');
$pdf->SetFont('Amble-Regular', '', 10);
$pdf->SetFont('Arial', 'B', 9);
$pdf->SetX(5);
$pdf->SetFont('Amble-Regular', '', 9);
$consulta = pg_query("select id_director, identificacion_dire ,nombres,direccion,telefono,celular from directores where id_director='{$_GET['id']}'");
while ($row = pg_fetch_row($consulta)) {
    $pdf->SetX(1);
    $pdf->SetFillColor(187, 179, 180);
    $pdf->Cell(25, 6, maxCaracter(utf8_decode('RUC/CI:'), 15), 1, 0, 'L', 0);
    $pdf->Cell(60, 6, maxCaracter(utf8_decode($row[1]), 15), 1, 0, 'L', 0);
    $pdf->Cell(25, 6, maxCaracter(utf8_decode('DIRECTOR'), 15), 1, 0, 'L', 0);
    $pdf->Cell(95, 6, maxCaracter(utf8_decode($row[2]), 50), 1, 1, 'L', 0);
    $pdf->SetX(1);
    $pdf->Cell(25, 6, maxCaracter(utf8_decode('TELF:'), 15), 1, 0, 'L', 0);
    $pdf->Cell(60, 6, maxCaracter(utf8_decode($row[4] . '-' . $row[5]), 20), 1, 0, 'L', 0);
Exemplo n.º 6
0
/**
 * Genera un reporte en PDF
 *
 * @param array $result
 * @param array $sumArray
 * @param string $title
 * @param array $weightArray
 * @param array $headerArray
 */
function pdf($result, $sumArray, $title, $weightArray, $headerArray)
{
    $config = Config::read('config');
    $active_app = Router::get_application();
    //Orientación
    if ($sumArray > 200) {
        $orientation = 'L';
    } else {
        $orientation = 'P';
    }
    $numRows = 140;
    //Tipo de Papel
    if ($sumArray > 250) {
        $paper = 'legal';
    } else {
        $paper = 'letter';
    }
    if ($paper == 'letter' && $orientation == 'P') {
        $widthPage = 220;
        $numRows = 42;
    }
    if ($paper == 'legal' && $orientation == 'L') {
        $widthPage = 355;
        $numRows = 30;
    }
    if ($paper == 'letter' && $orientation == 'L') {
        $widthPage = 270;
        $numRows = 30;
    }
    //Crear Documento PDF
    $pdf = new PDF($orientation, 'mm', $paper);
    $pdf->Open();
    $pdf->AddPage();
    //Nombre del Listado
    $pdf->SetFillColor(255, 255, 255);
    $pdf->AddFont('Verdana', '', 'verdana.php');
    $pdf->SetFont('Verdana', '', 14);
    $pdf->SetY(20);
    $pdf->SetX(0);
    $pdf->Ln();
    if ($config->{$active_app}->name) {
        $pdf->MultiCell(0, 6, strtoupper($config->{$active_app}->name), 0, "C", 0);
    }
    $pdf->MultiCell(0, 6, "REPORTE DE " . strtoupper($title), 0, "C", 0);
    $pdf->SetFont('Verdana', '', 12);
    if (isset($_SESSION['fecsis'])) {
        $pdf->MultiCell(0, 6, "FECHA " . date("Y-m-d"), 0, "C", 0);
    }
    $pdf->Ln();
    //Colores, ancho de línea y fuente en negrita
    $pdf->SetFillColor(0xf2, 0xf2, 0xf2);
    $pdf->SetTextColor(0);
    $pdf->SetDrawColor(0, 0, 0);
    $pdf->SetLineWidth(0.2);
    $pdf->SetFont('Arial', 'B', 10);
    if ($weightArray[0] < 11) {
        $weightArray[0] = 11;
    }
    //Parametros del Reporte
    $pos = floor($widthPage / 2 - $sumArray / 2);
    $pdf->SetX($pos);
    for ($i = 0; $i <= count($headerArray) - 1; $i++) {
        $pdf->Cell($weightArray[$i], 7, $headerArray[$i], 1, 0, 'C', 1);
    }
    $pdf->Ln();
    //Restauración de colores y fuentes
    $pdf->SetFillColor(224, 235, 255);
    $pdf->SetTextColor(0);
    $pdf->SetFont('Arial', 'B', 7);
    //print_r($weightArray);
    //Buscamos y listamos
    $n = 1;
    $p = 1;
    $t = 0;
    foreach ($result as $row) {
        //$pdf->Cell(Ancho, Alto, contenido, ?, ?, Align)
        if ($n > $numRows || $p == 1 && $n > $numRows - 3) {
            $pdf->AddPage($orientation);
            $pdf->SetY(30);
            $pdf->SetX($pos);
            $pdf->SetFillColor(0xf2, 0xf2, 0xf2);
            $pdf->SetTextColor(0);
            $pdf->SetDrawColor(0, 0, 0);
            $pdf->SetLineWidth(0.2);
            $pdf->SetFont('Arial', 'B', 10);
            for ($i = 0; $i < count($headerArray); $i++) {
                $pdf->Cell($weightArray[$i], 7, $headerArray[$i], 1, 0, 'C', 1);
            }
            $pdf->Ln();
            $pdf->SetFillColor(224, 235, 255);
            $pdf->SetTextColor(0);
            $pdf->SetFont('Arial', 'B', 7);
            $n = 1;
            $p++;
        }
        $pdf->SetX($pos);
        for ($i = 0; $i <= count($row) - 1; $i++) {
            if (is_numeric($row[$i])) {
                $pdf->Cell($weightArray[$i], 5, trim($row[$i]), 'LRTB', 0, 'C');
            } else {
                $pdf->Cell($weightArray[$i], 5, trim($row[$i]), 'LRTB', 0, 'L');
            }
        }
        $n++;
        $t++;
        $pdf->Ln();
    }
    $pdf->SetX($pos);
    $pdf->SetFont('Arial', 'B', 7);
    $pdf->SetFillColor(0xf2, 0xf2, 0xf2);
    $pdf->Cell($weightArray[0], 5, "TOTAL", 'LRTB', 0, 'R');
    $pdf->Cell($weightArray[1], 5, $t, 'LRTB', 0, 'L');
    /*print "<div style='background: url(img/bg2.jpg) #F2f2f2;border:1px solid #c0c0c0'>
    	<table><td><img src='img/information.gif' width='64' height='64'/></td><td>";
    	print "Papel: $paper<br>";
    	print "Orientación: $orientation<br>";
    	print "Ancho Página: $widthPage mm<br>";
    	print "Número Páginas: $p<br>";
    	print "</td></table></div><br>";*/
    $file = md5(uniqid());
    $pdf->Output(CORE_PATH . 'public/temp/' . $file . ".pdf", 'F');
    if (isset($raw_output)) {
        print "<script type='text/javascript'> window.open('" . KUMBIA_PATH . "temp/" . $file . ".pdf', null); </script>";
    } else {
        Generator::forms_print("<script type='text/javascript'> window.open('" . KUMBIA_PATH . "temp/" . $file . ".pdf', null); </script>");
    }
}
Exemplo n.º 7
0
    }
}
include '../db/conn.inc.php';
$dbh = new PDO($conn, $user, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$stmtMeucci = $dbh->prepare("SELECT * FROM datimeucci");
$stmtMeucci->execute();
$rsmeucci = $stmtMeucci->fetch(PDO::FETCH_ASSOC);
$sql = "SELECT azienda.*,stage.*,tirocinante.*,persTutor.PAZ_Titolo AS ta_Titolo,persTutor.PAZ_Nome AS ta_Nome,persTutor.PAZ_Telefono AS ta_Telefono, persTutor.PAZ_Cellulare AS ta_Cellulare, persTutor.PAZ_Email AS ta_Email, persLegal.*,tutor.* FROM stage INNER JOIN azienda ON ( azienda.AZ_ID = stage.AZ_ID_Azienda ) INNER JOIN tirocinante ON ( stage.TIR_ID_Tirocinante = tirocinante.TIR_ID ) INNER JOIN tutor ON ( tutor.TUT_ID = stage.TUT_ID_Tutor ) LEFT JOIN personale AS persTutor ON ( persTutor.PAZ_ID = stage.PAZ_ID_Tutor ) LEFT JOIN personale AS persLegal ON ( azienda.AZ_ID = persLegal.AZ_ID_Azienda AND persLegal.PAZ_RapprLegale =1 ) WHERE STA_ID=:id";
$stmt = $dbh->prepare($sql);
$stmt->bindValue(':id', $_GET['id']);
$stmt->execute();
if ($stmt->rowCount() > 0) {
    $row = $stmt->fetch(PDO::FETCH_ASSOC);
    $pdf = new PDF();
    $pdf->SetTitle("Progetto formativo e di orientamento");
    $pdf->AddFont('abac', '', 'abac.php');
    $pdf->AddFont('abalc', '', 'ABALC.php');
    $pdf->SetFillColor(255, 230, 255);
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetLeftMargin(18);
    $pdf->SetRightMargin(18);
    $pdf->SetFont('abac', '', 14);
    $pdf->Cell(0, 10, 'PROGETTO FORMATIVO e di ORIENTAMENTO', 0, 0, 'C');
    $pdf->Ln(10);
    $pdf->SetFont('abalc', '', 11);
    $pdf->Cell(40, 6, 'Tirocinante ', 1, 0, 'R', 1);
    $pdf->Cell(135, 6, ' ' . utf8_decode($row['TIR_Nome']) . ' ' . utf8_decode($row['TIR_Cognome']) . ' - C.F.: ' . utf8_decode($row['TIR_CodiceFiscale']), 1, 1);
    $pdf->Cell(40, 6, 'Luogo e data di nascita ', 1, 0, 'R', 1);
    $pdf->Cell(135, 6, ' ' . utf8_decode($row['TIR_NatoA']) . ' (' . $row['TIR_NatoProv'] . ') il ' . strftime('%d/%m/%Y', strtotime($row['TIR_DataNascita'])), 1, 1);
    $pdf->Cell(40, 6, 'Residenza ', 1, 0, 'R', 1);
Exemplo n.º 8
0
    }
}
//	echo $query_Recordset1;
$Recordset1 = mysqli_query($db_con, $query_Recordset1) or die(mysqli_error("No es posible conectar"));
#crea la consulata
$totalRows_Recordset1 = mysqli_num_rows($Recordset1);
#cantidad de registros
$pdf = new PDF();
$curso = 'Curso ' . $config['curso_actual'];
$curso_an = date('Y');
$mes_an = date('m');
//$curso_an=substr($curso,6,4)+1;
//echo "$config['curso_actual'] => $curso_an<br />";
$pdf->SetFillColor(255, 255, 255);
$pdf->AddPage();
$pdf->AddFont('c128ab');
$n = 1;
# carnet nº 1
while ($row_Recordset1 = mysqli_fetch_array($Recordset1)) {
    $fecha0 = str_replace("/", "-", $row_Recordset1[4]);
    $tr = explode("-", $fecha0);
    $fecha = "{$tr['2']}-{$tr['1']}-{$tr['0']}";
    $fecha4 = "{$tr['1']}-{$tr['0']}-{$tr['2']}";
    $claveal = $row_Recordset1[0];
    $unidad = $row_Recordset1[1];
    $apellidos = $row_Recordset1[2];
    $nombre = $row_Recordset1[3];
    $combasi = $row_Recordset1[5];
    if ($n_bib > 0) {
        $c_bib = $row_Recordset1[6];
        $claveal_bib .= " " . $c_bib;
<?php

if (empty($_SESSION)) {
    session_start();
}
ini_set('error_reporting', E_ALL);
require_once "../modelos/Consulta.reportes.php";
require_once "PDF.php";
if (isset($idCertificado)) {
    $pdf = new PDF('P', 'mm', 'letter');
    $pdf->AddFont('gothic', '', 'gothic.php');
    $pdf->AddFont('gothicb', 'B', 'gothicb.php');
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('gothic', '', 13);
    $pdf->SetMargins(30, 30, 25);
    $pdf->SetAutoPageBreak(true, 0);
    $consulta = new Consulta();
    //$id = $_GET["idCertificado"];
    $id = $idCertificado;
    $datos = $consulta->getDatosCertificadoCartera($id);
    $fecha_certificado_f = explode('-', $datos[2]);
    $fecha_certificado_f2 = explode('-', $datos[3]);
    $nroCertificado = $datos[6];
    $pdf->SetY(37);
    $pdf->Ln(6);
    $pdf->SetFont('gothicb', 'B', 22);
    $pdf->Ln(5);
    $titulo = "CERTIFICACIÓN";
    $pdf->Cell(0, 0, utf8_decode($titulo), 0, 0, 'C');
    $pdf->SetY(55);
Exemplo n.º 10
0
            $this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
            $this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
            $this->Cell($w[2], 6, $row[2], 'LR', 0, 'L', $fill);
            $this->Cell($w[3], 6, $row[3], 'LR', 0, 'L', $fill);
            $this->Cell($w[4], 6, $row[4], 'LR', 0, 'L', $fill);
            $this->Ln();
            $fill = !$fill;
        }
        $this->Cell(array_sum($w), 0, '', 'T');
    }
}
//Instanciation of inherited class
$pdf = new PDF('P', 'mm', 'a4');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->AddFont('verdana', '', 'verdana.php');
$pdf->AddFont('verdana', 'B', 'verdana.php');
$pdf->AddFont('verdana', 'U', 'verdana.php');
$pdf->SetY(20);
$pdf->SetFont('verdana', '', 9);
$pdf->Cell(50, 5, "Ganacias Periodo: ", 0);
$pdf->SetFont('verdana', 'U', 9);
$pdf->Cell(30, 5, $data["gananciasTotales"], 0);
$pdf->SetFont('verdana', '', 9);
$pdf->Cell(70, 5, "Productos Comprados: ", 0);
$pdf->SetFont('verdana', 'U', 9);
$pdf->Cell(40, 5, $data["productosComprados"], 0);
$pdf->Ln();
$pdf->SetFont('verdana', '', 9);
$pdf->Cell(50, 5, "Gastos de Producto: ", 0);
$pdf->SetFont('verdana', 'U', 9);
Exemplo n.º 11
0
$SUMNIKI = "ŠČĆŽĐščćžđ";
$text = iconv("UTF-8//TRANSLIT", "iso-8859-2", $SUMNIKI);
//
//
//$text = iconv("iso-8859-1", "iso-8859-2", $SUMNIKI);
//test Šumnikov
///koliko bomo pomaknili vse v desno//
$XOF = 26;
$LN_DEFAULT = 5;
//Instanciation of inherited class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->Image('img/obrazec.jpg', 0, 0, 197, 297);
//$pdf->AddFont('luxisb','','luxisb.php');
$pdf->AddFont('Arial', '', 'Arial.php');
$pdf->SetFont('Arial', '', 8);
//Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])
//NAziv in sedez
$pdf->SetXY($XOF + 35, 15);
$pdf->Cell(0, 0, "Root d.o.o., cesta v {$text} 10 3320 velenje", 0, 0, 'L');
//$pdf->MultiCell(65, 4,'sss', '', 'TL',0);
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 13, $pdf->getY());
//napisemo davcno//
$pdf->Cell(0, 0, spacer("123456789123", 4, 3), 0, 0, 'L');
//nova vrsta
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 30, $pdf->getY());
//gospodarska dejavnost//
$pdf->Cell(0, 0, 'Struzenje in gledanje', 0, 0, 'L');
Exemplo n.º 12
0
         $this->Cell(0, 90, 'Kepala Biro Kepegawaian BKN di Jakarta;', 0, 0, 'L');
         $this->Ln(0);
         $this->Cell(15);
         $this->Cell(5, 100, '3.', 0, 0, 'L');
         $this->Cell(0, 100, 'Pegawai yang bersangkutan;', 0, 0, 'L');
         $this->Ln(0);
         $this->Cell(15);
         $this->Cell(5, 110, '4.', 0, 0, 'L');
         $this->Cell(0, 110, 'Pertinggal', 0, 0, 'L');
     }
 }
 $pdf = new PDF('P', 'mm', array(210, 330));
 $pdf->AliasNbPages();
 $pdf->AddPage();
 $pdf->SetAutoPageBreak(0);
 $pdf->AddFont('ArialNarrow', '', 'arialn.php');
 $pdf->AddFont('ArialNarrow', 'B', 'arialnb.php');
 $pdf->AddFont('ArialNarrow', 'BI', 'arialnbi.php');
 $pdf->AddFont('ArialNarrow', 'I', 'arialni.php');
 $pdf->SetFont('ArialNarrow', '', 10);
 // VARIABEL
 $sifat = 'Penting';
 $lampiran = '-';
 $perihal = 'Kenaikan Gaji Berkala';
 $kota = 'Banjarbaru';
 $nama = $kgb->nama;
 $nip = split_nip($kgb->nip);
 //ok
 $unit_kerja = $kgb->unit_kerja;
 //ok
 $tgl_sk_lama = convert_tanggal('j M Y', $kgb->tgl_sk_lama);
Exemplo n.º 13
0
    while ($entry = mysql_fetch_array($result)) {
        if ($entry['disc_num'] == 1) {
            if ($entry['airabilityID'] == 3) {
                $tracks[] = $entry['track_num'];
            }
        } else {
            if ($entry['airabilityID'] == 3) {
                $tracks[] = "D" . $entry['disc_num'] . ".T" . $entry['track_num'];
            }
        }
    }
    return $tracks;
}
$pdf = new PDF('P', 'in', 'A4');
$pdf->AddPage();
$pdf->AddFont('Basicmanual', '', 'svbasicmanual.php');
$pdf->AddFont('Basicmanual', 'B', 'svbasicmanual-bold.php');
$pdf->SetFont('Basicmanual', '', 12);
$pdf->SetAutoPageBreak(false);
function convert_smart_quotes($string)
{
    $search = array(chr(0xe2) . chr(0x80) . chr(0x98), chr(0xe2) . chr(0x80) . chr(0x99), chr(0xe2) . chr(0x80) . chr(0x9c), chr(0xe2) . chr(0x80) . chr(0x9d), chr(0xe2) . chr(0x80) . chr(0x93), chr(0xe2) . chr(0x80) . chr(0x94));
    $replace = array("'", "'", '"', '"', "-", "-");
    return str_replace($search, $replace, $string);
}
$list = "";
$concat = "";
foreach ($albums as $album) {
    $list .= $concat . "album_code = '" . $album . "'";
    $concat = " or ";
}
Exemplo n.º 14
0
 public function action_template($id = null, $data, $name)
 {
     if ($id and $data and $name) {
         define('FPDF_FONTPATH', '../fuel/app/views/fonts');
         $pdf = new PDF('P', 'pt', array(595.28, 841.89));
         $pdf->AddFont('Verdana');
         $pdf->SetLineWidth(0.1);
         $pdf->SetAutoPageBreak(true, 80);
         $pdf->action = explode(',', $data);
         $pdf->init($id);
         $pdf->Output('Graph:' . $pdf->device->hostname . '.pdf', 'I');
     }
 }
Exemplo n.º 15
0
// require tFPDF
require_once 'fpdf/fpdf.php';
class PDF extends FPDF
{
    // Page header
    function Header()
    {
        // Logo
        $this->Image('http://makerfaire.com/wp-content/themes/makerfaire/images/maker_sign.png', 0, 0, $this->w, $this->h);
        // Arial bold 15
        $this->SetFont('Benton Sans', 'B', 15);
    }
}
// Instanciation of inherited class
$pdf = new PDF();
$pdf->AddFont('Benton Sans', 'B', 'bentonsans-bold-webfont.php');
$pdf->AddFont('Benton Sans', '', 'bentonsans-regular-webfont.php');
$pdf->AddPage('P', array(279.4, 431.8));
$pdf->SetFont('Benton Sans', '', 12);
$pdf->SetFillColor(255, 255, 255);
//get the entry-id, if one isn't set return an error
if (isset($_GET['eid']) && $_GET['eid'] != '') {
    $entryid = $_GET['eid'];
    createOutput($entryid, $pdf);
    if (isset($_GET['type']) && $_GET['type'] == 'download') {
        ob_clean();
        $pdf->Output($entryid . '.pdf', 'D');
    } elseif (isset($_GET['type']) && $_GET['type'] == 'save') {
        $filename = TEMPLATEPATH . '/signs/NY15/' . $entryid . '.pdf';
        $dirname = dirname($filename);
        if (!is_dir($dirname)) {
Exemplo n.º 16
0
Arquivo: ex.php Projeto: robocon/shs
	$fill=0;
	foreach($data as $row)
	{
		$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
		$this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
		$this->Cell($w[2],6,$row[2],'LR',0,'C',$fill);
		$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
		$this->Ln();
		$fill=!$fill;
	}
	$this->Cell(array_sum($w),0,'','T');
}
}

$pdf=new PDF();
$pdf->AddFont('AngsanaNew','','angsa.php');
$pdf->AddFont('AngsanaNew','B','angsab.php');
$pdf->AddPage();
$pdf->SetFont('AngsanaNew','',12);
//Column titles
$header=array('╙вХм','╧рай║ье','цкяй╧тйт╣','╓ХрЦ╙И╗Хрб/Ю╢вм╧');
//Read file lines
$lines=file('student.txt');
$data=array();
foreach($lines as $line)
	$data[]=explode(';',chop($line));
//Output table
$pdf->ColorTable($header,$data);

$pdf->Output();
?>
Exemplo n.º 17
0
$text = explode("/", $texte);
$tex = explode(".", $text[4]);
$sql = "delete from admin_svg.temp_cotation where session_temp='" . session_id() . "'";
$DB->exec($sql);
//variable
//creation du fichier pdf
$pdf = new PDF();
$pdf->Open();
//$pdf->FPDF($orientation,$unit,$_GET['format']);
//$format="A4";
//phpinfo();
//echo $_GET["format"];
$pdf->FPDF($orientation, $unit, $_GET['format']);
//$pdf->FPDF('P','mm','A4');
//création page
$pdf->AddFont('font1', '', 'font1.php');
$pdf->AddPage();
$pdf->RotatedImage('../tmp/' . $tex[0] . '.jpg', $posiximage, $posiyimage, $larimage, $hauimage, $angle);
$pdf->SetFont('font1', '', $sizerosa);
//echo $logo.",".$posixlogo.",".$posiylogo.",".$larlogo.",".$haulogo.",".$angle;
$pdf->RotatedText($posixrosa, $posiyrosa, 'a', $angle);
if ($logo != "") {
    if ($logo[0] != '/') {
        // Si le chemin du logo est relatif, le faire decouler de fs_root
        $pdf->RotatedImage($logo, $posixlogo, $posiylogo, $larlogo, $haulogo, $angle);
    } else {
        $pdf->RotatedImage($fs_root . "/" . $logo, $posixlogo, $posiylogo, $larlogo, $haulogo, $angle);
    }
}
$pdf->SetFont('arial', '', $sizetitre);
$pdf->RotatedCell($angle, $xtitre, $ytitre, $wtitre, $htitre, $_GET['titre'], 0, 0, 'C');
Exemplo n.º 18
0
    {
        // Data
        $j = 1;
        foreach ($data as $row) {
            $this->Cell(10, 5, $j, 1, 0, 'C');
            $this->Cell(80, 5, $row[0], 1, 0, 'L');
            $this->Cell(40, 5, $row[1], 1, 0, 'C');
            $this->Cell(60, 5, $row[2], 1, 0, 'C');
            $j++;
            $this->Ln();
        }
    }
}
$pdf = new PDF();
$pdf->AddPage();
$pdf->AddFont('arial_ce', '', 'arial_ce.php');
$pdf->AddFont('arial_ce', 'I', 'arial_ce_i.php');
$pdf->AddFont('arial_ce', 'B', 'arial_ce_b.php');
$pdf->AddFont('arial_ce', 'BI', 'arial_ce_bi.php');
//NAG??WEK
$pdf->SetFont('arial_ce', 'B', 12);
if ($_POST['submit'] == 'robocza') {
    $pdf->Cell(190, 5, 'SPECYFIKACJA - WERSJA ROBOCZA', 1, 0, 'C');
} else {
    $pdf->Cell(190, 5, 'SPECYFIKACJA', 1, 0, 'C');
}
$pdf->Ln();
$pdf->SetFont('arial_ce', '', 10);
$pdf->SetFont('arial_ce', '', 11);
$pdf->Cell(95, 5, 'Miejscowosc: ' . $_SESSION['salon'], 1, 0, 'L');
$pdf->Cell(95, 5, 'Data wyslania: ' . $_POST['wydruk'], 1, 0, 'L');
<?php

##---- PDF ---
$pdf = new PDF('P', 'mm', 'A4');
//ของเดิม
$pdf->SetMargins(25, 25, 5);
$pdf->AddPage();
// เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวธรรมดา กำหนด ชื่อ เป็น angsana
$pdf->AddFont('angsana', '', 'angsa.php');
// เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา  กำหนด ชื่อ เป็น angsana
$pdf->AddFont('angsana', 'B', 'angsab.php');
// เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา  กำหนด ชื่อ เป็น angsana
$pdf->AddFont('angsana', 'I', 'angsai.php');
// เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา  กำหนด ชื่อ เป็น angsana
$pdf->AddFont('angsana', 'BI', 'angsaz.php');
$x_absolute = 25;
//พิกัด X
$y_absolute = 20;
//พิกัด Y
$r = 7;
//ระยะห่าง
##-- PAGE 1
##---- เลขหน้า ----------
$pdf->SetFont('angsana', '', 12);
$pdf->setXY($x_absolute + 160, $y_absolute - 10);
$pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'หน้า  1'));
##---- เลขหน้า ----------
##-- head table -----
$pdf->head_table(70, 20, 25, 'b');
//($x_absolute,$y_absolute,$fontSize,$b)   //หัวโปรแกรม
$pdf->SetFont('angsana', 'BU', 20);
Exemplo n.º 20
0
        $stringLength = strlen($string) > $widthCell ? substr($string, 0, $widthCell * 1 - 4) . " ..." : $string;
        return $stringLength;
    }
    function stringLength($widthCell, $string)
    {
        $stringLength = strlen($string) > $widthCell ? substr($string, 0, $widthCell * 2 - 4) . " ..." : $string;
        return $stringLength;
    }
    function factorLength($widthCell, $string, $heightCell)
    {
        $factor = strlen($string) > $widthCell ? 2 : 1;
        return $factor;
    }
}
$pdf = new PDF('L', 'mm', 'Letter');
$pdf->AddFont('consola', '', 'consola.php');
$pdf->AddFont('consola', 'B', 'consolab.php');
$pdf->AddFont('consola', 'Z', 'consolaz.php');
$pdf->AddFont('consola', 'I', 'consolai.php');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetTextColor(0, 0, 0);
$idTramite = $_GET['id'];
if ($cnn = mysql_connect($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD)) {
    mysql_select_db($MYSQL_DATABASE);
} else {
    die("Error de conexión.");
}
//Cabecera del reporte de solicitude de viaje
$sql = "SELECT DATE_FORMAT(t_fecha_registro,'%d/%m/%Y') as fecha_registro, nombre, CONCAT(cc_centrocostos,' - ',cc_nombre) as ceco, t_etiqueta, et_etapa_nombre,\r\n\t\t\t(SELECT nombre FROM empleado WHERE idfwk_usuario = t_delegado) as t_delegado,\r\n\t\t\t(SELECT MIN(svi_fecha_salida) FROM sv_itinerario WHERE svi_solicitud = sv_id) AS svi_fecha_salida,\r\n\t\t\t(SELECT MAX(svi_fecha_llegada) FROM sv_itinerario WHERE svi_solicitud = sv_id) AS svi_fecha_llegada,\r\n\t\t\tIF(sv_viaje = 'Multidestinos','Multidestinos',\r\n\t\t\t\tIF(sv_viaje = 'Redondo',CONCAT((SELECT svi_origen FROM sv_itinerario WHERE svi_solicitud = sv_id ORDER BY svi_fecha_salida LIMIT 1),'|',(SELECT svi_destino FROM sv_itinerario WHERE svi_solicitud = sv_id ORDER BY svi_fecha_llegada DESC LIMIT 1)),(SELECT svi_destino FROM sv_itinerario WHERE svi_solicitud = sv_id ORDER BY svi_fecha_llegada DESC LIMIT 1))) AS destino,\r\n\t\t\t(SELECT SUM(svi_dias_viaje) FROM sv_itinerario WHERE svi_solicitud = sv_id) AS dias_viaje, t_iniciador\r\n\t\t\tFROM tramites\r\n\t\t\tJOIN usuario ON u_id = t_iniciador\r\n\t\t\tJOIN empleado ON idfwk_usuario = u_id\r\n\t\t\tJOIN solicitud_viaje ON sv_tramite = t_id\r\n\t\t\tJOIN cat_cecos ON cc_id = sv_ceco_paga\r\n\t\t\tJOIN etapas ON et_flujo_id = t_flujo AND et_etapa_id = t_etapa_actual\r\n\t\t\tWHERE t_id = " . $idTramite;
//error_log("Query".$sql);
        $this->Cell(90, 5, utf8_decode($fecha), 0, 0, 'R', 0);
        $this->Cell(40, 5, utf8_decode($_GET['fin']), 0, 1, 'C', 0);
        $this->Ln(5);
    }
    function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('Arial', 'I', 8);
        $this->Cell(0, 10, 'Pag. ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
$pdf = new PDF('P', 'mm', 'a4');
$pdf->AddPage();
$pdf->SetMargins(0, 0, 0, 0);
$pdf->AliasNbPages();
$pdf->AddFont('Amble-Regular', '', 'Amble-Regular.php');
$pdf->SetFont('Amble-Regular', '', 10);
$pdf->SetFont('Arial', 'B', 9);
$pdf->SetX(5);
$pdf->SetFont('Amble-Regular', '', 9);
$total = 0;
$sub = 0;
$repetido = 0;
$contador = 0;
$consulta = pg_query("select id_cliente,identificacion,nombres_cli,telefono,direccion_cli from clientes");
while ($row = pg_fetch_row($consulta)) {
    $repetido = 0;
    $total = 0;
    $sql1 = pg_query("select id_factura_venta,num_factura,num_autorizacion,fecha_autorizacion,fecha_caducidad FROM factura_venta where id_cliente='{$row['0']}' and estado='Activo' and fecha_caducidad between '{$fecha}' and '{$_GET['fin']}'");
    if (pg_num_rows($sql1)) {
        if ($repetido == 0) {
Exemplo n.º 22
0
            $y += ($maxh - $h) / 2;
        } else {
            //IMAGE PORTRAIT
            $k = $maxh / $imgh;
            $h = $maxh;
            $w = $imgw * $k;
            $x += ($maxw - $w) / 2;
        }
        $this->Image($file, $x, $y, $w, $h);
    }
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->AliasNbPages();
$pdf->SetMargins(15.202, 6.088, 15.202);
$pdf->SetAutoPageBreak(true, 6.088);
$pdf->AddFont('Bodoni MT', 'B', 'bod_b.php');
$pdf->AddFont('Arial', '', 'arial.php');
$pdf->AddFont('Arial', 'B', 'arialbd.php');
$hoy = date_create();
$pdf->AddPage();
//TALMET
$x = 15.175;
$y = 297 - 283.295;
$border = $x - 14.32;
$height = 58.779;
$width = 180.656;
$pdf->SetFillColor(0, 0, 128);
$pdf->Rect($x - $border, $y - $border, $width + 2 * $border, $height + 2 * $border, 'F');
$pdf->Image('../images/pdf/talmet.jpg', $x, $y, $width, $height);
//FONTANERO
$pdf->Image('../images/pdf/fontanero.jpg', 53.734, 297 - 201.132, 97.852);