Abstract: First and second light receiving windows are formed on a head cover of a thermal head. The first light receiving windows are disposed to cross the lateral edges of the first king-sized recording paper. The second light receiving windows are disposed to cross the lateral edges of the second large-sized recording paper. First and second phototransistors are provided on the thermal head so as to measure quantity of light passed through the first and second light receiving windows. When printing the first recording paper, the first light receiving windows are partially shielded with lateral edges of the first recording paper and the second light receiving windows are completely shielded with the recording paper. Positions of the lateral edges are determined from the difference between output signals of the two phototransistors. When printing the second recording paper, the first light receiving windows are shielded by light-tight shielding stickers.