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: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/