converting PPT to Pdf

I am trying to convert PPT to PDF , when I try from the local machine it works fine, but same code when we deploy to the server I am getting the following error.

Error in method GetLLPPTReport - Value cannot be null. Parameter name: metafile at Syncfusion.Pdf.Graphics.PdfMetafile..ctor(Metafile metafile) at Syncfusion.PresentationToPdfConverter.PresentationToPdfConverter.DrawSlide(PdfDocument pdfDocument, ISlide slide, IPresentation presentation) at Syncfusion.PresentationToPdfConverter.PresentationToPdfConverter.Convert(IPresentation presentation, PresentationToPdfConverterSettings settings)

I tried all the possible ways not able to figure out the exact issue.

My code is 

 IPresentation pptxDoc = Presentation.Open(PPTFilePath);

 PdfDocument pdfDocument = PresentationToPdfConverter.Convert(pptxDoc);
 pdfDocument.Save(stream);
 pdfDocument.Close(true);




3 Replies

HC Hemalatha Chiranjeevulu Syncfusion Team June 16, 2021 03:46 PM UTC

Hi Kiran,

Thank you for contacting Syncfusion support.

We tried to reproduce the reported exception issue when converting Presentation document to PDF but, it works properly at our end. For your reference, we have attached the sample application which we used at our end to reproduce the reported exception issue and it can be downloaded from the below link
https://www.syncfusion.com/downloads/support/forum/166413/ze/PPTXToPDF-398231379

We have also ensured the above application by hosting it in local IIS server. We suspect that the reported issue might be due to file level information of input Presentation document which used at your end. So, could you please share the below things at your end
1. Input Presentation document which used at your end
2. Server details
3. Syncfusion product version which used in your application.
This will be more helpful to reproduce the exact issue at our end. Thereby, we will analyze further on the reported problem and will share more details.

Please let us know if you have any other questions.

Regards,
Hemalatha C



ST Stephenson November 1, 2021 11:16 AM UTC

Try to convert files from ppt to pdf with ppt to pdf converter to see if the files are alright. This could be a problem in file extension. It could solve the problem if the files are corrupted. 



MR Manikandan Ravichandran Syncfusion Team November 2, 2021 10:28 AM UTC

Hi Stephenson,

Thank you for your update.

As mentioned in the previous update, could you please share the requested details to reproduce and investigate your problem at our end.

Please share the below things for further investigation.
1. Input Presentation document which used at your end
2. Server details
3. Syncfusion product version which used in your application.

Please let us know if you have any other queries.

Regards,
Manikandan Ravichandran 


Loader.
Up arrow icon