AsposePdf .Net 20.5 Using Dash border with cell in table

Hello,

I have a problem with using of Dash property in a cell in a table.

Below my sample code:

Private Sub TestTableWithCellDashSide()
    Dim pdf = New Document()
    Dim page = pdf.Pages.Add()

    'Table definition
    Dim table1 = New Table
    table1.ColumnWidths = "150 100 100"
    table1.DefaultCellBorder = New BorderInfo(BorderSide.Box, 0.1)
    table1.Border = New BorderInfo(BorderSide.Box, 3)
    Dim margin = New MarginInfo()
    margin.Top = 3
    margin.Left = 3
    margin.Right = 3
    margin.Bottom = 3
    table1.DefaultCellPadding = margin
    page.Paragraphs.Add(table1)

    'add 1 row with 3 standards cells
    Dim row = AddRow(table1)
    row.Cells.Add("cell (1,1)")
    row.Cells.Add("cell (1,2)")
    row.Cells.Add("cell (1,3)")

    'add 2nd row with 3 cells ; 1st cell add solid vertical right (graphinfo)
    row = AddRow(table1)
    Dim cell = row.Cells.Add("cell (2,1) // With solid vertical")
    VerticalCell(cell, Nothing, Aspose.Pdf.Color.FromArgb(192, 0, 0))
    row.Cells.Add("cell (2,2)")
    row.Cells.Add("cell (2,3)")

    'add 3th row with 3 cells ; 1st cell add DASH vertical right (graphinfo)
    row = AddRow(table1)
    Dim newCell = row.Cells.Add("cell (3,1) // With DASH vertical")
    VerticalCell(newCell, {0, 3, 0}, Aspose.Pdf.Color.FromArgb(0, 160, 0))
    row.Cells.Add("cell (3,2)")
    row.Cells.Add("cell (3,3)")

    'add 4th row with 3 cells ; 1st cell add solid vertical right (graphinfo)
    row = AddRow(table1)
    cell = row.Cells.Add("cell (4,1) // With solid vertical")
    VerticalCell(cell, Nothing, Aspose.Pdf.Color.FromArgb(192, 0, 0))
    row.Cells.Add("cell (4,2)")
    row.Cells.Add("cell (4,3)")

    'add 5th row with 3 standards cells
    row = AddRow(table1)
    row.Cells.Add("cell (5,1)")
    row.Cells.Add("cell (5,2)")
    row.Cells.Add("cell (5,3)")


    pdf.Save($"C:\temp\testAposePdfDashTable.pdf")
    Process.Start($"C:\temp\testAposePdfDashTable.pdf")
End Sub

Private Sub VerticalCell(cell As Cell, dash As Integer(), couleur As Aspose.Pdf.Color)
    Dim gi = New GraphInfo()
    gi.LineWidth = 2
    If dash Is Nothing Then
        gi.DashArray = Nothing
        gi.DashPhase = 0
    Else
        gi.DashArray = dash
        gi.DashPhase = 1
    End If

    gi.Color = couleur
    cell.Border = New BorderInfo(BorderSide.Right, gi)
End Sub

Private Function AddRow(tb As Table) As Row
    Dim row = tb.Rows.Add()
    row.FixedRowHeight = 25
    row.Border = New BorderInfo(BorderSide.Box, 1, Aspose.Pdf.Color.DarkGray)

    Return row
End Function

The resulting PDF file is here : testAposePdfDashTable.pdf (2.7 KB)

As you can see it’s very strange because as soon as I apply dash pattern on vertical side on my cell, all the following borders (cells, tables, rows) become dash border. I expect that only vertical green side of my cell (3,1) is using dash pattern, not the others…
If I add a second new table, this one use dash border too.

Could you help me, please ?

@Faf78,

I like to inform I have worked with sample code shared by you and which contain some undefined variables. Would you please share SSCCE so that we may try to reproduce and investigate it in our environment.

Sorry, I forgot to provide two functions. I edited my previous message to add them in my code sample.

@Faf78,

We are looking into this and will get back to you with feedback soon.

Hello,

Have you got some news about my problem ?

Thanks in advance.

@Faf78

Sorry for keeping you wait.

The issue was identified and replicated at our side. It was logged as PDFNET-48826 in our issue tracking system for the sake of correction. We have linked the ticket ID with this forum thread so that you will be notified once it is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello,

I still haven’t heard from PDFNET-48826 and my customer is getting impatient. Can I have a target date to fix this bug ?

Tanks a lot.
Best regards.

@Faf78

We regret to share that earlier logged ticket is pending for an investigation due to previously logged tickets in the queue. We will surely look into the details of the ticket on first come first serve basis and update you once we have additional updates regarding issue fix. Please give us some time.

We are sorry for the inconvenience faced.

This ticket has been opened more than a year ago, we checked with the latest version and the bug is still there. We are customer for more thant 10 years now … we are upset to see nothing is really done about it !

@dvpsoftware.cnr.tm.f

We really regret that the ticket could not get resolved due to other issues in the queue. However, we have recorded your concerns and have escalated the issue to the next level of priority. We will surely inform you as soon as we have some definite about its resolution. Your patience is highly appreciated in this regard.

We really apologize for the inconvenience.

If we get paid support would it be solved ?

@dvpsoftware.cnr.tm.f

Yes, the paid support option is for the issues that need to be resolved on urgent basis. The issue priority will be escalated to the highest level as soon as you post in paid support forum with the reference to ticket ID.

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