Hi,

I have tried to get something that works like

new Chunk(String content, Font font, float offsetX)

using a list, containing a single line of text. But if I add the list to a
paragraph and the paragraph to columntext, the output is broken.

try {
                        
  PdfWriter writer = PdfWriter.getInstance(document,
  new FileOutputStream("List_test.pdf"));
      
  document.open();
                        
  PdfContentByte cb = writer.getDirectContent();
                        
  ColumnText ct = new ColumnText(cb);
                        
  ct.setSimpleColumn(50, 50, 800, 800);
                        
  Paragraph p1 = new Paragraph();
                        
  List list = new List(true, 20);
  list.add(new ListItem("First line"));
  list.add(new ListItem("The second"));
  list.add(new ListItem("Third line"));
      
  p1.add(list);
      
  ct.addElement(p1);
                        
  ct.go();
                        
}

Looks like a bug ?




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to