Overview
The 408 – Request Timeout error typically occurs when the input file is too large or the task takes longer than 30 seconds to process in synchronous mode.
This can also happen if your file is hosted on external storage (e.g., Google Drive, Dropbox) with limited or delayed access, preventing PDF.co from retrieving and processing it in time.
Common Causes
The input file is too large and exceeds the 30-second processing limit.
External file storage (Google Drive, Dropbox, G Docs, etc.) may limit or delay file access.
The document has too many pages, increasing processing time.
Network or connectivity issues during file download or processing.
Recommended Solutions
1. Use Asynchronous (Async) Mode
When using the API directly, set:
"async": true
This allows the job to run beyond the 30-second timeout, for up to 45 minutes.
Your job will run in the background.
Check the job status using the
/v1/job/checkendpoint with the returnedjobId.Learn more about async processing here.
2. Use cache: for External File Links
If your file is stored on Google Drive, G Docs, Dropbox, or similar platforms, access may be restricted or delayed.
To solve this, add cache: before the file URL in your request.
Example:
"url": "cache:https://www.dropbox.com/your-file.pdf"
💡 Alternatively, you can use PDF.co’s built-in file storage for a faster and more stable file retrieval.
3. Specify Page Ranges for Large PDFs
For large PDFs with many pages, try limiting the page range to reduce processing time.
Use the pages parameter:
"pages": "1-5"
You can get the total page count using the /v1/pdf/info endpoint.
4. For Zapier Users: Enable Auto-Retry
If you're using Zapier, simply turn on “Autoreply” to automatically retry the request if it times out. This helps in handling temporary network or file access delays.
Summary of Best Practices
Use
async: truefor large or complex files.Use
cache:prefix or PDF.co storage for stable file access.Limit page ranges for faster processing.
Enable auto-retry in Zapier workflows.
By following these steps, you can effectively minimize or completely avoid 408 errors during your PDF.co processing tasks.