Пример #1
0
//
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';
$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'));
Пример #2
0
$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);
$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'));
Пример #3
0
        $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';
$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'));
Пример #4
0
$pdf->selectFont('Helvetica-Bold');
$title = "Program Plan Narrative";
$title_width = $pdf->getTextWidth($font_size_14, "{$title}");
$title_position = 420.95 - $title_width * 0.5;
// ---------- COLUMN HEADER VALUES END ----------
$prev_dept = "ZZZZ";
$curr_dept = " ";
$curr_progid = "XXXXXXXX";
$prev_progid = " ";
$total_flag = "no";
$new_page_flag = "no";
// ---------- PRINTS HEADER AND FOOTER BEGINS ----------
$pdf->selectFont('Helvetica-Bold');
$all = $pdf->openObject();
$pdf->saveState();
$pdf->addText($title_position, $ypos, $font_size_14, $title);
$ypos = $ypos - $row_spacing;
$pdf->selectFont('Helvetica');
$pdf->setLineStyle(1, 'round');
$pdf->line(76, 516, 770, 516);
// column header line
$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject($all, 'all');
// ---------- HEADER AND FOOTER ENDS ----------
$pdf->ezSetMargins(75, 40, 75, 75);
while ($i < 1) {
    $curr_progid = "AGS211";
    $curr_deptid = "AGS";
    $curr_pgmno = "211";
    $nar_p[0] = "<u>A. Statement of Program Objectives</u>\n\nTo assist in protecting the rights of public and private land ownership by\nproviding land surveying services.";
Пример #5
0
 $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");
 $pdf->line(610, 40, 720, 40);
 $pdf->addText(740, 30, 8, "PROPONENTE");
 $pdf->line(730, 40, 840, 40);
 $pdf->closeObject();
 $pdf->addObject($footer, "all");
 $pdf->ezNewPage();
 $pdf->ezText('Consultor', 20, array('justification' => 'center'));
 $pdf->ezText('Formacion Academica', 15, array('justification' => 'left'));
 $pdf->ezTable($data2, '', 'Datos Provenientes Durante el Registro', array('width' => 650, 'maxWidth' => 650, 'fontSize' => 7, 'cols' => array('TITULO' => array('width' => 200), 'Universidad/Institucion' => array('width' => 200), 'Fecha Titulo en Provision Nacional' => array('width' => 100), 'Verifique' => array('width' => 50))));
 $pdf->ezText('');
 $pdf->ezText('');
 $pdf->ezText('PostGrado', 15, array('justification' => 'left'));
 $pdf->ezTable($data3, '', 'Datos Provenientes Durante el Registro', array('width' => 650, 'maxWidth' => 650, 'fontSize' => 7, 'cols' => array('CURSO/POSTGRADO' => array('width' => 150), 'NroHoras' => array('width' => 50), 'Fecha Conclusion' => array('width' => 80), 'Universidad/Institucion' => array('width' => 150), 'Tipo Postgrado' => array('width' => 100), 'Verifique' => array('width' => 50))));
Пример #6
0
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();
$pdf->addObject($all, 'all');
$pdf->ezSetDy(-40);
$mainFont = '/pdf/fonts/Helvetica.afm';
$codeFont = '/pdf/fonts/Courier.afm';
$pdf->selectFont($mainFont);
$listFile = 'csv/listteam.csv';
$fd = fopen("{$listFile}", "r");
Пример #7
0
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');
$pdf->addText(245, 800, 8, 'Registered Players 2015/16');
$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();
$pdf->addObject($all, 'all');
$pdf->ezSetDy(-40);
$mainFont = '/pdf/fonts/Helvetica.afm';
$codeFont = '/pdf/fonts/Courier.afm';
$pdf->selectFont($mainFont);
$listFile = 'csv/listteam.csv';
$fd = fopen("{$listFile}", "r");
while (!feof($fd)) {