Exemplo n.º 1
0
// 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);
$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
Exemplo n.º 2
0
 $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");
 $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'));