use PDF::API2; use DBI; use strict; use constant mm => 25.4/72; use constant in => 1/72; use constant pt => 1; $pdf = PDF::API2->open('Build.pdf'); my %font = ( Helvetica => { Bold => $pdf->corefont('Helvetica-Bold', -encoding => 'latin1'), # Roman => $pdf->corefont('Helvetica', -encoding => 'latin1'), # Italic => $pdf->corefont('Helvetica-Oblique', -encoding => 'latin1'), }, Times => { # Bold => $pdf->corefont('Times-Bold', -encoding => 'latin1'), Roman => $pdf->corefont('Times', -encoding => 'latin1'), # Italic => $pdf->corefont('Times-Italic', -encoding => 'latin1'), }, ); my $page = $pdf->page; my $headline_text = $page->text; $headline_text->font( $font{'Helvetica'}{'Bold'}, 18/pt ); $headline_text->fillcolor( 'white' ); $headline_text->translate( 19/mm, 131/mm ); $headline_text->text_right( 'this is my new stuff' ); $pdf->saveas("Build2.pdf");