That got it, thanks :)

___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
22288 E Princeton Dr
aurora, colorado 80018
T: 720.524.4864
[EMAIL PROTECTED]


-----Original Message-----
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2008 2:48 PM
To: [email protected]
Subject: Re: Problem with table formatting

The problem here is property inheritance. You're specifying a
margin-left="160pt" on a block. That margin is internally mapped to
start-indent which is an inherited property. It will be propagated into
the fo:table-cell. And because fo:table-cell produces a so-called
reference-area, the space available for text is restricted by 160pt. In
your particular case you end up with a negative available width (150pt -
160pt = -10pt) inside the table-cell. That's why FOP breaks after every
word. I know this sounds weird but it's the way XSL-FO works.

The full details can be found here if you're interested:
http://wiki.apache.org/xmlgraphics-fop/IndentInheritance

Executive summary and work-around:
Just set start-indent="0pt" and end-indent="0pt" on the fo:table-body.

On 12.08.2008 22:07:11 Brian Trezise wrote:
> I'm having a problem formatting table cells where FOP wants to wrap lines
> for every word in the cell, even though there is plenty of room for the
> entire contents of the cell without line wrapping.
> 
> I'm building a fo:table as follows:
> 
> <fo-snippet>
> 
> <fo:block-container absolute-position='fixed'>
>       <fo:block margin-top='340pt' margin-left='325pt' font-weight='bold'
> font-size='12pt'>
>               <xsl:value-of select='part/spec-data/caption'/>
>       </fo:block>
> </fo:block-container>
> 
> <fo:block-container absolute-position='fixed'>
>       <fo:block margin-top='365pt' margin-left='160pt' text-align='left'>
>               <fo:table>
>                       <fo:table-column column-width='150pt'/>
>                       <fo:table-column column-width='150pt'/>
>                       <fo:table-body>
>                               <xsl:for-each select="part/spec-data/row">
>                                       <fo:table-row>
>                                               <fo:table-cell>
>                                                       <fo:block
> font-size='8pt' font-weight='bold'>
>       
> <xsl:value-of select='table-header'/>:
>                                                       </fo:block>
>                                               </fo:table-cell>
>                                               <fo:table-cell>
>                                                       <fo:block
> font-size='8pt'>
>       
> <xsl:value-of select='table-data'/>
>                                                       </fo:block>
>                                               </fo:table-cell>
>                                       </fo:table-row>
>                               </xsl:for-each>
>                       </fo:table-body>
>               </fo:table>
>       </fo:block>
> </fo:block-container>
> 
> </fo-snippet>
> 
> However, when I run fop on this table, I am getting the word wrapping (see
> attachment for screenshot).  Can somebody tell me what I'm doing wrong
here?
> 
> Thanks,
> ___________________________________________________
> Brian Trezise
> Staff Software Engineer
> IntelliData, Inc
> 22288 E Princeton Dr
> aurora, colorado 80018
> T: 720.524.4864
> [EMAIL PROTECTED]




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to