...
We are aware of the recently disclosed PHP2Shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619) and can confirm Filestack is not impacted by these vulnerabilities.

What Is Document Detection?

Document Detection is a Filestack intelligence task that finds a document in a photo, straightens it so it fills the image, and cleans it up so that OCR reads the text more accurately.

What the Task Does

  • Finds the edges of the document in the photo
  • Corrects the perspective so the document fills the output image
  • Reduces noise and distortion (preprocessing)
  • Returns the coordinates of the document when coords:true is set

How It Runs

Synchronously in the Processing API with doc_detection, or as a task in Filestack Workflows. The Processing API request needs a security policy and signature. Defaults: coords:false, preprocess:true.

Image Size Limit

Input images can be at most 2000×2000 pixels. Chain the resize task before doc_detection to bring a larger image within the limit.

Use Cases

  • Preparing phone photos of documents for OCR
  • Digitizing receipts, forms and IDs
  • Cropping scanned pages to the document edges

Documentation

Read the Filestack documentation page for this term.

Open the documentation