Antonio Manuel Muñiz wrote: > Hello. > > I am having problems with spanish characters, in concrete with ñ and > accent characters. My code is this: > > Document document = new Document(); > try { > PdfWriter.getInstance(document, > new FileOutputStream("target/HelloWorld.pdf")); > document.open(); > document.add(new Paragraph("España")); > } catch (DocumentException de) { > System.err.println(de.getMessage()); > } catch (IOException ioe) { > System.err.println(ioe.getMessage()); > } > document.close(); > > The result in pdf is: Espa(extrange symbol)a. > I "Ñ" supported by iText?
Yes it is, but you are experiencing one of the following problems: 1. either the character isn't present in the font you are using. In this case you should try using another font. BUT: if the character isn't printed, you wouldn't see a strange character; you'd see an empty space. 2. or your source code uses one encoding, whereas your compiler uses another. I think it's most likely that this is your problem: please change the encoding used by your compiler or replace ñ by \u00f1 (the unicode value of ñ). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php