Without providing actual code, the approach I'd recommend is to
accumulate in a data structure something such as the following.

my $tables = [
   [ # table/page 0
       [ # row 0
            q| line 0 of row 0 |, # this just represents a line of
user-input, presumably as obtained from Text::Wrap
            q| line 1 of row 0 |,
            q| line 2 of row 0 |,
        ],
        [ # row 1
            q| line 0 of row 1 |,
            q| line 1 of row 1 |,
            q| line 2 of row 1 |,
        ],
    ],
    [ # table/page 1...
    ], #....
];

I'm assuming above that you have only one column of text per row.
Anyway, finally in your HTML::Template, loop through $tables and break
your text in the appropriate spots accordingly. If you need more
specific help, ask away.

--
Shaun Fryer
http://sourcery.ca/

On Thu, Mar 5, 2009 at 2:56 PM, Bill Stephenson <bi...@perlhelp.com> wrote:
> On Mar 5, 2009, at 1:40 PM, Shaun Fryer wrote:
>
>> This shouldn't be that difficult if you know how many lines/rows you
>> want on each page. How are you generating the HTML? Are you doing it
>> via CGI.pm, Template::Toolkit, HTML::Template, something else? That
>> will be the defining factor as to how you'd go about it.
>
> Thanks for the reply Shaun.
>
> I'm using CGI.pm to process forms and HTML::Template to fill in the
> processed data. For the most part it is formatted with CSS. I use Text::Wrap
> as well.
>
> Basically, right now I let user fill in as much data as they want and let
> the client side deal with page breaks, but that is pretty sloppy and I'd
> like to improve it.
>
> Kindest Regards,
>
> --
> Bill Stephenson
>
>

-- 
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional commands, e-mail: beginners-cgi-h...@perl.org
http://learn.perl.org/


Reply via email to