|
Hi all,
I got the sources from CVS yesterday (as anonymous ) ... I wrote some code to test the conversion from html to rtf.
Below I put the code and source of html.
I made somewhere a logic mistake or the problem is else where?
Any help is well & warm come J
All the best !!!
For next code :
try { String source = "source.html"; String destination = "destination.rtf";
Document RTFdocument = new Document();
RtfWriter.getInstance(RTFdocument, new FileOutputStream(destination));
HtmlParser.parse( RTFdocument, source, new HtmlTagMap());
} catch(Exception e) { e.printStackTrace(); System.err.println(e.getMessage()); }
I got the next error:
ExceptionConverter: java.util.EmptyStackException at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at javax.xml.parsers.SAXParser.parse(SAXParser.java:223) at com.lowagie.text.xml.XmlParser.go(XmlParser.java:179) at com.lowagie.text.xml.XmlParser.parse(XmlParser.java:240) at Chap0706.main(Chap0706.java:84) java.util.EmptyStackException Process terminated with exit code 0
source.html ----------- <html> <head> <title>test Home Page</title> </head>
<body bgcolor="#FFFFFF">
SAMPLE </body> </html> ==================== |
