With the great advantages of digitization, more and more documents are being transformed into digital representations. Most content digitization of documents is performed by scanners or digital cameras. However, the transformation might degrade the image quality caused by lighting variations, i.e. uneven illumination distribution. In this paper we describe a new approach for text images to compensate uneven illumination distribution with a high degree of text recognition. Our proposed scheme is implemented by enhancing the contrast of the scanned documents, and then generating an edge map from the contrast-enhanced image for locating text area. With the information of the text location, a light distribution image (background) is created to assist the producing of the final light balanced image. Simulation results demonstrate that our approach is superior to the previous works of Hsia et al. (2005, 2006).