http://qs1969.pair.com?node_id=1199220

tweetiepooh has asked for the wisdom of the Perl Monks concerning the following question:

Hi all

I'm trying to create a PDF that will have a large number of tables present, with some data items possibly spanning pages. I can get the data into a structure I can use and have been playing around with how best to neatly present the data. The data will come from 2 sources and describes objects in each source. Objects may not all have the same data items present. The format of the output will be like

Title page for whole Section page for the data source Pages for each object, starting on a new page Item : Data Item : Data Item : Data Section page for the data source Pages for each object, starting on a new page Item : Data Item : Data Item : Data

I've managed to get the general output just by placing items on a PDF page but using a table would likely be better and there are a number of modules with examples in CPAN but many seem more focussed on row type tables

Item1 Item2 Item3 Data1 Data2 Data3 Data1 Data2 Data3 ....

Are there any tips or examples with this sort of output? Will it allow for large data (many rows) for any item. Can modules like PDF::Table handle documents with n tables (I don't know how many tables there will be? Will simply using code a bit like below work at all?

my ($table, $page, $array); while skipping through the data setting $object { $page = $pdf->page; $table = new PDF::Table $array = [] skip through data for $object setting $item and $data { process the data a little push $array,[$item,$data] } $table->table( set up table using $array ) }

Script will run on Solaris (Perl5.18) and the gen'd PDF then emailed to user. Once I get the main data working I can work on page header/footers, table of contents, indices and the like. The goal is to make the data readable so we can compare objects in each data source. Objects can be named differently and can have some small code differences but functionally should be similar. Trying to use the vendor tools is not an easy task hence trying to read out the data and "format" it.