Hi,
Currently I’m using VisualStudio 2017 (15.9.8) and Aspose.Words 17.10.0.0 for Azure development.
I’m trying to convert word document stored in Azure storage to PDF and save the newly created PDF back to azure storage. The problem is that Aspose.Words returned this exception while loading the document stream:
The remote server returned an error: (416) Requested range not satisfiable: response with content range denied.
The code:
CloudBlob cloudBlob = blobContainer.GetBlobReference(blobItem.Name);
using (var stream = cloudBlob.OpenRead())
{
stream.Position = 0;
using (Stream pdfStream = new System.IO.MemoryStream())
{
UnlockAspose();
Aspose.Words.Document document = new Aspose.Words.Document(stream); // error here
document.Save(pdfStream, Aspose.Words.SaveFormat.Pdf);
pdfStream.Position = 0;
//CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobItem.Name + ".pdf");
//blob.UploadFromStream(pdfStream);
}
}
The same behaviour also accured in other Aspose.Totals family (Cells, Diagram and Slides).
Any idea to fix this issue?
Thank you in advance.
Cheers,
Inoel