biofly wrote:
> Hi,
> 
> I am new to iText. I am using iText for my pdf creation. I am accessing text
> data from database and using servlet to create the pdf.
> 
> My text data (from database) has html tags, like <em>, <sub> etc. 
> 
> In the following code the 'data' is a String and contains text with tags. 
> 
> Presently these tags are printing as it is, for example with <sub> i </sub>,
> the output is <sub> i </sub> 
> 
> How can I use HtmlWorker in this case?
> 
> ---------------------------------------------------------------------------------------------------
> PdfWriter pw  = PdfWriter.getInstance(document,response.getOutputStream());
> 
> document.open();
> 
> Paragraph p = new Paragraph(data,font);
> 
> document.add(p);
> 
> document.close();
> ----------------------------------------------------------------------------------------------------

Where is HTMLWorker in your example.
Please read chapter 14 of the book "iText in Action",
or browse the examples: http://1t3xt.info/examples/
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to