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

Free Support Forum - aspose.com

Reporting a bug in Aspose.Words in which a grid of a merged document is repeated

Hello Adam;

As we are creating many merge documents for our application, we ran into a bug in Aspose.Words.

To put it simply, it duplicates a table entirely in the next page if it is at the bottom of the existing page (this is if the output is .pdf, which it is what we require). In the case of Word .doc it works fine.

I included the code, which is a running sample application (subset of what we actually have in data sources), and clearly reproduces the problem. (The license file is included as to not have any issues with trial versions, etc.).

Please note the following documents:

TABB.doc – Sample template document. This is exactly the one we have in our project.

TABB_Out.pdf – Final output file (Adobe) produced by merging according to the process. This clearly shows the bug, in which the grid that ends the page is repeated in the next page.

TABB_Out.doc – Final output file (Word) produced by merging according to the process. In this document the output is ok, no duplicate grid.

We use Visual Studio 2008 and the version of Aspose.Words is 11.2.0.0, which I believe is the latest.

Please let me know what you think, and if there is a new version or patch coming.

Thank you,

Jorge

This message was posted using Email2Forum by aske012. (attachment)

Hi Jorge,

Thanks for your inquiry.

I have taken a quick look at your issue and I can see it occurs because the first two rows of the problem table are set to be header rows (Highlight the first two rows, right click and press Table Properties, navigate to the Row tab and you’ll see “Repeat rows as header rows” as checked). I suppose it’s a mistake to have both rows as header rows so you will either want to remove that setting for the second row and have just the first row as a header or remove it from both.

What happens is because the data row (the second row) is set as a header it means during mail merge it’s duplicated for all new rows of data as well. Therefore the entire table is duplicated across the page after mail merge.

There are two issues I can see with the output though, one is the PDF is rendered slightly differently which makes it span onto the second page in the first place whereas the table is only on one page in Microsoft Word. The second is that a floating table shouldn’t have header rows anyway, i.e in Microsoft Word header rows don’t apply to floating tables.

I have logged both bugs as issues. We will keep you informed of any developments.

Please let me know if I can help with anything else.

Thanks,

Hi Adam;

Thanks for your reply and for posting the issue in the forum.

I tried removed the header row settings for the second row (and actually for all the rows) and still get the repeated table.

This duplication is related to the number of rows displayed. If I reduce the number of rows, then it obviously doesn’t hit the end of the page and it is ok; if I increase the number of rows, it duplicates the grid.

Anyway, please keep me informed of any developments.

Thank you,

Jorge

Hi Jorge,

Thanks for this additional information.

You are correct, the issue still remains even after header rows are removed. I suppose this is related to the fact the table is also floating. I suppose the issue somehow occurs with a combination of these options.

If you also set the table to be inline (Right click table, Table Properties - > Text Wrapping = None) then the issue disappears. I will update the issue description with this information.

Thanks,

Thank you Adam. This worked fine! Tested in couple of scenarios and so far the table is not being duplicated anymore.

Much appreciated.

Jorge

The issues you have found earlier (filed as WORDSNET-6428) have been fixed in this .NET update and this Java update.


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

The issues you have found earlier (filed as WORDSNET-6427) have been fixed in this .NET update and this Java update.


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