[Bug 41718] New: draw_guide_grid() passes incorrect arguments to PDF methods, causing warnings.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41718 Bug ID: 41718 Summary: draw_guide_grid() passes incorrect arguments to PDF methods, causing warnings. Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Label/patron card printing Assignee: chris.nighswonger@veritassuperaitsolutions.com Reporter: chris.nighswonger@veritassuperaitsolutions.com QA Contact: testopia@bugs.koha-community.org 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; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41718 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org