Thanks Bruno, you made my day. I have asked our administration to order a copy of your book, there are definitely some details I would like to learn more about.
Lasse -----Oprindelig meddelelse----- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Bruno Lowagie Sendt: 15. maj 2007 12:40 Til: Post all your questions about iText here Emne: Re: [iText-questions] Adding a List to a table cell renders as asingle line Lars-Bo Jacobsen wrote: > Bruno, thanks for answering. > > I am using PdfPTable, sorry for being imprecise in the text. My mistake, I was busy doing something else and I pasted your lines into the wrong sample. > I also find your suggestion logical, it was my first approach. Your > suggestion would be: PdfPTable table = new PdfPTable(1); List list = new List(List.ORDERED, 20); list.add("item1"); list.add("item2"); list.add("item3"); list.add("item4"); table.addCell("Next cell should contains a nice list"); PdfPCell cell = new PdfPCell(); cell.addElement(list); table.addCell(cell); document.add(table); > Btw, I assume you intended to write > testTable.AddCell(list3); and not testTable.AddCell(cell); No, I intended to say that you should create a PdfPCell object, and then add the list to that cell. The way you do it, the cell is using 'text mode' (all content is considered to be flat text). Using addElement causes the cell to work in 'composite mode' (the properties of the components added to the cell are respected). The difference between text mode and composite mode is explained on pages 167-168 and 205-206 of 'iText in Action'. br, Bruno ------------------------------------------------------------------------- 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/ ------------------------------------------------------------------------- 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/
