Beispiel #1
0
//$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'));
$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'));
Beispiel #2
0
$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'));
$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;
Beispiel #3
0
$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");
while (!feof($fd)) {
    $buffer = fgetcsv($fd, 1024);
    for ($i = 0; $i < 9; ++$i) {
        if ($i == 0) {
            $lName = $buffer[$i];
        }
        if ($i == 1) {
            $lAlley = $buffer[$i];
        }
        if ($i == 2) {