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' ); |