We are doing the following scenario which lead to font change :
1. We create a new document using DocumentBuilder
2. We fill the new document with the content of an external word document which has paragraphs using Time New Romain size 10.
3. We fill again the new document with the content of another external word document which has also paragraphs with Time New Roman with size 10.
4. We save the end result.
The issue is: at the result document, all the content imported from the second external document has been transformed from Time New Roman to Cambria. The size changed too.
Here attached the implementation causing the problem.
Thank you for your help.
string path2 = @"C:\Temp\AsposeWordFontLost\part2.docm";
string pathResult = path.Replace(".docm", "SavedWithAspose.docm");
Document dstDoc = new Document(path2);
Section sec = dstDoc.FirstSection;
sec.Body.ChildNodes.Insert(0, new Paragraph(dstDoc));
Paragraph afterNode = sec.Body.FirstParagraph;
Document srcDoc = new Document(path);
Thank you for your response.
Unfortunately, we cannot implement your suggestion. We cannot not join documents (whatever part 2 to part 1 or part 350 to part part 400). We must absolutely use a new document builder to create our final document the way it is in my example (top down approach: part1 > part2 > part3 etc). Hence, we need to make the attached sample works.
Keep in mind my example has only 2 word documents just to show the issue. But in real life, we are creating a word document from hundreds (or thousands) of a mix of Word, Excel, PDF,… documents which means we cannot join document as in your example.
I think it is an Aspose.Word bug. You can confirm it in-house or can you provide a workaround that can be added to my sample to make it work.