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

Free Support Forum - aspose.com

Can't render an object when converting visio file to jpg on Linux

Hi,
I’m using Aspose Diagram 21.11 for .NET on my CentOS 7 machine but have an issue when converting visio file to jpg.
On Windows, visio file can convert successful to jpg without error. But on Linux, an object inside visio file can’t be rendered.
Source code:

var diagram = new Diagram(inFile);
var opts = new Aspose.Diagram.Saving.ImageSaveOptions(SaveFileFormat.Jpeg)
{SameAsPdfConversionArea = true};
for(int i = 0; i < diagram.Pages.Count; i++)
{
string pageName = “Diagram_” + (i + 1) + “.jpg”;
opts.PageIndex = i;
diagram.Save(pageName, opts);
}

The object is in image 2. Here is the visio file and output on Windows & Linux: sample.zip (1.6 MB)

Please help me check this issue.
Thank you.

@dunghnguyen

We have logged an issue as DIAGRAMNET-52449 in our issue tracking system for the sake of further investigation. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

@dunghnguyen

We have investigated the earlier logged ticket. Because of the System.Drawing.Common library under Linux does not support drawing .emf pictures, we are sorry that we cannot support rendering .emf in Linux at the moment.