So,
You may want to try the following example. The parser is intended to be called
via the RtfWriter2 object.
==========================================
Document document = new Document();
try {
RtfWriter2 rtfWriter =
RtfWriter2.getInstance(document,new
FileOutputStream("testout.rtf"));
Reader inFile1 = new FileReader("filename);
document.open();
rtfWriter.importRtfDocument(inFile1);
} catch (DocumentException de) {
System.err.println(de.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.getMessage());
}
document.close();
=======================================================
Regards,
Howard
----- Original Message ----
From: Howard Shank <[EMAIL PROTECTED]>
To: Post all your questions about iText here
<[email protected]>
Sent: Wednesday, December 5, 2007 7:51:30 AM
Subject: Re: [iText-questions] [iText] rtf wrong color border
Hi So,
Would it be possible for you to send me the file you are having problems with?
Thanks
Howard
----- Original Message ----
From: so <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, December 5, 2007 4:05:35 AM
Subject: Re: [iText-questions] [iText] rtf wrong color border
Hello Howard,
I'm using now the version 2.0.7 but I still have this problem of border
color. It's normal?
My code :
Reader reader = new FileReader(filename);
RtfDocument document = new RtfDocument();
document.open();
RtfParser parser = new RtfParser();
parser.importRtfDocument(reader, document);
OutputStream outputStream = new FileOutputStream("testout.rtf");
document.writeDocument(outputStream);
outputStream.flush();
outputStream.close();
Regards,
So
Howard Shank wrote:
>
> Hi So,
>
> I have found a couple issues with RTF color parsing for tables, including
> borders and backgrounds. As Mark indicated I am working on some fixes to
> submit and hope to have a first pass submitted to Mark for his review in
> the next week or so.
>
> Howard
>
> ----- Original Message ----
> From: Mark Hall <[EMAIL PROTECTED]>
> To: Post all your questions about iText here
> <[email protected]>
> Cc: so <[EMAIL PROTECTED]>
> Sent: Friday, November 16, 2007 5:43:56 PM
> Subject: Re: [iText-questions] [iText] rtf wrong color border
>
> On Friday 16 November 2007, so wrote:
>> I'm using iTExt to parse a rtf file and replace some tokens but I have a
>> problem with tables.
>> If table border is black, it's appear white and if table border is white,
>> it's appear black. But if the border is in another color, it's appear in
>> the good color.
>> It's a bug of iText ?
> This might be a bug in iText. The RTF parsing functionality does not
> handle
> all colour situations correctly. Howard Shank is working on improving some
> of
> those situations, but I can't give any guarantees on when or how this will
> be
> fixed.
>
> Regards,
> Mark
> --
> Your lucky color has faded.
>
> My GPG public key is available at:
> http://www.room3b.eu/data_box/download?path=%2Fsecurity%2FMarkHall.asc
>
>
>
> ____________________________________________________________________________________
> Be a better pen pal.
> Text or chat with friends inside Yahoo! Mail. See how.
> http://overview.mail.yahoo.com/
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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/
>
>
--
View this message in context:
http://www.nabble.com/-iText--rtf-wrong-color-border-tf4822376.html#a14167721
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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/
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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/
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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/