#!/usr/bin/perl 



use PDF::API2::Lite;
$PDF::API2::Lite::useInternalFonts=1;

$pdf=PDF::API2::Lite->new;

$f1=$pdf->corefont('Helvetica');


foreach $fn (qw(
	Arial
	Arial,Bold
	Arial,BoldItalic
	Arial,Italic
	Courier 
	Courier-Bold
	Courier-BoldOblique
	Courier-Oblique
	Helvetica 
	Helvetica-Bold
	Helvetica-BoldOblique
	Helvetica-Oblique
	Symbol 
	Times-Bold
	Times-BoldItalic
	Times-Italic
	Times-Roman 
	ZapfDingbats
	BankGothic
	BankGothic,Bold
	BankGothic,BoldItalic
	BankGothic,Italic
	CourierNew
	CourierNew,Bold
	CourierNew,BoldItalic
	CourierNew,Italic
	Georgia
	Georgia,Bold
	Georgia,BoldItalic
	Georgia,Italic
	Impact
	Impact,Italic
	OzHandicraft
	OzHandicraft,Bold
	OzHandicraft,BoldItalic
	OzHandicraft,Italic
	TimesNewRoman
	TimesNewRoman,Bold
	TimesNewRoman,BoldItalic
	TimesNewRoman,Italic
	Trebuchet
	Trebuchet,Bold
	Trebuchet,BoldItalic
	Trebuchet,Italic
	Verdana
	Verdana,Bold
	Verdana,BoldItalic
	Verdana,Italic
	Webdings
	Wingdings
	sans
	sans,bold
	sans,bolditalic
	sans,italic
	serif
	serif,bold
	serif,bolditalic
	serif,italic
	typewriter
	typewriter,bold
	typewriter,bolditalic
	typewriter,italic
	greek
	bats
)) {

	foreach $en (qw(
			adobe-standard
			latin1
			latin2
			latin3
			uni0
			uni1
			uni2
		) ) {

		print STDERR qq($fn - $en --- ).time().qq(\n);
		my $font=$pdf->corefont($fn,-encode => $en);
		$pdf->page(595,842);
		$pdf->print($font, 50, 100, 700, 0, 0, 'Hello World !');
		$pdf->print($font, 10, 100, 650, 0, 0, "german spec.chars: ae='ä' AE='Ä' oe='ö' OE='Ö' ue='ü' UE='Ü' ss='ß' !");
		$pdf->print($f1,   20, 100, 600, 0, 0, "This is font: $fn ($en)");

		foreach $x (0..15) {
			foreach $y (0..15) {
				$pdf->print($font, 20, 50+(33*$x),50+(33*$y), 0, 0, chr($y*16+$x));
			}
		}

	}
}

$pdf->saveas("$0.pdf");

exit;

__END__
