Ejemplo n.º 1
0
 $stmt = $dbh->prepare($sqlexp);
 $stmt->execute();
 $data5 = array();
 while ($regexp = $stmt->fetch(PDO::FETCH_ASSOC)) {
     $data5[] = array('Nombre Contratante' => $regexp['nombre_contratante'], 'Objeto del Contrato' => $regexp['objeto_contrato'], 'Departamento' => $regexp['departamento'], 'Lugar del contrato' => $regexp['lugar_contrato'], 'Monto del Contrato' => $regexp['monto_contrato'], 'Descripcion del Contrato' => $regexp['descripcion_contrato'], 'Tipo Experiencia' => $regexp['tipo'], 'Fecha Inicio' => $regexp['inicio_contrato'], 'Fecha Fin' => $regexp['fin_contrato'], 'Meses' => $regexp['meses'], 'Verifique' => '[  ]');
 }
 // FIN experiencia
 //print_r($data1);
 //print_r($data12);
 //print_r($data13);
 //print_r($data2);break;
 //$fecha = date("F j, Y");
 //$fecha = date();
 setlocale(LC_TIME, "es_ES");
 $fecha = strftime("%d de %B del %Y");
 $pdf = new Creport('a4', 'landscape');
 $pdf->ezSetMargins(20, 70, 20, 20);
 $pdf->selectFont('./fonts/Helvetica');
 $pdf->ezText('CONSULTOR', 20, array('justification' => 'center'));
 $pdf->ezText('AEVIVIENDA                                                                                      <c:uline>Registro #</c:uline>  ' . $idregistro_entidad, 11, array('justification' => 'center'));
 $pdf->ezText('www.aevivienda.gob.bo                                                                      <c:uline>Fecha Actual:</c:uline>  ' . $fecha, 11, array('justification' => 'center'));
 $pdf->ezText('');
 $pdf->ezText('DATOS GENERALES', 15, array('justification' => 'left'));
 $pdf->ezTable($data1, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $pdf->ezText('');
 $pdf->ezText('DATOS ESPECIFICOS', 15, array('justification' => 'left'));
 $pdf->ezTable($data12, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $pdf->ezText('');
 $pdf->ezText('DATOS COMPLEMENTARIOS', 15, array('justification' => 'left'));
 $pdf->ezTable($data13, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $footer = $pdf->openObject();
Ejemplo n.º 2
0
<?php

set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
date_default_timezone_set('UTC');
require 'Cezpdf.php';
class Creport extends Cezpdf
{
    public function __construct($p, $o)
    {
        parent::__construct($p, $o, 'none', array());
    }
}
$pdf = new Creport('A4', 'LANDSCAPE');
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
$aHeader = array();
$dept_name = array();
$aRecord01 = array();
$aRecord0204 = array();
$aDept_total_amt = array();
$aDept_percentage = array();
$aDept_total = array();
$i = 0;
$ypos = 540;
// vertical starting position
$font_size_8 = 8;
$font_size_10 = 10;
$font_size_12 = 12;
$font_size_14 = 14;
$row_spacing = 15;
Ejemplo n.º 3
0
error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    function Creport($p, $o)
    {
        $this->__construct($p, $o, 'none', array());
        $this->isUnicode = true;
        $this->allowedTags .= '|uline';
        // always embed the font for the time being
        //$this->embedFont = false;
    }
}
$pdf = new Creport('a4', 'portrait');
$pdf->ezSetMargins(20, 20, 20, 20);
//$pdf->rtl = true; // all text output to "right to left"
//$pdf->setPreferences('Direction','R2L'); // optional: set the preferences to "Right To Left"
$f = isset($_GET['font']) ? $_GET['font'] : 'FreeSerif';
$mainFont = $f;
// select a font and use font subsetting
$pdf->selectFont($mainFont, '', 1, true);
$pdf->ezText("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidfgfdgdfgdfgdfg ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur. et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur", 10, array('justification' => 'full'));
$pdf->ezText("\nGreek: (full justified)");
$pdf->ezText("Νες εα ελεστραμ σορρυμπιθ ινστρυσθιορ, υσυ διαμ ωπωρθεαθ τεμποριβυς ετ. Προμπτα βλανδιτ μωδερατιυς ευμ ευ, σεθερο ρεπυδιαρε αν φελ, φιξ πυρθο ρεγιονε φολυπθυα ατ. Σιθ δυις σωνσυλ ιρασυνδια ατ, νε νιηιλ φενιαμ φεριθυς ιυς, συ μελιορε ερροριβυς δισπυθανδο εσθ. Ηις εσεντ σοπιωσαε ιδ. Εξ εως μεις αυγυε ρεσυσαβο, φιξ φοσεντ μαλορυμ ινσιδεριντ ιν. Δισο ναθυμ σοντεντιωνες ευ μει.", 10, array('justification' => 'full'));
$pdf->ezText("\nCyrillic:");
$pdf->ezText("ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор ыёюз лобортис ажжынтиор <u>КкЛлМмНнО</u> <u>оПпРр</u> <u>СсТтУу</u>");
$pdf->ezText("\nArabic:");
$pdf->ezText("لبسبيلتتاف لالبالفقث بببب");
$pdf->ezText("\nHebrew:");
Ejemplo n.º 4
0
<?php

error_reporting(E_ALL);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
date_default_timezone_set('UTC');
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    public function __construct($p, $o)
    {
        parent::__construct($p, $o, 'color', array(0.8, 0.8, 0.8));
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
$pdf->ezSetMargins(20, 20, 20, 20);
$mainFont = 'Times-Roman';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
$pdf->ezText("ROS PDF Image Example\n", 18);
$pdf->ezText("PNG grayscaled", 10);
$pdf->ezImage('images/test_grayscaled.png', 0, 0, 'none', 'right');
$pdf->ezText("PNG grayscaled with alpha channel");
$pdf->ezImage('images/test_grayscaled_alpha.png', 0, 0, 'none', 'right');
Ejemplo n.º 5
0
<?php

error_reporting(E_ALL);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
date_default_timezone_set('UTC');
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    public function __construct($p, $o, $t, $op)
    {
        parent::__construct($p, $o, $t, $op);
    }
}
$pdf = new Creport('a4', 'portrait', 'color', array(0.8, 0.8, 0.8));
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
$pdf->ezSetMargins(20, 20, 20, 20);
$mainFont = 'Courier';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
$result = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer";
$parts = preg_split('/\\s/', $result);
$result = '';
foreach ($parts as $v) {
    $r = rand(1, 10);
    if ($r == 1) {
Ejemplo n.º 6
0
                $thick = 0.5;
                break;
        }
        $this->saveState();
        $this->setLineStyle($thick, 'round', '', [0, 2]);
        $this->line($xpos, $info['y'], $info['x'] + 5, $info['y']);
        $this->restoreState();
        $this->addText($xpos + 5, $info['y'], $size, $lbl);
    }
}
// I am in NZ, so will design my page for A4 paper.. but don't get me started on that.
// (defaults to legal)
// this code has been modified to use ezpdf.
$project_url = "https://github.com/rospdf/";
$project_version = "0.12.28";
$pdf = new Creport('a4', 'portrait', 'none', null);
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
$start = microtime(true);
// IMPORTANT: To allow custom callbacks being executed
$pdf->allowedTags .= '|uline|rf:?.*?|dots:[0-9]+';
$pdf->ezSetMargins(50, 70, 50, 50);
// put a line top and bottom on all the pages
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->line(20, 40, 578, 40);
$pdf->line(20, 822, 578, 822);
$pdf->addText(20, 30, 8, $project_url);
Ejemplo n.º 7
0
 $stmt->execute();
 $reg = $stmt->fetch(PDO::FETCH_ASSOC);
 $data1 = array();
 foreach ($reg as $key => $datos) {
     $data1[] = array("    " => $key, "DATOS" => $datos);
 }
 ///FIN DATOS GENERALES
 //print_r($data1);
 //print_r($data12);
 //print_r($data13);
 //print_r($data2);break;
 //$fecha = date("F j, Y");
 //$fecha = date();
 setlocale(LC_TIME, "es_ES");
 $fecha = strftime("%d de %B del %Y");
 $pdf = new Creport('a4', 'portrate');
 $pdf->ezSetMargins(20, 70, 20, 20);
 $pdf->selectFont('./fonts/Helvetica');
 $pdf->ezText('Registro de Datos', 20, array('justification' => 'center'));
 $pdf->ezText('AEVIVIENDA                                                                                      <c:uline>Nro</c:uline>  ' . $pinempresa, 11, array('justification' => 'center'));
 $pdf->ezText('www.aevivienda.gob.bo                                                                      <c:uline>Fecha Actual:</c:uline>  ' . $fecha, 11, array('justification' => 'center'));
 $pdf->ezText('');
 $pdf->ezText('');
 $pdf->ezText('');
 $pdf->ezText('');
 $pdf->ezTable($data1, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $pdf->ezText('');
 $pdf->ezText('');
 $pdf->ezText('');
 $pdf->ezText('1.- Imprima dos copias de este registro.', 9, array('justification' => 'left'));
 $pdf->ezText('2.- Adjunte documentacion original y fotocopias simples de toda la informacion registrada en el sistema para su verificacion.', 9, array('justification' => 'left'));
Ejemplo n.º 8
0
                $size = 12;
                $thick = 0.5;
                break;
        }
        $this->saveState();
        $this->setLineStyle($thick, 'round', '', array(0, 10));
        $this->line($xpos, $info['y'], $info['x'] + 5, $info['y']);
        $this->restoreState();
        $this->addText($xpos + 5, $info['y'], $size, $lbl);
    }
}
// I am in NZ, so will design my page for A4 paper.. but don't get me started on that.
// (defaults to legal)
// this code has been modified to use ezpdf.
//$pdf = new Cezpdf('a4','portrait');
$pdf = new Creport('a4', 'portrait');
$pdf->ezSetMargins(50, 70, 50, 50);
// put a line top and bottom on all the pages
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->line(20, 40, 578, 40);
$pdf->line(20, 822, 578, 822);
$pdf->addText(50, 34, 6, 'http://ros.co.nz/pdf - http://www.sourceforge.net/projects/pdf-php');
$pdf->restoreState();
$pdf->closeObject();
// note that object can be told to appear on just odd or even pages by changing 'all' to 'odd'
// or 'even'.
$pdf->addObject($all, 'all');
$pdf->ezSetDy(-100);
//$mainFont = './fonts/Helvetica.afm';
Ejemplo n.º 9
0
<?php

error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    function Creport($p, $o, $t, $op)
    {
        $this->__construct($p, $o, $t, $op);
    }
}
$pdf = new Creport('a4', 'portrait', 'color', array(0.8, 0.8, 0.8));
$pdf->ezSetMargins(20, 20, 20, 20);
$mainFont = 'Times-Roman';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
$pdf->ezText("PDF with some <c:color:1,0,0>blue</c:color> <c:color:0,1,0>red</c:color> and <c:color:0,0,1>green</c:color> colours", 12, array('justification' => 'right'));
//$pdf->ezImage('images/test_grayscaled.png',0,0,'none','center');
//$pdf->ezText("PNG grayscaled with alpha channel - currently not working");
//$pdf->ezImage('images/test_grayscaled_alpha.png',0,0,'none','center');
//$pdf->ezText("PNG true color plus alpha channel #1");
//$pdf->ezImage('images/test_alpha.png',0,0,'none','left');
//$pdf->ezText("PNG true color plus alpha channel #2");
//$pdf->ezImage('images/test_alpha2.png',0,0,'none','right');
if (isset($_GET['d']) && $_GET['d']) {
Ejemplo n.º 10
0
  $this->restoreState();
  $this->addText($xpos+5,$info['y'],$size,$lbl);


}


}
// I am in NZ, so will design my page for A4 paper.. but don't get me started on that.
// (defaults to legal)
// this code has been modified to use ezpdf.

$project_url = "http://pdf-php.sf.net";
$project_version = "0.12-rc17";

$pdf = new Creport('a4','portrait', 'none', null);
// to test on windows xampp
  if(strpos(PHP_OS, 'WIN') !== false){
    $pdf->tempPath = 'E:/xampp/xampp/tmp';
  }
$start = microtime(true);

// IMPORTANT: To allow custom callbacks being executed
$pdf->allowedTags .= '|uline|rf:?.*?|dots:[0-9]+';

$pdf -> ezSetMargins(50,70,50,50);

// put a line top and bottom on all the pages
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0,0,0,1);
Ejemplo n.º 11
0
<?php

error_reporting(E_ALL);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
date_default_timezone_set('UTC');
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    public function __construct($p, $o)
    {
        parent::__construct($p, $o);
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
if (isset($_GET['nohash'])) {
    $pdf->hashed = false;
}
$pdf->ezSetMargins(20, 20, 20, 20);
$mainFont = 'Times-Roman';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
$pdf->ezText("Since version 011 object hash is enabled to reduce the pdf size when redundant images are used");
$pdf->ezText("This image below has a size of <b>" . filesize('../ros.jpg') . ' bytes</b>');
Ejemplo n.º 12
0
     $sqlmn = "SELECT GROUP_CONCAT(municipios.municipio) as 'municipio' from municipios where id in ({$idmun})";
     $stmtmn = $dbh->prepare($sqlmn);
     $stmtmn->execute();
     $regmn = $stmtmn->fetch(PDO::FETCH_ASSOC);
     $data2[] = array('Material' => $regf['descripcion'], 'Unidad' => $regf['unidad'], 'Departamentos' => $regdp['departamento'], 'Municipios' => $regmn['municipio'], 'Verifique' => '[  ]');
 }
 // FIN materiales
 //print_r($data1);
 //print_r($data12);
 //print_r($data13);
 //print_r($data2);break;
 //$fecha = date("F j, Y");
 //$fecha = date();
 setlocale(LC_TIME, "es_ES");
 $fecha = strftime("%d de %B del %Y");
 $pdf = new Creport('a4', 'landscape');
 $pdf->ezSetMargins(20, 70, 20, 20);
 $pdf->selectFont('./fonts/Helvetica');
 $pdf->ezText('PROVEEDORES', 20, array('justification' => 'center'));
 $pdf->ezText('AEVIVIENDA                                                                                      <c:uline>Registro #</c:uline>  ' . $idregistro_entidad, 11, array('justification' => 'center'));
 $pdf->ezText('www.aevivienda.gob.bo                                                                      <c:uline>Fecha Actual:</c:uline>  ' . $fecha, 11, array('justification' => 'center'));
 $pdf->ezText('');
 $pdf->ezText('DATOS GENERALES', 15, array('justification' => 'left'));
 $pdf->ezTable($data1, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $pdf->ezText('');
 $pdf->ezText('DATOS ESPECIFICOS', 15, array('justification' => 'left'));
 $pdf->ezTable($data12, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $pdf->ezText('');
 $pdf->ezText('DATOS COMPLEMENTARIOS', 15, array('justification' => 'left'));
 $pdf->ezTable($data13, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $footer = $pdf->openObject();
Ejemplo n.º 13
0
<?php

error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('../assets/pdf-php/' . PATH_SEPARATOR . get_include_path());
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    function Creport($p, $o)
    {
        $this->__construct($p, $o, '', array(0.2, 0.8, 0.8));
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = '../';
}
$pdf->ezSetMargins(5, 5, 5, 5);
$mainFont = 'Times-Roman';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
//$border['width'] = 1;
$pdf->ezImage('img/logo2.png', '25', '125', '', 'left', '');
$pdf->ezText('');
$pdf->ezText('');
$meio = array();
Ejemplo n.º 14
0
<?php

error_reporting(E_ALL);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
date_default_timezone_set('UTC');
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    public function __construct($p, $o)
    {
        parent::__construct($p, $o, 'none', array());
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
$pdf->ezSetMargins(20, 20, 20, 20);
$pdf->openHere('Fit');
$pdf->selectFont('Helvetica');
$pdf->ezText("Text in Helvetica");
$pdf->selectFont('Courier');
$pdf->ezText("Text in Courier");
$pdf->selectFont('Times-Roman');
$pdf->ezText("Text in Times New Roman");
$pdf->selectFont('ZapfDingbats');
$pdf->ezText("Text in zapfdingbats");
if (isset($_GET['d']) && $_GET['d']) {
    echo $pdf->ezOutput(TRUE);
} else {
Ejemplo n.º 15
0
                $size = 12;
                $thick = 0.5;
                break;
        }
        $this->saveState();
        $this->setLineStyle($thick, 'round', '', array(0, 10));
        $this->line($xpos, $info['y'], $info['x'] + 5, $info['y']);
        $this->restoreState();
        $this->addText($xpos + 5, $info['y'], $size, $lbl);
    }
}
// I am in NZ, so will design my page for A4 paper.. but don't get me started on that.
// (defaults to legal)
// this code has been modified to use ezpdf.
//$pdf = new Cezpdf('a4','portrait');
$pdf = new Creport('a4', 'portrait');
$pdf->ezSetMargins(50, 70, 50, 50);
// put a line top and bottom on all the pages
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->line(20, 40, 578, 40);
$pdf->line(20, 822, 578, 822);
$pdf->addText(50, 34, 6, 'http://ros.co.nz/pdf - http://www.sourceforge.net/projects/pdf-php');
$pdf->restoreState();
$pdf->closeObject();
// note that object can be told to appear on just odd or even pages by changing 'all' to 'odd'
// or 'even'.
$pdf->addObject($all, 'all');
$pdf->ezSetDy(-100);
//$mainFont = './fonts/Helvetica.afm';
Ejemplo n.º 16
0
<?php

error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    function Creport($p, $o)
    {
        $this->__construct($p, $o, 'none', array());
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
// IMPORTANT: In version >= 0.12.0 it is required to allow custom tags (by using $pdf->allowedTags) before using it
$pdf->allowedTags .= "|comment:.*?";
$pdf->ezSetMargins(20, 20, 20, 20);
$pdf->selectFont('Helvetica');
$pdf->ezText("Some annotations are only shown in Adobe Reader. Chrome Viewer for instance does not show the icons\n");
// text annotation (also know as comments)
$pdf->ezText("<b>The 'Text' annotation:</b>");
$pdf->ezText("This Example shows how easy it is to put comments like this (<C:comment:Hello World comment text>) in between of some text lines.\nHere is another one <C:comment:Isn't it cool?> in between\n");
$pdf->addComment("Fixed position", "This comment is set to a fixed position by\nusing the addComment method explicitly", 500, $pdf->y + 20);
// external links
$pdf->ezText("<strong>The 'External Link' annotation:</strong>");
$pdf->ezText("This is an <c:alink:http://pdf-php.sf.net>external</c:alink> link.\n");
// internal links
Ejemplo n.º 17
0
     $data2[] = array('Contratante' => '', 'Objeto del Contrato' => '', 'Ubicacion' => '***Experiencia en monto (Bs)', 'Monto' => $sumamonto, 'Fecha Inicio' => '', 'Fecha Fin' => '***Experiencia en meses', 'Meses' => $sumameses, 'Verifique' => '', 'EE' => '');
     $data2[] = array('Contratante' => '', 'Objeto del Contrato' => '', 'Ubicacion' => '', 'Monto' => '', 'Fecha Inicio' => '', 'Fecha Fin' => '', 'Meses' => '', 'Verifique' => 'Monto Especifico:', 'EE' => '');
     $data2[] = array('Contratante' => '', 'Objeto del Contrato' => '', 'Ubicacion' => '', 'Monto' => '', 'Fecha Inicio' => '', 'Fecha Fin' => '', 'Meses' => '', 'Verifique' => 'Meses Especifico:', 'EE' => '');
     $data3 = array();
     $data3[] = array("TOTAL EXPERIENCIA ESPECIFICA LITERAL:" => "TOTAL EXPERIENCIA GENERAL LITERAL:", " " => " ");
     $data4[] = array("TOTAL MONTO GENERAL EN Bs LITERAL:" => "TOTAL MONTO ESPECIFICO EN Bs LITERAL:", " " => " ");
 }
 //print_r($data1);
 //print_r($data12);
 //print_r($data13);
 //print_r($data2);break;
 //$fecha = date("F j, Y");
 //$fecha = date();
 setlocale(LC_TIME, "es_ES");
 $fecha = strftime("%d de %B del %Y");
 $pdf = new Creport('a4', 'landscape');
 $pdf->ezSetMargins(20, 70, 20, 20);
 $pdf->selectFont('./fonts/Helvetica');
 $pdf->ezText('Entidades Ejecutoras', 20, array('justification' => 'center'));
 $pdf->ezText('AEVIVIENDA                                                                                      <c:uline>Registro #</c:uline>  ' . $idregistro_entidad, 11, array('justification' => 'center'));
 $pdf->ezText('www.aevivienda.gob.bo                                                                      <c:uline>Fecha Actual:</c:uline>  ' . $fecha, 11, array('justification' => 'center'));
 $pdf->ezText('');
 $pdf->ezText('DATOS GENERALES', 15, array('justification' => 'left'));
 $pdf->ezTable($data1, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $pdf->ezText('');
 $pdf->ezText('DATOS ESPECIFICOS', 15, array('justification' => 'left'));
 $pdf->ezTable($data12, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $pdf->ezText('');
 $pdf->ezText('DATOS COMPLEMENTARIOS', 15, array('justification' => 'left'));
 $pdf->ezTable($data13, '', 'Datos Provenientes Durante el Registro', array('width' => 560, 'maxWidth' => 600, 'fontSize' => 7));
 $footer = $pdf->openObject();
Ejemplo n.º 18
0
set_time_limit(1800);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    public function __construct($p, $o)
    {
        parent::__construct($p, $o, 'none', array());
        $this->isUnicode = true;
        // always embed the font for the time being
        //$this->embedFont = false;
        // since version 0.11.8 it is required to allow custom callbacks
        $this->allowedTags .= "|uline";
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
$start = microtime(true);
$pdf->ezSetMargins(20, 20, 20, 20);
//$pdf->rtl = true; // all text output to "right to left"
//$pdf->setPreferences('Direction','R2L'); // optional: set the preferences to "Right To Left"
$f = isset($_GET['font']) ? $_GET['font'] : 'FreeSerif';
$tmp = array('b' => 'FreeSerifBold');
$pdf->setFontFamily('FreeSerif', $tmp);
$mainFont = $f;
// select a font
$pdf->selectFont($mainFont);
$pdf->openHere('Fit');
Ejemplo n.º 19
0
<?php

error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    function Creport($p, $o)
    {
        $this->__construct($p, $o, 'color', array(0.2, 0.8, 0.8));
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
$pdf->ezSetMargins(20, 20, 20, 20);
$mainFont = 'Times-Roman';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
$pdf->ezText("PNG grayscaled");
$pdf->ezImage('images/test_grayscaled.png', 0, 0, 'none', 'right');
$pdf->ezText("PNG grayscaled with alpha channel");
$pdf->ezImage('images/test_grayscaled_alpha.png', 0, 0, 'none', 'right');
$pdf->ezText("PNG true color plus alpha channel #1");
Ejemplo n.º 20
0
    $reportname = str_replace(" ", "_", $name);
    CreatePDF($hosts);
} else {
    echo "Report type not selected!\n";
    exit;
}
//
// Create PDF
//
if (!file_exists($tmp_pdf_data)) {
    echo "Report {$tmp_pdf_data} not found! Cannot continue to create PDF.";
    exit;
}
$pdf_filename = "{$reportname}.pdf";
//$pdf = new Cezpdf('a4','portrait');
$pdf = new Creport("{$paper_format}", "{$paper_orientation}");
$pdf->ezSetMargins(20, 20, 50, 50);
// put a line top and bottom on all the pages
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->line(20, 40, 578, 40);
$pdf->line(20, 822, 578, 822);
$pdf->addText(50, 34, 6, 'Generated by Zabbix Monitoring Dynamic Report v0.4');
$pdf->restoreState();
$pdf->closeObject();
// note that object can be told to appear on just odd or even pages by changing 'all' to 'odd'
// or 'even'.
$pdf->addObject($all, 'all');
$pdf->ezSetDy(-100);
//$mainFont = './fonts/Helvetica.afm';
Ejemplo n.º 21
0
<?php

error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
$start = microtime(true);
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    function Creport($p, $o)
    {
        $this->__construct($p, $o, 'none', array());
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
// make sure cache is regenerated
$pdf->cacheTimeout = 0;
// used for Pound sign
$pdf->targetEncoding = 'ISO-8859-1';
// used for Euro and Pound sign
$pdf->targetEncoding = 'cp1252';
$pdf->ezSetMargins(20, 20, 20, 20);
$pdf->openHere('Fit');
$pdf->selectFont('Helvetica');
$result = '';
for ($i = 1; $i <= 50; $i++) {
    $result .= 'Lorem ipsum dol sit ';
Ejemplo n.º 22
0
<?php

error_reporting(E_ALL);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
date_default_timezone_set('UTC');
$start = microtime(true);
include 'Cezpdf.php';
class Creport extends Cezpdf
{
    public function __construct($p, $o)
    {
        parent::__construct($p, $o, 'none', array());
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
// make sure cache is regenerated
$pdf->ezSetCmMargins(1, 3, 2.5, 2.5);
$pdf->selectFont('Times-Roman');
$pdf->ezText("\n\n\n\n\n\n\n\n");
$pdf->ezText("\n\n\n", 12);
$_POST['emisor'] = "Test";
$_POST['cargo_emisor'] = "Test 123";
$_POST['vicerrectorado'] = "Test 456";
$_POST['profesor'] = "Test 456";
$_POST['créditos'] = "Test 456";
$_POST['curso'] = "Test 456";
$_POST['master'] = "Test 456";
Ejemplo n.º 23
0
$teamcsv = preg_replace("/[^a-zA-Z0-9]/", "", $team);
$localTime = time();
$localTime = $localTime - 60 * 60 * 1;
$mydate = date("G:i jS M Y", $localTime);
error_reporting(E_ALL);
set_time_limit(1800);
include 'pdf/class.ezpdf.php';
class Creport extends Cezpdf
{
    var $reportContents = array();
    function Creport($p, $o)
    {
        $this->Cezpdf($p, $o);
    }
}
$pdf = new Creport('a4', 'portrait');
$pdf->ezSetMargins(30, 30, 30, 30);
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->line(30, 60, 565, 60);
$pdf->line(30, 780, 565, 780);
$pdf->addText(230, 810, 8, 'Berkeley and District Skittles League');
$fixtureString = "Fixtures {$bdslSeason}";
$pdf->addText(255, 800, 8, $fixtureString);
$pdf->addJpegFromFile('resource/logo.jpg', 525, 786, 40);
$pdf->addText(30, 788, 12, $team);
$pdf->addText(30, 50, 8, 'www.berkeleydsl.org.uk');
$pdf->addText(490, 50, 8, $mydate);
$pdf->restoreState();
$pdf->closeObject();
Ejemplo n.º 24
0
<?php

error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('../src/' . PATH_SEPARATOR . get_include_path());
include 'Cezpdf.php';
require_once "Mail.php";
class Creport extends Cezpdf
{
    function Creport($p, $o)
    {
        $this->__construct($p, $o, 'none');
    }
}
$pdf = new Creport('a4', 'portrait');
$pdf->ezSetMargins(20, 20, 20, 20);
$mainFont = 'Times-Roman';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
$pdf->ezText("PNG grayscaled with alpha channel");
$pdf->ezImage('images/test_grayscaled_alpha.png', 0, 0, 'none', 'right');
if (isset($_GET['d']) && $_GET['d']) {
    $pdfcode = $pdf->ezOutput(1);
    $pdfcode = str_replace("\n", "\n<br>", htmlspecialchars($pdfcode));
    echo '<html><body>';
    echo trim($pdfcode);
    echo '</body></html>';
Ejemplo n.º 25
0
        parent::__construct($p, $o);
    }
    // Rectangle Callback function for Text output
    function rect($info)
    {
        // this callback records all of the table of contents entries, it also places a destination marker there
        // so that it can be linked too
        // parameters
        $tmp = $info['p'];
        $r = explode(",", $tmp);
        if (count($r) >= 4) {
            $this->filledRectangle($info['x'] + $r[0], $info['y'] + $r[1], $r[2], $r[3]);
        }
    }
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = 'C:/temp';
}
// IMPORTANT: In version >= 0.12.0 it is required to allow custom tags (by using $pdf->allowedTags) before using it
$pdf->allowedTags .= "|rect:.*?";
$pdf->ezSetMargins(50, 70, 50, 50);
$mainFont = 'Helvetica';
// select a font
$pdf->selectFont($mainFont);
$size = 12;
$height = $pdf->getFontHeight($size);
// modified to use the local file if it can
$pdf->openHere('Fit');
$mydata = array();