Yes you can create a list in a table cell.
See the following code snipped:
PdfPTable tbl=new PdfPTable(1); //Main table
Phrase pText;
Map listOut; //A map containing all the text I want to show in the
ordered list. Has been populated elsewhere.
//Ordered List
com.lowagie.text.List lText = new com.lowagie.text.List(
com.lowagie.text.List.ORDERED,20);
//Iterate over the map to get the text I want to show
for (Iterator outter = listOut.entrySet().iterator();
outter.hasNext();)
{
Map.Entry listTextOut = (Map.Entry) outter.next();
//Create a Phrase of the text
pText=new Phrase(listTextOut.getValue().toString(),_myFont);
//Create list item of the phrase and add it to the ordered List
ListItem listItemOut=new ListItem(pText);
lText.add(listItemOut);
}
//After iteration create table cell and add the ordered list to it.
PdfPCell cell=new PdfPCell();
cell.setBorder(PdfPCell.NO_BORDER);
cell.addElement(lText);
//Add cell to table and write to document
tbl.addCell(cell);
tbl.writeSelectedRows(0,-1,x,y,cb);
2008/1/15, [EMAIL PROTECTED] <
[EMAIL PROTECTED]>:
>
>
> Is it possible to generate an ordered list in a pdf table cell using itext
> (java)?
>
>
>
>
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> 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/
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
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/