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

Free Support Forum - aspose.com

Need Help for my POC

During evaluation of if condition which has merged variables, if the condition is not satisfied it is creating a empty line.

PFA condition. kindly help me out.

I am in the final verge of creating POC using Aspose for my client.

Hi there,

Thanks for your inquiry. Please use MailMerge.CleanupOptions property to remove the empty paragraphs, unmerged fields and IF fields during mail merge. Please refer to the following article:

How to Remove Unmerged Fields and Empty Paragraphs during Mail Merge

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click ‘Reply’ button that will bring you to the ‘reply page’ and there at the bottom you can include any attachments with that post by clicking the ‘Add/Update’ button.

I have already used cleaner options.

1) I have inserted three conditions

2) Out of them when one condition evaluation becomes false it is leaving space in document but it is removing those condition fields as i was doing clean options.

3) PFA InputDoc, Outputdoc and Java file.

kindly provide me with suggestion.

Hi there,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14863. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Can you kindly let me know what are the chances of solution because when i was browsing your forums i found the same issue got reported by user and at that time it was also told the same in that thread.

If you feel it is not feasible kindly let me know so that I can look for another solution as we are under pressure to finalize the solution. I was really impressed with this product and this was the only issue that I am seeing for recommending this to my customer in US.

Hi there,

Thanks for your inquiry. We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. Our developers work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issue is pending for analysis and is in the queue. Once our product team completes the analysis of your issue, we will then be able to provide you an estimate.

Thanks for your patience and understanding.
Hi there,

Thanks for your patience. It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-14863) as 'Not a Bug'.

Please note that the MailMergeCleanupOptions.RemoveEmptyParagraphs options does not remove empty lines, only paragraphs. The first empty line in the output is the empty result of IF field. The second one is leading empty line of next IF field result. This is expected behavior.

We suggest you please use the modified template document to get the desired output.