Lorixen.
EN

Document scanning in your business app: built-in or custom?

Short answer: For most business apps, use the scanners the phone platforms already provide: VisionKit's document camera on iOS and the ML Kit document scanner on Android. They handle edge detection, cropping and multi-page capture, and hand your app clean images (and, on Android, a PDF) with very little code. Build a custom camera only when you need to control the capture itself, such as forcing a specific document type, adding live guidance or embedding the camera inside your own screen. Spend your effort instead on file size, text recognition and uploads that survive poor reception.

A tradie photographing a signed job sheet, a driver capturing a proof-of-delivery docket, a customer sending a utility bill for an application: all of these are "scan a document" moments. Done badly, you get skewed, blurry photos of a thumb and a kitchen bench. Done well, you get a straight, readable page your back office can file without asking again.

What a document scanner actually does

A document scanner is more than the camera. It typically:

  1. Detects the page in the live camera view and outlines it.
  2. Captures automatically when the page is steady.
  3. Corrects perspective and crops to the page edges.
  4. Cleans up the image: contrast, shadows, sometimes stains or fingers.
  5. Handles multiple pages and lets the person retake or reorder them.
  6. Returns files to your app as images or a PDF.

Both platforms now offer this as a ready-made component.

How the built-in scanners work

iOS: VisionKit document camera

Apple's VNDocumentCameraViewController presents a camera interface that helps people scan physical documents page by page. Results come back as images by page number, which Apple notes your app can use to build a digital version of the document and export to PDF. There's also a property to check whether the current device supports document scanning, so you can fall back gracefully.

Android: ML Kit document scanner

Google's ML Kit document scanner provides a complete scanning flow with automatic capture, edge detection, rotation detection and editing tools for cropping, filters and shadow or stain removal. Google lists some notable properties (as of November 2026):

  • The UI, models and resources are delivered through Google Play services, so the impact on your app's size is low.
  • Your app doesn't need its own camera permission; the scanner uses the Play services camera permission, and the user decides which files come back.
  • Processing happens on the device.

The Android setup guide adds the practical options: a page limit, whether gallery import is allowed, results as JPEG and/or PDF, and three scanner modes from basic editing up to the full mode with image cleaning. It also states requirements worth checking against your users' devices: Android API level 21 or above and at least 1.7 GB of device RAM, below which the API returns an "unsupported" error.

iOS vs Android at a glance

iOS (VisionKit) Android (ML Kit document scanner)
UI provided Yes, full-screen scanner Yes, full-screen scanner
Edge detection and crop Yes Yes
Multi-page Yes, page by page Yes, with optional page limit
Output Images per page; your app can create a PDF JPEG and/or PDF
Gallery import No setting documented; add a separate photo picker Optional setting
Camera permission Check Apple's current requirements for your app Not needed by your app
Device check Property to test support Errors on unsupported devices (RAM, API level)
Customisation Limited Page limit, gallery import, editing mode

If you build with a cross-platform framework, look for a plugin that wraps both native scanners rather than one that reimplements scanning in its own camera view.

When a custom camera is worth it

The built-in scanners are designed for a general "scan a page" task. Consider building your own capture screen when:

  • You need live, specific guidance, such as "Fit the whole docket inside the frame" or detecting a particular form layout.
  • The camera must sit inside your own screen, alongside job details or a checklist.
  • You're scanning something that isn't a page: a meter, a serial plate, a label on a curved surface.
  • You need consistent output across both platforms down to the pixel, for a downstream system that's fussy about input.

A custom camera costs far more to build and test across devices. Start with the built-in scanner and switch only when real users hit its limits.

Getting text out: OCR

Scanning gives you an image; text recognition gives you data. Both platforms offer on-device options:

  • On iOS, the Vision framework's VNRecognizeTextRequest finds and recognises text in an image, and lets you specify which languages to look for.
  • On Android (and iOS), ML Kit's Text Recognition v2 recognises Latin, Chinese, Devanagari, Japanese and Korean scripts and returns structure as blocks, lines and elements.

Treat OCR output as a suggestion. Show the extracted values (a docket number, a total, a date) for the person to confirm before saving, and keep the original image as the record.

File size and quality

Scans can be large, especially multi-page PDFs from newer phones. Before uploading:

  • Decide the resolution you actually need. Readable text at A4 doesn't need full camera resolution.
  • Compress images to a sensible quality level and test that small print stays legible.
  • Use greyscale for text-only documents if colour adds nothing.
  • Cap the page count if your process only ever needs one or two pages.

Uploads on poor connections

Field apps in regional Australia often lose signal mid-job. Design for it:

  • Save the scan locally first, then upload in the background.
  • Queue and retry automatically when the connection returns, and show a clear status ("2 scans waiting to upload").
  • Upload in chunks or resumable requests for large files, so a dropout doesn't mean starting again.
  • Don't block the person from finishing the job while an upload is pending.
  • Confirm success only once the server has stored the file.

Setup checklist

  1. Choose built-in scanners per platform (or a plugin that wraps them).
  2. Set output format, page limits and editing mode.
  3. Add a device-support check and a fallback (a plain photo picker).
  4. Compress and name files consistently (job number, date, page).
  5. Add OCR only for fields you actually use.
  6. Build offline-first uploads with retry and status.
  7. Test with real documents in bad light, on older devices.

FAQ

Do the built-in scanners work offline?

Google states that the ML Kit document scanner flow runs on the device. For iOS, test VisionKit in airplane mode on your target devices; uploading obviously needs a connection.

Can people scan from their photo gallery instead?

On Android, the ML Kit scanner has a setting to allow or block gallery import. On iOS, add a separate photo picker if you need it.

Should we store the PDF or the images?

Store whichever your back office uses. A PDF suits multi-page records; images are easier for OCR and thumbnails. Some apps keep both.

Is OCR accurate enough to skip manual checking?

Not for anything that matters, such as amounts or reference numbers. Let OCR pre-fill fields and have a person confirm them.

Scanning tends to be a small feature with a big effect on the back office, and we can help you design the capture-to-upload flow for your app.

Sources

WhatsAppLet’s talk