HI I think i have asked this before also ,, but not recieved any response..
As Itext does not support direct conversion of HTML to PDf.... my question is related to this.. I have a STRING sForm="<ol><li>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</li><li> s</li><li>s</li><li>s</li></ol><p> </p>" and this string is of format given below on JSP page.... 1. This is some sample text. You are using FCKeditor. 2. s 3. s 4. s When i generate PDF using code below PDF gets generated but the above string is being pasted a it is... but my requirement is to SHow as it is like above format....... as it was on jsp page.... Can anyone help me or suggest the solution.... I understand Paragraph is just taking the content and show that cntent on PDF... is there any method in Itext which reads string of Html elements and present it on PDF as it was on JSP..... Your reply will be appreciated... thanks regards amit chawla my code is below Document document = new Document(); ByteArrayOutputStream baosPDF = new ByteArrayOutputStream(); PdfWriter docwriter = PdfWriter.getInstance(document, baosPDF); String sForm = request.getParameter("FCKeditor1"); document.open(); // Here is where the documen i am adding paragraph to the document..... adn passing the above string.... document.add(new Paragraph(sForm)); document.close(); response.setContentType("application/pdf"); response.setHeader("Content-Length", "inline; filename=" + baosPDF); response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0"); response.setHeader("Pragma", "public"); byte test[] = baosPDF.toByteArray(); response.setContentLength(test.length); ServletOutputStream sos; sos = response.getOutputStream(); baosPDF.writeTo(sos); sos.flush(); Disclaimer: 'This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.' ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
