1. An image forming apparatus comprising: a printing unit configured to perform printing on a sheet based on print image data; a reading unit configured to read the sheet on which printing has been performed by said printing unit to thereby acquire inspection product image data; a generation unit configured to generate reference image data formed by excluding data representative of image portions which cannot be read by said reading unit, from the print image data; and a determination unit configured to determine whether or not the sheet on which printing has been performed is free from defective printing by comparing the inspection product image data and the reference image data.