Have you checked that you get the correct data and can print it to the screen instead of a PDF file?
use strict; use PDF::API2::Simple; my %data = (...); #my $pdf = PDF::API2::Simple->new( file => 'file.pdf' } foreach my $keys( sort { $data{$a} <=> $data{$b}} keys %data ){ print $data{$keys}{'Name'}, "\n"; }
The next thing would be to check that you can actually print to the PDF file. Try printing a plain list to a PDF file:
use strict; use PDF::API2::Simple; my @names = (Diana Bruce Clark); my $pdf = PDF::API2::Simple->new( file => 'file.pdf' } foreach my $name( @names ){ $pdf->text($name}); }
One of the two programs should work for you and should help you determine where your problem lies, in the data or in writing the data to the PDF.
In reply to Re: How can I print hash content to pdf file ?
by Corion
in thread How can I print hash content to pdf file ?
by vkk05
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |