PDF::Table 0.91 review

Download
by rbytes.net on

PDF::Table is a utility class for building table layouts in a PDF::API2 object. SYNOPSIS use PDF::API2; use PDF::Table;

License: Perl Artistic License
File size: 0K
Developer: Daemmon Hughes
0 stars award from rbytes.net

PDF::Table is a utility class for building table layouts in a PDF::API2 object.

SYNOPSIS

use PDF::API2;
use PDF::Table;

my $pdftable = new PDF::Table;
my $pdf = new PDF::API2(-file => "table_of_lorem.pdf");
my $page = $pdf->page;

# some data to layout
my $some_data =[
["1 Lorem ipsum dolor",
"Donec odio neque, faucibus vel",
"consequat quis, tincidunt vel, felis."],
["Nulla euismod sem eget neque.",
"Donec odio neque",
"Sed eu velit."],
... and so on
];

# build the table layout
$pdftable->table(
# required params
$pdf,
$page,
$some_data,
x => $left_edge_of_table,
w => 570,
start_y => 500,
next_y => 700,
start_h => 300,
next_h => 500,
# some optional params
padding => 5,
padding_right => 10,
background_color_odd => "gray",
background_color_even => "lightblue", #cell background color for even rows
);

# do other stuff with $pdf
...

This class is a utility for use with the PDF::API2 module from CPAN. It can be used to display text data in a table layout within the PDF. The text data must be in a 2d array (such as returned by a DBI statement handle fetchall_arrayref() call). The PDF::Table will automatically add as many new pages as necessary to display all of the data.

Various layout properties, such as font, font size, and cell padding and background color can be specified for each column and/or for even/odd rows. Also a (non)repeated header row with different layout properties can be specified.
See the METHODS section for complete documentation of every parameter.

Requirements:
Perl

PDF::Table 0.91 search tags