Gateway Timeout Error when Converting Large PPTX Files to PDF

I’ve encountered an issue while using Aspose to convert PPTX files to PDF format. The .convert method works fine for files under 16MB, but when I attempt to convert larger files (specifically those over 16MB), I consistently run into a gateway timeout error. This is the method I am using:

with open(pptx_path, 'rb') as pres:
        powerpoint =
pdf_path = slides_api.convert(powerpoint, ExportFormat.PDF)

[where slides_api is an instance of SlidesApi]

  1. Timeout Adjustments: Is there a way to modify the PDF options, the slides_api configuration or another parameter to increase the time before a timeout occurs? If so, how can I implement this?
  2. Method Suitability: Is using slides_api.convert the best method provided by Aspose for this purpose, or is there a more suitable alternative that I should consider?
  3. Alternative Approaches: Given the file size limitations, would splitting the slides, converting them individually to PDF, and then merging them back together be my best option? If so, is there a more efficient way to accomplish this within the Aspose framework?

Any guidance, tips, or recommendations on how to tackle this issue would be greatly appreciated. I’m looking for the most effective way to convert large PPTX files to PDF without encountering timeout errors.

Thank you for posting the questions.

Aspose.Slides Cloud provides an asynchronous conversion API that uses an operation queue. This API can be useful for converting large files, which can take a significant amount of time. With the asynchronous API, you don’t have to wait synchronously for an operation to complete. Instead, you receive an operation ID, which you use to track the status of the operation.

More details and examples:
Track Conversion Status|Documentation

Thank you so much for your reply, I’ve been using this method that you sent - the slides async method seems to make a lot of API calls for just one conversion? Does each “.get_operation_status” or “.get_operation_result” make a call to the API?

I was also wondering what are the different status options for “.get_operation_status” - sometimes it seems to flip between “Created” and “Started” - what is the distinction between the two? I feel it’s not right that it seems to flip between them?

Thanks for your help!

I am working on your questions and will get back to you soon.

Thank you for your patience.

This API assumes that you call the start_convert method to initiate the conversion operation of a large presentation file, and then periodically request the operation status using the get_operation_status method with some time interval. When the conversion process finishes (whether canceled, failed, or completed), you check the result.

We have opened the following new ticket(s) in our internal issue tracking system and will consider the question according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESCLOUD-1937

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.


Please try using the latest version of Aspose.Slides Cloud SDK for Python. The problem should go away.