Skip to main content

source_encrypted

HTTP 422 · code: "source_encrypted" · type: https://docs.formfeed.dev/errors/source-encrypted

A source is password-protected. An encrypted PDF cannot be merged, watermarked or protected again, and an encrypted Word, Excel or PowerPoint file cannot be converted: Formfeed never asks for document passwords. detail names the source. Nothing was charged.

Example​

{
"type": "https://docs.formfeed.dev/errors/source-encrypted",
"title": "Source is encrypted",
"status": 422,
"detail": "rnd_7da09ab6cd9946b798c187c2a9350852 is password-protected; protect a document as the last step",
"code": "source_encrypted",
"location": null,
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}

Common causes​

  • Calling /pdf/merge, /pdf/watermark or /pdf/protect with the output of /pdf/protect, or with a render whose post set a password.
  • A password-protected PDF from the file library in sources or post.merge_after.
  • A password-protected Word, Excel or PowerPoint file sent to /pdf/convert (The document is password-protected), or uploaded as the file of a template.

How to fix it​

  • Protect last: merge and watermark first, then call /pdf/protect on the result. A render's post block already applies its steps in that order (merge, watermark, password).
  • For a library PDF, upload a copy without the password.
  • For an office document, remove the password in its application (in Word: File › Info › Protect Document › Encrypt with Password, then clear the field), convert, and protect the PDF with /pdf/protect if it needs a password.

Retry?​

No. The same request gets the same answer. Change the source, then send the request again with a new Idempotency-Key or without one: a 4xx answer is stored under its key for 24 hours, so the old key returns this problem again. See retrying.