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

Free Support Forum - aspose.com

Combining of documents causes text to slide onto new/extra page

I am using Aspose.Words v.
I have two documents that I need to merge into a single document for users. The documents have different page margins. Document “A” has default/normal margins. Document “B” has very small top and bottom page margins for the first page due to requirements. I run into the following scenarios:

  1. If I generate the documents separately, they come out fine. No problems.
  2. If I generate the documents separately and then merge them in the order B then A, no problem.
  3. If I generate the documents separately and then merge them in the order A then B, then B gets page 1 broken onto 2 pages. Not good!!! :wink:

I need document B generated/merged last in the merged/resulting document.
I have tried mergeing the docs two ways 1) the “old” method of looping through the sections and doing an ImportNode call and 2) with the new AppendDocument method. Both give the same results noted above.
Any suggestions?


Thanks for your request. I cannot reproduce the problem on my side using the latest version of Aspose.Words (9.3.0). I use the following code for testing:

// Open Document Document docA = new Document(@"Test\A.doc");
Document docB = new Document(@"Test\b.doc");
docB.AppendDocument(docA, ImportFormatMode.KeepSourceFormatting);
// Save output document

Please see the attached documents.
Could you please attach your documents here for testing? I will investigate the issue and provide you more information.
Best regards,