Cannot write custom properties to VSDX files which have the Author property set

Hello,

We need help with writing custom properties to VSDX files. In the case of VSDX files where the built in Author property has a value, we get the following error: “Error reading file.vsdx. bad read of entry [Content_Types].xml from compressed archive.” The version of the Aspose Diagram library we are using is 18.2. Is this a known issue and how can we get around this?

Thank you!

@TITUSTG

Thanks for contacting support.

Would you please try using latest version of the API i.e. 18.9. You can download the latest version as per your working environment (.NET/Java) and in case issue still persists, please share your sample diagram along with sample code snippet. We will test the scenario in our environment and address it accordingly.

@asad.ali

Thank you for the prompt reply. I downloaded the latest version (18.9) and still encountered the same error. I have attached our .NET solution which contains two sample VSDX files. The file named “Nonsupported.vsdx” is the one we are having issues with, and the difference between this file and others is that it has the author property set.

Thank you in advance!

@TITUSTG

We are afraid any sample application did not attach with your post. If the file size exceeds 3 MB then please upload it to Google Drive, Dropbox etc and share the link with us so that we may proceed further to help you out.

@Farhan.Raza

Sorry about that, I didn’t notice that the upload had been removed. Here is the Dropbox link to a zipped archive: Dropbox - AsposeDiagramTest.zip - Simplify your life

Thank you!

@TITUSTG

Thanks for sharing sample console application.

We have tested the scenario using Aspose.Diagram for .NET 18.10 and issue was reproducible using latest version. We have logged it as DIAGRAMNET-51564 in our issue tracking system for further investigation. We will 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.

@asad.ali

Thank you! I look forward to your response.

I forgot to mention - would it be possible to get an estimate on how long this may take to fix? Our customers are asking for an approximate date. Thank you!

@TITUSTG

Thanks for your inquiry.

I am afraid that earlier logged issue is pending for an investigation due to other pending issues in the queue logged previously. We will be able to share any definite updates/ETA once the investigation is completed. Your concerns have been recorded and will definitely be considered during investigation. As soon as we have some definite updates to share, we will let you know. Please spare us little time.

We are sorry for the inconvenience.

@asad.ali Thank you for letting me know, I will check back for updates later. :slight_smile:

@TITUSTG

Thanks for your feedback.

This is to update you that your issue is planned to be investigated/fixed in next week. We will further update you in case of any progress in this regard.

@asad.ali That is great news! Thank you for the update. I look forward to hearing from you.

@TITUSTG

We would like to suggest you to please use following code snippet in order to prevent the issue:

using (var stream = new FileStream(this.filename, FileMode.Create, FileAccess.ReadWrite))
{
  diagram.Save(stream, SaveFileFormat.VSDX);
}

If output file length is longer than the that of source file while saving, the method will overwrite all the bytes of the source file and everything will be fine. But, when output file length is shorter than the source file, some bytes will stay there which should not be happen. Resulting you will face an issue. We hope suggested code will help you resolving the issue. In case of further assistance, please feel free to let us know.

Hi @asad.ali

Thank you for offering a workaround. I tried it this morning, however, this workaround will only work when creating a new VSDX file. Your workaround does not work for updating existing files, since your suggestion is to use FileMode.Create. What we are trying to do is update custom properties with new values. This currently still does not work if that document has the author property set. Do you know if this issue can be fixed in another way? I see that the issue is closed, does that mean that it won’t be investigated further?

Thank you,
TITUSTG

@TITUSTG

Thanks for sharing your concerns.

We apologize if suggested workaround did not work in all cases. We have recorded your concerns under the ticket ID DIAGRAMNET-51569 in our issue tracking system for more investigation. We will surely let you know in case of further updates in this matter. Please spare us little time.

We are sorry for the inconvenience.

@asad.ali

Hi, can you tell me if there has been any progress on this? Thank you!

@TITUSTG

Thanks for your inquiry.

We would like to share with you that we have investigated the scenario again and found that the issue is not related with Aspose.Diagram while updating existing files. We request you to please use MemoryStream instead of FileStream in your program and in case you still face any issue, please let us know. We will further proceed to help you accordingly.