Timeout error converting PPTX to PDF using Graph API

redaLn80 0 Reputation points
2024-07-15T14:38:52.5533333+00:00

I'm trying to convert a PPTX file to PDF using the Microsoft Graph API:

ttps://graph.microsoft.com/v1.0/me/drive/items/{itemId}/content?format=pdf

But I receive a timeout error after 45 seconds with the following response:

{
    "error": {
        "code": "generalException",
        "message": "The operation has timed out.",
        "innererror": {
            "code": "General_Timeout"
        }
    }
}

The file I'm working with is about 30MB in size and contains 50 slides.

I'm having difficulty finding information about Microsoft Graph API limits for file conversion operations.

Any insights or documentation on this would be greatly appreciated.

Note:

A similar issue was reported regarding DOCX conversion to PDF and is still unresolved:

https://learn.microsoft.com/en-us/answers/questions/1644502/timeout-error-converting-docx-to-pdf

Microsoft 365 and Office OneDrive For business Windows
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,891 Reputation points
    2024-07-15T19:59:23.9733333+00:00

    Hello @redaLn80,

    Thanks for reaching Microsoft!

    I am able to convert a pptx file of size 37.8 MB to a pdf successfully using me/drive/items/{itemId}/content?format=pdf Graph API. Please refer the screenshot below:

    User's image

    The size of the pptx file I am converting is as below:

    User's image

    You could wait for some time and then test again. If the issue persists, check whether there is a problem with the API call step. Try calling the API in Graph Explorer or Postman with a user who has the required permissions. Also, some content within the file may not be supported for conversion. Verify that the content is compatible with the API’s conversion capabilities. If you’re writing custom code for the conversion, ensure that it’s correctly implemented.

    Hope this helps. If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.