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 senthilvv28 <se...@yahoo.com> on 2009/09/03 17:04:57 UTC
0.95 text wrap issue
Upgrading from earlier version to .95 fop
1. I have
<fo:block hyphenate="true">
<fo:table-cell keep-together.within-column="always">
case 1 :
Long text with space behaves properly
eg : Really Really Long Text With WhiteSpace
Case 2:
Long text with No white space like
eg: ReallyReallyLongTextNoWhiteSpace
then the text flows- overlaps the next column.
to fix the problem should i introduce some white space . If yes can you let
me know how do it.
Thanks,
senthil
--
View this message in context: http://www.nabble.com/0.95-text-wrap-issue-tp25277994p25277994.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: 0.95 text wrap issue
Posted by Andreas Delmelle <an...@telenet.be>.
On 03 Sep 2009, at 17:04, senthilvv28 wrote:
Hi
<snip />
> Case 2:
> Long text with No white space like
> eg: ReallyReallyLongTextNoWhiteSpace
>
> then the text flows- overlaps the next column.
>
> to fix the problem should i introduce some white space . If yes can
> you let
> me know how do it.
That is indeed the recommended workaround for the moment, as FOP does
no real line-wrapping. We use Unicode line-breaking rules to determine
whether the content can be broken. If you were to add a couple of Zero-
Width Spaces in the above word, then FOP will consider those as legal
breakpoints. If nothing special is done, then the word is considered
unbreakable (although, you do seem to enable hyphenation, which, if
correctly configured, should result in at least one break in the
sample above?)
How exactly you should go about inserting ZWSP in the source text
depends a great deal on the stylesheet. I can imagine nobody really
wants to insert a ZWSP between every two consecutive characters in
every word in the input...
Regards,
Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608
---
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: 0.95 text wrap issue
Posted by Andreas Delmelle <an...@telenet.be>.
On 03 Sep 2009, at 18:19, Griffin,Sean wrote:
Hi Senthil, Sean,
<snip />
> 1. Remove keep-together on the table-cell. In this contrived
> example you wouldn't need it. Not sure if that affects the
> hyphenation behavior or not.
It shouldn't. Specifying an explicit "keep-*.within-column" does not
affect line-breaking. If it was plain "keep-together", this remark
would have been spot on, since that would also set the .within-line
component.
I'm assuming hyphenation was not completely set up.
> 2. Ensure you have the xml:lang attribute on the page-sequence
> element containing this block or the hyphenation either won't work
> or won't work correctly.
This can indeed be a possible cause. If 'language' is not explicitly
set, it defaults to "none", an obscure language for which OFFO does
not have hyphenation patterns yet... ;-)
Regards,
Andreas
Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@jabber.org
skype: adlm0608
---
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: 0.95 text wrap issue
Posted by Chris Bowditch <bo...@hotmail.com>.
Griffin,Sean wrote:
> Senthil,
>
> Two things I would try:
> 1. Remove keep-together on the table-cell. In this contrived example you wouldn't need it. Not sure if that affects the hyphenation behavior or not.
> 2. Ensure you have the xml:lang attribute on the page-sequence element containing this block or the hyphenation either won't work or won't work correctly.
>
> It's been a couple years since I actually did the upgrade to 0.95 and had to enable hyphenation but these are the first things I'd try. At some point you still may find a situation where you have single-syllable words too wide for the column but hopefully those are rare and can be worked around. You could also do what we do and scan for certain characters that indicate reasonable candidates for break conditions and put the ZWSP character before/after them. Characters like semicolon, colon, comma, slashes, braces, etc.
In addition to the advice given by Sean and Andreas; make sure you have
installed the fop-hyph.jar from OFFO. Otherwise you won't have the
hyphenation patterns needed for FOP to hyphenate the text in the cell.
See the following web site for more information on installing
hyphenation patterns:
http://xmlgraphics.apache.org/fop/trunk/hyphenation.html#install
Thanks,
Chris
<snip/>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: 0.95 text wrap issue
Posted by "Griffin,Sean" <SG...@CERNER.COM>.
Senthil,
Two things I would try:
1. Remove keep-together on the table-cell. In this contrived example you wouldn't need it. Not sure if that affects the hyphenation behavior or not.
2. Ensure you have the xml:lang attribute on the page-sequence element containing this block or the hyphenation either won't work or won't work correctly.
It's been a couple years since I actually did the upgrade to 0.95 and had to enable hyphenation but these are the first things I'd try. At some point you still may find a situation where you have single-syllable words too wide for the column but hopefully those are rare and can be worked around. You could also do what we do and scan for certain characters that indicate reasonable candidates for break conditions and put the ZWSP character before/after them. Characters like semicolon, colon, comma, slashes, braces, etc.
Sean
-----Original Message-----
From: senthilvv28 [mailto:senthilvv28@yahoo.com]
Sent: Thursday, September 03, 2009 10:05 AM
To: fop-users@xmlgraphics.apache.org
Subject: 0.95 text wrap issue
Upgrading from earlier version to .95 fop
1. I have
<fo:block hyphenate="true">
<fo:table-cell keep-together.within-column="always">
case 1 :
Long text with space behaves properly
eg : Really Really Long Text With WhiteSpace
Case 2:
Long text with No white space like
eg: ReallyReallyLongTextNoWhiteSpace
then the text flows- overlaps the next column.
to fix the problem should i introduce some white space . If yes can you let
me know how do it.
Thanks,
senthil
--
View this message in context: http://www.nabble.com/0.95-text-wrap-issue-tp25277994p25277994.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org