Syncfusion.PresentationRenderer is not working to convert Powerpoint to PDF for some files

Hi Team,

I am using PresentationToPdfConverter.Convert(pptxDoc) to convert Powerpoint to PDF but getting below error for some files:


Image_4739_1705560661078


3 Replies

SB Sneha Biju Syncfusion Team January 19, 2024 07:31 AM UTC

Hi Donika,

From the given details, it is not enough to replicate the mentioned issue. Therefore, we recommend that you share the following things in order to replicate the reported issue:
1. Input document
2. Code snippet or a sample that reproduces the issue
3. Stack trace of the exception

By doing so, we will be able to analyze the situation further and provide you with a proper solution as soon as possible.

Regards,
Sneha.



DJ Donika, Jetwani January 22, 2024 08:18 AM UTC

Code snippet:

using var client = new WebClient();

var stream = new MemoryStream(client.DownloadData(fileUrl));

//Open the existing PowerPoint presentation.

using var pptxDoc = Presentation.Open(stream);

//Convert the PowerPoint document to PDF document.

using var pdfDocument = PresentationToPdfConverter.Convert(pptxDoc);

//Creates an instance of memory stream.

using MemoryStream pdfStream = new MemoryStream();

//Save the converted PDF document to memory stream.

pdfDocument.Save(pdfStream);

var pdfStreamArray = pdfStream.ToArray();

return File(pdfStreamArray, ContentTypes.PDF);


StackTrace:

Image_3677_1705907133829


Not allowing me to upload pptx file. But it is 10 MB file.



SB Sneha Biju Syncfusion Team January 23, 2024 06:44 AM UTC

Donika, thank you for sharing the details. According to our forum, the maximum file size for uploads is 30MB. Could you please let us know the kind of issue you are facing while uploading the input document?

If you are still experiencing difficulties in uploading the document, we suggest that you share it through Google Drive. Please upload the input document to your Google Drive account and share the link and credentials with us.


Loader.
Up arrow icon