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

Free Support Forum - aspose.com

RepeatingRows Question

If I define that the first 2 rows of my table should be repeated on each page and my table starts on the bottom of the page where there’s only enough room for the first 2 rows, does the table altogether start on the next page or are the first 2 rows rendered on the first page only to be repeated again immediately after that on the second page?

Hi,

Thanks for considering Aspose.

Table class has a property named IsBroken which is used to indicate that either the table is allowed to be broken or not when crossing pages. So as per your requirement, if you've specified the value 2 for RepeatingRows property of Table class, and you've also specified the value of IsBroken property to true, then if the table cannot be accommodated over the first page, the whole table will be displayed over the second page along with Header rows.

FYI, If you need to prevent any row from breaking it the table is broken, then please specify the value of IsRowBroken property to False.

In case it does not satisfy your requirements or you've any further query, please feel free to contact.

Hi codewarior and thank you for your answer.

Meanwhile I have created a little test console application which creates two tables, a green one and after that a red one with RepeatingRows = 2. I wanted to check how the behaviour is if only the first 2 rows (rows to repeat) fit on page 1. In my opinion the whole table should then be started on page 2.

I’m afraid the result is not very satisfying. It looks like there might be a bug unless I’m using it the wrong way. Attached are two PDF outputs. In the first PDF file there’s enough room for the first 3 rows of the red table and the 2 header rows are repeated correctly on all subsequent pages.

When I add a row to the green table so that there’s only room for the two header rows of the red table the 2 header rows are shown on page 1 and NOT repeated on any of the subsequent pages. Again I think it would be correct in this case to start the red table on page 2 and repeat the headers on page 3 and so on…

Thanks for your help
Carlo

Hello Carlo,

Thanks for sharing the sample documents.

Can you please share the code snippet that you've using so that we can test the scenario at our end. We apologize for your inconvenience.

Hi codewarior,

I have now made slight changes to my sample code so it will correspond with what we will do in a real scenario.

The red table has two header rows and a variable number of rows. Each row contains a table. We need to do this because the final output will be a survey. The first two rows contain a header and the scale (agree - disagree, table with 5 columns). Each question also needs to be a table because we display fields for the user to check, the question text and an image. Using a table we can make sure that it doesn’t break in the middle of the table. The red table is breakable with the header and scale repeating and each question subtable is not breakable.

The problem described above still remains. I have attached 4 files.

good.pdf
The first question fits on page 1, then we break to page 2 and the 2 header rows are repeated correctly on subsequent pages.

notgood.pdf
Only the two header rows and no question row fit on page 1. Question rows start on page 2 but the header is NOT repeated.

evenworse.pdf
Only the first header row fits on page 1. Header row 2 is displayed on page two and repeated on subsequent pages. Header row 1 is never repeated!

test.zip
The VB.Net code used to create the 3 sample files.

Many thanks
Carlo

Hello Carlo,

Thanks for sharing the resource files and code snippet.

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-15567. 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 codewarior,

Many thanks for your reply!

I just quickly wanted to let you know that I work for Comartis AG in Switzerland although you might have already noticed that from my Nickname…just in case our License status has an effect on the priority of the issue :slight_smile:

Please keep us posted as soon as you have an ETA.

Carlo

I was just informed that our planned release date is April 30. Do you think it’s realistic to get a fix for this issue before that date?

Carlo

Hello Carlo,

Thanks for sharing the information.

We will try our level best to get it resolved ASAP. Once we have updates regarding its resolution, we would be pleased to update you with the status of correction.

Please be patient and spare us little time. Your patience and comprehension is greatly appreciated in this regard. We are sorry for your inconvenience.

Hi there,

We will be entering the testing phase of our project next week so I was wondering if you had any news for me regarding this issue?

Carlo

Hi,

This issue is getting urgent. We have a release at the end of this week. Could you please give me some feedback regarding the status of this problem?

Hi,

Any chance we could at least get an answer any time soon?

Hi,

Sorry for replying you so late.

In fact I have been in coordination with the development team to get some updates regarding its resolution. The development team is working hard to get this issue resolved and meanwhile I have asked them to share the ETA regarding its resolution. Soon you will be updated with the required information.

We are really sorry for the inconvenience that you have been facing.

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


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

Yes the issue itself seems resolved with Version 4.3.0.0

BUT now we get a StackOverflow Exception on some of the surveys! We cannot send you the code as it’s too big and you won’t be able to work with it without having the whole source code of our product and a database.

Carlo

Hello Carlo,

We recently have released a new version of Aspose.Pdf for .NET 4.4.0 which includes some improvements and corrections for the issues reported earlier. Can you please try using it and in case you still face any problem, please feel free to contact.

We apologize for your inconvenience.

PS, I am not entirely sure that the version 4.4.0 will correct the StackOverflow Exception problem but, still I would suggest you to try using it. May be it can prevent such problems.

Issue is not resolved in 4.4.0.0

In the meantime we found out that the StackOverflow Exception occurs if our PDF contains a text in html paragraph tags (

test

). Interestingly we cannot reproduce this bug using a small console application. It only happens when we use Aspose in our application. The code in our application that we use to build the PDF won’t help you as you won’t be able to run it without the source of our entire application.

Attached is a stack trace which - although obfuscated - should enable you to identify where your endless loop is.

Best Regards
Carlo Fässler, Comartis AG

Hello Carlo,

I have tried reproducing the issue with the following simple code snippet and I am unable to notice the problem. I have tested it with Aspose.Pdf for .NET 4.4.0. Can you please take a look over it and update it, so that we can reproduce the issue. I am afraid until or unless we reproduce the issue, we might not be able to figure out the actual reasons of the problem.

[C#]

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

for (int i = 0; i <= 9000; i++)
{
//Create string variables with text containing html tags
string HTML_String = "

" +
"This is a test for HTML </ support " +
" in Text paragraph.

";

//Create text paragraphs containing HTML text
Text HTML_Text = new Text(HTML_String);
HTML_Text.IsHtmlTagSupported = true;
//Add the text paragraphs containing HTML text to the section
Section1.Paragraphs.Add(HTML_Text);
}

//Save the pdf document
pdf1.Save("d:/pdftest/new_TestHtml.pdf");

We apologize for your inconvenience.

Any chance we could have a debug version of your DLL including the PDB file so we can further analyze the problem?

Hello Carlo,

I am afraid we might not be able to share the debug version of Aspose.Pdf for .NET. Meanwhile, can you please share the Aspose.Pdf.dll that you are using ? May be it can help us to analyze the issue.

We apologize for your inconvenience.