vkk05 has asked for the wisdom of the Perl Monks concerning the following question:
I have a hash called %data which have information of Students like Name, Class etc. I want to print those contents into PDF file. I have created a PDF file using PDF::API2::Simple module.
The foreach loop looks like this:
foreach my $keys( sort { $data{$a} <=> $data{$b}} keys %data ){ $pdf->text($data{$keys}{'Name'}); }
$pdf has:
my $pdf = PDF::API2::Simple->new( file => 'file.pdf' }
But its not getting printed in PDf file. Please suggest what is the method to print data into PDF file.
2017-12-11 Athanasius added code and paragraph tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I print hash content to pdf file ?
by Corion (Patriarch) on Dec 10, 2017 at 09:18 UTC | |
by vkk05 (Initiate) on Dec 10, 2017 at 09:26 UTC | |
by Corion (Patriarch) on Dec 10, 2017 at 09:28 UTC | |
by vkk05 (Initiate) on Dec 10, 2017 at 11:31 UTC | |
by Corion (Patriarch) on Dec 10, 2017 at 11:51 UTC | |
|
Re: How can I print hash content to pdf file ?
by poj (Abbot) on Dec 10, 2017 at 12:59 UTC | |
|
Re: How can I print hash content to pdf file ?
by choroba (Cardinal) on Dec 10, 2017 at 10:23 UTC |