I’m currently upgrading to version 3.0.1.0 of Aspose.Word and have come across a font problem.
When I merge documents some of the documents get the default font of the first document which is coversheet generated on the fly. I remember going though pains with templates to get this working on the previous versions. Also I’m finding the export to PDF the fonts problems seem to get worse again the default font of the coversheet appear all over the place.
I had attach some files demostrating the problem. The winrar file contains two winrar file one with an example project showing an example of source code and the second with the dodgy Word and PDF, and what we get from our current live version (2.4.1.0) indicated by the *- live.doc
The only changes I had to make to upgrade was this change:
public static Aspose.Word.Document Merge(Aspose.Word.Document destination, Aspose.Word.Document source)
{
// while (source.Sections.Count > 0)
// {
// Section section = source.Sections[0];
// source.Sections.RemoveAt(0);
// destination.Sections.Add(section);
// }
foreach(Section sourceSection in source.Sections){
You have quite a few documents there and some are about 130 pages long. Please specify exactly document name, what page and where on the page you have the problem you are talking about.
In the document “MICROSOFT 10-K 01-Sep-04.doc” the first page text is Verdana. The font goes strange on page 66 and becomes Courier New until page 124.
The Problem documents seem to be these ones, if you open them in word the font is New Times, but when you put the coversheet on it, it changes to Courier New.
Also if you look at “MICROSOFT 10-K 01-Sep-04.pdf” you’ll see that Courier New appears on different lines through out the document. Not sure if this is due to the word export or the PDF import .
1. “Random” loss of font formatting fixed in Aspose.Word 3.0.3. That was caused by Aspose.Word and Aspose.Pdf not always agreeing on the way to treat the text segments. Basically all was okay in the DOC file, the problem was in the PDF export.
2. Courier New font that appears from page 66 to page 124 - this happens after the DOC files are merged into a single DOC file. This is not an export problem, this effect is caused by different styles in the different documents. This is my write up on this question https://forum.aspose.com/t/127601 To solve this one, Dmitry suggested you modify the Normal style in the destination document so it is not using Courier New.