|
Posted by mbstevens on 09/14/05 23:41
Oli Filth wrote:
> mbstevens said the following on 14/09/2005 16:15:
>
>> Larry wrote:
>>
>>> I have a CGI program that generates a fairly long HTML table in
>>> response to a query. How do I make it so that the user can print the
>>> table from their browser and have the column headings show up on the
>>> top of each page? I know about the "page-break-after" style tag, but I
>>> have no way to know when to output it. Another option I've considered
>>> is something like Crystal Reports, but that's expensive, complex, and
>>> way more than what I need.
>>>
>>
>> Since you are generating the pages with a programming language,
>> couldn't you come up with some kind of heuristic test?
>>
>> if (position >= MAXROW)
>> generate break
>> if ((row contains x) and (position >= MINROW)
>> generate break
>> if ...
>> if ...
>> if ....
>>
>> Should be easy enough to do in most CGI scripting languages.
>
>
> But that can't take account of page size, print margins, browser text
> size, ...
>
Browser text size need not affect the printout.
For page size and print margins, you would could
1) give the visitor a choice of several common formats available
in different parts of the world;
2) let the visitor fill out a form describing her page size,
then set MAXROW, MINROW, margins, styles, etc. from that;
Navigation:
[Reply to this message]
|