Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

tweetiepooh:

It looks like PDF::Table should be able to do the job. It automatically adds pages to your PDF document as it needs to. When you generate the table, it returns the reference to the last page it created, the vertical position of the end of the table (y) on the last page, and the number of pages it added. So you should be able to continue generating your document, something like:

# all the setup stuff for PDF and PDF table for my $table (@tables) { # Implementation left as an exercise to the reader ;^) $data = make_table_data($table); # Generate the table my ($last_pg, $pg_cnt, $y) = $pdfTblGen->table($PDF, $cur_pg, $data +, %settings); if ($y < FOO) { # Not enough space on the page for the next thing, so create a n +ew page . . . } else { # Still plenty of space ... add stuff to page at $y + some whitespace ... } }

The documentation is a bit skimpy, but there are a couple examples in the distribution you can play with. I installed it a few minutes ago, looks legit.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


In reply to Re: Creating a PDF with multiple tables and where data items can spread multipage by roboticus
in thread 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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-29 01:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found