This () is not a Chinese character, it's a control character (see http://en.wikipedia.org/wiki/Shift_Out ). It's either a wrong input file, which means that the file should be checked so that no control characters are present, or the file is read using the wrong encoding.

With FOP 0.95 you don't need to generate metrics files anymore, just use the font file directly.

After I removed the metrics file, I stopped getting  related error. It might be possible that the control character got introduced while creating metrics file.

I'm now able to generate the PDF file but it does not display Chinese characters. Instead, its showing sequence of # characters wherever chinese characters are expected. This seems to be occurring because PDF is not able to find the supported fonts to display these characters.

In my xsl file, I have set font-family attribute to "uming" wherever I want to display chinese characters but the font is not being picked up. I have also tried to install it to my System Library (Macintosh HD -> Library -> Fonts) but all in vain.

Can you please guide me the steps to display Chinese characters properly using uming.ttf file (custom font file to display Simplified Chinese Characters). Where should I place this font file or what configuration changes I should do so that font file is correctly picked up.

Thanks & Regards,
Charanpreet Arora
Apple POS Team

On Apr 6, 2010, at 12:50 AM, Sergiu Dumitriu wrote:

On 04/05/2010 08:30 PM, Charanpreet Arora wrote:
Dear All,

I'm getting the following error while trying to generate the PDF file
containing Simplified Chinese Characters (from uming.ttf):

*java.lang.RuntimeException: Character reference "" is an invalid
XML character.*

This () is not a Chinese character, it's a control character (see http://en.wikipedia.org/wiki/Shift_Out ). It's either a wrong input file, which means that the file should be checked so that no control characters are present, or the file is read using the wrong encoding.

Please note that I have generated the metrics file (uming.xml) for the same and configured it through fopConfiguration.xml before running xslt
through FOP.

With FOP 0.95 you don't need to generate metrics files anymore, just use the font file directly.

Can you please guide me if I'm doing anything wrong or I'll be able to
generate Chinese file at all using FOP 0.95?

Yes, FOP works very well with Chinese text.

--
Sergiu Dumitriu
http://purl.org/net/sergiu/

---------------------------------------------------------------------
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]

Reply via email to