Daniel Cane wrote:
On to a new challenge -- I'd like to have lists as part of one of the
columnTexts, but have learned that that's unsupported (and I even think I
understand why).

People who have been following this list for a long time,
know that I can react very frustrated at times.
Newbies often don't understand why I react that way.

This is a nice opportunity to explain the origin of this frustration.
You have learned that lists are unsupported in ColumnText.

Where have you learned this?
Who is spreading this kind of desinformation?
Why are you saying this.

In attachment, you can find a very simple example that proves
the opposite of what you've learned.

And more importantly: what is wrong with the documentation???

What is wrong with the second edition of the book that still causes misconceptions like this? There are still a couple of months left to find a remedy before the book goes to print.
--
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

Attachment: column_list.pdf
Description: Adobe PDF document

import java.io.FileOutputStream;
import java.io.IOException;

import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.List;
import com.itextpdf.text.pdf.ColumnText;
import com.itextpdf.text.pdf.PdfWriter;


public class ColumnList {

    public static void main(String[] args) throws IOException, 
DocumentException {

        Document document = new Document();
        // step 2
        PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream("column_list.pdf"));
        // step 3
        document.open();
        // step 4
        ColumnText ct = new ColumnText(writer.getDirectContent());
        List list = new List(List.ORDERED);
        list.add("item 1");
        list.add("item 2");
        list.add("item 3");
        ct.addElement(list);
        ct.setSimpleColumn(36, 36, 559, 806);
        ct.go();
        // step 5
        document.close();
    }
}
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to