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 file
3. 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? Thanks
Steve
 


John Mok <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to