I am using Sprite.PDF to convert PDF to images. It is working locally (purchased the component)... but on the server I am getting this error...
Any ideas?
Here is the line where the exception occurs:
var img = doc.SaveAsImage(pageCount, PdfImageType.Metafile);
(This is executing in a controller in an asp.net MVC app)
A generic error occurred in GDI+.
Source:
System.Drawing
Stack Trace:
at System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, String description)
at System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type)
at spr᫁.ᜀ(Stream A_0, Int32 A_1, Int32 A_2)
at spr᫁.ᜀ(Single A_0)
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)
at WB.Controllers.ReportController.Create(Report report, HttpPostedFileBase file)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.ActionInvocation.InvokeSynchronousActionMethod()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass48.<InvokeActionMethodFilterAsynchronouslyRecursive>b__41()