Convert VSDX to PDF using Aspose.Diagram for .NET fails with Aspose.Diagram.DiagramException

Hi,

We are using version 19.3 of Diagrams and the following code to convert this VSDX file (input.zip (452.0 KB)) to PDF.

var diagram = new Diagram(input);
diagram.Save(output, SaveFileFormat.PDF);

When switching to the latest 19.5 version, we get the following error:

Aspose.Diagram.DiagramException: Error in element DataConnections in \VisioDocument. Object reference not set to an instance of an object.
at .(String )
at .ReadChildElements()
at .Load()
at .(Object )
at .(MethodBase , Boolean )
at .()
at .()
at .(Object )
at . ()
at .(Object , UInt32 )
at .()
at . ()
at .()
at .(Object )
at . ()
at .(Object , UInt32 )
at .()
at .(Object[] , Type[] , Type[] , Object[])
at .(Int32 , Type[] , Type[] , Boolean)
at . ( )
at .()
at .()
at .(Object )
at . ()
at .(Object , UInt32 )
at .()
at . ()
at .()
at .(Object )
at . ()
at .(Object , UInt32 )
at .()
at .(Object[] , Type[] , Type[] , Object[])
at .(Stream )
at Aspose.Diagram.Diagram…ctor(Stream stream)

Can you please assist? Thank you!

@gwert

Thanks for contacting support.

We used following code snippet in our environment with Aspose.Diagram for .NET 19.5 and were unable to notice the exception that you have faced.

Aspose.Diagram.Diagram diagram = new Aspose.Diagram.Diagram(dataDir + "input.vsdx");
Aspose.Diagram.Saving.PdfSaveOptions pdfSaveOptions = new Diagram.Saving.PdfSaveOptions();
diagram.Save(dataDir + "output.pdf", pdfSaveOptions);

OUTPUT.pdf (1.0 MB)

However, we did notice that color of images was not correct in output PDF file and for that we have logged an issue as DIAGRAMNET-51648 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hi,

Thank you for getting back on this one and for spotting the that issue!

We are running this code under a .NET Core app 2.1. I assume you gave it a try under a .NET Framework app?

Thank you.

@gwert

We have been able to reproduce the issue under .NET Core environment and logged it as DIAGRAMNET-51649 in our issue tracking system. We will definitely look into this issue and keep you informed with its rectification status. Please spare us little time.

We are sorry for the inconvenience.

Thank you for looking into this with higher priority!

I usually see the status of the issues inside the thread. I cannot see it for

As a general question, do you have a separate public app that tracks the status of the issues?

Best regards.

@gwert

Thanks for your inquiry.

We do not offer any separate site or space to track the issue status. Yes, earlier there was used to be issue status at the bottom of the thread but now it has been modified due to some internal changes in the system. However, we will keep you posted with the status of logged ticket as soon as some additional updates are available.

The issues you have found earlier (filed as DIAGRAMNET-51648,DIAGRAMNET-51649) have been fixed in Aspose.Diagram for .NET 19.6.

Hi,
After updated to version 20.2 output file contains cropped image (first image):
output-20.2.0.vsdx.pdf (635.0 KB)

But on previous version 19.12 it works:
output-19.12.vsdx.pdf (1.0 MB)

Can you please assist?
Thank you!

@gwert

Could you please share respective source diagram file with us. We will test the scenario in our environment and address it accordingly.

This is original file:
input.zip (452.0 KB)

@gwert

We have logged an issue as DIAGRAMNET-51785 in our issue tracking system for further investigation. We will surely inform you as soon as it is resolved. Please be patient and spare us little time.

We are sorry for the inconvenience.

@gwert

We would like to share with you that earlier logged issue has been resolved in hotfix Aspose.Diagram for .NET 20.2.1.

Thank you for the fix,
Could you please also add *.dll files for .NETStandard 2.0 and NETStandard 2.1 too?

@gwert

We will surely look into this and let you know about the updates soon.

The issues you have found earlier (filed as DIAGRAMNET-51785) have been fixed in Aspose.Diagram for .NET 20.3.

Thank you for the fix.
Tested 20.3.0 version and it works.

1 Like