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 fma-001 <fm...@xt-ag.com> on 2007/11/14 17:46:06 UTC

BreakingAlgorithm Problem

Hi!

I use FOP 0.93 and write some data in a table with several columns. In one
column data can be broader than the column-width without any chance to
hyphenate.

FOP then logs message: "WARN  [BreakingAlgorithm] Line 1 of a paragraph
overflows the available area."

I tried to get rid of it with overflow- and wrap-option-attributes, but it
doesn'nt work:
<fo:table-cell>
	<fo:block-container overflow="scroll" wrap-option="wrap">
		<fo:block language="de" hyphenate="true()">
			<xsl:value-of select="."/>
		</fo:block>
	</fo:block-container>
</fo:table-cell>

Say, I have a string "www.verylonguri.com", FOP can't hyphenate it and does
write it into the next column. I would like to break it hard, like this:
www.verlon
guri.com

Is there any way to archive this?

Thank you in advance!
Franz
-- 
View this message in context: http://www.nabble.com/BreakingAlgorithm-Problem-tf4806438.html#a13751025
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: BreakingAlgorithm Problem

Posted by Manuel Mall <ma...@apache.org>.
On Friday 16 November 2007 17:33, Andreas L Delmelle wrote:
> On Nov 16, 2007, at 09:29, fma-001 wrote:
>
> Hi
>
> > thanks for your hint. I wrote a template, which checks if there are
> > some
> > non-letter-characters (like '.', '/'; etc.). If this is the case, I
> > concat
> > the string after each character with Unicode Zero Width Space
> > ('&#x200B;'),
> > but then FOP 0.93 overlaps letters. I also tried FIGURE SPACE
> > ('&x#2007;'),
> > but then FOP does break it half way ... very strange. Here my code
> > snippet:
> >
> > <xsl:variable name="sNew">
> > 	<xsl:for-each select="0 to string-length($s)">
> > 		<xsl:value-of select="concat(substring($s,.,1), '&#x200B;')"/>
> > 	</xsl:for-each>
> > </xsl:variable>
> > <xsl:copy-of select="$sNew"/>
> >
> > Any idea, why FOP0.93 is doing it that way?
>
> Yes, this was a bug in 0.93 IIRC. Upgrading to 0.94 should resolve
> the issue.

In addition 0.94 should break at the '/' character automatically, i.e. 
it should break typical URLs. However, it will not break on '.' not 
followed by whitespace (if it did if could have very unfortunate 
effects on numbers like $12.50).

>
> HTH!
>
> Andreas
>

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: BreakingAlgorithm Problem

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Nov 16, 2007, at 09:29, fma-001 wrote:

Hi

> thanks for your hint. I wrote a template, which checks if there are  
> some
> non-letter-characters (like '.', '/'; etc.). If this is the case, I  
> concat
> the string after each character with Unicode Zero Width Space 
> ('&#x200B;'),
> but then FOP 0.93 overlaps letters. I also tried FIGURE SPACE  
> ('&x#2007;'),
> but then FOP does break it half way ... very strange. Here my code  
> snippet:
>
> <xsl:variable name="sNew">
> 	<xsl:for-each select="0 to string-length($s)">
> 		<xsl:value-of select="concat(substring($s,.,1), '&#x200B;')"/>
> 	</xsl:for-each>
> </xsl:variable>
> <xsl:copy-of select="$sNew"/>
>
> Any idea, why FOP0.93 is doing it that way?

Yes, this was a bug in 0.93 IIRC. Upgrading to 0.94 should resolve  
the issue.

HTH!

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: BreakingAlgorithm Problem

Posted by fma-001 <fm...@xt-ag.com>.
Hi Kumar,

thanks for your hint. I wrote a template, which checks if there are some
non-letter-characters (like '.', '/'; etc.). If this is the case, I concat
the string after each character with Unicode Zero Width Space('&#x200B;'),
but then FOP 0.93 overlaps letters. I also tried FIGURE SPACE ('&x#2007;'),
but then FOP does break it half way ... very strange. Here my code snippet:

<xsl:variable name="sNew">
	<xsl:for-each select="0 to string-length($s)">
		<xsl:value-of select="concat(substring($s,.,1), '&#x200B;')"/>
	</xsl:for-each>
</xsl:variable>
<xsl:copy-of select="$sNew"/>

Any idea, why FOP0.93 is doing it that way?

Thanks in advance,
Franz



Puppala, Kumar (LNG-CON) wrote:
> 
> You could insert a Unicode Zero Width Space (&#x200B;) after each
> character within your table-cell. That should enable the word to break
> properly without overflowing into the next cell.
> 
> However, if the same logic is applied to some standard text (which can
> hyphenate) it will no longer hyphenate. 
> 
> Thanks,
> Kumar
> 

-- 
View this message in context: http://www.nabble.com/BreakingAlgorithm-Problem-tf4806438.html#a13788523
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: BreakingAlgorithm Problem

Posted by "Puppala, Kumar (LNG-CON)" <ku...@lexisnexis.com>.
You could insert a Unicode Zero Width Space (&#x200B;) after each
character within your table-cell. That should enable the word to break
properly without overflowing into the next cell.

However, if the same logic is applied to some standard text (which can
hyphenate) it will no longer hyphenate. 

Thanks,
Kumar

-----Original Message-----
From: fma-001 [mailto:fma-001@xt-ag.com] 
Sent: Wednesday, November 14, 2007 11:46 AM
To: fop-users@xmlgraphics.apache.org
Subject: BreakingAlgorithm Problem


Hi!

I use FOP 0.93 and write some data in a table with several columns. In
one
column data can be broader than the column-width without any chance to
hyphenate.

FOP then logs message: "WARN  [BreakingAlgorithm] Line 1 of a paragraph
overflows the available area."

I tried to get rid of it with overflow- and wrap-option-attributes, but
it
doesn'nt work:
<fo:table-cell>
	<fo:block-container overflow="scroll" wrap-option="wrap">
		<fo:block language="de" hyphenate="true()">
			<xsl:value-of select="."/>
		</fo:block>
	</fo:block-container>
</fo:table-cell>

Say, I have a string "www.verylonguri.com", FOP can't hyphenate it and
does
write it into the next column. I would like to break it hard, like this:
www.verlon
guri.com

Is there any way to archive this?

Thank you in advance!
Franz
-- 
View this message in context:
http://www.nabble.com/BreakingAlgorithm-Problem-tf4806438.html#a13751025
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


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org