A non-transitory computer-readable storage medium storing a computer program for controlling a printing apparatus including a reading unit and a printing unit to perform a method, the method comprising:
- performing, by the reading unit, reading at a reading position and then generating, by the reading unit, image data;
- printing, by the printing unit, an image on a sheet based on the image data generated by the reading unit;
- determining whether image data includes an abnormal pixel, the second-image data being generated by the reading unit with no document placed at the reading position;
- and
- performing control so that the determination is performed in a case where a type of the sheet on which the image is to be printed by the printing unit is a first type of sheet, and performing control so that the determination is not performed in a case where the type of the sheet on which the image is to be printed by the printing unit is a second type of sheet which is different from the first type of sheet.