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 joni santoso <st...@plasa.com> on 2003/04/04 05:57:00 UTC

Producing Chinese documents

I want to test whether fop can product chinese docs.

I have some questions:
1. Should I type using the Chinese characters inside the 
fo files? or just using the codes for the Chinese chars?
2. Should I provide the fonts when trying to produce the 
docs? Are they provided by fop?

Any examples for this?

Regards,
===========================================================================================
Malas antri buat mendapatkan print-out tagihan telepon ? Klik aja http://billinfo2.plasa.com
Gratis Perpanjangan dan Pendaftaran Nama Domain http://idc.plasa.com khusus di bulan Maret !
===========================================================================================

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


Re: Producing Chinese documents

Posted by John Mok <jm...@attglobal.net>.
Attached is a sample XSL-FO file containing Chinese characters. You may 
view it by the given sample program FopServlet, e.g. the 
simpleTableFO.fo was saved in /var/tmp :

http://TestServer:8080/Project1/servlet/FopServlet?fo=/var/tmp/simpleTableFO.fo

> 
> I have a software for writing chinese. So, if I mix the fo files with fo 
> tags and chinese chars, is it ok? or I should change it using other 
> tools to the unicode and then paste them?
> 

As long as you could produce a proper formatter XSL-FO in unicode.

> 
> I have many chinese fonts but they are in winword. is it ok? if not, how 
> to install them?

Copy the font file from Microsoft Windows, Control Panel -> Fonts, e.g. 
mingliu.ttc. Then, build the font matrix file :-

java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;
          lib\xercesImpl.jar;lib\xalan.jar
            org.apache.fop.fonts.apps.TTFReader -ttcname "MingLiU"
              mingliu.ttc mingliu.xml

Finally, register the font matrix file according the instructions at :-

http://xml.apache.org/fop/fonts.html

Thank you,  John Mok

> 
> Can give me a fo file containing chinese chars? I am just curious :).
> =========================================================================================== 
> 
> Malas antri buat mendapatkan print-out tagihan telepon ? Klik aja 
> http://billinfo2.plasa.com
> Gratis Perpanjangan dan Pendaftaran Nama Domain http://idc.plasa.com 
> khusus di bulan Maret !
> =========================================================================================== 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 


Re: Producing Chinese documents

Posted by joni santoso <st...@plasa.com>.
On Fri, 04 Apr 2003 12:25:40 +0800
  John Mok <jm...@attglobal.net> wrote:
>
>I am a Chinese and tried to produce simple Chinese PDF 
>from FOP. The answers to your questions follows :-

Me too :).

>
>1. You may do them both, but I think it's more difficult 
>to type in Chinese and save the doc. in Unicode. I did it 
>the other way, read the data from database and convert 
>them into bytes of Unicode, and then transform using FOP.

I have a software for writing chinese. So, if I mix the fo 
files with fo tags and chinese chars, is it ok? or I 
should change it using other tools to the unicode and then 
paste them?

>2. You need Chinese-enabled fonts, "MingLiU" is a good 
>choice. You need to generate a font matrix file using the 
>utility org.apache.fop.fonts.apps.TTFReader from a 
>Windows font, e.g. mingliu.ttf, following the 
>instructions at :-

I have many chinese fonts but they are in winword. is it 
ok? if not, how to install them?

Can give me a fo file containing chinese chars? I am just 
curious :).
===========================================================================================
Malas antri buat mendapatkan print-out tagihan telepon ? Klik aja http://billinfo2.plasa.com
Gratis Perpanjangan dan Pendaftaran Nama Domain http://idc.plasa.com khusus di bulan Maret !
===========================================================================================

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


Re: Producing Chinese documents

Posted by Steve Guo <co...@yahoo.com>.
Hi, I found something puzzling when converting fo to Chinese pdf files using FOP.1. I am using English version of Win2000, downloaded the chinese font from www.unionway.com (font file uwpstj.ttf) 2. Used org.apache.fop.fonts.apps.TTFReader to generate font metrics - in the generated xml file (uwpstj.xml), <font-name>UWPSTJ(GB), R e g u l a r</font-name>. The same name is used in the userconfig.xml file3. The same font-family is designated in the xsl file (so in fo file too)4. WHen using FOP to convert to pdf, it generated error: "failed to read font metrics file, invalid xml character (unicode 0x0) was found in the element content of the document"5. So in the font metrics file uwpstj.xml, I changed the font name to UWPSTJ, while leaving font names the same in other files including xsl.6. Now using FOP to produce pdf file, NO Problems.7. Why no problem when the font name do not match in (font metrics, userconfig.xml, and xls, and fo). Any suggestions? ThanksSteve 

John Mok <jm...@attglobal.net> wrote:
I am a Chinese and tried to produce simple Chinese PDF from FOP. The 
answers to your questions follows :-

1. You may do them both, but I think it's more difficult to type in 
Chinese and save the doc. in Unicode. I did it the other way, read the 
data from database and convert them into bytes of Unicode, and then 
transform using FOP.
2. You need Chinese-enabled fonts, "MingLiU" is a good choice. You need 
to generate a font matrix file using the utility 
org.apache.fop.fonts.apps.TTFReader from a Windows font, e.g. 
mingliu.ttf, following the instructions at :-

http://xml.apache.org/fop/fonts.html

Regards, John Mok


joni santoso wrote:
> I want to test whether fop can product chinese docs.
> 
> I have some questions:
> 1. Should I type using the Chinese characters inside the fo files? or 
> just using the codes for the Chinese chars?
> 2. Should I provide the fonts when trying to produce the docs? Are they 
> provided by fop?
> 
> Any examples for this?
> 
> Regards,
> =========================================================================================== 
> 
> Malas antri buat mendapatkan print-out tagihan telepon ? Klik aja 
> http://billinfo2.plasa.com
> Gratis Perpanjangan dan Pendaftaran Nama Domain http://idc.plasa.com 
> khusus di bulan Maret !
> =========================================================================================== 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 



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



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

Re: Producing Chinese documents

Posted by John Mok <jm...@attglobal.net>.
I am a Chinese and tried to produce simple Chinese PDF from FOP. The 
answers to your questions follows :-

1. You may do them both, but I think it's more difficult to type in 
Chinese and save the doc. in Unicode. I did it the other way, read the 
data from database and convert them into bytes of Unicode, and then 
transform using FOP.
2. You need Chinese-enabled fonts, "MingLiU" is a good choice. You need 
to generate a font matrix file using the utility 
org.apache.fop.fonts.apps.TTFReader from a Windows font, e.g. 
mingliu.ttf, following the instructions at :-

http://xml.apache.org/fop/fonts.html

Regards,   John Mok


joni santoso wrote:
> I want to test whether fop can product chinese docs.
> 
> I have some questions:
> 1. Should I type using the Chinese characters inside the fo files? or 
> just using the codes for the Chinese chars?
> 2. Should I provide the fonts when trying to produce the docs? Are they 
> provided by fop?
> 
> Any examples for this?
> 
> Regards,
> =========================================================================================== 
> 
> Malas antri buat mendapatkan print-out tagihan telepon ? Klik aja 
> http://billinfo2.plasa.com
> Gratis Perpanjangan dan Pendaftaran Nama Domain http://idc.plasa.com 
> khusus di bulan Maret !
> =========================================================================================== 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 



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