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

Free Support Forum - aspose.com

. mpp Chinese garbled code

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
could you please share the sample .mpp file so we can reproduce the issue?

Uploading: 测试.7z…

@rainwzy,
you haven’t attached the file or haven’t specified the url.

I uploaded the attachment, didn’t you see it测试.7z (18.2 KB)

@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