To generate my PDF invoices I combined a couple of open standards (XSLT 2.0 and XSL-FO 1.1) and open source tools (Saxon 9.0, FOP 0.94 and Ant 1.7 running inside Eclipse 3.3) to create my own basic document generation solution.
Unfortunately the first output document I design after leaving the local XSL-FO specialists requires something that is not supported by the XSL-FO standard: a table that uses 100% of the height of a page. HTML allows you to create such a table but XSL-FO does not seem to support it. At least, I couldn't get it to work.
The XSL-FO FAQ seems to confirm this and since the answer was given by my ex-colleague Klaas Bals, member of the XSL working group, I think I'm out of luck. I'll stick with a nasty workaround for now. Maybe this can get 'fixed' in a future version of the standard.

5 Comments
Now that I think about it
Submitted by Klaas Bals on
Now that I think about it again, I'm not 100% sure anymore it isn't possible in XSL-FO.
If you really think that feature is required, send an email to xsl-editors@w3.org to request it as a new feature!
Litrik, In my opinion it is
Submitted by Barry on
Litrik,
In my opinion it is supported by XSL-FO (after all it is based on the CSS2 model and they say http://www.w3.org/TR/REC-CSS2/tables.html#height-layout).
But It's also a bit unclear in the spec how to handle conflicting constraints between table height and the height on the content of the table. should the content height override the table height or not. They leave it up to the vendors to decide what to do.
So I can imagine as a vendor that you decide not yet to implement this feature (cause it 's not very clear how it should be implemented)
So in theory yes it is possible but I guess in practice most renderers will not implement it or have different behaviour.
But I know you are close to the XSL-FO source so i guess they could probably clarify the situation better as i do.
Anyway I hope you find a workable clean solution.
Barry, I think you're right
Submitted by Klaas Bals on
Barry, I think you're right in your analysis that this is actually supported by XSL-FO. It may be the implementation that Litrik was using that doesn't support it.
I guess it's easiest to put
Submitted by Niek Oost on
I guess it's easiest to put the table in a block with line-height='28cm'.
That's what I did (even
Submitted by litrik on
That's what I did (even though it is not as flexible and robust as having a real 100% height table).
Add new comment