I was able to get it to process the text using the following code:

HtmlPipelineContext htmlContext = new HtmlPipelineContext(null);
                htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory());
                htmlContext.autoBookmark(false);

                // Pipelines
                ElementList elements = new ElementList();
                ElementHandlerPipeline end = new 
ElementHandlerPipeline(elements,
null);
                HtmlPipeline html = new HtmlPipeline(htmlContext, end);

                // XML Worker
                XMLWorker worker = new XMLWorker(html, true);
                XMLParser p = new XMLParser(worker);
                p.parse(new ByteArrayInputStream( text.getBytes("UTF-8")));

                Paragraph para = new Paragraph();
                para.setFont(font);

                for (Element elem : elements){
                        para.add(elem);
                }

                cell = new PdfPCell( para );
                cell.setBorder(border);

                cell.setColspan(colSpan);

The problem now is that formatting doesn't "stick". Bold text isn't bold,
bullet lists are plain text, etc... Is something obviously wrong?



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/One-table-in-PDF-contains-HTML-and-needs-processed-tp4659966p4659967.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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

Reply via email to