Hello,
I'm using Spire.Office 6.9.1 version in an azure function in .NET Core 3.1.
I'm trying to convert a pptx file into a pdf format.
I'm using this code :
Stream stream = new MemoryStream(file.Content);
Spire.Presentation.Presentation presentation = new Spire.Presentation.Presentation();
presentation.LoadFromStream(stream, Spire.Presentation.FileFormat.Auto);
presentation.SaveToFile(newfileName, Spire.Presentation.FileFormat.PDF);
file.Content is the array of bytes of my pptx file.
newFileName is a complete path with the name of the pdf doc I want to create.
When running this function localy on my computer, it works perfectly. But when it runs on Azure, i get this exception :
"ExceptionMessage":"Object reference not set to an instance of an object.","ExceptionStackTrace":" at spr厈..ctor(String A_0, Single A_1, FontStyle A_2, Boolean A_3)\r\n at spr厈..ctor(String A_0, Single A_1, FontStyle A_2)\r\n at spr区.ᜀ(Single A_0, Boolean A_1)\r\n at spr剶.ᜀ(String A_0, PointF A_1, spr区 A_2)\r\n at spr俞.ᜀ(spr劯 A_0, spr剳 A_1, Hashtable A_2, spr侬 A_3)\r\n at spr俞.ᜀ(Boolean A_0, spr剳 A_1, Hashtable A_2, spr侬 A_3, FileFormat A_4)\r\n at spr剱.ᜀ(spr俘 A_0, Stream A_1, spr剭 A_2)\r\n at spr俘.ᜀ(Stream A_0, spr割 A_1, spr剳 A_2)\r\n at spr俘.ᜀ(String A_0, spr割 A_1)\r\n at Spire.Presentation.Presentation.SaveToFile(String file, FileFormat fileFormat)\r\n at Azure.ConvertToPdf.ManagePdf.MergePdfs(List`1 files)\r\n at Azure.ConvertToPdf.Function2.Run(HttpRequest req, ILogger log)","ExceptionSource":"Spire.Presentation","
Can you help me ?
Best Regards.
Marmont Lucas