You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Trevor Vaughan <tv...@isr.umd.edu> on 2002/09/18 06:04:32 UTC
Simple Question
Hi,
I'm relatively new to using FOP and was wondering/hoping that there was
a way to require a row height to remain static. I.e. if I say
height="4in" but add in more than 4in worth of text, I want it to just
clip it. Does anyone know of a way to do this?
Thanks,
Trevor
RE: Simple Question
Posted by Roland Neilands <rn...@pulsemining.com.au>.
Trevor,
> I'm relatively new to using FOP and was wondering/hoping that
> there was
> a way to require a row height to remain static. I.e. if I say
> height="4in" but add in more than 4in worth of text, I want
> it to just
> clip it. Does anyone know of a way to do this?
There is no explicit XSL-FO (or even CSS) property on table rows to do this:
"height" is for minimum row heights. fo:block-containers do behave as you
want but don't inherit row properties & the table formatting doesn't allow
for their content height, as they can be any size/where you like.
Here's an ugly Q&D that does what you want but forces fixed row heights:
<fo:table>
<fo:table-column column-width="7cm"/>
...
<fo:table-body font-size="10pt">
<fo:table-row height="24pt" line-height="12pt" keep-together="always">
<!-- min only -->
<fo:table-cell>
<fo:block-container height="24pt" width="6.9cm">
<!-- ^ max ^ must be specified - padding -->
<fo:block text-align="start">
<xsl:value-of select="Description"/></fo:block>
</fo:block-container>
</fo:table-cell>
...
</fo:table-row>
...
</fo:table-body>
</fo:table>
Why do you need to do this at all?
There is most likely a better way ...
Cheers,
Roland