I'm having trouble getting non-alpha-numeric characters to show up in my PDF. My application is picking up certain Web pages and outputting them to PDF with iText. I've got a method (code below) that converts all the numbered entity tags, like "—", to their ASCII equivalent. Debugging shows that these get into the String object, but when they print out, they show as blanks in the PDF. Am I missing something or can anybody shed some light on what's up with this?
I'm outputting to Georgia TrueType font, but it seems like the em-dash, en-dash and other similar ASCII characters should be in that font. Dave Code: protected String replaceHtmlEntities(String cleanText) { char[] ch = new char[1]; for (int x = 0; x <= 255; x++) { ch[0] = (char) x; String replace = new String(ch); cleanText = cleanText.replaceAll("&#(" + x + ");", replace); } return cleanText; } ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions