1. An image forming apparatus, comprising: an image reading unit that reads an image of a document; a recording unit that forms an image on a recording medium based on image data obtained by a reading operation of the image reading unit; a detection unit that detects a predetermined operation restricting dot pattern formed on the document based on the image data obtained by the reading operation of the image reading unit, and detects a color of the operation restricting dot pattern when the operation restricting dot pattern is detected; a storage unit that stores, beforehand, a correspondence relationship between the color of the operation restricting dot pattern and a restriction detail for an operation of the image forming apparatus; and a control unit that reads, from the storage unit, the restriction detail corresponding to the color of the operation restricting dot pattern when the operation restricting dot pattern and the color thereof are detected by the detection unit, and then restricts the operation of the image forming apparatus in accordance with the restriction detail.