-=item Example:
-
- ($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 $page_to_start_on = $pdf->page();
- $data, # 2D arrayref of text strings
- x => $left_edge_of_table, #X - coordinate of upper left corner
- 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 border
- 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 for odd rows
- background_color_even => 'lightblue', #cell background color for even rows
- new_page_func => $code_ref, # 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
- )
+=item B<next_h> - Height of the table on any additional page
+
+B<Value:> can be any whole number satisfying 0 < next_h < PageHeight
+B<Default:> Value of param B<'start_h'>
+
+ next_h => 700
+
+=item B<next_y> - Y coordinate of upper left corner of the table at any additional page.
+
+B<Value:> can be any whole number satisfying 0 < next_y < PageHeight
+B<Default:> Value of param B<'start_y'>
+
+ next_y => 750
+
+=item B<max_word_length> - Breaks long words (like serial numbers hashes etc.) by adding a space after every Nth symbol
+
+B<Value:> can be any whole positive number
+B<Default:> 20
+
+ max_word_length => 20 # Will add a space after every 20 symbols
+
+=item B<padding> - Padding applied to every cell
+
+=item B<padding_top> - top cell padding, overrides 'padding'
+
+=item B<padding_right> - right cell padding, overrides 'padding'
+
+=item B<padding_left> - left cell padding, overrides 'padding'
+
+=item B<padding_bottom> - bottom padding, overrides 'padding'
+
+B<Value:> can be any whole positive number
+
+B<Default padding:> 0
+
+B<Default padding_*> $padding
+
+ padding => 5 # all sides cell padding
+ padding_top => 8, # top cell padding, overrides 'padding'
+ padding_right => 6, # right cell padding, overrides 'padding'
+ padding_left => 2, # left cell padding, overrides 'padding'
+ padding_bottom => undef # bottom padding will be 5 as it will fallback to 'padding'
+
+=item B<border> - Width of table border lines.
+
+=item B<horizontal_borders> - Width of horizontal border lines. Overrides 'border' value.
+
+=item B<vertical_borders> - Width of vertical border lines. Overrides 'border' value.
+
+B<Value:> can be any whole positive number. When set to 0 will disable border lines.
+B<Default:> 1
+
+ border => 3 # border width is 3
+ horizontal_borders => 1 # horizontal borders will be 1 overriding 3
+ vertical_borders => undef # vertical borders will be 3 as it will fallback to 'border'
+
+=item B<vertical_borders> - Width of vertical border lines. Overrides 'border' value.
+
+B<Value:> Color specifier as 'name' or 'HEX'
+B<Default:> 'black'
+
+ border_color => 'red'
+
+=item B<font> - instance of PDF::API2::Resource::Font defining the fontf to be used in the table
+
+B<Value:> can be any PDF::API2::Resource::* type of font
+B<Default:> 'Times' with UTF8 encoding
+
+ font => $pdf->corefont("Helvetica", -encoding => "utf8")
+
+=item B<font_size> - Default size of the font that will be used across the table
+
+B<Value:> can be any positive number
+B<Default:> 12
+
+ font_size => 16
+
+=item B<font_color> - Font color for all rows
+
+=item B<font_color_odd> - Font color for odd rows
+
+=item B<font_color_even> - Font color for even rows
+
+=item B<font_underline> - Font underline of the header row
+
+B<Value:> 'auto', integer of distance, or arrayref of distance & thickness (more than one pair will provide mlultiple underlines. Negative distance gives strike-through.
+B<Default:> none
+
+=item B<background_color_odd> - Background color for odd rows
+
+=item B<background_color_even> - Background color for even rows
+
+B<Value:> Color specifier as 'name' or 'HEX'
+B<Default:> 'black' font on 'white' background
+
+ font_color => '#333333'
+ font_color_odd => 'purple'
+ font_color_even => '#00FF00'
+ background_color_odd => 'gray'
+ background_color_even => 'lightblue'
+
+=item B<row_height> - Desired row height but it will be honored only if row_height > font_size + padding_top + padding_bottom
+
+B<Value:> can be any whole positive number
+B<Default:> font_size + padding_top + padding_bottom
+
+ row_height => 24
+
+=item B<new_page_func> - CODE reference to a function that returns a PDF::API2::Page instance.
+
+If used the parameter 'new_page_func' must be a function reference which when executed will create a new page and will return the object back to the module.
+For example you can use it to put Page Title, Page Frame, Page Numbers and other staff that you need.
+Also if you need some different type of paper size and orientation than the default A4-Portrait for example B2-Landscape you can use this function ref to set it up for you. For more info about creating pages refer to PDF::API2 PAGE METHODS Section.
+Don't forget that your function must return a page object created with PDF::API2 page() method.
+
+ new_page_func => $code_ref
+
+=item B<header_props> - HASH reference to specific settings for the Header row of the table. See section L</Header Row Properties> below
+
+ header_props => $hdr_props
+
+=item B<column_props> - HASH reference to specific settings for each column of the table. See section L</Column Properties> below
+
+ column_props => $col_props
+
+=item B<cell_props> - HASH reference to specific settings for each column of the table. See section L</Cell Properties> below
+
+ cell_props => $cel_props
+
+=item B<cell_render_hook> - CODE reference to a function called with the current cell coordinates. If used the parameter 'cell_render_hook' must be a function reference. It is most useful for creating a url link inside of a cell. The following example adds a link in the first column of each non-header row:
+
+ cell_render_hook => sub {
+ my ($page, $first_row, $row, $col, $x, $y, $w, $h) = @_;
+
+ # Do nothing except for first column (and not a header row)
+ return unless ($col == 0);
+ return if ($first_row);
+
+ # Create link
+ my $value = $list_of_vals[$row-1];
+ my $url = "https://${hostname}/app/${value}";
+
+ my $annot = $page->annotation();
+ $annot->url( $url, -rect => [$x, $y, $x+$w, $y+$h] );
+ },