Hi there,
I’m trying to convert a PPT file I have to PDF using the code below. This causes an ArgumentNullException with the message “Value cannot be null, Parameter name: encoder”. Full stack trace is below. I also noticed that the stacktrace sometimes have garbled characters, causing our logging mechnism to not able to log. We’ve seen this in Slides and Words.
Code:
Presentation presentation = new Presentation(fileName);
presentation.Save(convertedFileName, Aspose.Slides.Export.SaveFormat.Pdf);
Stack Track:
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(Stream stream, ImageFormat format)
at ?.??.?( fillParam, Single dpi)
at ?.??.?(RectangleF rectangle, lineParam, fillParam)
at Aspose.Slides.Rectangle.?(?? canvas, ArrayList rotations, ? renderingContext)
at Aspose.Slides.Slide.?(?? canvas, SaveOptions options)
at Aspose.Slides.Slide.?(Boolean saveMetafileAsPng, SaveOptions options)
at ?.??.SaveToPdf(Presentation pres, Stream stream, Int32[] slides, PdfOptions options, Boolean notesView)
at ?.??.SaveToPdf(Presentation pres, Stream stream, Int32[] slides, PdfOptions options)
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, SaveOptions options)
at Aspose.Slides.Presentation.Save(String fname, SaveFormat format)
at TestConsoleApp.Program.testSlides2() in D:\svn\RivetCloud\server\RivetTranscode\TestConsoleApp\Program.cs:line 71
at TestConsoleApp.Program.Main(String[] args) in D:\svn\RivetCloud\server\RivetTranscode\TestConsoleApp\Program.cs:line 34
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()