Hi
When i’m saving Document to stream
var stream = new MemoryStream();
doc.Save(stream,new OneSaveOptions());
stream is closed and there is no possibility to return/access it. How can I return/access a stream?
Arek Slowik
Hi Arek,
Thank you for contacting support. We managed to replicate the problem of closed stream. We have logged this problem under ticket id NOTENET-1699 in our bug tracking system. Your post has also been linked to it. We’ll let you know once a significant progress has been made in this regard. We’re sorry for the inconvenience caused.
Hi Arek,
please use the code below to solve your problem
var memoryStream = new AsposeMemoryStream();
doc.Save(memoryStream, SaveFormat.One);
memoryStream.Position = 0;
// read memoryStream here
memoryStream.AsposeClose();
where:
class AsposeMemoryStream : MemoryStream
{
public override void Close()
{
}
protected override void Dispose(bool disposing)
{
}
public void AsposeClose()
{
base.Close();
base.Dispose(true);
}
}
it works for me
Hi Arek & Lukasz,
Thank you for being patient. We have a good news for you that the issue id NOTENET-1699 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.Note for .NET. We’ll inform you via this forum thread as soon as the new release is published.