Can not set the height of a row in a table using rowspan?

Dear Sirs

I have trouble fixing the row height on a table using rowpan. In my sample (see below), I have tables with two rows and three columns. First and third columns contain one cell (using rowspan = 2), and second column (middle) have two cells (without rowspan).
I try to set the height only for one row (first one, but does not work with the second either) in order to have first row with a height fixed at 15 points, and second row with dynamic height based on content of the third column.
The results are not what I expected : fixed row height is the second row not on the first one. If I try to set row height of the second one, neither of the two rows is fixed in height.

Below sample code with three tables :
1/ standard table (without using rowpsan) => it is ok.
2/ table using rowspan with first row fixed height to 15 points => KO
3/ table using rowspan with second row fixed height to 15 points => KO

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

    'first sample standard table with 1st row fixed height
    InsertSpace(page, "Standard table with 1st row fixed height to 15 pts")
    Dim table = New Table
    page.Paragraphs.Add(table)
    table.ColumnWidths = "50 60 70"
    table.DefaultCellBorder = New BorderInfo(BorderSide.Box, 1)        
    Dim row = table.Rows.Add()
    row.FixedRowHeight = 15
    row.Cells.Add("cell 1,1")
    row.Cells.Add("cell 1,2")
    row.Cells.Add("cell 1,3 zjedljezd lzejdlzkjed rzfjekrjf elrjf")
    row = table.Rows.Add()
    row.Cells.Add("cell 2,1")
    row.Cells.Add("cell 2,2")
    row.Cells.Add("cell 2,3 zjedljezd lzejdlzkjed rzfjekrjf elrjf")

    'space between the 2 tables
    InsertSpace(page, "Table with rowspan using height of 15 pts for the first row : KO => first row must have height of 15 points, whereas it's the second row which has this fixed height....")

    'Second sample : problem with Height => first row must have height of 15 points, whereas it's the second row which has this fixed height....
    table = New Table
    page.Paragraphs.Add(table)
    table.ColumnWidths = "80 80 80"
    table.DefaultCellBorder = New BorderInfo(BorderSide.Box, 1, Aspose.Pdf.Color.DarkRed)
    row = table.Rows.Add()
    row.FixedRowHeight = 15
    Dim cell = row.Cells.Add("cell 1-2,1")
    cell.RowSpan = 2
    row.Cells.Add("cell 1,2")
    cell = row.Cells.Add("cell 1-2,3 zrfjozirejfoi zoeifjoziejf oziejfoziejf zoiejfozjef")
    cell.RowSpan = 2
    row = table.Rows.Add()
    row.Cells.Add("cell 2,2")

    'space between the 2 tables
    InsertSpace(page, "Same example as above with second row height fixed to 15 pts => KO, the two rows seems to be dynamic height in terms of content of the third cell.")

    'Third sample
    table = New Table
    page.Paragraphs.Add(table)
    table.ColumnWidths = "80 80 80"
    table.DefaultCellBorder = New BorderInfo(BorderSide.Box, 1, Aspose.Pdf.Color.DarkRed)
    row = table.Rows.Add()

    cell = row.Cells.Add("cell 1-2,1")
    cell.RowSpan = 2
    row.Cells.Add("cell 1,2")
    cell = row.Cells.Add("cell 1-2,3 zrfjozirejfoi zoeifjoziejf oziejfoziejf zoiejfozjef")
    cell.RowSpan = 2
    row = table.Rows.Add()
    row.Cells.Add("cell 2,2")
    row.FixedRowHeight = 15

    'save generated pdf file
    pdf.Save($"C:\temp\testHeightMergeCell.pdf")
    Process.Start($"C:\temp\testHeightMergeCell.pdf")
End Sub

Private Sub InsertSpace(page As Page, msg As String)
    Dim table = New Table()
    page.Paragraphs.Add(table)
    table.DefaultCellBorder = New BorderInfo(BorderSide.Box, 0)
    table.ColumnWidths="600"
    table.DefaultCellPadding = New MarginInfo(0,5,0,0)
    Dim row = table.Rows.Add()
    row.FixedRowHeight = 50
    Dim cell = row.Cells.Add(msg)
    cell.VerticalAlignment=VerticalAlignment.Bottom
    cell.Alignment = HorizontalAlignment.Left
    cell.DefaultCellTextState.FontStyle = FontStyles.Bold
End Sub

Here the generated PDF of the above sample : testHeightMergeCell.pdf (2.9 KB)

How can I get the expected results ?

Best Regards
Fabien F.

@Faf78

We tested the scenario in our environment while using Aspose.PDF for .NET 20.6 and noticed different results. In order to verify, we increased row height value for second table to 20pt and third table to 50pt. The resultant PDF was fine. Please check the attached document.

testHeightMergeCell.pdf (2.9 KB)

Please let us know about your feedback if you notice some anomaly in the attached document. Also, please try to use latest version of the API and let us know in case you face any other issue.

Thanks for your answer.

I tested your suggestion with version 20.5.0 : it does not work.
I installed the new version 20.6.0 : I have exactly the same result as you.

Unfortunaltely, this is always not what I expect : in the second table, I wait for the second row to be managed dynamically for the height, depending on the content of the cell “cell 1-2,3”. In your sample (second table), the second row seems to have a fixed height (not dynamic) because the cell “cell 2,2” has a low height ; moreover the text of the cell “1-2,3” overflows from the cell and is not complete : the text is truncated where I expect to have the complete text (only the first row has a fixed height). My customer wants the first row to be fixed to have a small height and the second row to be managed dynamically.
With new version 20.6.0, I still can’t do it.

Is it a bug, or do you have a workaround to do it ?

Best Regards,
Fabien.

@Faf78

Thanks for further elaborating the scenario.

We need to further investigate the scenario and issue that you are facing in order to fix it. Meanwhile, would you kindly share your desired PDF document with us. This would help us testing the scenario accordingly and share our feedback with you.

Sorry for the delay in my reply.

Below is the sample PDF document generated with version 20.5.0 : Bulletin Rhône du 2020-06-04 à 18h03.pdf (410.4 KB)

The table with the problem described in the previous posts is named “Vigilance HYDRO uykiyki”. The problem is clearly visible on the “Valence” row : the rows “Moyen” and “Min/Max” have the same height, while my customer wants to have the first fixed and the second is dynamic depending on the height of the contents of the cell of the last row.

More over, in a past version of Aspose (9.0.0) it was possible to have this behavior. Here the same data with the previous version (9.0.0) : Bulletin Rhône du 2020-06-04 à 18h00.pdf (151.9 KB)

As you can see in this last document, the “Moyen” row of “Valence” has a fixed height and the row below “Min/Max” have a dynamic height.

Thanks for yours investigations.

Best regards,
Fabien

@Faf78

Thanks for providing further details.

We have created an investigation ticket as PDFNET-48503 in our issue tracking system to further investigate this scenario. We will look into its details and keep you posted with the status of ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello,

Have you got some solution about my problem ?

Thanks in advance.

@Faf78

We are afraid that earlier logged issue is not yet resolved. Please note that we will surely analyze and fix it, however it will be resolved on first come first serve basis. We will certainly inform you once we have some updates about its fix. Please have patience and give us some time.

We apologize for the inconvenience caused.

Hello,

I still haven’t heard from PDFNET-48503 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 inform that earlier logged ticket is not yet investigated. We will be able to share some ETA or update in this regard one the ticket is fully analyzed. We have recorded your concerns and will consider them during the investigation. Your patience and comprehension is highly appreciated in this regard. Please give us some time.

We are sorry for the inconvenience.

Hi, we are still waiting this issue to be solved would it be possible to get it fixed using paid support ?

@dvpsoftware.cnr.tm.f

We regret to share that the ticket could not get fixed due to other issues in the queue. However, it will surely be escalated to the highest priority if you create a topic in paid support forum with the reference to ticket ID.

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