Issue:
You’re receiving Error 442 when trying to process a file hosted in Salesforce through the PDF.co API.
This error usually happens when the Salesforce file link provided does not point directly to the file’s binary content (instead pointing to a preview or download page), causing the API to reject it as an invalid file type.
How to fix it
Please follow this guide to obtain a direct download link for your Salesforce file: How to Derive a Direct Link from Salesforce File URL
Use that direct file link in your API request instead of the original link.
Helpful tips:
Test the direct link in a browser’s incognito mode – it should download the file without needing login.
Confirm the file is a supported format (PDF, JPG, etc.).