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
I still have garbled code in the Linux system, and the system has installed these fonts
@rainwzy,
could you execute the following snippet on your system and your file and provide it’s console output?
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);
}
Have you reproduced the problem and how do you need to solve it
Yes, it’s this kind of garbled code
@rainwzy
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): TASKSNET-10878
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hello, have you resolved this issue ?