The font must be registered in FontFactory and that font and encoding must be selected in the xml.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of saxenashyam > Sent: Thursday, March 02, 2006 12:04 PM > To: [email protected] > Subject: [iText-questions] Parsing of polish character > > Hi > > I am using ITEXT1.3.6 to convert xml to pdf. > Its working fine except Polish character . > for these I using following step : > > Step 1) Setting xml file encoding to "ISO-8859-2" > step 2) get the file as org.xml.sax.InputSource > > InputStreamReader reader = new InputStreamReader(new > FileInputStream(new File("contract.xml")),"ISO-8859-2"); > InputSource inputSource = new InputSource(reader); > inputSource.setEncoding("ISO-8859-2"); > > Step 3) Creating my own custumtaghandler & setting the > basefont in its constructor > CustomTagHandler cth = new CustomTagHandler(document, > writer, getCustomMap()); > > BaseFont bf = > BaseFont.createFont("c://windows/fonts/ARIAL.TTF", > "ISO-8859-2",BaseFont.NOT_EMBEDDED); > setBaseFont(bf); > > step 4) create SAXParser and parse the input stream > > SAXParser parser = > SAXParserFactory.newInstance().newSAXParser(); > parser.parse(inputSource, cth); > > But in the pdf spcial character are not display correctly > > Can any body what is wrong with these code > > Shyam > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking > scripting language > that extends applications into web and mobile media. Attend > the live webcast > and join the prime developer group breaking into this new > coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720& > dat=121642 > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
