Patroncard.pm:219-221: $pdf->Font('Courier'); $pdf->FontSize($font_size); my $strtop_len = $pdf->StrWidth($strtop) * 1.5; There are actually two underlying bugs here: Bug 1 (line 219): Uses hardcoded 'Courier' font name. This may not match a TTF config entry, and the fallback to prFont('Courier') may not work as expected. Bug 2 (line 221): Calls $pdf->StrWidth($strtop) with only one argument, but StrWidth() in PDF.pm expects ($string, $font, $fontSize): # PDF.pm:411 my ( $string, $font, $fontSize ) = @_; $font = C4::Creators::PDF->Font($font); # $font is undef → warnings The correct call should be: my $strtop_len = $pdf->StrWidth($strtop, 'Courier', $font_size) * 1.5;