Formatting HTML tables to print nicely with CSS.

liunx

Guest
Greetings,

I have developed a stand alone app that
gathers information from a DB, and generates
the corresponding XML representation.

Once I have the XML I transform it to HTML
with XSL, and launch it in IE6.

The trouble is that much of my data is
represented with large HTML tables. When
I try to print these tables I get very ugly
page breaks.

Would it be possible to use CSS to ensure
that the printed output is formatted nicely?

Thanks in advance.

RyanYes, you can specify where and when a page should break: <!-- m --><a class="postlink" href="http://www.w3.org/TR/2002/WD-CSS21-20020802/page.htmlWhat">http://www.w3.org/TR/2002/WD-CSS21-2002 ... e.htmlWhat</a><!-- m --> I do in that situation, is I use XSL to transform the XML into Formatting Objects (FO) and then I use Apache's FOP (<!-- m --><a class="postlink" href="http://xml.apache.org/fop/">http://xml.apache.org/fop/</a><!-- m -->) to generate a printer friendly, PDF version. Once you get the hang of structuring the document, FO syntax and grammer is just an XML version of CSS.
 
Back
Top