Howard,

Thanks for your code, I've test it and in order to add 
"ctrlWord = "\\brdrcf" +
this.importHeader.mapColorNr(ctrlWord.substring(11));"
I add 
"ctrlWord = "\\brdrcf" +
this.importHeader.mapColorNr(ctrlWord.substring(7));"
and it's work fine.

Best regards,
So


Howard Shank wrote:
> 
> Hi So,
> 
> As the old parser has been replaced with the new one, I am going to paste
> the fix for your color problem here and also update the new parser with a
> fix.
> 
> In [EMAIL PROTECTED] around line 240 you should
> find the following code.
> 
> 240             } else if (RtfColorTableParser.stringMatches(ctrlWord,
> "\\trcfpat")) {
> 241                 ctrlWord = "\\trcfpat" +
> this.importHeader.mapColorNr(ctrlWord.substring(11));
> 242             } else if (RtfColorTableParser.stringMatches(ctrlWord,
> "\\trcbpat")) {
> 243                 ctrlWord = "\\trcbpat" +
> this.importHeader.mapColorNr(ctrlWord.substring(11));
> 244             }
> 245    this.rtfDoc.add(new RtfDirectContent(ctrlWord));
> 
> on line 244 insert the following code
> 244*             } else if (RtfColorTableParser.stringMatches(ctrlWord,
> \\brdrcf)) {
> 245*                        ctrlWord = \\brdrcf +
> this.importHeader.mapColorNr(ctrlWord.substring(11));
> 246*             }
> 247    this.rtfDoc.add(new RtfDirectContent(ctrlWord));
> 
> The result should look like
> 
>              } else if (RtfColorTableParser.stringMatches(ctrlWord,
> "\\trcfpat")) {
>                  ctrlWord = "\\trcfpat" +
> this.importHeader.mapColorNr(ctrlWord.substring(11));
>              } else if (RtfColorTableParser.stringMatches(ctrlWord,
> "\\trcbpat")) {
>                  ctrlWord = "\\trcbpat" +
> this.importHeader.mapColorNr(ctrlWord.substring(11));
>              } else if (RtfColorTableParser.stringMatches(ctrlWord,
> \\brdrcf)) {
>                   ctrlWord = \\brdrcf +
> this.importHeader.mapColorNr(ctrlWord.substring(11));
>              }
>     this.rtfDoc.add(new RtfDirectContent(ctrlWord));
> 
> 
> Regards,
> Howard
> 
> 
>      
> ____________________________________________________________________________________
> 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/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-iText--rtf-wrong-color-border-tf4822376.html#a14176646
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/

Reply via email to