Hi Pualo, Thanks for your help. I managed to trace the problem with the provided source code and was able to get it working. I found a possible problem in PdfObject wherein the class variable ENCODING is hardcoded to be iso88591, I changed this to System.getProperties().getProperty("fild.encoding"). Secondly, the problem with HKSCS characters is actually caused by Java, because some HKSCS characters have two BIG5 values, and java only provides mapping to one. e.g. under file.encoding="MS950". It is possible to translate an HKSCS from MS950 to Unicode but not from Unicode to MS950, I had to perform getBytes("BIG5-HKSCS") first then recreate String with MS950 as encoding to get it working. And the worse thing is that when using "BIG5-HKSCS" as default file.encoding, character data gets corrupted when retrieved from Oracle, so I can't use BIG5-HKSCS as my default fild.encoding. I'm posting this out so that other users might benifit in case they encounter the same problem later. Again, thanks a lot for your help.
Regards, Zhen ---------- Original Message ---------------------------------- From: Paulo Soares <[EMAIL PROTECTED]> Date: Tue, 4 Jun 2002 11:37:03 +0100 >You have three options: > >- If your pdf is to be read with Acrobat 5 with the Adobe CJK font pack then >all that is required is to tweak the font supplement from Adobe-CNS1-0 to >Adobe-CNS1-3. I'll have this in the next release, it will still work in >Acrobat 4.0 but without the new characters, of course. > >- your font contains the characters from Unicode block \uff00 (Halfwidth and >Fullwidth Forms). See >http://www.lowagie.com/iText/faq.html#preformattedtext. > >- Otherwise it's just a matter of programming although I must say that a >font that doesn't include \u0020-\u007e characters is really weird. The >sequence is as follows: > >1 - create two fonts, the HK and TIMES for example. >2 - read the text from the database >3 - divide the text in chunks each one using a font depending on the >character range. >4 - assemble the chunks into a phrase and use the phrase. > >Best Regards, >Paulo Soares > >> -----Original Message----- >> From: Zhen Cua [SMTP:[EMAIL PROTECTED]] >> Sent: Tuesday, June 04, 2002 7:48 >> To: [EMAIL PROTECTED] >> Subject: [iText-questions] unicode 3.1/hkscs support >> >> Hello all, >> >> I am reposting this question from the forum. >> The current CJKFont does not seem to include support for HKSCS (HongKong >> Supplementary character set) characters, and hence I am forced to embed a >> TTF. Unfortunately, the TTF does not contain support for other characters >> such as latin1 and basic punctuations, I've tried using MS Arial Unicode >> but it contains only chracters until unicode 2.0, I am generating the pdf >> based on the contents of the database, so it is almost impossible to >> pre-determine the font to be used. Is there a solution to this problem? >> will it be possible to modify something in the code to allow it to specify >> two or more fonts in a call to new Chunk() or new Phrase() such that it >> will automatically search the character in font2 if it is no in font1? >> >> Thanks in advance, >> Zhen >> >> _______________________________________________________________ >> >> Don't miss the 2002 Sprint PCS Application Developer's Conference >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> _______________________________________________ >> iText-questions mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/itext-questions > >_______________________________________________________________ > >Don't miss the 2002 Sprint PCS Application Developer's Conference >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > >_______________________________________________ >iText-questions mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/itext-questions > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions