Hi
I use iText to convert html input file to rtf output file. My code is pretty
simple
Document document = new Document();
RtfWriter2.getInstance(document, new FileOutputStream("Test.rtf"));
HtmlParser hp = new HtmlParser();
hp.go(document, "Test.html");
When I use text only in the html, the output is generated. Though the
paragraphs are jumbled and the fonts are different.
When I use simple table in the html, I get
ExceptionConverter: java.lang.ClassCastException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:223)
at com.lowagie.text.html.HtmlParser.go(HtmlParser.java:115)
at HtmlToRtf.main(HtmlToRtf.java:30)
When I use image in the html, I get
ExceptionConverter: java.util.EmptyStackException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:223)
at com.lowagie.text.html.HtmlParser.go(HtmlParser.java:115)
at HtmlToRtf.main(HtmlToRtf.java:30)
Please let me know what needs to be done
Thanks in advance
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/