A tablet printing apparatus first applies either ultraviolet rays or infrared rays to surfaces of tablets that are being conveyed. The ultraviolet or infrared rays are applied to at least a contour portion of a target area where a print image is to be formed. In the case of applying ultraviolet rays, the surface of the contour portion is roughened, and the angle of contact with ink is reduced. In the case of applying infrared rays, the contour portion is etched into a recessed shape. Thereafter, ink is ejected inside the contour portion. This configuration suppresses the spread of the ejected ink to the outside of the target area. As a result, the print image has a well-defined contour.