use PDF::API2; ... my $txt = $page->text(); $txt->translate(50,500); $txt->text("This should be a text \n in four lines \n in coordinates x=50, y=500, \n but is printed in a single line that reaches the border of the page and escapes toward mars");