xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Wrapping long character strings
Date Sun, 10 Sep 2006 15:45:50 GMT
overflow won't help here. wrap-option only controls whether to wrap or
not, not how to wrap. XSL-FO uses "country", "language" and "script" to
indirectly specify how line-breaking should be done. "script" is not
supported and "country/language" are currently only used to select the
right hyphenation pattern file. It's currently not possible to better
control how line breaking is done.

The only possible thing is to try to write a hyphenation pattern file
which will allow you to better specify additional word-breaking points.
I've never done that myself, but there should be some documentation on
the web (the patterns are originally from TeX) and I think some ideas
have been thrown around on this mailing list before. So searching the
archives might help. At any rate, there's no easy way.

On 10.09.2006 16:56:46 Wyatt Tellis wrote:
> The asterisks are only one example. What about other character strings? 
> Unfortunately I have no control over what data is put in the report, but 
> I have to make sure that all characters are presented to the reader. I 
> can implement the (&#x200B;) workaround, but would prefer a FO only 
> solution. Is there some value of either the overflow or wrap-option 
> attributes that might help with this situation? I'm trying to emulate 
> the behavior of apps such as MS Word or Notepad that do the line 
> wrapping automatically (I really don't want hyphenation because these 
> are not true English words).
> -Wyatt
> Jeremias Maerki wrote:
> > I'd have to look up whether according to UAX#14/TR14 we would be allowed
> > to break between two "*" characters in the first place. Not that FOP
> > already implements the full rule set, yet! At any rate, I'd try to
> > insert a zero-width space (&#x200B;) after each "*" character to allow
> > for breaks in between. Maybe that helps.
> > 
> > On 09.09.2006 04:43:02 Wyatt Tellis wrote:
> >> I'm building a medical report printing application and I'm having 
> >> trouble forcing long characters strings (not really words) to wrap. FOP 
> >> gives the error: "Line 1 of a paragraph overflows the available area. 
> >> (fo:block..."  For example I may have a series of 80 '*' characters. I 
> >> would like to have that string wrap to 2 lines instead of  continuing 
> >> over the edge of the page.  Per the wiki 
> >> (http://wiki.apache.org/xmlgraphics-fop/Troubleshooting/CommonLogMessages),

> >> I've tried using the wrap-option and overflow attributes to get the 
> >> strings to wrap with no luck. Hyphenation doesn't work either. I'm using 
> >> 0.92.beta. Is there a way to get this to work in FOP?

Jeremias Maerki

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

View raw message