Skip to main content

What Happened

The document or template downloaded from the document resource’s URL is not a valid PDF or DOCX file.
The response includes a detail property with more information about this error.

How to Fix

  • Verify that the URL points to an actual PDF or DOCX file. The URL may be returning an HTML error page or redirect instead of the file content.
  • If you used the Uploads resource, ensure the file was uploaded as binary with the correct Content-Type header (application/pdf or application/vnd.openxmlformats-officedocument.wordprocessingml.document).
  • Download the file from the URL and verify it opens correctly in Adobe Acrobat Reader (for PDFs) or Microsoft Word (for DOCX).
  • If the DOCX file was created with software other than Microsoft Word (like Google Docs or LibreOffice), open it in Microsoft Word and save it again. This resolves most compatibility issues.
  Still stuck? Contact support.