Free Support Forum -

Incorrect Cell borders with Colspan and wide tables


I’ve noticed that cell borders are being incorrectly displayed with some breaks and whitespaces when we are using colspans and wide tables. This occurs with both the TableBroken.Vertical and TableBroken.VerticalInSamePage properties.

In the reproducer, the first row has 2 cells that span 20 cells each. I made the cell backgrounds a different color so that they are more distinct. As you can see, the table is incorrectly rendering some white cell borders in the sections that do not contain the cell text. Also, I would expect the the left cell border of “Header cell 1” to be at the beginning of the first cell of the red background and the right cell border to be at the end of the last cell with the red background. Otherwise, you wouldn’t be able to tell that it is a continuous cell. If it wasn’t for the different background colors, you cannot tell that the colspan represents a single cell.

Here is the reproducer:

var doc = new Document();
            var page = doc.Pages.Add();
            page.PageInfo.Width = PageSize.PageLetter.Width;
            page.PageInfo.Height = PageSize.PageLetter.Height;
            page.PageInfo.Margin = new MarginInfo(27, 47, 27, 27);

            //Instantiate a table object
            var mytable = new Aspose.Pdf.Table();
            //mytable.Broken = TableBroken.Vertical;
            mytable.Broken = TableBroken.VerticalInSamePage;
            mytable.DefaultCellBorder = new BorderInfo(BorderSide.All, Color.Black);
            mytable.DefaultCellPadding = new MarginInfo(5, 1, 5, 1);

            var headerRow = mytable.Rows.Add();
            var firstspan = headerRow.Cells.Add(“Header cell 1”);
            firstspan.BackgroundColor =  Color.Red;
            firstspan.ColSpan = 20;
            var secondspan = headerRow.Cells.Add(“Header cell 2”);
            secondspan.ColSpan = 20;
            secondspan.BackgroundColor = Color.LightBlue;

            var dataRow = mytable.Rows.Add();
            for (var i = 1; i <= 40; ++i)
                var cell = dataRow.Cells.Add($“Testing text {i}”);
                cell.BackgroundColor = Color.FromRgb(ColorTranslator.FromHtml(@"#F0F0F0"));

            var dataRow2 = mytable.Rows.Add();
            for (var i = 1; i <= 40; ++i)
                var cell = dataRow2.Cells.Add($“Testing text {i}”);
                cell.BackgroundColor = Color.White;


Hi Daniel,

Thanks for using our API’s.

I have tested the scenario and have managed to reproduce same problem. For the sake of correction, I have logged it as PDFNET-41625 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

What is the status of this bug fix?

When can we expect this to be released?

Hi Daniel,

Thank you for the inquiry. The linked ticket ID PDFNET-41625 is pending for the analysis and not resolved yet. We have asked our product team to take a look at your issue shortly. We shall let you know once an update is available from them.

Is there any update on this?

When can we expect this to be released?


I regret to inform that issue is still unresolved and we have increased issue priority. We will share good news with you soon.

Hi @Adnan.Ahmad,

I see the status of the ticket PDFNET-41625 as closed.
Is it possible to get the updated version of Aspose.PDF to test this at our end?



I have verified the issues status from our issue tracking system and like to share that the concerned issue have been marked as resolved in upcoming Aspose.PDF for .NET 20.2. We will share the good news with you as soon as the product will be rolled online.

The issues you have found earlier (filed as PDFNET-41625) have been fixed in Aspose.PDF for .NET 20.2.