1. An image forming apparatus comprising: a printing device that prints an image represented by image data onto a recording medium; an image orientation identification device that identifies orientation of the image represented by the image data; a medium orientation identification device that identifies orientation of the recording medium for use in printing by the printing device; a conversion device that converts the image data, when there is inconsistency between the orientation of the image identified by the image orientation identification device and the orientation of the recording medium identified by the medium orientation identification device, such that the orientations of the image and the recording medium are consistent with each other; and a prohibition device that prohibits operation of the conversion device under a predetermined condition.