The invention relates to the technical field of printing equipment, in particular to a printer. The printer comprises a rack, the rack comprises a base and a vertical moving mechanism, the vertical moving mechanism is provided with a first transverse moving mechanism, the first transverse moving mechanism is provided with a second transverse moving mechanism, and the second transverse moving mechanism comprises two rope rollers, a fixing shelf, a printing rod and a first motor used for driving the two rope rollers to rotate; first pull ropes wind the two rope rollers, the winding directions ofthe two first pull ropes on the rope rollers are opposite respectively, the middle of the printing rod is spherically hinged to the fixing shelf, a printing head is arranged at one end of the printing rod, and the ends, away from the rope rollers, of the two first pull ropes are both fixed to the end, away from the printing head, of the printing rod. According to the printer, inclination of the printing head is achieved, and the side face of the product can be printed.