Hi, I am having problems to print simple text with HtmlWriter. For some reason that I don't understand, bold and italic styles are not working. Here's my code:

Document doc = new Document();
HtmlWriter.getInstance(doc, new FileOutputStream("x.html"));
doc.open();
Font fnt = FontFactory.getFont(FontFactory.HELVETICA, 12, Font.BOLDITALIC);
Phrase text = new Phrase("A SIMPLE PHRASE", fnt);
doc.add(text);
doc.close();


The generated HTML file is not including the <B> and <I> tags necessary to apply the desired styles to the text. If I run the same code replacing Phrase with Chunk, the font familiy is also ignored (the generated HTML code is missing the <FONT> tag). Finally, the same code executed with PdfWriter instead of HtmlWriter works perfectly. Am I missing something specifically required for HtmlWriter? Bold / Italic styles are not supported for HTML? Thanks for your help!!

_________________________________________________________________
Charla con tus amigos en l�nea mediante MSN Messenger: http://messenger.microsoft.com/es




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to