예제 #1
0
$p['fillcolor']['red'] = $p['fillcolor']['green'] = $p['fillcolor']['blue'] = 0.4;
$pdf->draw_line($x, $y, $firstpage, $p);
$x[0] = 50;
$x[1] = 500;
$x[2] = 300;
$y[0] = 450;
$y[1] = 570;
$y[2] = 350;
unset($p);
$p['mode'] = 'fill+stroke';
$p['fillcolor'] = $pdf->get_color('white');
$pdf->draw_line($x, $y, $firstpage, $p);
$fh = fopen("../doc/ptlogo.jpg", "r");
$data = fread($fh, filesize('../doc/ptlogo.jpg'));
fclose($fh);
$image = $pdf->jfif_embed($data);
$size = $pdf->get_image_size($image);
$pdf->image_place($image, 792 - $size['height'], 0, $firstpage);
$fh = fopen("../doc/powerby.png", "r");
$data = fread($fh, filesize('../doc/powerby.png'));
fclose($fh);
$image = $pdf->png_embed($data);
if (!$image) {
    echo $pdf->pop_error($n, $s);
    echo "<p>{$s}</p>";
    exit;
}
$pdf->image_place($image, 735, 380, $firstpage);
header("Content-Disposition: attachment; filename=showoff.pdf");
header("Content-Type: application/pdf");
echo $pdf->generate();