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

Free Support Forum - aspose.com

EndOfStreamException when accessing SuggestedExtension property

Following code throws exception, when I try to access SuggestedExtension property:

NodeCollection childNodes = document.GetChildNodes(NodeType.Shape, true);
for (int attachementId = 0; attachementId < childNodes.Count; attachementId++)
{
Shape shape = childNodes[attachementId] as Shape;

if (shape.OleFormat != null)
{
string attachementName = attachementId.ToString() + shape.OleFormat.SuggestedExtension;
}
}


Exception thrown is:
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadUInt16()
at 0006.0003()
at 0006.0003(String 0002)
at …

This was tested on 16.1.0.0 version of Aspose.Words.

Hi Klemen,

Thanks for your inquiry. Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.

I’ve attached my test file.

Hi Klemen,

Thanks for sharing the document. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13181. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-13181) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.