Merge H/F with body issue

I use Aspose.Word to merge header/footer file with the body. Here is a sample app to reproduce the problem:
WordTest.zip (62.3 KB)

Steps to reproduce.

  1. Open project in VS and run the app
  2. Choose destination folder and press the button
  3. In the destination folder you will find merged.docx file

When you open this file you will see that some table cells has bigger spacing.
Here you can see screenshot with the differences:
screen.png (23.6 KB)

I have discover that aspose changed Paragraph properties.
screen1.png (23.7 KB)

To test this, you can open meged.docx file, select entire table and change this paragraph settings to Single and 0px and this will fix the differences.

If you need more info, please let me know.

Thanks

@ManMasterDevelopment

Please use ImportFormatMode as KeepSourceFormatting to get the desired output.

new NodeImporter(body, doc, ImportFormatMode.KeepSourceFormatting);

We suggest you please check the detail of ImportFormatMode from here:

Your solution works good.

Thanks