Free Support Forum - aspose.com

IsInNewPage property of PDF Table Row

Hi All,

I 'm having a problem in using IsInNewPage property of PDF Table Row.

If I use it even for simple table, it is not working.

Can anyone help on this?

Thanx in advance.

Regards,
Sugath

Hello Sugath,

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNET-19948. We will investigate this issue in details and will keep you updated on the status of a correction. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We apologize for your inconvenience.

Hi,

the IsInNewPage property is not working. It always returns false no matter whereever the row is in the PDF document.

Can you please fix this.

Thank you.

Hi Maheshwari,

I’m sorry to inform you that this issue is already logged as PDFNET-19948 in our issue tracking system. However, I’m afraid, it is not yet resolved. Nevertheless, our team is working on this issue and you’ll be notified via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

Hi,

Thank you for the reply.

Actually I wanted to display the whole table in a new page in PDF. Is there any other way for taking the entire table on to a new page rather than taking a row to a new page.

Thank you.

Hi Maheshwari,

We’re looking into your requirement and you’ll be updated shortly.

We appreciate your patience.
Regards,

Hi,

As stated in my previos post, can the IsInNewPage property be available for a Table as well (instead of for only Table Row). As I said, I wanted to display the whole table in a new page when one of its row goes to the newxt page.

Thank you.

Hi,

May I know when to expect the fix for this.

Thank you.

Hi Maheshwari,

Thanks for your patience.

As per your requirement "I wanted to display the whole table in a new page when one of its row goes to the next page" you may try using tab1.IsKeptTogether and set its value to True. As per my observations, when I have created a PDF document using following code snippet, if any of the table row is flowing to consequent pages, the complete table is displayed on next page. Also please take a look over the attached PDF document generated with Aspose.Pdf for .NET 5.1.0.

However regarding PDFNET-19948, we have made some progress towards its resolution but I am afraid the problem is not completely resolved. Meanwhile I have requested the development team to share the ETA regarding its resolution. As soon as I have some updates, I will let you know. We apologize for the delay and inconvenience.

[C#]

//Instantiate Pdf document object
Pdf pdf1 = new Pdf();
//Create a section in the Pdf
Aspose.Pdf.Section sec1 = pdf1.Sections.Add();

// create a loop to place X number of tables inside PDF
for (int j = 1; j < 3; j++)
{
sec1.Paragraphs.Add(new Text("Table Number ----------------- " + j.ToString()));
//Create a table
Table tab1 = new Table();
//Add table in the paragraphs collection of the section
sec1.Paragraphs.Add(tab1);
//set the column widths of the table
tab1.ColumnWidths = "60 100 100";
//Set default cell border using BorderInfo object
tab1.DefaultCellBorder = new BorderInfo((int)BorderSide.All, 0.1F);
//Set table border using another customized BorderInfo object
tab1.Border = new BorderInfo((int)BorderSide.All, 1F);
tab1.IsKeptTogether= true;

//Create MarginInfo object and set its left, bottom, right and top margins
MarginInfo margin = new MarginInfo();
margin.Top = 5f;
margin.Left = 5f;
margin.Right = 5f;
margin.Bottom = 5f;
//Set the default cell padding to the MarginInfo object
tab1.DefaultCellPadding = margin;

// create a counter for table rows
for (int i = 0; i <= 10; i++)
{
//Create rows in the table and then cells in the rows
Aspose.Pdf.Row row1 = tab1.Rows.Add();
row1.Cells.Add("col1");
row1.Cells.Add("col2");
row1.Cells.Add("col3");
Aspose.Pdf.Row row2 = tab1.Rows.Add();
row2.IsInNewPage = true;
row2.Cells.Add("item1");
row2.Cells.Add("item2");
row2.Cells.Add("item3");
}
}
pdf1.Save(@"D:\pdftest\IsRowBreak_Test.pdf");

The issues you have found earlier (filed as 19948) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.