Free Support Forum -

Issue combining documents

Hi, I am using Aspose.Words to generate and combine Word documents. I have a specific issue with one document (DocB). It has very small top and bottom margins and it comes out fine when I generate it as a single document, but if I combine it with another document (DocA) as the second document , part of the first page of Doc gets pushed onto page two, whereas when it is generated as a single document, this does not happen.


Document dstDoc // variable containing merged result of (DocA)

Document srcDoc // variable containing merged result of (DocB)


The date on my Aspose.Words.dll is 5/15/2010
The version is 9.1.0

Any suggestions??

One further note...the first page of document B has two of which is hidden via code:

Aspose.Words.Bookmark bk = doc.Range.Bookmarks[deferralCodeToDelete];
if (bk != null) {
// Get table, where bookmark is located.
Node table = bk.BookmarkStart.GetAncestor(NodeType.Table);
if (table != null)

I wonder if the document combination somehow does not "detect" the one table has been removed or is somehow still adding space for that hidden table??? There is not extra space where that table would be, but could it be throwing of the spacing somehow??

Hi Brad,

Thanks for your inquiry. Please note that Table.Remove removes the table from the document. The Table.Remove method does not hide the table in the document.

I would suggest you please upgrade to the latest version (v13.4.0) from here and let us know how it goes on your side. If the problem still remains, please attach your input Word documents here for testing. I will investigate the issue on my side and provide you more information.