DocumentBuilder.InsertDocument adds Spaces in output DOCX using .NET

Hello.

We are facing a problem with Aspose.Words for .NET, v. 18.11.0 when we use a DocumentBuilder.InsertFocument method. Specifically, when we call this method within a callback (aka tied to a FindReplaceOptions.ReplacingCallback instance) then it consistently adds a space every time we try to insert a document within another one. We are aware of WORDSNET-14438 in Aspose Words for .NET (original request here: Aspose .NET bug: Unexpected empty space while inserting document), v.16.12 but it seems this has not been fixed in later versions or it is exhibited now under different conditions.

Here is a sample that allows you to reproduce this: AsposeBlankSpaceExample.zip (115.4 KB)

Please let me know of your thoughts :slight_smile:

@iraklisd

We have tested the scenario using the latest version of Aspose.Words for .NET 21.1 and have not found the shared issue. So, please use Aspose.Words for .NET 21.1. We have attached the output DOCX with this post for your kind reference.
21.1.zip (8.1 KB)

Yeap. I can confirm that this version does not exhibit this issue.
Unfortunately, we cannot upgrade to this version yet (or a major one after v18 if the issue was resolved by such version) due to another bug in Aspose.Words that we are waiting for Aspose to fix before upgrading :confused:

Thanks for the response and the confirmation.

@iraklisd

Please note that we do not provide support for older released versions of Aspose.Words. Moreover, we do not provide any fixes or patches for old versions of Aspose products either. All fixes and new features are always added into new versions of our products.

We always encourage our customers to use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes to the issues that were reported earlier.

Hello again.

My company has some sort of premium support and they have talked to Aspose staff.
So, for the other bug Aspose stated they will fix it and backport it (not really sure about the details though as I was not responsible for that one).

Thanks :slight_smile:

@iraklisd

To get the correct output, please use the latest APIs of Aspose.Words. Please let us know if you are facing any other issues.

Unfortunately, your query is not clear enough. So, we request you please elaborate it. We will then answer your query according to your requirement.

Unfortunately, your query is not clear enough. So, we request you please elaborate it. We will then answer your query according to your requirement.

We were awaiting the resolution of WORDSNET-20007 which was resolved in Aspose 20-12 however on testing that release we found WORDSNET-21588 which broke all our unit tests. This has now been resolved as well and I am being told it will be released with Aspose 21-02.

Sorry for the confusion.

@iraklisd

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.