'fontname' => 'Courier',
####
'fontname' => 'Courier-New',
####
'fontname' => 'Courier-New,Oblique',
####
'fontname' => 'Courier-New,Bold',
####
'fontname' => 'Courier-New,BoldOblique',
####
#!/usr/bin/perl
use strict;
use warnings;
use PDF::API2;
my @fonts = qw(
Courier
Courier-Bold
Courier-BoldOblique
Courier-Oblique
Verdana
Times
Times-BoldItalic
Georgia
Georgia-Bold
);
my $pdf = PDF::API2->new;
my $page = $pdf->page;
my $text = $page->text;
my $y = 700;
$text->translate( 100, $y );
foreach my $f (@fonts) {
my $cft = $pdf->corefont($f);
$text->font( $cft, 12 );
$text->text($f);
$y -= 15;
$text->translate( 100, $y );
}
$pdf->saveas('pdftest.pdf');
$pdf->end();