Hi
When i use below code got the exception while pdf conversion
My code:
using (var buffer = Request.Body)
{
await blockBlob.UploadFromStreamAsync(buffer);
using (Document document = new Document())
{
document.LoadFromStream(buffer, FileFormat.Docx);
var pdfStream = new MemoryStream();
document.SaveToStream(pdfStream, FileFormat.PDF);
await blockpdfBlob.UploadFromStreamAsync(pdfStream);
}
}
Exception:
Exceptions:System.NotSupportedException: Specified method is not supported. at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.get_Position()
at sprό.ᜀ(Stream A_0) at sprὬ.ᜁ(Stream A_0) at Spire.Doc.Document.(Stream A_0)
at sprᶿ.ᜀ(Stream A_0, Document A_1, spr A_2) at Spire.Doc.Document.(Stream A_0) at Spire.Doc.Document.LoadFromStream(Stream stream, FileFormat fileFormat, String password)
at Spire.Doc.Document.LoadFromStream(Stream stream, FileFormat fileFormat)