Batch cleaning of scanned documents with gray background: making archive images have a white background and more prominent text


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-08-20 06:38:17
Content note: This article reflects the software version available when it was published. Interfaces and features may change with updates; please refer to the current software. If you find an error, please let us know.
Software featured in this articleHeSoft Doc Batch Tool
Free DownloadSoftware IntroductionUser Guide

After scanning archives, forms, and paper documents, gray backgrounds, shadows, and paper textures are often left behind. When there are many files, it is not practical to adjust them one by one. This article starts from office archiving scenarios and introduces a method for uniformly cleaning scanned document backgrounds using batch processing software: enter "Image Effect Enhancement," import a single file or an entire folder, enable "Text Clarity (Binarization)," adjust the black-and-white threshold based on a sample, then set the output location and execute in batches. The article also explains practical considerations such as grouped processing, retaining original images, and checking thin-line text.

In archive digitization, administrative document sorting, and daily office work, paper documents often need to be scanned into images. Due to paper aging, repeated copying, or insufficient lighting when photographing, the resulting images tend to have gray backgrounds, shadows, creases, and paper texture. The problem may not be obvious for a single page, but when dozens of pages are placed together, uneven brightness and insufficiently prominent text can directly affect browsing and printing results.

The traditional approach is to open each image one by one and then separately adjust brightness, contrast, or black-and-white effects. This method is acceptable for a small number of files, but it creates a large amount of repetitive work when dealing with batches of JPG and JPEG scans. This article will explain, based on the actual interface, how to use the office software HeSoft Doc Batch Tool to batch-remove gray backgrounds from scanned documents. Through the text clarity binarization setting in "Image Effect Enhancement," multiple gray pages can be centrally converted into black-and-white images with bright backgrounds and prominent text.

Applicable scenarios: archive scanning, form sorting, and batch printing

The core of this method is to distinguish text from the paper background based on a brightness threshold, so it is especially suitable for document pages dominated by black or dark characters. Common applications include:

  • Digitization of administrative archives: batch processing of scanned images of notices, policy documents, meeting records, and registration materials.
  • Historical material sorting: improving problems such as yellowing old paper, uneven base color, and grayish copies.
  • Business form archiving: enhancing text and lines in application forms, approval forms, checklists, and survey forms.
  • Pre-print preprocessing: reducing full-page gray backgrounds to make black-and-white printouts cleaner.
  • Electronic document compilation: unifying the visual effect of pages before inserting images into Word, doc, docx, or combining them into PDF.

Binarization is not suitable for all images. Photos, color promotional pages, certificates containing important colored seals, and data charts that depend on grayscale levels for expression should not be directly processed as black-and-white documents. For mixed materials, text-based pages should first be separated from color pages, and then suitable processing methods should be selected for each.

Effect preview: how gray archive pages become clear and bright

Before processing: dull paper and limited text contrast

The example original image is a scanned page of a contract. The main body of the page has an obvious light gray background, and there are also relatively dark shooting shadows and texture at the bottom. The title and body text can be read, but visually it is not clean enough, and long viewing can easily cause fatigue.

image-Scan documents to remove gray backgrounds,make archive image backgrounds white,enhance batch image effects,make scanned text clearer,and process black-and-white document images

If such images are directly inserted into a document or printed, the gray background is usually retained. Multi-page materials may also show obvious color differences because each shot has different exposure. Therefore, when organizing in batches, what is needed is not only to make a single page "look better," but also to establish a unified set of rules that can be applied repeatedly.

After processing: the background is close to white and character outlines are more prominent

After using text clarity binarization, the large gray paper background is converted into bright white, while the contract title, paragraphs, numbering, and lines are retained in dark color. The page becomes closer to the common black-and-white scanning effect in office archiving.

image-Scan documents to remove gray backgrounds,make archive image backgrounds white,enhance batch image effects,make scanned text clearer,and process black-and-white document images

This processing can improve page tidiness and black-and-white contrast, but the result depends on the source file. As long as distinguishable character outlines still exist in the original image, a reasonable threshold can usually highlight them; if the characters themselves are already severely out of focus, overexposed, or blocked, the software cannot recover missing information out of thin air.

Operation steps: establish a reusable batch processing workflow

Step 1: Find the entry point for image effect enhancement

Open HeSoft Doc Batch Tool , and first enter "Image Tools" from the left navigation. The main area will display various image-related tasks, including format conversion and "Image Effect Enhancement." Click "Image Effect Enhancement" to enter the operation page.

image-Scan documents to remove gray backgrounds,make archive image backgrounds white,enhance batch image effects,make scanned text clearer,and process black-and-white document images

This step requires distinguishing between "effect enhancement" and "format conversion." Converting images to PNG, JPG, JPEG, BMP, or TIFF mainly changes the file format and does not mean the gray background will automatically disappear. This tutorial is about adjusting how text and background are presented, so you should enter the image effect enhancement task.

Step 2: Import scanned materials by file or folder

The first stage of the task is "Select records to process." The top of the page provides "Add files" and "Import files from folder." When materials come from multiple directories, you can use "Add files" to select them together; if an archive project has already been placed in a separate folder, folder import is more suitable for batch operation.

image-Scan documents to remove gray backgrounds,make archive image backgrounds white,enhance batch image effects,make scanned text clearer,and process black-and-white document images

After import, the files will be displayed in the list. The screenshot example contains 10 contract JPG files, with information such as name, path, extension, and time listed. At this point, checking the list should be treated as part of the formal operation rather than skipped directly: the record count should match the number of planned pages, the file names should reflect the correct order, and colored attachments or irrelevant images should be removed in advance.

If only one page is selected by mistake, you can use the delete operation on the right side of the corresponding record; if the entire directory is wrong, you can use "Clear" and then add again. After checking, click "Next" to enter parameter settings.

Step 3: Enable text clarity binarization

The processing options page provides multiple effect switches. To clean up gray scanned documents, find "Text clarity (binarization)" and enable it. After enabling, adjust the black-white judgment threshold using the slider below. The setting in the screenshot is 45%, with "Pure white" on the left and "Pure black" on the right.

image-Scan documents to remove gray backgrounds,make archive image backgrounds white,enhance batch image effects,make scanned text clearer,and process black-and-white document images

This threshold can be understood as making choices about grayscale content: lighter areas are more likely to be classified as white background, while darker areas are more likely to be retained as black text. Moving toward "Pure white" helps clean up light gray backgrounds and slight shadows, but may also remove light-colored writing; moving toward "Pure black" can preserve more lighter characters, but also tends to make stains and paper texture black.

The 45% in the screenshot only corresponds to the example contract and cannot be mechanically applied to all archives. It is recommended to start testing from near the middle, then fine-tune according to the paper and handwriting. If the files come from the same scanner and the same batch of paper, unified parameters can usually be used; if some pages are copies and some are mobile phone photos, consider grouping them by source or brightness level.

The current interface also displays options such as rotation angle, opacity, shrink or enlarge, brightness, contrast, and sharpening level. If there are no other problems with the direction, size, and clarity of the original image, you can enable only text clarity to keep the processing goal single. If brightness or sharpening does need to be adjusted, small-batch testing should also be completed first, and it is not advisable to enable all effects at once.

Step 4: Set a safe output location

After completing the parameter settings, click "Next" to enter "Set save location." To protect the original archives, it is recommended to save the results to a new directory without overwriting or replacing the source files. The output directory can be named in the format of "project name + processing status," for example, "2025 Contracts_Black-and-White Enhanced Version."

Keeping the original images has two values: first, if text loss is found, the threshold can be reselected; second, when important materials need to be traced, the unprocessed original scan results can still be viewed. The enhanced version can be used for daily reading and printing, while the original version is retained as basic material.

Step 5: Execute the batch task and check key pages

After entering the "Start processing" stage, execute the task, and the software will apply the same settings to each imported image one by one. Compared with manual retouching, users do not need to repeatedly open, adjust, and save each page. The larger the number of files, the more obvious the time saved by batch processing.

After processing is complete, open the output directory for quality inspection. It is recommended to use a "sampling + key pages" approach: randomly view several pages, while also checking the lightest pages, darkest pages, pages with table lines, and pages containing signatures or seals. Focus on confirming whether small-font text, page numbers, amounts, dates, line frames, and punctuation are complete.

If some pages still look gray, do not immediately move the slider greatly; first adjust toward pure white in a small range. If fine characters or light lines are missing, adjust appropriately toward pure black. If the two types of pages cannot be balanced, it means they are not suitable for sharing the same threshold and should be split into different batches.

Common questions and precautions

What is the difference between removing gray backgrounds from scans and simply increasing brightness

Increasing brightness makes the entire image brighter together, and dark text may also be affected; binarization classifies pixels into clearer black or white based on a threshold, which is suitable for text-based documents. The two have different goals, and the final choice should be made based on the content of the material.

Why cannot all archives be set to the same value

Scanning equipment, paper color, ink depth, and ambient lighting are all different. The 45% parameter works well in the example, but does not mean it is equally effective for yellowed old archives, light copies, or pencil records. Establishing a sample testing process is more important than remembering a fixed value.

What happens to colored seals after processing

Binarization will weaken or remove the original color information, and colored seals may be converted into black-and-white outlines of varying depth, with overly light parts at risk of being lost. When the color of a seal has business significance, the original color image should be retained, or the corresponding page should be excluded from this task.

Can it improve the accuracy of subsequent text recognition

A cleaner background and more obvious character contrast are generally beneficial for subsequent OCR recognition, but the recognition effect is also related to language, font, resolution, and page tilt. The operation in this article only completes image enhancement and does not mean that the text has been extracted. The recognized names, numbers, amounts, and dates still need to be manually reviewed.

How to reduce the risk of rework when there are many image pages

Do not directly execute untested parameters on a complete archive. First select three to five representative pages, including the brightest, darkest, lightest handwriting, and most complex tables, complete trial processing, and check the results. After confirming that the threshold can accommodate these pages, execute the full batch task.

Is a backup needed before processing

A backup is recommended. Although a separate save location can be set in the process, a good office habit is to always keep the original scans and place the enhanced results in a new directory. For important materials, the processing date and parameters can also be recorded to facilitate later regeneration or verification.

Summary

The difficulty of cleaning gray backgrounds from scanned documents lies not in how to whiten a single page, but in how to process a large number of pages efficiently and uniformly. HeSoft Doc Batch Tool , as office software oriented toward file batch processing, can centrally import JPG, JPEG and other scanned images through "Image Effect Enhancement," enable "Text clarity (binarization)," set a threshold once, and then apply it in batches, thereby reducing page-by-page retouching and repeated saving.

In actual use, it is recommended to first back up the original files, then select representative pages to test the effect near 45%, and fine-tune according to the background and handwriting conditions. After confirming that the body text, thin lines, page numbers, and signature or seal areas can all be retained normally, select the complete folder for batch processing. Through the workflow of "classify first, test, then batch, and finally review," it is possible to more reliably obtain archive images with bright backgrounds and prominent text, and improve the efficiency of data sorting, printing, and electronic archiving.


Keyword:Scan documents to remove gray backgrounds , make archive image backgrounds white , enhance batch image effects , make scanned text clearer , and process black-and-white document images
Creation Time:2026-08-20 06:37:56
Software featured in this articleHeSoft Doc Batch Tool
Free DownloadSoftware IntroductionUser Guide
Content note: This article reflects the software version available when it was published. Interfaces and features may change with updates; please refer to the current software. If you find an error, please let us know.