That piece of code I was using with RTF doc. I know it won't convert String
in to HTML and that is exactly my question. How to convert in to HTML?
I tried using HTMLWorker but that won't go by section and chapter.
HTMLWorker just adds/pastes HTML formatted text in top of PDF without
considering respective section and chapter.
HTMLWorker htmlWorker= new HTMLWorker(doc);
section = chapter.addSection(new Paragraph("Objectives\n",
SECTION_TITLE_FONT));
pObj=strReplace(pObj);
htmlWorker.parse(new StringReader(pObj));
section.add(new Paragraph(""));
section = chapter.addSection(new Paragraph("References\n",
SECTION_TITLE_FONT));
pRef=strReplace(pRef);
htmlWorker.parse(new StringReader(pRef));
section.add(new Paragraph(""));
I have other sections too. HTMLWorker just paste pObj and pRef string at top
of PDF, it should add those string in respective sections.
Ankit
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/How-to-display-HTML-content-in-PDF-tp3650004p3651608.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php