Scan documents using the device camera with automatic image enhancement and cropping. The Median Document Scanner plugin enables document uploads and improves scan quality by using native image processing.
Key features
- Detects document edges and outlines in real time
- Automatically corrects angle, perspective, and aspect ratio
- Enhances text clarity and sharpness
- Crops and exports the document as a clean final scan
- Supports JPEG output in base64 format
The scanned image is made available as a base64 JPEG file through the Median JavaScript Bridge where it can be attached to a form or uploaded to your server asynchronously.
iOS scan and crop preview
Android scan and crop preview
Implementation guide
Initiate a document scan
Note: Replace CALLBACKFUNCTION with your JavaScript function name.
Handle the scanned image
Your callback function will receive an object with the following structure:
Example implementation
Here’s a sample code snippet that displays the scanned image output.
Last modified on December 3, 2026