I used aspose. Tasks to convert. mpp files to. jpg format, and the Chinese version on. mpp to. jpg became garbled. I tested several versions of aspose. Tasks are garbled, and my system is linux
@rainwzy,
the attached mpp file uses the following fonts: ‘宋体’ and ‘等线’
Do you have them installed in your system?
The fonts can be selected on per-cell, per-column or per-row basis in MS Project:
Screenshot_1.png (12.8 KB)
Also your can use FontResolveCallback API to examine or specify fallback font(s):
Project project = new Project("input.mpp");
var so = new ImageSaveOptions(SaveFileFormat.Jpeg);
var fontsMapping = new Dictionary<string, string>();
so.FontResolveCallback = delegate(FontResolveEventArgs args)
{
fontsMapping[args.RequestedFontName] = args.ResolvedFontName;
};
project.Save("output.jpg", so);
foreach (var kv in fontsMapping)
{
Console.WriteLine("{0} -> {1}", kv.Key, kv.Value);
}
for example, on test Windows machine the snippet outputs the following mappings (the output image doesn’t seem garbled):
宋体 -> SimSun
Arial -> Arial
-> Times New Roman
等线 -> Times New Roman