A printer comprising a carriage, a guide rail and a print surface, the carriage being movable along the guide rail and carrying a printhead that faces the print surface and is movable in a direction normal to the plane of the print surface, wherein a stop or brake mechanism responsive to a movement of the printhead in said direction normal to the plane of the print surface is provided and adapted to stop the movement of the carriage.