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.
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.
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.
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.
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.
We’re looking into your requirement and you’ll be updated shortly.
We appreciate your patience.
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.
May I know when to expect the fix for this.
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.
//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
//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);
//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();
Aspose.Pdf.Row row2 = tab1.Rows.Add();
row2.IsInNewPage = true;