Maybe you can tell me where you have problems. The documentation mentions exactly one occurrence of new_page_func in code. My code snippet also mentions one occurrence of new_page_func. Do you have problems to string the two occurrences together into one consecutive whole?
I don't have PDF::Table installed, so I can't test any code. I will just take the synopsis and put my part into it:
($end_page, $pages_spanned, $table_bot_y) = $pdftable->table(
$pdf, # A PDF::API2 instance
$page_to_start_on, # A PDF::API2::Page instance created with $pa
+ge_to_start_on = $pdf->page();
$data, # 2D arrayref of text strings
x => $left_edge_of_table, #X - coordinate of upper left corne
+r
w => 570, # width of table.
start_y => $initial_y_position_on_first_page,
next_y => $initial_y_position_on_every_new_page,
start_h => $table_height_on_first_page,
next_h => $table_height_on_every_new_page,
#OPTIONAL PARAMS BELOW
max_word_length=> 20, # add a space after every 20th symbol in
+long words like serial numbers
padding => 5, # cell padding
padding_top => 10, # top cell padding, overides padding
padding_right => 10, # right cell padding, overides padding
padding_left => 10, # left cell padding, overides padding
padding_bottom => 10, # bottom padding, overides -padding
border => 1, # border width, default 1, use 0 for no b
+order
border_color => 'red',# default black
font => $pdf->corefont("Helvetica", -encoding => "utf8"
+), # default font
font_size => 12,
font_color_odd => 'purple',
font_color_even=> 'black',
background_color_odd => 'gray', #cell background color f
+or odd rows
background_color_even => 'lightblue', #cell background color
+for even rows
new_page_func => sub {
...
}, # see section TABLE SPANNING
header_props => $hdr_props, # see section HEADER ROW PROPERTIES
column_props => $col_props, # see section COLUMN PROPERTIES
cell_props => $row_props, # see section CELL PROPERTIES
)
|