Tim,

There are a couple of known issues with this and probably a bunch of unknown 
issues.

Some of them are currently being looked at, but I'm not sure if any of the 
upcoming changes will address your issue.

Howard Shank


----- Original Message ----
From: Tim Donovan <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, June 13, 2008 7:11:28 AM
Subject: [iText-questions] HtmlParser to RTF - formatting ignored

Hi List,

I am using RtfWriter2 and HtmlParser to convert a basic
HTML document to RTF. My code is simple and is as follows:

    public static void convert (InputStream in, OutputStream out) throws 
IOException 
    {
        Document doc = new Document();
        RtfWriter2.getInstance(doc, out);
        HtmlParser hp = new HtmlParser();
        hp.go(doc, in);
    }

The majority of formatting seems to be ignored however. Any <style> tags in the 
<head> of the document are just placed in plain text at the top of the RTF 
document. Inline CSS is ignored. External stylesheets are ignored. This is not 
such a big problem with plain text but when my HTML document contains tables, 
the resulting table in the RTF is improperly aligned. 

Please could somebody help me with this, as I would like a properly formatted 
RTF document. I have included some screenshots that show the HTML before 
conversion and the resulting RTF document.

Best wishes,

Tim Donovan



      
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to