|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
FOP: force wordbreakHi,
I'm having a problem with wordbreaking correctly. The "word" is in this case a link url shown as text. The structure of it is like: <fo:basic-link external-destination"http://www.thisismyveryverylonglink.com/longlink">http://www.thisismyveryverylonglink.com/longlink</fo:basic-link> The link is placed in a table and sometimes it happens, that it doesnt break correctly. In most cases the link breaks after every last "/" in this case the output is ( # marks the tableborder): http://thisismaverylonglink.com/ # longlink But if the last slash is placed under 50% of the tablecellwidth it doesn't break: http://shortprename/longlonglongl#onglonglonglonglongtail Also do links exists like: http://www.xyz.com/ longlonglonglonglonglonglonglonglo#nglonglonglonglonglonglonglonglonglonglongtail I need a solution which breaks the link at the end of the tablecell and goes on next line, i don't need hyphenation rules like after "/" or something. Any ideas for that problem? Greetings JPee |
|
|
AW: force wordbreakHi JPee,
Probably the only thing you can do is insert zero-width spaces. Regards, Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: JPee [mailto:perlet@...] Gesendet: Montag, 5. Oktober 2009 14:01 An: fop-users@... Betreff: FOP: force wordbreak Hi, I'm having a problem with wordbreaking correctly. The "word" is in this case a link url shown as text. The structure of it is like: <fo:basic-link external-destination"http://www.thisismyveryverylonglink.com/longlink">http://www.thisismyveryverylonglink.com/longlink</fo:basic-link> The link is placed in a table and sometimes it happens, that it doesnt break correctly. In most cases the link breaks after every last "/" in this case the output is ( # marks the tableborder): http://thisismaverylonglink.com/ # longlink But if the last slash is placed under 50% of the tablecellwidth it doesn't break: http://shortprename/longlonglongl#onglonglonglonglongtail Also do links exists like: http://www.xyz.com/ longlonglonglonglonglonglonglonglo#nglonglonglonglonglonglonglonglonglonglongtail I need a solution which breaks the link at the end of the tablecell and goes on next line, i don't need hyphenation rules like after "/" or something. Any ideas for that problem? Greetings JPee -- View this message in context: http://www.nabble.com/FOP%3A-force-wordbreak-tp25749499p25749499.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: FOP: force wordbreakThanks for your quick advise,
is there a way to get the position of the character where the line break should be? Greetings JPee |
|
|
AW: FOP: force wordbreakHi JPee,
I guess that depends on where the line break should be. A zws after each / is easy: Replace "/" with "/zws". A zws after every x characters should be possible through application of substring. But I don't know all the XSL string manipulation methods, so there might be smarter solutions. Maybe regex: After x characters which do not contain a zws, insert a zws. Regards, Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: JPee [mailto:perlet@...] Gesendet: Montag, 5. Oktober 2009 15:20 An: fop-users@... Betreff: Re: FOP: force wordbreak Thanks for your quick advise, is there a way to get the position of the character where the line break should be? Greetings JPee -- View this message in context: http://www.nabble.com/FOP%3A-force-wordbreak-tp25749499p25750725.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: AW: FOP: force wordbreakMy current solution is with substring and works fine but is not the best solution for my case, because characters have different lengths. Example:
iiiii eeeee both lines have 5 chars but have different lengths and if a link has 3 lines it looks not that good as possible. What I need is a method which gives the position where to enter the break. Greetings JPee
|
|
|
AW: AW: FOP: force wordbreakHi JPee,
No luck there. The actual character width depends on the font used, which is available for fop, but not at the xslt stage. If you really need a break at any place, put a zws after each character. Regards, Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: JPee [mailto:perlet@...] Gesendet: Montag, 5. Oktober 2009 15:58 An: fop-users@... Betreff: Re: AW: FOP: force wordbreak My current solution is with substring and works fine but is not the best solution for my case, because characters have different lengths. Example: iiiii eeeee both lines have 5 chars but have different lengths and if a link has 3 lines it looks not that good as possible. What I need is a method which gives the position where to enter the break. Greetings JPee Georg Datterl wrote: > > Hi JPee, > > I guess that depends on where the line break should be. A zws after > each / is easy: Replace "/" with "/zws". A zws after every x > characters should be possible through application of substring. But I > don't know all the XSL string manipulation methods, so there might be > smarter solutions. Maybe > regex: After x characters which do not contain a zws, insert a zws. > > Regards, > > Georg Datterl > > ------ Kontakt ------ > > Georg Datterl > > Geneon media solutions gmbh > Gutenstetter Straße 8a > 90449 Nürnberg > > HRB Nürnberg: 17193 > Geschäftsführer: Yong-Harry Steiert > > Tel.: 0911/36 78 88 - 26 > Fax: 0911/36 78 88 - 20 > > www.geneon.de > > Weitere Mitglieder der Willmy MediaGroup: > > IRS Integrated Realization Services GmbH: www.irs-nbg.de > Willmy PrintMedia GmbH: www.willmy.de > Willmy Consult & Content GmbH: www.willmycc.de > -----Ursprüngliche Nachricht----- > Von: JPee [mailto:perlet@...] > Gesendet: Montag, 5. Oktober 2009 15:20 > An: fop-users@... > Betreff: Re: FOP: force wordbreak > > > Thanks for your quick advise, > > is there a way to get the position of the character where the line > break should be? > > Greetings JPee > > -- > View this message in context: > http://www.nabble.com/FOP%3A-force-wordbreak-tp25749499p25750725.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > -- View this message in context: http://www.nabble.com/FOP%3A-force-wordbreak-tp25749499p25751352.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
RE: AW: FOP: force wordbreakHere is a little template for inserting a zero-width space after each character:
<xsl:template name="insert-zero-width-spaces"> <xsl:param name="text" select="."/> <xsl:param name="i" select="1"/> <xsl:choose> <xsl:when test='$i>=string-length($text)'> <xsl:value-of select="$text"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="insert-zero-width-spaces"> <xsl:with-param name="text" select="concat(substring($text,1,$i),'',substring($text,$i+1,string-length($text)-$i))"/> <xsl:with-param name="i" select="$i+2"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> Best Regards, Jonathan S. Levinson Senior Software Developer Object Group InterSystems -----Original Message----- From: Georg Datterl [mailto:georg.datterl@...] Sent: Monday, October 05, 2009 10:03 AM To: fop-users@... Subject: AW: AW: FOP: force wordbreak Hi JPee, No luck there. The actual character width depends on the font used, which is available for fop, but not at the xslt stage. If you really need a break at any place, put a zws after each character. Regards, Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: JPee [mailto:perlet@...] Gesendet: Montag, 5. Oktober 2009 15:58 An: fop-users@... Betreff: Re: AW: FOP: force wordbreak My current solution is with substring and works fine but is not the best solution for my case, because characters have different lengths. Example: iiiii eeeee both lines have 5 chars but have different lengths and if a link has 3 lines it looks not that good as possible. What I need is a method which gives the position where to enter the break. Greetings JPee Georg Datterl wrote: > > Hi JPee, > > I guess that depends on where the line break should be. A zws after > each / is easy: Replace "/" with "/zws". A zws after every x > characters should be possible through application of substring. But I > don't know all the XSL string manipulation methods, so there might be > smarter solutions. Maybe > regex: After x characters which do not contain a zws, insert a zws. > > Regards, > > Georg Datterl > > ------ Kontakt ------ > > Georg Datterl > > Geneon media solutions gmbh > Gutenstetter Straße 8a > 90449 Nürnberg > > HRB Nürnberg: 17193 > Geschäftsführer: Yong-Harry Steiert > > Tel.: 0911/36 78 88 - 26 > Fax: 0911/36 78 88 - 20 > > www.geneon.de > > Weitere Mitglieder der Willmy MediaGroup: > > IRS Integrated Realization Services GmbH: www.irs-nbg.de > Willmy PrintMedia GmbH: www.willmy.de > Willmy Consult & Content GmbH: www.willmycc.de > -----Ursprüngliche Nachricht----- > Von: JPee [mailto:perlet@...] > Gesendet: Montag, 5. Oktober 2009 15:20 > An: fop-users@... > Betreff: Re: FOP: force wordbreak > > > Thanks for your quick advise, > > is there a way to get the position of the character where the line > break should be? > > Greetings JPee > > -- > View this message in context: > http://www.nabble.com/FOP%3A-force-wordbreak-tp25749499p25750725.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > -- View this message in context: http://www.nabble.com/FOP%3A-force-wordbreak-tp25749499p25751352.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: force wordbreakOn 05.10.2009 14:22, Georg Datterl wrote:
> Probably the only thing you can do is insert zero-width spaces. Hmm, I've pondered crafting hyphenation patterns for URLs for some time. Q: Where should breaks in an URL occur? Only after '/' and '&'? This may leave URLs with large fragment Ids unbroken, which are unfortunately quite common. Once the patterns are there, <fo:block language="url" hyphenation-character="&zws;">... should work nicely. OTOH, hyphenation properties are block level only, which will have the side effect of not hyphenating natural language around the URL ... J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
AW: force wordbreakHi J,
I just wondered. If FOP doesn't find a break possibility, the text is printed outside of the area. In table cells, the text is printed into the next cell. Does anybody need this? Wouldn't it be better to break anyway if the outer areas ipd is reached? And if I WANT to write into the next cell, I could always use keep-together.within-line="always"... Regards, Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: J.Pietschmann [mailto:j3322ptm@...] Gesendet: Montag, 5. Oktober 2009 23:12 An: fop-users@... Betreff: Re: force wordbreak On 05.10.2009 14:22, Georg Datterl wrote: > Probably the only thing you can do is insert zero-width spaces. Hmm, I've pondered crafting hyphenation patterns for URLs for some time. Q: Where should breaks in an URL occur? Only after '/' and '&'? This may leave URLs with large fragment Ids unbroken, which are unfortunately quite common. Once the patterns are there, <fo:block language="url" hyphenation-character="&zws;">... should work nicely. OTOH, hyphenation properties are block level only, which will have the side effect of not hyphenating natural language around the URL ... J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: AW: force wordbreakGeorg Datterl wrote:
> Hi J, Hi Georg, > > I just wondered. If FOP doesn't find a break possibility, the text is printed outside of the area. In table cells, the text is printed into the next cell. Does anybody need this? Wouldn't it be better to break anyway if the outer areas ipd is reached? And if I WANT to write into the next cell, I could always use keep-together.within-line="always"... or wrap-option="no-wrap" I think the reason this is not done as you suggest is because the specification mandates the current behaviour. However, I concur with you. It would be more beneficial if the behaviour was user friendly and either wrapped or not the text based on the wrap-option property. Thanks, Chris > > Regards, > > Georg Datterl > > ------ Kontakt ------ > > Georg Datterl > > Geneon media solutions gmbh > Gutenstetter Straße 8a > 90449 Nürnberg > > HRB Nürnberg: 17193 > Geschäftsführer: Yong-Harry Steiert > > Tel.: 0911/36 78 88 - 26 > Fax: 0911/36 78 88 - 20 > > www.geneon.de > > Weitere Mitglieder der Willmy MediaGroup: > > IRS Integrated Realization Services GmbH: www.irs-nbg.de > Willmy PrintMedia GmbH: www.willmy.de > Willmy Consult & Content GmbH: www.willmycc.de > -----Ursprüngliche Nachricht----- > Von: J.Pietschmann [mailto:j3322ptm@...] > Gesendet: Montag, 5. Oktober 2009 23:12 > An: fop-users@... > Betreff: Re: force wordbreak > > On 05.10.2009 14:22, Georg Datterl wrote: >> Probably the only thing you can do is insert zero-width spaces. > > Hmm, I've pondered crafting hyphenation patterns for URLs for some time. > Q: Where should breaks in an URL occur? Only after '/' and '&'? > This may leave URLs with large fragment Ids unbroken, which are unfortunately quite common. > > Once the patterns are there, > <fo:block language="url" hyphenation-character="&zws;">... > should work nicely. OTOH, hyphenation properties are block level only, which will have the side effect of not hyphenating natural language around the URL ... > > J.Pietschmann > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
AW: AW: force wordbreakHi Chris,
I was afraid the specification was to blame. One could implement an extension, put it on flow, maybe even page-sequence and make it inheritable. So it would not break existing code. That would be quite easy. Only I don't know how much work the changes in the actual line-breaking algorithmus would be. Mit freundlichen Grüßen Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: Chris Bowditch [mailto:bowditch_chris@...] Gesendet: Dienstag, 6. Oktober 2009 11:39 An: fop-users@... Betreff: Re: AW: force wordbreak Georg Datterl wrote: > Hi J, Hi Georg, > > I just wondered. If FOP doesn't find a break possibility, the text is printed outside of the area. In table cells, the text is printed into the next cell. Does anybody need this? Wouldn't it be better to break anyway if the outer areas ipd is reached? And if I WANT to write into the next cell, I could always use keep-together.within-line="always"... or wrap-option="no-wrap" I think the reason this is not done as you suggest is because the specification mandates the current behaviour. However, I concur with you. It would be more beneficial if the behaviour was user friendly and either wrapped or not the text based on the wrap-option property. Thanks, Chris > > Regards, > > Georg Datterl > > ------ Kontakt ------ > > Georg Datterl > > Geneon media solutions gmbh > Gutenstetter Straße 8a > 90449 Nürnberg > > HRB Nürnberg: 17193 > Geschäftsführer: Yong-Harry Steiert > > Tel.: 0911/36 78 88 - 26 > Fax: 0911/36 78 88 - 20 > > www.geneon.de > > Weitere Mitglieder der Willmy MediaGroup: > > IRS Integrated Realization Services GmbH: www.irs-nbg.de > Willmy PrintMedia GmbH: www.willmy.de > Willmy Consult & Content GmbH: www.willmycc.de > -----Ursprüngliche Nachricht----- > Von: J.Pietschmann [mailto:j3322ptm@...] > Gesendet: Montag, 5. Oktober 2009 23:12 > An: fop-users@... > Betreff: Re: force wordbreak > > On 05.10.2009 14:22, Georg Datterl wrote: >> Probably the only thing you can do is insert zero-width spaces. > > Hmm, I've pondered crafting hyphenation patterns for URLs for some time. > Q: Where should breaks in an URL occur? Only after '/' and '&'? > This may leave URLs with large fragment Ids unbroken, which are unfortunately quite common. > > Once the patterns are there, > <fo:block language="url" hyphenation-character="&zws;">... > should work nicely. OTOH, hyphenation properties are block level only, which will have the side effect of not hyphenating natural language around the URL ... > > J.Pietschmann > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: force wordbreakHi,
Georg Datterl wrote: > Hi Chris, > > I was afraid the specification was to blame. One could implement an extension, put it on flow, maybe even page-sequence and make it inheritable. So it would not break existing code. That would be quite easy. Only I don't know how much work the changes in the actual line-breaking algorithmus would be. See following bug report for a discussion of the issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=43474 As a summary: I don’t think anything should be done in FOP. This issue is better handled upstream (usually by inserting zero-width spaces “at the right places”, which sometimes can be properly done only by a human being). If the URL doesn’t fit in a table cell, then don’t put it in a table. Or increase the width of the table cell accordingly. URL quickly become unreadable when they are broken anyway. Vincent > Mit freundlichen Grüßen > > Georg Datterl > > ------ Kontakt ------ > > Georg Datterl > > Geneon media solutions gmbh > Gutenstetter Straße 8a > 90449 Nürnberg > > HRB Nürnberg: 17193 > Geschäftsführer: Yong-Harry Steiert > > Tel.: 0911/36 78 88 - 26 > Fax: 0911/36 78 88 - 20 > > www.geneon.de > > Weitere Mitglieder der Willmy MediaGroup: > > IRS Integrated Realization Services GmbH: www.irs-nbg.de > Willmy PrintMedia GmbH: www.willmy.de > Willmy Consult & Content GmbH: www.willmycc.de > -----Ursprüngliche Nachricht----- > Von: Chris Bowditch [mailto:bowditch_chris@...] > Gesendet: Dienstag, 6. Oktober 2009 11:39 > An: fop-users@... > Betreff: Re: AW: force wordbreak > > Georg Datterl wrote: >> Hi J, > > Hi Georg, > >> >> I just wondered. If FOP doesn't find a break possibility, the text is printed outside of the area. In table cells, the text is printed into the next cell. Does anybody need this? Wouldn't it be better to break anyway if the outer areas ipd is reached? And if I WANT to write into the next cell, I could always use keep-together.within-line="always"... > > or wrap-option="no-wrap" > > I think the reason this is not done as you suggest is because the specification mandates the current behaviour. However, I concur with you. It would be more beneficial if the behaviour was user friendly and either wrapped or not the text based on the wrap-option property. > > Thanks, > > Chris > >> Regards, >> >> Georg Datterl >> >> ------ Kontakt ------ >> >> Georg Datterl >> >> Geneon media solutions gmbh >> Gutenstetter Straße 8a >> 90449 Nürnberg >> >> HRB Nürnberg: 17193 >> Geschäftsführer: Yong-Harry Steiert >> >> Tel.: 0911/36 78 88 - 26 >> Fax: 0911/36 78 88 - 20 >> >> www.geneon.de >> >> Weitere Mitglieder der Willmy MediaGroup: >> >> IRS Integrated Realization Services GmbH: www.irs-nbg.de >> Willmy PrintMedia GmbH: www.willmy.de >> Willmy Consult & Content GmbH: www.willmycc.de >> -----Ursprüngliche Nachricht----- >> Von: J.Pietschmann [mailto:j3322ptm@...] >> Gesendet: Montag, 5. Oktober 2009 23:12 >> An: fop-users@... >> Betreff: Re: force wordbreak >> >> On 05.10.2009 14:22, Georg Datterl wrote: >>> Probably the only thing you can do is insert zero-width spaces. >> Hmm, I've pondered crafting hyphenation patterns for URLs for some time. >> Q: Where should breaks in an URL occur? Only after '/' and '&'? >> This may leave URLs with large fragment Ids unbroken, which are unfortunately quite common. >> >> Once the patterns are there, >> <fo:block language="url" hyphenation-character="&zws;">... >> should work nicely. OTOH, hyphenation properties are block level only, which will have the side effect of not hyphenating natural language around the URL ... >> >> J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
AW: force wordbreakHi Vincent,
I just read the bug report discussion. Most points I either agree with you or don't know enough to disagree (the relevance of 'script', for example). So, FOP is essentially correct and shouldn't change its default behaviour. Only an extension could help. > > More seriously, you could take it the other way around, and find users who > > wouldn't be happy at all to see FOP suddenly break their texts at arbitrary > > places, and would rather be warned when such situations are occuring, so that > > they can re-work their contents. From my experience, an overflow warning by itself hardly helps. During development I get PAGES of overflow warnings. 99% of them are, while not nice, ignoreable. I can't test every possible data combination. So sometimes the user might get an overflow. The debug output is not transfered to the user, only the finished PDF is. And here (for me) it's far easier to notice an additional line with only one letter than a full line with the last letter overwriting the first letter of the next cell. Yes, an upstream solution would be better, but we are talking about cases, where the only upstream solution would be a zws between each two characters. I don't know if anybody analyzed the content-to-markup-ratio of fo-files before, but I have fo-files of 220MB, let's assume 10% is real text, so I'd insert 20 million zws and actually need maybe two of them. Regards, Georg Datterl ------ Kontakt ------ Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH: www.irs-nbg.de Willmy PrintMedia GmbH: www.willmy.de Willmy Consult & Content GmbH: www.willmycc.de -----Ursprüngliche Nachricht----- Von: Vincent Hennebert [mailto:vhennebert@...] Gesendet: Dienstag, 6. Oktober 2009 12:27 An: fop-users@... Betreff: Re: force wordbreak Hi, Georg Datterl wrote: > Hi Chris, > > I was afraid the specification was to blame. One could implement an extension, put it on flow, maybe even page-sequence and make it inheritable. So it would not break existing code. That would be quite easy. Only I don't know how much work the changes in the actual line-breaking algorithmus would be. See following bug report for a discussion of the issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=43474 As a summary: I don't think anything should be done in FOP. This issue is better handled upstream (usually by inserting zero-width spaces "at the right places", which sometimes can be properly done only by a human being). If the URL doesn't fit in a table cell, then don't put it in a table. Or increase the width of the table cell accordingly. URL quickly become unreadable when they are broken anyway. Vincent > Mit freundlichen Grüßen > > Georg Datterl > > ------ Kontakt ------ > > Georg Datterl > > Geneon media solutions gmbh > Gutenstetter Straße 8a > 90449 Nürnberg > > HRB Nürnberg: 17193 > Geschäftsführer: Yong-Harry Steiert > > Tel.: 0911/36 78 88 - 26 > Fax: 0911/36 78 88 - 20 > > www.geneon.de > > Weitere Mitglieder der Willmy MediaGroup: > > IRS Integrated Realization Services GmbH: www.irs-nbg.de > Willmy PrintMedia GmbH: www.willmy.de > Willmy Consult & Content GmbH: www.willmycc.de > -----Ursprüngliche Nachricht----- > Von: Chris Bowditch [mailto:bowditch_chris@...] > Gesendet: Dienstag, 6. Oktober 2009 11:39 > An: fop-users@... > Betreff: Re: AW: force wordbreak > > Georg Datterl wrote: >> Hi J, > > Hi Georg, > >> >> I just wondered. If FOP doesn't find a break possibility, the text is printed outside of the area. In table cells, the text is printed into the next cell. Does anybody need this? Wouldn't it be better to break anyway if the outer areas ipd is reached? And if I WANT to write into the next cell, I could always use keep-together.within-line="always"... > > or wrap-option="no-wrap" > > I think the reason this is not done as you suggest is because the specification mandates the current behaviour. However, I concur with you. It would be more beneficial if the behaviour was user friendly and either wrapped or not the text based on the wrap-option property. > > Thanks, > > Chris > >> Regards, >> >> Georg Datterl >> >> ------ Kontakt ------ >> >> Georg Datterl >> >> Geneon media solutions gmbh >> Gutenstetter Straße 8a >> 90449 Nürnberg >> >> HRB Nürnberg: 17193 >> Geschäftsführer: Yong-Harry Steiert >> >> Tel.: 0911/36 78 88 - 26 >> Fax: 0911/36 78 88 - 20 >> >> www.geneon.de >> >> Weitere Mitglieder der Willmy MediaGroup: >> >> IRS Integrated Realization Services GmbH: www.irs-nbg.de >> Willmy PrintMedia GmbH: www.willmy.de >> Willmy Consult & Content GmbH: www.willmycc.de >> -----Ursprüngliche Nachricht----- >> Von: J.Pietschmann [mailto:j3322ptm@...] >> Gesendet: Montag, 5. Oktober 2009 23:12 >> An: fop-users@... >> Betreff: Re: force wordbreak >> >> On 05.10.2009 14:22, Georg Datterl wrote: >>> Probably the only thing you can do is insert zero-width spaces. >> Hmm, I've pondered crafting hyphenation patterns for URLs for some time. >> Q: Where should breaks in an URL occur? Only after '/' and '&'? >> This may leave URLs with large fragment Ids unbroken, which are unfortunately quite common. >> >> Once the patterns are there, >> <fo:block language="url" hyphenation-character="&zws;">... >> should work nicely. OTOH, hyphenation properties are block level only, which will have the side effect of not hyphenating natural language around the URL ... >> >> J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |