One of the most foundational features in document imaging is image cleanup (also called preprocessing). When paper documents are scanned to digital form there are almost always imperfections. The paper can be at an angle, hole punches leave large black dots, folded paper introduces lines, and at the very least dust speckles litter small, dark dots throughout the image. All of these can have an adverse trickle-down effect on many other algorithms such as OCR, Forms, Barcode, Compression and more.
There is one caveat with most document imaging libraries: the document images must be black and white. While technically true for LEADTOOLS as well, it's not a limitation whatsoever. Each of the LEADTOOLS document cleanup functions return information on what it has done. For example, you can get the deskew angle, rectangle to crop, or region to fill and then apply those same operations on a color image: