View | Details | Raw Unified | Return to bug 8007
Collapse All | Expand All

(-)a/Koha/Borrower/Discharge.pm (-1 / +1 lines)
Lines 111-117 sub generate_as_pdf { Link Here
111
    my $html_path = tmpnam() . '.html';
111
    my $html_path = tmpnam() . '.html';
112
    my $pdf_path = tmpnam() . '.pdf';
112
    my $pdf_path = tmpnam() . '.pdf';
113
    my $html_content = $tmpl->output;
113
    my $html_content = $tmpl->output;
114
    open my $html_fh, '>', $html_path;
114
    open my $html_fh, '>:encoding(utf8)', $html_path;
115
    say $html_fh $html_content;
115
    say $html_fh $html_content;
116
    close $html_fh;
116
    close $html_fh;
117
    my $pdf = PDF::FromHTML->new( encoding => 'utf-8' );
117
    my $pdf = PDF::FromHTML->new( encoding => 'utf-8' );
(-)a/members/discharge.pl (-1 / +2 lines)
Lines 29-35 Allows librarian to edit and/or manage borrowers' discharges Link Here
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI;
32
use CGI qw( -utf8 );
33
use C4::Auth;
33
use C4::Auth;
34
use C4::Output;
34
use C4::Output;
35
use C4::Members;
35
use C4::Members;
Lines 78-83 if ( $input->param('borrowernumber') ) { Link Here
78
        my $pdf_path = Koha::Borrower::Discharge::generate_as_pdf(
78
        my $pdf_path = Koha::Borrower::Discharge::generate_as_pdf(
79
            { borrowernumber => $borrowernumber, } );
79
            { borrowernumber => $borrowernumber, } );
80
80
81
        binmode(STDOUT);
81
        print $input->header(
82
        print $input->header(
82
            -type       => 'application/pdf',
83
            -type       => 'application/pdf',
83
            -charset    => 'utf-8',
84
            -charset    => 'utf-8',
(-)a/opac/opac-discharge.pl (-2 / +2 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Auth qw(:DEFAULT get_session);
22
use C4::Auth qw(:DEFAULT get_session);
23
use CGI;
23
use CGI qw( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output;
26
use C4::Log;
26
use C4::Log;
Lines 59-64 elsif ( $op eq 'get' ) { Link Here
59
        borrowernumber => $loggedinuser
59
        borrowernumber => $loggedinuser
60
    });
60
    });
61
61
62
    binmode(STDOUT);
62
    print $input->header(
63
    print $input->header(
63
        -type       => 'application/pdf',
64
        -type       => 'application/pdf',
64
        -charset    => 'utf-8',
65
        -charset    => 'utf-8',
65
- 

Return to bug 8007