Are you saying that MingLiU.ttf on Windows XP will not work? That's what I'm using currently. I'm don't care about cut and paste in the PDF, I just want the correct chinese characters to display in the document. I think I'm embedding everything OK but something is happening to my resource bundle data when converting to a PDF.
The funny thing is that displaying the data in a webpage works but not in a pdf. Rich >>> Richard, You need to find some pfm/pfb fonts to render your characters into PDF using FOP. Like the ttf and ttc fonts you will need to create a metrics file from the pfm font file and then point the font to the pdf file in your userconfig.xml. (code below) It is possible that you might have to *buy* the fonts if you cannot get them locally or on the web. I just figured this out myself, getting the fonts to embed not just the glyphs but the encoding as well so you can cut and paste from the PDF document. You will notice how the <font> points the embed-file to the PFB file not the PFM file. Unlike the ttf and ttc files, the file converted to xml is different than the file you point your embed-file to in the userconfig.xml. This had me really stumped for a while. Mike F. ===FONT:=== PFM file: p052024l.pfm PFB file: p052024l.pdb ===Create XML file:=== C:\fop>java -cp build\fop.jar;lib\avalon-framework-cvs-20020806.jar;lib\xml-apis.jar;lib \xercesImpl-2.2.1.jar;lib\xalan-2.4.1.jar org.apache.fop.fonts.apps.PFMReader p052024l.pfm p052024l.xml ==Add to userconfig.xml== <font metrics-file="p052024l.xml" kerning="yes" embed-file="p052024l.pfb"> <font-triplet name="Special" style="normal" weight="normal"/> <font-triplet name="Special" style="normal" weight="bold"/> <font-triplet name="Special" style="italic" weight="normal"/> <font-triplet name="Special" style="italic" weight="bold"/> </font> ===Change Font-Family value:=== <fo:root font-family="Special"> ===Add -c conf\userconfig.xml to Command line: C:\fop>fop -c conf\userconfig.xml -fo fo-file.fo -pdf pdf-file.pdf --- Richard Bolen <[EMAIL PROTECTED]> wrote: > I've got a java resource bundle for Traditional Chinese (Taiwan) that > is encoded as Big5. Some of the strings defined in the resource end > up in > a PDF document that is created using FOP. The same strings are > also > displayed via a webbrowser as html. The issue is that the strings > display properly in the browser using the Traditional Chinese > (Big5) > encoding but display as garbage in the PDF. > > I've tried embedding about 10 different chinese fonts in the PDF but > nothing has worked. Does anyone know where I could get a good Big5 > Traditional Chinese font? (or why the characters would display as > garbage?) > > I'm using UTF-8 as my encoding for my XSL files. I've seen some posts > referring to using Big5 as the encoding and 'passing' that to the > fo > renderer. How is that done? > > Thanks, > Rich > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com --------------------------------------------------------------------- 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]
