SavePresentation API Does Not Fail when Uploading Bad PPTX

I use the SavePresentation API to convert an PPTX file from Google Cloud Storage to PDF.
When uploading a bad PPTX file, which fails the conversion on Online PowerPoint to PDF Converter, the API returns without an error, and an empty PDF file is created on the Google Cloud Storage.

See attached PPTX filebad.pptx.zip (36.7 KB)

@Ronnie_Lazar,
Thank you for contacting support. Could you please specify which Slides Cloud SDK did you use?

I use the SavePresentation API of slides cloud SDK

@Ronnie_Lazar,
Have you used this SavePresentation method from API Reference, or have you called it using some programming language?

I’m using the nodejs sdk.

@Ronnie_Lazar,
Thank you for the additional information. We will reply to you as soon as possible.

@Ronnie_Lazar,
I’ve reproduced the problem with converting the presentation to the broken PDF without any exception and added a ticket with ID SLIDESCLOUD-1401 to our issue tracking system. Our development team will consider improving the behavior of Aspose.Slides for such cases. You will be notified when the issue is resolved.

As a workaround, you should check the number of slides before exporting the presentation to other formats as shown below:

slidesApi.getSlides("bad.pptx").then((response) => {
    slideCount = response.body.slideList.length
    if (slideCount > 0) {
        // convert the presentation to PDF
    }
})
.catch(function (error) {
    console.error(error)
})

API Reference: GetSlides

The issues you have found earlier (filed as SLIDESCLOUD-1401) have been fixed in Aspose.Slides Cloud 22.3. You can check all fixes on the Release Notes page.