an image forming device includes a main body unit ; an image forming device disposed in the main body unit ; a first structural member capable of dividing and moving relative to a third structural member ; a second structural member capable of dividing and moving relative to the third structural member and the first structural member ; a first transport path situated between the first structural member and the second structural member ; a second transport path situated between the second structural member and the third structural member ; a sensor for detecting the medium ; a first positioning unit for restricting a movement of the second structural member ; a second positioning unit for engaging the first structural member with the third structural member ; and a control unit for sending a signal to restrict a movement of the first structural member to a specific position based on a detection result of the sensor .