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.


In reply to Creating a PDF with multiple tables and where data items can spread multipage by tweetiepooh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.