Forum Moderators: open
TIA
Jen
There's a CSS2 set of instructions for handling this, but they are highly browser-dependent and results may vary. You got a tricky problem, alright.
See "Paged Media" on the W3C site [w3.org] for details.
Jen
@page { size: 11in 8.5in; /* width height */ margin: 10%; } or
@page { size: landscape; /* auto is default */ margin: 10%; } From the CSS2 docs:
If a page box does not fit the target sheet dimensions, the user agent may choose to:Rotate the page box 90° if this will make the page box fit.
Scale the page to fit the target.The user agent should consult the user before performing these operations.
Also see section 13.3 for info on page breaking, and thus starting a new page "box", like the ones described above.
These are implemented using standard CSS2 notation, i.e. inside a stylesheet. Once you have defined the parameters, it's completely up to the browser how it handles the instructions ... IF the browser can handle them.
I have used, for example, the "page-break-after" instructions to limit the printing of our company appointment calendar to two weeks per page by enclosing each week's table in an IDd DIV tag and dynamically writing the ID that includes the break in every second table's DIV container.
I suspect something similar may be appropriate for you.
The big question is whether IE6 knows how to deal with the
@page rules.
The big question is whether IE6 knows how to deal with the @page rules.
And the answer is ... it doesn't.
Here's a more complete markup example from the CSS2 docs:
@page rotated {size: landscape} TABLE {page: rotated} Doesn't look like Firefox 1.0.2 supports the
@page rules, either. Time for fudge! :)