You are missing the semi-colon. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of sunil rajput > Sent: Friday, August 19, 2005 10:21 AM > To: [email protected] > Subject: [iText-questions] HTML Special Character Code not > working with HTMLWorker !!!! > > hi, > > i have written simple code using the HTML , where i m using > the HTML Special Character ' which is " ' " (Single Quote > ) character. > > but it is not converting that HTML Code to its Symbol. > > do i need to do any other settings for that. > > it is urgent > > Regds > > Sunil Rajput > > > import java.io.FileOutputStream; > import com.lowagie.text.Document; > import com.lowagie.text.PageSize; > import com.lowagie.text.pdf.PdfWriter; > import com.lowagie.text.html.HtmlParser; > > import com.lowagie.text.*; > import com.lowagie.text.pdf.*; > import com.lowagie.text.html.simpleparser.*; > > import java.util.*; > import java.io.*; > > public class Test { > > public static void main(String[] args) { > > Test test = new Test(); > try { > test.createUsingString(); > > }catch (Exception e){ > } > } > > public void createUsingString() { > try { > StringBuffer sBuff = new StringBuffer("<HTML>"); > sBuff.append("<head></head>"); > sBuff.append("<body>"); > sBuff.append("<table>"); > sBuff.append("<tr><td>>This is HTML Code For Special > Symbol ' ---> '</td></tr>"); > sBuff.append("</table>"); > sBuff.append("</body>"); > sBuff.append("</html>"); > StringReader stringReader = new StringReader(sBuff.toString()); > Document document = new Document(PageSize.LEGAL,36,36,36,36); > OutputStream output = new > FileOutputStream("d:/itext/TestString1.pdf"); > > PdfWriter writer = PdfWriter.getInstance(document, output); > document.open(); > HTMLWorker worker = new HTMLWorker(document); > worker.parse(stringReader); > document.close(); > > }catch (Exception ex){ > System.out.println( "Exception " + ex.toString()); > } > } > } > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >
------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
