I'm attempting to use Azure Functions to create an image of the first page of PDFs as they are sent in (think thumbnail). Running locally I have no issues, but running on a published version of the function I get:
System.ArgumentException : Parameter is not valid.
at System.Drawing.Graphics.GetHdc()
at spr.ᜀ(Stream A_0,Int32 A_1,Int32 A_2)
at spr.ᜀ(Single A_0,Boolean A_1)
at Spire.Pdf.PdfDocumentBase.ᜀ(Stream A_0,Int32 A_1)
at Spire.Pdf.PdfDocumentBase.ᜀ(Int32 A_0,PdfImageType A_1)
at Spire.Pdf.PdfDocument.SaveAsImage(Int32 pageIndex,PdfImageType type)
Now, I did see a post in the Spire.Doc forum where they were getting the same error hosting on free sites and what not. The solution was for them to switch to an Azure Cloud Service or Virtual Machine. However, that was almost 4 years ago. I'm hoping there has been progress for a fix for this?