Daniel wrote: > Hello again, > Fair enough that there is no Cyrillic characters in the normal fonts. But I > am sure I am not alone in wanting to generate pdfs with Cyrillic > characters. So what is a good approach to doing so? Any suggestions?
Look for (or buy) a font that has the Cyrillic characters. Jar it with your application. Get an instance of Font from the FontFactory or create a Font object with a BaseFont object. > I am not very keen on distributing fonts for legal reasons. Aha, if your application runs on a server, make sure you are allowed to create PDFs with that font. If you are writing an end user application, make sure your customer have (or buy) the font. > My whole > application is localized to Russian and shows Cyrillic characters without > any problem. So the question is, could I ask Swing/AWT for the font and use > that font? Or is there a better way to get around this? Fonts in Swing and fonts in PDF are dealt with in a completely different way. If you are displaying the text in a Swing component, there are two ways to make some kind of 'screenshot' in PDF. 1) you map the Swing font to a font file, this doesn't solve your problem as you still need the font file. 2) you let Swing draw the glyphs to the PDF. This is not a path you want to go unless there's really no alternative: PDFs created this way are much larger in file size, they are not searchable,... I wouldn't recommend this. So in short: all the other people that need Cyrillic in their PDF document use a TTF, OTF, or other file that has the glyphs because that's the best solution. br, Bruno ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/