Using perl Syntax Highlighting
- use PDF::API2;
- # Create a blank PDF file
- my $pdf = PDF::API2->new( \*STDOUT );
- print "Content-type: application/pdf\n\n";
- print "\n";
- # Add a blank page
- my $page = $pdf->page();
- # Set the page size
- $page->mediabox('Letter');
- # Add a built-in font to the PDF
- my $font = $pdf->corefont('Helvetica-Bold');
- # Add some text to the page
- my $text = $page->text();
- $text->font( $font, 20 );
- $text->translate( 200, 700 );
- $text->text('Hello World!');
Coloreado en 0.002 segundos, usando GeSHi 1.0.8.4
¡¡¡Muchas gracias!!!