I have already several changes made to HTMWorker and one of them was replacing StreamReader with TextReader. You can still use the current version with:
String s = "Hello <b>here</b>"; StreamReader r = new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(s)), Encoding.UTF8); > -----Original Message----- > From: Mark Farrugia [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 06, 2005 12:25 PM > To: Paulo Soares > Subject: Re: [itextsharp-questions] HTML in itextsharp > > Hi, > Thanks for all the immediate replies. > > The main problem I have is this. I have a string that is > formatted in HTML. The parsettolist contains two parameters > (StreamReader and stylesheet). The problem is that I cannot > pass a string as a StreamReader and that is what I need. I do > not want to create an HTML file before passing it as a > parameter. I want to pass only the HTML formatted string and > the parsettolist can return the output. For now I cannot pass > the string since a string is not a StreamReader object. I > also cannot make use of a StringReader because a StringReader > is also not a StreamReader object. Is there any solution for > what I am saying? > > Thanks > Mark > > > > > On 10/5/05, Paulo Soares <[EMAIL PROTECTED]> wrote: > > ArrayList list = HTMLWorker.ParseToList(sReader, style); > PdfPCell cell = new PdfPCell(); > foreach (IElement e in list) > cell.AddElement(e); > > > > ----- Original Message ----- > From: "Mark Farrugia" <[EMAIL PROTECTED]> > To: "Paulo Soares" < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > Sent: Wednesday, October 05, 2005 11:13 AM > Subject: Re: [itextsharp-questions] HTML in itextsharp > > > Can you give me a code snippet how do it please. I am > reading from a > database field and I am using .net > Thanks > > On 10/5/05, Paulo Soares <[EMAIL PROTECTED]> wrote: > > > > HTMLWorker.ParseToList() may work. > > > > ----- Original Message ----- > > From: "Mark Farrugia" < [EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, October 04, 2005 2:08 PM > > Subject: [itextsharp-questions] HTML in itextsharp > > > > > > Hi, > > I have an application where I am letting users to > enter RTF in a web page. > > I > > am using a control that will then save its contents > to the database using > > HTML tags. > > How can I use these HTML tags to retain the same > formarring for the > > information inputted in a PDFPCELL? > > Thanks > > > > > > > > > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
