Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Sep 30, 2019 3:23 am

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)

portal.support@minterellison.co.nz
 
Posts: 8
Joined: Mon Feb 25, 2019 8:13 pm

Mon Sep 30, 2019 9:53 am

Hi,

Thanks for your inquiry.
To help us investigate your issue accurately, please offer us your input Word file. You could upload it here or send us(support@e-iceblue.com) via email.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Return to Spire.Doc