PDF-API2
Sample code
use PDF::API2;
$pdf = PDF::API2->new();
$page = $pdf->page;
#$page->mediabox(200,200);
$gfx = $page->gfx;
$gfx->strokecolor("#FF0000");
$gfx->move(0,0);
$gfx->line(100,100);
$gfx->stroke();
$gfx->endpath();
$gfx->strokecolor("#00FF00");
$gfx->move(150,150);
$gfx->line(150,50);
$gfx->stroke();
$gfx->endpath();
$pdf->saveas("test.pdf");
Reference
Examples
See also
Used for PDF atlas and PDF atlas source code
Packages
libpdf-api2-perlin Debian/Ubuntu
This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.