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 Louisa M <la...@web.de> on 2011/08/02 17:36:40 UTC
Problem with wordwrapping in a PDF with japanese language
Hi All, and sorry for my english,
I generate PDF with XML, XSLT and Apache-FOP. The text-content for this PDF,
is making by users in a interface. But I have a problem with users from
Japan. When they write text, they are using apparently no blanks between
the words. So the line are not wrapped and crashes my PDF layout.
Can I solve this problem with the XSLT stylesheet?
Thank you very much in advance.
Louisa
--
View this message in context: http://old.nabble.com/Problem-with-wordwrapping-in-a-PDF-with-japanese-language-tp32178905p32178905.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: Problem with wordwrapping in a PDF with japanese language
Posted by Louisa M <la...@web.de>.
I found a very easy solution for my problem.
I write this attribute in the <fo:block.. statement: hyphenate="true"
<fo:block font-family="MSMincho" font-size="10pt" font-weight="normal"
hyphenate="true">
--
View this message in context: http://old.nabble.com/Problem-with-wordwrapping-in-a-PDF-with-japanese-language-tp32178905p32270295.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: Problem with wordwrapping in a PDF with japanese language
Posted by Louisa M <la...@web.de>.
I found a very easy solution for my problem.
I write this attribute in the <fo:block.. statement: hyphenate="true"
<fo:block font-family="MSMincho" font-size="10pt" font-weight="normal"
hyphenate="true">
--
View this message in context: http://old.nabble.com/Problem-with-wordwrapping-in-a-PDF-with-japanese-language-tp32178905p32270296.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: Problem with wordwrapping in a PDF with japanese language
Posted by Louisa M <la...@web.de>.
thank you very much for your suggestion,
now I have a good start to learn and try out in the right direction
Louisa
--
View this message in context: http://old.nabble.com/Problem-with-wordwrapping-in-a-PDF-with-japanese-language-tp32178905p32192687.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: Problem with wordwrapping in a PDF with japanese language
Posted by Pascal Sancho <pa...@takoma.fr>.
Louis,
you can add the ZWSP at XSLT stage, before and/or after each Japanese glyph.
You can do that in a pure XSLT recursive loop, or using an embedded
script (technology will depend on what XSLT engine you use).
Le 03/08/2011 11:54, Louisa M a écrit :
>
> thanks Pascal,
>
> but how I insert this ZWSP char () in the text.
> Do I have to count the japanaese characters of one line and then I insert
> the ZWSP char ()? Or is there a function, who insert the ZWSP char
> automatically after every character?
>
> Greetings
> Louisa
--
Pascal
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem with wordwrapping in a PDF with japanese language
Posted by Louisa M <la...@web.de>.
thanks Pascal,
but how I insert this ZWSP char () in the text.
Do I have to count the japanaese characters of one line and then I insert
the ZWSP char ()? Or is there a function, who insert the ZWSP char
automatically after every character?
Greetings
Louisa
--
View this message in context: http://old.nabble.com/Problem-with-wordwrapping-in-a-PDF-with-japanese-language-tp32178905p32184851.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: Problem with wordwrapping in a PDF with japanese language
Posted by Pascal Sancho <pa...@takoma.fr>.
Hi Louisa,
You need to insert ZWSP char (​) where you expect a line break.
This will add a break opportunity in your text line.
Le 02/08/2011 17:36, Louisa M a écrit :
>
> Hi All, and sorry for my english,
>
> I generate PDF with XML, XSLT and Apache-FOP. The text-content for this PDF,
> is making by users in a interface. But I have a problem with users from
> Japan. When they write text, they are using apparently no blanks between
> the words. So the line are not wrapped and crashes my PDF layout.
>
> Can I solve this problem with the XSLT stylesheet?
>
> Thank you very much in advance.
>
> Louisa
--
Pascal
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org