private Boolean ConvertToPDF() { PowerPoint.Presentation presentation = null; try { app = new PowerPoint.Application(); presentation = app.Presentations.Open(this.inputFile); presentation.ExportAsFixedFormat2(this.outputFile, PowerPoint.PpFixedFormatType.ppFixedFormatTypePDF); //SaveCopyAs(outFilePDF , PowerPoint.PpSaveAsFileType.ppSaveAsPNG); } catch (Exception ex) { Console.WriteLine(ex.Message + "" + ex.StackTrace); return(false); } try { // Exit without prompting the save dialog presentation.Close(); } catch (Exception ex) { Console.WriteLine(ex.Message + "" + ex.StackTrace); } if (File.Exists(this.outputFile)) { return(true); } else { return(false); } }