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

Free Support Forum - aspose.com

Missing Page Headers when dynamically adding a Sub-Document using Linq engine

I am hoping you might be able to provide some insight into a problem I am running into where adding a Sub-Document via Aspose, I end up loosing the Page Headers of the Sub-Document.
We are using the Linq engine, and are dynamically adding documents using the <<doc[]>> tag.
The Sub Document has some page headers defined (one for the first page, another for all subsequent pages).
The Master Document does not have any page headers.

When the Sub Document is added to the Master Template, it should retain all of its page headers. The rest of the Master Template would not have a Page Header.

When I generate the Sub Document on it’s own, everything looks good.
When I generate the Master Document, there are no page headers.

I have seen comments on setting the “link to previous” in the header section, but I am not using the Aspose code (I am using the Linq reporting engine), and no matter how I set things in the Master Document, I can’t seem to get things to work correctly.

I have a sample project created, which I will try to zip and include in this support ticket.
In here, there is a Templates folder. Within there, you will see the Master Document, Sub Document, and the Expected Output document.
You will note the Expected Output shows how I would hope the headers would look.

Thank you again for your help.AsposeTemplateGeneration.zip (5.3 MB)


We have logged your requirement in our issue tracking system. Your ticket number is WORDSNET-17620 . We will further look into the details of this requirement and will keep you updated on the status of the linked issue.


Regarding WORDSNET-17620, we have completed the work on your issue and closed this issue as Not a Bug. Please see the following analysis details:

LINQ Reporting Engine mimics MS Word’s behavior in this case. To check this, you can replace the doc tag in Master Document.docx with an INCLUDETEXT field to include Sub Document.docx and update the field in MS Word. The result is the same as produced by LINQ Reporting Engine. To workaround this issue, you need to fit/rework your template according to MS Word behavior.