Images within table?

Images within table?

Forum member · Nov 21, 2006
Hi, looking through the examples, I don't see any way to add images into a PageElements.Table's Cell element. I know how to add a standalone image to the page, and how to create a table with text in its cells, but I don't see an example of adding images to cells. Can this be done? Thx, Chad

Re: Images within table?

Forum member · Nov 21, 2006
I get it. Thanks.

Re: Images within table?

Forum member · Jan 3, 2007
But i don't The New Image contains X and Y position, but that is absolute to the page, not the cell i have a table, with 4 cells in each row, i want a picture in cell 1 and 3, how do i do that?

Re: Images within table?

Support · Jan 3, 2007
Hello, When adding an image to the Cell of a table it will take the X, and Y coordinates corresponding to the cell but not to the page. Following is the sample code which adds image to the 1st and 3rd cells of each row. C# Code: Document doc = new Document(); Table table = new Table(100,100,400,500); table.Columns.Add(100); table.Columns.Add(100); table.Columns.Add(100); table.Columns.Add(100); Image img = new Image(@"D:\Images\logo.tif",0,0,0.2F); for(int i=0;i<2;i++) { Row row = table.Rows.Add(); row.Cells.Add(img); row.Cells.Add("Cell 2"); row.Cells.Add(img); row.Cells.Add("Cell 4"); } Page page = new Page(); page.Elements.Add(table); doc.Pages.Add( page ); doc.DrawToWeb(); Thanks, ceTe Software Support Team.