1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use PDF::API2; my $pdf = PDF::API2->new(); $pdf->mediabox(595,842); my $page = $pdf->page; my $fnt = $pdf->corefont('Helvetica',-encoding => 'latin1'); my $txt = $page->text; my $gfx = $page->gfx; my $image = $pdf->image_png('test.png'); $gfx->image( $image, 50, 500 ); $txt->textstart; $txt->font($fnt, 20); $txt->translate(100,600); $txt->text("Hello World!"); $txt->textend; $pdf->saveas('test.pdf'); $pdf->end();
2012-02-09T09:24:50 user123