Try font-size: 12px Paulo
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Lil Lily > Sent: Monday, December 17, 2007 7:15 AM > To: [email protected] > Subject: [iText-questions] <span> in iText > > hi all, > > is <span style="..."> supported by iText ? > > i am using HTMLWorker and my html contains <span > style="...">, my problem is the code inside that tag is not > being displayed (eg. underlined text, highlighted text, > indented list). > > below is my code snippets: > > String userHTML = "<p><u><b><span style=\"font-size: > medium\"><span style=\"font-family: Arial\">2008 > 聖誕聚餐</span></span></b></u></p>"; > > FontFactory.registerDirectories(); > StyleSheet st = new StyleSheet(); > st.loadTagStyle("body", "face", "Arial Unicode MS"); > st.loadTagStyle("body", "encoding", BaseFont.IDENTITY_H); > st.loadTagStyle("body", "leading", "12,0"); > > StringReader reader = new StringReader(userHTML); > PdfWriter writer = PdfWriter.getInstance(document, > new FileOutputStream(fileName)); > document.open(); > > ArrayList p = HTMLWorker.parseToList(reader, st); > for (int k = 0; k < p.size(); ++k) { > Element e = (Element)p.get(k); > document.add(e); > } > > document.close(); > > > Thank you. Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
