I am always getting issue with aspose tables if it have rowspan immediate to colspan in the table.
It have always cells are misplaced/ wrongly arranged.
Below is my sample table mark up and my code.
Markup :
Column1 and column2 merge With Colspan1
Column3 With Rowspan1
Column1 for row 2
Column2 for row 2
code :
Aspose.Pdf.Table table = new Aspose.Pdf.Table();
//Set with column widths of the table
table.ColumnWidths = "150 150 150";
table.Border = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 2F, Aspose.Pdf.Color.Blue);
Row row1 = table.Rows.Add();
Cell cell1 = row1.Cells.Add("Column1 With Colspan1");
cell1.ColSpan = 2;
cell1.Border = new BorderInfo(Aspose.Pdf.BorderSide.All, 1.0f, Aspose.Pdf.Color.Red);
cell1.IsWordWrapped = true;
Cell cell2 = row1.Cells.Add("Column2 With Rowspan1");
cell2.RowSpan = 2;
cell2.Border = new BorderInfo(Aspose.Pdf.BorderSide.All, 1.0f, Aspose.Pdf.Color.Green);
cell2.IsWordWrapped = true;
Row row2 = table.Rows.Add();
Cell r2c1 = row2.Cells.Add("Column1 for row 2");
r2c1.Border = new BorderInfo(Aspose.Pdf.BorderSide.All, 1.0f, Aspose.Pdf.Color.Black);
r2c1.IsWordWrapped = true;
Cell r2c2 = row2.Cells.Add("Column2 for row 2");
r2c2.Border = new BorderInfo(Aspose.Pdf.BorderSide.All, 1.0f, Aspose.Pdf.Color.Yellow);
r2c2.IsWordWrapped = true;
pdfPage.Paragraphs.Add(table);</code></pre><pre style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; word-wrap: normal; color: rgb(34, 34, 34); background-color: rgb(238, 238, 238);"><br></pre>