🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 31, 2026

How to Scan Documents in Gravity Forms (Crop, Straighten and Send One PDF)

GravityExtra
How to Scan Documents in Gravity Forms (Crop, Straighten and Send One PDF)

Asking people to send paper documents through a form is common: payslips and bank statements for a tenancy application, a signed contract, receipts for an expense claim, a doctor’s note, a delivery note, a school form. And almost every time the result is the same. Visitors take photos with their phone at an angle, on a kitchen table, with a shadow across the page. Five pages arrive as five separate image files, some sideways, some too dark, and someone in the office has to crop, rotate and combine them before anyone can read them.

This guide shows how to collect paper documents properly in Gravity Forms: visitors scan each page in the form, every page is cropped and straightened, and all pages arrive as one clean PDF with the entry. We use the Gravity Forms Document Scanner add-on, and we also explain when a simple upload or a photo field is the better choice.

Why photos of documents go wrong

A phone photo of a page is not a scan. The camera sees the page from an angle, so the rectangle of paper becomes a trapezoid and the text gets smaller towards the top. The desk, the hand and the shadow are all in the picture. The light is uneven, so white paper turns grey or yellow. And a phone happily saves a page turned sideways. None of this matters for a holiday picture, but it makes documents hard to read, hard to print and hard to file.

Multi-page documents add another problem. A three-page bank statement uploaded through a normal file field arrives as three images, in whatever order the visitor picked them. Reviewers open them one by one, and when the entry is forwarded or archived the pages easily get separated.

What a document scanner field does

A document scanner field brings the scanning app into the form. The visitor captures one page after another with the rear camera, or picks photos already on the device. For every page the field:

  • finds the page in the photo: the four corners of the paper are detected automatically;
  • lets the visitor check the corners and drag any of them onto the paper;
  • straightens the page with perspective correction, so the trapezoid becomes a flat rectangle in A4 or Letter proportions;
  • cleans it up in colour, grey or crisp black and white;
  • rotates it when it was photographed sideways.

Pages are listed in order, can be reordered, adjusted, retaken or deleted, and on submit they become one PDF stored with the entry. Reviewers get one file that reads like a proper scan.

Setting it up in Gravity Forms

After installing the Document Scanner add-on and activating its licence, open your form and add a Document Scanner field from the Advanced Fields group. Give it a label that tells people what to scan, such as “Proof of income”, and a description that lists the pages you need. Then choose the settings that fit the documents:

  • Max pages and max size: a payslip and two statements need perhaps six pages; a contract may need twenty. Both limits are checked in the browser and again on the server.
  • Paper size: A4 or US Letter. Straightened pages get these proportions and the PDF uses this size.
  • Resolution and quality: Standard (about 150 dpi) is sharp enough for forms and letters and keeps the PDF small; High (about 200 dpi) is there for small print.
  • Default look: Black & white is the most readable for text-only documents; Colour suits documents with stamps, logos or highlighted lines.
  • PDF file name: a pattern with merge tags such as application-{Name:1}-{entry_id}. A short random part is added so links cannot be guessed.
  • Notification attachment: attach the PDF when “Attach uploaded files” is on, to every notification, or never.

What the visitor does

On a phone the visitor taps Scan with camera. The rear camera opens with a page frame drawn over the picture; they lay the page flat, fit it in the frame and tap Capture page.

The camera screen of the Document Scanner on a phone-sized dialog: the live camera picture with a dashed A4 page frame, and the Done and Capture page buttons
The camera with the page frame: line the paper up and press Capture page.

The photo opens in the corner editor. The page has already been found: four round handles sit on the corners of the paper and a preview shows the straightened result. If a corner is off, the visitor drags it into place; Rotate fixes a sideways page, and the look can be switched between colour, grey and black and white. One tap on Add page and the camera is back for the next page.

The corner editor: a photo of a payslip lying skewed on a wooden desk with the four blue corner handles on the corners of the paper, and the straightened result preview with Rotate, Use whole photo, Find edges again and the Colour, Grey and Black and white looks
The corners are found automatically; drag any of them, then add the page.

On a computer the same editor opens for photos picked from a folder, several at once if needed. Each page is uploaded as soon as it is added and appears in the list with a thumbnail. The visitor can drag pages into a different order, move them with buttons, adjust a page again, retake one or delete it.

The scanned page list in the form: four straightened page thumbnails numbered 1 to 4 with their size, Move up, Move down, Adjust, Retake and Delete buttons, and the page count
Every page is listed in order and can be moved, adjusted, retaken or deleted.

How the edge detection works

There is no outside service involved. The detection is a small piece of code that runs in the visitor’s browser: the photo is turned grey and smoothed, strong edges are found, the area that the edges close in is measured and the largest four-cornered shape is chosen as the page. Each side is then fine-tuned on a sharper copy of the photo, which places the corners to within a pixel or two on a typical phone photo. Light pages on a light table still work because the method looks at edges rather than only at brightness, and when nothing page-like is found the editor says so and keeps the whole photo for the visitor to crop by hand.

Straightening uses a perspective transformation: the four corners are mapped onto the corners of a rectangle with A4 or Letter proportions, and every pixel of the result is sampled from the right spot of the photo. The black and white look uses an adaptive threshold that compares each pixel with its own neighbourhood, so a shadow across the page does not turn half of it black.

What arrives with the entry

When the form is sent, the server checks every page again: each page must exist, belong to this field and be a real image, and the page and size limits must hold, so a forged request cannot get around them. Then the pages are assembled into one PDF in the right order, one page per scanned page, never cropped. The PDF goes into the form’s normal upload folder; the entry shows a link with the page count and a thumbnail of each page.

The entry screen: the Scanned PDF link with the page count and size, and a thumbnail of each of the four pages
The entry shows the PDF link and a thumbnail of each page.

Notifications can carry the link with {Scan:4:url} and the page count with {Scan:4:pages}, and the PDF can be attached to the e-mail. A confirmation such as “Thanks, we received {Scan:4:pages} pages” tells the visitor at once that everything arrived.

Problems are shown, never hidden

A good scanner says what went wrong. If a picked file is not an image, its name is shown and it is not added. If a page looks blank or far too dark, it is flagged in the list so the visitor can retake it. If the page edges cannot be found, the whole photo is kept and the visitor is told. If an upload fails, the page shows the reason and a Try again button, and the form waits until every page is uploaded. Nothing is dropped silently, which is exactly what you want when the document is a signed contract.

Multi-page forms, drafts and packets

The scanner can sit on any step of a multi-page form, and the pages stay when visitors go back and forth. With Save and Continue switched on, the page list is saved in the draft and the resume link brings the pages back. If you also use our Document Packet add-on, the scanned PDF is one of the files it can add to the combined packet it builds after submission.

Document scanner, photo field or file upload?

All three have their place, and the choice is easy once you know what each one stores:

  • The core File Upload field stores the files the visitor picks, exactly as they are. It is the right choice for files that already exist as PDFs or office documents.
  • Our Photo Capture field takes photos with the camera and stores each one as a picture, optionally with a document frame to help line it up. It is right for photos of damage, products, people and places, where the photo itself is the point.
  • Document Packet works after submission, on the admin side: it merges the entry summary and the uploaded files into one packet for your team.
  • Document Scanner is for paper: several pages captured in the form, each one found, straightened and cleaned up, delivered as one PDF.

Tips for clean scans

  • Ask for a darker surface: a page on a dark table is found instantly; put that hint in the field description.
  • Prefer black and white for text: it gives the smallest, most readable PDF for letters, statements and forms.
  • Keep the limits realistic: set max pages to what the document really needs, and the size limit to about half a megabyte per page at Standard resolution (a straightened page is usually 150 to 400 KB).
  • Use the page count in the confirmation: it reassures the visitor and catches a missed page early.
  • Name the file well: a pattern with the applicant’s name and the entry id makes the PDF easy to find later.

Privacy and performance

All image work runs in the visitor’s browser and the PDF is made on your own WordPress site with a bundled library; pages are never sent to an outside service. Unfinished pages wait in a private folder that the web server does not serve and are deleted after 30 days. For every setting in detail, read the Document Scanner documentation.

Wrapping up

Paper is not going away, but crooked phone photos in five separate files do not have to be your problem. With a document scanner in the form, visitors capture each page, check the corners, and send one clean PDF, and your team gets documents they can read, print and file straight away. Ready to try it? Get Gravity Forms Document Scanner.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr