You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Beugnier, Ronny (IP&Science)" <ro...@Clarivate.com> on 2017/10/03 18:24:06 UTC

Custom line breaking algorithm

Hi,

We are working on an upgrade to fop 2.2 from a very old version.

Unfortunately we ran into the issue were text is overflowing in table columns as in the attachment.

In the older version of fop that we used we have the following algorithm:


-          If the word is too long to fit on the line, move it to the next line

-          If the word is too large to fit into the column break the word

We cannot make use of hyphenation because multiple languages are combined in one pdf and we are not aware of the language.

The only way we think we can implement this is to adjust the line breaking Knuth algorithm in the implementation.

Would this be the right approach ? Has any one done this before ? Can someone provide some guidance on this ?

Many thanks in advance,

Kind Regards,

Ronny


RE: Custom line breaking algorithm

Posted by John Bland <jp...@woodwaresystems.com>.
All,
 
   I don't really develop in FOP, but I use it extensively.  Would there be a way to specify a character other that a space that would be used to word break?
 
     John

>>> "Simon Steiner" <si...@gmail.com> 10/4/2017 7:54 AM >>>

Hi,
 
You could add a zero width space inside your url to break it:
<fo:inline>http://www.gnpd.com/mediaserver/perform_image/AFge6tDuRiA3ccDJF&#8203;cDEsjIttICSLIMS0_FfIMykBK+VK</fo:inline>
 
Thanks
 

From: Beugnier, Ronny (IP&Science) [mailto:ronny.beugnier@Clarivate.com] 
Sent: 04 October 2017 13:44
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Custom line breaking algorithm

 
Thanks for the answer. 
 
But using a hypenation list would be very hard I think since we do not know the language the document contains.
 
Can you elaborate on how you would approach this ?
 
Thanks
 

From: Simon Steiner [mailto:simonsteiner1984@gmail.com] 
Sent: dinsdag, oktober 03, 2017 20:41
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Custom line breaking algorithm

 
Hi,
 
Why not make your own hyphenation word list.
 
Thanks
 

From: Beugnier, Ronny (IP&Science) [mailto:ronny.beugnier@Clarivate.com] 
Sent: 03 October 2017 19:24
To: fop-dev@xmlgraphics.apache.org
Subject: Custom line breaking algorithm

 
Hi,
 
We are working on an upgrade to fop 2.2 from a very old version.
 
Unfortunately we ran into the issue were text is overflowing in table columns as in the attachment.
 
In the older version of fop that we used we have the following algorithm:
 If the word is too long to fit on the line, move it to the next lineIf the word is too large to fit into the column break the word 

 
We cannot make use of hyphenation because multiple languages are combined in one pdf and we are not aware of the language.
 
The only way we think we can implement this is to adjust the line breaking Knuth algorithm in the implementation.
 
Would this be the right approach ? Has any one done this before ? Can someone provide some guidance on this ? 
 
Many thanks in advance,
 
Kind Regards,
 
Ronny
 

RE: Custom line breaking algorithm

Posted by Simon Steiner <si...@gmail.com>.
Hi,

 

You could add a zero width space inside your url to break it:

<fo:inline>http://www.gnpd.com/mediaserver/perform_image/AFge6tDuRiA3ccDJF&#
8203;cDEsjIttICSLIMS0_FfIMykBK+VK</fo:inline>

 

Thanks

 

From: Beugnier, Ronny (IP&Science) [mailto:ronny.beugnier@Clarivate.com] 
Sent: 04 October 2017 13:44
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Custom line breaking algorithm

 

Thanks for the answer. 

 

But using a hypenation list would be very hard I think since we do not know
the language the document contains.

 

Can you elaborate on how you would approach this ?

 

Thanks

 

From: Simon Steiner [mailto:simonsteiner1984@gmail.com] 
Sent: dinsdag, oktober 03, 2017 20:41
To: fop-dev@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> 
Subject: RE: Custom line breaking algorithm

 

Hi,

 

Why not make your own hyphenation word list.

 

Thanks

 

From: Beugnier, Ronny (IP&Science) [mailto:ronny.beugnier@Clarivate.com] 
Sent: 03 October 2017 19:24
To: fop-dev@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> 
Subject: Custom line breaking algorithm

 

Hi,

 

We are working on an upgrade to fop 2.2 from a very old version.

 

Unfortunately we ran into the issue were text is overflowing in table
columns as in the attachment.

 

In the older version of fop that we used we have the following algorithm:

 

*	If the word is too long to fit on the line, move it to the next line
*	If the word is too large to fit into the column break the word 

 

We cannot make use of hyphenation because multiple languages are combined in
one pdf and we are not aware of the language.

 

The only way we think we can implement this is to adjust the line breaking
Knuth algorithm in the implementation.

 

Would this be the right approach ? Has any one done this before ? Can
someone provide some guidance on this ? 

 

Many thanks in advance,

 

Kind Regards,

 

Ronny

 


RE: Custom line breaking algorithm

Posted by "Beugnier, Ronny (IP&Science)" <ro...@Clarivate.com>.
Thanks for the answer.

But using a hypenation list would be very hard I think since we do not know the language the document contains.

Can you elaborate on how you would approach this ?

Thanks

From: Simon Steiner [mailto:simonsteiner1984@gmail.com]
Sent: dinsdag, oktober 03, 2017 20:41
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Custom line breaking algorithm

Hi,

Why not make your own hyphenation word list.

Thanks

From: Beugnier, Ronny (IP&Science) [mailto:ronny.beugnier@Clarivate.com]
Sent: 03 October 2017 19:24
To: fop-dev@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: Custom line breaking algorithm

Hi,

We are working on an upgrade to fop 2.2 from a very old version.

Unfortunately we ran into the issue were text is overflowing in table columns as in the attachment.

In the older version of fop that we used we have the following algorithm:


-          If the word is too long to fit on the line, move it to the next line

-          If the word is too large to fit into the column break the word

We cannot make use of hyphenation because multiple languages are combined in one pdf and we are not aware of the language.

The only way we think we can implement this is to adjust the line breaking Knuth algorithm in the implementation.

Would this be the right approach ? Has any one done this before ? Can someone provide some guidance on this ?

Many thanks in advance,

Kind Regards,

Ronny


RE: Custom line breaking algorithm

Posted by Simon Steiner <si...@gmail.com>.
Hi,

 

Why not make your own hyphenation word list.

 

Thanks

 

From: Beugnier, Ronny (IP&Science) [mailto:ronny.beugnier@Clarivate.com] 
Sent: 03 October 2017 19:24
To: fop-dev@xmlgraphics.apache.org
Subject: Custom line breaking algorithm

 

Hi,

 

We are working on an upgrade to fop 2.2 from a very old version.

 

Unfortunately we ran into the issue were text is overflowing in table
columns as in the attachment.

 

In the older version of fop that we used we have the following algorithm:

 

-          If the word is too long to fit on the line, move it to the next
line

-          If the word is too large to fit into the column break the word 

 

We cannot make use of hyphenation because multiple languages are combined in
one pdf and we are not aware of the language.

 

The only way we think we can implement this is to adjust the line breaking
Knuth algorithm in the implementation.

 

Would this be the right approach ? Has any one done this before ? Can
someone provide some guidance on this ? 

 

Many thanks in advance,

 

Kind Regards,

 

Ronny