Perl Monk, Perl Meditation | |
PerlMonks |
Re: Dynamic tables using PDF::Templateby dragonchild (Archbishop) |
on Jan 09, 2008 at 14:20 UTC ( [id://661356]=note: print w/replies, xml ) | Need Help?? |
Wow. Two questions and two doozies. Dynamically determining column width from data is really really difficult, particularly for outputs which are paginated, dynamically formatted, and printed. It could've been fixed pretty easily, except for the fact that PDF::Template is a single-pass transformer. All the fixes require a two-pass engine and rewriting the engine just for this situation was deemed too much work for the effort.
The best solution I've found is to use percentages and keep tweaking. Alternately, you can actually have the widths be variable and calculate things in your code. As for more permanent solutions, take a look at Excel::Template::Element::Cell::AutoSize. While it's for Excel::Template and not PDF::Template, they were written off the same engine (E::T is just a rewrite of P::T) and so the technique of adding your own elements dynamically works the same for both. My criteria for good software:
In Section
Seekers of Perl Wisdom
|
|