Allin PDF Allin PDF
AI & Document Processing · 7 min

How to Remove Handwriting from Scanned Documents with AI in 2026

Learn how AI can remove handwritten answers from scanned exam papers, worksheets and forms and restore them to a clean, blank state. See how Gemini-based AI Document Restore compares with OCR and manual photo editing.

Key Takeaways

  • ✓ Best tool: Allin PDF's AI Document Restore uses Google's Gemini multimodal AI to identify handwriting and rebuild the page with only the printed content.
  • ✓ How it runs: Processing happens in the cloud and requires signing in with Google. Each run handles one page (a single image or a one-page PDF).
  • ✓ Use case: Teachers reuse exam papers, students practice on clean worksheets, offices turn filled-in forms back into blank templates.
  • ✓ Quota: Free accounts get 1 free restore in total (a one-time trial); Pro ($9.99/month or $59.99/year) gets 50 per day. Input can be PDF, JPG or PNG.

What is AI Handwriting Removal?

AI handwriting removal is the process of using machine learning models to identify and erase handwritten content (pen strokes, pencil marks, annotations) from scanned documents while preserving the original printed text, lines, and formatting. Unlike traditional image editing, which requires you to select and erase marks by hand, AI tools tell handwritten and printed content apart automatically using multimodal vision models.

AI Document Restore
A technology that uses a multimodal AI model (in Allin PDF, Google's Gemini) to analyze a scanned page, recognize the printed content while ignoring handwritten answers, notes and annotations, and then regenerate the page with only the printed content, effectively restoring it to a blank or clean state.

Why Remove Handwriting from Documents?

The most common use cases for AI handwriting removal include:

Market Insight: In East Asia (China, Japan, Korea), restoring exam papers is a common reason people look for PDF tools. Parents and tutoring centers scan completed tests to create reusable practice materials, a job that used to mean retyping the whole page or spending a long time in a photo editor.

How AI Handwriting Removal Works

Modern AI handwriting removal relies on multimodal vision-language models rather than traditional computer vision. Here's how the process works in Allin PDF:

  1. Upload: The scanned page (a photo or a one-page PDF) is rendered as an image (longest side up to 2400 px), and only that image is sent over an encrypted connection to Google's Gemini model. The original file is not uploaded.
  2. Content analysis: The AI analyzes the image to separate two categories: printed text, lines and layout on one side, handwritten content (ink strokes, pencil marks) on the other.
  3. Content extraction: The AI keeps only the printed content, such as text, borders, tables and formatting.
  4. Document regeneration: A clean PDF is generated with only the printed elements, laid out on the paper size you chose (A4, B4, Letter, etc.).

AI vs Traditional Methods: Comparison

Method AI Document Restore (Multimodal AI) Traditional OCR + Reformat Manual Photo Editing
Separating handwriting from print Automatic; works well on clearly printed papers Weak (OCR tries to read handwriting too) Exact, but depends on your own care
Effort Upload, pick a paper size, start Run OCR, then retype and reformat Erase every mark by hand, often many minutes per page
Handles complex layouts Yes (tables, multi-column text) Limited (mostly plain text) Yes (manual selection)
Preserves formatting Regenerates the page layout Often loses original formatting Original image preserved
Cost Free (1 restore in total) or Pro $9.99/mo (50 per day) Free (open-source OCR) Free (but time-intensive)
Technology Multimodal AI (Google Gemini) Tesseract OCR / traditional CV Photoshop / GIMP

Step-by-Step: Remove Handwriting with Allin PDF

  1. Open Allin PDF AI Document Restore and sign in with Google
  2. Upload one scanned page: a JPG or PNG image, or a one-page PDF
  3. Select the output paper size (A4, A3, B4, B5, 8K, 16K or Letter)
  4. Click "Start Restore" and wait while the AI processes the page
  5. Compare the result with the original, then download the clean PDF
  6. For a multi-page document, repeat the steps page by page
Quota Info: Free accounts can run AI Document Restore once in total, as a one-time trial. Pro subscribers ($9.99/month or $59.99/year) get 50 runs per day. Each run processes one page and uses one run of the quota. The iOS app offers the same feature with the same limits.

Supported Paper Sizes and Scenarios

Allin PDF lets you choose from several standard paper sizes for the output, covering common exam formats in different regions:

Paper Size Dimensions Common Use
A4 210 × 297 mm International standard documents and exams
A3 297 × 420 mm Large format exams and posters
B4 250 × 353 mm Japanese exam papers (試験用紙)
B5 176 × 250 mm Small notebooks and documents
8K (八开) 270 × 390 mm Chinese standard exam papers
16K (十六开) 195 × 270 mm Chinese smaller exam papers
Letter 216 × 279 mm US standard paper

Limitations and Tips for Best Results

AI handwriting removal works well on most printed papers, but results can vary in these situations:

For best results, scan documents at 300 DPI or higher, ensure even lighting without shadows, and use a flat scan surface. Phone camera scans work well if the image is sharp and evenly lit.

Privacy and Security

AI Document Restore is a cloud tool: an image of the page (not the original file) is sent over an encrypted connection and analyzed by Google's Gemini model, so you need an internet connection and a Google sign-in. Allin PDF does not store file contents and does not log file names or contents. For documents that must never leave your device, use the local tools (compress, merge, split, OCR), which process files in your browser without uploading them.

Frequently Asked Questions

Can AI remove pencil marks as well as pen ink?

Yes. Gemini looks at the whole page and keeps only what is printed, so pencil marks and pen ink are both treated as handwriting. Very faint pencil or marks that overlap printed text can occasionally slip through, so check the preview before you download.

Does AI Document Restore work on handwritten documents (no printed text)?

No. The tool is designed to separate handwriting FROM printed content. If the entire document is handwritten (like handwritten letters or notes), there is no printed text to preserve, so the result would be a blank page. The tool works best on printed documents with handwritten additions.

Can I restore a multi-page PDF in one go?

No. Each run processes one page, and each run counts once toward your quota (1 restore in total on Free, 50 per day on Pro). For a longer test, split the PDF into single pages and restore them one at a time.

Can I use this on a photo taken with my phone instead of a scanner?

Yes. JPG and PNG photos are accepted and work well as long as the image is sharp and evenly lit. For best results, hold the phone directly above the page, fill the frame with the paper, and avoid shadows.

Related Tools

AI Document Restore

Remove handwriting from scanned papers with Gemini AI.

OCR Text Recognition

Extract text from images and scanned PDFs.

PDF Compressor

Reduce PDF file size locally, no upload needed.