示例#1
0
文件: test.php 项目: rospdf/pdf-php
$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";
$_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');