On Friday 22 April 2005 10:21, [EMAIL PROTECTED] wrote:
> Bingo, that seems to have done the trick:-)
Unfortunately this seems to mean that there is some bug either in your code or 
your code is doing something that the iText code can't understand. I've 
attached the code I used to generate the example I sent you. Perhaps you 
could send me the runnable example you are using, so that I can find where 
the bug is?

Greetings,
Mark
-- 
You mean you didn't *know* she was off making lots of little phone companies?

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc
import java.io.*;
import com.lowagie.text.*;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.rtf.RtfWriter2;

public class RtfTest2 {
        public static void main(String[] args) {
                try {
                        Document doc = new Document();
                        RtfWriter2 writer2 = RtfWriter2.getInstance(doc, new FileOutputStream("test2.rtf"));
                        PdfWriter.getInstance(doc, new FileOutputStream("test2.pdf"));
                        
                        doc.open();
                        
                        Paragraph par = new Paragraph("First paragraph");
                        doc.add(par);
                        
                        par = new Paragraph("Second paragraph. It is really really really really really and then a bit more really really long so that we probably have at least one line break although two would be really nice.");
                        par.setSpacingBefore(10);
                        par.setSpacingAfter(10);
                        par.setLeading(20);
                        doc.add(par);
                        
                        par = new Paragraph("Third paragraph");
                        doc.add(par);
                        
			Table t = new Table(2);
			t.setBorder(Table.NO_BORDER);
			Cell c = new Cell("Test");
			c.setBorder(Cell.NO_BORDER);
			t.addCell(c);
			c = new Cell("Test");
			c.setBorder(Cell.NO_BORDER);
			t.addCell(c);
			doc.add(t);

                        doc.close();
                } catch(Exception e) {
                        e.printStackTrace();
                }
        }
}

Attachment: pgpVkgytfVr8o.pgp
Description: PGP signature

Reply via email to