Пример #1
0
 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();
 $pdf->addText(500, 30, 8, "TECNICO");
 $pdf->line(490, 40, 600, 40);
 $pdf->addText(620, 30, 8, "LEGAL");
Пример #2
0
 $prog_title = $title_progid . ": ";
 if ($curr_progid != $prev_progid) {
     if ($new_page_flag == "yes") {
         $new_page_flag = "no";
         if ($curr_deptid != 'ZZZ') {
             $pdf->ezNewPage();
         }
     }
     $pdf->selectFont('Helvetica');
     if ($curr_deptid == 'ZZZ') {
     } else {
         $pdf->ezSetMargins(75, 40, 75, 75);
         $all2 = $pdf->openObject();
         $pdf->saveState();
         $pdf->selectFont('Helvetica-Bold');
         $ypos = $pdf->ezText("{$prog_title} {$title_hdr}", $font_size_10, $x1);
         $pdf->ezText("{$title_progstr}", $font_size_10, $x5);
         $pdf->selectFont('Helvetica');
         $pdf->restoreState();
         $pdf->closeObject();
     }
     // ----- writes the detail line  begin -----
     $pdf->ezSetMargins(90, 40, 75, 75);
     $pdf->ezColumnsStart(array('gap' => 30));
     $z = 0;
     if ($curr_deptid == 'ZZZ') {
         $loop_narr = 0;
     } else {
         $loop_narr = 10;
     }
     for ($z = 0; $z < $loop_narr; $z++) {
Пример #3
0
        $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:");
$pdf->ezText("אבגדהוזחטיכלמנסעפצקרשת");
$pdf->ezText("\nChinese:");
$pdf->ezText("汉语/漢語 <- Some fonts might not contain these glyphs. Tested with Arial Unicode");
//$pdf->isUnicode = false;
//$pdf->selectFont('../src/fonts/Courier');
//$pdf->ezText("\nThis text is using Courier in a non-unicode standard");
// reusing the mainFont does not require to enable unicode with $this->isUnicode
if (isset($_GET['d']) && $_GET['d']) {
Пример #4
0
// 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();
$MAXcodeWidth = 0;
for ($i = 0; $i < 7; $i++) {
    $const = '';
    $r = rand(1000, 9999);
    // return rectangle array from code39line.php
    $code39RECT = code39($r, 0.8, 17, 0, -5);
    foreach ($code39RECT as $v) {
        $const .= '<C:rect:' . implode(",", $v) . '>';
        // x position + width
        if ($v['x'] + $v['b'] > $MAXcodeWidth) {
            $MAXcodeWidth = $v['x'] + $v['b'];
        }
    }
    $mydata[$i]['value'] = $r;
    $mydata[$i]['barcode'] = $const;
}
$pdf->ezText("This example shows you how to implement code39 barcodes in ROS PDF class. It uses the Callback function 'rect' which is defined in the custom class Creport (inhierted from Cezpdf)\n");
$pdf->ezText("<b>IMPORTANT: In version >= 0.12.0 it is required to allow custom tags (by using \$pdf->allowedTags) before using it</b>");
$pdf->ezTable($mydata, array('value' => 'Value', 'barcode' => 'Barcode'), '', array('showLines' => 3, 'shaded' => 0, 'rowGap' => 6, 'showHeadings' => 1, 'cols' => array('barcode' => array('width' => $MAXcodeWidth + 10))));
if (isset($_GET['d']) && $_GET['d']) {
    echo $pdf->ezOutput(TRUE);
} else {
    $pdf->ezStream();
}
Пример #5
0
$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) {
        $result .= " <c:color:" . rand(0, 1) . "," . rand(0, 1) . "," . rand(0, 1) . ">" . $v . "</c:color> ";
    } else {
        $result .= $v . ' ';
    }
}
$result = rtrim($result);
/*$result = "eirmod tempor <c:color:1,0,1>invidunt</c:color> ut <c:color:1,0,0>labore</c:color> et dolore magna aliquyam erat, sed diam <b>eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.<b> At <c:color:1,0,0>vero</c:color> 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";*/
/*$result = "documents have <b>y-coordinates which are zero at the bottom of the page and increase as they go up</b> the page.";*/
$pdf->ezText($result, 12, array('justification' => 'full'));
if (isset($_GET['d']) && $_GET['d']) {
    echo "<pre>";
    echo $pdf->ezOutput(TRUE);
    echo "</pre>";
} else {
    $pdf->ezStream(array('compress' => 0));
}
//error_log($pdf->messages);
Пример #6
0
$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);
$pdf->addText(515, 30, 8, 'Version ' . $project_version);
$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(-150);
$mainFont = 'Helvetica';
$codeFont = './src/fonts/Courier.afm';
// select a font
$pdf->selectFont($mainFont);
$pdf->ezText("PHP Pdf Class\n", 30, array('justification' => 'centre'));
$pdf->ezText("Native PDF document creation with PHP 5.X\n", 20, array('justification' => 'centre'));
$pdf->ezText("hosted on github.com\n\n<c:alink:https://github.com/rospdf/pdf-php/graphs/contributors>Contributors</c:alink>\n", 14, array('justification' => 'centre'));
$pdf->ezText("Version {$project_version}", 12, array('justification' => 'centre'));
$pdf->ezSetDy(-150);
// modified to use the local file if it can
$pdf->ezText("FORK ON GITHUB.COM", 12, array('justification' => 'right'));
$pdf->openHere('Fit');
function ros_logo(&$pdf, $x, $y, $height, $wl = 0, $wr = 0)
{
    global $project_url;
    $pdf->saveState();
    $h = 100;
    $factor = $height / $h;
    $pdf->selectFont('Helvetica-Bold');
    $text = 'R&OS';
Пример #7
0
$pdf->addText(515,30,8,'Version ' . $project_version);
$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 = './src/fonts/Helvetica.afm';
$mainFont = './src/fonts/Times-Roman.afm';
$codeFont = './src/fonts/Courier.afm';
// select a font
$pdf->selectFont($mainFont);

$pdf->ezText("PHP Pdf Creation\n",30,array('justification'=>'centre'));
$pdf->ezText("Module-free creation of Pdf documents\nfrom within PHP\n",20,array('justification'=>'centre'));
$pdf->ezText("developed by R&OS Ltd",18,array('justification'=>'centre'));
$pdf->ezText("\n<c:alink:$project_url>$project_url</c:alink>\n\nVersion $project_version",18,array('justification'=>'centre'));

$pdf->ezSetDy(-100);
// modified to use the local file if it can

$pdf->openHere('Fit');

function ros_logo(&$pdf,$x,$y,$height,$wl=0,$wr=0){
  $pdf->saveState();
  $h=100;
  $factor = $height/$h;
  $pdf->selectFont('./src/fonts/Helvetica-Bold.afm');
  $text = 'R&OS';
Пример #8
0
$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';
$mainFont = './fonts/Times-Roman.afm';
$codeFont = './fonts/Courier.afm';
// select a font
$pdf->selectFont($mainFont);
$pdf->ezText("PHP Pdf Creation\n", 30, array('justification' => 'centre'));
$pdf->ezText("Module-free creation of Pdf documents\nfrom within PHP\n", 20, array('justification' => 'centre'));
$pdf->ezText("developed by R&OS Ltd\n<c:alink:http://www.ros.co.nz/pdf/>http://www.ros.co.nz/pdf</c:alink>", 18, array('justification' => 'centre'));
$pdf->ezText("\n<c:alink:http://sourceforge.net/projects/pdf-php>http://sourceforge.net/projects/pdf-php</c:alink>\n\nversion 0.09", 18, array('justification' => 'centre'));
$pdf->ezSetDy(-100);
// modified to use the local file if it can
$pdf->openHere('Fit');
function ros_logo(&$pdf, $x, $y, $height, $wl = 0, $wr = 0)
{
    $pdf->saveState();
    $h = 100;
    $factor = $height / $h;
    $pdf->selectFont('./fonts/Helvetica-Bold.afm');
    $text = 'R&OS';
    $ts = 100 * $factor;
    $th = $pdf->getFontHeight($ts);
Пример #9
0
}
$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>');
$pdf->ezText("So the object is being hashed and reused 3 times in this examples");
$pdf->ezText("The XObject always refers to the same object number.");
$pdf->ezText("Put <b>'?nohash'</b> to disable object hashing\n\n");
$pdf->ezImage('../ros.jpg', 0, 0, 'none', 'left');
$pdf->ezImage('../ros.jpg', 0, 0, 'none', 'center');
$pdf->ezImage('../ros.jpg', 0, 0, 'none', 'right');
if (isset($_GET['d']) && $_GET['d']) {
    echo $pdf->ezOutput(TRUE);
} else {
    $pdf->ezStream(array('compress' => 0));
}
//error_log($pdf->messages);
Пример #10
0
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']) {
    echo $pdf->ezOutput(TRUE);
} else {
    $pdf->ezStream(array('compress' => 0));
}
//error_log($pdf->messages);
Пример #11
0
     $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();
 $pdf->ezImage('/media/img/logoaevivienda.png', 50, 0, 'full', 'left');
 $pdf->addText(500, 30, 8, "TECNICO");
 $pdf->line(490, 40, 600, 40);
Пример #12
0
$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();
$json = file_get_contents('..\\json\\fornecedor.json');
$lendo = json_decode($json, true);
$x = 0;
foreach ($lendo as $objeto) {
    $meio[$x] = array('nome' => $objeto['nome'], 'cnpj' => $objeto['cnpj'], 'fone' => $objeto['fone']);
    $x++;
}
$cols = array('nome' => 'Nome', 'cnpj' => 'CNPJ', 'fone' => 'Telefone', 'cidade' => 'Cidade', 'contato' => 'Contato', 'bairro' => 'Bairro');
$pdf->ezTable($meio, $cols);
if (isset($_GET['d']) && $_GET['d']) {
    echo $pdf->ezOutput(TRUE);
} else {
    $pdf->ezStream(array('compress' => 0));
Пример #13
0
    }
}
$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');
$pdf->ezText("PNG true color plus alpha channel #1");
$pdf->ezImage('images/test_alpha.png', 0, 0, 'none', 'right');
$pdf->ezText("PNG indexed:\n\n");
$pdf->ezImage('images/test_indexed.png', 0, 0, 'none', 'right');
$pdf->ezNewPage();
$pdf->ezText("PNG indexed transparent (NOT SUPPORTED):\n\n");
$pdf->ezImage('images/test_indexed_transparent.png', 0, 0, 'none', 'right');
$pdf->ezText("JPEG from an external resource");
$pdf->ezImage('https://github.com/rospdf/pdf-php/raw/master/ros.jpg', 0, 0, 'none', 'right');
$pdf->ezText("GIF image converted into JPG\n\n");
$pdf->ezImage('images/test_alpha.gif', 0, 0, 'none', 'right');
Пример #14
0
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 {
    $pdf->ezStream(array('compress' => 0));
}
Пример #15
0
 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'));
 $pdf->ezText('3.- Contactese con la departamental correspondiente presentar toda su docuemntacion incluido este repote.', 9, array('justification' => 'left'));
 $pdf->ezText('');
 /*
Пример #16
0
{
    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
$pdf->addDestination('test001', 'FitH', $pdf->y);
$pdf->ezText("<strong>The 'Internal Link' annotation:</strong>");
$pdf->ezText("Followed by an <c:ilink:test001>internal</c:ilink> link which requires to set a destination first. Use \$pdf->addDestination() before adding internal links.\n");
$pdf->ezText("More annotations soon...");
if (isset($_GET['d']) && $_GET['d']) {
    echo $pdf->ezOutput(TRUE);
} else {
Пример #17
0
$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';
$mainFont = './fonts/Times-Roman.afm';
$codeFont = './fonts/Courier.afm';
// select a font
$pdf->selectFont($mainFont);
$pdf->ezText("PHP Pdf Creation\n", 30, array('justification' => 'centre'));
$pdf->ezText("Module-free creation of Pdf documents\nfrom within PHP\n", 20, array('justification' => 'centre'));
$pdf->ezText("developed by R&OS Ltd\n<c:alink:http://www.ros.co.nz/pdf/>http://www.ros.co.nz/pdf</c:alink>", 18, array('justification' => 'centre'));
$pdf->ezText("\n<c:alink:http://sourceforge.net/projects/pdf-php>http://sourceforge.net/projects/pdf-php</c:alink>\n\nversion 0.09", 18, array('justification' => 'centre'));
$pdf->ezSetDy(-100);
// modified to use the local file if it can
$pdf->openHere('Fit');
function ros_logo(&$pdf, $x, $y, $height, $wl = 0, $wr = 0)
{
    $pdf->saveState();
    $h = 100;
    $factor = $height / $h;
    $pdf->selectFont('./fonts/Helvetica-Bold.afm');
    $text = 'R&OS';
    $ts = 100 * $factor;
    $th = $pdf->getFontHeight($ts);
Пример #18
0
        // 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');
$content = file_get_contents('utf8.txt');
$pdf->ezText($content, 10, array('justification' => 'full'));
if (isset($_GET['d']) && $_GET['d']) {
    echo $pdf->ezOutput(TRUE);
} else {
    $pdf->ezStream();
}
$end = microtime(true) - $start;
//error_log($end . ' execution in seconds (v0.12.2)');
Пример #19
0
     $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();
 $pdf->ezImage('/media/img/logoaevivienda.png', 50, 0, 'full', 'left');
 $pdf->addText(500, 30, 8, "TECNICO");
 $pdf->line(490, 40, 600, 40);
Пример #20
0
$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';
$mainFont = './fonts/Times-Roman.afm';
$codeFont = './fonts/Courier.afm';
$images = '';
// select a font
$pdf->selectFont($mainFont);
$pdf->ezText("{$company_name} Zabbix Report", 40, array('justification' => 'centre'));
$pdf->ezText("", 14, array('justification' => 'centre'));
$pdf->ezText("for", 16, array('justification' => 'centre'));
$pdf->ezText("", 14, array('justification' => 'centre'));
$pdf->ezText("{$name}", 40, array('justification' => 'centre'));
$pdf->ezText("", 14, array('justification' => 'centre'));
$pdf->ezText("generated on", 14, array('justification' => 'centre'));
$pdf->ezText("", 14, array('justification' => 'centre'));
$pdf->ezText(date('l jS \\of F Y \\a\\t H:i'), 19, array('justification' => 'centre'));
//$pdf->ezText("(Version 0.4)",14,array('justification'=>'centre'));
$pdf->openHere('Fit');
company_logo($pdf, 150, $pdf->y - 80, 80, 150, 200);
$pdf->ezSetDy(-400);
$pdf->ezText("Report start  : {$report_start}", 14, array('justification' => 'right'));
$pdf->ezText("Report end   : {$report_end}", 14, array('justification' => 'right'));
$pdf->selectFont($mainFont);
Пример #21
0
    }
}
$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");
$pdf->ezImage('images/test_alpha.png', 0, 0, 'none', 'right');
$pdf->ezText("PNG indexed:\n\n");
$pdf->ezImage('images/test_indexed.png', 0, 500, 'width', 'right');
$pdf->ezNewPage();
$pdf->ezText("PNG indexed transparent (no transparency supported yet):\n\n");
$pdf->ezImage('images/test_indexed_transparent.png', 0, 500, 'width', 'right');
$pdf->ezText("PNG true color plus alpha channel #2");
$pdf->ezImage('images/test_alpha2.png', 0, 0, 'none', 'right');
$pdf->ezText("JPEG from an external resource");
$pdf->ezImage('http://pdf-php.sf.net/pdf-php-code/ros.jpg', 0, 0, 'none', 'right');
$pdf->ezText("GIF image converted into JPG\n\n");
Пример #22
0
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";
$_POST['asignatura'] = "Test 456";
//$pdf->selectFont('Times-Bold');
$txtintro = $_POST['emisor'] . ", " . $_POST['cargo_emisor'] . " DEL " . $_POST['vicerrectorado'] . ",\n\n";
$pdf->ezText($txtintro, 12, array('spacing' => 1.5, 'justification' => 'full'));
//$pdf->selectFont('Times-Roman');
$pdf->ezText("INFORMA:\n\n");
$pdf->ezSetCmMargins(1, 3, 4, 4);
Пример #23
0
    if ($lName == $team) {
        $capt = $lCapt;
        $tel = $lPhone;
        $alley = $lAlley;
        $night = $lNight;
        $divid = $lDiv;
        $div = 'Division ' . $lDiv;
        if ($lDiv == 'P') {
            $div = 'Premier Division';
        }
    }
}
if ($tel != '') {
    $tel = " ({$tel})";
}
$pdf->ezText("{$div}\nCapt: {$capt} {$tel}\nAlley: {$alley}, {$night}", 10);
$pdf->ezSetDy(-15);
$csvfl = 'csv/t' . $teamcsv . '.csv';
if (($handle = fopen($csvfl, "r")) !== FALSE) {
    $nn = 0;
    $data = '';
    $nt = 'Week';
    $csvarray[$nn][$nt] = '2015';
    $nt = 'Date';
    $csvarray[$nn][$nt] = $data;
    $nt = 'Day';
    $csvarray[$nn][$nt] = $data;
    $nt = 'Versus';
    $csvarray[$nn][$nt] = $data;
    $nt = 'H/A';
    $csvarray[$nn][$nt] = $data;
Пример #24
0
{
    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>';
} else {
    //$pdf->ezStream(array('compress'=>0));
    //die;
    //$pdf->options['compression']=0;
    $doc = $pdf->ezOutput();
    $recipients = array('*****@*****.**');
    /* boundary */
    $boundary = strtoupper(md5(uniqid(time())));
Пример #25
0
}
$pdf = new Creport('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
    $pdf->tempPath = '../';
}
$pdf->ezSetMargins(10, 10, 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');
//$border['width'] = 1;
$pdf->ezText('');
$pdf->ezImage('img/logo2.png', '', '175', '', 'left', '');
$pdf->ezText('');
$pdf->ezText('Materiais', 25);
$pdf->ezText('');
$meio = array();
$json = file_get_contents('..\\json\\material.json');
$lendo = json_decode($json, true);
$x = 0;
foreach ($lendo as $objeto) {
    $meio[$x] = array('codigo' => $objeto['codigo'], 'descricao' => $objeto['descricao'], 'medida' => $objeto['medida'], 'qtd' => rand(1, 250));
    $x++;
}
$cols = array('codigo' => 'Codigo', 'descricao' => 'Descrição', 'medida' => 'Medida', 'qtd' => 'Quantidade');
$pdf->ezTable($meio, $cols);
if (isset($_GET['d']) && $_GET['d']) {