divinafaudan has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I am new to perl and i was given a task to create a pdf using pdf::api2 and pdf::table. I am able to create the pdf, however, when i tried to loop tables/rows using foreach (since the data were queried from the database), it gave me syntax error. Does looping tables/rows are possible using the said two modules? Please check my codes below
foreach my $ship_prod (@SHIP_PRODS){ my($_t_id,$p_id,$stat_id,$qty) = split(/$SEP_CHAR/,$sh +ip_prod); $rows = ["", "$ALL_PRODS{$p_id}",""] if(exists($ALL_MAN{$p_id}) && length($ALL_MAN{$p_id}) > 0){ $rows = ["", "$ALL_MAN{$p_id}",""] } # build the table layout $pdftable->table( # required params $pdf,$page, $thirdtable, x => 5, start_y => 470, next_y => 450, start_h => 200, next_h => 250, # some optional params w => 600, padding => 5, padding_right => 10, font_size => 8, ) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Looping in PDF::Table module
by Eliya (Vicar) on Jul 24, 2013 at 03:41 UTC | |
by Anonymous Monk on Jul 24, 2013 at 07:07 UTC | |
|
Re: Looping in PDF::Table module
by rnewsham (Curate) on Jul 24, 2013 at 07:00 UTC | |
by divinafaudan (Initiate) on Jul 25, 2013 at 05:12 UTC | |
by Eliya (Vicar) on Jul 25, 2013 at 14:07 UTC | |
by rnewsham (Curate) on Jul 25, 2013 at 07:12 UTC | |
by divinafaudan (Initiate) on Jul 25, 2013 at 09:17 UTC | |
by rnewsham (Curate) on Jul 25, 2013 at 11:30 UTC |