PURPOSE: To enable to detect the width of a medium and the presence or absence of the medium and to prevent a printing head from being damaged, by a method wherein a contacting member provided for a printing head or the like traces the surface of a medium through a flexible conductive protective member.
CONSTITUTION: When the printing head 3 prints on the medium, a deviating force of a spring 9 causes the contacting member 7 to slide while pressing the medium 5 through the protective member 6, so that the spacing between the medium 5 and the head 3 is maintained to be constant, thereby enabling to print with a uniform density. In this case, a platen 4 and the protective member 6 are electrically insulated from the other structure, and opposite surfaces of them are formed of an electrically conductive material or the like so that the protective member 6 and the platen 4 are electrically connected to each other when being pressed by the contacting member 7. When the printing head 3 is moved transversely and the contacting member 7 comes to a position out of the width of the medium 5, electrical connection between the protective member 6 and the platen 4 is detected, and a printing action is stopped. Accordingly, the width of the medium and the presence or absence of the medium can be detected, and the printing head can prevented from being damaged.