[xep-support] Text formatting in a table cell

Kevin Brown kevin at renderx.com
Fri May 28 13:57:57 PDT 2010


Craig:

See ...

http://services.renderx.com/lists/xep-support/2650.html

>From my friend Ken Holman himself ... You cannot chop a line (think overflow) in the inline direction (meaning along the line), you can chop in the block dimension. So allow the text to wrap BUT set a fixed height and overflow="hidden". It will "wrap" but subsequent lines will be hidden.

Try this:

<fo:table border="1pt solid red">
	<fo:table-column column-width="2in"/>
	<fo:table-column column-width="2in"/>
	<fo:table-body>
		<fo:table-row>
			<fo:table-cell>
				<!-- This cell will truncate the text -->
				<fo:block-container height="14pt" overflow="hidden">
					<fo:block>
						<fo:inline>This is a long line of text that will not fit.</fo:inline>
					</fo:block>
				</fo:block-container>
			</fo:table-cell>
			<fo:table-cell>
				<!-- This cell will squish the text -->
				<fo:block-container>
					<fo:block>
						<fo:inline keep-together.within-line="always">This is a long line of text that will not fit.</fo:inline>
					</fo:block>
				</fo:block-container>				
			</fo:table-cell>
		</fo:table-row>
	</fo:table-body>
</fo:table>

Kevin Brown
RenderX


-----Original Message-----
From: owner-xep-support at renderx.com [mailto:owner-xep-support at renderx.com] On Behalf Of Cooper, Craig (LNG-PEO)
Sent: Friday, May 28, 2010 7:38 AM
To: xep-support at renderx.com
Subject: RE: [xep-support] Text formatting in a table cell

Thanks for the comment Mike. My unfortunate constraint is that the text cannot wrap. I like how the formatter will make spacing adjustments but there comes a point I need to just clip (truncate). 

Craig Cooper
-----Original Message-----
From: owner-xep-support at renderx.com [mailto:owner-xep-support at renderx.com] On Behalf Of mike.kelly at thomsonreuters.com
Sent: Friday, May 28, 2010 9:12 AM
To: xep-support at renderx.com
Subject: RE: [xep-support] Text formatting in a table cell

Hi Craig,

I might be misunderstanding what you mean, but you can use the hyphenate
attribute on the block to force it to wrap rather than getting all
squashed up. 

Regards,
Mike Kelly

-----Original Message-----
From: owner-xep-support at renderx.com
[mailto:owner-xep-support at renderx.com] On Behalf Of Cooper, Craig
(LNG-PEO)
Sent: 28 May 2010 14:21
To: xep-support at renderx.com
Subject: [xep-support] Text formatting in a table cell

In a table I have a constraint that incoming data, no matter how long,
cannot create a line wrap in a cell. The language I use to prevent this
is:

<fo:table-cell>
	<fo:block><fo:inline
keep-together.within-line="always"><xsl:value-of
select="Datavalue1"/></fo:inline></fo:block>
</fo:table-cell>

The formatter seems to handle this well adjusting character spaces to
make it fit. Sometimes the text is so long the characters just become a
"blob" in the cell. I cannot find an FO construct to tell the formatter
to just clip excess text that cannot fit. Does a method exist? My
fallback position is to truncate data prior to formatting but this would
be somewhat arbitrary given the variance of the length of character
strings after formatting.

Thanks.

Craig Cooper
LexisNexis


-----------------------------------------
The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
http://www.renderx.com/terms-of-service.html


This e-mail is for the sole use of the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. Any distribution, use or printing by anyone else is prohibited. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments from your system.
--------------------------------------------------------------------------
The sender is an independent contractor currently under contract with Thomson Reuters (Legal) Limited.
--------------------------------------------------------------------------
Thomson Reuters (Legal) Limited
Registered Office 100 Avenue Road, London NW3 3PF
Registered in England & Wales: Company No. 1679046

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list