An image forming apparatus has a generating unit that generates an identifier image according to a print command received from an outside and an image forming unit that forms, on a recording medium, an image based on the print command and the identifier image generated.