Hi All,

Has anyone ever encountered this before?

I am trying to make a List and add this list to a
Cell
within a Table. I then use RTF2Writer to generate
the
RTF document.

<code>

        Table table = new Table(1);
        table.setBorder(Table.NO_BORDER);
        table.setSpaceInsideCell(2.0f);
        table.setWidth(100.0f);
        table.setDefaultCellBorder(Table.NO_BORDER);

        List list = new List(false, 12.0f);
        Chunk bulletChunk = new
Chunk("\\\'01\\u-3929?;", bulletFont);
        bulletChunk.setTextRise(1.5f);
        list.setListSymbol(bulletChunk);

        String[] itemArray = new String[]{
                "one long string one long string one
long string one long string one long string one long
string one long string one long string one long string
one long string one long string one long string ",
                "two long string two long string two
long string two long string two long string two long
string two long string two long string two long string
two long string two long string two long string ",
                "three long string three long string
three long string three long string three long string
three long string three long string three long string
three long string three long string three long string
three long string "};
        for (int i = 0; i < itemArray.length; i++) {
            String item = itemArray[i];
            ListItem li = new ListItem(new Chunk(item,
baseFont));
            li.setExtraParagraphSpace(3.0f);
            list.add(li);
        }

        Cell listCell = new Cell();
        listCell.addElement(list);
        table.addCell(listCell);
        listCell.setBorder(Cell.NO_BORDER);

        doc.add(table);

</code>

The bizzarre thing is I ended up having additional
empty list item. The thing is when I generate the
Document using PdfWriter, this problem does not
occur.

I have narrowed it down of the \listtext entry in
RTF
having \par at the end. But I can't remove the \par
else it would remove all the spacing settings.

If anyone has any pointers, ideas, work around, or
even advise relating to RTF spec, I'd really be
thankful if they can share them with me.

Thanks,

Felix


     
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there
knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 




      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today 
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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