Styles are not being displayed when appending documents

Hi

We have 4 documents that we append together using AppendDocument() to generate an aspose document which will then be converted to a PDF document. The documents are as follows:

* cover letter (needs to keep its own styles)

* disclaimer (needs to keep its own styles)

* search fields (takes the disclaimer styles)

* content documents (takes the disclaimer styles using

disclaimerDoc.AppendDocument(summaryContentDoc, ImportFormatMode.UseDestinationStyles);)

After defining styles in the disclaimer document (such as modifying heading1 styles, Normal etc), once the append has occurred and the pdf generated, the content document does not keep the font correct for the styles defined in the disclaimer document. Eg.

disclaimer has Normal style defined as Arial, 9pt

content documents will have any text that has the style Normal rendered as Times New Roman. The Search fields document seems to share the same styles as the disclaimer document, so there is something incorrect about the content documents.

As a further note, there seems to be a blank page inserted before the content documents and this may be responsible for stuffing up the styles. Also when we insert a table of contents (using documentBuilder.InsertTableOfContents) on the content document, this also seems to stuff up the styles of the content document.

Could you please advise if this is a known issue?

Thanks.

Hi,
Thanks for your inquiry. Unfortunately, it is difficult to say what the problem is without the documents and code. I need your documents and complete code to be able to reproduce the problem on my side.
Please note that it is safe to attach files in the forum. If you attach your documents here, only you and Aspose staff members can download it. Also you can send the files to my e-mail as described here:
https://forum.aspose.com/t/how-to-send-license-file-to-support-team/225542
You can also remove any sensitive information by replacing it with dummy data instead.
Best regards,