#!/usr/local/ActivePerl-5.16/bin/perl -w use strict; use warnings; use PDF::API2; # Prepare PDF my $pdf = PDF::API2->new( -file => "Test.pdf"); my $page = $pdf->page; $page->mediabox( 'A4' ); # Set the font - but none of these do any difference: my $font = $pdf->corefont('Helvetica', -encoding => "utf-8"); #my $font = $pdf->corefont('Helvetica', -encoding => "UTF8"); #my $font = $pdf->corefont('Helvetica', -encoding => "UTF-8"); #my $font = $pdf->corefont('Helvetica', -encoding => "utf8"); #my $font = $pdf->corefont('Verdana'); #my $font = $pdf->ttfont('Arial.ttf'); # This even gives me an error during compilation # Set up some text my $text = $page->text(); $text->font($font, 20); $text->translate(100, 700); $text->text("Umlaut: Ä ä Ö ö Ü ü ß"); $pdf->save; $pdf->end();