Open a clear photo
Choose a local image up to 24 MiB or use the camera picker on a device that offers capture. A contrasting surface makes the edges easier to see.
Flatten a photo of a document using four paper corners and download a one-page PDF with a Three.js preview.
The guide
Open a photo of a paper document from your device. Suggest the four corners or position them yourself, then flatten the area into a rectangular page. Inspect the result before saving a PDF.
A concrete input and expected output from the current implementation.
Input
Use the example of pale paper on a dark surface. Select Detect paper edges, check the corners, and choose Flatten page.
Expected output
The corrected preview trims the surrounding surface and straightens the selected paper. Download PDF saves the raster scan as a single page.
The four coordinates map the photographed quadrilateral to a rectangle.
Choose a local image up to 24 MiB or use the camera picker on a device that offers capture. A contrasting surface makes the edges easier to see.
Detect paper edges suggests corners for a bright page against a darker area. Adjust the horizontal and vertical position sliders if any marker misses the page.
The viewer resamples the selected quadrilateral to a rectangle. Compare the source and corrected result in Three.js, then download one PDF page with the image embedded.
Use the individual sliders to move the four corner markers to the four physical corners before flattening again.
It works best with bright paper on a plain, darker surface. Shadows and other bright objects may require manual adjustment.
The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.
Sent. Thank you.