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, ) }
In reply to Looping in PDF::Table module by divinafaudan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |