We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem using Table.IsBroken=False

Hello,

I have a problem using method Table.IsBroken = False with Aspose.Pdf .Net 20.5 : I generate two tables and the second one not fit entirely on the first page.
If I use table.IsBroken = True, the second table is split, that is ok. But what I want it is my second table go entirely on next page : so I use table.IsBroken = False. But my second table is split on the first page, and no rows on the next page (The rest of the table has disappeared).

How can I have my second table entirely on next page ? In further version of Aspose.Pdf (9.0.0) the IsBroken method did not split my second table which send entirely on next page.

Thanks for your answer.

Below a sample code :

Private Sub TestTablesBrokenOrNot(brokenParam As Boolean)
    'Instantiate an object PDF class
    Dim pdf = New Document()
    'Add the section to PDF document sections collection
    Dim page = pdf.Pages.Add()
    'Instantiate a table object
    Dim table1 = New Table()
    table1.Margin.Top = 20
    'Add the table in paragraphs collection of the desired section
    page.Paragraphs.Add(table1)
    'Set with column widths of the table
    table1.ColumnWidths = "100 100 100"
    'Set default cell border using BorderInfo object
    table1.DefaultCellBorder = New Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 0.1F)
    'Set table border using another customized BorderInfo object
    table1.Border = New Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 1.0F)

    table1.IsBroken = False

    'Create MarginInfo object And set its left, bottom, right And top margins
    Dim margin = New Aspose.Pdf.MarginInfo()
    margin.Top = 5.0F
    margin.Left = 5.0F
    margin.Right = 5.0F
    margin.Bottom = 5.0F
    'Set the default cell padding to the MarginInfo object
    table1.DefaultCellPadding = margin

    For rowCounter = 0 To 25
        Dim row1 = table1.Rows.Add()
        row1.Cells.Add("col " + rowCounter.ToString() + ", 1")
        row1.Cells.Add("col " + rowCounter.ToString() + ", 2")
        row1.Cells.Add("col " + rowCounter.ToString() + ", 3")
    Next

    Dim table2 = New Table()
    table2.Margin.Top = 20
    'Add the table in paragraphs collection of the desired section
    page.Paragraphs.Add(table2)
    'Set with column widths of the table
    table2.ColumnWidths = "100 100 100"
    'Set default cell border using BorderInfo object
    table2.DefaultCellBorder = New Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 0.1F, Aspose.Pdf.Color.Green)
    'Set table border using another customized BorderInfo object
    table2.Border = New Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 1.0F, Aspose.Pdf.Color.Green)

    table2.IsBroken = brokenParam

    'Set the default cell padding to the MarginInfo object
    table2.DefaultCellPadding = margin

    For rowCounter = 0 To 13
        Dim row1 = table2.Rows.Add()
        row1.Cells.Add("col " + rowCounter.ToString() + ", 1")
        row1.Cells.Add("col " + rowCounter.ToString() + ", 2")
        row1.Cells.Add("col " + rowCounter.ToString() + ", 3")
    Next

    Dim pdfFileName = If(brokenParam, $"C:\temp\testTableBrokenOK.pdf", $"C:\temp\testTableNotBrokenUncomplete.pdf")

    pdf.Save(pdfFileName)
    Process.Start(pdfFileName)
End Sub

When I call this Sub, brokenParam is set to “False”

See the result file in attachment.testTableNotBrokenUncomplete.pdf (3.6 KB)

@Faf78,

Thanks for contacting support.

We have investigated this on our end. Can you please try to use table2.IsInNewPage = true property on your end and share feedback with us.

Thanks for your answer.

I just test your proposition adding “table2.IsInNewPage = true” and my table2 is effectively complete on the next page, but it’s not exactlé what I want. With this property added my table2 is always on next page, even if it fit in the current page…
For example for the table1 create only 4 rows : the table2 should be on the first page, not on the second one.

In the previous Aspose Pdf V9.0.0, the table2 was on the first page if it can fit on it, and on the next page if not, just with “.IsBroken = False” property. Could I do the same thing with version 20.5 ?

@Faf78,

Thanks for contacting support.

I have observed your issue and like to inform that I have created investigation ticket with ID PDFNET-48246 in our issue tracking system to investigate and resolve this issue as soon possible.

Hello,

Have you got some news about this problem ?

Thanks in advance.

@Faf78

We regret to inform you that earlier logged issue is not yet resolved. It will surely be analyzed and fixed on first come first serve basis and we will inform you as soon as we have some certain updates regarding its resolution. Please give us some time.

We are sorry for the inconvenience.

Hello,

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

Tanks a lot.
Best regards.

@Faf78

Regretfully, the issue is not yet fully investigated. We will be able to share some ETA or update as soon as it is completely analyzed. We have recorded your concerns and will consider them during issue investigation. Please give us some time.

We apologize for the inconvenience caused.

Hi, as this issue has not been solved yet would it be possible to get it fixed using paid support ?

@dvpsoftware.cnr.tm.f

We are afraid that the issue has not been yet resolved due to other issues in the queue logged prior to it. However, the issue priority will definitely be escalated to the highest level if you report it under paid support model. You can login to paid support platform and create a ticket there with the reference of ticket ID and issue priority will be escalated accordingly.

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