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

Free Support Forum - aspose.com

Problem with Margins using HTML and Word after Aspose update

This problem does not occur in Aspose Words jdk16 We encountered it while upgrading to and had to revert.

While importing HTML-Documents with multiple paragraphs (

) into an existing .docx the margings before and after the paragraph are set to 12 (which is too large).
This happens although no “margin-*”-Tag is set in HTML nor are the margins set in the docx template.

To reproduce this behavior:
1) Create an empty docx with the standard template, so that the margins before and after paragraphs are 0 and the line spacing is set to “simple”.
2) Save as docx
3) Load the document in Aspose
4) Create a DocumentBuilder for the template
5) Call insertHTML on the DocumentBuilder and import a complete HTML-Document
6) Save

It should be possible to define the margins in the template.

Hi Noel,

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

  1. Your input Word document (template) you’re getting this problem with.
  2. The Aspose.Words 13.7.0 generated output document that shows the correct behavior.
  3. The Aspose.Words 13.10.0 generated output document that shows the undesired behavior.
  4. Please create a standalone/runnable simple Java application that helps me reproduce your problem on my end and attach it here for testing

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

Best regards,

Testcase: AsposeTestApp.zip
How to replicate:
1. Word document has no (0pt) margin before and after a paragraph in the standard template
2. In the html document there are no margins defined
3. The testcase opens the document, inserts the html-file and stores it under output.docx
Result with The margin is suddenly 12pt
Result with Correctly no margin

Hi Noel,

Thanks for the additional information. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9541. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,


I do not mean to rush, but this problem is becoming a larger inconvenience and is preventing us from updating to the next aspose version. Could we have an update on this matter to plan our releases accordingly?

Thank you very much,

Noel Diamant (AGES)

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

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

Hi Noel,

Thanks for your inquiry. Your issue has now been resolved. Please upgrade to the latest version from the following link:

In case you have further inquires or need any help, please let us know.

Best regards,

Thank you very much for the fast repsonses. We are testing this verison now.