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

Free Support Forum - aspose.com

Large Unexplained Whitespace when inserting HTML V11.5

Hi,


I am inserting an HTML paragraph and gaining a lot of unexplained whitespace. I should mention that I am using DLL version 11.5 and we’d rather not upgrade at this point.

The attached PDF explains it best, the first part shows the Word Template I am using and the second part shows when I have replaced the fields shown as “[xxx]”. Specifically when I replace “[BlockFlyer_CoverDuration]” it inserts the paragraph with the red border, but it also causes the large amount of blank space to be inserted below it (before “Premium Information”) - which I really want to avoid.

This is the HTML that is being inserted:


Policy runs from 1 January 2014 to 31 December 2014


Any ideas?

Cheers,

Dale
Hi Dale,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • 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.

Thanks for your response, as part of creating the resources you requested I solved the problem.


It was due to replacing text in the middle of a string with an HTML paragraph, which then converted the original paragraph (correctly) into 3. My logic was setting my merge field text to blank, but in such a scenario I need to also remove the empty paragraph.

Thanks again,
Hi Dale,

Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.