A three-dimensional printer having a door lock structure, comprising: a housing, the housing including a chamber inside and an opening communicating with the chamber; a door panel pivotally connected to the housing, the door panel being movable between a closed position which closes the opening and an open position which exposes the opening; a door lock structure disposed corresponding to the door panel, the door lock structure including a locking position and an unlocking position; an actuator connected to the door lock structure and driving the door lock structure to lock or unlock the door panel; a formation nozzle member installed in the chamber and being movable therein, the formation nozzle member printing a laminated object; a coloring nozzle set installed in the chamber and being movable therein, the coloring nozzle set coloring the laminated object; an exhaust fan structure assembled to the housing and communicating with the chamber, the exhaust fan structure drawing air from the housing and discharging the air to the outside of the housing; and a controller electrically connected the actuator, the formation nozzle member, the coloring nozzle set, and the exhaust fan structure, wherein the controller controls the actuator to drive the door lock structure to the locking position; when the door panel is at the closed position, the door lock structure locks the door panel, and the controller is allowed to activate a printing mode; the printing mode including, by using the controller, controlling the formation nozzle member and the coloring nozzle set to perform three-dimensional printing and controlling the exhaust fan structure to keep operating; the controller activates an unlocking mode after a predetermined time if the controller determines that operation of the coloring nozzle set is stopped, wherein the controller controls the exhaust fan structure to keep operating during said predetermined time; and in the unlocking mode, the controller controls the actuator to drive the door lock structure to the unlocking position to release the door panel. a housing, the housing including a chamber inside and an opening communicating with the chamber; a door panel pivotally connected to the housing, the door panel being movable between a closed position which closes the opening and an open position which exposes the opening; a door lock structure disposed corresponding to the door panel, the door lock structure including a locking position and an unlocking position; an actuator connected to the door lock structure and driving the door lock structure to lock or unlock the door panel; a formation nozzle member installed in the chamber and being movable therein, the formation nozzle member printing a laminated object; a coloring nozzle set installed in the chamber and being movable therein, the coloring nozzle set coloring the laminated object; an exhaust fan structure assembled to the housing and communicating with the chamber, the exhaust fan structure drawing air from the housing and discharging the air to the outside of the housing; and a controller electrically connected the actuator, the formation nozzle member, the coloring nozzle set, and the exhaust fan structure, wherein the controller controls the actuator to drive the door lock structure to the locking position; when the door panel is at the closed position, the door lock structure locks the door panel, and the controller is allowed to activate a printing mode; the printing mode including, by using the controller, controlling the formation nozzle member and the coloring nozzle set to perform three-dimensional printing and controlling the exhaust fan structure to keep operating; the controller activates an unlocking mode after a predetermined time if the controller determines that operation of the coloring nozzle set is stopped, wherein the controller controls the exhaust fan structure to keep operating during said predetermined time; and in the unlocking mode, the controller controls the actuator to drive the door lock structure to the unlocking position to release the door panel.