Hi,

line-breaks should work with just the \n. The RtfWriter2 doesn't know what to 
do with a \r, so Word then displays the ?. Just remove them and it shouldn't 
be a problem.

Mark

On Wednesday 27 February 2008, Me Simple wrote:
> HI,
>
> I recently upgraded from iText 1.3 to iText 2.0.8 version. I am generating
> a RTF document with tables. However, I get a '?' characted for every '\r'
> character encounterd in the input string. The same code used to work for
> iText 1.3 version.
>
> Attaching the generated RTF and the code. Kindly help.
>
> Thanks in advance,
> SP
>
> Code Segment:
>
> Document doc = new Document();
> RtfWriter2 writer2 = RtfWriter2.getInstance(doc,
>                 new FileOutputStream("D:/TestFolder/rtf/RTFTest" +
> System.currentTimeMillis() + ".doc"));
>
> doc.open();
>
> doc.add(new Paragraph("Test String 1\n \r Test String 1 continued", new
> Font(Font.HELVETICA, 11, Font.BOLD)));
> doc.add(new Paragraph("Test String 2 \n Test String 2 continued", new
> Font(Font.HELVETICA, 11, Font.BOLD)));
> doc.add(new Paragraph("Test String 3 \n \r Test String 3 continued", new
> Font(Font.HELVETICA, 11, Font.BOLD)));
> http://www.nabble.com/file/p15721506/RTFTest1204141734549.doc
> RTFTest1204141734549.doc



-- 
He that breaks a thing to find out what it is has left the path of wisdom.
                -- J.R.R. Tolkien

My GPG public key is available at:
http://www.room3b.eu/data_box/download?path=%2Fsecurity%2FMarkHall.asc

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
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/

Reply via email to