I am in the process of converting some powerpoint files given to me into pdfs. We are getting the following exception:
Value cannot be null.
Parameter name: encoder
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 ?.?.??(GraphicsPath graphicsPath, ? lineParam, ? fillParam)
at Aspose.Slides.Ellipse.?(? canvas, ArrayList rotations, renderingContext)
at Aspose.Slides.GroupShape.?(? 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)
Is there a better way to have the library handle internal exceptions like this? In our case it would be better not to output a specific slide into the output pdf, but still output everything else that it can, than to just get a fatal error because of this.
The code I’m using is:
var slideLic = new Aspose.Slides.License();
slideLic.SetLicense( “Aspose.Total.lic” );
var presentation = new Presentation( InputFile );
presentation.Save( newfile, Aspose.Slides.Export.SaveFormat.Pdf );
Thanks.