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 Yang SongXiang <a2...@gmail.com> on 2008/09/25 04:16:37 UTC

[Docbook FOP0.95] Why I can't render Chinese pdf correctly.

I used FOP 0.95. The source XML file is like this:

<book lang="zh-cn">
    <bookinfo>
        <title>中文 Notes</title>
        <author>
            <firstname>Yang</firstname><surname>Songxiang</surname>
         </author>

        <abstract>
            <para>This is a testing how to display Chinese character.</para>
        </abstract>
    </bookinfo>
</book>

My FOP command is like this:

fop.bat -xml china.xml -param use.extensions 0  -xsl
D:\usr\bin\docbook\docbook-xsl-1.74.0\fo\docbook.xsl -pdf china.pdf


But the Chinese character is displayed as "####" in china.pdf. Could
anyone give any help/tips? How to use FOP generate muti-language PDF?

Thanks
-Scord

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


Re: [Docbook FOP0.95] Why I can't render Chinese pdf correctly.

Posted by Andreas Delmelle <an...@telenet.be>.
On Sep 25, 2008, at 04:16, Yang SongXiang wrote:

Hi

> <snip />
> But the Chinese character is displayed as "####" in china.pdf. Could
> anyone give any help/tips? How to use FOP generate muti-language PDF?

The '#'s mean that the used font (probably a Base14 font) does not  
contain glyphs for CJK characters.

If you use FOP 0.95, and have a font available on your system that  
does contain those glyphs, then activating font auto-detection will  
enable you to use that font in your XSL-FO.

see:
http://xmlgraphics.apache.org/fop/faq.html#pdf-characters
http://xmlgraphics.apache.org/fop/0.95/fonts.html#register

and for the configuration usage:
http://xmlgraphics.apache.org/fop/0.95/configuration.html

As a note on the side (since this is the second time you post a  
question to which the answer is in the FAQs): it would really be more  
convenient, not only for us, but definitely also for yourself, if you  
took the time to look around on the website *before* posting  
questions... Saves you the time to wait, and us the time to type and  
copy the links. :-)
See also:
http://xmlgraphics.apache.org/fop/gethelp.html


Cheers

Andreas

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


答复: [Docbook FOP0.95] Why I can't render Chinese pdf correctly.

Posted by 张晓通 <ZH...@pingan.com.cn>.
You should configure Chinese fonts.
For example:

        <fonts>
                <font metrics-file="D:/print/config/simsun.xml" kerning="yes" embed-file="D:/print/config/simsun.ttc">
                        <font-triplet name="宋体" style="normal" weight="normal"/>
                        <font-triplet name="宋体" style="normal" weight="bold"/>
                </font>
        </fonts>

-----邮件原件-----
发件人: Yang SongXiang [mailto:a22301yangsongx@gmail.com]
发送时间: 2008年9月25日 10:17
收件人: fop-users@xmlgraphics.apache.org
主题: [Docbook FOP0.95] Why I can't render Chinese pdf correctly.

I used FOP 0.95. The source XML file is like this:

<book lang="zh-cn">
    <bookinfo>
        <title>中文 Notes</title>
        <author>
            <firstname>Yang</firstname><surname>Songxiang</surname>
         </author>

        <abstract>
            <para>This is a testing how to display Chinese character.</para>
        </abstract>
    </bookinfo>
</book>

My FOP command is like this:

fop.bat -xml china.xml -param use.extensions 0  -xsl
D:\usr\bin\docbook\docbook-xsl-1.74.0\fo\docbook.xsl -pdf china.pdf


But the Chinese character is displayed as "####" in china.pdf. Could
anyone give any help/tips? How to use FOP generate muti-language PDF?

Thanks
-Scord

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





********************************************************************************************************************************
温馨提醒:中国平安保险(集团)股份有限公司电子邮件地址由原来的XXX@paic.com.cn更改为XXX@pingan.com.cn

Warning tips:the Email Address of PING AN INSURANCE (GROUP) COMPANY  changes into XXX@pingan.com.cn 
********************************************************************************************************************************



********************************************************************************************************************************
The information in this email is confidential and may be legally privileged. If you have received this email in error or are
not the intended recipient, please immediately notify the sender and delete this message from your computer. Any use, distribution,
or copying of this email other than by the intended recipient is strictly prohibited. All messages sent to and from us may be 
monitored to ensure compliance with internal policies and to protect our business. 
Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, 
or contain viruses. Anyone who communicates with us by email is taken to accept these risks. 

收发邮件者请注意:
本邮件含保密信息,若误收本邮件,请务必通知发送人并直接删去,不得使用、传播或复制本邮件。
进出邮件均受到本公司合规监控。邮件可能发生被截留、被修改、丢失、被破坏或包含计算机病毒等不安全情况。 
********************************************************************************************************************************